How do you managing the mailbox size for users configured with the Postfix mail server ?. And how to avoid “error writing message: File too large” ?
Setup new mailbox size limit
Login as root and type the following command to edit main.cf
vi /etc/postfix/main.cf
Default, the limit for any local mailbox or maildir is 50 MB but, this can easily be changed with by using this directive in the main.cf file.
mailbox_size_limit=102400000
This changes the mailbox limit to 100 MB. Or you can make it umlimited by using a “0”.
mailbox_size_limit=0
Setup new message size limit
Default message size is 1 MB, example changes the message size limit to 2MB. Open file /etc/postfix/main.cf and add/modify/set values as follows
message_size_limit = 2048000
Review the current settings
If you would like to review the current settings on your Postfix server use this command
postconf -d | grep size_limit
Sample outputs
body_checks_size_limit = 51200 bounce_size_limit = 50000 header_size_limit = 102400 mailbox_size_limit = 102400000 message_size_limit = 2048000