我使用本指南configuration了Postfix。 当我发送testing电子邮件时,出现以下错误消息:
May 23 15:36:26 VM11 postfix/smtp[15321]: connect to smtp.gmail.com[2a00:1450:4001:c02::6d]:587: Network is unreachable May 23 15:36:26 VM11 postfix/smtp[15321]: 4AA58243A3: to=<[email protected]>, relay=smtp.gmail.com[173.194.70.108]:587, delay=0.07, delays=0.01/0/0.04/0.02, dsn=5.7.0, status=bounced (host smtp.gmail.com[173.194.70.108] said: 530 5.7.0 Must issue a STARTTLS command first. y10sm16916731eev.3 - gsmtp (in reply to MAIL FROM command)) May 23 15:36:26 VM11 postfix/qmgr[15314]: 4AA58243A3: removed
我configuration了我的validation数据:
[stmp.gmail.com]:587 USER@GOOGLEDOMAIN:PASSWORD
接下来是我的一般configurationmain.cf
:
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) 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. myhostname = VM11.rbg.informatik.tu-darmstadt.de alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = relayhost = [smtp.gmail.com]:587 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 51200000 recipient_delimiter = + inet_interfaces = loopback-only inet_protocols = all # Further authentication stuff smtp_sasl_auth_enable = yes smtp_sasl_security_options = noanonymous smtp_sasl_password_maps = hash:/etc/postfix/sasl_password smtp_tls_CAfile = /etc/postfix/cacert.pem smtp_tls_auth_only = no
那么configuration有什么问题呢?
编辑 :根据Andrzej A. Filip的build议,我将smtpd_use_tls=yes
更改为smtpd_use_tls=yes
。 这现在给我留下了另一个错误信息:
May 26 11:20:36 VM11 postfix/smtp[20031]: D9982243B9: to=<[email protected]>, relay=smtp.gmail.com[173.194.70.108]:587, delay=0.19, delays=0.02/0/0.15/0.01, dsn=5.5.1, status=bounced (host smtp.gmail.com[173.194.70.108] said: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 z52sm34463651eea.1 - gsmtp (in reply to MAIL FROM command))
我再次检查我的sasl_password文件,并重新postmaped它没有任何成功。
配方提到smtpd_use_tls
但您已设置smtpd_use_tls
。
http://mhawthorne.net/posts/postfix-configuring-gmail-as-relay.html疑难解答/ 1.没有TLS
除了Andrzej A. Filip的观察,密码文件包含一个拼写错误:
stmp.gmail.com
实际上应该是smtp.gmail.com