From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- .../27407-nagios-plugins-check_smtp.patch | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 web/attachments/27407-nagios-plugins-check_smtp.patch (limited to 'web/attachments/27407-nagios-plugins-check_smtp.patch') diff --git a/web/attachments/27407-nagios-plugins-check_smtp.patch b/web/attachments/27407-nagios-plugins-check_smtp.patch new file mode 100644 index 0000000..be08038 --- /dev/null +++ b/web/attachments/27407-nagios-plugins-check_smtp.patch @@ -0,0 +1,52 @@ +--- nagios-plugins/plugins/check_smtp.c Thu Jun 13 13:49:38 2002 ++++ nagios-plugins.patched/plugins/check_smtp.c Fri Jul 19 14:03:19 2002 +@@ -50,8 +50,13 @@ + */ + #define SMTP_DUMMYCMD "MAIL\r\n" + #define SMTP_USE_DUMMYCMD 1 ++#define SMTP_USE_HELOCMD 1 + #define SMTP_QUIT "QUIT\r\n" + ++#ifdef SMTP_USE_HELOCMD ++#undef SMTP_USE_DUMMYCMD ++#endif /* SMTP_USE_HELOCMD */ ++ + int process_arguments (int, char **); + int call_getopt (int, char **); + int validate_arguments (void); +@@ -74,6 +79,10 @@ + int sd; + int result; + char buffer[MAX_INPUT_BUFFER] = ""; ++#ifdef SMTP_USE_HELOCMD ++ char helocmd[255] = "HELO "; ++ char myhostname[248]; ++#endif /* SMTP_USE_HELOCMD */ + + if (process_arguments (argc, argv) != OK) + usage ("Invalid command arguments supplied\n"); +@@ -137,13 +146,22 @@ + } + } + +- /* close the connection */ ++#ifdef SMTP_USE_HELOCMD ++ gethostname(myhostname, sizeof(myhostname)); ++ strcat(helocmd,myhostname); ++ strcat(helocmd,"\r\n"); ++ send(sd,helocmd,strlen(helocmd),0); ++ /* allow for response to helo command to reach us */ ++ recv(sd,buffer,MAX_INPUT_BUFFER-1,0); ++#endif /* SMTP_USE_HELOCMD */ ++ + #ifdef SMTP_USE_DUMMYCMD + send(sd,SMTP_DUMMYCMD,strlen(SMTP_DUMMYCMD),0); + /* allow for response to DUMMYCMD to reach us */ + recv(sd,buffer,MAX_INPUT_BUFFER-1,0); + #endif /* SMTP_USE_DUMMYCMD */ + ++ /* close the connection */ + send (sd, SMTP_QUIT, strlen (SMTP_QUIT), 0); + close (sd); + } + -- cgit v1.2.3-74-g34f1