2019-09-20 - hschneider, Admin
Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.
XMail Forum · Newbies read here ! All about SMTP,MX-Records,DNS etc. | Help Search Members Calendar |
Welcome Guest ( Log In | Register ) | Resend Validation Email |
cmyk |
Posted: Jul 2 2004, 09:27 AM
|
Member Group: Members Posts: 76 Member No.: 462 Joined: 13-February 03 |
hi all,
i searched the forum and google for something like this, but i couldn't find anything. sorry, if this has been asked before... i am looking for a script, that could be called by cron.daily and which deletes all emails older than 1 month. cheers, phil |
hschneider |
Posted: Jul 2 2004, 09:52 AM
|
||
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Untested, but this should work:
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
||
cmyk |
Posted: Jul 2 2004, 10:22 AM
|
Member Group: Members Posts: 76 Member No.: 462 Joined: 13-February 03 |
cool. thanks, harald!
|
hschneider |
Posted: Jul 2 2004, 10:24 AM
|
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Just merged 2 older scripts to this one. Pls give some feedback when tested.
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
cmyk |
Posted: Jul 2 2004, 10:31 AM
|
Member Group: Members Posts: 76 Member No.: 462 Joined: 13-February 03 |
umm... actually i was looking for something which deletes old messages, left on the server in the domains directory, not the spool directory. i have a clean-frozen-messages-script.
i am absolutely *not* familiar with perl. :-( phil |
hschneider |
Posted: Jul 2 2004, 10:37 AM
|
||
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
I see ... then this one is offtopic here Try this, but backup before testing:
Now you have both ... -------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
||
hschneider |
Posted: Jul 2 2004, 10:41 AM
|
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Just fixed a small bug:
if ($path =~ /Maildir\/new/) { instead of if ($path =~ /MailDir\/new/) { -------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
cmyk |
Posted: Jul 2 2004, 11:03 AM
|
||
Member Group: Members Posts: 76 Member No.: 462 Joined: 13-February 03 |
hehe...
missing a "'" ? but i guess, that line and the comments above was the only thing you changed... :-) will test and report! |
||
hschneider |
Posted: Jul 2 2004, 01:18 PM
|
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Thanks. No, this is not the only line I've changed. Pls copy the whole script.
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
cmyk |
Posted: Jul 2 2004, 01:46 PM
|
Member Group: Members Posts: 76 Member No.: 462 Joined: 13-February 03 |
right! :) should have looked more closely.
anyways... it's running great so far! i've tested it commenting out the unlink line. just to play it save. it listed the correct messages to be removed. perfect! harald, thank you! phil |
cmyk |
Posted: Jul 2 2004, 02:02 PM
|
Member Group: Members Posts: 76 Member No.: 462 Joined: 13-February 03 |
oh yeah... and just to play it safe...
here's the "script" in /etc/cron.daily/ ------------------------------------------------------ #!/bin/sh /usr/sbin/xpurgemaildir.pl /usr/sbin/xpurgespool.pl ------------------------------------------------------ i guess that's okay? phil |
hschneider |
Posted: Jul 2 2004, 03:02 PM
|
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
It is. Thx 4 testing.
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
sc4vengr |
Posted: Jul 7 2004, 03:54 PM
|
||||||
Professional Group: Members Posts: 206 Member No.: 461 Joined: 12-February 03 |
Hi guys
Am i doing something wrong?
both files are the same size, nothing has been removed?
Redhat 8.0, Xmail-1.20 thanks in advance fred -------------------- You + webcam - clothes - dignity = $
|
||||||
hschneider |
Posted: Jul 7 2004, 05:26 PM
|
No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Huh? This removes files by date, not by size ...
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
sc4vengr |
Posted: Jul 7 2004, 06:06 PM
|
Professional Group: Members Posts: 206 Member No.: 461 Joined: 12-February 03 |
Yeah i know Harald, i meant that all the files under domains/ are the same as before running the script. Nothing has been changed nor removed.
This creates a text file with all the files under current dir: [root@mail domains]# find . > /mailsrv/logtools/oldtree and then a ran the script and did the same command as above: [root@mail domains]# find . > /mailsrv/logtools/newtree and i have compared the two files, they are identical. fred -------------------- You + webcam - clothes - dignity = $
|