]> SpamAssassin, Amavis - Missing headers 🌐:aligrant.com

SpamAssassin, Amavis - Missing headers

Alastair Grant | Tuesday 13 June 2017

I got a piece of spam the other day - not entirely shocking in itself, but it wasn't filtered and didn't seem to have any scoring information on it. This is strange as I use Amavis and Spamassassin to filter incoming emails.

The difference for this email was the destination - I've been trying out some virtual mail hosting in Postfix by using the /etc/postfix/virtual file and aliasing an entire domain to a mailbox. This works fine, and whilst Amavis was running, it wasn't my rule set.

It turned out the cause is the @local_domain_maps variable in Amavis. I had already added my virtual domain to this but that wasn't triggering it, instead I had to add the final destination domain, which was the hostname of my server. Once added everything started working as expected.

I suspect this only applies when running Amavis as a post-queue filter and not pre-queue filter. Still, it's a gotcha worth remembering.

Breaking from the voyeuristic norms of the Internet, any comments can be made in private by contacting me.