Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dovecot username lookup help
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
nukem996
l33t
l33t


Joined: 13 Nov 2003
Posts: 776

PostPosted: Mon Mar 31, 2014 9:20 am    Post subject: Dovecot username lookup help Reply with quote

As part of running a small personal server for my family I'm hosting a domain for my mom. I already have exim setup to deliver mail to /var/mail/%h/%u where %h is the domain name while %u is the username with domain name striped. I can't get dovecot to do the same! If I set

Code:

auth_username_format = %n


pam verifies the lookup but when dovecot goes to check the maildir location searches /var/mail//%u. If I don't have that pam tries to verify %u@%h which is invalid.

How can I get dovecot pass pam just the username?
Back to top
View user's profile Send private message
mcclung
n00b
n00b


Joined: 24 Apr 2005
Posts: 22

PostPosted: Mon Mar 31, 2014 12:26 pm    Post subject: Reply with quote

Not sure what you've already tried, but did you set mail_location to something like:

mail_location = mbox:/var/mail/%d/%n

I have maildir delivery working using postfix and with dovecot I use this:

mail_location = maildir:~/Mail:INBOX=~/.maildir:LAYOUT=fs

Which stores mail (IMAP directories) in ~/Mail, while new mail is in ~/.maildir.
Back to top
View user's profile Send private message
nukem996
l33t
l33t


Joined: 13 Nov 2003
Posts: 776

PostPosted: Tue Apr 01, 2014 7:28 am    Post subject: Reply with quote

Yes I have

Code:

mail_location = maildir:/var/mail/%d/%n


The problem is if I use
Code:

auth_username_format = %n


It sets %d to ''. If I don't use the auth_username dovecot tries to authenticate with the full user@domain
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum