The MTS is a non-MUA part of MH, which is/gets removed in MMH.
Now, you cannot change the global maildelivery file without changing the
code. You stil can specify -maildelivery to slocal.
I've also remove support for the env vars MHMTSCONF and MHMTSUSERCONF,
which were added by Earl Hood in 2010. We might want to add support
for them again. I need to think about the future of slocal anyway.
existing file. Watch for information messages while make is processing
that directory to see if you need to merge changes.
-5) Edit the file `mts.conf' (installed in the mmh `etc' directory)
- and make any necessary changes for the mail transport interface
- you are using.
-
- The default `mts.conf' file assumes you retrieve new mail from
- a local (or NFS mounted) maildrop, and send outgoing mail by
- injecting the message to a mail transfer agent (such as sendmail)
- on the local machine.
-
- Check the `mts.conf(5)' man page for a list of all the available
- options for this file.
-
-6) Edit the file `mhn.defaults' (installed in the mmh `etc' directory).
+5) Edit the file `mhn.defaults' (installed in the mmh `etc' directory).
This file contains the default profile entries for the mmh commands
mhlist/mhstore/mhshow and is created by the script `mhn.defaults.sh'.
This script will search a generic path (essentially your $PATH) for
mmh's support binaries (spost, slocal, mhl, ...) are installed here.
--sysconfdir=DIR (DEFAULT is ${prefix}/etc)
- mmh's config files (mts.conf, mhn.defaults, ...) are installed here.
+ mmh's config files (mhn.defaults, ...) are installed here.
--mandir=DIR (DEFAULT is ${prefix}/man)
mmh's man pages are installed here.
.PP
Of course, replace "components" with a unique identifier that
- reflects the content being included, like "mts_conf" for
- etc/mts.conf. Then, add two lines to the man.sed target in
+ reflects the content being included, like "mhl_reply" for
+ etc/mhl.reply. Then, add two lines to the man.sed target in
Makefile.in like:
echo '/%components%/r $(top_srcdir)/etc/components' >> $@
scan.timely scan.unseen
# templates and scripts from which non-static files are generated
-GENERATED_FILE_SRCS = mhn.defaults.sh mhn.find.sh mts.conf.in sendfiles.in
+GENERATED_FILE_SRCS = mhn.defaults.sh mhn.find.sh sendfiles.in
# scripts generated using above GENERATED_FILE_SRCs; don't add binaries
# to this list, as they'll get installed with INSTALL_SCRIPT and won't
GENERATED_BIN_FILES = sendfiles
# non-scripts generated using above GENERATED_FILE_SRCs
-GENERATED_ETC_FILES = mhn.defaults mts.conf
+GENERATED_ETC_FILES = mhn.defaults
# auxiliary files (included in distribution but not installed)
AUX = Makefile.in
rm -f $@
$(srcdir)/mhn.defaults.sh $(MHNSEARCHPATH) $(MHNSEARCHPROG) > $@
-mts.conf: $(srcdir)/mts.conf.in Makefile
- rm -f $@
- $(SED) -e 's,%mailspool%,$(mailspool),' \
- -e 's,%etcdir%,$(etcdir),' < $(srcdir)/mts.conf.in > $@
-
sendfiles: $(srcdir)/sendfiles.in Makefile
rm -f $@
$(SED) -e 's,%libdir%,$(libdir),' < $(srcdir)/sendfiles.in > $@
char *LocalName(void);
char *SystemName(void);
-
char *getusername(void);
char *getfullname(void);
-
-
-/*
-** Read mts.conf file
-*/
-void mts_init(char *);
-
-/*
-** Global MailDelivery File
-*/
-extern char *maildelivery;
rcvstore. rcvtty. refile. repl. rmf. rmm. scan. send. sendfiles. \
show. slocal. sortm. whatnow.
-MAN5SRC = mh-alias. mh-format. mh-mail. mh-profile. mh-tailor. mts.conf.
+MAN5SRC = mh-alias. mh-format. mh-mail. mh-profile. mh-tailor.
MAN7SRC = mmh-intro. mh-draft. mh-sequence.
.nf
.ta \w'%etcdir%/ExtraBigFileName 'u
^$HOME/.mmh/profile~^The user profile
-^%etcdir%/mts.conf~^nmh mts configuration file
.fi
.SH "PROFILE COMPONENTS"
.fc ^ ~
.nf
.ta \w'%etcdir%/ExtraBigFileName 'u
-^%etcdir%/mts.conf~^nmh mts configuration file
^/etc/passwd~^List of users
^/etc/group~^List of groups
^%bindir%/mhmail~^Program to send mail
.nf
.ta \w'%etcdir%/ExtraBigFileName 'u
^$HOME/.mmh/profile~^The user profile
-^%etcdir%/mts.conf~^nmh mts configuration file
^%mailspool%/$USER~^Location of mail drop
.fi
.\"
.TH MH-TAILOR %manext5% "%nmhdate%" MH.6.8 [%nmhversion%]
.SH NAME
-mh-tailor, mts.conf \- mail transport customization for nmh message handler
-.SH SYNOPSIS
-.I %etcdir%/mts.conf
+mh\-tailor \- obsolete man page
.SH DESCRIPTION
-The file
-.I %etcdir%/mts.conf
-defines run-time options for those
-.B nmh
-programs which interact (in some form) with the message transport system.
-At present, these (user) programs are:
-.BR ap ,
-.BR conflict ,
-.BR inc ,
-.BR msgchk ,
-.BR post ,
-.BR rcvdist ,
-and
-.BR rcvpack .
-.PP
-Each option should be given on a single line. Blank lines and lines
-which begin with `#' are ignored. The options available along with
-default values and a description of their meanings are listed below:
-.PP
+.B "This man page is in transition state.
+.B "It's original use is gone.
+.B "Eventually it will be removed.
+.B "Until then, it contains information that have no better place yet.
+.SS "Spost's handling of From: headers
.B spost
will send messages by forking a
local copy of
rather than constructing its own. However, to discourage email forgery, the
SMTP envelope \*(lqFrom:\*(rq and a \*(lqSender:\*(rq header are set to the user's real address.
.RE
-.PP
-.BR maildelivery :
-%libdir%/maildelivery
-.RS 5
-The name of the system-wide default
-.I maildelivery
-file.
-See
-.BR slocal (1)
-for the details.
.SS "File Locking"
A few words on locking:
.B nmh
.BR nmh ,
you should see how locking is done at
your site, and set the appropriate values.
-
-.SH FILES
-.fc ^ ~
-.nf
-.ta \w'%etcdir%/ExtraBigFileName 'u
-^%etcdir%/mts.conf~^nmh mts configuration file
-.fi
-
-.SH "PROFILE COMPONENTS"
-None
-
-.SH "SEE ALSO"
-mh\-mts(8), post(8)
-
-.SH DEFAULTS
-As listed above
+++ /dev/null
-.so man5/mh-tailor.5
.ta \w'%etcdir%/ExtraBigFileName 'u
^%etcdir%/rcvdistcomps~^Default message skeleton
^or $HOME/.mmh/rcvdistcomps~^Rather than standard message skeleton
-^%etcdir%/mts.conf~^nmh mts configuration file
^$HOME/\&.maildelivery~^The file controlling local delivery
^%etcdir%/maildelivery~^Rather than the standard file
.fi
.fc ^ ~
.nf
.ta \w'%etcdir%/ExtraBigFileName 'u
-^%etcdir%/mts.conf~^nmh mts configuration file
.fi
.SH "SEE ALSO"
.fc ^ ~
.nf
.ta \w'%etcdir%/ExtraBigFileName 'u
-^%etcdir%/mts.conf~^nmh mts configuration file
^$HOME/\&.maildelivery~^The file controlling local delivery
^%etcdir%/maildelivery~^Rather than the standard file
.fi
.fc ^ ~
.nf
.ta \w'%etcdir%/ExtraBigFileName 'u
-^%etcdir%/mts.conf~^nmh mts configuration file
^$HOME/\&.maildelivery~^The file controlling local delivery
^%etcdir%/maildelivery~^Rather than the standard file
^%mailspool%/$USER~^The default maildrop
dtimep.c: dtimep.lex
$(LEX) -n -t $(srcdir)/dtimep.lex > dtimep.c
-mts.o: mts.c
- $(COMPILE2) $(srcdir)/mts.c
-
pidstatus.o: sigmsg.h
libmh.a: $(OBJS)
** the eom() macro returns FALSE saying we aren't at the end of the
** message.
**
-** The next thing to do is to read the mts.conf file and initialize
-** delimiter[] and delimlen accordingly...
-**
** After mhl was made a built-in in msh, m_getfld() worked just fine
** (using m_unknown() at startup). Until one day: a message which was
** the result of a bursting was shown. Then, since the burst boundaries
** the code gets executed is when inc (or msh) calls it, and both of these
** have already called mts_init().
**
+** [ Note by meillo 2012-02:
+** MMDF-style maildrops (4x ^A) and mts_init() were removed. ]
+**
** ------------------------
** (Written by Van Jacobson for the mh6 m_getfld, January, 1986):
**
/*
** static prototypes
*/
-static char *tailor_value(unsigned char *);
static void getuserinfo(void);
-static const char *get_mtsconf_pathname(void);
-static const char *get_mtsuserconf_pathname(void);
-static void mts_read_conf_file(FILE *fp);
-
-/*
-** nmh mail transport interface customization file
-*/
-static char *mtsconf = NMHETCDIR"/mts.conf";
-
/* Cache the username and fullname of the user */
static char username[BUFSIZ];
static char fullname[BUFSIZ];
-/*
-** Global MailDelivery file
-*/
-char *maildelivery = NMHETCDIR"/maildelivery";
-
-/*
-** Customize the MTS settings for nmh by adjusting
-** the file mts.conf in the nmh etc directory.
-*/
-
-struct bind {
- char *keyword;
- char **value;
-};
-
-static struct bind binds[] = {
- { "maildelivery", &maildelivery },
- { NULL, NULL }
-};
-
-
-/*
-** Read the configuration file for the nmh interface
-** to the mail transport system (MTS).
-*/
-
-void
-mts_init(char *name)
-{
- const char *cp;
- FILE *fp;
- static int inited = 0;
-
- if (inited++ || (fp = fopen(get_mtsconf_pathname(), "r")) == NULL)
- return;
- mts_read_conf_file(fp);
- fclose(fp);
-
- cp = get_mtsuserconf_pathname();
- if (cp != NULL &&
- ((fp = fopen(get_mtsuserconf_pathname(), "r")) != NULL)) {
- mts_read_conf_file(fp);
- fclose(fp);
- }
-}
-
-
-#define QUOTE '\\'
-
-/*
-** Convert escaped values, malloc some new space,
-** and copy string to malloc'ed memory.
-*/
-
-static char *
-tailor_value(unsigned char *s)
-{
- int i, r;
- char *bp;
- char buffer[BUFSIZ];
- size_t len;
-
- for (bp = buffer; *s; bp++, s++) {
- if (*s != QUOTE) {
- *bp = *s;
- } else {
- switch (*++s) {
- case 'b': *bp = '\b'; break;
- case 'f': *bp = '\f'; break;
- case 'n': *bp = '\n'; break;
- case 't': *bp = '\t'; break;
-
- case 0: s--;
- case QUOTE:
- *bp = QUOTE;
- break;
-
- default:
- if (!isdigit(*s)) {
- *bp++ = QUOTE;
- *bp = *s;
- }
- r = *s != '0' ? 10 : 8;
- for (i = 0; isdigit(*s); s++)
- i = i * r + *s - '0';
- s--;
- *bp = toascii(i);
- break;
- }
- }
- }
- *bp = 0;
-
- len = strlen(buffer) + 1;
- bp = mh_xmalloc(len);
- memcpy(bp, buffer, len);
-
- return bp;
-}
/*
** Get the fully qualified name of the local host.
*/
-
char *
LocalName(void)
{
if (buffer[0])
return buffer;
- mts_init("mts");
-
memset(buffer, 0, sizeof(buffer));
#ifdef HAVE_UNAME
/* first get our local name */
** This is only for UUCP mail. It gets the hostname
** as part of the UUCP "domain".
*/
-
char *
SystemName(void)
{
if (buffer[0])
return buffer;
- mts_init("mts");
-
#ifdef HAVE_UNAME
uname(&name);
strncpy(buffer, name.nodename, sizeof(buffer));
/*
** Get the username of current user
*/
-
char *
getusername(void)
{
** Get full name of current user (typically from GECOS
** field of password file).
*/
-
char *
getfullname(void)
{
return;
}
-
-static const char*
-get_mtsconf_pathname(void)
-{
- const char *cp = getenv( "MHMTSCONF ");
- if (cp != NULL && *cp != '\0') {
- return cp;
- }
- return mtsconf;
-}
-
-static const char*
-get_mtsuserconf_pathname(void)
-{
- const char *cp = getenv( "MHMTSUSERCONF" );
- if (cp != NULL && *cp != '\0') {
- return cp;
- }
- return NULL;
-}
-
-static void
-mts_read_conf_file(FILE *fp)
-{
- unsigned char *bp;
- char *cp, buffer[BUFSIZ];
- struct bind *b;
-
- while (fgets(buffer, sizeof(buffer), fp)) {
- if (!(cp = strchr(buffer, '\n')))
- break;
- *cp = 0;
- if (*buffer == '#' || *buffer == '\0')
- continue;
- if (!(bp = strchr(buffer, ':')))
- break;
- *bp++ = 0;
- while (isspace(*bp))
- *bp++ = 0;
-
- for (b = binds; b->keyword; b++)
- if (strcmp(buffer, b->keyword)==0)
- break;
- if (b->keyword && (cp = tailor_value(bp)))
- *b->value = cp;
- }
-}
CC = @CC@
CFLAGS = @CFLAGS@
DEFS = @DEFS@
+CONFIGDEFS = -DNMHETCDIR='"$(etcdir)"'
INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-MTSLIB =
-# ../mts/libmts.a
NDBM_LIBS = @NDBM_LIBS@
-LOCALLIBS = ../config/version.o ../config/config.o $(MTSLIB) ../sbr/libmh.a
+LOCALLIBS = ../config/version.o ../config/config.o ../sbr/libmh.a
LINKLIBS = $(LOCALLIBS) $(LIBS)
LINT = @LINT@
LEXLIB = @LEXLIB@
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
+COMPILE2 = $(CC) -c $(DEFS) $(CONFIGDEFS) $(INCLUDES) $(CFLAGS)
LINK = $(CC) $(LDFLAGS) -o $@
LN = ln
show: show.o mhlsbr.o termsbr.o $(LOCALLIBS)
$(LINK) show.o mhlsbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
+slocal.o: slocal.c
+ $(COMPILE2) $(srcdir)/slocal.c
+
slocal: slocal.o aliasbr.o dropsbr.o $(LOCALLIBS)
$(LINK) slocal.o aliasbr.o dropsbr.o $(NDBM_LIBS) $(LINKLIBS)
/* read user profile/context */
context_read();
- mts_init(invo_name);
arguments = getarguments(invo_name, argc, argv, 1);
argp = arguments;
/* read user profile/context */
context_read();
- mts_init(invo_name);
arguments = getarguments(invo_name, argc, argv, 1);
argp = arguments;
if (context_foil(NULL) == -1)
done(1);
- mts_init(invo_name);
arguments = getarguments(invo_name, argc, argv, 0);
argp = arguments;
/* read user profile/context */
context_read();
- mts_init(invo_name);
arguments = getarguments(invo_name, argc, argv, 1);
argp = arguments;
/* read user profile/context */
context_read();
- mts_init(invo_name);
user = getusername();
arguments = getarguments(invo_name, argc, argv, 1);
/* read user profile/context */
context_read();
- mts_init(invo_name);
arguments = getarguments(invo_name, argc, argv, 1);
argp = arguments;
/* read user profile/context */
context_read();
- mts_init(invo_name);
arguments = getarguments(invo_name, argc, argv, 1);
argp = arguments;
/* read user profile/context */
context_read();
- mts_init(invo_name);
arguments = getarguments(invo_name, argc, argv, 1);
argp = arguments;
/* read user profile/context */
context_read();
- mts_init(invo_name);
arguments = getarguments(invo_name, argc, argv, 1);
argp = arguments;
/* read user profile/context */
context_read();
- mts_init(invo_name);
arguments = getarguments(invo_name, argc, argv, 1);
argp = arguments;
{ NULL, 0 }
};
+
+/* global maildelivery file */
+char *maildelivery = NMHETCDIR"/maildelivery";
+
+
static int globbed = 0; /* have we built "vars" table yet? */
static int parsed = 0; /* have we built header field table yet */
static int utmped = 0; /* have we scanned umtp(x) file yet */
if (context_foil(NULL) == -1)
done(1);
- mts_init(invo_name);
arguments = getarguments(invo_name, argc, argv, 0);
argp = arguments;
if (context_foil(NULL) == -1)
done(1);
- mts_init(invo_name);
arguments = getarguments(invo_name, argc, argv, 0);
argp = arguments;