On Mon, Oct 18, 1999 at 11:26:18 +0200, Dirk Huebner wrote:
> this is just another addition to the other solutions :-)
> Perhaps using "folder-hooks" would also be an appropriate solution for
> you. In my case it is the perfect way. 
> I use the following:
> 
> folder-hook =trash 'push T~r>2w!~F\n\;<delete>\x'

Replace "<delete>" with "<delete-message>" to avoid the first
error message.

> This one deletes all mails older than 2 weeks when entering the
> trash-folder. 

... all mails older than 2 weeks (~r>2w)
    which are not flagged (!~F).

But take care! If no mails match the pattern, then the tag-prefix
(\;) will have no effect, and what happens to be the current
message will be marked for deletion. In this case it will not get
deleted because of the finishing exit command (\x) which lets mutt
exit without modifying the mailbox. But if it is removed, you risk
to delete the wrong mail!

It is much safer to use the delete-pattern command:

    folder-hook =trash 'push D~r>2w!~F\n'

> Or:
> 
> folder-hook =lists/mutt 'push T~r>2w!~F\n\;s=lists/mutt_backup\n\x'
> 
> This one saves 2week old mails from mutt-users to mutt_backup.

Again if no mails match the pattern (older than 2 weeks and not
flagged), a wrong mail is copied to mutt_backup (but again not
deleted because of the exit command).

I don't know any good fix for this.

-- 
Byrial

Reply via email to