OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Spam separation with address extensions

From: Mark Plomer (mailit-plomer.de)
Date: Tue Jun 26 2007 - 14:12:59 CDT


> all this can be done with simple mysql statements. no need for regex,
> stored procedures or whatever. can you state exactly what you want to
> achieve and your mysql tables structure?

My goal is to deliver all spam mails to different mailboxes, even if
they are rewritten by aliases especially by the catchall alias, but only
if the message is delivered internally.

So ... first problem ... for example if I have a message from
amavisd-new for "catchall+spamdomain.xyz":
- catchall+spamdomain.xyz is not existent in the table
- catchalldomain.xyz is not existent in the table
- But domain.xyz is existent in the table and is rewritten to
maildomain.xyz
- And there is a maildomain.xyz and a mail+spamdomain.xyz entry in
the table
- Now I didn't find any possibility to deliver the spam mail to
mail+spamdomain.xyz instead of maildomain.xyz, because the catchall
matches the whole address and therefore the address extension is lost.

How would you do that, regardless of the table structure?

The second problem is: If, and only if, the destination address of the
alias lookup points to an external domain, then the address extension
must not be added.

Is there any possibility?