On Thu, Aug 04, 2011 at 10:13:53PM -0000, compconsultant wrote:
> --- In milter-greylist@yahoogroups.com, Johann Klasek <johann@...> wrote:
>
> > Because of this option I would recommend not to use the "daemon" variant, we
> > can not rely on its portability (especially in context for "generic linux").
> > At the moment I have no idea of a situation where "daemon --user"
> > has any advantage over "milter-greylist -u" ...
>
> Ok, so, here's the advantage. If you set the user to something other than root, it errors out. That's why I added the daemon.
>
> What SEEMS to happen using the original startup script on Centos is the files (such as the socket file) are built as root, THEN, the user changed to the correct user (in my case postfix), meaning, postfix cannot write to the files. Perhaps this is a bug in milter-greylist.
>
> When run with daemon, the program is started as that user and this the files all have the correct owner. So, that's why I made this change.
I see, that's why I probably switched to "daemon --user" on my Fedora
installation by myself ;)
In theory, the problem could be solved by setting the socket group und
socket permission in that way postfix is able to access the socket with
its group permission.
The socket permission is only changeable by means of the configuration file.
I agree, its not straight forward. The milter-greylist code should be better fixed
to set the ownership of the socket object to the appropriate user. Maybe not
necessary, but for consistency the PID file should be handled similar.
Johann E. K.