Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] TCP Socket: ownership to greylist/greylist: No such file or directory

2015-10-04 by manu@...

Marcus Schopen lists-yahoogroups@... [milter-greylist]
<milter-greylist@yahoogroups.com> wrote:

> Aug 10 11:12:54 server milter-greylist: /usr/sbin/milter-greylist: cannot
> change "inet:12345@192.168.12.1" ownership to greylist/greylist: No such
> file or directory
> 
> The filter itself is running fine.

Would you want to check this fix that only sets socket ownership if it
exists in filesystem?

diff -U 4 -r1.278 milter-greylist.c
--- milter-greylist.c   4 Oct 2015 03:35:42 -0000       1.278
+++ milter-greylist.c   4 Oct 2015 03:55:25 -0000
@@ -2016,9 +2016,10 @@
 
                /* 
                 * chown the socket so that sendmail does not complain
                 */
-               if (chown(conf.c_socket, pw->pw_uid, pw->pw_gid) != 0)
+               if ((access(conf.c_socket, F_OK) == 0) &&
+                   (chown(conf.c_socket, pw->pw_uid, pw->pw_gid) != 0))
                        mg_log(LOG_WARNING, "%s: cannot change \"%s\""
                            " ownership to %s/%s: %s", argv[0], 
                            conf.c_socket, pw->pw_name, gr->gr_name,
                            strerror(errno));


-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.