OCI SMTP Email Delivery with Postfix on Linux: Secure Configuration, Testing, and Troubleshooting (Advanced Guide)
Introduction Email delivery is a critical component in cloud environments for alerts, notifications, and application workflows. In Oracle Cloud Infrastructure, the Email Delivery service provides a...

Source: DEV Community
Introduction Email delivery is a critical component in cloud environments for alerts, notifications, and application workflows. In Oracle Cloud Infrastructure, the Email Delivery service provides a reliable SMTP-based solution. This guide demonstrates how to configure a Linux server to send emails using OCI SMTP with a secure and production-ready setup Architecture Linux Server β Postfix (SMTP client) β OCI Email Delivery (SMTP) β Recipient Email Prerequisites *OCI Setup * Go to: π OCI Console β Email Delivery *β Create Approved Sender * Generate SMTP Credentials Copy: SMTP Username SMTP Password Network Requirements From Server: Allow outbound port 587 or 25 (recommended) Test connectivity: telnet smtp.email.ap-mumbai-1.oci.oraclecloud.com 587 Install Required Packages yum install postfix s-nail cyrus-sasl-plain -y Verify mail command which mail Expected: /usr/bin/mail Configure Postfix Edit config file vi /etc/postfix/main.cf Add configuration OCI SMTP relay (use port 587 ) relayhos