Why Send-Only?
A send-only mail server handles outgoing email (password resets, notifications, alerts) without receiving mail. This is simpler and more secure than a full mail server.
Installation
sudo apt update && sudo apt install -y postfix mailutilsDuring installation, select Internet Site and enter your domain name.
Configuration
Edit /etc/postfix/main.cf:
myhostname = mail.example.com
mydomain = example.com
myorigin = $mydomain
mydestination = localhost
inet_interfaces = loopback-only
relayhost =
# TLS settings
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.example.com/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mail.example.com/privkey.pem
smtp_tls_security_level = maysudo systemctl restart postfixTest Sending
echo "Test email body" | mail -s "Test Subject" user@gmail.comDNS Records Required
- A record:
mail.example.com → your-server-ip - MX record:
example.com → mail.example.com(priority 10) - SPF record:
v=spf1 ip4:your-server-ip -all - PTR record:
your-server-ip → mail.example.com(contact your hosting provider)
Check Deliverability
# Check mail queue
postqueue -p
# View mail log
tail -f /var/log/mail.logCommon Issues
- Email going to spam — ensure SPF, DKIM, and DMARC are configured
- Connection refused — check if port 25 is blocked by your provider
- Relay denied — verify
inet_interfacesandmynetworkssettings