Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When sending large email to a new CentOS6 server running Postfix as the MTA, the following message is returned:

tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 552 552 5.3.4 Error: message file too big (state 18)

I found the following suggestion, but am unclear as to where it needs to be added in the main.cf file:

This was caused by Postfix and it's limit on not only messages but mailbox sizes.

I had to add this setting in /etc/postfix/main.cf:

message_size_limit = 31457280

How can the maximum mail size (including attachments) be increased in Postfix?

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

Add it anywhere in main.cf, it's not relevant :) But it's good to keep directives grouped in some logical manner, it is easier for maintance

According to official postfix documentation:
message_size_limit (default: 10240000) The maximal size in bytes of a message, including envelope information. Note: be careful when making changes. Excessively small values will result in the loss of non-delivery notifications, when a bounce message size exceeds the local or remote MTA's message size limit.

share|improve this answer
add comment

Yes, you are correct: message_size_limit is the configuration directive you need. Put it anywhere in the main.cf file and reload (or restart) Postfix.

You may use the postconf tool to check the currently configured value:

postconf message_size_limit
share|improve this answer
add comment

Be careful if setting this limit to a high number. You need at least 1.5 times the size of message_size_limit of free space on the partition where the Postfix queue resides. If you don't have that free space, then all messages are rejected even if they are only a few kilobyte in size. And if you receive one message of this size and then the space exceeds (during final mailbox delivery) all further messages are rejected. Due to missing space.

Also note: Email is not a file transfer protocol. See this QA: Why do we still have such small email attachment filesize restrictions?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.