[Dovecot] A few easy pam and virtual domains questions

Mauricio Tavares raubvogel at gmail.com
Wed May 27 21:45:44 EEST 2009


      I am using dovecot with postfix, which was setup to do virtual
domains. Dovecot is setup to authenticate against pam (I know, I know)
and knows to look for email in /var/spool/vmail/:

virtual_mailbox_base = /var/spool/vmail

I also have virtual_mailbox_maps defined as

virtual_mailbox_maps = hash:/etc/postfix/vmaps.txt

where I currently only have one account,

% cat /etc/postfix/vmaps.txt
raub at domain.com domain.com/raub/
%

Inside raub we have the usual 3 directories, new,cur, and tmp. When I
try to login through imap as raub at domain.com@mail.domain.com (i.e.
since we are doing the virtual domain thingie, the username has to
indicate the domain it belongs to), it will not take it. But, if I
login as raub at mail.domain.com, it has no problems authenticating.
However, it now expects to retrieve email from /var/spool/vmail/raub
instead of /var/spool/vmail/domain.com/raub. Why would it be doing
that? Could it be that pam reports raub to be a local account and as a
result simply ignoring vmaps.txt?

I asked dovecot to log everything it could. When I checked the log
file, the following line screamed at me:

dovecot: May 27 14:40:28 Info: IMAP(raub): maildir++:
root=/var/spool/vmail//raub, index=, control=,
inbox=/var/spool/vmail//raub

Note the "//" in root and inbox declarations; between those slashes I
would expect to be domain.com.

Compounding the problem, and perhaps a clue of how pam is telling what
these accounts are, postfix is completely ignoring /var/spool/vmail,
placing the emails in /home/raub/Maildir (account is actually being
nfs-automounted and user authenticated through ldap through pam). Once
again I am guessing it too is being told raub is a local user; am I
correct?


More information about the dovecot mailing list