@echo off
net use n: \\emialserver\drive\directory
FOR /f "TOKENS=*" %%F in ('dir /s /b /a-d n:\store\queue\*.eml^|find "" /c /v')
DO SET TOTAL=%%F
exit %TOTAL%
This is the batch file I used to exit error level with a count of .eml files in
our queue directory. It is recursive. Our queue directory consist of MANY
individual directories (I think corresponding to the time to retry).
Jason Passow Network Administrator
http://www.mwsco.com
[email protected]
ph: (507) 494-5178
fax: (507) 454-8104
Mississippi Welder Supply Co., Inc.
Please consider the environment before printing this email.
____________________________________________________________________________________________________________________________________________________________________________________________________________________________
The information contained in this message is privileged and intended only for
the recipients named. If the reader is not a representative of the intended
recipient, any review, dissemination or copying of this message or the
information it contains is prohibited. If you have received this message in
error, please immediately notify the sender, and delete the original message
and attachments.
From: dirk <[email protected]>
To: Servers Alive Discussion List <[email protected]>
Sent: 1/20/2016 11:15 AM
Subject: RE: [SA-list] Folder/File Monitoring
I think there might be a different way to monitor this. It will ofcourse
depend on the features of your mail server.
IF you're running a mailserver on Windows then it might have a perfmon counter
that shows the queue length
Most mailserver (independantly of the OS) can work with SNMP and have an SNMP
OID that gives the queue length
With one of those two options you can monitor to queue length.
Adding a recursive option to the file properties check *could* be an option
however we decided after some testing that there are too many possibilities for
"bad" use, "bad" use that spikes the CPU of the system you're checking, and as
such decided not to add a recursive option.
dirk
--------------------------------------------------------------------------------
From: Servers Alive Discussion List [mailto:[email protected]] On Behalf Of
Bob Hartung
Sent: Wednesday, January 20, 2016 3:15 PM
To: Servers Alive Discussion List
Subject: [SA-list] Folder/File Monitoring
Recently we had an email account on our mailserver compromised. Some spammer
had managed to get the password for an account and a flood of outbound emails
(50,000+) were in our mail queue before I was alerted about the problem. This
has happened to us a couple of times and it's remarkable how fast things get
unmanageable. At some point late the night before, the SPAM spigot was turned
on and by the time I got to the office, the mailserver had ground to a halt.
Our mailserver uses a \queue directory for outbound emails with individual
directories under \queue for each user account. Normally, this queue should be
empty or close to empty if everything is operating normally.
I'd like to setup a monitor in SA that would watch the overall size of the
queue directory and when a threshhold is exceeded, send a warning email. I have
used File Properties check before but the documentation says it is
non-recursive so it would not be able to check the entire directory structure.
Is there any other technique we could use to monitor a directory structure?
----------------------
Bob Hartung, Dir of I.T.
Wisco Industries, Inc.
736 Janesville St.
Oregon, WI 53575
Tel: (608) 835-3106 x215
Fax: (608) 835-7399 e-mail: bhartung(at)wiscoind.com
website: www.wiscomade.com
To unsubscribe send a message with UNSUBSCRIBE in the subject line to
[email protected]
If you use auto-responders (like out-of-the-office messages), make sure that
they are not sent to the list nor to individual members. Doing so will cause
you to be automatically removed from the list.
No virus found in this message.
Checked by AVG - www.avg.com (http://www.avg.com)
Version: 2016.0.7303 / Virus Database: 4522/11442 - Release Date: 01/20/16
To unsubscribe send a message with UNSUBSCRIBE in the subject line to
[email protected]
If you use auto-responders (like out-of-the-office messages), make sure that
they are not sent to the list nor to individual members. Doing so will cause
you to be automatically removed from the list.
To unsubscribe send a message with UNSUBSCRIBE in the subject line to
[email protected]
If you use auto-responders (like out-of-the-office messages), make sure that
they are not sent to the list nor to individual members. Doing so will cause
you to be automatically removed from the list.