# Steps: Note: - "$maildomain" = mail.example.org - "$domain" = example.org - "$subdom" = mail # Run `emailwiz.sh` Set it up normally for your first domain, check that it works fine. Then continue with the next step # Generate new certificate Not totally necessary for mail to "just work" but it will help, in this case I specified --standalone but do use --nginx or --apache instead, if your email service depends on one of those, if not sure, leave it as standalone. This is the line from the script: ```sh certbot -d "$maildomain" certonly --standalone --register-unsafely-without-email --agree-tos ``` Note: Redirect at least your mail subdomain from your OTHER domain(s). Later on you'll have to also add other records for emails to work! See DNS Records step. # Dovecot Dovecot is easier, you should be good by just adding these lines to `/etc/dovecot/dovecot.conf` Note: Remember to actually generate the keys with certbot, like in the "Generate new certificate" step below. Note: Uses TLS SNI, according to [Dovecot's docs](https://doc.dovecot.org/configuration_manual/dovecot_ssl_configuration/), it is tested in clients: - Thunderbird (Linux) - K-9 on Android (merged Sept 2015 - https://github.com/k9mail/k-9/pull/718) - Apple Mail (according to https://forums.cpanel.net/threads/mail-ssl-sni.454592/ ) - Mutt (ticket https://dev.mutt.org/trac/ticket/3923) - NeoMutt (since 2016-03-07 according to https://www.neomutt.org/feature/tls-sni ) ``` # mail.domain.org local_name mail.domain.org { ssl_cert =