Configure Ubuntu 20.04.6 LTS to forward email using Postfix

Forwarding system mail to an admin account can be a good idea for a Ubuntu server because it ensures that important system notifications and alerts are received by an actual person who can take appropriate action in a timely manner. By default, many system-generated emails on Ubuntu are sent to the root account, which may not be actively monitored. By forwarding these emails to an admin account, you can ensure that any critical issues, such as security warnings or system errors, are promptly addressed by someone who has the necessary permissions and knowledge to do so. This can help to prevent potential downtime or data loss and keep your server running smoothly.

I followed this guide: digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-18-04

Although made some changes / additions for main.cf. I did not use

masquerade_domains

as from here: festivalstateit.com/what-does-masquerade_domains-do-in-postfix/

for myhostname I used:

myhostname = subdomain.domain.tld

Which was configured in DNS UI to point to the server.

I enabled TLS as in the guide.

I also used spf-record.com to create SPF records. In my Setup I allowed A records and MX. This changed my spam score, although I still had to whitelist my domain for my external mailcow server 🙁

Scroll to Top