-1

Having read through the documentation at http://pm-doc.sourceforge.net/doc/ i cannot find an answer.

I want to use procmail to place mail without dkim into user's spam folder. I have found many articles about dkim filtering, none of which explain the desired behaviour.

(Environment: virtualmin, procmail, spamassasin, postfix, ubuntu 18.04 Server)

1 Answer 1

1

The following will trigger on any message which lacks a DKIM-Signature: header. There is no attempt as such to validate the DKIM signature (which would make more sense to perform on the mail server anyway; I'm guessing yours might already be doing this.)

:0
* ! ^DKIM-Signature:
.spam

In Procmail terminology, this is saving (or sorting or storing) the message to a folder (or mailbox); to forward a message means to send it on to a different email address.

2
  • 1
    This should be trivial to understand with even the most basic understanding of Procmail syntax. I find it hard to imagine that you didn't come up with something like this on your own.
    – tripleee
    Sep 28, 2019 at 13:38
  • Looking at it makes absolute sense. But as a complete novice had missed the simplicity of it. Regards
    – Derple
    Oct 10, 2019 at 23:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .