在我的家庭Ubuntu框中,postfix配置为中继所有传出的电子邮件 outgoing.verizon.net
。不幸的是,这包括本地用户到用户的电子邮件(例如,从本地cron作业到我,或从我到我自己),它们不需要在机外旅行。有没有办法调整我的配置(如下)所以本地电子邮件是在不离开我的机器的情况下交付的?
注意:我不运行邮件服务器(在端口25上),而是每隔五分钟运行一次fetchmail从IMAP服务器下载。
main.cf:
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mycomputer.example.com
masquerade_domains = example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, localhost.localdomain, localhost
relayhost = [outgoing.verizon.net]:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtp_sasl_auth_enable = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtpd_sasl_auth_enable = no