aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/README.mold_remover
blob: bb650bf9bd0a8c322fea15de1113986f25603887 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Mold Remover

Mold Remover is a short python script which integrates with fetchmail 
<http://fetchmail.sourceforge.net/> and allows the user to specify the 
number of days that mail should remain on the pop3 server before being 
deleted. 

It is released under the GNU GPL <http://www.gnu.org/copyleft/gpl.html>.

Usage: 
Set up fetchmail to run with keep and uidl options.
Edit the mold_remover.py file to specify the mailserver address
and login/password details. Also specify the UIDL file created by
fetchmail (this is created automatically by fetchmail when uidl option
is selected in the fetchmailrc file usually at
/var/mail/.fetchmail-UIDL-cache). Remember to chmod the moldremover
script to 700 so that passwords cannot be read. Next, edit the field to
set how many days you want the mail to be left on the server. Lastly
create a script to run moldremover.py with python which can either be
run as a cron job or as part of your connection script. It is advisable
to stop fetchmail before mold remover is run and then to restart
fetchmail afterwards. Here is an example /etc/cron.daily/ script:

#!/bin/bash
/etc/init.d/fetchmail stop >> /var/log/messages
/usr/bin/python /usr/local/bin/mold_remover.py >> /var/log/messages
/etc/init.d/fetchmail start >> /var/log/messages

Please feel free to email me (jmstone@dsl.pipex.com) if you have any questions or bugfixes!

James Stone
s: RO Eric, As per your request, here is my recipie for dealing with e-mail popped off of a Novell server and told to be domanified. And example of the problem I used to have when I popped mail off of aa.clayton.edu From: User <AA/USER@aa.clayton.edu> Sendmail did not like that. Now it converts the above to From: User <USER@AA.clayton.edu> However, the To: and CC: lines still can get messed up To: aa/user2,@aa.clayton.edu aa/newcombe I'm not going to worry about that!!! I fixed it with this recipie in my .procmailrc :0 * ^From:.*<.*/.*@ { :0 fhw |sed -e 's/^From:\(.*\)<\(.*\)\/\(.*\)@.*/From:\1<\3@\2.clayton.edu>/' } It may not be the best, prettiest, or most efficient, but it works. Also, you'd asked me to send you the sometimes error message I get from fetchmail. I don't see one in my Mail/From file, so it must not have happened for a while. It looked something like Subject: Cron <root@mordor> /usr/local/bin/fetchmail: 29483 Hope your flight back was good. -Dan -- Dan Newcombe newcombe@mordor.clayton.edu "The fool who escaped from paradise will look over his shoulders and cry...So I'll hold my peace forever when you wear your bridal gown." -Marillion