[Dovecot] doveadm purge on clusterfs
Since doveadm service proxying apparently doesn't work with dovecot v2.0, we need to find a way to safely run doveadm purge on the host the user is logged into.
Would it be OK to run purge in the pop/imap postlogin scripts? We already do a conditional:
test /var/log/activemailaccounts/imap/$USER -ot /var/log/activemailaccounts/today then touch /var/log/activemailaccounts/imap/$USER fi
so adding a:
doveadm purge -u $USER
in this section would make it run once every day the users that log in. Does that sound like an OK solution?
-jf
On 27.3.2012, at 12.47, Jan-Frode Myklebust wrote:
Would it be OK to run purge in the pop/imap postlogin scripts? We already do a conditional:
test /var/log/activemailaccounts/imap/$USER -ot /var/log/activemailaccounts/today then touch /var/log/activemailaccounts/imap/$USER fi
so adding a:
doveadm purge -u $USER
in this section would make it run once every day the users that log in. Does that sound like an OK solution?
Yeah, should work fine. Or you should make it run in background so user's login won't slow down because of the purging. I'm not sure if simply adding & at the end works (or if the process dies after login is finished, or what happens if it runs over 30 secs which is when normally post-login script is killed by SIGALRM).
participants (2)
-
Jan-Frode Myklebust
-
Timo Sirainen