|
Hi John, >John Doyle wrote: >this guy suggested this. >I'm not sure exactly how. looks like if a count is > some value send the >mail. I was just suggesting that the number of files in the spool dir exceed some number [100?] then send an email. I got the idea from the hijack vbs code [Thanks!] on the declude website which I kludged to work to notify for the spool overflows.. -Nick # spool_mon.vbs fSpool = "e:\imaillogs\spool" aMail = "e:\imail\imail1.exe " mFrom = "-u '[EMAIL PROTECTED]' " mTo1 = "-t '[EMAIL PROTECTED],[EMAIL PROTECTED]' " if GetFileCount(fSpool) > 100 then MailNotice "Spool", GetFileCount(fSpool), mTo1 end if Function GetFileCount(folderspec) Dim fso, f, f1, fc Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(folderspec) Set fc = f.Files GetFileCount = fc.count End Function Function MailNotice(fname, fcount, mTo) Dim mCmd, mSubj, WshShell set WshShell = WScript.CreateObject("WScript.Shell") mSubj = "-s 'Mail held in " & fname & ": " & fcount & "' " mCmd = aMail & mFrom & mTo & mSubj & "-f placeholder.txt" Return = WshShell.Run(mCmd , 1, TRUE) End Function -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Nick Hayer Sent: Sunday, April 02, 2006 7:59 AM To: [email protected] Subject: Re: [Declude.JunkMail] Hijack NotificationHi Craig, Although you may already do this figured I mention it anyway - this technique works well to monitor spool traffic eg when a threshold is reached I get an email - so for example in your code below IF FFunc.Count > 100 [altered path for the spool dir] > send me an email... -Nick Craig Edmonds wrote: |
- Re: [Declude.JunkMail] Hijack Notificati... Nick Hayer
- RE: [Declude.JunkMail] Hijack Notif... John Doyle
- Re: [Declude.JunkMail] Hijack N... Nick Hayer
- RE: [Declude.JunkMail] Hija... John Doyle
- RE: [Declude.JunkMail] Hija... Todd Richards
- Re: [Declude.JunkMail] ... Darin Cox
- Re: [Declude.JunkM... Nick Hayer
- RE: [Declude.J... Todd Richards
- RE: [Declude.JunkMail] Hijack Notif... Jay Sudowski - Handy Networks LLC
