[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Automating IMAP email maintenance



> > Andy Saxena wrote:
> > >Hi,
> > >
> > >I use Cyrus as my IMAP server. When I transfer email from my ISP to
> > >Cyrus I use a procmail recipe. Before any of the procmail rules are
> > >applies I backup all email into a backup folder. I would like to be
able
> > >to run a cron job to automatically delete messages from this backup
> > >folder.

I was given this procmail recipe for backing up email and deleting older
messages from the backup.  It didn't work for me, the mail didn't get
deleted.  But, if it's useful to you, maybe somebody who understands
procmail and sed more than I do can find the problem.  As I recall, it saves
the messages in a directory but fails to delete the older ones.  (It's
supposed to save only the last 32 messages.)  Not exactly what you asked
for, but seems close.

:0 c
mail/zbackup
:0 ic
| cd mail/zbackup && rm -f dummy `ls -t msg.* | sed -e 1,32d`



Reply to: