我可以在我的服务器上发送但不接收电子邮件 – 这与我之前遇到的问题类似,但是我已经进一步了解,并且我的电子邮件没有问题地发送。
我相信电子邮件接收问题是基于我的MXlogging。
我的后缀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的MXlogging集。
我看到很多邮件子域的例子 – 这是一个要求吗? 如在,我应该做mail.domainname.com作为我的mxlogging,而不是设置一个子域? 或者我目前的设置工作正常吗?
我只是在一两个小时前创build了MXlogging – 传播需要多长时间?
有什么其他的原因,我可以发送电子邮件,但没有收到? 我检查了我的邮件日志,这些是唯一的消息:
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)
我很确定我几乎得到了这一点 – 我只需要弄清楚为什么我的邮件服务器不能接收邮件。
这里是鸽舍日志…似乎是一个权限问题?
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)
检查Dovecotconfiguration文件/etc/dovecot/dovecot.conf的mail_uid和mail_gid的值。
他们应该设置为系统用户vmail uid/gid
例如。
$ id vmail uid=nnn(vmail) gid=nnn(vmail) groups=nnn(vmail)
此外,目录/var/vmail应该由用户/组: vmail:vmail 。
$ ls -dl /var/vmail