Postfix 无法接收邮件

Postfix 无法接收邮件

我在 VPS 上安装了 Ubuntu 10.04,并为单个系统用户安装并设置了 Postfix 和 Dovecot,如下所示指南。我可以发送电子邮件,但无法接收。我有一个域名 tema.ee,它具有所有必要的 DNS 记录

tema@artemis:~$ host tema.ee
tema.ee has address 46.182.27.240
tema.ee mail is handled by 10 tema.ee.
tema@artemis:~$ host -t NS tema.ee
tema.ee name server ns2.selectel.org.
tema.ee name server ns1.selectel.org.

/var/log/mail.log在我应该接收电子邮件时,除了 imap 登录和断开连接消息之外没有任何东西。

主机文件:

tema@artemis:~$ sudo cat /etc/hosts
127.0.0.1           localhost
46.182.27.240       tema.ee     artemis

主机名:

tema@artemis:~$ hostname -f
tema.ee

Netstat 输出:

tema@artemis:~$ netstat -tap
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 *:imap2                 *:*                     LISTEN      -               
tcp        0      0 *:sunrpc                *:*                     LISTEN      -               
tcp        0      0 *:36243                 *:*                     LISTEN      -               
tcp        0      0 *:ssh                   *:*                     LISTEN      -               
tcp        0      0 *:imaps                 *:*                     LISTEN      -               
tcp        0      0 *:2025                  *:*                     LISTEN      -               
tcp        0     48 tema.ee:ssh             89-235-215-24.sat:62504 ESTABLISHED -               
tcp        0      0 tema.ee:imaps           89-235-215-24.sat:63988 ESTABLISHED -               
tcp        0      0 tema.ee:imaps           89-235-215-24.sat:63992 ESTABLISHED -                       
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      -               
tcp6       0      0 [::]:2025               [::]:*                  LISTEN      - 

这是我的main.cf后缀:

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_key_file = /etc/ssl/private/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

myhostname = tema.ee
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = tema.ee, localhost, artemis
relayhost =
mynetworks = 127.0.0.0/8 # [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
mailbox_command = 
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

实际上,一开始我以为是 DNS 的问题,但我已经设置了第二个虚拟机,使用了另一个域名(来自不同的注册商),进行了相同的配置,结果相同 — 我可以发送邮件,但无法接收邮件。问题可能出在哪里?

答案1

存在防火墙问题。

您的主机在端口 25 上不可用

% nc 46.182.27.240 25
(UNKNOWN) [46.182.27.240] 25 (smtp) : No route to host

查看(或向我们展示)的输出

iptables-save

相关内容