ubuntu – Postfix不使用Maildir发送电子邮件

前端之家收集整理的这篇文章主要介绍了ubuntu – Postfix不使用Maildir发送电子邮件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我已经按照 this guide来设置后缀.我还没有完成它,因为从发送测试电子邮件开始,自从从mBox切换到Maildir后,电子邮件不再被发送.

我用cur,new和tmp子目录创建了一个Maildir目录.

~$ll
drwxrwxr-x 5 greg greg    4096 2012-07-07 16:40 Maildir/
~$ll Maildir/
drwxrwxr-x 2 greg greg 4096 2012-07-07 16:40 cur
drwxrwxr-x 2 greg greg 4096 2012-07-07 16:40 new
drwxrwxr-x 2 greg greg 4096 2012-07-07 16:40 tmp

发送测试邮件.

~$netcat mail.example.com 25
220 ubuntu ESMTP Postfix (Ubuntu)
ehlo example.com
250-ubuntu
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: root@example.com
250 2.1.0 Ok
rcpt to: greg@example.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject: test email

Hi,Just testing.
.
250 2.0.0 Ok: queued as 56B541EA53
quit
221 2.0.0 Bye

检查邮件队列.

~$mailq
Mail queue is empty

检查邮件是否已送达.

~$ls -l Maildir/new
total 0

一些后缀设置:

~$sudo postconf home_mailBox
home_mailBox = Maildir/
~$sudo postconf mailBox_command
mailBox_command =

/var/log/mail.log

Jul  7 16:57:33 li305-246 postfix/smtpd[21039]: connect from example.com[178.79.168.xxx]
Jul  7 16:58:14 li305-246 postfix/smtpd[21039]: 56B541EA53: client=example.com[178.79.168.xxx]
Jul  7 16:58:33 li305-246 postfix/cleanup[21042]: 56B541EA53: message-id=<20120707155814.56B541EA53@ubuntu>
Jul  7 16:58:33 li305-246 postfix/qmgr[20882]: 56B541EA53: from=<root@example.com>,size=321,nrcpt=1 (queue active)
Jul  7 16:58:33 li305-246 postfix/smtp[21043]: 56B541EA53: to=<greg@example.com>,relay=none,delay=30,delays=30/0.01/0/0,dsn=5.4.6,status=bounced (mail for example.com loops back to myself)
Jul  7 16:58:33 li305-246 postfix/cleanup[21042]: 1F68B1EA55: message-id=<20120707155833.1F68B1EA55@ubuntu>
Jul  7 16:58:33 li305-246 postfix/bounce[21044]: 56B541EA53: sender non-delivery notification: 1F68B1EA55
Jul  7 16:58:33 li305-246 postfix/qmgr[20882]: 1F68B1EA55: from=<>,size=1999,nrcpt=1 (queue active)
Jul  7 16:58:33 li305-246 postfix/qmgr[20882]: 56B541EA53: removed
Jul  7 16:58:33 li305-246 postfix/smtp[21043]: 1F68B1EA55: to=<root@example.com>,delay=0,delays=0/0/0/0,status=bounced (mail for example.com loops back to myself)
Jul  7 16:58:33 li305-246 postfix/qmgr[20882]: 1F68B1EA55: removed
Jul  7 16:58:36 li305-246 postfix/smtpd[21039]: disconnect from domain.me[178.79.168.xxx]
Jul  7 17:10:38 li305-246 postfix/master[20878]: terminating on signal 15
Jul  7 17:10:39 li305-246 postfix/master[21254]: daemon started -- version 2.8.5,configuration /etc/postfix

有任何想法吗?

你的问题与maildir无关,而且与糟糕的邮件路由有关.关键是错误消息“mail for domain.com循环回到我自己”.您已设置MX记录,以便domain.com的邮件指向您自己的邮件服务器,但您尚未将所述邮件服务器配置为实际接受和传递邮件.设置mydestination(或相应的虚拟邮件配置,如果这是你的包),包括domain.com,一切都会好的.

猜你在找的Ubuntu相关文章