*.indirect bash scripts launch courier-{imapd,pop3d} processes by forking from bash. The fix would be a 's/eval/eval exec/' on files/*.indirect Reproducible: Always
I had to ditch the whole *.indirect setup (its kinda useless anyway) on a medium-busy mailserver because it was causing to many problems. Imapd processes would stay active indefinitely, with bash processes hanging in wait4 state. This caused the server to run into its MAXDAEMONS setting, blocking out users. After altering gentoo-imapd-ssl.rc and gentoo-imapd.rc the problems disappeared. For anyone with similar problems, these were my changes to the .rc files: 24c24 < eval ${PRERUN} ${libexecdir}/couriertcpd \ --- > ${libexecdir}/couriertcpd \ 32c32 < ${libexecdir}/courier-imapd.indirect "${MAILDIR}" --- > ${bindir}/courier-imapd "${MAILDIR}"
chutzpah has taken over courier-imap maint.
(In reply to comment #1) I can also confirm this helps boost the performance of both POP3 and IMAP delivery of mail and keeps the process counts down. Changes made to production mail server serving ~20,000 mailboxes at a rate of 36GB per day.
See comment 1 in bug #168196 for the .indirect scripts usage If this is a big performance issue, we could add a USE flag to enable/disable LOGINRUN handling?
Is any interest in getting this done these days? If yes, can I see some patch for upstream/Gentoo? Thank you
Please provide that patch if you still has it Thanks