A Blog Of Random Coding Techniques & Experiments Robert Askam

postdrop: warning: uid=0: File too large; sendmail: fatal: root(0): message file too big Post postdrop: warning: uid=0: File too large; sendmail: fatal: root(0): message file too big 8 months ago

I received two errors when trying to send an attachment over SendMail PHPMailer.

postdrop: warning: uid=0: File too large
sendmail: fatal: root(0): message file too big
PHPMailer uses the web server's sendmail function or whatever mail server is installed. Normally there is a (default) limit to the message size. To fix this you need to:
nano /etc/postfix/main.cf
//Add this line under # SENDING MAIL
//This is bytes so will be 20.48MB
message_size_limit = 20480000
//Then run
service postfix restart