Nick & Craig

Thanks for the input, I added both tests, and they work like a champ.

I can not tell if the spool file is backing up and see if anything is in the permanent hold folder.

 

Thanks for your help.

 

John

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nick Hayer
Sent: Monday, April 03, 2006 12:59 PM
To: [email protected]
Subject: Re: [Declude.JunkMail] Hijack Notification

 



John Doyle wrote:

I think I understand, I’m not a programmer and it’s semi Greek to me.

I like the idea of getting notified if the spool file begins to fill up, I check it now and then and if would be nice

To simply be notified if it begins to back up for whatever reason.

agreed!

Take that code, adjust the paths/email addresses as need be, save it as a .vbs file and give it a twirl. Set the count real low so you can see it work and then set it to whatever alarm level you would like -

-Nick



 

John

.

 

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Nick Hayer
Sent: Monday, April 03, 2006 11:03 AM
To: [email protected]
Subject: Re: [Declude.JunkMail] Hijack Notification

 

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 Notification
 
 
Hi 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:
 
  
Hi John,
 
Not sure if this is any help but I found a basic way to handle this as I
    
had
  
problems with clients ringing up saying "I sent out some mails and they
    
have
  
not gone"...etc etc etc, and of course when I check the hold2 directory
there are 500 emails in there.
 
What I do is have a basic setup that checks for me every 30 minutes if
    
there
  
are some .smd files in the C:\IMAIL\spool\spam\hold2 folder and if it finds
any, it emails me a simple email telling me how many *smd files there are
which then goes to my blackberry letting me know.
 
I am pretty sure there is an easier way but this is my 10 minute solution
and it works for me.
 
1) I installed the following object on the mail server
http://www.xs4all.nl/~jarit/asp/filefunc/download.html
 
2) made a .vbs file called  check4files.vbs and put it in the
C:\IMAIL\spool\spam\hold2 dir.
 
The code in the .vbs file is like this..
 
=======================
filepath="C:\IMAIL\spool\spam\hold2\*.smd"
emailfrom="[EMAIL PROTECTED]"
emailto="[EMAIL PROTECTED]"
Set FFunc = CreateObject("FileFunctions.files")
if FFunc.Exists(filepath) then
FFunc.GetFileList(filepath)
  Set objMessage = CreateObject("CDO.Message")
  objMessage.Subject = "(Alert) " & FFunc.Count & " Messages in The Hold
Queue"
  objMessage.From = emailfrom
  objMessage.To = emailto
  strBody = strBody & "There are currently " & FFunc.Count & " files in
    
the
  
Hold Queue" & vbCRLF
  strBody = strBody & "" & vbCRLF
  strBody = strBody & "Date: "  & FormatDateTime(Date, 1) & " - " &
FormatDateTime(Now, 4)
  objMessage.TextBody = strBody
  objMessage.Send
end if
========================
 
3) Then I set up a scheduled task in the windows schduled tasks to run the
file every 30 minutes.
 
I hope that helps you.
 
Kindest Regards
Craig Edmonds
123 Marbella Internet
W: www.123marbella.com
E : [EMAIL PROTECTED]
 
 
=========================================
 
 
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of John Doyle
Sent: Wednesday, March 29, 2006 9:25 PM
To: [email protected]
Subject: [Declude.JunkMail] Hijack Notification
 
Does anyone have a utility to email a notification when hijack holds an ip
address permanently?
 
Thanks in advance
 
John
---
This E-mail came from the Declude.JunkMail mailing list.  To unsubscribe,
just send an E-mail to [EMAIL PROTECTED], and type "unsubscribe
Declude.JunkMail".  The archives can be found at
http://www.mail-archive.com.
[ This E-mail has been scanned for Spam and Viruses by Declude ] [ Thank
    
You
  
For Using 123 Marbella Internet ]
 
 
 
 
[ This E-mail has been scanned for Spam and Viruses by Declude ]
[ Thank You For Using 123 Marbella Internet ]
 
---
This E-mail came from the Declude.JunkMail mailing list.  To
unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
type "unsubscribe Declude.JunkMail".  The archives can be found
at http://www.mail-archive.com.
 
 
 
 
    
---
This E-mail came from the Declude.JunkMail mailing list.  To
unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
type "unsubscribe Declude.JunkMail".  The archives can be found
at http://www.mail-archive.com.
 
---
This E-mail came from the Declude.JunkMail mailing list.  To
unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
type "unsubscribe Declude.JunkMail".  The archives can be found
at http://www.mail-archive.com.
 
 
  

Reply via email to