View Single Post

  #4 (permalink)  
Old 02-18-2008
Joachim Reichel
 
Posts: n/a
Default Re: Restricting mails to particular adress w.r.t. sender and size

Hi,

>> How do I setup postfix such that all mails to mailinglist@mydomain.tld
>> that are not from a fixed set of adresses are rejected?

[...]
> gives) using a restriction class. Have a look at
> http://www.postfix.org/RESTRICTION_CLASS_README.html which
> will give you a head start in the right direction.


Thanks, it works now.

>> How can I limit the message size for the mails to this mailing list?
>> These restrictions should be specific to this mailing list, not for
>> all mails in general.

>
> Seeing that the real message size can only be determined after the
> message data has been submitted, you can't use smtpd_xxx_restrictions
> here, as they happen too early (though ESMTP knows about the SIZE
> keyword from the client, this is by no means reliable). Thus the way
> to go would be either a content filter that knows about size checking,
> or, preferrably, a policy daemon (with at least postfix 2.2, as 2.1
> still used the size value supplied in the SMTP dialog).
>
> If you're somewhat proficient with Perl, you shouldn't have trouble
> building your own policy daemon that compares the actual message size
> against a hash value for a recipient address. The docs give a number
> of pointers in
> http://www.postfix.org/SMTPD_POLICY_README.html


Ok, I see how to proceed. If someone has a working script for the size limit,
please let me know.

@Martin: No, I don't use mailman (yet), though I might do in the future if the
setup gets more complex.

Thanks,
Joachim
Reply With Quote