Postfix version 2.6.6, Dovecot Version 2.0.9
I want to setup Postfix + Dovecot. Dovecot seems to be working. I can authenticate. However, the mailbox is empty! Nothing will get delivered! I followed many tutorials on Postfix + Dovecot but they seem to want to complicate things by using Dovecot LDA or MySQL. I just want it to be very simple and having Postfix deliver to the virtual mail boxes are fine. I don't need MySQL either. I already set up a custom password file that Dovecot uses for authentication and I can login to POP3 with SSL.
I can see from the logs that Postfix is delivering to the system user accounts (the catch-all), instead of the virtual users that I set up in Dovecot. The SMTP + SSL authentication seems to work also.
I can also see from the logs that Dovecot is checking the correct virtual mail folder.
I just need to figure out how to get Postfix to deliver to the virtual mail boxes. I have the following which I believe are relevant. Let me know what other settings you need to see:
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
Dovecot related:
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
}
}
The virtual mail user:
vmail:x:444:99:virtual mail users:/var/spool/vmail:/sbin/nologin
Here is the /var/log/maillog when I try to send something to myself:
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