Tags

/etc/postfix/main.cf

myorigin = /etc/mailname
mydestination = FQDN, localhost.localdomain, localhost
relayhost = mail.bubuit.net:587
mynetworks = 127.0.0.0/8 192.168.0.0/24 [::1]/128 [fe80::]/64
mailbox_size_limit = 0
recipient_delimiter = +

inet_interfaces = all 
inet_protocols = all

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

# SASL auth
# smtp_use_tls = yes
# support for parameter "smtp_use_tls" will be removed; instead, specify "smtp_tls_security_level"

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

# Enable the connection cache (optional but recommended)
smtp_connection_cache_on_demand = yes
smtp_connection_cache_time_limit = 2s

compatibility_level = 3.6

# rewrite from address
smtp_generic_maps = hash:/etc/postfix/generic

/etc/postfix/sasl_passwd

mail.DOM.TLD:587 USER:PASSWD
  1. postmap /etc/postfix/sasl_passwd

/etc/aliases

root: noreply@DOM.TLD
  1. newaliases

/etc/postfix/generic

root@DOM.TLD noreply@DOM.TLD
  1. postmap /etc/postfix/generic

  1. send_mailtest.sh