the #ifdefs to clean up the code a bit.
[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]))
/*
* MTS specific variables
*/
-#if defined (SMTPMTS)
/* whether to speak SMTP to localhost:25 or to /usr/sbin/sendmail */
#define MTS_SMTP 0
extern char *hostable;
extern char *sendmail;
-#endif
/*
* SMTP/POP stuff
* rcvmail.h -- rcvmail hook definitions
*/
-#if defined(SMTPMTS)
-# include <ctype.h>
-# include <errno.h>
-# include <stdio.h>
-# include <sys/types.h>
-# include <mts/smtp/smtp.h>
-#endif /* SMTPMTS */
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <mts/smtp/smtp.h>
-#if defined(SMTPMTS)
-# define RCV_MOK 0
-# define RCV_MBX 1
-#endif /* SMTPMTS */
+#define RCV_MOK 0
+#define RCV_MBX 1
#ifdef NRTC /* sigh */
/*
* 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
{ "mmdelim1", &mmdlm1 },
{ "mmdelim2", &mmdlm2 },
{ "masquerade", &masquerade },
-
-#if defined(SMTPMTS)
{ "mts", &sm_method },
{ "hostable", &hostable },
{ "sendmail", &sendmail },
-#endif
-
{ "clientname", &clientname },
{ "servers", &servers },
{ "pophost", &pophost },
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)
advise(NULL, "unsupported \"mts\" value in mts.conf: %s", sm_method);
sm_mts = MTS_SMTP;
}
-#endif
}
#endif
#include <time.h>
-#ifdef SMTPMTS
-# include <mts/smtp/smtp.h>
-#endif
+#include <mts/smtp/smtp.h>
#ifndef CYRUS_SASL
# define SASLminc(a) (a)
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";
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;
case SNOOPSW:
snoop++;
continue;
-#endif /* SMTPMTS */
case FILLSW:
if (!(fill_in = *argp++) || *fill_in == '-')
chkadr ();
-#ifdef SMTPMTS
if (rp_isbad (retval = sm_waend ()))
die (NULL, "problem ending addresses; %s", rp_string (retval));
-#endif /* SMTPMTS */
}
* SENDMAIL/SMTP routines
*/
-#ifdef SMTPMTS
-
static void
post (char *file, int bccque, int talk)
{
}
}
-#endif /* SMTPMTS */
-
/*
* SIGNAL HANDLING
if (msgflags & MINV)
unlink (bccfil);
-#ifdef SMTPMTS
if (!whomsw || checksw)
sm_end (NOTOK);
-#endif /* SMTPMTS */
done (1);
}
if (msgflags & MINV)
unlink (bccfil);
-#ifdef SMTPMTS
if (!whomsw || checksw)
sm_end (NOTOK);
-#endif /* SMTPMTS */
va_start(ap, fmt);
advertise (what, NULL, fmt, ap);