I have a client requirement to encrypt all outgoing email from a linux server. This can be done using any software, sendmail/postfix etc. They have given me the key they want to use, and want all forms (using php) to be encrpyted. Can I set sendmail/etc to encrypt all emails? This could be done with the same key for all mail.
Thanks
If you want to encrypt your outgoing mail using GnuPG, without involving your PHP code, then GNU Anubis might be what you are looking for. It can sit in-front of your SMTP server and (among other things) apply GnuPG encryption to your mails.
The potential issue here is that Anubis both accepts and submits mail using SMTP. While there obviously isn't any problem with using SMTP to pass the mails along to Postfix, PHP tend to use the local sendmail binary. One possible solution, which I haven't tried myself, is to point PHP:s sendmail_path= toward the Anubis helper script msg2smtp.pl
Of course, if there's multiple Postfixes involved, one on your web server as well as one on your companies designated mail server, then there really isn't any problem. In that case all you have to do is simply plug Anubis in between.
If by encrypt you mean that all mail should be sent with SSL/TLS, with postfix then you can simply set
smtp_enforce_tls
to yes. You can tweak the SSL/TLS settings, check all thesmtp_tls_*
options.If you want to encrypt the mail with pgp/gpg/smime, then you probably have to write a filter for that and specify it with
content_filter
.