Can Amavisd block based on Message-ID ?
Ralph Seichter
amavis-ml at seichter.de
Fri Sep 16 15:30:59 CEST 2016
On 15.09.2016 05:11, Indunil Jayasooriya wrote:
> I want to know if amavisd-new can bock mails based on Message-ID:,
> when it has a particular PATTERN?
If by "block" you mean "reject before the message is received", I think
you're looking in the wrong place.
Like many others, I use a combination of Postfix, Amavisd-new, virus
checkers and SpamAssassin. To prevent messages with particular IDs ever
entering my systems, I'd use a header check in Postfix. Given your own
example, this should work:
# pcre:/etc/postfix/header_checks
/^Message-ID:.+PC-EXC02.Fanex-us.local$/ REJECT
As an alternative, you can let the message enter your system and use a
SpamAssassin rule to increase the spam score.
-Ralph
More information about the amavis-users
mailing list