On 12/20/2010 8:37 AM, Christian Roessner wrote:
Hi,
I am a little bit stuck with prepending one and exactly one additional header
to outgoing mails that are sent from local users. In fact I want to add a
VBR-Info:- header for outgoing mails.
Local users use a seperate MSA port (own IP-socket in master.cf). The socket is
configured with smtpd_proxy_filter off and using content_filter. So the whole
mails gets queued before giving it to amavis (in my setup).
Inside the MSA part, I first defined a check_sender_access rule and thought
that would do the job. But today I saw that for _each_ To: address a header is
prepended. So if I write a mail with eight recipients, I see eight
VBR-Info:-header lines in the result.
Yes, that will work fine if you put your check_sender_access
rule under smtpd_data_restrictions.
So I thought I need a different method and configured header_checks:
# header_checks
if !/^VBR-Info:.*roessner-net(work-solutions)?/
/^From:....@roessner-net\.com/ PREPEND VBR-Info:
md=roessner-net.com; mv=dwl.spamhaus.org; mc=all
/^From:....@roessner-network-solutions\.com/ PREPEND VBR-Info:
md=roessner-network-solutions.com; mv=dwl.spamhaus.org; mc=all
endif
Headers are checked one at a time with no state kept, so the
above will never work. Put your check_sender_access rule in
smtpd_data_restrictions.
-- Noel Jones