Eric Abrahamsen writes:
Simply: Is it possible to iterate over users if I'm using the passwd-file passdb driver? Do I need a SQL-based driver if I want to iterate?
What do you mean by "iterate"? If you mean whether you can look up a password entry in a multi-entry file, then yes, definitely. If you mean to sequentially go through it and do a first/last/best match, probably not.
Joseph Tam jtam.home@gmail.com
Joseph Tam jtam.home@gmail.com writes:
Eric Abrahamsen writes:
Simply: Is it possible to iterate over users if I'm using the passwd-file passdb driver? Do I need a SQL-based driver if I want to iterate?
What do you mean by "iterate"? If you mean whether you can look up a password entry in a multi-entry file, then yes, definitely. If you mean to sequentially go through it and do a first/last/best match, probably not.
Basically I just mean the -A argument to the doveadm commands. For example, iterate through all the users and run sa-learn on each user's learn/spam folder. If it's got to be SQL, it won't kill me...
Thanks! Eric
On 14 Oct 2015, at 00:01, Eric Abrahamsen eric@ericabrahamsen.net wrote:
Joseph Tam jtam.home@gmail.com writes:
Eric Abrahamsen writes:
Simply: Is it possible to iterate over users if I'm using the passwd-file passdb driver? Do I need a SQL-based driver if I want to iterate?
What do you mean by "iterate"? If you mean whether you can look up a password entry in a multi-entry file, then yes, definitely. If you mean to sequentially go through it and do a first/last/best match, probably not.
Basically I just mean the -A argument to the doveadm commands. For example, iterate through all the users and run sa-learn on each user's learn/spam folder. If it's got to be SQL, it won't kill me...
Use userdb passwd-file to get iteration working. passdb isn't used for iteration. userdb static can't be used to iterate.
Timo Sirainen tss@iki.fi writes:
On 14 Oct 2015, at 00:01, Eric Abrahamsen eric@ericabrahamsen.net wrote:
Joseph Tam jtam.home@gmail.com writes:
Eric Abrahamsen writes:
Simply: Is it possible to iterate over users if I'm using the passwd-file passdb driver? Do I need a SQL-based driver if I want to iterate?
What do you mean by "iterate"? If you mean whether you can look up a password entry in a multi-entry file, then yes, definitely. If you mean to sequentially go through it and do a first/last/best match, probably not.
Basically I just mean the -A argument to the doveadm commands. For example, iterate through all the users and run sa-learn on each user's learn/spam folder. If it's got to be SQL, it won't kill me...
Use userdb passwd-file to get iteration working. passdb isn't used for iteration. userdb static can't be used to iterate.
That did it, thank you! I had been staring at this:
http://wiki2.dovecot.org/AuthDatabase/PasswdFile#line-38
But not getting it exactly right. For posterity, I edited my conf to look like this:
passdb { driver = passwd-file args = username_format=%u scheme=ssha512 /etc/dovecot/passwd.db deny = no master = no pass = no skip = never result_failure = continue result_internalfail = continue result_success = return-ok }
userdb { driver = passwd-file args = username_format=%u /etc/dovecot/passwd.db default_fields = uid=vmail gid=vmail home=/var/mail/vmail/%d/%n }
Then edited /etc/dovecot/passwd.db to add six colons at the end of each user line -- empty fields since presently everything I need is specified in default_fields.
Thanks again, Eric
- Timo Sirainen tss@iki.fi 2015.10.13 23:20:
Use userdb passwd-file to get iteration working. passdb isn't used for iteration. userdb static can't be used to iterate.
I guess this works for a single file comprising of all users at the moment:
Oct 15 11:13:58 nihlus dovecot: auth-worker(5545): Error: passwd-file: User iteration isn't currently supported with %variable paths
Is variable support planned?
participants (4)
-
Eric Abrahamsen
-
Joseph Tam
-
Thomas Leuxner
-
Timo Sirainen