CONSOLE
Loading
Route all Linux server emails, cron job alerts, and system notices through an authenticated external relay host. Bypass cloud provider port 25 blocks and guarantee inbox delivery.
To configure Postfix with an external SMTP smart host relay, edit /etc/postfix/main.cf: set relayhost = [mail.photonrelay.com]:587, enable SASL authentication (smtp_sasl_auth_enable = yes), configure TLS encryption (smtp_tls_security_level = encrypt), add your credentials to /etc/postfix/sasl_passwd, hash it with postmap /etc/postfix/sasl_passwd, and reload Postfix with systemctl restart postfix.
Hosting providers such as AWS EC2, DigitalOcean, Linode, and Google Compute Engine permanently block outbound TCP port 25 to protect their network IP ranges from botnet spam.
Configuring Postfix as a **Smart Host client** routes all outgoing system notifications, cron logs, and application dispatches over submission **port 587 with STARTTLS**, bypassing cloud firewall blocks cleanly.
# Ubuntu / Debian
sudo apt update && sudo apt install -y postfix libsasl2-modules bsd-mailx
# RHEL / CentOS / Rocky Linux
sudo dnf install -y postfix cyrus-sasl cyrus-sasl-plain mailx
Append these directives to the bottom of /etc/postfix/main.cf:
# Smart Host Relay Settings
relayhost = [mail.photonrelay.com]:587
# Enable SASL Authentication
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
# TLS / SSL Security Settings
smtp_use_tls = yes
smtp_tls_security_level = encrypt
smtp_tls_note_starttls_offer = yes
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
Create /etc/postfix/sasl_passwd and add your authenticated credentials:
# /etc/postfix/sasl_passwd
[mail.photonrelay.com]:587 your_photon_api_key:your_photon_api_secret
Secure the file permissions and compile the lookup database:
sudo chmod 600 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
sudo chmod 600 /etc/postfix/sasl_passwd.db
sudo systemctl restart postfix
Send a test message using mailx:
echo "Test message via PhotonRelay" | mail -s "Postfix SmartHost Test" user@example.com
# Watch the live delivery log:
sudo tail -f /var/log/mail.log
Route server alerts with zero port 25 blocks. Get 5,000 free monthly emails and sub-700ms delivery across AWS, DigitalOcean, and GCP.
Trademark Notice & Nominative Fair Use: All third-party trademarks, logos, and service marks (SendGrid®, Mailgun®, Amazon SES®, Postmark®, Resend®, Brevo®, SMTP2Go®, SparkPost®) are property of their respective owners and used under 15 U.S.C. § 1115(b)(4).
Photon Console is independent and not affiliated with or endorsed by these providers. Pricing and plan details compiled from public sources as of November 2026. Read full legal disclaimer →