Here's a patch that allows you to add
--with-smtpserver=<some.host.name>
to the ./configure command line that sets the "servers: " line in
etc/mts.conf, defaulting to "localhost" (the current value). Around
here, we use "mailhost" so that all machines in the current domain just
talk to a central machine and nothing else runs an MTA. Now, I can use
--with-smtpserver=mailhost
instead of having to remember to fix this by hand (and often forgetting
to do so!).
Hopefully this will be of use to someone else as well...
Simon.
--
Index: configure.in
===================================================================
RCS file: /cvs/nmh/configure.in,v
retrieving revision 1.24
diff -p -u -r1.24 configure.in
--- configure.in 2000/03/02 08:20:00 1.24
+++ configure.in 2000/03/14 04:08:12
@@ -52,6 +52,19 @@ fi
AC_SUBST(MTS)dnl
AC_SUBST(MTSLIB)dnl
+dnl What should be the default mail server?
+undefine([smtpserver])dnl
+AC_ARG_WITH(smtpserver,
+[ --with-smtpserver=SMTPSERVER
+ specify the default smtp server [localhost]])
+
+if test -n "$with_smtpserver"; then
+ smtpserver="$with_smtpserver"
+else
+ smtpserver="localhost"
+fi
+AC_SUBST(smtpserver)dnl
+
dnl What should be the default editor?
undefine([editor])dnl
AC_ARG_WITH(editor,
@@ -679,6 +692,7 @@ libary install path : ${nmhlib2}
config files install path : ${nmhsysconf2}
man page install path : ${nmhman}
transport system : ${MTS}
+default smtp server : ${smtpserver}
default editor : ${editorpath}
default pager : ${pagerpath}"
echo ""
Index: Makefile.in
===================================================================
RCS file: /cvs/nmh/Makefile.in,v
retrieving revision 1.5
diff -p -u -r1.5 Makefile.in
--- Makefile.in 2000/02/29 05:59:16 1.5
+++ Makefile.in 2000/03/14 04:08:13
@@ -40,6 +40,9 @@ mailspool = @mailspool@
# location of mail transport agent
sendmailpath = @sendmailpath@
+# smtp server
+smtpserver = @smtpserver@
+
# default editor
default_editor = @editorpath@
@@ -61,7 +64,8 @@ CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)'
prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
etcdir='$(etcdir)' libdir='$(libdir)' mandir='$(mandir)' \
mailspool='$(mailspool)' sendmailpath='$(sendmailpath)' \
-default_editor='$(default_editor)' default_pager='$(default_pager)'
+smtpserver='$(smtpserver)' default_editor='$(default_editor)' \
+default_pager='$(default_pager)'
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
Index: etc/Makefile.in
===================================================================
RCS file: /cvs/nmh/etc/Makefile.in,v
retrieving revision 1.3
diff -p -u -r1.3 Makefile.in
--- etc/Makefile.in 2000/01/06 21:30:07 1.3
+++ etc/Makefile.in 2000/03/14 04:08:13
@@ -17,6 +17,7 @@ libdir = @libdir@
etcdir = @sysconfdir@
mailspool = @mailspool@
+smtpserver = @smtpserver@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -67,7 +68,8 @@ mhn.defaults: $(srcdir)/mhn.defaults.sh
mts.conf: $(srcdir)/mts.conf.in
rm -f $@
$(SED) -e 's,%mailspool%,$(mailspool),' \
- -e 's,%etcdir%,$(etcdir),' < $(srcdir)/mts.conf.in > $@
+ -e 's,%etcdir%,$(etcdir),' \
+ -e 's,%smtpserver%,$(smtpserver),' < $(srcdir)/mts.conf.in > $@
install: install-files install-scripts
Index: etc/mts.conf.in
===================================================================
RCS file: /cvs/nmh/etc/mts.conf.in,v
retrieving revision 1.4
diff -p -u -r1.4 mts.conf.in
--- etc/mts.conf.in 2000/03/04 00:02:47 1.4
+++ etc/mts.conf.in 2000/03/14 04:08:13
@@ -29,4 +29,4 @@ mmdflfil:
#pophost: localhost
# List of smtp servers to try if using smtp support
-servers: localhost
+servers: %smtpserver%