概要:
4个独立的服务器:
一台 iRedMail 服务器 (new-domain.com)
一个应用程序(existing.com)
一个节点电子邮件(中继)
一个节点实例充当 iRedMail 服务器的电子邮件密码管理器
情况:
通过 Thunderbird、Outlook 或 Roundcube 发送到和从 new-domain.com 发送的所有邮件都非常有效。
通过中继从电子邮件密码管理器发送到 new-domain.com(住在那里的帐户)的邮件被推迟,我不知道为什么。
我尝试在中继器上更改 main.cf、master.cf 中的设置
来自中继服务器的日志条目:
尾 -f /var/log/mail.log:
Dec 11 16:08:39 email postfix/smtp[24014]: 46430204C: to=<[email protected]>, relay=none, delay=30, delays=0.08/0.03/30/0, dsn=4.4.1, status=deferred (connect to new-domain.com[12.34.56.78]:25: Connection timed out
我试过评论
-o smtpd_relay_restrictions=permit_sasl_authenticated,reject
在 new-domain.com 上的 /etc/postfix/master.cf - 无济于事
中继服务器上 postconf -n 的输出:
user@email:~ $ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
message_size_limit = 30428800
mydestination = email.new-domain.com, localhost.localdomain, , localhost
myhostname = email.dew-domain.com
mynetworks = 127.0.0.0/8 192.168.0.0/24
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Raspbian)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
中继器上 postconf -M 的输出:
user@email:~# postconf -M
smtp inet n - y - - smtpd
pickup unix n - y 60 1 pickup
cleanup unix n - y - 0 cleanup
qmgr unix n - n 300 1 qmgr
tlsmgr unix - - y 1000? 1 tlsmgr
rewrite unix - - y - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
trace unix - - y - 0 bounce
verify unix - - y - 1 verify
flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - y - - smtp
relay unix - - y - - smtp
showq unix n - y - - showq
error unix - - y - - error
retry unix - - y - - error
discard unix - - y - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - y - - lmtp
anvil unix - - y - 1 anvil
scache unix - - y - 1 scache
maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}
接下来我应该尝试什么?
所有评论都受到高度赞赏。
更新新的日志条目:
Dec 13 11:02:14 email postfix/error[31144]: warning: connect to private/defer: Connection refused
Dec 13 11:02:14 email postfix/error[31144]: warning: 050D72023: defer service failure
Dec 13 11:02:14 email postfix/error[31144]: 050D72023: to=<[email protected]>, relay=none, delay=256161, delays=256161/0.04/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to new-domain.com[12.34.56.78]:25: Connection timed out)
已解决: 原来我需要做的就是从 iRedMail 服务器上的已知用户发送邮件,并在 nodemailer 中的电子邮件发送器上对他进行身份验证。例如,这是我在 nodemailer 中的代码: