Postfix 邮件服务器发送邮件失败(首次设置)

Postfix 邮件服务器发送邮件失败(首次设置)

我逐步阅读了下面的文章,以便在 Ubuntu 14.04 上启动并运行 Postfix:

PostfixVirtualMailBoxClamSmtp如何

现在,在提示使用mail命令发送电子邮件的步骤中,我发送了它。我输入的命令是:

root@myDomain# mail [email protected]
Subject: test subj
test it

.
Cc:

现在我应该有一个如下所示的新文件夹:

/home/vmail/mydomain/info/new

我看不到这样的电子邮件。我可以 telnet 到 25 端口:

root@mydomain:~# telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 mydomain.com ESMTP Postfix (Ubuntu)
ehlo localhost
250-yadme.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

Postfix 服务器正在运行。显示/var/log/mail.log

Jan 17 12:03:45 mydomain postfix/cleanup[26044]: 269F63E0E9: message-id=<[email protected]>
Jan 17 12:03:45 mydomain postfix/qmgr[26030]: 269F63E0E9: from=<[email protected]>, size=291, nrcpt=1 (queue active)
Jan 17 12:03:45 mydomain postfix/trivial-rewrite[26045]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_mailbox_domains
Jan 17 12:03:45 mydomain postfix/local[26046]: 269F63E0E9: to=<[email protected]>, relay=local, delay=0.1, delays=0.08/0/0/0.02, dsn=5.1.1, status=bounced (unknown user: "info")
Jan 17 12:03:45 mydomain postfix/cleanup[26044]: 34BBA3E0EA: message-id=<[email protected]>
Jan 17 12:03:45 mydomain postfix/qmgr[26030]: 34BBA3E0EA: from=<>, size=1916, nrcpt=1 (queue active)
Jan 17 12:03:45 mydomain postfix/bounce[26047]: 269F63E0E9: sender non-delivery notification: 34BBA3E0EA
Jan 17 12:03:45 mydomain postfix/qmgr[26030]: 269F63E0E9: removed
Jan 17 12:03:45 mydomain postfix/local[26046]: 34BBA3E0EA: to=<[email protected]>, relay=local, delay=0.04, delays=0.02/0/0/0.02, dsn=2.0.0, status=sent (delivered to maildir)
Jan 17 12:03:45 mydomain postfix/qmgr[26030]: 34BBA3E0EA: removed

以下参数是我添加的参数main.cf

home_mailbox = Maildir/
virtual_mailbox_domains = /etc/postfix/vhosts
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = hash:/etc/postfix/vmaps
virtual_minimum_uid = 1000
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000

如果有帮助的话,我已经添加了MX记录。我现在该怎么办?我想不起来我做错了什么?我遗漏了什么?

编辑:
以下命令查询info用户:

postmap -q [email protected] hash:/etc/postfix/vmaps

它输出:

mydomain.com/info/

我删除了 前面的所有域名mydestination =。现在mail.log显示:

Jan 17 13:20:07 mydomain postfix/pickup[26583]: 8E3803E0E4: uid=0 from=<root>
Jan 17 13:20:07 mydomain postfix/cleanup[26588]: 8E3803E0E4: message-id=<[email protected]>
Jan 17 13:20:07 mydomain postfix/qmgr[26584]: 8E3803E0E4: from=<[email protected]>, size=282, nrcpt=1 (queue active)
Jan 17 13:20:07 mydomain postfix/virtual[26590]: 8E3803E0E4: to=<[email protected]>, relay=virtual, delay=0.08, delays=0.06/0/0/0.02, dsn=2.0.0, status=sent (delivered to maildir)
Jan 17 13:20:07 mydomain postfix/qmgr[26584]: 8E3803E0E4: removed

但里面~/Maildir是空的。没有名为 的文件夹mydomain/info。有 3 个文件夹名为:tmpnewcur。现在发生了什么?

答案1

问题解决了!

正如在上面的配置中你可以看到我已经设置了virtual_mailbox_base = /home/vmail,所以我在错误的地方寻找~/Maildir

相关内容