Append subject depending on sender's address

classic Classic list List threaded Threaded
2 messages Options
Des
Reply | Threaded
Open this post in threaded view
|

Append subject depending on sender's address

Des
Hello

I would like to ask some help. I want to append the subject depending on the
senders address, but it's not working. What I did:

Added the following lines to main.cf:

*sender_dependent_default_transport_maps =
    hash:/etc/postfix/sdd_transport*

sdd_transport contains:
*  [hidden email]  transport_gmail:
  [hidden email] transport_yahoo:*

In master.cf, I added:

*transport_gmail unix - - - - - smtp
    -o smtp_header_checks=regexp:/etc/postfix/check_gmail_header

transport_yahoo unix - - - - - smtp
    -o smtp_header_checks=regexp:/etc/postfix/check_yahoo_header*

check_gmail_header file:
  */^Subject:(.+)$/i REPLACE Subject: [GMAIL] $1*

check_yahoo_header file:
  */^Subject:(.+)$/i REPLACE Subject: [YAHOO] $1*

What i missed?







--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: Append subject depending on sender's address

Wietse Venema
Des:

> Hello
>
> I would like to ask some help. I want to append the subject depending on the
> senders address, but it's not working. What I did:
>
> Added the following lines to main.cf:
>
> *sender_dependent_default_transport_maps =
>     hash:/etc/postfix/sdd_transport*
>
> sdd_transport contains:
> *  [hidden email]  transport_gmail:
>   [hidden email] transport_yahoo:*
>
> In master.cf, I added:
>
> *transport_gmail unix - - - - - smtp
>     -o smtp_header_checks=regexp:/etc/postfix/check_gmail_header
>
> transport_yahoo unix - - - - - smtp
>     -o smtp_header_checks=regexp:/etc/postfix/check_yahoo_header*
>
> check_gmail_header file:
>   */^Subject:(.+)$/i REPLACE Subject: [GMAIL] $1*
>
> check_yahoo_header file:
>   */^Subject:(.+)$/i REPLACE Subject: [YAHOO] $1*
>
> What i missed?

First, examine Postfix logging. Perhaps your transport_gmail or
transport_yahoo are not used at all.

Second, don't specify the 'i' flag.

        Wietse