Richard, > Addres rewrite possible? > Is this possible with amavis? > > Can you rewrite the To: or Cc: field if a criteria is met ? > For example : Email with these specs : > ---- > From : us...@company.org > Subject : hello > To : rich...@blah.net > Rewrite To: field --> da...@blah.net > > Is this possible ? > > I know postfix has a header check which can do this, but you can only > have one criteria, not more.
Well, it is possible through providing a custom hook - your perl code, which may examine header fields and rewrite them if necessary by calling $hdr_edits->edit_header(...). It is nontrivial though. You'd need to parse address list (a tricky business to do it right), and edit it. I would not recommend it, it is nastier than you'd expect. Try sticking to header rewrites provided by Postfix. And reconsider if you really need this - modifying From/To/Cc header fields breaks their informational purpose (unless used close to their source for simple masquerading or canonicalization), breaks DKIM signatures, and makes troubleshooting or explaining what is going on more difficult. Mark ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user Please visit http://www.ijs.si/software/amavisd/ regularly For administrativa requests please send email to rainer at openantivirus dot org