projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Whoever originally added the -help switch to all the commands got too cute and
[mmh]
/
zotnet
/
mts
/
mts.c
diff --git
a/zotnet/mts/mts.c
b/zotnet/mts/mts.c
index
31d96bd
..
254a758
100644
(file)
--- a/
zotnet/mts/mts.c
+++ b/
zotnet/mts/mts.c
@@
-5,6
+5,7
@@
* $Id$
*/
* $Id$
*/
+#include "h/mh.h" /* for snprintf() */
#include <h/nmh.h>
#define nmhetcdir(file) NMHETCDIR#file
#include <h/nmh.h>
#define nmhetcdir(file) NMHETCDIR#file
@@
-60,7
+61,7
@@
static char username[BUFSIZ];
static char fullname[BUFSIZ];
/* variables for username masquerading */
static char fullname[BUFSIZ];
/* variables for username masquerading */
-static int MMailids = 0;
+int MMailids = 0; /* used from post.c as well as here */
static char *mmailid = "0";
static char *mmailid = "0";
@@
-285,9
+286,9
@@
LocalName (void)
/* first get our local name */
gethostname (buffer, sizeof(buffer));
#endif
/* first get our local name */
gethostname (buffer, sizeof(buffer));
#endif
-#ifndef BIND
+#ifdef HAVE_SETHOSTENT
sethostent (1);
sethostent (1);
-#endif
+#endif
/* now fully qualify our name */
if ((hp = gethostbyname (buffer)))
strncpy (buffer, hp->h_name, sizeof(buffer));
/* now fully qualify our name */
if ((hp = gethostbyname (buffer)))
strncpy (buffer, hp->h_name, sizeof(buffer));
@@
-374,7
+375,8
@@
getfullname (void)
/*
* Find the user's username and full name, and cache them.
/*
* Find the user's username and full name, and cache them.
- * It also handles mmailid processing (username masquerading)
+ * Also, handle "mmailid" username masquerading controlled from the GECOS field
+ * of the passwd file.
*/
static void
*/
static void
@@
-409,9
+411,13
@@
getuserinfo (void)
/*
* Do mmailid (username masquerading) processing. The GECOS
/*
* Do mmailid (username masquerading) processing. The GECOS
- * field should have the form "Full Name <fakeusername>".
+ * field should have the form "Full Name <fakeusername>". For instance,
+ * "Dan Harkless <Dan.Harkless>". Naturally, you'll want your MTA to have
+ * an alias (e.g. in /etc/aliases) from "fakeusername" to your account name.
*/
#ifndef GCOS_HACK
*/
#ifndef GCOS_HACK
+ /* What is this code here for? As of 2000-01-25, GCOS_HACK doesn't appear
+ anywhere else in nmh. -- Dan Harkless <dan-nmh@dilvish.speed.net> */
for (cp = fullname; *np && *np != (MMailids ? '<' : ','); *cp++ = *np++)
continue;
#else
for (cp = fullname; *np && *np != (MMailids ? '<' : ','); *cp++ = *np++)
continue;
#else