Ubuntu/Debian & Postfix: Increase attachment size limit

By default postfix limits the attachment size to about 10 MB. You can determine the current limit with the following command:

# sudo postconf | grep message_size_limit
message_size_limit = 10240000

To increase the limit add (or change) the following setting in the file /etc/postfix/main.cf:

# 20MB
message_size_limit = 20480000

After restarting the postfix service the new limit will be active:

# sudo service postfix restart


  1. David

    I found that the comment at the end of the line lead to an error when restarting postfix. I just had to ommit the “# 20MB” and it worked fine.

  2. Jan Jonas

    Hi David,
    thanks for the comment. You’re right, I fixed the error.

Leave a comment

Your email address will not be published. Required fields are marked *