0

Adding Spamassassin to my Postfix has had an unwarnted effect on my email headers.

We use Postfix with all of the mail routed to a catchall account. Our virtual_alias_maps file looks something like:

@mydomain.com catchall
@mydomain2.com catchall
@mydomain3.com catchall
...

If a message is sent to two addresses in our domain, we'll get two messages delivered to the catchall, the first one with headers like:

X-Original-To: [email protected]
Delivered-To: [email protected]
To: [email protected], [email protected]

and the second on with headers like:

X-Original-To: [email protected]
Delivered-To: [email protected]
To: [email protected], [email protected]

This is exactly what we want. We can look at the X-Original-To or the Delivered-To to know who was the original recipient of the message. However, when we turn SpamAssassin on, the headers are modified so that both messages look like:

X-Original-To: [email protected]
Delivered-To: [email protected]
To: [email protected], [email protected]

and there is absolutely nothing in the message that lets me know which one was for which recipient.

Is there a way to stop SpamAssassin from modifying the headers? If not, is there another way to preserve the identity of the original recipient?

1 Answers1

0

You probably have configured the content_filter to call SA, either in master.cf for the one or more services or in main.cf for all services. This causes the filter to be called for every mail to be sent, e.g. for every recipient.

You can probably fix this enabling no_address_mappings to you master.cf, like so:

smtp      inet  n       -       -       -       -       smtpd
  -o content_filter=spamassassin
  -o receive_override_options=no_address_mappings
royarisse
  • 101
  • 2