3 ms·
Configure debian mail server to reject unencrypted messages?
If I wanted to configure a debian mail server to bounce any messages that are not encrypted with my PGP public key ... is this possible / feasible?
- pdx 13y agoI would not do this at the server level, but instead, at the user level. I use postfix as my mail server, and tell it to use procmail for incoming emails. Install procmail, and set up a .procmailrc file in your user account. Procmail is powerful, and let's you run scripts against incoming email, and it also let's you bounce emails. Combining a script that attempts to decode the email, with a bounce instruction, if that decryption fails, should get you what you need.
- mike-cardwell 13y agoThat is called backscatter and is highly likely to get your mailserver blacklisted.
- mike-cardwell 13y agoWith Exim, you could just shove something like this in your DATA acl: deny condition = ${if !match{$message_body}{-----BEGIN PGP MESSAGE-----}} message = We only accept encrypted mail here However, the problem here is that the plaintext has already been sent over the wire before the message is rejected.