Removed the global alias file
authormarkus schnalke <meillo@marmaro.de>
Mon, 12 Dec 2011 13:09:44 +0000 (14:09 +0100)
committermarkus schnalke <meillo@marmaro.de>
Mon, 12 Dec 2011 13:09:44 +0000 (14:09 +0100)
Either use personal alias files or the MTA alias file.

15 files changed:
config/config.c
etc/MailAliases [deleted file]
etc/Makefile.in
h/aliasbr.h
man/ali.man
man/conflict.man
man/mh-alias.man
man/mhparam.man
man/post.man
man/send.man
man/whom.man
uip/ali.c
uip/aliasbr.c
uip/conflict.c
uip/spost.c

index 83ea0ae..2bcc435 100644 (file)
@@ -246,12 +246,6 @@ char *defaulteditor = "vi";
 char *altmsglink = "@";
 
 /*
 char *altmsglink = "@";
 
 /*
-** This is the global nmh alias file.  It is somewhat obsolete, since
-** global aliases should be handled by the Mail Transport Agent (MTA).
-*/
-char *AliasFile = NMHETCDIR"/MailAliases";
-
-/*
 ** Folders (directories) are created with this protection (mode)
 */
 char *foldprot = "700";
 ** Folders (directories) are created with this protection (mode)
 */
 char *foldprot = "700";
diff --git a/etc/MailAliases b/etc/MailAliases
deleted file mode 100644 (file)
index e8455db..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-;
-; MailAliases -- nmh global aliases file
-;
-; This file is used to define aliases that are valid for all mh users.
-; This file is almost empty as MH now supports personal aliases.
-;
-; If you need to define system wide aliases such as "everyone", it is
-; preferable that this be done as the mail transport level, so that they
-; will be valid for users of other mail clients.
-
-; everyone: *
-
-; Blank lines and lines beginning with a ; are ignored.
-; < file        -> read more aliases from "file"
-; foo: fum      -> simple replacement
-; foo: fum, fie -> list replacement
-; foo: < file   -> list replacement from "file"
-; foo: = group  -> list replacement from UNIX group
-; foo: + group  -> list replacement by ALL users in /etc/passwd
-;                  with gid == group
-; foo: *        -> list replacement by ALL users in /etc/passwd
-;                  with uid >= 200
-; foo*: fum     -> matches foo<string> (including the empty string)
-;
-; using a ';' instead of a ':' indicates that the alias should be displayed
-; along with the addresses used (normally, the addresses replace the alias
-; completely)
index c326577..e37b5f0 100644 (file)
@@ -35,7 +35,7 @@ SED = sed
 .SUFFIXES:
 
 # static configuration, format, and components files
 .SUFFIXES:
 
 # static configuration, format, and components files
-STATIC_FILES = MailAliases components digestcomps distcomps forwcomps  \
+STATIC_FILES = components digestcomps distcomps forwcomps  \
                mhl.body mhl.digest mhl.format mhl.forward mhl.headers  \
                mhl.reply rcvdistcomps rcvdistcomps.outbox              \
                replcomps replgroupcomps scan.MMDDYY scan.YYYYMMDD      \
                mhl.body mhl.digest mhl.format mhl.forward mhl.headers  \
                mhl.reply rcvdistcomps rcvdistcomps.outbox              \
                replcomps replgroupcomps scan.MMDDYY scan.YYYYMMDD      \
index c38223a..1e05335 100644 (file)
@@ -2,7 +2,6 @@
 ** aliasbr.h -- definitions for the aliasing system
 */
 
 ** aliasbr.h -- definitions for the aliasing system
 */
 
-extern char *AliasFile;         /* mh-alias(5)             */
 #define PASSWD "/etc/passwd"    /* passwd(5)               */
 #define GROUP   "/etc/group"    /* group(5)                */
 #define EVERYONE 200            /* lowest uid for everyone */
 #define PASSWD "/etc/passwd"    /* passwd(5)               */
 #define GROUP   "/etc/group"    /* group(5)                */
 #define EVERYONE 200            /* lowest uid for everyone */
index 772e967..4dbff4e 100644 (file)
@@ -82,7 +82,6 @@ mh\-alias(5)
 
 .SH DEFAULTS
 .nf
 
 .SH DEFAULTS
 .nf
-.RB ` aliasfiles "' defaults to %etcdir%/MailAliases"
 .RB ` \-nolist '
 .RB ` \-nonormalize '
 .RB ` \-nouser '
 .RB ` \-nolist '
 .RB ` \-nonormalize '
 .RB ` \-nouser '
index fc9cc99..fc2f8d7 100644 (file)
@@ -76,9 +76,7 @@ None
 mh\-alias(5)
 
 .SH "DEFAULTS"
 mh\-alias(5)
 
 .SH "DEFAULTS"
-.nf
-.RB ` aliasfiles "' defaults to %etcdir%/MailAliases"
-.fi
+None
 
 .SH CONTEXT
 None
 
 .SH CONTEXT
 None
index 2087aea..35ff88f 100644 (file)
@@ -9,17 +9,9 @@ any
 .B nmh
 command
 .SH DESCRIPTION
 .B nmh
 command
 .SH DESCRIPTION
-This describes both
+This describes
 .B nmh
 .B nmh
-personal alias files and
-the global alias file for
-.B nmh
-mail delivery, the file
-.PP
-.RS 5
-%etcdir%/MailAliases
-.RE
-.PP
+personal alias files.
 It does
 .B not
 describe aliases files used by the message transport system.
 It does
 .B not
 describe aliases files used by the message transport system.
@@ -140,10 +132,9 @@ the address list if it is not already on the list.  The alias itself is
 not usually output, rather the address\-group that the alias maps to is
 output instead.  If \*(lqalias\*(rq is terminated with a `;' instead of
 a `:', then both the \*(lqalias\*(rq and the address are output in the
 not usually output, rather the address\-group that the alias maps to is
 output instead.  If \*(lqalias\*(rq is terminated with a `;' instead of
 a `:', then both the \*(lqalias\*(rq and the address are output in the
-correct format.  (This makes replies possible since
+correct format.  (This makes replies possible since personal
 .B nmh
 .B nmh
-aliases
-and personal aliases are unknown to the mail transport system.)
+aliases are unknown to the mail transport system.)
 .RE
 .PP
 Since the alias file is read line by line, forward references work, but
 .RE
 .PP
 Since the alias file is read line by line, forward references work, but
@@ -246,11 +237,7 @@ file as appropriate.
 .RE
 
 .SH FILES
 .RE
 
 .SH FILES
-.fc ^ ~
-.nf
-.ta \w'%etcdir%/ExtraBigFileName  'u
-^%etcdir%/MailAliases~^global nmh alias file
-.fi
+None
 
 .SH "PROFILE COMPONENTS"
 .fc ^ ~
 
 .SH "PROFILE COMPONENTS"
 .fc ^ ~
index bed0a55..b561781 100644 (file)
@@ -51,7 +51,7 @@ Examples:
 .PP
 .RS 5
 .nf
 .PP
 .RS 5
 .nf
-.ta \w'AliasFile:'u+2n
+.ta \w'LongEntry:'u+2n
 % mhparam path
 Mail
 
 % mhparam path
 Mail
 
index c90b4ee..b99ed0d 100644 (file)
@@ -88,7 +88,7 @@ should take aliases from.  More than one file can be specified, each
 being preceded with
 .BR \-alias .
 In any event, the primary alias file is
 being preceded with
 .BR \-alias .
 In any event, the primary alias file is
-read first.
+read first. \" TODO: clarify. What means ``primary''?
 .PP
 The
 .B \-msgid
 .PP
 The
 .B \-msgid
@@ -187,7 +187,6 @@ entry in
 .nf
 .ta \w'%etcdir%/ExtraBigFileName  'u
 ^%etcdir%/mts.conf~^nmh mts configuration file
 .nf
 .ta \w'%etcdir%/ExtraBigFileName  'u
 ^%etcdir%/mts.conf~^nmh mts configuration file
-^%etcdir%/MailAliases~^global nmh alias file
 ^%bindir%/refile~^Program to process Fcc:s
 ^%libdir%/mhl~^Program to process Bcc:s
 .fi
 ^%bindir%/refile~^Program to process Fcc:s
 ^%libdir%/mhl~^Program to process Bcc:s
 .fi
@@ -206,7 +205,6 @@ mhmail(1), send(1), mh\-mail(5), mh\-alias(5), mh\-tailor(5),
 
 .SH DEFAULTS
 .nf
 
 .SH DEFAULTS
 .nf
-.RB ` \-alias "' defaults to %etcdir%/MailAliases"
 .RB ` \-format '
 .RB ` \-nomime '
 .RB ` \-nomsgid '
 .RB ` \-format '
 .RB ` \-nomime '
 .RB ` \-nomsgid '
index 2edb7da..c1deede 100644 (file)
@@ -320,7 +320,6 @@ comp(1), dist(1), forw(1), repl(1), mh\-alias(5), post(8)
 .SH DEFAULTS
 .nf
 .RB ` msg "' defaults to the current message in the draft folder"
 .SH DEFAULTS
 .nf
 .RB ` msg "' defaults to the current message in the draft folder"
-.RB ` \-alias "' defaults to %etcdir%/MailAliases"
 .RB ` \-nofilter '
 .RB ` \-format '
 .RB ` \-forward '
 .RB ` \-nofilter '
 .RB ` \-format '
 .RB ` \-forward '
index c054dcf..6a5a901 100644 (file)
@@ -79,7 +79,6 @@ mh\-alias(5), post(8)
 .nf
 .RB ` file "' defaults to <mh\-dir>/draft"
 .RB ` \-nocheck '
 .nf
 .RB ` file "' defaults to <mh\-dir>/draft"
 .RB ` \-nocheck '
-.RB ` \-alias "' defaults to  %etcdir%/MailAliases"
 .fi
 
 .SH CONTEXT
 .fi
 
 .SH CONTEXT
index a4ab295..289fa5d 100644 (file)
--- a/uip/ali.c
+++ b/uip/ali.c
@@ -137,7 +137,6 @@ main(int argc, char **argv)
                        if (dp)
                                free(dp);
                }
                        if (dp)
                                free(dp);
                }
-               alias(AliasFile);
        }
 
        /*
        }
 
        /*
index 43a0e1b..1923867 100644 (file)
@@ -53,9 +53,6 @@ akvalue(char *s)
 {
        register char *v;
 
 {
        register char *v;
 
-       if (akahead == NULL)
-               alias(AliasFile);
-
        akvis = -1;
        v = akval(akahead, s);
        if (akvis == -1)
        akvis = -1;
        v = akval(akahead, s);
        if (akvis == -1)
@@ -137,8 +134,7 @@ alias(char *file)
        register struct aka *ak = NULL;
        register FILE *fp;
 
        register struct aka *ak = NULL;
        register FILE *fp;
 
-       if (*file != '/'
-                       && (strncmp(file, "./", 2) && strncmp(file, "../", 3)))
+       if (*file!='/' && (strncmp(file, "./", 2) && strncmp(file, "../", 3)))
                file = etcpath(file);
        if ((fp = fopen(file, "r")) == NULL) {
                akerrst = file;
                file = etcpath(file);
        if ((fp = fopen(file, "r")) == NULL) {
                akerrst = file;
index 5710aab..30ff189 100644 (file)
@@ -116,8 +116,6 @@ main(int argc, char **argv)
                akv[akp++] = cp;
        }
 
                akv[akp++] = cp;
        }
 
-       if (akp == 0)
-               akv[akp++] = AliasFile;
        if (!homehead)
                init_pw();
        if (!mail)
        if (!homehead)
                init_pw();
        if (!mail)
index 0679ac6..76b68a4 100644 (file)
@@ -142,7 +142,7 @@ static int rmflg = 1;  /* remove temporary file when done */
 static int watch = 0;  /* watch the delivery process */
 static int backflg = 0;  /* rename input file as *.bak when done */
 static int pushflg = 0;  /* if going to fork to sendmail */
 static int watch = 0;  /* watch the delivery process */
 static int backflg = 0;  /* rename input file as *.bak when done */
 static int pushflg = 0;  /* if going to fork to sendmail */
-static int aliasflg = -1;  /* if going to process aliases */
+static int aliasflg = 0;  /* if going to process aliases */
 static int outputlinelen=72;
 
 static unsigned msgflags = 0;  /* what we've seen */
 static int outputlinelen=72;
 
 static unsigned msgflags = 0;  /* what we've seen */
@@ -284,10 +284,6 @@ main(int argc, char **argv)
                                case ALIASW:
                                        if (!(cp = *argp++) || *cp == '-')
                                                adios(NULL, "missing argument to %s", argp[-2]);
                                case ALIASW:
                                        if (!(cp = *argp++) || *cp == '-')
                                                adios(NULL, "missing argument to %s", argp[-2]);
-                                       if (aliasflg < 0) {
-                                               /* load default aka's */
-                                               alias(AliasFile);
-                                       }
                                        aliasflg = 1;
                                        if ((state = alias(cp)) != AK_OK)
                                                adios(NULL, "aliasing error in file %s - %s", cp, akerror(state) );
                                        aliasflg = 1;
                                        if ((state = alias(cp)) != AK_OK)
                                                adios(NULL, "aliasing error in file %s - %s", cp, akerror(state) );
@@ -325,9 +321,6 @@ main(int argc, char **argv)
                        msg = cp;
        }
 
                        msg = cp;
        }
 
-       if (aliasflg < 0)
-               alias(AliasFile);  /* load default aka's */
-
        if (!msg)
                adios(NULL, "usage: %s [switches] file", invo_name);
 
        if (!msg)
                adios(NULL, "usage: %s [switches] file", invo_name);