Sieve scripting, delete all mails older than...

As title,

I'm playing with sieve, it is a powerful tool.

I have made a lot of script that automatically mark as read, move in folder, reply to some sender, ecc ecc…

Now I need a script that delete all emails older than 7 days in a specific folder.

Share you scripting if skills :mrgreen:

1 Reply

I answer to myself.

It is not possible to do this with sieve since sieve process the email while it arrives not after.

better do it in a cron job with this
> doveadm expunge -u myusername@mydomain.xxx mailbox myImapFolder savedbefore 4w
4w means 4 weeks.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct