NAME

CfgTie::TieAliases -- an associative array of mail aliases to targets

SYNOPSIS

Makes it easy to manage the mail aliases (/etc/aliases) table as a hash.

tie %mtie,'CfgTie::TieAliases'

#Redirect mail for foo-man to root
$mtie{'foo-man'}=['root'];

DESCRIPTION

This PERL module ties to the /etc/aliases file so that things can be updated on the fly. When you tie the hash, you are allowed an optional parameter to specify what file to tie it to.

tie %mtie,'CfgTie::TieAliases'

or

tie %mtie,'CfgTie::TieAliases',I<aliases-like-file>

or

tie %mtie,'CfgTie::TieAliases',I<revision-control-object>

Format of the /etc/aliases file

The format of the /etc/aliases file is poorly documented. The format that CfgTie::TieAliases understands is documented as follows:

#comments

Anything after a hash mark (#) to the end of the line is treated as a comment, and ignored.

text:

The letters, digits, dashes, and underscores before a colon are treated as the name of an aliases. The alias will be expanded to whatever is on the line after the colon. (Each of those is in turn expanded).

Cavaets

Not all changes to are immediately reflected to the specified file. See the CfgTie::Cfgfile module for more information

See Also

CfgTie::Cfgfile, RCService, CfgTie::TieGeneric, CfgTie::TieGroup, CfgTie::TieHost, CfgTie::TieNamed, CfgTie::TieNet, CfgTie::TiePh, CfgTie::TieProto, CfgTie::TieServ, CfgTie::TieShadow, CfgTie::TieUser

aliases(5) newaliases(1)

Author

Randall Maas (randym@acm.org)