Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to create a script to reset SMTP

Status
Not open for further replies.

CADGraphicsIT

Technical User
Apr 7, 2004
28
US
I need to create a script that will reset the SMTP service every 3 minutes or so. Can anyone help?
 
net stop smtpsvc
net start smtpsvc

Why wld you want to do this anyways?

===

Fatman Superstar (Andrew James)

CCNA, CCAI
 
Thanks a lot, that worked. I want to do this because I'm having problems with the Queue. In the Queue there's always anywhere from 12-14 emails. If I restart the SMTP service, the emails get sent away to their destinations, and new email comes in. Now if I just leave the emails there and never restart the smtp service, then a few of the emails in there will just sit for a day or two, then be sent of randomly. Pretty much everythings random in the Queue, except when i restart it, then it seems to work well for a few mins.. So I figure (for a short time goal of course) I will make a script that restarts the smtp servivce every 5 minutes and everything will be fine.

Is there a line i can add to the beginning of the script that minimizes it? It gets annoying when it pops up every 5 minutes.
 
Use a batch file, not a script.
net stop smtpsvc
net start smtpsvc
Save it as a .bat file, and it should run in the background. Just a thought.

Glen A. Johnson
If you're from the Illinois, Wisconsin or Florida area, check out Tek-Tips in Chicago IL
To get the best answers to your questions, check out faq950-5848
 
Why not try to figure out why the emails get stuck. That's not normal behavior of exchange.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top