On Thu, Jan 14, 2021 at 10:52:51PM +0100, Ángel wrote: > On 2021-01-12 at 18:02 -0500, Sam Varshavchik wrote: > > It's theoretically possible to run "ps" in a subprocess and kill > > the gam_server process. That will result in a failed socket > > connection. But that's not going to be reliable, there will likely be > > multiple gam_server processes and there is no convenient way to find > > the right one. > > *If* Alexey is running each user under a different uid, it would be > simple to find the right gam_server which is not working.
Yes, in my case I made this simple patch that solved my problem. Of course, this is not entirely true as I wanted, but it's better to get only one error during authorization and the next time the user tries to log in we get a work mailbox instead of hangs unclear for how long. maildirwatch.c @@ -29,6 +29,14 @@ "Timeout initializing the FAM library. Your FAM library is broken.\n"; write(2, msg, sizeof(msg)-1); + + uid_t uid; + char cmd[255]; + + uid = getuid(); + sprintf(cmd, "/usr/bin/pkill -u %d -x gam_server >/dev/null 2>&1", uid); + system(cmd); + kill(getpid(), SIGKILL); } #endif > > stracing it should be useful to forward to gam. > > Indeed. strace may be able to show where/why it is (apparently) stuck > in a loop. Are the maliboxes in some kind of exotic filesystem? mdraid (0 and 10) on local SSD with XFS _______________________________________________ Courier-imap mailing list Courier-imap@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap