[MEDIUM] implement SMTP health checks

Peter van Dijk contributed this patch which implements the "smtpchk"
option, which is to SMTP what "httpchk" is to HTTP. By default, it sends
"HELO localhost" to the servers, and waits for the 250 message, but it
can also send a specific request.
diff --git a/include/common/defaults.h b/include/common/defaults.h
index c99aafe..cfe60e8 100644
--- a/include/common/defaults.h
+++ b/include/common/defaults.h
@@ -92,6 +92,7 @@
 #define DEF_FALLTIME    3
 #define DEF_RISETIME    2
 #define DEF_CHECK_REQ   "OPTIONS / HTTP/1.0\r\n\r\n"
+#define DEF_SMTP_CHECK_REQ   "HELO localhost\r\n"
 
 /* Default connections limit.
  *
diff --git a/include/types/backend.h b/include/types/backend.h
index e2d4efc..57a8cb0 100644
--- a/include/types/backend.h
+++ b/include/types/backend.h
@@ -59,6 +59,7 @@
 #define	PR_O_TCPSPLICE	0x08000000      /* delegate data transfer to linux kernel's tcp_splice */
 #define PR_O_BALANCE_UH 0x10000000      /* balance on URI hash */
 #define PR_O_BALANCE    (PR_O_BALANCE_RR | PR_O_BALANCE_SH | PR_O_BALANCE_UH)
+#define PR_O_SMTP_CHK   0x20000000      /* use SMTP EHLO check for server health - pvandijk@vision6.com.au */
 
 
 #endif /* _TYPES_BACKEND_H */