[Dovecot] Imap logout message on Dovecot restart
I'm trying to receive a "Disconnected" message in my logfile for the connected imap-clients when I restart dovecot.
When you disconnect a client, you receive the following message in your log:
Mar 12 21:45:55 mail dovecot: IMAP(mailbox@domain.com): Disconnected: Logged out bytes=7496/22441
When a IMAP client is connected and Dovecot is restarted, this message is not shown.
This should be solvable by a script like this:
#!/bin/sh unset LOG_TO_MASTER export USE_SYSLOG=1 exec /usr/lib/dovecot/imap
But this logs the user that runs the script into the imap server and when I terminate this terminal I get a "Disconnected" message for the local linux user, which I don't need of course.
Is there a way to get to what I want ? I want to log my IMAP statics for every day and I need to "disconnect" my imap clients for it in some way to receive the Disconnected message and count from there.
Thanks.
On Thu, 2009-03-12 at 21:50 +0100, RutgerM wrote:
#!/bin/sh unset LOG_TO_MASTER export USE_SYSLOG=1 exec /usr/lib/dovecot/imap
But this logs the user that runs the script into the imap server and when I terminate this terminal I get a "Disconnected" message for the local linux user, which I don't need of course.
I don't really understand what you mean by this. It should log everything the exact same way, except directly to syslog.
Is there a way to get to what I want ? I want to log my IMAP statics for every day and I need to "disconnect" my imap clients for it in some way to receive the Disconnected message and count from there.
Actually I just realized there is a simple way:
killall imap
participants (2)
-
RutgerM
-
Timo Sirainen