473,805 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SMTP and POP3 Healthy

I want to check if a remote server is healthy. For FTP and HTTP ports I
use ...

public static string Connect( string hoist, int port )
{
try
{
IPAddress[] ipa = Dns.GetHostAddr esses( host );
Socket s = new Socket( AddressFamily.I nterNetwork, SocketType.Stre am,
ProtocolType.Tc p );
s.Connect( ipa[0], port );
}
catch
{
return (host + ":" + port.ToString( ) + " " );
}
return ( null );
}

.... this same technique for SMTP and POP3 always reports success.

How can I remotely test SMTP and POP3 to determine if they are healthy
(i.e., not hung)?

_______________ _______________ _______________ __
Thom Little www.tlanet.net Thom Little Associates, Ltd.
Feb 12 '07 #1
3 1824

"Thom Little" <th**@tlanet.ne twrote in message
news:e6******** *****@TK2MSFTNG P04.phx.gbl...
>I want to check if a remote server is healthy. For FTP and HTTP ports I
use ...
You have to define "healthy" better. You are currently testing only the
transport layer (is the TCP/IP stack responding, and the connection queue
isn't overfull). The OS will hold the connection open until the app is
ready to handle it. It sounds as if you want to also test the application
layer, which requires sending a message from the appropriate protocol. For
SMTP that would probably be "EHLO\r\n", and you should get a response
beginning with 3 digits indicating success or failure. Not responding to
the protocol level command would also be considered a failure. To find out
if your authentication database is responding, you may have to go further
and actually login as a particular user.
>
public static string Connect( string hoist, int port )
{
try
{
IPAddress[] ipa = Dns.GetHostAddr esses( host );
Socket s = new Socket( AddressFamily.I nterNetwork, SocketType.Stre am,
ProtocolType.Tc p );
s.Connect( ipa[0], port );
}
catch
{
return (host + ":" + port.ToString( ) + " " );
}
return ( null );
}

... this same technique for SMTP and POP3 always reports success.

How can I remotely test SMTP and POP3 to determine if they are healthy
(i.e., not hung)?

_______________ _______________ _______________ __
Thom Little www.tlanet.net Thom Little Associates, Ltd.

Feb 12 '07 #2
I'll try to be more precise ...

For an SMTP port serving multiple users ... some user is able to submit
messages for transmission. (A problem with an individual user is ignored.)

For a POP3 port serving multiple users ... some user is receiving messages.
(A problem with an individual user is ignored.)

_______________ _______________ _______________ __
Thom Little www.tlanet.net Thom Little Associates, Ltd.

You have to define "healthy" better.
Feb 12 '07 #3

"Thom Little" <th**@tlanet.ne twrote in message
news:12******** *****@news.supe rnews.com...
I'll try to be more precise ...

For an SMTP port serving multiple users ... some user is able to submit
messages for transmission. (A problem with an individual user is
ignored.)

For a POP3 port serving multiple users ... some user is receiving
messages.
(A problem with an individual user is ignored.)
Then you should try to do just that. Read the RFCs or get a packet capture
of a typical transaction to find out what to send the server. Or you could
always use an existing program that does the same thing, I've had a lot of
luck with Servers Alive? from woodstone.nu, other less expensive (even free)
products have come out since we chose them.

Maybe even better, create a dummy user with a strong random password, send
it a message and see if you can download it via POP3. Parse out some of the
MIME headers, like Received, and you even get an accurate real-time
indication of the latency.
>
_______________ _______________ _______________ __
Thom Little www.tlanet.net Thom Little Associates, Ltd.

You have to define "healthy" better.

Feb 12 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
13877
by: Andy Turner | last post by:
Hi, I'm trying to setup PHP so it will use a remote SMTP server. I'm going to sound like a newbie but how? I know you need to alter php.ini, change SMTP from localhost to the SMTP server and the address to the correct one but I wondered about passwords? Outlook Express needs a password so how would I do it. Unless anyone has any other suggestions/tutorials. Oh and just so you know my port 25 is blocked by ISP, I think that limits my...
0
1939
by: Alexander Schumann | last post by:
Hello everyone, We are building a new web based e-mail client "Fiezel" that will support IMAP, POP3 and SMTP protocols. Will be written in php4. I am trying to collect all the infomation on SNMP I can get and any other protocols like POP3 infomation for desinging and developing for php4. I have also collected the infomation wish I will try to support: RFC2821: Simple Mail Transfer Protocol (SMTP) RFC2822: Standard for ARPA internet...
2
7952
by: Mark Carter | last post by:
I'm trying to create a mail server in Twisted. I either get SMTPSenderRefused or SMTPException: SMTP AUTH extension not supported by server. What do I need to do to get it to work?
5
3254
by: Emmett Power | last post by:
Hi, I use Access to send emails through SMTP. I'd like to mirror the process and retrieve emails from my SMTP/Pop3 server without the intermediary of Outlook. I don't want to spend a lot of money on 3rd party applications. Can I do this through code or is there some reason why it is not doable? I've hunted through the net but all I've got are references to commercial applications. A pointer to sample code would be much
3
2038
by: cybertof | last post by:
Hello, Is there an existing pop3/smtp class (in the framework or 3rd party) that would allow sending/receiving emails within a C# application ? (i do not want to use CDO through outlook but pop3/smtp directly) Regards, Cybertof.
1
1216
by: MS | last post by:
Looking for reliable, robust dotnet component that can handle POP3+SMTP. I found some online but they suffered from the following problems: - incomplete or absent documentation (mostly freeware) - overkill (too many other protocols supported). We only need POP3 and SMTP. - outdated (built with VS 2002 and never updated) - bad code/poor design - too expensive If you know of a product that does not have the above problems, please let
2
1751
by: Ben | last post by:
Hi We have an application that during a process we need to check that a remote POP3 Server and SMTP Server are accessable. Ideally we just want to open a connection and close it immediately. Is this possible without a third party tool? Any advice is much appreciated.
7
7753
by: oopsbabies | last post by:
Hello everyone, I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My machine is using Windows XP 2002 professional edition which comes with a Windows firewall. I am using McAfee free edition for anti-virus. I use an ISP provider from my country and according to them I do not need to perform authentication while sending mails through their SMTP address. Thus I am using external SMTP server. I don't have IIS installed...
5
5082
by: Chris Gage | last post by:
I'm a longtime *nix guy and am fairly comfortable "over there" although I am a developer and not a sysadmin, mostly J2EE stuff. I recently got the Microsoft "Action Pack" as a partner. It has legit licenses for a bunch of Microsft software for development/evaluation purposes. I decided to install Windows Server 2003 - the first time I have ever installed a Windows Server. I decided to install Apache rather than try to learn IIS, and...
0
9718
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10614
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10369
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10109
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.