<div class="gmail_quote">On Tue, Jun 16, 2009 at 7:15 PM, Spiro Harvey <span dir="ltr"><<a href="mailto:spiro@knossos.net.nz">spiro@knossos.net.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Anyone here familiar with Cyrus IMAP and its util ipurge?<br>
<br>
We'd like to set auto deletion of our users' spambox folders, but I'm a<br>
bit paranoid about its functionality.<br>
<br>
The main things that confuse me are from the man page:<br>
<br>
"Ipurge  deletes  messages from the mailbox(es) specified by<br>
mailbox-pattern"<br>
<br>
with no indication as to what defines "mailbox-pattern"<br>
<br>
Second:<br>
<br>
"Ipurge  by  default  only  deletes mail below shared folders, which<br>
means that mails in mail- box(es) below INBOX.* and user.* stay<br>
untouched. Use the option -f to  also  delete  mail  in mailbox(es)<br>
below these folders."<br>
<br>
What's a "shared folder"?<br>
<br>
OK, so the format of a Junk mail folder is:<br>
<br>
user/spiro/<a href="mailto:Junk@knossos.net.nz">Junk@knossos.net.nz</a><br>
<br>
and I've successfully done:<br>
<br>
$ ipurge -f -d 90 user/spiro/<a href="mailto:Junk@knossos.net.nz">Junk@knossos.net.nz</a><br>
Working on user/spiro/Junk@knossos.net.nz...<br>
total messages                   21<br>
total bytes                      187742<br>
Deleted messages                 16<br>
Deleted bytes                    138324<br>
Remaining messages               5<br>
Remaining bytes                  49418<br>
<br>
<br>
however, without the -f, it did nothing, even though I was explicitly<br>
supplying a folder. Clearly I misunderstand what the man page is trying<br>
to tell me.<br>
<br>
I'd like to set up a proper "pattern" to purge all spamboxes correctly<br>
via the cyrus.conf, because at the moment, I've got an awk script that<br>
generates a list of email addresses and produces a list in the format of<br>
user/userid/Junk@domain. I could then go over that list and run an<br>
ipurge for each one, but if anything happens that causes that list to<br>
be corrupted, I'm afraid of deleting the wrong mail. or worse. :(<br>
<br>
according to what I've gathered, the line:<br>
<br>
purgespam   cmd="ipurge -f -d 90 user/%/Junk@*" at=0430<br>
<br>
should work when put in cyrus.conf's Events section, but I can't<br>
confirm these wildcards. Some results on google just refer to * for the<br>
mailbox name, but none seem to include the domain as part of the string.<br>
<br>
Can anyone here shed some light?<br></blockquote></div><br>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.<br>
<br>Jeff<br>