On 11/24/2010 06:35 PM, Angel L. Mateo wrote:
Hello,

I'm running postfix (version 2.5.5, from debian lenny package) with amavis and spamassassin for spam checks.

For amavis and SA to work, we have 2 postfix instances, the main one running in port 25 and other running in other port 2500 that receive mails from amavis.

In the first one, I want to apply a header_checks (a header_check.pcre) that replaces some headers with another one. Specifically, I want to replace X-Spam-.* headers with X-MySpam-$1 (because we are an internal server that receive mail from another one that also run SA and I want to preserve both headers, but with another name).

    So I have write a rule like:

/^X-Spam-(.*)/    REPLACE X-MySpam-$1

    in header_checks.pcre

In the main.cf of postfix at port 25 I have configured:

header_checks = pcre:/etc/postfix/header_checks.pcre

    In master.cf I have a line like:

10025    inet    n    -    n    -    -    smtpd
    ...
    -o header_checks=

    So, second postfix instance doesn't use this header_check.

The problem I have is that both postfix instances uses this header_check, so I have my own SA headers also renamed like X-MySpam-$1.

header_checks is a cleanup(8) setting, not an smtpd(8) one.

You can specify a different cleanup service by adding

    -o cleanup_service_name=my_cleanup_service

to your SA resubmission smtpd listener, and defining

    my_cleanup_service unix  - - - - -  cleanup
        -o header_checks=

Credits to Wietse; I did not come up with this.


--
J.

Reply via email to