Is there a way in Horde to automatically delete messages that are a certain amount of days old for the webmail? Or is there a script that can be run via cron to do this?
Check out the Horde IMP documentation
http://wiki.horde.org/Doc/Home?referrer=WikiHome
I didn’t see anything during a quick search but you may have more time than I invested. Also you may be able to suggest a new plugin to the developers.
Thanks Tim, I have looked all over in the Horde application an found nothing… I will check the doc’s that you referenced. If I don’t find anything I will probably suggest a plugin as this would be kind of nice to have (I have at least one customer that would like this functionality).
May be you already know about this, but just FYI.
You can delete mails that are X days old via the mail client softwares like Thunderbird, Outlook Express etc.
[quote=tiger;13236]May be you already know about this, but just FYI.
You can delete mails that are X days old via the mail client softwares like Thunderbird, Outlook Express etc.[/quote]
Yep, I know this… but when someone wants a POP3 account available (use webmail to send mail from when away from mail client) that copies messages to another mailbox, they must delete all messages from the original account if they are concerned about storage space.
As a workaround I have already informed this customer that he could set up Thunderbird to download from both accounts (automatically deleting messages from the original mailbox after 1 day) and set up a filter for the original mailbox to send these messages to the Trash.
I have heard of a script (for another Control Panel) that will allow a user to delete POP3 messages via a cron job. Something like this would be nice.
jeffu,
There are scrips around to do this!
i.e. cleanup-maildir (http://svn.houseofnate.net/unix-tools/trunk/cleanup-maildir).
Haven’t tried it myself though…
-tsl-
[quote=tsl;13243]jeffu,
There are scrips around to do this!
i.e. cleanup-maildir (http://svn.houseofnate.net/unix-tools/trunk/cleanup-maildir).
Haven’t tried it myself though…
-tsl-[/quote]
Thanks tsl, this is the kind of script I am looking for. I will see what I can do with this.
I have a client that is using mainly POP3, but goes to webmail first to do the learn ham and spam. Ideally what they want is all email that is flagged by spamassassin as spam to go to the spam box which of course they can’t see via POP3, but they can check it out when they log into webmail.
What they want to do is any email in the spam box that has been there for more than a week to be automatically deleted, either that or just delete the spam box once a week at a certain time.
So first I just have to instruct them to create a folder call “Spam” via the webmail interface and then have to see about using some kind of cleanup program.
So how did this work program above work out for anyone who tried it?
I tried using this script, but was unable to get it working. I haven’t had time to figure this out yet.
Script works great for me.
Im running it the following way:
./cleanup-maildir --maildir-root="/home/account/var/account.com/mail/user/Maildir" --age=7 delete 'Spam' 'trash'
This will delete everything that is more than 7 days old in the Spam and Trash folders for the user in the maildir-root path.
This also brings up another question, is there a way to run an expunge on webmail directories with a cron?
What I did now was make another bash script to call the cleanmail program.
for X in postmaster user1 user2 user3
do
if [ -e "/home/account/var/account.com/mail/$X/Maildir/.Spam" ]; then
echo "Cleaning Spam Folder for $X"
./cleanup-maildir --maildir-root="/home/account/var/account.com/mail/$X/Maildir" --age=7 delete 'Spam'
else
echo "No Spam Folder for $X"
fi
echo ""
done
This is still pretty basic. Maybe in the future I will use a command line PHP script and just scan the mail/ directory for all the inboxes instead of manually listing them like I do above.