[CentOS] Cyrus IMAP and ipurge

Spiro Harvey spiro at knossos.net.nz
Wed Jun 17 00:15:14 UTC 2009

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

with no indication as to what defines "mailbox-pattern"


"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 at knossos.net.nz

and I've successfully done:

$ ipurge -f -d 90 user/spiro/Junk at knossos.net.nz
Working on user/spiro/Junk at 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 at 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?

Spiro Harvey                  Knossos Networks Ltd
021-295-1923                    www.knossos.net.nz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20090617/49731dc8/attachment.sig>

More information about the CentOS mailing list