From: markus schnalke Date: Mon, 12 Dec 2011 13:09:44 +0000 (+0100) Subject: Removed the global alias file X-Git-Tag: mmh-thesis-end~455 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=fce8a87e8a4a443a08a98b24eef270451a63fab8;p=mmh Removed the global alias file Either use personal alias files or the MTA alias file. --- diff --git a/config/config.c b/config/config.c index 83ea0ae..2bcc435 100644 --- a/config/config.c +++ b/config/config.c @@ -246,12 +246,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) */ char *foldprot = "700"; diff --git a/etc/MailAliases b/etc/MailAliases deleted file mode 100644 index e8455db..0000000 --- a/etc/MailAliases +++ /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 (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) diff --git a/etc/Makefile.in b/etc/Makefile.in index c326577..e37b5f0 100644 --- a/etc/Makefile.in +++ b/etc/Makefile.in @@ -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 \ diff --git a/h/aliasbr.h b/h/aliasbr.h index c38223a..1e05335 100644 --- a/h/aliasbr.h +++ b/h/aliasbr.h @@ -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 */ diff --git a/man/ali.man b/man/ali.man index 772e967..4dbff4e 100644 --- a/man/ali.man +++ b/man/ali.man @@ -82,7 +82,6 @@ mh\-alias(5) .SH DEFAULTS .nf -.RB ` aliasfiles "' defaults to %etcdir%/MailAliases" .RB ` \-nolist ' .RB ` \-nonormalize ' .RB ` \-nouser ' diff --git a/man/conflict.man b/man/conflict.man index fc9cc99..fc2f8d7 100644 --- a/man/conflict.man +++ b/man/conflict.man @@ -76,9 +76,7 @@ None mh\-alias(5) .SH "DEFAULTS" -.nf -.RB ` aliasfiles "' defaults to %etcdir%/MailAliases" -.fi +None .SH CONTEXT None diff --git a/man/mh-alias.man b/man/mh-alias.man index 2087aea..35ff88f 100644 --- a/man/mh-alias.man +++ b/man/mh-alias.man @@ -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 ^ ~ diff --git a/man/mhparam.man b/man/mhparam.man index bed0a55..b561781 100644 --- a/man/mhparam.man +++ b/man/mhparam.man @@ -51,7 +51,7 @@ Examples: .PP .RS 5 .nf -.ta \w'AliasFile:'u+2n +.ta \w'LongEntry:'u+2n % mhparam path Mail diff --git a/man/post.man b/man/post.man index c90b4ee..b99ed0d 100644 --- a/man/post.man +++ b/man/post.man @@ -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 ' diff --git a/man/send.man b/man/send.man index 2edb7da..c1deede 100644 --- a/man/send.man +++ b/man/send.man @@ -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 ' diff --git a/man/whom.man b/man/whom.man index c054dcf..6a5a901 100644 --- a/man/whom.man +++ b/man/whom.man @@ -79,7 +79,6 @@ mh\-alias(5), post(8) .nf .RB ` file "' defaults to /draft" .RB ` \-nocheck ' -.RB ` \-alias "' defaults to %etcdir%/MailAliases" .fi .SH CONTEXT diff --git a/uip/ali.c b/uip/ali.c index a4ab295..289fa5d 100644 --- a/uip/ali.c +++ b/uip/ali.c @@ -137,7 +137,6 @@ main(int argc, char **argv) if (dp) free(dp); } - alias(AliasFile); } /* diff --git a/uip/aliasbr.c b/uip/aliasbr.c index 43a0e1b..1923867 100644 --- a/uip/aliasbr.c +++ b/uip/aliasbr.c @@ -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; diff --git a/uip/conflict.c b/uip/conflict.c index 5710aab..30ff189 100644 --- a/uip/conflict.c +++ b/uip/conflict.c @@ -116,8 +116,6 @@ main(int argc, char **argv) akv[akp++] = cp; } - if (akp == 0) - akv[akp++] = AliasFile; if (!homehead) init_pw(); if (!mail) diff --git a/uip/spost.c b/uip/spost.c index 0679ac6..76b68a4 100644 --- a/uip/spost.c +++ b/uip/spost.c @@ -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);