[Dovecot] Domain part / auth_username_format
Hey folks,
I want to authenticate a pop3 user without a domain part and then use the domain part to specify a Maildir subfolder to grab messages from.
So, this was my attempt: # use the domain part to access a subfolder mail_location = maildir:/mail/%n/Maildir/%d # strip of the domain part for authentication purposes auth_username_format = %n
login: testuser@.INBOX.SubFolder
Authentication of testuser works great, but mail_debug shows me that the domain-part (%d) is empty when expanding mail_location.
Any bright ideas?
Rob :)
[ Dovecot 1.0.rc15, Debian Sarge, PAM auth. ]
On Wed, 2007-06-13 at 16:43 +1200, Robert Coup wrote:
Hey folks,
I want to authenticate a pop3 user without a domain part and then use the domain part to specify a Maildir subfolder to grab messages from.
So, this was my attempt: # use the domain part to access a subfolder mail_location = maildir:/mail/%n/Maildir/%d # strip of the domain part for authentication purposes auth_username_format = %n
login: testuser@.INBOX.SubFolder
Authentication of testuser works great, but mail_debug shows me that the domain-part (%d) is empty when expanding mail_location.
Do you mean that you want to have user@domain1.org and user@domain2.org have the same password but different maildirs? What passdb and userdb are you using? I don't think there's a way to do this with auth_* settings. With SQL it would be easy.
Timo Sirainen said:
Do you mean that you want to have user@domain1.org and user@domain2.org have the same password but different maildirs?
Yes. Basically using the domain part as a variable :)
What passdb and userdb are you using? I don't think there's a way to do this with auth_* settings. With SQL it would be easy.
Currently I'm using PAM, but I could probably hack up a checkpassword script or some sql auth. auth_username_format is very close except the %d disappears when it comes to evaluate mail_location!
Thanks,
Rob :)
participants (2)
-
Robert Coup
-
Timo Sirainen