我正在尝试通过SMTP服务器的邮件简单的后缀中继。 但我从日志中看到邮件被中继到本地而不是中继主机。
main.cfconfiguration如下,
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h readme_directory = no # TLS parameters smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database=btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database=btree:${data_directory}/smtp_scache # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. #transport_maps = hash:/etc/postfix/transport myhostname=testingserver.com alias_maps=hash:/etc/aliases alias_database=hash:/etc/aliases myorigin=/etc/mailname mydestination=testingserver.com, testingserver.intranet.com, localhost.testingserver.com, localhost.testingserver.intranet.com, localhost 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 relayhost = smtp.intranet.com smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options =
下面是发送邮件时的mail.log,
testingserver.com postfix/pickup[27297]: 63A3720CAA: uid=1000 from=<ubuntu> testingserver.com postfix/cleanup[27316]: 63A3720CAA: message-id=<[email protected]> testingserver.com postfix/qmgr[27298]: 63A3720CAA: from=<[email protected]>, size=768, nrcpt=1 (queue active) testingserver.com postfix/local[27319]: 63A3720CAA: to=<[email protected], orig_to=<ubuntu>, relay=local, delay=0.1, delays=0.07/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox) testingserver.com postfix/qmgr[27298]: 63A3720CAA: removed
不知道如何debugging,任何指针会很好。
只有在您发送路由到“远程”主机的电子邮件时才使用relayhost 。
既然你的testfix.com安装了postfix安装,并且你正在尝试把testing邮件发送到@testserver.com邮件,postfix将会把这个邮件发送到本地,并把它发送给本地用户。
您的configuration应该工作,只需testing一个“远程”地址。 尝试发送到一个Gmail帐户,例如。