OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: different check_sender_access for different recipient domains?

From: Aaron Wolfe (aawolfegmail.com)
Date: Thu Sep 06 2007 - 21:10:40 CDT


On 9/6/07, Reinaldo Carvalho <reinaldocgmail.com> wrote:
>
> Try this...
>
> smtpd_restriction_classes = reject_if_sender1_match,
> reject_if_sender2_match
>
> reject_if_sender1_match = check_sender_access
> hash:/etc/postfix/sender1_map
>
> reject_if_sender2_match = check_sender_access
> hash:/etc/postfix/sender2_map
>
> smtpd_recipient_restriction = ... , check_recipient_access
> hash:/etc/postfix/recipient_map
>
> ## /etc/postfix/recipient_map
> domain1.com reject_if_sender1_match
> domain2.com reject_if_sender2_match
>
> ## /etc/postfix/sender1_map
> senderA.com reject
> senderB.com reject
>
> ## /etc/postfix/sender2_map
> senderC.com reject
> senderD.com reject

Yes I think that would work fine for a smaller config, thanks for the
example. Unfortunately it would quickly become an insane thing to manage
for me on this project (hundreds of domains) and I suspect having hundreds
of smtpd_restriction_classes might be a problem for performance.

--
> Reinaldo Carvalho
>
>
> On 9/6/07, Aaron Wolfe <aawolfegmail.com> wrote:
> > Hi,
> >
> > I am trying to find a way to allow different domains to have different
> > white/blacklists, i.e. if my customer #1 wants to whitelist spammer A,
> > client #2 doesn't have to take their junk. I've got my blacklist in
> mysql
> > working fine sitewide, and I have a field in the table that contains the
> > domain that requested the entry (and should be the only domain who's
> > incoming mail causes the entry to be used). It doesn't seem like I can
> get
> > postfix to query based on both the sending domain *and* the recipient
> > domain.
> >
> > I've searched around a lot but haven't found it, maybe I am blind. I
> have
> > per domain smtpd restrictions working for just about every other UCE
> control
> > (per recipient RBL usage, per recipient dns and RFC checks, etc). This
> per
> > recipient + per sender whitelist is eluding me. Is there a way?
> >
> > -Aaron
> >
> >
>