Slackware HowTo

Configure Postfix as an SMTP relay on Slackware

Use the server as a relay to an upstream SMTP host without turning it into an open relay.

1. Goal

Use the server as a relay to an upstream SMTP host without turning it into an open relay.

2. Files and components involved

/etc/postfix/main.cf
/etc/postfix/sasl_passwd
/etc/rc.d/rc.postfix

3. Operational flow

vi /etc/postfix/main.cf
vi /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd*

4. Operational verification

postfix check
/etc/rc.d/rc.postfix start
mailq
tail -n 50 /var/log/maillog

5. Practical notes

For mail services, test from the LAN first, check the logs, and limit public exposure to the functions that are actually necessary.

Compare the logs immediately after sending or receiving a test email: it is the fastest way to see whether the chain is complete.

Quick checklist

[ ] Backup or copy of the existing configuration completed
[ ] Files and commands updated as expected
[ ] Local test completed successfully
[ ] Logs or final output verified
[ ] Rollback procedure documented

Back to the Linux HowTo section