On Wed, Nov 24, 2010 at 06:35:19PM +0100, 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.

A "postfix instance" is a complete Postfix system with its own
configuration directory, queue directory, ... as described in

    http://www.postfix.org/MULTI_INSTANCE_README.html

Perhaps you mean two instances of the smtpd(8) service in the same
master.cf(5) file (of a single Postfix instance).

>       In the first one, I want to apply a header_checks (a header_check.pcre) 
> that replaces some headers with another one.

With multiple Postfix instances, you just make the appropriate changes
in main.cf.

> 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=

This won't work, since header_checks are performed by cleanup(8) not
smtpd(8).  See http://www.postfix.org/FILTER_README.html or better yet,
use real Postfix instances:

    http://www.postfix.org/MULTI_INSTANCE_README.html

-- 
        Viktor.

Reply via email to