Koozali.org: home of the SME Server
Obsolete Releases => SME Server 6.x => Topic started by: nick on April 20, 2006, 11:58:52 AM
-
I have a client who asked me to implement a purge of mail on their server, with the criteria of it being over X days old, but also having been read.
I've been looking around for some scripts that might do this, but I haven't found anything that really fits my needs.
Does anyone have any recommendations of howtos that I could look at to get started, or know of anything that might allow me to do purging of messages from maildirs with different criteria?
-
nick
Wouldn't it just be easier to setup archiving in outlook or filters in Thunderbird to move messages to an archive folder or delete old e-mails ... that way at least you have control over the mail you delete off the system as you could very easily delete important mail.
I just setup filter rules in my Thunderbird in different folders to either move mail to a folder and out of general folders I just tell it to delete mail older the 60 days ... you can set this to what ever you like.
One thing though ... archive tool does not work in Outlook for IMAP only pop3 ... just a bit of a shortfall for MS.
Thunderbird handles IMAP a lot better then Outlook I found.
Regards,
Tib
-
nick
Wouldn't it just be easier to setup archiving in outlook or filters in Thunderbird to move messages to an archive folder or delete old e-mails ... that way at least you have control over the mail you delete off the system as you could very easily delete important mail.
I just setup filter rules in my Thunderbird in different folders to either move mail to a folder and out of general folders I just tell it to delete mail older the 60 days ... you can set this to what ever you like.
One thing though ... archive tool does not work in Outlook for IMAP only pop3 ... just a bit of a shortfall for MS.
Thunderbird handles IMAP a lot better then Outlook I found.
Regards,
Tib
I actually found a program which can do it, now I just need to integrate it..
the problem with older than 60 days deletion done by outlook is that they're a bit shallow, whereas with the program, (and IMAP especially) you can see read/unread, and other characteristics..
the program is this:
http://archivemail.sourceforge.net/
now I just need to run it via bash, with a little script, and cron. It can delete, skip unread, or even do backups, if I chose..
I already suggested the client side thing, but the company wants it done on the server, that and the fact that IMAP means webmail will work well for them also.
-
I already suggested the client side thing, but the company wants it done on the server,...
You can script removal of old read mail using something like:
cd ~user
find Maildir -type f -mtime +100 -name \*R\* | xargs rm -f
If we want to copy rather than delete, change the "xargs rm -f" bit of the script.
If you can't write the script your self, pay someone to do it. Remember that most "free" software is written by people who write code for a living.