Either use personal alias files or the MTA alias file.
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";
+++ /dev/null
-;
-; 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)
.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 \
** 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 */
.SH DEFAULTS
.nf
-.RB ` aliasfiles "' defaults to %etcdir%/MailAliases"
.RB ` \-nolist '
.RB ` \-nonormalize '
.RB ` \-nouser '
mh\-alias(5)
.SH "DEFAULTS"
-.nf
-.RB ` aliasfiles "' defaults to %etcdir%/MailAliases"
-.fi
+None
.SH CONTEXT
None
.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.
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
.RE
.SH FILES
-.fc ^ ~
-.nf
-.ta \w'%etcdir%/ExtraBigFileName 'u
-^%etcdir%/MailAliases~^global nmh alias file
-.fi
+None
.SH "PROFILE COMPONENTS"
.fc ^ ~
.PP
.RS 5
.nf
-.ta \w'AliasFile:'u+2n
+.ta \w'LongEntry:'u+2n
% mhparam path
Mail
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
.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
.SH DEFAULTS
.nf
-.RB ` \-alias "' defaults to %etcdir%/MailAliases"
.RB ` \-format '
.RB ` \-nomime '
.RB ` \-nomsgid '
.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 '
.nf
.RB ` file "' defaults to <mh\-dir>/draft"
.RB ` \-nocheck '
-.RB ` \-alias "' defaults to %etcdir%/MailAliases"
.fi
.SH CONTEXT
if (dp)
free(dp);
}
- alias(AliasFile);
}
/*
{
register char *v;
- if (akahead == NULL)
- alias(AliasFile);
-
akvis = -1;
v = akval(akahead, s);
if (akvis == -1)
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;
akv[akp++] = cp;
}
- if (akp == 0)
- akv[akp++] = AliasFile;
if (!homehead)
init_pw();
if (!mail)
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 */
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) );
msg = cp;
}
- if (aliasflg < 0)
- alias(AliasFile); /* load default aka's */
-
if (!msg)
adios(NULL, "usage: %s [switches] file", invo_name);