Re: [exim] Auto Purge of specific mail

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: cfaust-dougot
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Auto Purge of specific mail
Thanks Ted, this sounds like it's the route I should go - I didn't realize until your post that each message is a file on the filesystem and I should just be able to use that date to determine the delete.

Is there any way to query exim for a list of domains and then a list of accounts for a specific domain (or even just all the accounts, I could get the domain from the email).

I see the ".spam" folder in "/home/me/mail/me.com/account/.spam/cur" - If I could somehow query the list of domains and list of accounts I could cron a little perl script that would just go through each domain and each users spam directory, stat the file and kill anyting older then 60 days.

Worse case I would just have to maintain that data outside of exim which wouldn't be fun but it's at least doable.

Thanks!
-Chris

________________________________

From: exim-users-bounces@??? on behalf of Ted Cooper
Sent: Wed 3/25/2009 7:15 PM
To: exim-users@???
Subject: Re: [exim] Auto Purge of specific mail



cfaust-dougot wrote:
> Folks,
>
> I've got 60+ domains all running under WHM and CPANEL using Exim to handle the mail.
>
> I'm using SA and SpamBox to have all the tagged spam messages get added to a SPAM folder on the server.
>
> My question is, can someone help me or point the way to some help in getting a process in place that can traverse all these domains and delete any mail in the spam directory that is older then 60 days?
>
> TIA!
> -Chris


If you use Maildir format, easy using tools available on the system.

You may blow out the command line length with this depending on how many
domains and users you have - to get around this you might need a
separate program that iterates into each of the directories before
running ...

find /path/to/mailroot/*/*/.SPAM -daystart -mtime +60 -exec rm -R {} \;

(the path changes to . if you use a separate program to get into the
directory first)

If you're using one of the other mail formats, you'll be restricted to
using the mail tools. IMAP/POP connected to thunderbird might be enough,
but you'd have to have it accessing everyones email :P


--
The Exim Manual
http://www.exim.org/docs.html
http://docs.exim.org/current/

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/