Scripts I run to keep ArGoSoft Mail Server running (not crashing or locking up)

67 views
Skip to first unread message

Scott Keen

unread,
Aug 11, 2018, 12:50:10 PM8/11/18
to ArGoSoft Products
RUN ONCE A DAY

delete-logs.bat
@echo off

rem
*** Delete MailServer.NET log files older than 7 days ***
forfiles
-p "C:\Program Files\ArGo Software Design\ArGoSoft Mail Server .NET\_logs" -s -m ms*.log /D -7 /C "cmd /c del @path"

exit


restart-services.bat
@echo off

rem
*** ClamAV ***
net stop
FreshClam
net stop
ClamD
net start
ClamD
net start
FreshClam

exit


sa-update.bat
@echo off

rem
*** Update SpamAssassin ***
net stop
SpamD
sa
-update.exe -v --no-gpg --channelfile UpdateChannels.txt
net start
SpamD

exit



RUN EVERY 12 HOURS

restart-mail-server.bat
@echo off

rem
*** Restart MailServer.NET ***
net stop
ArGoSoftMailServerNet
net start
ArGoSoftMailServerNet

exit



Scott Keen

unread,
Aug 11, 2018, 12:57:24 PM8/11/18
to ArGoSoft Products
I suppose I could put all the "once a day" scripts into a single .bat file but I'd want to make sure that one process doesn't fail the rest of the script from running. Seemed more compartmentalized to have a separate .bat for each process.

Message has been deleted

Ken Poulsen

unread,
Aug 11, 2018, 1:27:21 PM8/11/18
to ArGoSoft Products
How much ram is ClamAv use at you? here its 560MB (only have 4 GB in my server, maby i should find another stick of 4 GB)

Scott Keen

unread,
Aug 11, 2018, 2:41:04 PM8/11/18
to ArGoSoft Products
Very, very minimal. I'm running the clamd.exe daemon in Windows Services

100K-400K

My entire mail server is running Windows Server 2008 on 1 GB RAM. It doesn't run anything else, it's just a mail server.

Scott Keen

unread,
Aug 12, 2018, 8:35:28 PM8/12/18
to ArGoSoft Products
Just looked at my Task Manager after I rebooted the server about 14 hours ago. Looks like the clamd.exe *32 process is using around 253 MB. It was just using 100K-400K when the server was rebooted, but after running for 14 hours it's now up to 253 MB. That's probably why I ran a script to restart ClamAV and SpamAssassin every 24 hours. I might want to increase that frequency to every 6 hours (4x day).

ArGoSoft Products

unread,
Aug 13, 2018, 7:45:03 AM8/13/18
to ArGoSoft Products
I am not really sure about this, but I saw couple of notes that SpamAssassin does its own virus checking through clam antivirus, so, if you are using SpamAssassin, perhaps, running emails through Clam Antivirus is not that useful after all, so, possibly, it makes sense to disable it.
Reply all
Reply to author
Forward
0 new messages