* on the Wed, Jun 03, 2015 at 12:48:32AM +0200, Thomas Keller wrote: > Would it be possible / what would be the best way to set up some filter > in Postfix, so that all plaintext emails would be encrypted upon > delivery with my gpg public key. In effect, if would like like all > people send me encrypted emails. > > What would be the best way to achieve this ?
I used to do this with Exim: https://grepular.com/Automatically_Encrypting_all_Incoming_Email When I migrated to Postfix, I found the easiest way to get it to work was to push the script I was using up the stack out of the MTA into the Dovecot server by using a sieve filter. This allows me to do fun things like: if envelope :is "to" "blah blah" { filter "gpgit" ["--encrypt-mode", "pgpmime", "my-pgp-uid"]; } elsif blah blah { filter "gpgit" ["--encrypt-mode", "prefer-inline", "my-pgp-uid"]; } else { filter "gpgit" ["--encrypt-mode", "inline-or-plain", "--inline-flatten", "my-pgp-uid"]; } I prefer to use inline when possible for incoming mail as I'm using K-9 on my phone which doesn't support PGP/MIME yet. -- Mike Cardwell https://grepular.com https://emailprivacytester.com OpenPGP Key 35BC AF1D 3AA2 1F84 3DC3 B0CF 70A5 F512 0018 461F XMPP OTR Key 8924 B06A 7917 AAF3 DBB1 BF1B 295C 3C78 3EF1 46B4
signature.asc
Description: Digital signature