我正在尝试向 Gmail 发送我的本地 Postfix。
我想要发送[email protected]
至[email protected]
我正在使用bear
用户将电子邮件发送到 SMTP。
看起来已正确发送。
[bear@jp1 ~]$ telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 jp1.example.jp ESMTP Postfix
EHLO
501 Syntax: EHLO hostname
EHLO tcpfx.com
250-jp1.muty.jp
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
MAIL FROM: info
250 2.1.0 Ok
RCPT TO: [email protected]
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
test
.
250 2.0.0 Ok: queued as F224B5C0AC9
我的/var/log/maillog
情况是这样的,它以某种方式将邮件退回[email protected]
Dec 19 17:26:02 jp1 postfix/cleanup[29800]: 1ECAE5C0BF0: message-id=<[email protected]>
Dec 19 17:26:02 jp1 postfix/qmgr[29773]: 1ECAE5C0BF0: from=<[email protected]>, size=780, nrcpt=1 (queue active)
Dec 19 17:26:02 jp1 postfix/local[29801]: 1ECAE5C0BF0: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.08, delays=0.03/0.05/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
Dec 19 17:26:02 jp1 postfix/qmgr[29773]: 1ECAE5C0BF0: removed
Dec 19 17:26:04 jp1 postfix/cleanup[29789]: F224B5C0AC9: message-id=<[email protected]>
Dec 19 17:26:04 jp1 postfix/qmgr[29773]: F224B5C0AC9: from=<[email protected]>, size=332, nrcpt=1 (queue active)
Dec 19 17:26:04 jp1 postfix/smtp[29802]: F224B5C0AC9: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[108.177.97.26]:25, delay=13, delays=12/0.01/0.35/0.53, dsn=2.0.0, status=sent (250 2.0.0 OK 1545207964 bf4si15251918plb.163 - gsmtp)
Dec 19 17:26:04 jp1 postfix/qmgr[29773]: F224B5C0AC9: removed
Dec 19 17:26:11 jp1 postfix/pickup[29772]: 334AC5C0AC9: uid=0 from=<root>
Dec 19 17:26:11 jp1 postfix/cleanup[29800]: 334AC5C0AC9: message-id=<[email protected]>
Dec 19 17:26:11 jp1 postfix/qmgr[29773]: 334AC5C0AC9: from=<[email protected]>, size=6920, nrcpt=1 (queue active)
Dec 19 17:26:11 jp1 postfix/local[29801]: 334AC5C0AC9: to=<[email protected]>, orig_to=<root>, relay=local, delay=68, delays=68/0/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Dec 19 17:26:11 jp1 postfix/qmgr[29773]: 334AC5C0AC9: removed
在我的 main.cf 中我有这些设置。
myhostname = jp1.example.jp
mydomain = example.com
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
我需要检查什么地方吗?
postconf -n
[bear@jp1 ~]$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = example.com
myhostname = jp1.example.jp
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_client_restrictions = permit_mynetworks,reject_unknown_client,permit
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
unknown_local_recipient_reject_code = 550
[daichi@jp1 ~]$