我有一台 Wordpress 服务器(Ubuntu 16.04.02),我想用 Postfix 和 Dovecot 在其上设置个人电子邮件服务器。我已关注本教程,现在我正试图向我的服务器发送电子邮件,但电子邮件没有出现在服务器上。 也没有提到它/var/log/mail.log
。/var/log/mail.err
在服务器上,我可以使用mail
命令向电子邮件发送消息,但我无法发送外部电子邮件(例如从 Gmail 发送某些内容)。
以下是有关我的问题的一些信息。对于这篇文章,我的网站将被称为“example.place”,我的 IP 地址将是“123.123.123.123”。我还在我的域名提供商处设置了一条 MX 记录,如下所示:
类型: MX
主持人:@
价值: 10 示例.place
输出postconf -n
:
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
append_dot_mydomain = no
biff = no
bounce_queue_lifetime = 1d
broken_sasl_auth_clients = no
compatibility_level = 2
delay_warning_time = 0h
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
inet_interfaces = all
inet_protocols = all
local_recipient_maps =
mailbox_size_limit = 0
maximal_backoff_time = 8000s
maximal_queue_lifetime = 1d
minimal_backoff_time = 1000s
mydestination =
mydomain = example.place
myhostname = example.place
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks_style = host
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_helo_timeout = 60s
smtp_tls_ciphers = high
smtp_tls_mandatory_ciphers = high
smtp_tls_mandatory_protocols = TLSv1.2, TLSv1.1, !TLSv1, !SSLv2, !SSLv3
smtp_tls_note_starttls_offer = yes
smtp_tls_protocols = TLSv1.2, TLSv1.1, !TLSv1, !SSLv2, !SSLv3
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated reject_unknown_client_hostname reject_rbl_client bl.spamcop.net reject_rbl_client zen.spamhaus.org reject_rbl_client blackholes.easynet.nl
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_delay_reject = yes
smtpd_hard_error_limit = 12
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks permit_sasl_authenticated reject_invalid_helo_hostname reject_non_fqdn_helo_hostname
smtpd_recipient_limit = 20
smtpd_recipient_restrictions = reject_non_fqdn_recipient reject_unknown_recipient_domain reject_unauth_pipelining permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = no
smtpd_sasl_local_domain =
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_mynetworks permit_sasl_authenticated reject_non_fqdn_sender reject_unknown_sender_domain reject_unauth_pipelining
smtpd_soft_error_limit = 3
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/example.place/fullchain.pem
smtpd_tls_ciphers = high
smtpd_tls_key_file = /etc/letsencrypt/live/example.place/privkey.pem
smtpd_tls_loglevel = 0
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_protocols = TLSv1.2, TLSv1.1, !TLSv1, !SSLv2, !SSLv3
smtpd_tls_protocols = TLSv1.2, TLSv1.1, !TLSv1, !SSLv2, !SSLv3
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
strict_rfc821_envelopes = yes
tls_random_source = dev:/dev/urandom
virtual_alias_maps = sqlite:/etc/postfix/sqlite_alias.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/spool/mail/
virtual_mailbox_domains = sqlite:/etc/postfix/sqlite_domains.cf
virtual_mailbox_maps = sqlite:/etc/postfix/sqlite_mailbox.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000
内容/etc/hostname
:example
内容/etc/mailname
:example.place
内容/etc/hosts
:
127.0.0.1 localhost
123.123.123.123 example.place example
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
编辑
/var/log/mail.log
以下是一些看上去可疑的部分:
postfix/pickup[2498]: 72C5E9FB9E: uid=0 from=<root>
postfix/cleanup[2551]: 72C5E9FB9E: message-id=<[email protected]>
postfix/oqmgr[1829]: 72C5E9FB9E: from=<[email protected]>, size=675, nrcpt=1 (queue active)
postfix/pipe[2553]: 72C5E9FB9E: to=<[email protected]>, orig_to=<root>, relay=dovecot, delay=0.11, delays=0.05/0.01/0/0.05, dsn=5.1.1, status=bounced (user unknown)
postfix/cleanup[2551]: 877EC9FB73: message-id=<[email protected]>
postfix/oqmgr[1829]: 877EC9FB73: from=<>, size=2588, nrcpt=1 (queue active)
postfix/bounce[2558]: 72C5E9FB9E: sender non-delivery notification: 877EC9FB73
postfix/oqmgr[1829]: 72C5E9FB9E: removed
postfix/pipe[2553]: 877EC9FB73: to=<[email protected]>, relay=dovecot, delay=0.02, delays=0/0/0/0.02, dsn=5.1.1, status=bounced (user unknown)
postfix/oqmgr[1829]: 877EC9FB73: removed
dovecot: imap-login: Error: SSL: Stacked error: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol