Is it possible to send some sort of ping to a SMTP server to check if the connection is still open and ready to send a mail

The connection is a keep alive and want to check if the connection is closed/timed out

Or is it possible to send a no operation command to keep the connection alive?


A very quick look through the RFC shows the SMTP NOOP command.

   This command does not affect any parameters or previously entered
   commands.  It specifies no action other than that the receiver send a
   "250 OK" reply.

   This command has no effect on the reverse-path buffer, the forward-
   path buffer, or the mail data buffer, and it may be issued at any
   time.  If a parameter string is specified, servers SHOULD ignore it.

NOOP is good but RSETis better before strarting new transaction (sending new email) IMHO.
Anyway sendmail uses RSET to test SMTP connections retrieved from connection cache.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.