unimportant

This commit is contained in:
Luke Smith 2020-12-06 21:08:30 -05:00
parent b50fb342f1
commit e37db0b9ed
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252
2 changed files with 18 additions and 17 deletions

View File

@ -2,7 +2,10 @@
I wrote this script during the grueling process of installing and setting up I wrote this script during the grueling process of installing and setting up
an email server. It perfectly reproduces my successful steps to ensure the an email server. It perfectly reproduces my successful steps to ensure the
same setup time and time again. same setup time and time again, now with many improvements.
I'm glad to say that dozens, hundreds of people have now used it and there is a
sizeable network of people with email servers thanks to this script.
I've linked this file on Github to a shorter, more memorable address on my I've linked this file on Github to a shorter, more memorable address on my
website so you can get it on your machine with this short command: website so you can get it on your machine with this short command:
@ -40,8 +43,6 @@ give your full domain without any subdomain, i.e. `lukesmith.xyz`.
them. Note that the affiliate link there to Vultr gives you a $100 credit them. Note that the affiliate link there to Vultr gives you a $100 credit
for the first month to play around. for the first month to play around.
2. **A Let's Encrypt SSL certificate for your site's `mail.` subdomain**. 2. **A Let's Encrypt SSL certificate for your site's `mail.` subdomain**.
Create a nginx/apache site at `mail.<yourdomain.com>` and get a certificate
for it with Let's Encrypt's [Certbot](https://certbot.eff.org/).
3. You need two little DNS records set on your domain registrar's site/DNS 3. You need two little DNS records set on your domain registrar's site/DNS
server: (1) an **MX record** pointing to your own main domain/IP and (2) a server: (1) an **MX record** pointing to your own main domain/IP and (2) a
**CNAME record** for your `mail.` subdomain. **CNAME record** for your `mail.` subdomain.
@ -60,10 +61,10 @@ give your full domain without any subdomain, i.e. `lukesmith.xyz`.
5. `apt purge` all your previous (failed) attempts to install and configure a 5. `apt purge` all your previous (failed) attempts to install and configure a
mail server. Get rid of _all_ your system settings for Postfix, Dovecot, mail server. Get rid of _all_ your system settings for Postfix, Dovecot,
OpenDKIM and everything else. This script builds off of a fresh install. OpenDKIM and everything else. This script builds off of a fresh install.
6. Some VPS providers block port 25 (used to send mail). You may need to 6. Some VPS providers block mail port numbers like 25, 933 or 587 by default.
request that this port be opened to send mail successfully. Although I have You may need to request these ports be opened to send mail successfully.
never had to do this on a Vultr VPS, others have had this issue so if you Vultr and most other VPS providers will respond immediately and open the
cannot send, contact your VPS provider. ports for you if you open a support ticket.
## Post-install requirement! ## Post-install requirement!
@ -81,7 +82,7 @@ passwd billy
``` ```
Any user added to the `mail` group will be able to receive mail. Suppose a user Any user added to the `mail` group will be able to receive mail. Suppose a user
Cassie already exists and we want to let her receive mail to. Just run: Cassie already exists and we want to let her receive mail too. Just run:
``` ```
usermod -a -G mail cassie usermod -a -G mail cassie
@ -126,5 +127,5 @@ support me at [lukesmith.xyz/donate](https://lukesmith.xyz/donate.html).
new one) might be on a public spam list. Check new one) might be on a public spam list. Check
[this site](https://mxtoolbox.com/blacklists.aspx) to see if it is. Don't [this site](https://mxtoolbox.com/blacklists.aspx) to see if it is. Don't
worry if you are: sometimes especially new domains are automatically assumed worry if you are: sometimes especially new domains are automatically assumed
to be spam temporaily. If you are blacklisted by one of these, look into it to be spam temporarily. If you are blacklisted by one of these, look into it
and it will explain why and how to remove yourself. and it will explain how to remove yourself.

View File

@ -208,17 +208,17 @@ cut -d: -f1 /etc/passwd | grep -q "^vmail" || useradd vmail
chown -R vmail:vmail /var/lib/dovecot chown -R vmail:vmail /var/lib/dovecot
sievec /var/lib/dovecot/sieve/default.sieve sievec /var/lib/dovecot/sieve/default.sieve
echo "Preparing user authetication..." echo "Preparing user authentication..."
grep -q nullok /etc/pam.d/dovecot || grep -q nullok /etc/pam.d/dovecot ||
echo "auth required pam_unix.so nullok echo "auth required pam_unix.so nullok
account required pam_unix.so" >> /etc/pam.d/dovecot account required pam_unix.so" >> /etc/pam.d/dovecot
# OpenDKIM # OpenDKIM
# A lot of the big name email services, like Google, will automatically # A lot of the big name email services, like Google, will automatically reject
# rejectmark as spam unfamiliar and unauthenticated email addresses. As in, the # as spam unfamiliar and unauthenticated email addresses. As in, the server
# server will flattly reject the email, not even deliverring it to someone's # will flatly reject the email, not even delivering it to someone's Spam
# Spam folder. # folder.
# OpenDKIM is a way to authenticate your email so you can send to such services # OpenDKIM is a way to authenticate your email so you can send to such services
# without a problem. # without a problem.