OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Address rewriting and backscatter

From: Nick Celebic (nick-listkelcom.igs.net)
Date: Fri Aug 03 2007 - 08:38:26 CDT


On Thu, 2 Aug 2007 16:49:27 -0400
Victor Duchovni <Victor.DuchovniMorganStanley.com> wrote:

> On Thu, Aug 02, 2007 at 04:35:48PM -0400, Nick Celebic wrote:
>
> > Hello All,
> >
> > I've got a virtual setup with LDAP. I'm rewriting olddomain.com
> > into newdomain.com
> >
> > ie. rewrite-new.db => olddomain.com newdomain.com
> >
> > The problem is that postfix queues the mail before rewriting as if
> > <anything>olddomain.com was a catchall. This results in more
> > backscatter than I am comfortable with. I would like to do an LDAP
> > lookup using only the username, and then adding newdomain.com I
> > haven't been able to wrap my head around how to do this.
> >
>
> Avoid x y rewrites, instead:
>
> domain = olddomain.com
> query_filter = mail=%unewdomain.com
> result_attribute = mail
>
> This will only match valid input addresses.
>

That would work for only one domain, but I have many of them. It is
possible I could use a second ldap lookup, but I don't want to load the
server with an additional lookup per mail that comes in.