ALIASDB(3)ALIASDB(3)NAME
alias_setent, alias_getent, alias_getbyname, alias_end - get mail alias
database entries
SYNOPSIS
#include <aliasdb.h>
alias_ent *alias_getbyname(char *name);
void alias_setent(void)
alias_ent *alias_getent(void);
void alias_endent(void);
DESCRIPTION
These routines retrieve information from the mail alias database.
alias_getbyname is useful for looking up a single mail alias. The
other routines are used for getting all of the aliases. alias_setent
initializes the library to point to the beginning of the mail alias
list. alias_getent (currently disabled) returns the next alias entry,
or NULL for end of list. alias_endent is called to free up any
resources that may have been allocated during lookups. The following
example illustrates how these latter three routines are typically used:
aliasent *alias;
alias_setent();
while (alias = alias_getent()) {
handle(alias);
}
alias_endent();
The structure returned by alias_getbyname and alias_getent is defined
as follows:
typedef struct aliasent {
char *alias_name;
unsigned alias_members_len;
char **alias_members;
int alias_local;
} aliasent;
alias_name the name of the mail alias. alias_members_len is the number
of members of this alias. alias_members is an array of strings
containing the names of each of the members. alias_local indicates
whether or not this is a local alias.
SEE ALSOaliases(5)BUGS
The alias_getent function is disabled.
Currently, these routines only retrieve information from NetInfo and
cannot locate alias entries in /etc/sendmail/aliases or Yellow Pages,
even though sendmail(8) may be able to find them.
7th Edition June 21, 1989 ALIASDB(3)