On digitalOcean this tutorial points to installing postfix. I've attempted this and also uninstalling postfix then installing sendmail
When a test mail is sent, invariably there is an error in identifying the sender
451 4.7.1 <m-dev>: Helo command rejected: HELO string 'm-dev' does not match last HELO string 'theactual.ws' from this IP *(when testing with sendmail)*
[with postfix it complains about it being sent by no-reply@m-dev
...]
The tutorial suggests The System mail name must be the same as the name you assigned to your server
. But that is simplistic, and has a high probability of not being respected.
Well, the domain name was not assigned to the server.
hostname
does return the assigned m-dev
name.
How can Ubuntu 20.04 be set-up to use a FQDN that actually points to this server (+ has SPF and DKIM configurations set) ?
When attempting with postfix the postfix -n
returns
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
inet_interfaces = all
inet_protocols = loopback-only
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = localhost.$mydomain, localhost, $myhostname
myhostname = m-dev
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level = may