On 6/18/2014 4:36 AM, mailing lists wrote:
> Hello all
> 
> I'm trying to limit big mails to local lists using postfix+postfwd but I must 
> be missing something because it seems too complex to me. 
> 
> Mail size is available in END-OF-MESSAGE (E-O-M) so I do size checks in this 
> phase of the protocol. With single recipient mails all works as expected, 
> postfix policy information shows size and recipient info and I can reject 
> them, whilst multiple recipient mails lacks the recipient info, 
> this field is empty in E-O-M, so there is no easy way to do this check 
> because not sufficient info is present at E-O-M. 
> 
> any ideas for how to implement this?

By design the policy recipient list is empty at DATA and EOM if
there are multiple recipients.

The best solution is to set up a separate MX for the list with the
appropriate size limit set.

Many (most?) real mail clients include the size in the MAIL FROM
command, so you can do size checks in the RCPT stage, but you have
no way of requiring the SIZE argument.  And they can lie.

Other bad solutions include enforcing the size limit during delivery
(causing a bounce or truncating too-big messages) or setting
smtpd_recipient_limit=1 to force single-recipient messages (killing
performance and maybe other problems).



  -- Noel Jones

Reply via email to