For those of you running mailservers on CentOS 6, what are the suggestions for programs to expunge old email? For instance, deleting email from a Spam folder that is 2 weeks old or older. I see that Dovecot does have a solution, but was wondering about what others have landed on. My systems are basically Postfix, Dovecot using Maildir. Thanks, John Hinton
On 9/27/2011 8:31 AM, John Hinton wrote:> For those of you running mailservers on CentOS 6, what are the > suggestions for programs to expunge old email? For instance, deleting > email from a Spam folder that is 2 weeks old or older. > > I see that Dovecot does have a solution, but was wondering about what > others have landed on. > > My systems are basically Postfix, Dovecot using Maildir. > >To answer myself-- At least some of the Dovecot 1.x Expunge Plug-in has made it into the 2.0 release... so no need to install/activate any plugins for this to work. I'm running a cron once per day with the following command: doveadm expunge -A mailbox Spam savedbefore 10d There are a number of options to this command. The one above, looks in all (-A) user's Maildirs for a Spam mailbox and deletes any older than 10 days. So far so good! It is particular about permissions and you might have a few things to clean up to get it working. It looks like if it trips, it stops. I'm running this on two new CentOS 6 servers which don't have many users yet... so not much spam yet... so not much debugging yet. Early testing on personal accounts set at 2d did show successful removal. As a side note... Since Outlook has chosen to pretty much hide and only use the term Expunge to empty trash on IMAP accounts (and average email users don't find it and don't know what expunge means).... We're seeing a lot of trash left behind. A reinforcement of my opinion of M$ wisdom... Anyway, so we are now contemplating putting into place automated trash email removal as well.... as much as I feel this is outside of what should be good practices. -- John Hinton 877-777-1407 ext 502 http://www.ew3d.com Comprehensive Online Solutions
On 27/09/2011 13:31, John Hinton wrote:> For those of you running mailservers on CentOS 6, what are the > suggestions for programs to expunge old email? For instance, deleting > email from a Spam folder that is 2 weeks old or older. > > I see that Dovecot does have a solution, but was wondering about what > others have landed on. > > My systems are basically Postfix, Dovecot using Maildir. > > Thanks, > John Hinton > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centosI just use a daily cron job with regex, never had much luck with dovecots method: # delete 30 day old mails from Trash find /var/mail/ -regex '.*/\.\(Trash\|Junk\)\(/.*\)?\/\(cur\|new\)/.*' -type f -ctime +30 -exec rm '{}' \; # delete 200 day old mails from mailinglists find /var/mail/ -regex '.*/\.\(Fedora\|Atrpms\|Centos\|Mythtv\)\(/.*\)?\/\(cur\|new\)/.*' -type f -ctime +200 -exec rm '{}' \; cheers Dunc
On Tue, 2011-09-27 at 08:31 -0400, John Hinton wrote:> For those of you running mailservers on CentOS 6, what are the > suggestions for programs to expunge old email? For instance, deleting > email from a Spam folder that is 2 weeks old or older. > I see that Dovecot does have a solution, but was wondering about what > others have landed on.Cyrus IMAP supports an "expire" annotation on folders that allows automatic cycling out of messages after the indicated number of days. <http://cyrusimap.web.cmu.edu/>