I'm struggling with Postfix to send out emails from a form on my website:
Google Domain, hosting provided by DigitalOcean with a LAMP droplet; this is my DNS config:
Mail function on my .php file wants to send an email
from: [email protected]
to: [email protected]
all goes succesfully except emails are not actually sent.
/var/log/mail.log
mentions that status=bounced (mail for mydomain.io loops back to myself)
Here's my main.cf
config:
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2
# TLS parameters
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
smtp_tls_CApath=/etc/ssl/certs
smtp_tls_security_level=may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = packer-611a9b0e-18c5-2e19-5583-bed9efc126b7
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
myorigin = /etc/mailname
I looked every guide available to tweak /etc/postfix/main.cf
but nothing works, thanks in advance to anybody who's willing to help.