Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
(c) wogri@google.com 2015

Disclaimer: This is not an official Google product! This is the spare time
project of a googler.

This is a script to go through dovecot mailboxes and snooze mails until a given
time.  

Works like this:

Once you have a predefined set of folders (see below on how to
subscribe your user to these folders), this script will go through the
folders every minute (after setting up a cron-job) and add an IMAP label
on the nested messages. The label will be called something like "MoveAt123456789",
where the number is the timestamp in which when the mail should be moved back
into the users inbox. So when you drag a mail into one of these folders it will
stay there until the MoveAt Timestamp has been reached, and then the script
will remove the IMAP label and move the mail back into the user's inbox and
mark as new. Run the script from cron every minute like this:

./dovecot-snooze.py user1 user2 user3

Add -h for more help.

Example /etc/crontab entry:
* * * * *   root  /usr/local/sbin/dovecot-snooze.py maryjane

The separator syntax for your 'Snooze' folder can be a dot or a slash depending
on your dovecot configuration. Be sure to update the paths in the 'FOLDERS' array
to match your user's mailbox tree.

to subscribe a new user:
$ user=maryjane
doveadm mailbox create -s -u $user 'Snooze'
doveadm mailbox create -s -u $user 'Snooze.Until Friday 18:00'
doveadm mailbox create -s -u $user 'Snooze.Until Monday 7:00'
doveadm mailbox create -s -u $user 'Snooze.Until 7:00'
doveadm mailbox create -s -u $user 'Snooze.Until 18:00'
doveadm mailbox create -s -u $user 'Snooze.For 1 Hour'

more documentation on http://www.wogri.com/scripts/dovecot-snooze/

About

No description, website, or topics provided.

Resources

License

Releases

No releases published

Packages

No packages published

Languages