solved, Re: amavisd-new not rewriting headers
[This message has also been posted to linux.debian.isp.]
In article <80gzLfirstname.lastname@example.org>, Cameron L. Spitzer wrote:
> [This message has also been posted to linux.debian.isp.]
> Postfix 2.3 on Sarge. Current amavisd-new and spamassassin.
> Everything else at default settings. Mail goes through
> and gets logged. But no X-Spam headers are ever added
> to the messages.
Thanks to those who offered clues.
The answer is amavis-new only adds X-Spam headers
to messages whose envelope-recipients' domains are
listed in @local_domains_maps.
There's a hint in the sample configuration file.
"This affects inserting spam-related headers..."
and "Set it up correctly if you need features that
rely on this setting."
There's an attempt to describe the actual rules for what
goes in that variable, in README.lookups.
But the writing didn't make sense to me so I
just read the source to find out how
local_domains_maps is parsed. Apparently it's
free-form. The array can hold references to hashes,
references to ACL arrays, references to regexes, or just
plain strings containing domain names, which are
a degenerate case of the ACL array.
Since I'm only filtering for two local domains,
my @local_domains_maps is just an array with
two strings in it.
No wonder there's a FAQ entry about it. The FAQ entry
doesn't actually mention the variable @local_domains_maps,
so it's easy to overlook.