[Dovecot] extra fields with "passwd" userdb
Hi,
I am planning a migration of ~600 accounts to mdbox (from maildir) and was hoping to do some initial testing of certain account. I am hoping to use extra fields to migrate certain accounts in advance for testing, and I can't find info on setting up extra fields with the "passwd" backend. Is this possible, or will I have to use another approach?
Hello
It is is possible. You just need to replace the.
maildir: prefix with mdbox:, for mail_location, for each one of the test mail boxes.
also if you are using maildir++ quota. change it dovecot quota. maildir++ does not work correctly with mdbox.
KuiZ
On Fri, Dec 10, 2010 at 7:31 AM, Patrick McLean patrick@cim.mcgill.ca wrote:
Hi,
I am planning a migration of ~600 accounts to mdbox (from maildir) and was hoping to do some initial testing of certain account. I am hoping to use extra fields to migrate certain accounts in advance for testing, and I can't find info on setting up extra fields with the "passwd" backend. Is this possible, or will I have to use another approach?
Hi,
On 10/12/10 01:30 PM, Kui Zhang wrote:
Hello
It is is possible. You just need to replace the.
maildir: prefix with mdbox:, for mail_location, for each one of the test mail boxes.
Thanks for the reply, although I am not sure you understand the question. I know what I need to do, I just don't know how (syntax to use in the dovecot configuration file) to change the mail_location on a per-user basis with the "passwd" userdb backend.
KuiZ
On Fri, Dec 10, 2010 at 7:31 AM, Patrick McLean patrick@cim.mcgill.ca wrote:
Hi,
I am planning a migration of ~600 accounts to mdbox (from maildir) and was hoping to do some initial testing of certain account. I am hoping to use extra fields to migrate certain accounts in advance for testing, and I can't find info on setting up extra fields with the "passwd" backend. Is this possible, or will I have to use another approach?
Patrick McLean wrote:
Hi,
On 10/12/10 01:30 PM, Kui Zhang wrote:
Hello
It is is possible. You just need to replace the.
maildir: prefix with mdbox:, for mail_location, for each one of the test mail boxes.
Thanks for the reply, although I am not sure you understand the question. I know what I need to do, I just don't know how (syntax to use in the dovecot configuration file) to change the mail_location on a per-user basis with the "passwd" userdb backend.
I am no Dovecot expert, but maybe you could add a passwd-file userdb alongside your regular userdb.
Then for the users you want to test with: user:password-ignored--will-use-passdb-instead:1000:1000::/home/user::userdb_mail=mdbox:~/Maildir
See http://wiki.dovecot.org/AuthDatabase/PasswdFile
The thing I'm not sure about is which order you should list your userdb sections in the config file such that "passwd-file" takes precedence over "passwd".
Willie
On Fri, 2010-12-10 at 15:07 -0700, Willie Gillespie wrote:
Thanks for the reply, although I am not sure you understand the question. I know what I need to do, I just don't know how (syntax to use in the dovecot configuration file) to change the mail_location on a per-user basis with the "passwd" userdb backend.
I am no Dovecot expert, but maybe you could add a passwd-file userdb alongside your regular userdb.
Yeah, something like that has to be done.
Then for the users you want to test with: user:password-ignored--will-use-passdb-instead:1000:1000::/home/user::userdb_mail=mdbox:~/Maildir
Yep. Either only the non-default users or just clone the entire /etc/passwd there. You could write a small script that updates it, preserving the extra fields.
The thing I'm not sure about is which order you should list your userdb sections in the config file such that "passwd-file" takes precedence over "passwd".
userdb passwd-file {} just needs to be above userdb passwd {} in config file. If user isn't found from passwd-file then it's looked up from passwd next.
Hi,
On 13/12/10 08:05 AM, Timo Sirainen wrote:
On Fri, 2010-12-10 at 15:07 -0700, Willie Gillespie wrote:
Thanks for the reply, although I am not sure you understand the question. I know what I need to do, I just don't know how (syntax to use in the dovecot configuration file) to change the mail_location on a per-user basis with the "passwd" userdb backend.
I am no Dovecot expert, but maybe you could add a passwd-file userdb alongside your regular userdb.
Yeah, something like that has to be done.
I just did that, and things seem to be _mostly_ working. It seems that deliver/dovecot-lda is ignoring the extra fields parameter (I am using the user's .forward file to invoke the lda). It keeps trying to deliver to the Maildir rather than the mdbox.
I managed to override it by creating a new config file with mail_location set to mdbox, and specifying the config file on the lda command line. This is obviously not ideal, I would imagine that the lda should respect the extra fields as the rest of dovecot does.
I set the userdb sock to 0666 and tested that "doveadm user" gets the right info when run as the user, so it really does appear that deliver has the information available to it, it's just being ignored.
Then for the users you want to test with: user:password-ignored--will-use-passdb-instead:1000:1000::/home/user::userdb_mail=mdbox:~/Maildir
Yep. Either only the non-default users or just clone the entire /etc/passwd there. You could write a small script that updates it, preserving the extra fields.
The thing I'm not sure about is which order you should list your userdb sections in the config file such that "passwd-file" takes precedence over "passwd".
userdb passwd-file {} just needs to be above userdb passwd {} in config file. If user isn't found from passwd-file then it's looked up from passwd next.
On 13.12.2010, at 17.30, Patrick McLean wrote:
I just did that, and things seem to be _mostly_ working. It seems that deliver/dovecot-lda is ignoring the extra fields parameter (I am using the user's .forward file to invoke the lda). It keeps trying to deliver to the Maildir rather than the mdbox.
Give it -d parameter.
Hello
These should help.
http://wiki2.dovecot.org/UserDatabase?highlight=mail_location http://wiki.dovecot.org/UserDatabase/ExtraFields
KuiZ
On Fri, Dec 10, 2010 at 1:44 PM, Patrick McLean patrick@cim.mcgill.ca wrote:
Hi,
On 10/12/10 01:30 PM, Kui Zhang wrote:
Hello
It is is possible. You just need to replace the.
maildir: prefix with mdbox:, for mail_location, for each one of the test mail boxes.
Thanks for the reply, although I am not sure you understand the question. I know what I need to do, I just don't know how (syntax to use in the dovecot configuration file) to change the mail_location on a per-user basis with the "passwd" userdb backend.
KuiZ
On Fri, Dec 10, 2010 at 7:31 AM, Patrick McLean patrick@cim.mcgill.ca wrote:
Hi,
I am planning a migration of ~600 accounts to mdbox (from maildir) and was hoping to do some initial testing of certain account. I am hoping to use extra fields to migrate certain accounts in advance for testing, and I can't find info on setting up extra fields with the "passwd" backend. Is this possible, or will I have to use another approach?
participants (4)
-
Kui Zhang
-
Patrick McLean
-
Timo Sirainen
-
Willie Gillespie