On Tue, Jun 16, 2009 at 7:15 PM, Spiro Harvey spiro@knossos.net.nz wrote:
Anyone here familiar with Cyrus IMAP and its util ipurge?
We'd like to set auto deletion of our users' spambox folders, but I'm a bit paranoid about its functionality.
The main things that confuse me are from the man page:
"Ipurge deletes messages from the mailbox(es) specified by mailbox-pattern"
with no indication as to what defines "mailbox-pattern"
Second:
"Ipurge by default only deletes mail below shared folders, which means that mails in mail- box(es) below INBOX.* and user.* stay untouched. Use the option -f to also delete mail in mailbox(es) below these folders."
What's a "shared folder"?
OK, so the format of a Junk mail folder is:
user/spiro/Junk@knossos.net.nz
and I've successfully done:
$ ipurge -f -d 90 user/spiro/Junk@knossos.net.nz Working on user/spiro/Junk@knossos.net.nz... total messages 21 total bytes 187742 Deleted messages 16 Deleted bytes 138324 Remaining messages 5 Remaining bytes 49418
however, without the -f, it did nothing, even though I was explicitly supplying a folder. Clearly I misunderstand what the man page is trying to tell me.
I'd like to set up a proper "pattern" to purge all spamboxes correctly via the cyrus.conf, because at the moment, I've got an awk script that generates a list of email addresses and produces a list in the format of user/userid/Junk@domain. I could then go over that list and run an ipurge for each one, but if anything happens that causes that list to be corrupted, I'm afraid of deleting the wrong mail. or worse. :(
according to what I've gathered, the line:
purgespam cmd="ipurge -f -d 90 user/%/Junk@*" at=0430
should work when put in cyrus.conf's Events section, but I can't confirm these wildcards. Some results on google just refer to * for the mailbox name, but none seem to include the domain as part of the string.
Can anyone here shed some light?
Can't help much with ipurge. I never did like how it works. I have chosen a different approach using the cyradm mboxconfig command to set the expire option on each mailbox as needed. The 'expire' option is set-it-and-forget-it. Yet this approach lacks managability. There is no quick and easy way to survey all of your user mailboxes to check the expire option settings.
Jeff