Saturday, July 9, 2011

Gnus Tip: Deleting Incoming mail files automatically

When Gnus reads in incoming mail, it stores a copy of the slurped file as Incomingxxxx in the ~/Mail folder as a backup.  These files get deleted by default after 10 days.  If you need to change it to something else or delete it immediately upon reading into Gnus, add the following to your .gnus or gnus.el file.

;;if retrieving from spool, delete temp file after 1 day(s)
(setq mail-source-delete-incoming 1) ;; change 1 to t to immediately delete or any number
(setq mail-source-delete-old-incoming-confirm nil)

More information on these and other options can be found in the Mail Source Customization in the Gnus Manual.

qmailPGP & GPG: Email for the Practical ParanoidThe Book of IMAP: Building a Mail Server with Courier and Cyrus