Snatchmail is a tcsh script that uses fetchmail to download your POP3 email, keeps track of the time when each message was successfully downloaded and deletes it from the server after a configurable number of days.
Snatchmail is intended as a wrapper for fetchmail, so call it wherever you used to call the latter (e.g.: your crontab) and you’re set. Just make sure that your standard fetchmail config file (~/.fetchmailrc or $FETCHMAILHOME/fetchmailrc) only deals with POP3 servers, because Snatchmail only knows POP3. If you also use IMAP, simply move the IMAP stuff to a different config file and call fetchmail -f /path/to/imap.fetchmailrc to download IMAP mail.
Snatchmail comes pre–configured for a 7–day message retention on servers and silent operation. Edit the extensively commented source code to change these default values.
Although all my software is released without warranty, I can report that — after extensive testing — Snatchmail has never lost a single message (and that includes >3000 test messages, in addition to my regular mail). Snatchmail has been tested with fetchmail 6.3.17 (2010) and 6.3.26 (2013), but should work with any reasonably recent release.