Snatchmail

Home

Snatchmail is a shell script that uses fetchmail to download your email, keeps track of the time when messages were successfully downloaded, then deletes them from the same POP3 server(s) after a configurable number of days.

Snatchmail works as a wrapper for fetchmail: it needs no configuration, just call it wherever you used to call fetchmail (e.g.: your crontab). Make sure your standard fetchmail config file (~/.fetchmailrc or $FETCHMAILHOME/fetchmailrc) only deals with POP3 servers, because snatchmail only knows POP3.

If you also use IMAP, either pass fetchmail a different fetchmailrc file (via snatchmail's -f option) or simply move the IMAP stuff to a different fetchmailrc file and call fetchmail -f /path/to/imap.fetchmailrc separately to download IMAP mail.

Snatchmail comes pre–configured for a 7–day message retention on servers, and silent operation. You can change these and other settings using command line options.

News

Version 0.8 — released on November 11, 2018 — includes the following improvements:

Test results

Although all my software is released without warranty, I can report that — after extensive testing with fetchmail 6.3.17 and later — snatchmail has never lost a single message (and that includes >3000 test messages, in addition to my regular mail).

Requires: Bash or ksh, fetchmail, OpenSSL or md5sum
“Snatchmail” is Copyright © Dario Niedermann
released with no warranty under the terms of the GPLv3 license.
Written and tested on Linux using GNU tools.
HomeNo Javascript iconValid HTML 4.01 StrictValid CSS!