News for hackers. Stuff that matters.
Re:Email encryption is here – use STARTTLS everywhere by walrus01 on Saturday July 28, 2018 @12:56AM (#17631626)
The site has a link to the starttls everywhere site right at the top - but it's also worth mentioning that the regular 'certbot' client for https everywhere can also be used to create certificates for your own smtpd. The easiest way is just having the sudo ability to temporarily open port 80 for the challenge/response process.

using certbot:

sudo ./certbot-auto certonly -v --standalone --standalone-supported-challenges http-01 -d mail.mydomainname.com

where mail.mydomainname.com is whatever is the full hostname of your MX.

then a pretty typical postfix configuration blob:

# TLS (SSL) private and public keys

# obtained from certbot-auto in /etc/certbot/

# sample CLI to obtain new cert

# sudo ./certbot-auto certonly -v --standalone --standalone-supported-challenges http-01 -d mail.mydomainname.com

smtpd_tls_CAfile=/etc/letsencrypt/live/mail.mydomainname.com/fullchain.pem

smtpd_tls_cert_file=/etc/letsencrypt/live/mail.mydomainname.com/cert.pem

smtpd_tls_key_file=/etc/letsencrypt/live/mail.mydomainname.com/privkey.pem

# TLS (SSL) configuration

smtp_tls_security_level=may

smtp_use_tls=yes

smtpd_use_tls=yes

smtpd_tls_loglevel=1

smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3

smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache

smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client.

Re:Email encryption is here – use STARTTLS everywhere by schoen on Saturday July 28, 2018 @01:21AM (#17631679)
Thanks for the plug. The same developer at EFF is working on both STARTTLS Everywhere and Certbot Postfix integration. :-)

(Anyway, the most significant difference between the two is that STARTTLS Everywhere can also enforce certificate validation on recipient sites that request it, which Postfix won't otherwise do.)

Re:Email encryption is here – use STARTTLS everywhere by rhizome on Saturday July 28, 2018 @02:34AM (#17631902)
Thanks for calling that part out!
Re:Email encryption is here – use STARTTLS everywhere by zAy0LfpBZLC8mAC on Saturday July 28, 2018 @03:19AM (#17632041)
> The easiest way is just having the sudo ability to temporarily open port 80 for the challenge/response process.

The easiest way is to forget about HTTP and use DNS verification. Just create a dynamically updateable TXT record in your zone that the LE client can update and then point CNAMEs for the names that you want to create certificates for to that TXT record.

Re:Email encryption is here – use STARTTLS everywhere by walrus01 on Saturday July 28, 2018 @03:28AM (#17632074)
I am too paranoid and untrusting to give the LE automated tool the ability to edit DNS zonefiles. My DNS setup is quite far removed logically from the mail server setup, intentionally.
Re:Email encryption is here – use STARTTLS everywhere by zAy0LfpBZLC8mAC on Saturday July 28, 2018 @03:48AM (#17632125)
You don't need to "edit zonefiles", and whether it's "logically removed" is kinda irrelevant?

You simply set up a dynamically updateable zone and then have the LE client call nsupdate, it couldn't be any easier, you don't even need sudo.

You could also delegate DNS for your MX to the MX itself, of course, then you'd have pretty much the same setup as with the HTTP server on the MX, just using a DNS server instead. But that's just too complicated, really, using dynamic DNS is flexible and allows you to easily add other services that need certificates on any machine whatsoever with no need to have an HTTP (or any other) server running on the machine reachable from the outside.