Postfix: How to avoid forwarding spam (Spamassassin + Aliases)
3
votes
0
answers
695
views
We have a configuration where we have multiple shared IMAP folders (using dovecot) for a given group of people (e.g one for ressort A, one for ressort B). These groups have a mailaddress e.g. a@example.com and b@example.com. The people of this group can decide that they want the mail to be forwarded to an external account. (e.g. johndoe@another-example.com)
I implemented this using virtual_alias_maps (e.g. a@example.com -> a@example.com, johndoe@another-example.com)
now we have implemented spamassassin (postfix -> spamassassin -> postfix) where the first iteration does no alias resolution but just accepts the mail if the
rcpt to
address exists and the second iteration through postfix then resolves the aliases.
my problem is, that I do not want our server to actually send spam to those external accounts, but place the spam in a Spam/Junk folder on the local dovecot. so, I do not want the alias lookups to happen (or that they work differently) when the X-Spam: yes
header is set.
Asked by Tobi
(151 rep)
Mar 2, 2018, 01:17 AM