On 2015-05-03, Markus Rosjat <ros...@ghweb.de> wrote: > Am 03.05.2015 um 10:32 schrieb Stuart Henderson: >> On 2015-05-02, Markus Rosjat <ros...@ghweb.de> wrote: >>> okay it seems dovecot runs root and not as the _dovecot user so applying >>> a login class for the dovecote group only helps if you add root to it >>> and nor it seems to start properly. >> How are you starting Dovecot? The login class mechanism is only used >> when started with rcctl or /etc.rc.d/dovecot. > I enabled it with rcctl but like I said when I ps -aux use I get the > info that the process is owned by root. So to fix the problem with teh > open files I had to add root to _dovecot group to add the login class > behaviour.
This doesn't make sense. The rc.d script (via rc.subr) uses su -c (class) when starting a daemon, it doesn't matter which uid is running it... The only time where I think root's login class should make a difference is if you start it by hand without using -c ("sudo dovecot" or similar).