Martin, > hmmmm.... is this the wrong list for my question?
Probably. postfix-users ML may provide a better answer. > or is this such an unusual setup? Not unusual, but few people care about X-Original-To, and half of those that do, do so for a wrong reason. Using multi-drop mailboxes is asking for trouble. > what am i missing? > i can't get both things (amavis per-user policy and > X-Original-To-header) work together... > in my setup i got a problem with wrong "X-Original-To" headers. > i think it is a very common setup: postfix feeding amavis and then > from amavis back to postfix for local delivery (both are newest version). > > since i use virtual domains with aliases/fetchall accounts, i set up > postfix to do the address_mappings BEFORE it feeds amavis. but this > leads to wrong "X-Original-To" headers; they are always equal with the > "Delivered-To" headers. > if i set up postfix to do the mapping AFTER the content filter, the > headers are correct - but now my amavis policies aren't working since > amavis can't find them in lookups for the unmapped email-adress. > i'm stuck. The cleanup service provides the X-Original-To information for local delivery agents, and it takes this information from an envelope recipient at the time mail entered the smtpd service of the same Postfix instance. The original recipient as preserved in the ORCPT attribute of the RCPT TO behaves differently, it _is_ preserved through the whole chain of MTA/amavisd/MTA - perhaps a good question for the postfix list is whether there is some way for a local delivery agent to insert ORCPT address into some message header field. Even if it were possible, this is not exactly equivalent to what are you asking for, as the ORCPT may be provided by MTA hops even before your mailer. > can amavis do adress-mapping in policy lookups? No. > can amavis be set up to insert custom headers, like "Amavis-To"? Programmatically it is not difficult, but this would break recipient privacy (Bcc) and must not be done for multi-recipient mail. > can postfix be set up to write the "X-Original-To" header before it does > the adress-mapping? No, X-Original-To header field is only inserted by delivery agents. It would be inappropriate for SMTP or LMTP agents to do so (for the same reason as Amavis-To would not be acceptable). Mark ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/