Hi all I'm using fecthmail and I want to keep my mails on the main mail server for 4 days. But at the end of the 4th day they should be deleted automatically. So is it possible to do it with fetchmail? Actually I saw the "keep" parameter in the manuel but I think it is not sufficient alone. Thanks
Hi Eric, Try the following, in your .fetchmailrc add this section at the beginning: #--- cut --- # # defaults for all sessions (unless overridden) defaults proto pop3 fetchall no rewrite keep mda "/usr/bin/procmail -d %T" #--- cut --- This means that all messages will be kept on the server unless you override it on a per server basis. Launch fetchmail, using cron schedules: crontab -e And enter something like the following; check for mail every 20 mins, flush the msgs on the 4th day of the week. # -- cut -- # min,hour,day-o-month,month,day-o-week 0/20 * * * 0-3,5-7 /usr/bin/fetchmail 0 0 * * 4 /usr/bin/fetchmail -F 20,40 0 * * 4 /usr/bin/fetchmail 0/20 1-23 * * 4 /usr/bin/fetchmail # or for a check once an hour, at 10 past: #10 * * * 0-3,5-7 /usr/bin/fetchmail #10 0 * * 4 /usr/bin/fetchmail -F #10 1-23 * * 4 /usr/bin/fetchmail # -- cut -- (you may want pipe all the output from fetchmail into a log file, or you will get an email with the output everytime it runs). More details on the format of crontab are on: man 5 crontab Rgds, Simon -----Original Message----- From: Enis Büyükgüner [mailto:enis@bantboru.com] Sent: Tuesday, April 06, 2004 07:50 To: Suse-Linux-E@Suse. Com Subject: [SLE] fetchmail problem I'm using fecthmail and I want to keep my mails on the main mail server for 4 days. But at the end of the 4th day they should be deleted automatically. So is it possible to do it with fetchmail? Actually I saw the "keep" parameter in the manuel but I think it is not sufficient alone.
The Tuesday 2004-04-06 at 08:50 +0300, Enis Büyükgüner wrote:
I'm using fecthmail and I want to keep my mails on the main mail server for 4 days. But at the end of the 4th day they should be deleted automatically. So is it possible to do it with fetchmail? Actually I saw the "keep" parameter in the manuel but I think it is not sufficient alone.
Fetchmail fetchs everything, and if told, leaves (keep) everything on the server. There is no setting to selectively delete on the server email older than, say, four days. -- Cheers, Carlos Robinson
participants (3)
-
Carlos E. R.
-
Enis Büyükgüner
-
Simon Thornton