Hi,

On Thu, Aug 13, 2009 at 5:43 PM, Magnus Bäck<mag...@dsek.lth.se> wrote:
> On Thursday, August 13, 2009 at 22:18 CEST,
>     Eduardo Júnior <ihtrau...@gmail.com> wrote:
>
>> > smtpd (listener) is not smtp (client).
>>
>> Ops, my mistake.
>>
>>  -o smtpd_header_checks=regexp:/path/header_checks
>
> There is no such configuration parameter. To have different header
> checks for different smtpd(8) listeners you need to define multiple
> cleanup(8) services with different header_checks values and arbiter
> between the services with the cleanup_service_name parameter.

thanks.
I read about that and configured and tested this:

- two cleanup daemons (different names, obviosly)
- each cleanup daemons has a different headers checks

And for each daemon smtp, I defined the daemon cleanup suitable, according to:
http://www.postfix.org/postconf.5.html#cleanup_service_name


My master.cf:

second-cleanup   unix  n       -       -       -       0       cleanup
 -o header_checks=regexp:/etc/postfix/header_checks_out

submission inet n       -       -       -       -       smtpd
...
  -o cleanup_service_name=pos-cleanup


>
>> > Again, isn't required any aditional configuration than
>> > header_checks.
>> >
>> > You need a regular expression to match exactly with local amavis
>> > server.
>> >
>> > You can test with postmap:
>> >
>> > postmap -q - regexp:/path/header_checks < /path/to/sample-message
>>
>> I did that. Created some regular expressions and if a regexp matches
>> with all the message or part of it, the rule was actived.
>> Like that:
>>
>> /^Received: from \[[0-9]+(\.[0-9]+){3}\]/     IGNORE
>>
>> If my header is Received: from [192.168.1.32] the rule is actived
>> If my header is Received: from [192.168.1.32] (unknown [192.168.1.32])
>> ..... the rule is actived too.
>>
>> And this isn't a match exactly.
>
> No, so you need to craft a more precise expression. The look of the
> Received: header you want to remove is very well-known, so it should
> be quite easy to craft a suitable expression.


ok, but there is another way to do what I want.
The example above was a test.
Accepting some headers and denying the rest is an alternative:

/^((Resent-)?From|To|Cc|Date|Reply-to|Reply-TO|Return-Path|Message-ID):/        
OK
/./     IGNORE


But I don't know if these headers are essencial.
Some reference about this?


>
> --
> Magnus Bäck
> mag...@dsek.lth.se
>


Thanks to all for the informations.


[]'s



-- 
Eduardo Júnior
GNU/Linux user #423272

:wq

Reply via email to