Removing Old Logs

Discussions on webmail and the Professional version.
mdj1
Posts: 46
Joined: Mon Jan 24, 2005 5:48 pm

Removing Old Logs

Post by mdj1 »

I've tried to seach here there and everywhere, but to no avail.

Is there a setting that purges all the ME log files after X days as its filling my harddrive!
Regards.

Mark

MailEnable-Ben
Posts: 5858
Joined: Fri Jan 16, 2004 6:49 am
Location: Melbourne

Post by MailEnable-Ben »

I usually just configure a batch file that runs on a schedule.
Regards,

Product Services
MailEnable Pty Ltd

To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.

mdj1
Posts: 46
Joined: Mon Jan 24, 2005 5:48 pm

Post by mdj1 »

Hi There,

Could you give us an example of this?
Regards.

Mark

MailEnable-Ben
Posts: 5858
Joined: Fri Jan 16, 2004 6:49 am
Location: Melbourne

Post by MailEnable-Ben »

net stop meimaps
del "C:\Program Files\Mail Enable\Logging\smtp\*.*,y
net start meimaps
net stop mepops
del "C:\Program Files\Mail Enable\Logging\pop\*.*,y
net start mepops

This will delete all the logs for smtp and pop
Regards,

Product Services
MailEnable Pty Ltd

To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.

iamme
Posts: 53
Joined: Wed Nov 10, 2004 10:39 am

Post by iamme »

Hi,

You could also download a copy of "fileremover".

Then setup the batch file to run (see below)

Just google "fileremover". It is the first result.

Cheers Steve

fileremover 8 *.log C:\Program Files\Mail Enable\Logging\HTTPMAIL
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\IMAP
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\LS
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\MEAVgen
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\MTA
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\MTAFilter
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\POP
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\POPC
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\SF
fileremover 8 *.log C:\Program Files\Mail Enable\Logging\SMTP

MailEnable-Ben
Posts: 5858
Joined: Fri Jan 16, 2004 6:49 am
Location: Melbourne

Post by MailEnable-Ben »

Have you tested the fileremover in this manner Steve does it handle the fact that the services will have some of the files locked, preventing the deletion?
Regards,

Product Services
MailEnable Pty Ltd

To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.

iamme
Posts: 53
Joined: Wed Nov 10, 2004 10:39 am

Post by iamme »

Hey Ben,

Well yes and no.

No because I haven't, but yes because if you add the criteria "path to program - # of days old to delete - What to delete - Path of the file/s to delete, as in my batch file in prevuous post, and as long as the criteria for # of days old to delete is greater than 1 then it won't be locked, will it?

Hope that makes sense.

Cheers Steve

MailEnable-Ben
Posts: 5858
Joined: Fri Jan 16, 2004 6:49 am
Location: Melbourne

Post by MailEnable-Ben »

Yep cool that makes sense and will work, should have realised what the 8 was - cheers.
Regards,

Product Services
MailEnable Pty Ltd

To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.

mdj1
Posts: 46
Joined: Mon Jan 24, 2005 5:48 pm

Post by mdj1 »

Hi Guys,

The link is here and it has a nifty bit about mailenable

http://www.chenry.com/fileremover/
Regards.

Mark

MailEnable-Ben
Posts: 5858
Joined: Fri Jan 16, 2004 6:49 am
Location: Melbourne

Post by MailEnable-Ben »

Thanks Mark thats great :D
Regards,

Product Services
MailEnable Pty Ltd

To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.

MrByte
Posts: 663
Joined: Tue Nov 11, 2003 5:33 pm
Location: Florida, USA

Post by MrByte »

Mark, nice little nifty util :D
.MrByte

mdj1
Posts: 46
Joined: Mon Jan 24, 2005 5:48 pm

Post by mdj1 »

Don't thank me.

I just asked the question, got some answers from the other poster. Im supprised its not come up before though.
Regards.

Mark

whizzbang
Posts: 22
Joined: Tue Dec 27, 2005 11:22 am

Post by whizzbang »

Hi all

Any idea what happened to the scipt that was available at www.chenry.com?

If anyone has a copy, would they email it me at wizard AT sybaweb.com

TIA
Peter

MailEnable-Ben
Posts: 5858
Joined: Fri Jan 16, 2004 6:49 am
Location: Melbourne

Post by MailEnable-Ben »

Hi guys I found a new util that will auto delete your logs as it seems the link in this thread is now defunct.

Here is a new web site;

http://www.freewarefiles.com/

The name of the application is;

FileDelete24
(copy filedelete24.exe to \mailenable\bin)

And here is a batch file you can run from scheduler to delete the logs older than 7 days old. The paths will have to be edited if you have changed the MailEnable paths from default.

Code: Select all

filedelete24 "C:\Program Files\Mail Enable\Logging\httpmail" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\imap" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\ls" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\mta" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\pop" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\popc" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\radms" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\sf" *.log 7
filedelete24 "C:\Program Files\Mail Enable\Logging\smtp" *.log 7
Regards,

Product Services
MailEnable Pty Ltd

To keep track of all ME company updates and version releases you should subscribe to the MailEnable list at http://www.mailenable.com or the RSS feed http://www.mailenable.com/rss.

slickuser
Posts: 1
Joined: Thu Feb 16, 2012 11:29 pm

Re: Removing Old Logs

Post by slickuser »

The filedelete24 method did not work for me. Here is another solution using the windows tool "forfiles" http://technet.microsoft.com/en-us/libr ... S.10).aspx.

In a batch file you can remove all log files not within the last 7 days by using:

forfiles /s /p "C:\Program Files (x86)\Mail Enable\Logging" /m *.log /d -7 /c "cmd /c del @PATH"

This will recursively track down all .log files that are older than 7 days and delete them.

You can delete the different logging folders separately using:

forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\httpmail" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\imap" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\ls" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\mta" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\pop" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\popc" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\radms" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\sf" /m *.log /d -7 /c "cmd /c del @PATH"
forfiles /p "C:\Program Files (x86)\Mail Enable\Logging\smtp" /m *.log /d -7 /c "cmd /c del @PATH"

Read the Microsoft link to review the functionality of forfiles.

Post Reply