]> git.marmaro.de Git - mmh/commitdiff
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 83ea0aede99b34be935cf739e6f3b468ab6a7567..2bcc4359900ad3e6e0066672406c5142417b3333 100644 (file)
@@ -245,12 +245,6 @@ char *defaulteditor = "vi";
 */
 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)
 */
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 c3265770115a6832d8d7345c4890812207e69818..e37b5f0decaf2a21bf5184f961cff6debe8e5b24 100644 (file)
@@ -35,7 +35,7 @@ SED = sed
 .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      \
index c38223a810b5c897d2780fc1f0204670f5cda7a4..1e0533564776c85086a378ca96fe52acedd17cf4 100644 (file)
@@ -2,7 +2,6 @@
 ** 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 */
index 772e967fabda8b383766cb51098ed953a92dfec3..4dbff4e0e68b664d41292682e1da9a71acd07544 100644 (file)
@@ -82,7 +82,6 @@ mh\-alias(5)
 
 .SH DEFAULTS
 .nf
-.RB ` aliasfiles "' defaults to %etcdir%/MailAliases"
 .RB ` \-nolist '
 .RB ` \-nonormalize '
 .RB ` \-nouser '
index fc9cc99339c69f22eb8ed966fb9ac41d442d9ef5..fc2f8d7912329ba9e3e1e04f105b7dfedfc2e4fa 100644 (file)
@@ -76,9 +76,7 @@ None
 mh\-alias(5)
 
 .SH "DEFAULTS"
-.nf
-.RB ` aliasfiles "' defaults to %etcdir%/MailAliases"
-.fi
+None
 
 .SH CONTEXT
 None
index 2087aea9fba3a2d674d5b204691d683fb391ed72..35ff88f01b098f53eca501c89eae63581388f98a 100644 (file)
@@ -9,17 +9,9 @@ any
 .B nmh
 command
 .SH DESCRIPTION
-This describes both
+This describes
 .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.
@@ -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
-correct format.  (This makes replies possible since
+correct format.  (This makes replies possible since personal
 .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
@@ -246,11 +237,7 @@ file as appropriate.
 .RE
 
 .SH FILES
-.fc ^ ~
-.nf
-.ta \w'%etcdir%/ExtraBigFileName  'u
-^%etcdir%/MailAliases~^global nmh alias file
-.fi
+None
 
 .SH "PROFILE COMPONENTS"
 .fc ^ ~
index bed0a555508d1faed195fff374dcaea6c12f240f..b5617814c69761d6cbc3b20d29002084c314cb68 100644 (file)
@@ -51,7 +51,7 @@ Examples:
 .PP
 .RS 5
 .nf
-.ta \w'AliasFile:'u+2n
+.ta \w'LongEntry:'u+2n
 % mhparam path
 Mail
 
index c90b4ee711358e959459e39acdaddbc437b6b106..b99ed0ded6367fed31ebc973e5eb30d77f663d04 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
-read first.
+read first. \" TODO: clarify. What means ``primary''?
 .PP
 The
 .B \-msgid
@@ -187,7 +187,6 @@ entry in
 .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
@@ -206,7 +205,6 @@ mhmail(1), send(1), mh\-mail(5), mh\-alias(5), mh\-tailor(5),
 
 .SH DEFAULTS
 .nf
-.RB ` \-alias "' defaults to %etcdir%/MailAliases"
 .RB ` \-format '
 .RB ` \-nomime '
 .RB ` \-nomsgid '
index 2edb7da1a9767f16b3a28615cc56bdee243774b5..c1deede30e9204a2f37e996917d9ddf6f79bdd80 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"
-.RB ` \-alias "' defaults to %etcdir%/MailAliases"
 .RB ` \-nofilter '
 .RB ` \-format '
 .RB ` \-forward '
index c054dcf2b7c33229ca20e1ed885213fdc9e28200..6a5a9015d13c3d569230d820d2097c4527cb16e8 100644 (file)
@@ -79,7 +79,6 @@ mh\-alias(5), post(8)
 .nf
 .RB ` file "' defaults to <mh\-dir>/draft"
 .RB ` \-nocheck '
-.RB ` \-alias "' defaults to  %etcdir%/MailAliases"
 .fi
 
 .SH CONTEXT
index a4ab2950650960e599fde1c25233786d43d5e171..289fa5dc84af1842b12587f129aaf4b1f30eeb39 100644 (file)
--- a/uip/ali.c
+++ b/uip/ali.c
@@ -137,7 +137,6 @@ main(int argc, char **argv)
                        if (dp)
                                free(dp);
                }
-               alias(AliasFile);
        }
 
        /*
index 43a0e1b60e9d24c7e4c73587997106b20a5d6ac5..1923867611af9cf0857578c2e65753a998ab0994 100644 (file)
@@ -53,9 +53,6 @@ akvalue(char *s)
 {
        register char *v;
 
-       if (akahead == NULL)
-               alias(AliasFile);
-
        akvis = -1;
        v = akval(akahead, s);
        if (akvis == -1)
@@ -137,8 +134,7 @@ alias(char *file)
        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;
index 5710aab8cb7f45703df1bef489cc35b1e9dab10c..30ff189bf5388c2db75fc196510068f17ad2e441 100644 (file)
@@ -116,8 +116,6 @@ main(int argc, char **argv)
                akv[akp++] = cp;
        }
 
-       if (akp == 0)
-               akv[akp++] = AliasFile;
        if (!homehead)
                init_pw();
        if (!mail)
index 0679ac6bb6fa20a637d4cdfad1c68dc85376ca66..76b68a4e1ca7840a6f447ea6014dcbb97571a636 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 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 */
@@ -284,10 +284,6 @@ main(int argc, char **argv)
                                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) );
@@ -325,9 +321,6 @@ main(int argc, char **argv)
                        msg = cp;
        }
 
-       if (aliasflg < 0)
-               alias(AliasFile);  /* load default aka's */
-
        if (!msg)
                adios(NULL, "usage: %s [switches] file", invo_name);