Greetings, We have a PHP based shell script that runs a doveadm backup routine. This script was running just fine, and then we turned on more logging for Dovecot (enabled the mail_log plugin). For some reason, once this was done, the shell script would run for a few minutes and then hang, as it added more log messages to the dsync STDOUT. Once the mail_log plugin was disabled, it ran without hanging. Is there any way to run doveadm and temporarily suspend the mail_log plugin? Or is there a better way to do this? Thanks for the insights. Asai -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20190227/4d062e42/attachment.html>
> On 27 February 2019 18:49 Asai via dovecot <dovecot at dovecot.org> wrote: > > > Greetings, > > We have a PHP based shell script that runs a doveadm backup routine. > > This script was running just fine, and then we turned on more logging for Dovecot (enabled the mail_log plugin). For some reason, once this was done, the shell script would run for a few minutes and then hang, as it added more log messages to the dsync STDOUT. Once the mail_log plugin was disabled, it ran without hanging. > > Is there any way to run doveadm and temporarily suspend the mail_log plugin? Or is there a better way to do this? > > Thanks for the insights. > > Asai >You might want to enable mail_log plugin for imap/pop3 protocols only. protocol imap { mail_plugins = $mail_plugins mail_log } protocol pop3 { mail_plugins = $mail_plugins mail_log } Aki
On Feb 27, 2019, at 11:00 AM, Aki Tuomi via dovecot <dovecot at dovecot.org> wrote:> > >> On 27 February 2019 18:49 Asai via dovecot <dovecot at dovecot.org> wrote: >> >> >> Greetings, >> >> We have a PHP based shell script that runs a doveadm backup routine. >> >> This script was running just fine, and then we turned on more logging for Dovecot (enabled the mail_log plugin). For some reason, once this was done, the shell script would run for a few minutes and then hang, as it added more log messages to the dsync STDOUT. Once the mail_log plugin was disabled, it ran without hanging. >> >> Is there any way to run doveadm and temporarily suspend the mail_log plugin? Or is there a better way to do this? >> >> Thanks for the insights. >> >> Asai >> > > You might want to enable mail_log plugin for imap/pop3 protocols only. > > protocol imap { > mail_plugins = $mail_plugins mail_log > } > > protocol pop3 { > mail_plugins = $mail_plugins mail_log > } > > AkiThank you, Aki, I will try that.
On 2/27/19 7:00 PM, Aki Tuomi via dovecot wrote:>> On 27 February 2019 18:49 Asai via dovecot <dovecot at dovecot.org> wrote: >> >> >> Greetings, >> >> We have a PHP based shell script that runs a doveadm backup routine. >> >> [...] the shell script would run for a few minutes and then hang, as it added more log messages to the dsync STDOUT. >> > You might want to enable mail_log plugin for imap/pop3 protocols only. >I would also log what the backup script is doing and go from there ? If PHP supports signal handling, you could also try to see if there's traceback library for PHP and attach the traceback functions to a system signal like SIGUSR1 in your backup script. You can send that signal from the command line (with kill) whenever you script hangs. This would give you the exact stack of function calls that lead to the hangup. If you want, you can check this archived page (https://archive.li/bi3rZ) (skip to Where was the program hanging ?). Although it's written for a python program, you can apply the same principles for PHP. Yassine.