[Dovecot] Getting default uid/gid of users via socket for virtual user support for sendmail

Timo Sirainen tss at iki.fi
Thu Aug 1 18:08:04 EEST 2013


On 1.8.2013, at 17.52, Steffen Kaiser <skdovecot at smail.inf.fh-brs.de> wrote:

> I'm trying to make my life easier with sendmail and virtual users. For that I'd like to pass sendmail the home directory and uid/gid for each user. The user data is storred in a LDAP,& I retrieve it from the auth-userdb socket fine.
> 
> If I add uid / gid to each user, I get them via that socket as well, but is there a way I get the default uid/gid? I mean, without calling an external program, such as doveadm. There is an "initialize" phase, so the default information is retrieved just once per lifetime of the demon, but each time the sendmail binary is invoked.

You can't get the mail_uid/gid/home, because they really don't belong to auth process.. But what you could do with v2.2 is:

userdb {
  driver = ldap
  args = ..
  default_fields = uid=1234 gid=1234 home=/home/user/%u
}

But anyway, what is sendmail going to be doing with these fields? For Postfix I've been trying to remove its need to know anything at all about users (only domains and aliases).



More information about the dovecot mailing list