Hi
I'm trying to replace To: header with header_checks regexp rule. The funny
thing is, as I've figured out, the rule works perfectly if the Received:
header is after the To: header (or missing), but does nothing if it is
before the To: header. I've tried running in debug mode but couldn't get any
insight to it.. I'm running postfix-2.7.1 on solaris10..

When I check it via

postmap -q - regexp/etc/postfix/header_checks < /tmp/mail.headers

I always get a match, regardless of position of the Received headers, but
not via delivery..

The rule/header_checks itself is:
# cat /etc/postfix/header_checks
/^To: \+1234567\/TYPE=PLMN$/
 REPLACE To: 1919/TYPE=PLMN

And when To: is first it gets matched:
Sep 13 13:26:37 fps-mta3 postfix/smtpd[16755]: [ID 197553 mail.info] <
unknown[10.40.0.20]: DATA
Sep 13 13:26:37 fps-mta3 postfix/smtpd[16755]: [ID 197553 mail.info] >
unknown[10.40.0.20]: 354 End data with <CR><LF>.<CR><LF>
Sep 13 13:26:37 fps-mta3 postfix/cleanup[16757]: [ID 197553 mail.info]
4C1198C01: replace: header To: +1234567/TYPE=PLMN from unknown[10.40.0.20];
from=<+1111111/type=p...@domain.com> to=<1...@domain.com> proto=ESMTP helo=<
mta2.domain.com>: To: 1919/TYPE=PLMN
Sep 13 13:26:37 fps-mta3 postfix/cleanup[16757]: [ID 197553 mail.info]
4C1198C01: message-id=<>
Sep 13 13:26:37 fps-mta3 postfix/smtpd[16755]: [ID 197553 mail.info]
public/cleanup socket: wanted attribute: status

Any ideas on this feature?

Thanks
Jure

Reply via email to