可以发送但不能接收电子邮件

可以发送但不能接收电子邮件

我可以在我的服务器上发送但无法接收电子邮件 - 这与我以前遇到的问题类似,但我已经取得了进一步的进展,我的电子邮件发送没有问题。

我相信电子邮件接收问题是基于我的 MX 记录。

我的 postfix main.cf 文件如下所示:

readme_directory = no

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

myhostname = domainname.com
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
myorigin = domainname.com
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhost
name
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
#inet_protocols = ipv4
#virtual_alias_domains =
allow_percent_hack = no
swap_bangpath = no
mydomain = domainname.com
mynetworks_style = host

domainname.com 不是我的真实域名,而是一个假的域名。

我有一个直接指向 domainname.com 的 MX 记录集。

我看到很多带有邮件子域名的示例 - 这是必需的吗?例如,我是否应该将 mail.domainname.com 作为我的 mx 记录,并以某种方式设置子域名?或者我当前的设置可以正常工作吗?

我大概一两个小时前才创建了 MX 记录 - 它需要多长时间才能传播?

还有其他原因导致我能发送电子邮件但无法接收邮件吗?我检查了我的邮件日志,只有以下消息:

Nov  7 18:09:09 domainname postfix/pipe[29051]: 5D2CC120220: to=<[email protected]>, relay=dovecot, delay=2117, delays=2116/0.04/0/0.08, dsn=4.3.0, status=deferred (temporary failure)
Nov  7 18:09:09 domainname postfix/pipe[29052]: 6C0F1123722: to=<[email protected]>, relay=dovecot, delay=477, delays=476/0.02/0/0.08, dsn=4.3.0, status=deferred (temporary failure)
Nov  7 18:09:09 domainname postfix/pipe[29054]: 976501207F0: to=<[email protected]>, relay=dovecot, delay=990, delays=990/0.03/0/0.06, dsn=4.3.0, status=deferred (temporary failure)
Nov  7 18:10:57 domainname postfix/sendmail[29084]: fatal: [email protected](33): No recipient addresses found in message header
Nov  7 18:14:09 domainname postfix/qmgr[28334]: B9C071238A6: from=<[email protected]>, size=2448, nrcpt=1 (queue active)
Nov  7 18:14:09 domainname postfix/trivial-rewrite[29100]: warning: do not list domain domainname.com in BOTH mydestination and virtual_mailbox_domains
Nov  7 18:14:09 domainname postfix/qmgr[28334]: A2D8112388A: from=<[email protected]>, size=583, nrcpt=2 (queue active)
Nov  7 18:14:09 domainname postfix/trivial-rewrite[29100]: warning: do not list domain domainname.com in BOTH mydestination and virtual_mailbox_domains
Nov  7 18:14:09 domainname postfix/pipe[29104]: A2D8112388A: to=<[email protected]>, relay=dovecot, delay=2387, delays=2387/0.01/0/0.03, dsn=4.3.0, status=deferred (temporary failure)
Nov  7 18:14:09 domainname postfix/pipe[29103]: B9C071238A6: to=<[email protected]>, relay=dovecot, delay=2370, delays=2370/0.02/0/0.05, dsn=4.3.0, status=deferred (temporary failure)

我很确定我几乎已经明白了这一点——我只需要弄清楚为什么我的邮件服务器无法接收邮件。

这是 dovecot 日志...似乎是权限问题?

Nov 06 05:36:59 imap([email protected]): Error: user [email protected]: Initialization failed: Namespace '': stat(//var/vmail/vmail1/domainname.com/a/n/d/andy-2014.11.06.01.31.59//Maildir) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +x perm: //var/vmail, dir owned by 5000:5000 mode=0700)
Nov 06 05:36:59 imap([email protected]): Error: Invalid user settings. Refer to server log for more information.
Nov 06 05:37:52 auth-worker: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 06 05:37:52 auth: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 06 05:37:52 anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 06 05:37:52 log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 06 05:37:52 config: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 06 05:37:52 master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 06 05:37:52 lmtp(671): Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 06 05:37:52 lmtp(672): Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 06 05:37:52 lmtp(669): Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 06 05:37:52 lmtp(670): Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 06 05:37:52 lmtp(673): Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 06 05:38:16 master: Info: Dovecot v2.0.19 starting up (core dumps disabled)
Nov 06 05:38:48 auth-worker: Info: mysql(127.0.0.1): Connected to database vmail
Nov 06 05:38:48 imap-login: Info: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=3768, secured
Nov 06 05:38:48 imap([email protected]): Error: chdir(/var/vmail/vmail1/domainname.com/a/n/d/andy-2014.11.06.01.31.59//) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +x perm: /var/vmail, dir owned by 5000:5000 mode=0700)

答案1

检查Dovecot 配置文件中的mail_uid 和 的值。 它们应该设置为系统用户mail_gid/etc/dovecot/dovecot.conf
uid/gidvmail

例如。

$ id vmail
uid=nnn(vmail) gid=nnn(vmail) groups=nnn(vmail)

该目录也/var/vmail应归用户/组所有:vmail:vmail

$ ls -dl /var/vmail

相关内容