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.


Reply via email to