From: "AMP Admin" on
I'm trying to add ONE custom string to the header using the following but
the first one adds it multiple times and the second doesn't work at all.
Thanks for your help!



header_checks = regexp:/etc/postfix/header_checks



WORKS BUT ADDS IT MULTIPLE TIMES:

/^/ PREPEND MyString



DOES NOT WORK:

/^DomainKey-Signature:$/ PREPEND MyString



From: Ralf Hildebrandt on
* AMP Admin <admin(a)ampprod.com>:
> I'm trying to add ONE custom string to the header using the following but
> the first one adds it multiple times and the second doesn't work at all.
> Thanks for your help!
>
>
>
> header_checks = regexp:/etc/postfix/header_checks
>
>
>
> WORKS BUT ADDS IT MULTIPLE TIMES:
>
> /^/ PREPEND MyString
>
>
>
> DOES NOT WORK:
>
> /^DomainKey-Signature:$/ PREPEND MyString

/^From:/ PREPEND MyString

Please note:

When prepending text before a message header line, the prepended text
must begin with a valid message header label.

--
Ralf Hildebrandt
Geschäftsbereich IT | Abteilung Netzwerk
Charité - Universitätsmedizin Berlin
Campus Benjamin Franklin
Hindenburgdamm 30 | D-12203 Berlin
Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
ralf.hildebrandt(a)charite.de | http://www.charite.de


From: Ralf Hildebrandt on
* AMP Admin <admin(a)ampprod.com>:

> WORKS BUT ADDS IT MULTIPLE TIMES:
>
> /^/ PREPEND MyString

This matches EVERY header line

> DOES NOT WORK:
>
> /^DomainKey-Signature:$/ PREPEND MyString

This matches a header line like:

DomainKey-Signature:

(with NOTHING after the :)

--
Ralf Hildebrandt
Geschäftsbereich IT | Abteilung Netzwerk
Charité - Universitätsmedizin Berlin
Campus Benjamin Franklin
Hindenburgdamm 30 | D-12203 Berlin
Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
ralf.hildebrandt(a)charite.de | http://www.charite.de


From: "AMP Admin" on

-----Original Message-----
From: owner-postfix-users(a)postfix.org [mailto:owner-postfix-users(a)postfix.org] On Behalf Of Ralf Hildebrandt
Sent: Thursday, January 28, 2010 3:18 PM
To: postfix-users(a)postfix.org
Subject: Re: Add Header

* AMP Admin <admin(a)ampprod.com>:
> I'm trying to add ONE custom string to the header using the following but
> the first one adds it multiple times and the second doesn't work at all.
> Thanks for your help!
>
>
>
> header_checks = regexp:/etc/postfix/header_checks
>
>
>
> WORKS BUT ADDS IT MULTIPLE TIMES:
>
> /^/ PREPEND MyString
>
>
>
> DOES NOT WORK:
>
> /^DomainKey-Signature:$/ PREPEND MyString

/^From:/ PREPEND MyString

Please note:

When prepending text before a message header line, the prepended text
must begin with a valid message header label.

--
Ralf Hildebrandt
Geschäftsbereich IT | Abteilung Netzwerk
Charité - Universitätsmedizin Berlin
Campus Benjamin Franklin
Hindenburgdamm 30 | D-12203 Berlin
Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
ralf.hildebrandt(a)charite.de | http://www.charite.de


what would a valid message header label be? I was going to use Message-ID: but then I read the following:

Message headers added by the cleanup(8) daemon itself are
excluded from inspection. Examples of such message headers
are From:, To:, Message-ID:, Date:.

From: "AMP Admin" on
-----Original Message-----
From: owner-postfix-users(a)postfix.org [mailto:owner-postfix-users(a)postfix.org] On Behalf Of Ralf Hildebrandt
Sent: Thursday, January 28, 2010 3:22 PM
To: postfix-users(a)postfix.org
Subject: Re: Add Header

* AMP Admin <admin(a)ampprod.com>:

> WORKS BUT ADDS IT MULTIPLE TIMES:
>
> /^/ PREPEND MyString

This matches EVERY header line

> DOES NOT WORK:
>
> /^DomainKey-Signature:$/ PREPEND MyString

This matches a header line like:

DomainKey-Signature:

(with NOTHING after the :)

--
Ralf Hildebrandt
Geschäftsbereich IT | Abteilung Netzwerk
Charité - Universitätsmedizin Berlin
Campus Benjamin Franklin
Hindenburgdamm 30 | D-12203 Berlin
Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
ralf.hildebrandt(a)charite.de | http://www.charite.de



just in case anyone comes across this I got it sorted with the following:

/^Subject: .*/ PREPEND MyString

 |  Next  |  Last
Pages: 1 2
Prev: virtual_alias_maps mysql
Next: relay help