[Dovecot] dovecot is working, sort of

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Mon Aug 19 09:51:02 EEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 16 Aug 2013, LuKreme wrote:

> I have two kinds of accounts on the machine, local (shell) accounts in 
> /home/ and virtual (MySQL) accounts in /usr/local/virtual. I tried to 
> add the hid/gid args in the sql block, but the syntax was incorrect.
>
>> There is default_fields, that should do it, e.g.
>> userdb {
>>  args = /etc/dovecot/dovecot-sql.conf.ext
>>  driver = sql
>>  default_fields = uid=vpopmail gid=postfix
>> }
>
> I did not see anything about default_fields, so that is news to me. It 
> seems better, structurally, to do this wo when I next gt int there to 
> fix stuff, I will probably do that instead of...

http://wiki2.dovecot.org/UserDatabase?highlight=(default_fields)

>> Or extent your SQL user_query to return static values for uid / gid.
>
> That is what I did, though I still have a problem with it all (see "Disagreement on where mail goes." thread).

With both mechanisms you can solve the mail_location problem as well, by 
defining mail= in default_fields or returing a field "mail". Actually, you 
can use both: use "default_fields = mail=/path/%u" for most SQL users and 
return the field "mail" with some content, in order to override even the 
that default.

The system users would then use the mail_location setting from the conf 
files.

BTW: Your users have a home directory and Dovecot knows about it? Use 
"home" with default_fields. It should differ from the mail location.
http://wiki2.dovecot.org/VirtualUsers/Home
Therefore, to use "%h/Maildir" is not a bad decision for virtual users, 
too.

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUhHAVl3r2wJMiz2NAQKYEAgAmCLPax/Fk2pyckFVFF9CCh0cG1WESw5H
dbEbgoRsCu/dC3BzUHYwAq3SKTGkpfl7ztiqzhzhdMYldaQYbFq6IreABB/URz15
7/wmBf46ouadREHZ7vElkOPEpxPCjg98np0SbkE+DBt83mgWFqkUACJVA3m6uVnN
EpwKJnusIVIdx3Kef41pS8Qf1UpUjFKb1rvz9j3BhHlVKAODENrlZzt5ZU3liUMO
W4uvM1NtG8SoUW+KQZNf9fdvnq0skEGAFP81bUZtgySZxSvyKeUXcBQUvL98ab9Q
7P6Gvz7R7gd2izPUgyex8xFNuFlsEM4SZ6qUMuKApgQsVJvqM0qduQ==
=fkM0
-----END PGP SIGNATURE-----


More information about the dovecot mailing list