为什么我的dovecot收不到别人发来的邮件?

为什么我的dovecot收不到别人发来的邮件?

postfix 和 dovecot 安装在我的 vps--centos7 上。

我可以给别人发邮件,为什么收不到别人发的邮件?

端口没有问题。

netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN  

远程登录我的 vps。

telnet xxxxxxx  110
Trying xxxxxxxx...
Connected to xxxxxx
Escape character is '^]'.
Connection closed by foreign host.

用 关闭防火墙是没有用的 systemctl stop firewalld

如何检查我的鸽舍的错误?
1、doveconf -n

 # 2.2.10: /etc/dovecot/dovecot.conf
 # OS: Linux 2.6.32-042stab123.3 x86_64 CentOS Linux release 7.2.1511 (Core)  
disable_plaintext_auth = no
first_valid_uid = 1000
listen = *
log_path = /var/log/dovecot.log
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mbox_write_locks = fcntl
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
}
passdb {
  driver = pam
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }
}
ssl = required
userdb {
  driver = passwd
}
  1. 会议后-n

    alias_database = 散列:/etc/aliases
    alias_maps = 散列:/etc/
    aliasesbroken_sasl_auth_clients = yes
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
    home_mailbox = Maildir/
    html_directory = no
    inet_interfaces = 所有
    inet_protocols = 所有
    local_recipient_maps =
    mail_owner = postfix
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,mail.$mydomain, www.$mydomain, ftp.$ mydomain
    mydomain = xxxx
    myhostname = xxxx
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    myorigin = $mydomain
    newaliases_path = /usr/bin/newaliases.postfix
    queue_directory = /var /spool/postfix
    自述目录 = /usr/share/doc/postfix-2.10.1/README_FILES
    中继域 = $mydestination
    样本目录 = /usr/share/doc/postfix-2.10.1/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    smtpd_client_restrictions =允许_sasl_authenticated
    smtpd_recipient_restrictions = bers_sasl_authenticated,recupl_unauth_destinati
    ecipient_reject_code
    = 550

  2. 远程登录xxxx 25

    正在尝试 xxxx
    连接到 xxxxxx
    转义字符为“^]”。
    220 xxxxxx ESMTP 后缀

答案1

dig domain.tld in MX

给您一个回复,显示如下内容:

domain.tld.  86400 IN MX 10 mail.domain.tld.

如果没有,您需要在 DNS 中添加 MX 记录,如下所示:

owner-name           ttl  class   rr  pref name
example.com.         3w   IN      MX  10   mail.example.com.

这是一个不错的解释以及上面示例的来源:

zytrax.com 上的邮件交换记录 (MX)

答案2

dig  mydomain.com in MX

;; AUTHORITY SECTION:
mydomain.com        285 IN  SOA 


dig  mail.mydomain.com  in MX

;; ANSWER SECTION:
mail.mydomain.com.  300 IN  MX  10 mydomain.com

mydomain.com 未添加 MX 记录,mail.mydomain.com 添加了 MX 记录。

在 DNS 中为 mydomain.com 添加 MX 记录,而不是在我的域名服务器中添加 mail.mydomain.com。

owner-name           ttl  class   rr  pref name
mydomain.com         3w   IN      MX  10   mydomain.com

相关内容