On 06 Dec 2013, at 17:21 , Jose Borges Ferreira <undersp...@gmail.com> wrote:

> I've setup a Postfix like this, having on the submission port a bigger
> value than the message_size_limit specified in main.cf
> 
> main.cf
> message_size_limit = 10000000
> 
> master.cf
> smtp inet n       -       n       -       -       smtpd
> submission inet n       -       n       -       -       smtpd
>  -o message_size_limit=20000000

I bet this will work if you do it the other way around, set a more permissive 
size in main.cf and then specify a more restrictive size in master.cf for smtp. 
I'd comment it:

main.cf
# Allow large messages (see Master.cf for restrictions)
message_size_limit = 20000000

master.cf
# Incoming attachments restricted to smaller size
smtp inet n       -       n       -       -       smtpd  -o 
message_size_limit=10000000
submission inet n       -       n       -       -       smtpd

This is a good rule in general, as the settings in main.cf are used as the 
defaults, so you want to make exceptions to those be more restrictive, not less 
restrictive since you never know when you may hit a default somewhere down the 
chain.

My only other comment is that the "big boy on the block" for mail is gmail, and 
they allow 25MB attachments, and that is before encoding, as I recall. I'd 
think seriously about staying compatible with their settings¹.

# 25MB
message_size_limit = 26214400
# 25MB + ⅓ for encoding
message_size_limit = 34952534

¹ "What? That confidential contract is too large for my company mail server to 
accept? Well, just send it to my gmail account instead."

-- 
You Bastard was thinking: ...Delta squared. Thus, dimensional pressure k
will result in a ninety-degree transformation in Chi(16/x/pu)t for a
K-bundle of any three invariables. Or four minutes, plus or minus ten
seconds...  The camel looked down at the great pads of his feet.  Let
speed equal gallop. --Pyramids

Reply via email to