header rewrite not working

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

header rewrite not working

Thomas kinghorn
Good morning list.

I hope someone can assist with a problem.

We have a device which uses a GSM sim and a non-configurable device setting.
It is currently sending data relating to water flow.

The problem occurring is that Amavisd-new (SpamAssassin) is tagging the mail as spam due to the message-id not having a TLD.

I have setup the following in header_checks

/Message-Id:\s+<(.*?)\.TXT>/ REPLACE Message-Id: <$[hidden email]>

However, the messages still get relayed with the invalid message-id.


All tests show that the REPLACE is working but when I check the next hop server (relay server); the message-id still says ".TXT", not " @domain.tld"

test output on sample blocked mails:

postmap -q - regexp:/etc/postfix/header_checks < spam-mzWaYWwQ3Py9

Message-Id: <msgid064442_2016_04_08_06_02_44.TXT> REPLACE Message-Id: <[hidden email]>

however, SpamAssassin still triggers:

 3.8 MSGID_NOFQDN1          Message-ID with no domain name

 0.6 INVALID_MSGID          Message-Id is not valid, according to RFC 2822


It would appear that postfix is not replacing the message-id even though the tests work.


Thanks

Tom



Reply | Threaded
Open this post in threaded view
|

Re: header rewrite not working

Thomas kinghorn
Please disregard.

It would appear that a certain unnamed-user changed the header_check file in the main.cf

That will teach me to use postconf -n more often.

On Fri, Apr 8, 2016 at 9:58 AM, Thomas kinghorn <[hidden email]> wrote:
Good morning list.

I hope someone can assist with a problem.

We have a device which uses a GSM sim and a non-configurable device setting.
It is currently sending data relating to water flow.

The problem occurring is that Amavisd-new (SpamAssassin) is tagging the mail as spam due to the message-id not having a TLD.

I have setup the following in header_checks

/Message-Id:\s+<(.*?)\.TXT>/ REPLACE Message-Id: <$[hidden email]>

However, the messages still get relayed with the invalid message-id.


All tests show that the REPLACE is working but when I check the next hop server (relay server); the message-id still says ".TXT", not " @domain.tld"

test output on sample blocked mails:

postmap -q - regexp:/etc/postfix/header_checks < spam-mzWaYWwQ3Py9

Message-Id: <msgid064442_2016_04_08_06_02_44.TXT> REPLACE Message-Id: <[hidden email]>

however, SpamAssassin still triggers:

 3.8 MSGID_NOFQDN1          Message-ID with no domain name

 0.6 INVALID_MSGID          Message-Id is not valid, according to RFC 2822


It would appear that postfix is not replacing the message-id even though the tests work.


Thanks

Tom