Re: Two postfix instances, different header_checks

2010-11-25 Thread Angel L. Mateo

El 25/11/10 01:05, Jeroen Geilman escribió:


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=


OK. I'll try this.

--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información   _o)
y las Comunicaciones Aplicadas (ATICA)  / \\
http://www.um.es/atica_(___V
Tfo: 868887590
Fax: 86337


Re: Two postfix instances, different header_checks

2010-11-25 Thread Angel L. Mateo

El 24/11/10 18:41, Victor Duchovni escribió:

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).


OK. I have two smtpd services in one postfix instance.



/^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   inetn   -   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:


OK. Thank you.

--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información   _o)
y las Comunicaciones Aplicadas (ATICA)  / \\
http://www.um.es/atica_(___V
Tfo: 868887590
Fax: 86337


Re: Two postfix instances, different header_checks

2010-11-24 Thread Jeroen Geilman

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:

10025inetn-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.



Re: Two postfix instances, different header_checks

2010-11-24 Thread Victor Duchovni
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 inetn   -   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.


Two postfix instances, different header_checks

2010-11-24 Thread Angel L. Mateo

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   inetn   -   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.


Any idea?

--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información   _o)
y las Comunicaciones Aplicadas (ATICA)  / \\
http://www.um.es/atica_(___V
Tfo: 868887590
Fax: 86337