Lars, > I'm running amavisd-new, clamav and postfix on my mail-gateways. We use > virtual-tables to route all our e-mail on the gateways to > [EMAIL PROTECTED] and the mail-gateways delivers to local-delivery > servers that delivers to mailboxes. > > All this of course works like a charm. The problem is that I need to add > an "original-to" header with the original envelope address. Postfix has > the x-original-to header but it gets destroyed by this setup > (x-original-to is [EMAIL PROTECTED] since it's rewritten by > mail-gateway and there is no way to change this in postfix). > > Is there any simple way to get amavisd-new to add the envelope adress to > a custom header in the e-mail? Since we filter all mail with amavisd-new > it seems like a patch could fix this problem. > Have anybody tried to do this with amavisd-new? Any good reasons for me > not to try it? Any pointers to where in the code this could be done > smoothly.
There is one fundamental problem: a message can have multiple recipients. Adding x-original-to for all recipients would violate sender's privacy (consider mailing lists or Bcc). Splitting a message before it reaches a content filter is an option, although not very appealing one (it can bump up average load by a factor of 2 or more). Technically, insering an additional header field in amavisd is not hard, just call $hdr_edits->append_header(...) with required additional headers, perhaps somewhere in sub add_forwarding_header_edits_per_recip or in add_forwarding_header_edits_common. Mark ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ 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/
