sosogh wrote:
Hi list

I am using postfix 2.5.5 on debian lenny.I installed it via apt-get
I have set up two postfix smtpd instances, the first one listens on 0.0.0.0:25
the second one listens on 127.0.0.1:10026

The postfix:25 accepts mails from the INTERNET,checks that if the recipient is 
"@special.com",
if so, it forwards the mail to postfix:10026,and do header_checks on 
postfix:10026

This is my conf:

[r...@postfix]# more /etc/postfix/main.cf
smtpd_recipient_restrictions =
  permit_mynetworks,
  check_recipient_access pcre:/etc/postfix/recipient_access.txt,
  permit_sasl_authenticated,
  reject_non_fqdn_hostname,
  reject_non_fqdn_sender,
  reject_non_fqdn_recipient,
  reject_unauth_destination,
  reject_unauth_pipelining,
  reject_invalid_hostname,
  check_policy_service inet:127.0.0.1:60000


[r...@postfix]# more recipient_access.txt /special.com/ FILTER smtp:[127.0.0.1]:10026


[r...@postfix]# more master.cf 127.0.0.1:10026 inet n - n - - smtpd
        -o header_checks=pcre:/etc/postfix/header_checks.txt
        -o smtpd_client_restrictions=
        -o smtpd_helo_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o mynetworks=127.0.0.0/8
        -o receive_override_options=no_unknown_recipient_checks


[r...@postfix]# more header_checks.txt
/Subject:(.*)/          REPLACE Subject:[haha] $1

The problem is that header_checks doesn't work on postfix:10026,
the mail subject wasn't modified.
Any hints is appreciated

"header_checks doesn't work" is a poor subject choice.

the header_checks parameter is used by the cleanup service, and not by smtpd. To specify alternate header_checks, you need to define an alternate cleanup service, then tell your alternate smtpd to use that.

Examples are in the archives.

  -- Noel Jones

Reply via email to