Dovecot writing to mailbox user@domain
centOS 6.5, dovecot-2.0.9-7.el6_5.1.x86_64
This is frustrating, because I had it working before... I could deliver an email to a user user@domain, then connect to dovecot IMAP and see the mail, no problem! Then I was told we had to use cyrus, and I was dealing with it for a few weeks. Now we're back to dovecot, and the last backup I had of that config has postfix delivering mail to /var/vmail/username as I want and expect, but dovecot looks for and creates /var/vmail/user@domain which I DON'T want
[joliver@test ~]$ dovecot -n # 2.0.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-431.el6.x86_64 x86_64 CentOS release 6.5 (Final) ext4 auth_username_format = %Lu mail_access_groups = mail mail_location = maildir:/var/vmail/%u/Maildir mail_privileged_group = mail mbox_write_locks = fcntl passdb { driver = pam } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } protocols = imap ssl_cert = </etc/pki/dovecot/certs/dovecot.pem ssl_key = </etc/pki/dovecot/private/dovecot.pem userdb { driver = passwd } userdb { args = uid=504 gid=505 home=/var/vmail/%u driver = static } [joliver@test ~]$ cat /etc/dovecot/dovecot-ldap.conf.ext hosts = localhost auth_bind = no ldap_version = 3 debug_level = 0 default_pass_scheme = SSHA base = ou=Users,dc=test,dc=com scope = subtree pass_filter = (&(objectClass=user)(uid=%u)) pass_attrs = mail=user,userPassword=password
--
- John Oliver http://www.john-oliver.net/ *
*
Hi John,
I'm guessing your problem is:
mail_location = maildir:/var/vmail/%u/Maildir
%u means 'username', and perhaps this serves you better: %n: User part in user@domain, same as %u if there's no domain.
so: mail_location = maildir:/var/vmail/%n/Maildir
I've had this same problem too
MJ
On 10/06/2014 06:38 PM, John Oliver wrote:
centOS 6.5, dovecot-2.0.9-7.el6_5.1.x86_64
This is frustrating, because I had it working before... I could deliver an email to a user user@domain, then connect to dovecot IMAP and see the mail, no problem! Then I was told we had to use cyrus, and I was dealing with it for a few weeks. Now we're back to dovecot, and the last backup I had of that config has postfix delivering mail to /var/vmail/username as I want and expect, but dovecot looks for and creates /var/vmail/user@domain which I DON'T want
[joliver@test ~]$ dovecot -n # 2.0.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-431.el6.x86_64 x86_64 CentOS release 6.5 (Final) ext4 auth_username_format = %Lu mail_access_groups = mail mail_location = maildir:/var/vmail/%u/Maildir mail_privileged_group = mail mbox_write_locks = fcntl passdb { driver = pam } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } protocols = imap ssl_cert = </etc/pki/dovecot/certs/dovecot.pem ssl_key = </etc/pki/dovecot/private/dovecot.pem userdb { driver = passwd } userdb { args = uid=504 gid=505 home=/var/vmail/%u driver = static } [joliver@test ~]$ cat /etc/dovecot/dovecot-ldap.conf.ext hosts = localhost auth_bind = no ldap_version = 3 debug_level = 0 default_pass_scheme = SSHA base = ou=Users,dc=test,dc=com scope = subtree pass_filter = (&(objectClass=user)(uid=%u)) pass_attrs = mail=user,userPassword=password
participants (2)
-
John Oliver
-
mourik jan heupink - merit