Postfix将邮件传递到虚拟地址邮箱

Postfix版本2.6.6,Dovecot版本2.0.9

我想要设置Postfix + Dovecot。 鸽子似乎在工作。 我可以authentication。 但是,邮箱是空的! 什么都不会交付! 我跟着很多关于Postfix + Dovecot的教程,但他们似乎想通过使用Dovecot LDA或MySQL来使事情复杂化。 我只是希望它是非常简单的,有Postfix交付到虚拟邮箱没有问题。 我也不需要MySQL。 我已经设置了一个Dovecot用于validation的自定义密码文件,我可以使用SSLlogin到POP3。

我可以从日志中看到Postfix正在向系统用户帐户(catch-all)发送数据,而不是我在Dovecot中设置的虚拟用户。 SMTP + SSL身份validation似乎也起作用。

我还可以从日志中看到Dovecot正在检查正确的虚拟邮件文件夹。

我只需要弄清楚如何让Postfix交付给虚拟邮箱。 我有以下我认为是相关的。 让我知道你需要看到的其他设置:

alias_maps = hash:/etc/aliases mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mydomain = xxx.com myhostname = mail.xxx.com mynetworks = 99.99.99.99, 99.99.99.99 myorigin = $mydomain relay_domains = $mydestination, xxx.com, domain2.net, domain3.com sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtpd_recipient_restrictions = reject_non_fqdn_sender reject_non_fqdn_recipient reject_unknown_recipient_domain permit_sasl_authenticated check_relay_domains smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_type = dovecot smtpd_sender_restrictions = check_sender_mx_access cidr:/etc/postfix/bogus_mx reject_invalid_hostname reject_unknown_sender_domain reject_non_fqdn_sender virtual_mailbox_base = /var/spool/vmail virtual_mailbox_domains = xxx.com, domain2.net, domain3.com virtual_minimum_uid = 444 

Postfix master.cf:

 submission inet n - - - - smtpd -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_sasl_type=dovecot -o smtpd_sasl_path=private/auth -o smtpd_sasl_security_options=noanonymous -o smtpd_sasl_local_domain=$myhostname -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o smtpd_sender_login_maps=hash:/etc/postfix/virtual -o smtpd_sender_restrictions=reject_sender_login_mismatch -o smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject 

鸽子相关:

 mail_location = maildir:~/Maildir passdb { args = /etc/dovecot/users.conf driver = passwd-file } service auth { unix_listener /var/spool/postfix/private/auth { mode = 0660 user = postfix } } 

虚拟邮件用户:

 vmail:x:444:99:virtual mail users:/var/spool/vmail:/sbin/nologin 

这里是/ var / log / maillog当我尝试发送自己的东西:

 Oct 25 22:10:05 308321 postfix/smtpd[2200]: connect from user-999.cable.mindspring.com[99.99.99.99] Oct 25 22:10:05 308321 postfix/smtpd[2200]: D224BD4753: client=user-999.cable.mindspring.com[99.99.99.99], sasl_method=LOGIN, [email protected] Oct 25 22:10:06 308321 postfix/cleanup[2207]: D224BD4753: message-id=<7DC3C163CFFC483AB6226F8D3D9969D2@dumbopc> Oct 25 22:10:06 308321 postfix/qmgr[2168]: D224BD4753: from=<[email protected]>, size=1385, nrcpt=1 (queue active) Oct 25 22:10:06 308321 postfix/smtpd[2200]: disconnect from user-999.cable.mindspring.com[99.99.99.99] Oct 25 22:10:06 308321 postfix/local[2208]: D224BD4753: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=1.1, delays=0.53/0.02/0/0.51, dsn=2.0.0, status=sent (delivered to mailbox) Oct 25 22:10:06 308321 postfix/qmgr[2168]: D224BD4753: removed 

看起来好像你只定义了虚拟域来接受邮件。 您还需要定义帐户。

用main.cf中的指令virtual_mailbox_maps来做到这一点

在这里阅读更多关于它的信息: http : //www.postfix.org/postconf.5.html#virtual_mailbox_maps