Configure Your Domain Name
Now, you can begin the process of mapping the domain name for your mail server’s web interface e.g. mail.yourdomain.com to your future Amazon instance.
You may also opt to use a more obscure subdomain for your webmail such as access.yourdomain.com.
Visit your domain registrar’s DNS settings and change the A record for your access.yourdomain.com to the new IP address e.g. 18.104.22.168
You can also configure your MX record for yourdomain.com to point to the same IP address.
Wait until your DNS changes propagate (sometimes up to 24 hours or more – check them here), try to connect via SSH using your domain:
ssh -i ./mailbox.pem email@example.com
In the meantime, you should be able to continue setting up other parts of your site.
Keep in mind, if you use Mailgun or Amazon’s Simple Email Service, more DNS changes will be required soon. These will be addressed later.