On Wed, Jul 10, 2024 at 07:44:05PM +0200, Steffen Nurpmeso via Postfix-users wrote:
> Well, i do not know, .. but i have > > message_size_limit = 500000 Wow, that's rather restrictive in age when disk capacities are starting to be measured in 10s of terabytes, while the majority of mail servers already allowed ~10MB back when 10s of Gigabytes was a plausible disk size. Do you do a lot of time-travel to the 1990's? :-) https://commons.wikimedia.org/wiki/File:Hard_drive_capacity_over_time.png > (Btw, does the client part of RFC 1870 actually exist in practice? Yes, definitely. Many (though not all) sending MTAs use MAIL FROM:<envelope-sender> SIZE=... and bounce the large messages over the declared size limit without even sending "MAIL FROM:" when the size limit in the EHLO response is smaller. > I cannot recall to have seen it. Does postfix log such client > declarations? Would not think it does..) No, the client's "MAIL FROM" is not logged at that level of detail, only the envelope sender is logged by the queue manager when messages enter the active queue, and by that time it may already have been rewritten. > > I have a problem in that I would like several senders to be able > to send larger messages. You may as well advertise the largest supported size, it is better better than advertising just "SIZE", because clients that honour "SIZE=<limit>", but don't send "SIZE=" in mail from will be able to avoid attemting transmission of overly large messages. > Letting aside the "extended MAIL" client command that i never have > seen, what i would hope for would be that postfix simply says > > 250-SIZE There's little to gain by doing that. Instead, just advertise the absolute ceiling. > > and would then have something like a lookup table that allows to > configure the actually used size limit based upon senders. > Is this somehow doable? That's where your policy service comes in. It can check the envelope sender address and act accordingly. Perform the check both in: smtpd_data_restrictions and smtpd_end_of_data_restrictions. The former will check any "SIZE=" value promised by the client, while the latter will check the actual received message size. Postfix has no built-in sender-specific size enforcement, and none is needed, given the policy service mechanism. IIRC milters get to see the full extended "MAIL FROM" command, and the message content, so you can probably use a milter if you prefer, but a policy service feels simpler. -- Viktor. _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org