I'm running an old Postfix server v2.9.2 on Debian.

I'd like to test relaying selected messages (only) through an external provider (fastmail.com).

My understanding it that I need to:

1. Create SMTP credentials with Fastmail

2. Create /etc/postfix/sasl_passwd
[smtp.fastmail.com]:587 (or 465) fastmail-username:fastmail-password

3. Add to /etc/postfix/main.cf
"relayhost = [smtp.fastmail.com]:587 (or 465)"

4. TLS is in place already /etc/postfix/main.cf

smtpd_use_tls = yes
smtpd_tls_security_level = may
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_key_file = /etc/ssl/mail/key.pem
smtpd_tls_cert_file = /etc/ssl/mail/cert.pem
smtpd_tls_CAfile = /etc/ssl/mail/ssl-bundle.pem
smtpd_tls_loglevel = 2
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
tls_random_source = dev:/dev/urandom

so it should be sufficient to add:

smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

Now, how do I restrict this relay to only be used by one specific LAN address or one specific LAN subnet?
All other SMTP traffic should continue using the defaults already in place.

---
Adam
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org
  • [pfx] test relay Adam Weremczuk via Postfix-users

Reply via email to