如果不是几周,我已经搜索了几天。好吧,我尝试配置 Postfix(失败了),目的是在不使用 Gmail 等外部中继服务的情况下发送邮件,并配置一个(本地?)中继服务器,它将通过端口 587 使用。
如果我错了,请纠正我,这个项目是我第一个熟悉电子邮件类型服务器的项目。
在进行任何解释之前,将为生产型服务器配置此环境。最终配置也将在 Docker 映像中进行,但我尝试通过在多个 VM 上构建所有内容来学习每一步(这个在 HyperV 中)
在过去的几天里,我遵循了本教程并成功完成了设置。接下来,我创建了一个客户端、一个(网站)和一个带有邮箱的电子邮件域。这导致我可以在 Roundcube 请求成功登录。问题涉及的地方是当我尝试从 Roundcube 发送电子邮件时,我检查了日志文件,尝试重新配置 Postfix 部分(main.cf、master.cf 和 dpkg-reconfigure postfix service postfix restart
,当然后面跟着)
以下是我的设置示例:
- 我在域 dns 中设置了一个 MX 记录,例如值“subdomain.domain.ext”
- 我遵循与教程相同的主机名和/或 /etc/hosts 步骤:
以下示例是根据上述 MX 值:
hostname (according to example) subdomain
cat /etc/hosts:
127.0.0.1 localhost.localdomain localhost
local_ip subdomain.domain.ext subdomain
The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
后缀 main.cf:
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
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 = /usr/share/doc/postfix
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.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.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = subdomain.domain.ext
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
myorigin = /etc/mailname
#mydestination = subdomain.domain.ext, localhost, localhost.localdomain
mydestination = localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
html_directory = /usr/share/doc/postfix/html
virtual_alias_domains =
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = mysql:/etc/postfix/mysql-virtual_uids.cf
virtual_gid_maps = mysql:/etc/postfix/mysql-virtual_gids.cf
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql-virtual_outgoing_bcc.cf
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_restriction_classes = greylisting
greylisting = check_policy_service inet:127.0.0.1:10023
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_rbl_client zen.spamhaus.org, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf
smtpd_tls_security_level = may
transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql-virtual_sender_login_maps.cf
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, check_helo_access regexp:/etc/postfix/helo_access, reject_invalid_hostname, reject_non_fqdn_hostname, reject_invalid_helo_hostname, reject_unknown_helo_hostname, check_helo_access regexp:/etc/postfix/blacklist_helo
smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/tag_as_originating.re , permit_mynetworks, permit_sasl_authenticated, check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf, check_sender_access regexp:/etc/postfix/tag_as_foreign.re
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_client_message_rate_limit = 100
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = dovecot
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
owner_request_special = no
smtp_tls_security_level = may
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_protocols = !SSLv2,!SSLv3
smtp_tls_protocols = !SSLv2,!SSLv3
smtpd_tls_exclude_ciphers = RC4, aNULL
smtp_tls_exclude_ciphers = RC4, aNULL
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
后缀 master.cf:
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (no) (never) (100)
# ==========================================================================
smtp inet n - y - - smtpd
#smtp inet n - y - 1 postscreen
#smtpd pass - - y - - smtpd
#dnsblog unix - - y - 0 dnsblog
#tlsproxy unix - - y - 0 tlsproxy
submission inet n - y - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o smtpd_tls_auth_only=yes
# -o smtpd_reject_unlisted_recipient=no
# -o smtpd_client_restrictions=$mua_client_restrictions
# -o smtpd_helo_restrictions=$mua_helo_restrictions
# -o smtpd_sender_restrictions=$mua_sender_restrictions
# -o smtpd_recipient_restrictions=
# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
smtps inet n - y - - smtpd
-o syslog_name=postfix/smtps
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o smtpd_reject_unlisted_recipient=no
# -o smtpd_client_restrictions=$mua_client_restrictions
# -o smtpd_helo_restrictions=$mua_helo_restrictions
# -o smtpd_sender_restrictions=$mua_sender_restrictions
# -o smtpd_recipient_restrictions=
# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#628 inet n - y - - qmqpd
pickup unix n - y 60 1 pickup
cleanup unix n - y - 0 cleanup
qmgr unix n - n 300 1 qmgr
#qmgr unix n - n 300 1 oqmgr
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
-o syslog_name=postfix/$service_name
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
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
postlog unix-dgram n - n - 1 postlogd
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
# lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
# mailbox_transport = lmtp:inet:localhost
# virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus unix - n n - - pipe
# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
# Old example of delivery via Cyrus.
#
#old-cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
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}
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o smtp_bind_address=
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
127.0.0.1:10027 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtp_send_xforward_command=yes
-o milter_default_action=accept
-o milter_macro_daemon_name=ORIGINATING
-o disable_dns_lookups=yes
- 尾 -f /var/log/mail.log:
postfix/smtpd[30136]: disconnect from localhost[::1] ehlo=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=6
Jul 20 08:40:50 echo dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=30156, secured, session=<1yIO0d6qMroAAAAAAAAAAAAAAAAAAAAB>
Jul 20 08:40:50 echo dovecot: imap([email protected])<30156><1yIO0d6qMroAAAAAAAAAAAAAAAAAAAAB>: Logged out in=1128 out=1056 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Jul 20 08:40:50 echo postfix/smtpd[30159]: connect from localhost.localdomain[127.0.0.1]
Jul 20 08:40:50 echo postfix/smtpd[30159]: C36A7E08A8: client=localhost.localdomain[127.0.0.1]
Jul 20 08:40:50 echo postfix/cleanup[30094]: C36A7E08A8: message-id=<[email protected]>
Jul 20 08:40:50 echo postfix/smtpd[30159]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Jul 20 08:40:50 echo postfix/qmgr[27585]: C36A7E08A8: from=<[email protected]>, size=1656, nrcpt=1 (queue active)
Jul 20 08:40:50 echo amavis[23070]: (23070-16) Passed CLEAN {RelayedOutbound}, ORIGINATING LOCAL [::1]:34068 <[email protected]> -> <[email protected]>, Queue-ID: 48F7EE089B, Message-ID: <[email protected]>, mail_id: ZkrJmYfgX0Jz, Hits: 0.213, size: 1191, queued_as: C36A7E08A8, 464 ms
Jul 20 08:40:50 echo postfix/smtp[30097]: 48F7EE089B: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.54, delays=0.07/0/0.01/0.46, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10027): 250 2.0.0 Ok: queued as C36A7E08A8)
Jul 20 08:40:50 echo postfix/qmgr[27585]: 48F7EE089B: removed
Jul 20 08:40:50 echo postfix/smtp[30141]: C36A7E08A8: to=<[email protected]>, relay=mx.tb.mail.iss.as9143.net[212.54.42.8]:25, delay=0.14, delays=0.02/0/0.12/0, dsn=4.0.0, status=deferred (host mx.tb.mail.iss.as9143.net[212.54.42.8] refused to talk to me: 550 mx5.tb.mail.iss.as9143.net mx5.tb.mail.iss.as9143.net MXIN102 Your IP {HIDDEN_IP} is in RBL. Please see https://www.spamhaus.org/query/ip/{HIDDEN_IP} ;id=xV6AjHSqSlfIA;sid=xV6AjHSqSlfIA;mta=mx5.tb;d=20200720;t=144050[CET];ipsrc={HIDDEN_IP};)
Jul 20 08:40:51 echo dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=30162, secured, session=<Z0UZ0d6qOroAAAAAAAAAAAAAAAAAAAAB>
Jul 20 08:40:51 echo dovecot: imap([email protected])<30162><Z0UZ0d6qOroAAAAAAAAAAAAAAAAAAAAB>: Logged out in=70 out=654 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Jul 20 08:40:51 echo dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=30165, secured, session=<WPIc0d6qPLoAAAAAAAAAAAAAAAAAAAAB>
Jul 20 08:40:51 echo dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=30166, secured, session=<KRId0d6qProAAAAAAAAAAAAAAAAAAAAB>
Jul 20 08:40:51 echo dovecot: imap([email protected])<30166><KRId0d6qProAAAAAAAAAAAAAAAAAAAAB>: Logged out in=119 out=787 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Jul 20 08:40:51 echo dovecot: imap([email protected])<30165><WPIc0d6qPLoAAAAAAAAAAAAAAAAAAAAB>: Logged out in=317 out=6562 deleted=0 expunged=0 trashed=0 hdr_count=14 hdr_bytes=2388 body_count=0 body_bytes=0
Jul 20 08:40:52 echo postfix/qmgr[27585]: B9038E08FB: from=<[email protected]>, size=1042, nrcpt=1 (queue active)
Jul 20 08:40:53 echo postfix/smtp[30141]: B9038E08FB: to=<[email protected]>, relay=mx.tb.mail.iss.as9143.net[212.54.42.8]:25, delay=5170, delays=5170/0/0.16/0, dsn=4.0.0, status=deferred (host mx.tb.mail.iss.as9143.net[212.54.42.8] refused to talk to me: 550 mx2.tb.mail.iss.as9143.net mx2.tb.mail.iss.as9143.net MXIN102 Your IP {HIDDEN_IP} is in RBL. Please see https://www.spamhaus.org/query/ip/{HIDDEN_IP} ;id=xV6DjCowJQsUv;sid=xV6DjCowJQsUv;mta=mx2.tb;d=20200720;t=144053[CET];ipsrc={HIDDEN_IP};)
Jul 20 08:40:54 echo dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=30168, secured, session=<B99J0d6qQroAAAAAAAAAAAAAAAAAAAAB>
Jul 20 08:40:54 echo dovecot: imap([email protected])<30168><B99J0d6qQroAAAAAAAAAAAAAAAAAAAAB>: Logged out in=32 out=506 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Jul 20 08:40:54 echo dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=30170, secured, session=<UgNL0d6qRLoAAAAAAAAAAAAAAAAAAAAB>
Jul 20 08:40:54 echo dovecot: imap([email protected])<30170><UgNL0d6qRLoAAAAAAAAAAAAAAAAAAAAB>: Logged out in=44 out=613 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Jul 20 08:41:15 echo postfix/smtpd[30136]: connect from localhost[::1]
Jul 20 08:41:15 echo postfix/smtpd[30136]: NOQUEUE: filter: RCPT from localhost[::1]: <[email protected]>: Sender address triggers FILTER amavis:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<_>
Jul 20 08:41:15 echo postfix/smtpd[30136]: 71BA4E08A3: client=localhost[::1], sasl_method=LOGIN, [email protected]
Jul 20 08:41:15 echo postfix/cleanup[30094]: 71BA4E08A3: message-id=<[email protected]>
Jul 20 08:41:15 echo postfix/qmgr[27585]: 71BA4E08A3: from=<[email protected]>, size=595, nrcpt=1 (queue active)
Jul 20 08:41:15 echo postfix/smtpd[30136]: disconnect from localhost[::1] ehlo=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=6
Jul 20 08:41:15 echo dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=30187, secured, session=<zC2O0t6qSroAAAAAAAAAAAAAAAAAAAAB>
Jul 20 08:41:15 echo dovecot: imap([email protected])<30187><zC2O0t6qSroAAAAAAAAAAAAAAAAAAAAB>: Logged out in=460 out=670 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Jul 20 08:41:15 echo postfix/smtpd[30159]: connect from localhost.localdomain[127.0.0.1]
Jul 20 08:41:15 echo postfix/smtpd[30159]: AEDF6E08A2: client=localhost.localdomain[127.0.0.1]
Jul 20 08:41:15 echo postfix/cleanup[30094]: AEDF6E08A2: message-id=<[email protected]>
Jul 20 08:41:15 echo postfix/smtpd[30159]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Jul 20 08:41:15 echo postfix/qmgr[27585]: AEDF6E08A2: from=<[email protected]>, size=1070, nrcpt=1 (queue active)
Jul 20 08:41:15 echo amavis[27021]: (27021-05) Passed CLEAN {RelayedOutbound}, ORIGINATING LOCAL [::1]:34094 <[email protected]> -> <[email protected]>, Queue-ID: 71BA4E08A3, Message-ID: <[email protected]>, mail_id: yi2HrBVrV9H1, Hits: 0.213, size: 595, queued_as: AEDF6E08A2, 211 ms
Jul 20 08:41:15 echo postfix/smtp[30097]: 71BA4E08A3: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.29, delays=0.07/0/0.01/0.21, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10027): 250 2.0.0 Ok: queued as AEDF6E08A2)
Jul 20 08:41:15 echo postfix/qmgr[27585]: 71BA4E08A3: removed
Jul 20 08:41:16 echo dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=30190, secured, session=<pjKZ0t6qULoAAAAAAAAAAAAAAAAAAAAB>
Jul 20 08:41:16 echo dovecot: imap([email protected])<30190><pjKZ0t6qULoAAAAAAAAAAAAAAAAAAAAB>: Logged out in=70 out=654 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Jul 20 08:41:16 echo dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=30193, secured, session=<wB6e0t6qUroAAAAAAAAAAAAAAAAAAAAB>
Jul 20 08:41:16 echo dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=30194, secured, session=<u2ie0t6qVLoAAAAAAAAAAAAAAAAAAAAB>
Jul 20 08:41:16 echo dovecot: imap([email protected])<30194><u2ie0t6qVLoAAAAAAAAAAAAAAAAAAAAB>: Logged out in=119 out=795 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Jul 20 08:41:16 echo dovecot: imap([email protected])<30193><wB6e0t6qUroAAAAAAAAAAAAAAAAAAAAB>: Logged out in=317 out=6982 deleted=0 expunged=0 trashed=0 hdr_count=15 hdr_bytes=2563 body_count=0 body_bytes=0
Jul 20 08:41:45 echo postfix/smtp[30141]: connect to gmail-smtp-in.l.google.com[74.125.143.27]:25: Connection timed out
Jul 20 08:41:45 echo postfix/smtp[30141]: connect to gmail-smtp-in.l.google.com[2a00:1450:4013:c04::1a]:25: Network is unreachable
但是,我在这个日志中看到邮件已经成功发送给收件人(不是从外部地址收到的),但是为什么它一直在尝试通过端口 25?我的 ISP 阻止了它,我想强制使用端口 587,因为它可以在每个环境中工作,多个服务/isp。另外,我看到了很多基于 Gmail 的服务的结果Network is unreachable
,Connection timed out
当它通过正确的端口连接时,这是否解决了?
我也无法使用 Dovecot 在此服务器上接收任何邮件。有没有其他方法可以解决这个问题,因为我找不到任何关于它为什么不起作用的错误回复?
如果有意义,我还从 Roundcube 获得了关于发送的诊断代码:
smtp; 554 5.7.1 <unknown[192.168.1.1]>: Client host rejected:
Access denied
如果有人可以帮助我解决这个问题,那就太感谢了