The profile entry Aliasfile was introduced in MH-6.7 to replace the
-alias switches. Later, the profile entry was enhanced to support multiple
files. Now that spost reads the profile itself, there is no more need
to pass the file with switches. Operating with varying sets of alias
files is now only possible with different profiles, but that should be
a rare setup.
.I other-alias
.RS 5
Indicates aliases files for
.I other-alias
.RS 5
Indicates aliases files for
-This may be used instead of the
-.B \-alias
-.I file
-switch. (profile, no default)
+and
+.BR spost .
+(profile, no default)
.RE
.PP
.BR Draft\-Folder :
.RE
.PP
.BR Draft\-Folder :
-.RB [ \-alias
-.IR aliasfile ]
.RB [ \-verbose " | " \-noverbose ]
.RB [ msg
\&...]
.RB [ \-verbose " | " \-noverbose ]
.RB [ msg
\&...]
the appended fields and field reformatting. The `Fcc:' fields
will be removed from all outgoing copies of the message.
.PP
the appended fields and field reformatting. The `Fcc:' fields
will be removed from all outgoing copies of the message.
.PP
-The files specified by the profile entry `Aliasfile:' and any
-additional alias files given by the
-.B \-alias
-.I aliasfile
-switch will be
-read (more than one file, each preceded by
-.BR \-alias ,
-can be named).
+The files specified by the profile entry `Aliasfile:' will be read.
See
.BR mh\-alias (5)
for more information.
See
.BR mh\-alias (5)
for more information.
-.RB [ \-alias
-.IR aliasfile
-.RB " | " \-noalias ]
.RB [ \-verbose " | " \-noverbose ]
.I file
.RB [ \-Version ]
.RB [ \-verbose " | " \-noverbose ]
.I file
.RB [ \-Version ]
.B send
to send the Bcc message.)
.PP
.B send
to send the Bcc message.)
.PP
-The
-.B \-alias
-.I aliasfile
-switch can be used to specify a file that spost
-should take aliases from. More than one file can be specified, each
-being preceded with
-.BR \-alias .
-In any event, the alias file, set with the `Aliasfile' profile entry, is
-read first.
+The `Aliasfile' profile entry
+can be used to specify one or more files that spost
+should take aliases from.
static struct swit switches[] = {
static struct swit switches[] = {
-#define ALIASW 0
- { "alias aliasfile", 0 },
-#define DEBUGSW 1
{ "help", 0 },
{ NULL, 0 }
};
{ "help", 0 },
{ NULL, 0 }
};
int in, out;
int n;
char *cp, *maildir = NULL;
int in, out;
int n;
char *cp, *maildir = NULL;
- char buf[BUFSIZ], **ap, **argp, **arguments;
+ char buf[BUFSIZ], **argp, **arguments;
char *msgs[MAXARGS], *vec[MAXARGS];
char *files[MAXARGS];
struct msgs *mp;
char *msgs[MAXARGS], *vec[MAXARGS];
char *files[MAXARGS];
struct msgs *mp;
case NVERBSW:
vec[vecp++] = --cp;
continue;
case NVERBSW:
vec[vecp++] = --cp;
continue;
-
- case ALIASW:
- vec[vecp++] = --cp;
- if (!(cp = *argp++) || *cp == '-') {
- adios(NULL, "missing argument to %s",
- argp[-2]);
- }
- vec[vecp++] = cp;
- continue;
-
}
} else {
if (*cp == '/') {
}
} else {
if (*cp == '/') {
- /* check for "Aliasfile:" profile entry */
- if ((cp = context_find("Aliasfile"))) {
- char *dp = NULL;
-
- for (ap=brkstring(dp=getcpy(cp), " ", "\n"); ap && *ap; ap++) {
- vec[vecp++] = "-alias";
- vec[vecp++] = getcpy(etcpath(*ap));
- }
- }
-
if (!msgp && !nfiles) {
msgs[msgp++] = seq_cur;
}
if (!msgp && !nfiles) {
msgs[msgp++] = seq_cur;
}
{ "verbose", 0 },
#define NVERBSW 1
{ "noverbose", 2 },
{ "verbose", 0 },
#define NVERBSW 1
{ "noverbose", 2 },
-#define ALIASW 2
- { "alias aliasfile", 0 },
-#define NALIASW 3
- { "noalias", 2 },
-#define VERSIONSW 4
{ "dist", -4 }, /* interface from dist */
{ NULL, 0 }
};
{ "dist", -4 }, /* interface from dist */
{ NULL, 0 }
};
case NVERBSW:
verbose = 0;
continue;
case NVERBSW:
verbose = 0;
continue;
-
- case ALIASW:
- if (!(cp = *argp++) || *cp == '-')
- adios(NULL, "missing argument to %s",
- argp[-2]);
- aliasflg = 1;
- if ((state = alias(cp)) != AK_OK)
- adios(NULL, "aliasing error in file %s - %s", cp, akerror(state));
- continue;
- case NALIASW:
- aliasflg = 0;
- continue;
tmpfil = getcpy(m_mktemp2("/tmp/", invo_name, NULL, &out));
}
tmpfil = getcpy(m_mktemp2("/tmp/", invo_name, NULL, &out));
}
+ /* check for "Aliasfile:" profile entry */
+ if ((cp = context_find("Aliasfile"))) {
+ char *dp, **ap;
+
+ aliasflg = 1;
+ for (ap=brkstring(dp=getcpy(cp), " ", "\n"); ap && *ap;
+ ap++) {
+ if ((state = alias(etcpath(*ap))) != AK_OK) {
+ adios(NULL, "aliasing error in file %s: %s",
+ *ap, akerror(state));
+ }
+ }
+ }
+
+
hdrtab = (msgstate == normal) ? NHeaders : RHeaders;
for (compnum = 1, state = FLD;;) {
hdrtab = (msgstate == normal) ? NHeaders : RHeaders;
for (compnum = 1, state = FLD;;) {