UNSW   Faculty of Engineering myCSEPRINT VERSIONSITE MAP  
cse | School of Computer Science and Engineering (CRICOS Provider No. 00098G)
    #About CSE     #Undergraduate Study     #Postgraduate Study     #Timetables & Courses     #Research & Publications     #People & Work Units     #Help & Resources     #News & Events     #High School Portal

Manual Lookup

This index can be searched by supplying a specific command name or a regular expression prefixed with a slash (/).

You might also be interested using tkman, which provides a graphical interface to the man pages.

[ Searched 64 directories in 0 seconds. ]

[ /usr/local/man/cat1/mlalias.1 ]

MLALIAS(1L)                                                        MLALIAS(1L)

       mlalias - program to examine and manipulate the mail alias database.

       mlalias [-CTpqrtv] alias [-A owner] [-D owner]
               [-M moderator] [-c comment]
               [-a address...]  [-d address...]  [-s address...]
               [-f flagname] [-u username]
       mlalias -R alias
       mlalias -l [-Trv]
       mlalias -e [-nx] [-H homedomain] [-S sender] alias
       mlalias -E [-nx] [-H homedomain] [-S sender]
       mlalias -m alias [ address ]
       mlalias -mg [ address ]
       mlalias -L [flagname]

       mlalias  is  the  user agent for accessing and modifying the mail alias

       The mail alias database contains alias, mailing lists,  and  forwarding
       information.  Each entry contains:

       A name which is the key by which entries are looked up.  When comparing
              keys, the case of letters is ignored, and hyphen, underscore and
              period ('-', '_', '.') are treated as equivalent.

       A comment
              which can be used to describe the purpose of this entry

       A list of addresses
              to which mail to this alias should be sent.

              These  address should be RFC822 conforming addresses, optionally
              with the @domain part left off.  Thus  they  can  have  comments
              included with individual addresses.

              When  an address is local, it is best to give just the localpart
              without the domain or any other decoration, as then mlalias  can
              immediately expand the name if a local alias exists.  See RFC822
              for definitions of addresses, domains and localparts.

       A list of owners
              who are allowed to change the entry, and are considered  respon-
              sible  for  it.   This list can also contain email addresses and
              netgroups of  people  who  are  allowed  to  post  to  moderated
              (restricted) aliases.

       A list of flags which selected between
              personal/system, public/private, privileged/unprivileged, moder-
              ated/members_can_post/unmoderated, and open/closed/optional.

       In the alias database there is a distinguished alias called postmaster.
       The  owners of this alias have ownership rights to every possible alias
       in the database, and thus can create any new alias.

       Users who are not registered owners of postmaster have more  restricted
       rights. They only have ownership rights to names:

              Which match their username,

              For which an alias exists that has that user listed as an owner,

              which have, as a prefix, a name which the user owns followed  by
              a period.

       e.g. If the user user1 is not an owner of postmaster but is an owner of
       name1 then user1 has ownership rights over the names  user1  user1.test
       name1  name1.fred name1.fred.frog etc.  This means that they can create
       aliases with these names and may manipulate them in various ways.

       Given this definition of name ownership, the following gives a complete
       list  of access permissions to aliases.  Note that the right to post to
       a moderated list is quite separate from these right, and  is  discussed

              Owners  of  the  alias  postmaster may create, delete, change or
              examine anything.

              Any owner of an alias may delete, change or examine that  alias,
              providing  that after the change, the owner is still an owner of
              the alias.

              Any user can create an alias providing that the alias  does  not
              already  exist,  and  that  the user is an owner of the name, as
              defined above.

              Any user can add their username to,  or  remove  their  username
              from, the list of addresses of any alias that is open.

              Anyone can examine any public alias.

              No other access is permitted.

       By  default,  mlalias  will  show  the alias in a human readable format
       after a manipulation of the database has occurred, providing the  alias
       was not private.  Specifying the ``-r'' option (for ``raw'') produces a
       machine readable format with one line per entry.  Specifying the ``-q''
       option is for quiet mode, no output is generated however an exit status
       is returned.

       Options are as follows:

       -C     Create a new mail alias. By default the alias address  list  and
              comment field will be empty, the owner will be the user who cre-
              ated the alias and the alias will be closed,  private  and  per-
              sonal.   Users can only create aliases for names which they own.
              See definition of name ownership above.

       -R     Remove a mail alias. The user must be an owner of the  alias  or
              an owner of the postmaster alias.

       -A     Add  an owner to a mail alias.  The user must be an owner of the
              alias or an owner of the postmaster alias.

       -D     Delete an owner from a mail alias. The user must be an owner  of
              the alias or an owner of the postmaster alias.

       -M     Make  a  particular owner the moderator of the alias (for moder-
              ated aliases). This is similar to -A but  makes  sure  that  the
              given  name  is  listed  first  among  the owners, so that it is
              treated as the moderator.  The user must  be  an  owner  of  the
              alias or an owner of the postmaster alias.

       -E     Expand an alias or list of aliases read from stdin.

       -e     Expand  a  list of aliases and list all the mail addresses which
              belong to the alias. The alias has to be public or the user must
              be  an  owner  of the alias or an owner of the postmaster alias.
              The addresses are listed one per line.  If any  address  in  the
              address  list  for  an expanded alias has an alias entry itself,
              that alias is expanded.  See ``Expansion'' for more details.

       -n     This is used in conjunction with -e or -E to inhibit the  expan-
              sion of aliases.  Rather, any name given which is the name of an
              alias is written to standard error. Other names, will be written
              to standard out.

       -x     This  is  used  in  conjunction with -e or -E in order to get an
              explanation (x for eXplanation) of expansions.  Rather than just
              listing all the final, un-expandable addresses,

       -i     Enter  interactive  address  checking  mode.   mlalias will read
              lines from input, strip surrounding spaces,  and  check  if  the
              name is a valid alias.  If it is the name is output with a lead-
              ing plus sign (+).  If not, it is output with  a  leading  minus
              sign  (-).   If an error occurs during alias lookup, the name is
              output with a leading question mark (?).  This can be used  with
              the  -w  flag to easily check if a number of local addresses are
              valid.  mlalias will list each final address preceded by an path
              tracing  how the address was arrived at. The path will contain a
              number of words separated by commas.  The first word will always
              be  ARG indicating that the address arrived (eventually) from an
              ARGument to the program. Subsequent words will be the  names  of
              aliases  that were expanded in arriving at this address, or will
              be the word Moderator.  The word Moderator  indicates  that  the
              preceding  word in the list names a moderated alias, and that it
              is being expanded to the address of the moderator instead of the
              members of the list.  If no alias expansion was performed at all
              to get an address, i.e. the address was given to mlalias and  no
              expansions were found, then the path given will just be the sin-
              gle word ARG.

              mlalias will only be able to tell if a moderated list should  be
              expanded  to  the  moderator  or  to  the members if the -S flag
              described below is used.

              If a particular final address is reached through multiple paths,
              then  it  will  be  listed  multiple  times, once for each path,
              except that if two paths end in the same alias, then only one of
              them  will  appear.  This is an implementation peculiarity which
              should not be depended upon and may change.

       -S sender
              email address of sender of mail for checking permission to  send
              to moderated lists. This is only meaningful with -e or -E.

              When  expanding  a moderated alias, mlalias needs to know if the
              sender is authorised or not.  If the sender is authorised,  then
              the alias is expanded normally. If the sender is not authorised,
              the alias is expanded to the first address listed  as  an  owner
              i.e.  the  moderator.   The -S flag is always used when the mail
              system does expansion so that mlalias can  make  a  judgment  on
              where to send the mail.

       -H homedomain
              local domain name to strip off the sender so that mail sent from
              local addresses will be checked against  local  names  properly.
              This is only meaningful with -e or -E and -S.  i.e. if the local
              domain is cse.unsw.edu.au and the user neilb (who is an owner of
              the  alias in question) sends mail to a moderated alias, mlalias
              will  be  told,  via  the   -S   flag   that   the   sender   is
              neilb@cse.unsw.edu.au.   In  order  of mlalias to determine that
              the  mail  is  from  an  owner,  it  needs  to  know  that   the
              @cse.unsw.edu.au  can  be  stripped off before comparing owners.
              This flag is used to tell it that.

       -a     Add the list of addresses to the alias.  The  user  must  be  an
              owner  of  the alias or an owner of the postmaster alias, or the
              alias must be open and the address  given  must  be  the  user's

       -d     Delete  the  list of addresses from the alias.  The user must be
              an owner of the alias or an owner of the  postmaster  alias,  or
              the  alias must be open and the address given must be the user's

              Note that it is possible to delete an address from an alias even
              if  it  is  not  explicitly  in  the  address  list, but is only
              implicit through membership of a list within the list.  This  is
              achieved  by adding the deleted address, prefixed with an excla-
              mation mark, to the address list.  The expansion process  under-
              stands  this  to  mean that the address, if ever found in a sub-
              sidiary aliases, should be excluded.

              As addresses can often be long, mlalias  makes  it  possible  to
              delete  an  address without giving the whole address.  If any of
              the addresses given to mlalias -d starts with a slash (/),  then
              mlalias  will  see if there are any addresses in the alias which
              contain the string following the slash.  If there  is  precisely
              one  such  address, then mlalias will asusme that is the address
              to be deleted.

       -f flagname
              Set the given flag.  See ``flags'' below  for  listing  the  the
              various  flags.   The  user  must be an owner of the alias or an
              owner of the postmaster alias.

       -c comment
              Replace the comment associated with the alias. The user must  be
              an owner of the alias or an owner of the postmaster alias.

       -r     Show  the  alias in its computer readable format. The alias must
              be public or the user must be an owner of the alias or an  owner
              of  the  postmaster alias. Each alias record is made up of field
              separated by colons where some fields  are  lists  separated  by
              commas. This computer readable format is:


              where dates and flags are integers.

       -s alias [address..]
              Set the address list in the alias to address(es) provided.

       -m alias address
              Find out whether address is in the recursively  expanded  alias.
              The  alias and any intermediate alias must be public or the user
              must be an owner of the alias or  an  owner  of  the  postmaster
              alias.   This  does  not  properly  check  recursive  membership
              through virtual aliases.

       -mg [address]
              To test membership globally.  Checks  for  address  within  each
              entry  of  the mlalias database.  If address is not provided the
              current user name is checked.

       -l     List of all the alias names which exist in the  alias  database.
              The aliases are listed one per line.

       -L flagname
              List  all  of the aliases in the aliases database which have the
              given flag set. The aliases are listed one per line.

       -v     Verbose list mode.  Lists the alias name and its associated com-
              ment.  This is only meaningful with -l and -L.

       -u username
              Ask mlalias to do access checks assuming that it is being run by
              the given user.  This will only be permitted if mlalias is being
              run  as  root, or if the given user has the name UID as the user
              who is running mlalias.  This means that a user with two  regis-
              tered  names  (e.g.  a student-number name and another name) can
              access aliases using either of these names.

       -p     Print alias listing after changes. Otherwise only  success/error
              messages  are  printed.  Note that this behaviour was previously
              the default.

       -q     Quiet mode, no output is generated  (including  error  messages)
              however an exit status is returned.

       -T     Trace  the  communication  protocol  between  server and client.
              Used for debugging purposes.

       -w     This poorly named flag causes mlalias to treat all usernames  as
              aliases to themselves, if they aren't real aliases.  This allows
              mlalias to be used to simply test if an address is a valid local
              address,  as  it  much  be an alias understood by an alias, or a
              valid user name.

       There are six pairs of flags meaningful for aliases. Five of these  can
       be set one way or the other on aliases, and can be matched on using the
       -L list flag. The fifth, virtual/real is only for display purposes.  It
       is not meaningful to set or match on it.  The pairs are:

              This  distinction is purely for human convenience.  People often
              want to look though the list of aliases without  being  bothered
              by individual personal aliases.  Aliases are created as personal
              by default, but can set to system by the owner.

              If an alias is open, then any user can add or delete their user-
              name from the list of addresses in the alias.  This allows self-
              subscription to lists.  If an alias is optional  then  any  user
              can  delete  themselves (if they are on the list) but cannot add
              themselves.  Aliases are closed by default.

              A private alias can only be viewed by an owner. A  public  alias
              can be viewed by anybody.  Making an alias private does not stop
              anyone sending mail through that alias.  It  only  stops  people
              seeing  the  list of addressees using mlalias.  Aliases are pri-
              vate by default.

              If an alias is moderated, the mail will  only  be  sent  to  the
              addressees  if  it  comes  from an owner. If mail comes from any
              address not listed as an owner, then it  will  be  sent  to  the
              first  name  on  the  owners  list,  who is considered to be the

              If an alias is members_can_post, then messages will only be for-
              warded  to  the  moderator  if  they  are not from an authorised
              poster or from a member of the list.  See owners below for  more
              detail on how the owner list is interpreted.

              If  an alias is privileged then any mail sent to it by an autho-
              rised poster (owner) will successfully be sent to any  moderated
              aliases  that  are mentioned on the address list, rather than to
              the moderator of those aliases.  Only an owner of postmaster may
              set the privileged flag.

              Virtual  aliases  are  described  below,  and don't exist in the
              alias database.  Thus they cannot be changed  or  deleted  using
              mlalias. It is not possible to set the virtual flag on an alias.

       There can be three types of names given in the owners field.  The  dis-
       tinctions  are  only  really  relevant  for  moderated aliases, but can
       affect other aliases too.

       True Owners
              Any owner which does not contain an '@' sign is considered to be
              a true owner.  The name will normally be a username of a user on
              the system.  Such an owner has complete access and modify rights
              to the alias (except as noted below), can post to the alias even
              if it is moderated, and will be included in the  owner-aliasname
              list  of the alias.  Note: The only modify restriction placed on
              true owners is that they cannot remove themselves as an owner of
              the  mlalias.  In order to hand over ownership of an mlalias the
              owner should add a new owner, then ask the new owner  to  remove

       Netgroup owners
              Any owner which starts with an '@' sign is a netgroup owner. Any
              (local) user who is a member of that netgroup  (the  owner  with
              the  '@'  removed) is allowed to post to the alias even if it is
              moderated. They do no have any other ownership rights.

       Authorised Posters
              Any owner which contains an '@' sign which is not at  the  start
              is  an  authorised poster. The "owner" is assumed to be an email
              address, and any  mail  from  that  address  is  passed  to  the
              addresses  in  the alias even if the alias is moderated.  Autho-
              rised posters are not on the owner-aliasname virtual list.

       As well as the aliases  stored  in  the  alias  database,  mlalias  can
       inspect  and  expand, but not modify, a number of virtual aliases.  Any
       name that would otherwise be a virtual alias can be overridden by  cre-
       ating  an  entry  in  the  alias database with the same name. i.e. real
       aliases override virtual aliases.

       The classes of virtual aliases are:

       Owner aliases.
              Any alias with a name that starts owner- is  assumed  to  be  an
              alias for the list of owners of the alias whose name follows the
              owner- prefix.  Thus owner-ss is a virtual alias which will send
              mail  to  anyone  listed  as an owner of the ss mail alias.  The
              owner of all owner- aliases is postmaster and  any  alias  which
              starts  owner-owner-  will  contain  precisely postmaster in the
              address list.

              Related to owner aliases are aliases.  Any  alias  with  a  name
              that starts moderator- is assumed to be an alias for the modera-
              tor of the alias whose name follows the moderator-  prefix.   If
              the named alias is not moderated, then the first owner listed in
              the owner list will be given as the moderator.

       username aliases
              mlalias will check any unknown name to see  if  it  is  a  valid
              username,  and if so will map the user-id back to a username. If
              the user name it gets back is different, implying that the  user
              has  multiple  user  names,  a virtual alias is created with the
              primary username as the address list.

       Yellow Pages aliases
              Largely for historical reasons, mlalias will lookup any  unknown
              name  in the mailforward YP map.  If a non-empty match is found,
              a virtual alias is created accordingly.

       netgroup aliases
              If an alias ends with  -list,  for  example  comp1011-list,  the
              remainder of the name is looked up in the netgroup YP map.  If a
              netgroup with that name exists then a virtual alias  is  created
              containing all users in the netgroup as the address list.

              A  netgroup  alias will always be moderated, and will get a list
              of owners (to determine allowed posters) by looking up the  net-
              group name in the aliasowner YP map.

              This  functionality  is currently implemented in the server, but
              will hopefully be move to the client one day.

       The mail system uses the -e or -E flag to find and  expand  aliases  in
       recipient  addresses. These command expand aliases recursively and take
       care to avoid recursion. There are a couple of  special  cases  in  the
       expansion processes.

       1      If  one  of  the  addresses  in an alias matches the name of the
              alias exactly, then the address is not expanded  again,  but  is
              included  in  the  final list of addresses.  Thus by creating an
              alias called, for example, fred and setting the address list  to
              fred and frederick@other.place mail to fred will be delivered to
              fred locally and to frederick@other.place.

              Note that this only works for singly recursive aliases. If alias
              A  contains  address B and address B contains address A then the
              expansion of either alias will be not include either A or B.

              Also, this only works for local recursion.  If the local  domain
              is  "cse.unsw.edu.au"  and  the  alias fred contains the address
              fred@cse.unsw.edu.au then mlalias will not notice, and  a  local
              forwarding  loop  will  be created, which the mail system should
              eventually detect and  cause  the  message  to  be  returned  to

       2      If the address list for an alias is empty, then it is treated as
              though it didn't exist and the name of the alias is included  in
              the  final list of addresses.  This means that accidentally cre-
              ating an empty mail alias will not cause all  your  mail  to  be
              lost.   It  also  means  that  if you want to create a mail list
              which does discard all mail, you have to  try  harder  (e.g.  by
              creating two mutually recursive aliases).

       3      If  an alias is moderated, and the -S and -H flags indicate that
              the expansion is not being done on  behalf  of  an  owner,  then
              rather  than expanding the alias to the list of addresses, it is
              expanded to the first name of the list of owners. This owner  is
              deemed  to  be the moderator, and is free to forward the mail to
              the list if they so choose.

       All errors are reported  unless  otherwise  requested  by  setting  the
       silent mode, mlalias returns the following exit status:
        0    Success
        1    Alias already exists (or doesn't exist)
        2    No permission to perform operation
        3    Failed to communicate with server or system error

       To view the alias "croissant_club":

        mlalias croissant_club

       The output will be of the form:
                    alias: croissant_club
                   owners: albert
             last changed: Thu Jan 23 14:56:18 1992
            last accessed: Thu Jan 23 14:56:18 1992
                   Status: closed and public and personal

       To  create an alias "compsoc" with the comment ``computer group alias''
       and add the addresses fred, john and steve:

        mlalias -C compsoc -c ``computer group alias'' -a fred john steve  ...

       To add fred and john to the compsoc ownerlist:

        mlalias -A fred -A john compsoc

       To  delete  steve as an owner and addressee of compsoc and make compsoc
       private and closed:

        mlalias -d compsoc steve -f pri -f closed -D steve

       To see if fred is an addressee of compsoc:

        mlalias -m compsoc fred

       To list all of the addresses of compsoc:

        mlalias -e compsoc

       To  remove  the  alias  compsoc   from   the   mail   alias   database:

        mlalias -R compsoc

       decode_aliases(8m), make_aliases(8m), alias_server(8m), netgroup(4).


Top Of Page

Site maintained by webmistress@cse.unsw.edu.au
Please read the UNSW Copyright & Disclaimer Statement