From 128545e06224233b7e91fc4c83f8830252fe16c9 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Tue, 4 Oct 2011 16:14:46 +0200 Subject: [PATCH] Removed --with-smtpservers configure option and thelike --- INSTALL | 9 ------ configure.in | 12 ------- etc/Makefile.in | 4 +-- etc/mts.conf.in | 7 ----- h/mts.h | 2 -- man/mh-tailor.man | 44 -------------------------- mts/smtp/hosts.c | 91 ----------------------------------------------------- sbr/client.c | 4 --- sbr/mts.c | 4 --- 9 files changed, 1 insertion(+), 176 deletions(-) diff --git a/INSTALL b/INSTALL index 506288a..9db70d2 100644 --- a/INSTALL +++ b/INSTALL @@ -242,15 +242,6 @@ Options for configure is not given, then the configuration process will search for the command `more' and use it as the default. ---with-smtpservers='SMTPSERVER1[ SMTPSERVER2...]' (DEFAULT is localhost) - If this option is not specified, the mts.conf file will contain - the line "servers: localhost", which may be manually edited later. - You may find it convenient to specify a value at configure-time, - however, so that each time nmh is reinstalled, the right value will be - there. - - See the mh-tailor(5) man page for full documentation of "servers:". - -- The nmh team nmh-workers@nongnu.org diff --git a/configure.in b/configure.in index 6fc7f1e..7f0dabb 100644 --- a/configure.in +++ b/configure.in @@ -161,17 +161,6 @@ if test -n "$with_pager"; then pagerpath="$with_pager" fi -dnl What should be the default mail server(s)? -AC_ARG_WITH(smtpservers, - AS_HELP_STRING([--with-smtpservers='SMTPSERVER1@<:@ SMTPSERVER2...@:>@'], - [specify the default SMTP server(s) @<:@localhost@:>@])) -if test -n "$with_smtpservers"; then - smtpservers="$with_smtpservers" -else - smtpservers="localhost" -fi -AC_SUBST(smtpservers)dnl - dnl ---------------------------------------------------- dnl Default location is /usr/local/mmh/{bin,etc,lib,share/man} dnl ---------------------------------------------------- @@ -968,7 +957,6 @@ man page install path : ${nmhman} backup prefix : ${backup_prefix} transport system : ${MTS} file locking type : ${LOCKTYPE} -default smtp servers : ${smtpservers} default editor : ${editorpath} default pager : ${pagerpath} email address masquerading : ${masquerade} diff --git a/etc/Makefile.in b/etc/Makefile.in index 4bec6a1..0580723 100644 --- a/etc/Makefile.in +++ b/etc/Makefile.in @@ -17,7 +17,6 @@ etcdir = @sysconfdir@ MTS = @MTS@ mailspool = @mailspool@ masquerade = @masquerade@ -smtpservers = @smtpservers@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -74,8 +73,7 @@ mts.conf: $(srcdir)/mts.conf.in Makefile $(SED) -e 's,%mts%,$(MTS),' \ -e 's,%mailspool%,$(mailspool),' \ -e 's,%etcdir%,$(etcdir),' \ - -e 's,%masquerade%,$(masquerade),' \ - -e 's,%smtpservers%,$(smtpservers),' < $(srcdir)/mts.conf.in > $@ + -e 's,%masquerade%,$(masquerade),' < $(srcdir)/mts.conf.in > $@ sendfiles: $(srcdir)/sendfiles.in Makefile rm -f $@ diff --git a/etc/mts.conf.in b/etc/mts.conf.in index 24d73f5..f6a1cca 100644 --- a/etc/mts.conf.in +++ b/etc/mts.conf.in @@ -11,10 +11,6 @@ # When `sendmail', nmh will pipe messages directly to the sendmail program. mts: %mts% -# The exceptions file for /etc/hosts used by -# `post' to try to find official names. -hostable: %etcdir%/hosts - # Name that nmh considers `local'. If not set, nmh will # query the system for this value (gethostname, etc...). #localname: foo.bar.com @@ -30,6 +26,3 @@ mmdfldir: %mailspool% # The name of the maildrop file in the directory where maildrops # are kept. If this is empty, the user's login name is used. mmdflfil: - -# List of smtp servers to try if using smtp support -servers: %smtpservers% diff --git a/h/mts.h b/h/mts.h index 6ec3a0b..9894a5d 100644 --- a/h/mts.h +++ b/h/mts.h @@ -49,7 +49,6 @@ void mts_init (char *); #define MTS_SENDMAIL 1 extern int sm_mts; -extern char *hostable; extern char *sendmail; #endif @@ -57,7 +56,6 @@ extern char *sendmail; * SMTP stuff */ extern char *clientname; -extern char *servers; /* * Global MailDelivery File diff --git a/man/mh-tailor.man b/man/mh-tailor.man index 4ad381d..86659df 100644 --- a/man/mh-tailor.man +++ b/man/mh-tailor.man @@ -261,40 +261,6 @@ If set, then each user-id greater than \*(lqeveryone\*(rq that has a login shell equivalent to the given value (e.g., \*(lq/bin/csh\*(rq) indicates that mail for \*(lqeveryone\*(rq should not be sent to them. This is useful for handling admin, dummy, and guest logins. -.RE -.SS "SMTP support" -These options are only available if you set -.B mts -to -.BR smtp . -.PP -.BR hostable : -%etcdir%/hosts -.RS 5 -The exceptions file for /etc/hosts used by -.B post -to try to find -official names. The format of this file is quite simple: -.PP -.IP 1. 4 -Comments are surrounded by sharp (`#') and newline. -.IP 2. 4 -Words are surrounded by white space. -.IP 3. 4 -The first word on the line is the official name of a host. -.IP 4. 4 -All words following the official names are aliases for that host. -.RE -.PP -.BR servers : -localhost -.RS 5 -A lists of hosts and networks which to look for SMTP servers when -posting local mail. It turns out this is a major win for hosts which -don't run an message transport system. The value of -.B servers -should be one or more items. Each item is the name of a host which -is (hopefully) running a SMTP server. .SS "SendMail" This option is only available if you set .B mts @@ -307,16 +273,6 @@ to The pathname to the .B sendmail program. -.RE -\" .SS "BBoards Delivery" -\" This option is only available if you compiled \fInmh\fP with -\" \*(lqbbdelivery:\ on\*(rq. -\" .PP -\" .BR bbdomain : -\" .RS 5 -\" The local BBoards domain (a UCI hack). -\" .RE - .SS "File Locking" A few words on locking: .B nmh diff --git a/mts/smtp/hosts.c b/mts/smtp/hosts.c index a10509c..ec73e86 100644 --- a/mts/smtp/hosts.c +++ b/mts/smtp/hosts.c @@ -18,18 +18,6 @@ #include #include -static struct host { - char *h_name; - char **h_aliases; - struct host *h_next; -} hosts; - - -/* - * static prototypes - */ -static int init_hs(void); - char * OfficialName (char *name) @@ -39,8 +27,6 @@ OfficialName (char *name) struct addrinfo hints, *res; static char buffer[BUFSIZ]; - char **r; - struct host *h; for (p = name, q = site; *p && (q - site < sizeof(site) - 1); p++, q++) *q = isupper (*p) ? tolower (*p) : *p; @@ -60,84 +46,7 @@ OfficialName (char *name) freeaddrinfo(res); return buffer; } - if (hosts.h_name || init_hs ()) { - for (h = hosts.h_next; h; h = h->h_next) - if (!mh_strcasecmp (h->h_name, q)) { - return h->h_name; - } else { - for (r = h->h_aliases; *r; r++) - if (!mh_strcasecmp (*r, q)) - return h->h_name; - } - } strncpy (buffer, site, sizeof(buffer)); return buffer; } - -/* - * Use hostable as an exception file for those hosts that aren't - * on the Internet (listed in /etc/hosts). These are usually - * PhoneNet and UUCP sites. - */ - -#define NALIASES 50 - -static int -init_hs (void) -{ - unsigned char *cp; - char *dp, **q, **r; - char buffer[BUFSIZ], *aliases[NALIASES]; - register struct host *h; - register FILE *fp; - - if ((fp = fopen (hostable, "r")) == NULL) - return 0; - - h = &hosts; - while (fgets (buffer, sizeof(buffer), fp) != NULL) { - if ((cp = strchr(buffer, '#'))) - *cp = 0; - if ((cp = strchr(buffer, '\n'))) - *cp = 0; - for (cp = buffer; *cp; cp++) - if (isspace (*cp)) - *cp = ' '; - for (cp = buffer; isspace (*cp); cp++) - continue; - if (*cp == 0) - continue; - - q = aliases; - if ((cp = strchr(dp = cp, ' '))) { - *cp = 0; - for (cp++; *cp; cp++) { - while (isspace (*cp)) - cp++; - if (*cp == 0) - break; - if ((cp = strchr(*q++ = cp, ' '))) - *cp = 0; - else - break; - if (q >= aliases + NALIASES) - break; - } - } - - *q = 0; - - h->h_next = (struct host *) calloc (1, sizeof(*h)); - h = h->h_next; - h->h_name = getcpy (dp); - r = h->h_aliases = - (char **) calloc ((size_t) (q - aliases + 1), sizeof(*q)); - for (q = aliases; *q; q++) - *r++ = getcpy (*q); - *r = 0; - } - - fclose (fp); - return 1; -} diff --git a/sbr/client.c b/sbr/client.c index c558536..92e0711 100644 --- a/sbr/client.c +++ b/sbr/client.c @@ -47,10 +47,6 @@ client (char *args, char *service, char *response, int len_response, int debug) if (args != NULL && *args != 0) { ap = client_copyip (client_brkstring (client_getcpy (args), " ", "\n"), ap, MAXARGS); - } else { - if (servers != NULL && *servers != 0) - ap = client_copyip (client_brkstring (client_getcpy (servers), " ", "\n"), - ap, MAXARGS); } if (ap == arguments) { *ap++ = client_getcpy ("localhost"); diff --git a/sbr/mts.c b/sbr/mts.c index 93c9fa9..46f5990 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -76,7 +76,6 @@ static char* masquerade = ""; #if defined(SMTPMTS) static char *sm_method = "sendmail"; int sm_mts = MTS_SENDMAIL; -char *hostable = nmhetcdir(/hosts); char *sendmail = SENDMAILPATH; #endif @@ -84,7 +83,6 @@ char *sendmail = SENDMAILPATH; * SMTP stuff */ char *clientname = NULL; -char *servers = "localhost \01localnet"; /* * Global MailDelivery file @@ -123,12 +121,10 @@ static struct bind binds[] = { #if defined(SMTPMTS) { "mts", &sm_method }, - { "hostable", &hostable }, { "sendmail", &sendmail }, #endif { "clientname", &clientname }, - { "servers", &servers }, { "maildelivery", &maildelivery }, { "everyone", &everyone }, -- 1.7.10.4