From: Ken Hornstein Date: Tue, 6 Mar 2012 14:25:00 +0000 (-0500) Subject: SMTPMTS has been the default for over a decade, so it's time to get rid of X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=40ae9d199d58c85469e3528fc53205143baf29d2;p=mmh SMTPMTS has been the default for over a decade, so it's time to get rid of the #ifdefs to clean up the code a bit. --- diff --git a/configure.ac b/configure.ac index 2e8cbd7..aeed66c 100644 --- a/configure.ac +++ b/configure.ac @@ -123,10 +123,6 @@ AS_IF([test x"$with_mts" = x"smtp"], [MTS="smtp"], [MTS="smtp"]) AC_SUBST([MTS])dnl -dnl Both the smtp and sendmail mail transport services use the smtp code -AC_DEFINE([SMTPMTS], [1], - [Define if you want SMTP (simple mail transport protocol) support.])dnl - dnl What should be the default pager? AC_ARG_WITH([pager], AS_HELP_STRING([--with-pager=PAGER],[specify the default pager])) diff --git a/h/mts.h b/h/mts.h index 2888c57..6be339a 100644 --- a/h/mts.h +++ b/h/mts.h @@ -43,7 +43,6 @@ void mts_init (char *); /* * MTS specific variables */ -#if defined (SMTPMTS) /* whether to speak SMTP to localhost:25 or to /usr/sbin/sendmail */ #define MTS_SMTP 0 @@ -52,7 +51,6 @@ extern int sm_mts; extern char *hostable; extern char *sendmail; -#endif /* * SMTP/POP stuff diff --git a/h/rcvmail.h b/h/rcvmail.h index 275ea74..61dd992 100644 --- a/h/rcvmail.h +++ b/h/rcvmail.h @@ -3,19 +3,15 @@ * rcvmail.h -- rcvmail hook definitions */ -#if defined(SMTPMTS) -# include -# include -# include -# include -# include -#endif /* SMTPMTS */ +#include +#include +#include +#include +#include -#if defined(SMTPMTS) -# define RCV_MOK 0 -# define RCV_MBX 1 -#endif /* SMTPMTS */ +#define RCV_MOK 0 +#define RCV_MBX 1 #ifdef NRTC /* sigh */ diff --git a/sbr/mts.c b/sbr/mts.c index d298c88..ba7ff07 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -68,12 +68,10 @@ static char* masquerade = ""; /* * MTS specific variables */ -#if defined(SMTPMTS) static char *sm_method = "smtp"; int sm_mts = MTS_SMTP; char *hostable = nmhetcdir(/hosts); char *sendmail = SENDMAILPATH; -#endif /* * SMTP/POP stuff @@ -116,13 +114,9 @@ static struct bind binds[] = { { "mmdelim1", &mmdlm1 }, { "mmdelim2", &mmdlm2 }, { "masquerade", &masquerade }, - -#if defined(SMTPMTS) { "mts", &sm_method }, { "hostable", &hostable }, { "sendmail", &sendmail }, -#endif - { "clientname", &clientname }, { "servers", &servers }, { "pophost", &pophost }, @@ -171,7 +165,6 @@ mts_init (char *name) if (strstr(masquerade, "username_extension") != NULL) username_extension_masquerading = TRUE; -#ifdef SMTPMTS if (strcmp(sm_method, "smtp") == 0) sm_mts = MTS_SMTP; else if (strcmp(sm_method, "sendmail") == 0) @@ -180,7 +173,6 @@ mts_init (char *name) advise(NULL, "unsupported \"mts\" value in mts.conf: %s", sm_method); sm_mts = MTS_SMTP; } -#endif } diff --git a/uip/post.c b/uip/post.c index 6ce3280..15755cf 100644 --- a/uip/post.c +++ b/uip/post.c @@ -27,9 +27,7 @@ #endif #include -#ifdef SMTPMTS -# include -#endif +#include #ifndef CYRUS_SASL # define SASLminc(a) (a) @@ -275,14 +273,12 @@ static struct mailname netaddrs; /* network addrs */ static struct mailname uuaddrs; /* uucp addrs */ static struct mailname tmpaddrs; /* temporary queue */ -#ifdef SMTPMTS static int snoop = 0; static int smtpmode = S_MAIL; static char *clientsw = NULL; static char *serversw = NULL; extern struct smtp sm_reply; -#endif /* SMTPMTS */ static char prefix[] = "----- =_aaaaaaaaaa"; @@ -466,16 +462,6 @@ main (int argc, char **argv) adios (NULL, "missing argument to %s", argp[-2]); continue; -#ifndef SMTPMTS - case CLIESW: - case SERVSW: - if (!(cp = *argp++) || *cp == '-') - adios (NULL, "missing argument to %s", argp[-2]); - continue; - - case SNOOPSW: - continue; -#else /* SMTPMTS */ case MAILSW: smtpmode = S_MAIL; continue; @@ -499,7 +485,6 @@ main (int argc, char **argv) case SNOOPSW: snoop++; continue; -#endif /* SMTPMTS */ case FILLSW: if (!(fill_in = *argp++) || *fill_in == '-') @@ -1410,10 +1395,8 @@ do_addresses (int bccque, int talk) chkadr (); -#ifdef SMTPMTS if (rp_isbad (retval = sm_waend ())) die (NULL, "problem ending addresses; %s", rp_string (retval)); -#endif /* SMTPMTS */ } @@ -1426,8 +1409,6 @@ do_addresses (int bccque, int talk) * SENDMAIL/SMTP routines */ -#ifdef SMTPMTS - static void post (char *file, int bccque, int talk) { @@ -1612,8 +1593,6 @@ do_text (char *file, int fd) } } -#endif /* SMTPMTS */ - /* * SIGNAL HANDLING @@ -1628,10 +1607,8 @@ sigser (int i) if (msgflags & MINV) unlink (bccfil); -#ifdef SMTPMTS if (!whomsw || checksw) sm_end (NOTOK); -#endif /* SMTPMTS */ done (1); } @@ -1747,10 +1724,8 @@ die (char *what, char *fmt, ...) if (msgflags & MINV) unlink (bccfil); -#ifdef SMTPMTS if (!whomsw || checksw) sm_end (NOTOK); -#endif /* SMTPMTS */ va_start(ap, fmt); advertise (what, NULL, fmt, ap);