2 Proprietary Rand Corporation
, 1981.
3 Further distribution of
this software
4 subject to the terms of the Rand
9 * aliascheck(name) will return an indication of whether name is
10 * a valid alias from AliasFile. The return values are:
14 * -1 -> an error in the alias file
19 char *AliasFile
= "/etc/MailAliases";
26 register char *cp
= buf
;
28 while(isalnum(*ptr
) || *ptr
== '/' || *ptr
== '-' ||
29 *ptr
== '.' || *ptr
== '*')
42 char line
[256], pbuf
[64];
45 if((a
= fopen(AliasFile
, "r")) == NULL
)
47 while(fgets(line
, sizeof line
, a
)) {
48 if(line
[0] == ';' || line
[0] == '\n') /* Comment Line */
50 if((pp
= parse(line
, pbuf
)) == NULL
) {
64 aleq(string
, aliasent
)
65 register char *string
, *aliasent
;
72 else if((c
|040) != (*aliasent
|040))
76 return *aliasent
== 0 || *aliasent
== '*';