*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> aliases (5)              


 aliases(5)                                                       aliases(5)

 NAME    [Toc]    [Back]
      aliases - aliases file for sendmail

 SYNOPSIS    [Toc]    [Back]

 DESCRIPTION    [Toc]    [Back]
      The newaliases command (which is the same as sendmail -bi; see
      sendmail(1M)) builds the sendmail alias database from a text file.
      The default text file is /etc/mail/aliases.  Local addresses (local
      user names) are looked up in the alias database and expanded as
      necessary, unless the user name is preceded by a backslash (\).  When
      the aliases file contains multiple entries for a given alias, only the
      last entry is used.  Except when the m processing option (the send to
      me option) is set in the sendmail command or in the configuration
      file, /etc/mail/sendmail.cf, the sender is not included in any alias
      expansions.  For example, if joe sends a message to group, and the
      expansion of group includes joe, the message is not delivered to joe.

      Each line of the alias text file must be of the form:

           alias : mailing-list

      Mailing lists can be continued onto multiple lines.  Each continuation
      line must begin with white space.  Lines beginning with # are

      A mailing-list is a comma-separated list of one or more of the

           user-name                Local user names occurring in alias
                                    expansions will themselves be looked up
                                    in the alias database unless they are
                                    preceded by backslash (\).

           remote-address           The remote address syntax understood by
                                    sendmail is configured in the sendmail
                                    configuration file, and typically
                                    includes the RFC-822-style user@domain
                                    and the UUCP-style host!user.

           filename                 This must be an absolute path name.
                                    sendmail appends a message to the file
                                    only if the directory in which it
                                    resides is readable and searchable by
                                    all, and only if the file already
                                    exists, is not executable, and is
                                    writable by all.

           | command-line           sendmail pipes the message as standard
                                    input to the specified command.  If

 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003

 aliases(5)                                                       aliases(5)

                                    command-line contains blanks, it must be
                                    enclosed in quotation marks (").  For

                                    msgs: "|/usr/bin/msgs -s"

           :include:filename        sendmail reads filename for a list of
                                    recipient addresses and forwards the
                                    message to each.  For example, an alias
                                    such as:

                                    poets: ":include:/usr/local/lib/poets.list"

                                    would read /usr/local/lib/poets.list for
                                    the list of addresses making up the

      If a file named .forward exists in a user's home directory and is
      owned by the user, sendmail redirects mail for that user to the list
      of addresses in the .forward file.

      An address in a .forward or :include: file can be anything that can
      appear as a mailing-list in the alias text file.

      sendmail can run programs or write to files using .forward file. This
      is controlled by the /etc/shells file.  If the owner of the .forward
      file lacks a valid shell as listed in /etc/shells file, the execution
      of such programs will be disallowed. The user can still execute such
      programs by placing the special string /SENDMAIL/ANY/SHELL/ in the
      /etc/shells file.

      The alias database is examined before a recipient's .forward file is
      examined.  After aliasing has been done, local and valid recipients
      who have a .forward file in their home directory will have messages
      forwarded to the list of users defined in that file.

      Aliasing occurs only on local names.  Loops can not occur, since no
      message will be sent to any person more than once.

      Aliases defined in /etc/mail/aliases will NOT be expanded in headers
      from mailx (see mailx(1)), but WILL be visible over networks and in
      headers from rmail.  (see mail(1)).

      /etc/mail/aliases is only the raw data file. The actual aliasing
      information is placed into a binary format in the file
      /etc/mail/aliases.db using newaliases (see newaliases(1M)).

      A newaliases command should be executed each time the aliases file is
      changed in order for the change to take effect.  Note that the NIS
      alias maps are generated by ypmake using makemap, which leaves
      aliases.pag and aliases.dir in the /etc/mail directory.

 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003

 aliases(5)                                                       aliases(5)

 AUTHOR    [Toc]    [Back]
      aliases was developed by the University of California, Berkeley, and
      originally appeared in 4.0BSD.

 FILES    [Toc]    [Back]
      $HOME/.forward           User's mail forwarding file

      /etc/mail/aliases        raw data file for alias names

      /etc/mail/aliases.db     database of alias names

 SEE ALSO    [Toc]    [Back]
      mail(1), mailx(1), makemap(1M), newaliases(1M), sendmail(1M).

 Hewlett-Packard Company            - 3 -   HP-UX 11i Version 2: August 2003
[ Back ]
 Similar pages
Name OS Title
expand_alias HP-UX recursively expands the sendmail aliases
praliases HP-UX print system-wide sendmail aliases
sendmail.cf Tru64 Contains the sendmail configuration file data
newaliases HP-UX rebuilds the database for the mail aliases file
sendmail.m4 Tru64 Introduction to using m4 macros to create a sendmail.cf configuration file
which IRIX locate a program file including aliases and path (csh only)
newaliases OpenBSD rebuild the data base for the mail aliases file
which Tru64 Locates a program file including aliases and paths
which HP-UX locate a program file including aliases and paths
newaliases FreeBSD rebuild the data base for the mail aliases file
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service