It's important to be able to re-write local sender and recipient
addresses according to network layout, and sendmail provides this
functionality in its masquerade and genericstable rulesets. These can
be cumbersome but they work.
However, because sendmail re-writes the address after the (input!)
milters, the re-writes make use of DKIM (performed by milters,
including amavisd) problematic. While it is sometimes suggested that
one run the mail with the re-written addresses through yet another
instance of sendmail or amavisd to solve the problem, this is wasteful
and unnecessarily complex.
I have attached a small patch that performs the re-writing in amavisd
itself. The patch is relative to amavisd-new-2.6.2.
I'm using amavisd with amavisd-milter-1.3.1 but I expect this would
work with other setups.
It works by allowing the definition of rulesets in amavisd.conf. Each
ruleset is run sequentially on the appropriate header until it either
terminates or matches and performs a substitution; control then passes
to the next ruleset.
I can think of pathological situations in which this approach would be
inadequate and in which it would be necessary to perform the steps
above on each address in each header separately. However, it is not
clear to me that such situations ever arise in reality. In any case,
this is a start and it will work for most people.
It does allow the addresses to be re-written and signed by DKIM correctly!
Cyrus
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/