Email relaying – smarthost setup

Overview of alternatives for relaying emails

Free SMTP Servers for Sending Emails – 2020

Relaying emails using a Gmail account

https://support.google.com/a/answer/2956491?hl=en

Main disadvantages:

  • Low daily (24hr rolling) limit of 500 messages
  • Sends as (and takes replies on) the gmail account used for relaying

All limitations: https://support.google.com/a/answer/166852?hl=en

Setup guide for multiple UNIX-ish OSes (for Postfix)

https://www.howtoforge.com/tutorial/configure-postfix-to-use-gmail-as-a-mail-relay/

Quick setup (Ubuntu and other):

Gmail account: allow insecure apps
https://myaccount.google.com/security?gar=1

Required software: postfix and mailutils

/etc/postfix/sasl_passwd:

[smtp.gmail.com]:587    username@gmail.com:password

Protect and process password file:

chmod 600 /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd

Configure postfix:
/etc/postfix/main.cf:

relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options =
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

Restart Postfix

systemctl restart postfix.service

or

postfix stop
postfix start

WP plugin for setting sender name (address can not be changed): CB Mail Sender

Relaying emails using Elastic-Email

Elastic-Email is primarily a email marketing system like MailChimp, but can also act as a SMTP relay.

Main advantages:

  • Domains and email address can be confgured as approved senders, email will be sent using one of the confirmed senders
  • API available

Main disadvantages

  • Impossible to get rid of the “unsubscribe” link in every email sent
  • Tracking portions are added to links, and links are destroyed (no longer clickable) in the sent emails

Setup guide

https://help.elasticemail.com/en/articles/2388043-how-to-configure-postfix-with-elastic-email

WP plugin: Elastic Email Sender

Relaying through Oracle Cloud

https://docs.cloud.oracle.com/en-us/iaas/Content/Email/Concepts/overview.htm

Leave a Reply

Your email address will not be published. Required fields are marked *