Home | History | Annotate | Line # | Download | only in conf
      1      1.1      tron #
      2      1.1      tron # Sample aliases file. Install in the location as specified by the
      3      1.1      tron # output from the command "postconf alias_maps". Typical path names
      4      1.1      tron # are /etc/aliases or /etc/mail/aliases.
      5      1.1      tron #
      6      1.1      tron #	>>>>>>>>>>      The program "newaliases" must be run after
      7      1.1      tron #	>> NOTE >>      this file is updated for any changes to
      8      1.1      tron #	>>>>>>>>>>      show through to Postfix.
      9      1.1      tron #
     10      1.1      tron 
     11      1.1      tron # Person who should get root's mail. Don't receive mail as root!
     12      1.1      tron #root:		you
     13      1.1      tron 
     14      1.1      tron # Basic system aliases -- these MUST be present
     15      1.1      tron MAILER-DAEMON:	postmaster
     16      1.1      tron postmaster:	root
     17      1.1      tron 
     18      1.1      tron # General redirections for pseudo accounts
     19      1.1      tron bin:		root
     20      1.1      tron daemon:		root
     21      1.1      tron named:		root
     22      1.1      tron nobody:		root
     23      1.1      tron uucp:		root
     24      1.1      tron www:		root
     25      1.1      tron ftp-bugs:	root
     26      1.1      tron postfix:	root
     27      1.1      tron 
     28      1.1      tron # Put your local aliases here.
     29      1.1      tron 
     30      1.1      tron # Well-known aliases
     31      1.1      tron manager:	root
     32      1.1      tron dumper:		root
     33      1.1      tron operator:	root
     34      1.1      tron abuse:		postmaster
     35      1.1      tron 
     36      1.1      tron # trap decode to catch security attacks
     37      1.1      tron decode:		root
     38      1.1      tron 
     39      1.1      tron # ALIASES(5)                                                          ALIASES(5)
     40      1.1      tron # 
     41      1.1      tron # NAME
     42      1.1      tron #        aliases - Postfix local alias database format
     43      1.1      tron # 
     44      1.1      tron # SYNOPSIS
     45      1.1      tron #        newaliases
     46      1.1      tron # 
     47  1.1.1.6  christos #        postalias -q name [file-type]:[file-name]
     48  1.1.1.6  christos # 
     49      1.1      tron # DESCRIPTION
     50  1.1.1.6  christos #        The  optional aliases(5) table (alias_maps) redirects mail
     51  1.1.1.6  christos #        for local recipients. The redirections  are  processed  by
     52  1.1.1.6  christos #        the  Postfix local(8) delivery agent. This table is always
     53  1.1.1.6  christos #        searched with an email address localpart (no  domain  por-
     54  1.1.1.6  christos #        tion).
     55  1.1.1.6  christos # 
     56  1.1.1.6  christos #        This  is  unlike  virtual(5) aliasing (virtual_alias_maps)
     57  1.1.1.6  christos #        which applies to all recipients:  local(8),  virtual,  and
     58  1.1.1.6  christos #        remote, and which is implemented by the cleanup(8) daemon.
     59  1.1.1.6  christos #        That table is often searched with  a  full  email  address
     60  1.1.1.6  christos #        (including domain).
     61      1.1      tron # 
     62      1.1      tron #        Normally, the aliases(5) table is specified as a text file
     63      1.1      tron #        that serves as input  to  the  postalias(1)  command.  The
     64      1.1      tron #        result,  an  indexed file in dbm or db format, is used for
     65      1.1      tron #        fast lookup  by  the  mail  system.  Execute  the  command
     66      1.1      tron #        newaliases  in  order  to  rebuild  the indexed file after
     67      1.1      tron #        changing the Postfix alias database.
     68      1.1      tron # 
     69  1.1.1.2      tron #        When the table is provided via other means  such  as  NIS,
     70  1.1.1.2      tron #        LDAP  or  SQL,  the  same lookups are done as for ordinary
     71  1.1.1.2      tron #        indexed files.
     72  1.1.1.2      tron # 
     73  1.1.1.3  christos #        Alternatively, the  table  can  be  provided  as  a  regu-
     74  1.1.1.3  christos #        lar-expression  map  where  patterns  are given as regular
     75  1.1.1.3  christos #        expressions. In this case,  the  lookups  are  done  in  a
     76  1.1.1.3  christos #        slightly  different  way as described below under "REGULAR
     77  1.1.1.3  christos #        EXPRESSION TABLES".
     78      1.1      tron # 
     79      1.1      tron #        Users can control delivery of their own mail by setting up
     80      1.1      tron #        .forward files in their home directory.  Lines in per-user
     81      1.1      tron #        .forward files have the same syntax as the right-hand side
     82      1.1      tron #        of aliases(5) entries.
     83      1.1      tron # 
     84      1.1      tron #        The format of the alias database input file is as follows:
     85      1.1      tron # 
     86      1.1      tron #        o      An alias definition has the form
     87      1.1      tron # 
     88      1.1      tron #                    name: value1, value2, ...
     89      1.1      tron # 
     90      1.1      tron #        o      Empty lines and whitespace-only lines are  ignored,
     91      1.1      tron #               as  are  lines whose first non-whitespace character
     92      1.1      tron #               is a `#'.
     93      1.1      tron # 
     94      1.1      tron #        o      A logical line starts with non-whitespace  text.  A
     95      1.1      tron #               line  that starts with whitespace continues a logi-
     96      1.1      tron #               cal line.
     97      1.1      tron # 
     98      1.1      tron #        The name is a local address (no domain part).  Use  double
     99      1.1      tron #        quotes  when the name contains any special characters such
    100      1.1      tron #        as whitespace, `#', `:', or `@'. The  name  is  folded  to
    101      1.1      tron #        lowercase, in order to make database lookups case insensi-
    102      1.1      tron #        tive.
    103      1.1      tron # 
    104  1.1.1.4  christos #        In addition, when an alias  exists  for  owner-name,  this
    105  1.1.1.4  christos #        will  override the envelope sender address, so that deliv-
    106  1.1.1.4  christos #        ery diagnostics are directed to owner-name, instead of the
    107  1.1.1.4  christos #        originator    of    the    message   (for   details,   see
    108  1.1.1.4  christos #        owner_request_special,       expand_owner_alias        and
    109  1.1.1.4  christos #        reset_owner_alias).   This  is  typically  used  to direct
    110  1.1.1.4  christos #        delivery errors to the maintainer of a mailing  list,  who
    111  1.1.1.4  christos #        is in a better position to deal with mailing list delivery
    112  1.1.1.4  christos #        problems than the originator of the undelivered mail.
    113      1.1      tron # 
    114      1.1      tron #        The value contains one or more of the following:
    115      1.1      tron # 
    116      1.1      tron #        address
    117      1.1      tron #               Mail is forwarded to address, which  is  compatible
    118      1.1      tron #               with the RFC 822 standard.
    119      1.1      tron # 
    120      1.1      tron #        /file/name
    121  1.1.1.5  christos #               Mail  is appended to /file/name. For details on how
    122  1.1.1.5  christos #               a file is written see the sections  "EXTERNAL  FILE
    123  1.1.1.5  christos #               DELIVERY"  and  "DELIVERY  RIGHTS"  in the local(8)
    124  1.1.1.5  christos #               documentation.  Delivery is not limited to  regular
    125  1.1.1.5  christos #               files.   For  example, to dispose of unwanted mail,
    126  1.1.1.5  christos #               deflect it to /dev/null.
    127      1.1      tron # 
    128      1.1      tron #        |command
    129      1.1      tron #               Mail is piped into command. Commands  that  contain
    130      1.1      tron #               special  characters,  such as whitespace, should be
    131  1.1.1.5  christos #               enclosed between double quotes. For details on  how
    132  1.1.1.5  christos #               a  command is executed see "EXTERNAL COMMAND DELIV-
    133  1.1.1.5  christos #               ERY" and "DELIVERY RIGHTS" in the local(8) documen-
    134  1.1.1.5  christos #               tation.
    135      1.1      tron # 
    136      1.1      tron #               When the command fails, a limited amount of command
    137      1.1      tron #               output is mailed back  to  the  sender.   The  file
    138      1.1      tron #               /usr/include/sysexits.h  defines  the expected exit
    139      1.1      tron #               status codes. For example, use "|exit 67" to  simu-
    140      1.1      tron #               late  a  "user  unknown"  error,  and  "|exit 0" to
    141      1.1      tron #               implement an expensive black hole.
    142      1.1      tron # 
    143      1.1      tron #        :include:/file/name
    144      1.1      tron #               Mail is sent to  the  destinations  listed  in  the
    145      1.1      tron #               named file.  Lines in :include: files have the same
    146  1.1.1.6  christos #               syntax  as  the  right-hand  side   of   aliases(5)
    147  1.1.1.6  christos #               entries.
    148      1.1      tron # 
    149      1.1      tron #               A  destination  can  be  any  destination  that  is
    150      1.1      tron #               described in this manual page. However, delivery to
    151      1.1      tron #               "|command" and /file/name is disallowed by default.
    152      1.1      tron #               To  enable,  edit  the  allow_mail_to_commands  and
    153      1.1      tron #               allow_mail_to_files configuration parameters.
    154      1.1      tron # 
    155      1.1      tron # ADDRESS EXTENSION
    156      1.1      tron #        When alias database search fails, and the recipient local-
    157  1.1.1.6  christos #        part contains  the  optional  recipient  delimiter  (e.g.,
    158  1.1.1.6  christos #        user+foo),  the  search  is  repeated  for  the unextended
    159      1.1      tron #        address (e.g., user).
    160      1.1      tron # 
    161  1.1.1.6  christos #        The  propagate_unmatched_extensions   parameter   controls
    162  1.1.1.6  christos #        whether  an  unmatched  address extension (+foo) is propa-
    163      1.1      tron #        gated to the result of table lookup.
    164      1.1      tron # 
    165      1.1      tron # CASE FOLDING
    166      1.1      tron #        The local(8) delivery agent always folds the search string
    167      1.1      tron #        to lowercase before database lookup.
    168      1.1      tron # 
    169  1.1.1.2      tron # REGULAR EXPRESSION TABLES
    170  1.1.1.6  christos #        This  section  describes how the table lookups change when
    171  1.1.1.2      tron #        the table is given in the form of regular expressions. For
    172  1.1.1.6  christos #        a  description  of regular expression lookup table syntax,
    173  1.1.1.6  christos #        see regexp_table(5) or pcre_table(5). NOTE: these  formats
    174  1.1.1.2      tron #        do not use ":" at the end of a pattern.
    175  1.1.1.2      tron # 
    176  1.1.1.6  christos #        Each  regular  expression  is applied to the entire search
    177  1.1.1.6  christos #        string. Thus, a search string user+foo is  not  broken  up
    178  1.1.1.2      tron #        into user and foo.
    179  1.1.1.2      tron # 
    180  1.1.1.6  christos #        Regular  expressions are applied in the order as specified
    181  1.1.1.6  christos #        in the table, until a regular  expression  is  found  that
    182  1.1.1.2      tron #        matches the search string.
    183  1.1.1.2      tron # 
    184  1.1.1.6  christos #        Lookup  results are the same as with indexed file lookups.
    185  1.1.1.6  christos #        For security reasons there is no support for $1,  $2  etc.
    186  1.1.1.2      tron #        substring interpolation.
    187  1.1.1.2      tron # 
    188      1.1      tron # SECURITY
    189  1.1.1.6  christos #        The  local(8)  delivery agent disallows regular expression
    190  1.1.1.6  christos #        substitution of $1 etc. in alias_maps, because that  would
    191      1.1      tron #        open a security hole.
    192      1.1      tron # 
    193  1.1.1.6  christos #        The  local(8) delivery agent will silently ignore requests
    194  1.1.1.6  christos #        to use the proxymap(8) server within  alias_maps.  Instead
    195  1.1.1.6  christos #        it  will  open the table directly.  Before Postfix version
    196  1.1.1.6  christos #        2.2, the local(8) delivery agent  will  terminate  with  a
    197      1.1      tron #        fatal error.
    198      1.1      tron # 
    199      1.1      tron # CONFIGURATION PARAMETERS
    200  1.1.1.6  christos #        The  following main.cf parameters are especially relevant.
    201  1.1.1.6  christos #        The text below provides  only  a  parameter  summary.  See
    202      1.1      tron #        postconf(5) for more details including examples.
    203      1.1      tron # 
    204  1.1.1.4  christos #        alias_database (see 'postconf -d' output)
    205  1.1.1.6  christos #               The  alias databases for local(8) delivery that are
    206  1.1.1.4  christos #               updated with "newaliases" or with "sendmail -bi".
    207  1.1.1.4  christos # 
    208  1.1.1.4  christos #        alias_maps (see 'postconf -d' output)
    209  1.1.1.6  christos #               Optional lookup tables that are searched only  with
    210  1.1.1.6  christos #               an  email  address  localpart  (no domain) and that
    211  1.1.1.6  christos #               apply only to local(8) recipients; this  is  unlike
    212  1.1.1.6  christos #               virtual_alias_maps  that  are often searched with a
    213  1.1.1.6  christos #               full email  address  (including  domain)  and  that
    214  1.1.1.6  christos #               apply  to  all  recipients:  local(8), virtual, and
    215  1.1.1.6  christos #               remote.
    216  1.1.1.4  christos # 
    217  1.1.1.4  christos #        allow_mail_to_commands (alias, forward)
    218  1.1.1.4  christos #               Restrict local(8) mail delivery  to  external  com-
    219  1.1.1.4  christos #               mands.
    220  1.1.1.4  christos # 
    221  1.1.1.4  christos #        allow_mail_to_files (alias, forward)
    222  1.1.1.4  christos #               Restrict  local(8) mail delivery to external files.
    223  1.1.1.4  christos # 
    224  1.1.1.4  christos #        expand_owner_alias (no)
    225  1.1.1.4  christos #               When delivering to an alias "aliasname" that has an
    226  1.1.1.4  christos #               "owner-aliasname" companion alias, set the envelope
    227  1.1.1.4  christos #               sender   address   to   the   expansion   of    the
    228  1.1.1.4  christos #               "owner-aliasname" alias.
    229  1.1.1.4  christos # 
    230  1.1.1.4  christos #        propagate_unmatched_extensions (canonical, virtual)
    231  1.1.1.4  christos #               What  address  lookup tables copy an address exten-
    232  1.1.1.4  christos #               sion from the lookup key to the lookup result.
    233  1.1.1.4  christos # 
    234  1.1.1.4  christos #        owner_request_special (yes)
    235  1.1.1.4  christos #               Enable special treatment for owner-listname entries
    236  1.1.1.4  christos #               in the aliases(5) file, and don't split owner-list-
    237  1.1.1.4  christos #               name and listname-request address  localparts  when
    238  1.1.1.4  christos #               the recipient_delimiter is set to "-".
    239  1.1.1.4  christos # 
    240  1.1.1.4  christos #        recipient_delimiter (empty)
    241  1.1.1.5  christos #               The  set  of  characters that can separate an email
    242  1.1.1.5  christos #               address localpart, user name, or  a  .forward  file
    243  1.1.1.5  christos #               name from its extension.
    244      1.1      tron # 
    245      1.1      tron #        Available in Postfix version 2.3 and later:
    246      1.1      tron # 
    247  1.1.1.4  christos #        frozen_delivered_to (yes)
    248  1.1.1.5  christos #               Update  the  local(8)  delivery agent's idea of the
    249  1.1.1.5  christos #               Delivered-To:    address    (see     prepend_deliv-
    250  1.1.1.5  christos #               ered_header)  only once, at the start of a delivery
    251  1.1.1.5  christos #               attempt; do not update  the  Delivered-To:  address
    252  1.1.1.4  christos #               while expanding aliases or .forward files.
    253      1.1      tron # 
    254      1.1      tron # STANDARDS
    255      1.1      tron #        RFC 822 (ARPA Internet Text Messages)
    256      1.1      tron # 
    257      1.1      tron # SEE ALSO
    258      1.1      tron #        local(8), local delivery agent
    259      1.1      tron #        newaliases(1), create/update alias database
    260      1.1      tron #        postalias(1), create/update alias database
    261      1.1      tron #        postconf(5), configuration parameters
    262      1.1      tron # 
    263      1.1      tron # README FILES
    264  1.1.1.5  christos #        Use  "postconf  readme_directory" or "postconf html_direc-
    265      1.1      tron #        tory" to locate this information.
    266      1.1      tron #        DATABASE_README, Postfix lookup table overview
    267      1.1      tron # 
    268      1.1      tron # LICENSE
    269  1.1.1.5  christos #        The Secure Mailer license must be  distributed  with  this
    270      1.1      tron #        software.
    271      1.1      tron # 
    272      1.1      tron # AUTHOR(S)
    273      1.1      tron #        Wietse Venema
    274      1.1      tron #        IBM T.J. Watson Research
    275      1.1      tron #        P.O. Box 704
    276      1.1      tron #        Yorktown Heights, NY 10598, USA
    277      1.1      tron # 
    278  1.1.1.3  christos #        Wietse Venema
    279  1.1.1.3  christos #        Google, Inc.
    280  1.1.1.3  christos #        111 8th Avenue
    281  1.1.1.3  christos #        New York, NY 10011, USA
    282  1.1.1.3  christos # 
    283      1.1      tron #                                                                     ALIASES(5)
    284