[CentOS] Expunge Old Email

Fri Sep 30 15:01:43 UTC 2011
John Hinton <webmaster at ew3d.com>

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