OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: filter per domain not working

From: Victor Duchovni (Victor.DuchovniMorganStanley.com)
Date: Sat Mar 01 2008 - 21:49:46 CST


On Fri, Feb 29, 2008 at 11:04:51PM -0800, Gary W. Smith wrote:

> > > We have a script that processes email based upon domain. It's a
> little
> > > wacky in that it can only handle one domain at a time. The problem
> is
> > > that the script is receiving emails with multiple domains within the
> > > same email.
> >
> > Define "multiple domains" in this context. Envelope recipients?
> Message
> > headers? Example? Logs?
>
> Here is the actual email sent from mta04.mxtest.com to mta03.mxtest.com
> (we own mxtext.com, .net, org and use them internally for testing). It
> appears that mta4 is sending all three email addresses, two for one
> domain and one for the other, in a simple SMTP session call.
>
> This is what's being password to the filter.
> -f garymxtest.net -- gary.smithmxtest.com garymxtest.com
> garymxtest.org

Reading the code more closely, it appears that content filters don't
behave the way I thought. There is no practical difference between
"filter:dummy" and "filter". When the nexthop is absent, it is set
to $myhostname. So either way all recipients are routed to a single
destination. You can either take all the recipients together or one at
a time by setting the transport destination recipient limit to 1.

Sorry about that. This is unlikely to change I think, too many people
probably use just "filter" and get decent performance because all the
recipients *are* sent together. If this were to be made possible it
would need to be controlled by a boolean parameter that defaults to
the current behaviour.

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomopostfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.