ipurge with virtual domains

Robin M. robin at primus.ca
Mon Apr 19 23:38:01 EDT 2004


On Mon, 19 Apr 2004, Robin M. wrote:
> On Mon, 19 Apr 2004, Robin M. wrote:
>
> > How can I use ipurge to delete mail from a trash folder called
> > "Deleted Items" for all users in all domains using ipurge.
> >
> > The following command succesfully works, but I cannot figure out how to
> > wildcard the domain name portion.
> >
> > ./ipurge -f -d 7 "user/%/Deleted Items at draftmail.org"
> >
> > I have tried unsuccessfull commands such as
> >
> > ./ipurge -f -d 7 "user/%/Deleted Items"
> > ./ipurge -f -d 7 "user/%@draftmail.org/Deleted Items"
> > ./ipurge -f -d 7 "user/%@%/Deleted Items"
> > ./ipurge -f -d 7 "user/%/Deleted Items@%"
> > ./ipurge -f -d 7 "user/%/Deleted Items%"
> >
> >
> > I have the following items in my /etc/imapd.conf
> > unixhierarchysep: yes
> > altnamespace: yes
> > virtdomains: userid
> > defaultdomain: localdomain
> >
> >
> reply to myslelf.
>
> After researching the archives a bit (pity people have to top-post) I
> found some information regarding the % character and teh * character.
>
> The % character is a wildcard for just the username part and the * is a
> wildcard for everything up to the folder. So my command is
>
> ipurge -f -b 1 "*/Deleted Items" "*/Junk E-mail"
>
Another reply to myself

For the command to work from /etc/cyrus.conf and to escape the folders
that contain spaces I used the following command in the events section

<snip>
cleanup cmd="ipurge -f -d 7 */Deleted\ Items */Junk\ E-mail" at=0400
</snip>




---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list