server_configuration:email

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
server_configuration:email [2021/01/13 20:33] davidserver_configuration:email [2023/08/20 14:39] (current) david
Line 3: Line 3:
  
 [[https://www.digitalocean.com/community/tutorials/why-you-may-not-want-to-run-your-own-mail-server|Why You May Not Want To Run Your Own Mail Server]] [[https://www.digitalocean.com/community/tutorials/why-you-may-not-want-to-run-your-own-mail-server|Why You May Not Want To Run Your Own Mail Server]]
 +
 +All I want (right now) is to be able to send emails (from applications), and to send/receive on my own address using ''mutt''. Nothing that clever, postfix should be sufficient!
 +
 +===== Prerequisite(s) =====
 +
 +==== DNS ====
 +Having already configured an email server previously (see some extra notes below), I'd already setup DNS records, similar to in this guide:
 +  * See sections "Setting up DNS" & "Verify DNS": [[https://www.digitalocean.com/community/tutorials/how-to-set-up-a-postfix-e-mail-server-with-dovecot|How To Set Up a Postfix E-Mail Server with Dovecot]]
 +  * Note for TXT records:
 +    * TXT records are a type of Domain Name System (DNS) record that contains text information for sources outside of your domain. You add these records to your domain settings. You can use TXT records for various purposes. Google uses them to verify domain ownership and to ensure email security.
 +    * [[https://www.digitalocean.com/community/tutorials/how-to-create-a-spf-record-for-your-domain-with-google-apps|How To Create a SPF Record For Your Domain with Google Apps]]
 +
 +
 +===== Installation =====
 +
 +Start off following instructions from the DigitalOcean Community Documentation [[https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-on-ubuntu-20-04|How To Install and Configure Postfix on Ubuntu 20.04]]. 
 +
 +Note, postfix was already installed, so I needed to run:
 +<code bash>
 +sudo dpkg-reconfigure postfix
 +</code>
 +
 +I followed the instructions up to the point of installing ''s-nail'', I prefer ''mutt''.
 +<code bash>
 +sudo apt-get install mutt
 +</code>
 +''mutt'' worked right away, sending an email to my personal email account, and receiving a reply from it.
 +
 +===== Testing & Checking =====
 +
 +Sent a test email to: [[http://www.checktls.com/perl/TestSender.pl|Test sender TLS]].
 +
 +<code>
 +<html lang="en">
 +  <head>
 +    <meta http-equiv="content-type" content="text/html; charset=utf-8">
 +    <title>SUCCESSFUL</title>
 +  </head>
 +  <body>
 +<p>SUCCESSFUL <a href="https://www.checktls.com/TestSender">//email/test <b>From:</b></a></p>
 +<p>Your email was sent securely using TLS.</p>
 +  </body>
 +</html>
 +</code>
 +
 +====== Useful Tricks ======
 +
 +===== Migrate Mailbox =====
 +
 +<code bash>
 +# Change to home directory
 +cd ~
 +
 +# Copy mailbox data from backup
 +sudo cp -r /mnt/volume_lon1_01/disk_backup/home/david/Maildir .
 +
 +# Fix file and directory ownership
 +sudo chown -R david:david Maildir
 +</code>
 +
 +===== bounce (forward) email =====
 +
 +In ''mutt'' to bounce (forward) an email to another address (say a HTML email forward to a regular mailbox), press ''b'' when the email is selected and then put the address into the application and hit enter.
 +
 +===== Requirements for Gmail to receive emails =====
 +
 +==== MX Records ====
 +
 +==== Google Domain TXT record ====
 +
 +  * https://support.google.com/a/answer/183895?hl=en
 +
 +==== PTR Records ====
 +
 +> Mail servers must meet a number of requirements to prevent their messages from being blocked, e.g. have a PTR record. The use of authentication methods such as SPF, DKIM or DMARC minimize the chance that messages are marked as spam.
 +
 +  * https://stackoverflow.com/questions/15771932/the-ip-youre-using-to-send-mail-is-not-authorized-to-send-email-directly-to-our
 +  * https://support.google.com/mail/answer/81126
 +  * Digital Ocean: https://docs.digitalocean.com/products/networking/dns/how-to/manage-records/#ptr-rdns-records
  
 ====== Mixed Links ====== ====== Mixed Links ======
  • server_configuration/email.1610570038.txt.gz
  • Last modified: 2021/01/13 20:33
  • by david