![Postfix 可以发送但不能接收邮件](https://linux22.com/image/1088480/Postfix%20%E5%8F%AF%E4%BB%A5%E5%8F%91%E9%80%81%E4%BD%86%E4%B8%8D%E8%83%BD%E6%8E%A5%E6%94%B6%E9%82%AE%E4%BB%B6.png)
我可以发送电子邮件,但不能用 postfix 接收电子邮件,我的 postconf -n 输出是:
address_verify_map = proxy:btree:$data_directory/verify_cache
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
disable_vrfy_command = yes
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
message_size_limit = 11534336
milter_default_action = accept
milter_protocol = 2
mydestination = $myhostname, localhost.$mydomain, localhost, mail.$myhostname,
myhostname = n3fs.co
mynetworks = 127.0.0.1 142.4.215.80
myorigin = $myhostname
non_smtpd_milters = inet:localhost:12301
postscreen_access_list = permit_mynetworks
postscreen_bare_newline_action = enforce
postscreen_bare_newline_enable = yes
postscreen_blacklist_action = enforce
postscreen_dnsbl_action = enforce
postscreen_dnsbl_sites = zen.spamhaus.org*3 bl.spameatingmonkey.net*2 dnsbl.habl.org bl.spamcop.net dnsbl.sorbs.net
postscreen_dnsbl_threshold = 3
postscreen_greet_action = enforce
postscreen_greet_banner = Welcome, please wait...
postscreen_non_smtp_command_action = enforce
postscreen_non_smtp_command_enable = yes
postscreen_pipelining_action = enforce
postscreen_pipelining_enable = yes
proxy_write_maps = $smtp_sasl_auth_cache_name $lmtp_sasl_auth_cache_name $address_verify_map
readme_directory = no
recipient_delimiter = +
relay_domains = pgsql:/etc/postfix/sql-relaydomains.cf
smtp_tls_loglevel = 1
smtp_tls_security_level = may
smtpd_banner = mail.n3fs.co ESMTP
smtpd_helo_required = yes
smtpd_milters = inet:localhost:12301
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated check_recipient_access pgsql:/etc/postfix/sql-maintain.cf pgsql:/etc/postfix/sql-relay-recipient-verification.cf reject_unverified_recipient reject_unauth_destination reject_non_fqdn_sender reject_non_fqdn_recipient reject_non_fqdn_helo_hostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = pgsql:/etc/postfix/sql-sender-login-mailboxes.cf pgsql:/etc/postfix/sql-sender-login-aliases.cf pgsql:/etc/postfix/sql-sender-login-mailboxes-extra.cf
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/certs/mail.n3fs.co.cert
smtpd_tls_dh1024_param_file = ${config_directory}/dh2048.pem
smtpd_tls_eecdh_grade = strong
smtpd_tls_exclude_ciphers = ECDHE-RSA-RC4-SHA
smtpd_tls_key_file = /etc/ssl/private/mail.n3fs.co.key
smtpd_tls_loglevel = 1
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_exclude_ciphers = ECDHE-RSA-RC4-SHA
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:$data_directory/smtpd_tls_session_cache
smtpd_use_tls = yes
strict_rfc821_envelopes = yes
transport_maps = pgsql:/etc/postfix/sql-spliteddomains-transport.cf pgsql:/etc/postfix/sql-relaydomains-transport.cf pgsql:/etc/postfix/sql-autoreplies-transport.cf hash:/etc/postfix/dmarc_transport
unknown_local_recipient_reject_code = 550
unverified_recipient_reject_code = 550
virtual_alias_domains = pgsql:/etc/postfix/sql-domain-aliases.cf
virtual_alias_maps = pgsql:/etc/postfix/sql-aliases.cf
virtual_mailbox_domains = pgsql:/etc/postfix/sql-domains.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp
和我的 postconf -M 输出:
smtp inet n - - - 1 postscreen
smtpd pass - - - - - smtpd -o smtpd_proxy_filter=inet:[127.0.0.1]:10024 -o smtpd_proxy_options=speed_adjust
dnsblog unix - - - - 0 dnsblog
tlsproxy unix - - - - 0 tlsproxy
submission inet n - - - - smtpd -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_reject_unlisted_recipient=no -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o smtpd _helo_restrictions= -o smtpd_sender_restrictions=reject_sender_login_mismatch -o smtpd_recipient_restrictions= -o milter_macro_daemon_name=ORIGINATING -o smtpd_proxy_filter=inet:[127.0.0.1]:10026
pickup unix n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr unix n - n 300 1 qmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
dmarc-rua-parser unix - n n - - pipe flags= user=vmail:vmail argv=/srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py import_aggregated_report --pipe
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}
autoreply unix - n n - - pipe flags= user=vmail:vmail argv=/srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py autoreply $sender $mailbox
127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o smtpd_authorized_xforward_hosts=127.0.0.0/8 -o smtpd_delay_reject=no -o smtpd_client_restrictions=permit_mynetworks,reject -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o sm tpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions=reject_unauth_pipelining -o smtpd_end_of_data_restrictions= -o smtpd_restriction_classes= -o mynetworks=127.0.0.0/8 -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_err or_limit=1000 -o smtpd_client_connection_count_limit=0 -o smtpd_client_connection_rate_limit=0 -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks -o local_header_rewrite_clients=
编辑:检查 mail.log 中是否有传入消息:https://gyazo.com/bc18bccc0b8a83e9f20d933f2bfa659f 它似乎进入了但没有显示在任何邮件客户端上