Skip to content

Instantly share code, notes, and snippets.

@tva77
Created December 13, 2023 13:27
Show Gist options
  • Save tva77/0cb77d2f1ab6193f237705eec954f122 to your computer and use it in GitHub Desktop.
Save tva77/0cb77d2f1ab6193f237705eec954f122 to your computer and use it in GitHub Desktop.
how to control outgoing emails on postfix
# add this in your /etc/postfix/main.cf
default_destination_rate_delay = 1s
initial_destination_concurrency = 1
default_destination_concurrency_limit = 1
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_invalid_helo_hostname,reject_non_fqdn_helo_hostname,reject_unknown_helo_hostname
relayhost = [smtp.sendgrid.net]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = encrypt
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment