Code

Fix translations when extra-opts aren't enabled
[nagiosplug.git] / plugins / check_smtp.c
index 8ff10b82a9d9f2a6ea4f9e36115e472b719b87d7..c78b709ce5a71462b803b1a3ca162bd949f2861f 100644 (file)
@@ -5,8 +5,6 @@
 * License: GPL
 * Copyright (c) 2000-2007 Nagios Plugins Development Team
 * 
-* Last Modified: $Date$
-* 
 * Description:
 * 
 * This file contains the check_smtp plugin
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
-* $Id$
 * 
 *****************************************************************************/
 
 const char *progname = "check_smtp";
-const char *revision = "$Revision$";
 const char *copyright = "2000-2007";
 const char *email = "nagiosplug-devel@lists.sourceforge.net";
 
@@ -168,7 +164,7 @@ main (int argc, char **argv)
 
        if (verbose && smtp_use_dummycmd)
                printf ("FROM CMD: %s", cmd_str);
-       
+
        /* initialize alarm signal handling */
        (void) signal (SIGALRM, socket_timeout_alarm_handler);
 
@@ -285,7 +281,7 @@ main (int argc, char **argv)
 #  endif /* USE_OPENSSL */
                }
 #endif
-                               
+
                /* sendmail will syslog a "NOQUEUE" error if session does not attempt
                 * to do something useful. This can be prevented by giving a command
                 * even if syntax is illegal (MAIL requires a FROM:<...> argument)
@@ -293,7 +289,6 @@ main (int argc, char **argv)
                 * According to rfc821 you can include a null reversepath in the from command
                 * - but a log message is generated on the smtp server.
                 *
-                * You can disable sending mail_command with '--nocommand'
                 * Use the -f option to provide a FROM address
                 */
                if (smtp_use_dummycmd) {
@@ -474,7 +469,6 @@ process_arguments (int argc, char **argv)
                {"authpass", required_argument, 0, 'P'},
                {"command", required_argument, 0, 'C'},
                {"response", required_argument, 0, 'R'},
-               {"nocommand", required_argument, 0, 'n'},
                {"verbose", no_argument, 0, 'v'},
                {"version", no_argument, 0, 'V'},
                {"use-ipv4", no_argument, 0, '4'},
@@ -620,7 +614,7 @@ process_arguments (int argc, char **argv)
 #endif
                        break;
                case 'V':                                                                       /* version */
-                       print_revision (progname, revision);
+                       print_revision (progname, NP_VERSION);
                        exit (STATE_OK);
                case 'h':                                                                       /* help */
                        print_help ();
@@ -746,7 +740,7 @@ recvlines(char *buf, size_t bufsize)
 }
 
 
-int 
+int
 my_close (void)
 {
 #ifdef HAVE_SSL
@@ -762,7 +756,7 @@ print_help (void)
        char *myport;
        asprintf (&myport, "%d", SMTP_PORT);
 
-       print_revision (progname, revision);
+       print_revision (progname, NP_VERSION);
 
        printf ("Copyright (c) 1999-2001 Ethan Galstad <nagios@nagios.org>\n");
        printf (COPYRIGHT, copyright, email);
@@ -773,17 +767,15 @@ print_help (void)
 
        print_usage ();
 
-       printf (_(UT_HELP_VRSN));
-       printf (_(UT_EXTRA_OPTS));
+       printf (UT_HELP_VRSN);
+       printf (UT_EXTRA_OPTS);
 
-       printf (_(UT_HOST_PORT), 'p', myport);
+       printf (UT_HOST_PORT, 'p', myport);
 
-       printf (_(UT_IPv46));
+       printf (UT_IPv46);
 
        printf (" %s\n", "-e, --expect=STRING");
   printf (_("    String to expect in first line of server response (default: '%s')\n"), SMTP_EXPECT);
-  printf (" %s\n", "-n, nocommand");
-  printf ("    %s\n", _("Suppress SMTP command"));
   printf (" %s\n", "-C, --command=STRING");
   printf ("    %s\n", _("SMTP command (may be used repeatedly)"));
   printf (" %s\n", "-R, --command=STRING");
@@ -804,11 +796,11 @@ print_help (void)
   printf (" %s\n", "-P, --authpass=STRING");
   printf ("    %s\n", _("SMTP AUTH password"));
 
-       printf (_(UT_WARN_CRIT));
+       printf (UT_WARN_CRIT);
 
-       printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
+       printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 
-       printf (_(UT_VERBOSE));
+       printf (UT_VERBOSE);
 
        printf("\n");
        printf ("%s\n", _("Successul connects return STATE_OK, refusals and timeouts return"));
@@ -819,10 +811,10 @@ print_help (void)
 #ifdef NP_EXTRA_OPTS
   printf ("\n");
   printf ("%s\n", _("Notes:"));
-  printf (_(UT_EXTRA_OPTS_NOTES));
+  printf (UT_EXTRA_OPTS_NOTES);
 #endif
 
-       printf (_(UT_SUPPORT));
+       printf (UT_SUPPORT);
 }
 
 
@@ -833,6 +825,6 @@ print_usage (void)
   printf (_("Usage:"));
        printf ("%s -H host [-p port] [-e expect] [-C command] [-f from addr]", progname);
   printf ("[-A authtype -U authuser -P authpass] [-w warn] [-c crit] [-t timeout]\n");
-  printf ("[-S] [-D days] [-n] [-v] [-4|-6]\n");
+  printf ("[-S] [-D days] [-v] [-4|-6]\n");
 }