[Dovecot] Dovecot 1.0.7 domain variable
Hi all,
Thanks in advance for any help!
I'm trying to configure Dovecot to pull emails from Postfix virtual mailbox domain Maildirs under /var/mail/vhosts/<domain>/<username>. I've set mail_location as such in dovecot.conf:
mail_location = maildir:/var/mail/vhosts/%d/%n
but from debug output I see the domain is blank:
dovecot: May 10 20:49:25 Info: IMAP(elliott): maildir: data=/var/mail/vhosts//elliott
I've set elliott@n.0o0.bz as my username in Outlook so it is sending the domain (and changed auth_username_format to "auth_username_format = %n" so authentication works fine)
Why is %d blank here? Anything else to check?? I'm at a loss.
Thanks! -elliott-
On Sun, 2009-05-10 at 22:17 -0700, elliott@n.localhost wrote:
but from debug output I see the domain is blank:
dovecot: May 10 20:49:25 Info: IMAP(elliott): maildir: data=/var/mail/vhosts//elliott
I've set elliott@n.0o0.bz as my username in Outlook so it is sending the domain (and changed auth_username_format to "auth_username_format = %n" so authentication works fine)
Having auth_username_format=%n changes the username to only "user" and the domain is gone. You'd need to do it in some other way.
On Mon, May 11, 2009 at 12:31:19PM -0400, Timo Sirainen wrote:
On Sun, 2009-05-10 at 22:17 -0700, elliott@n.localhost wrote:
but from debug output I see the domain is blank:
dovecot: May 10 20:49:25 Info: IMAP(elliott): maildir: data=/var/mail/vhosts//elliott
I've set elliott@n.0o0.bz as my username in Outlook so it is sending the domain (and changed auth_username_format to "auth_username_format = %n" so authentication works fine)
Having auth_username_format=%n changes the username to only "user" and the domain is gone. You'd need to do it in some other way.
Any suggestions on how? I was trying to avoid adding a local user for every mailbox; is that the only way? Thanks, I'm pretty new to dovecot.
Cheers, -elliott-
On Mon, May 11, 2009 at 12:31:19PM -0400, Timo Sirainen wrote:
On Sun, 2009-05-10 at 22:17 -0700, elliott@n.localhost wrote:
but from debug output I see the domain is blank:
dovecot: May 10 20:49:25 Info: IMAP(elliott): maildir: data=/var/mail/vhosts//elliott
I've set elliott@n.0o0.bz as my username in Outlook so it is sending the domain (and changed auth_username_format to "auth_username_format = %n" so authentication works fine)
Having auth_username_format=%n changes the username to only "user" and the domain is gone. You'd need to do it in some other way.
Okay, I've now also tried changing "auth_username_format = %n-%d" and adding a user for each account. Authentication works fine but I still get "maildir: data=/var/mail/vhosts//elliott-n.0o0.bz" in the logs! What's the deal? When does the %d variable get set and how can I use it??
Thanks for any pointers!
-elliott-
On May 12, 2009, at 10:37 PM, elliott@n.0o0.bz wrote:
Okay, I've now also tried changing "auth_username_format = %n-%d"
and adding a user for each account. Authentication works fine but I
still get "maildir: data=/var/mail/vhosts//elliott-n.0o0.bz" in the
logs! What's the deal? When does the %d variable get set and how
can I use it??
The username has to be in user@domain format, %d only matches what is
after @ character.. Why did you use user-domain instead of user@domain?
On W 13 May, 2009, at 04:37 , elliott@n.0o0.bz wrote:
Okay, I've now also tried changing "auth_username_format = %n-%d"
and adding a user for each account. Authentication works fine but I
still get "maildir: data=/var/mail/vhosts//elliott-n.0o0.bz" in the
logs! What's the deal? When does the %d variable get set and how
can I use it??Thanks for any pointers!
this has come up recently. The gist of it is this: the username from
which the % variables are expanded is the same that has been
authenticated by the authentication mechanism. One trick, that I used
with my system users, in order to keep the domain in the location
path, is to use the home directory to build it (by concatenation and a
simple symbolic link).
As you have virtual users, you are even free to set the home to what
you need for the location path.
Giuliano
participants (5)
-
Elliott Barrere
-
elliott@n.0o0.bz
-
elliott@n.localhost
-
Giuliano Gavazzi
-
Timo Sirainen