Mail Aliases

In this sample aliases_files.cfg file, we specify the mail alias database, /etc/aliases (for example, for sendmail, Postfix, or some other mailer).  Note how the #include directive incorporates the aliases_common_files.cfg file, thereby allowing us to isolate local customizations from the installation default version of the aliases file.

///////////////////////////////////////////////////////////////////////////////
//
// aliases_files.cfg
//
///////////////////////////////////////////////////////////////////////////////

aliases         path "/etc/aliases" mode 644 uid 0 gid 0

#if suse

        # This is the aliases file - it says who gets mail for whom.
        #
        # >>>>>>>>>>      The program "newaliases" will need to be run
        # >> NOTE >>      after this file is updated for any changes
        # >>>>>>>>>>      to show through to sendmail.
        #
        
        # It is probably best to not work as user root and redirect all
        # email to "root" to the address of a HUMAN who deals with this
        # system's problems. Then you don't have to check for important
        # email too often on the root account.
        # The "\root" will make sure that email is also delivered to the
        # root-account, but also forwarded to the user "joe".
        #root:          joe, \root
        
        # Basic system aliases that MUST be present.
        postmaster:     root
        mailer-daemon:  postmaster
        
        # amavis
        virusalert:     root
        
        # General redirections for pseudo accounts in /etc/passwd.
        administrator:  root
        daemon:         root
        lp:             root
        news:           root
        uucp:           root
        games:          root
        man:            root
        at:             root
        postgres:       root
        mdom:           root
        amanda:         root
        ftp:            root
        wwwrun:         root
        squid:          root
        msql:           root
        gnats:          root
        nobody:         root
        # "bin" used to be in /etc/passwd
        bin:            root
        
        # Further well-known aliases for dns/news/ftp/mail/fax/web/gnats.
        newsadm:        news
        newsadmin:      news
        usenet:         news
        ftpadm:         ftp
        ftpadmin:       ftp
        ftp-adm:        ftp
        ftp-admin:      ftp
        hostmaster:     root
        mail:           postmaster
        postman:        postmaster
        post_office:    postmaster
        # "abuse" is often used to fight against spam email
        abuse:          postmaster
        spam:           postmaster
        faxadm:         root
        faxmaster:      root
        ##webmaster:    root
        gnats-admin:    root
        
#include <files/adm/aliases_common_files.cfg>
        
        mailman:        root
        mailman-owner:  mailman
        
        # Majordomo can be used to have mailinglists on your site.
        #majordomo:             "|/usr/lib/majordomo/wrapper majordomo"
        #owner-majordomo:       root,
        #majordomo-owner:       root,
        
        # sample entry for a majordomo mailing-list called "test"
        # read /usr/doc/packages/majordomo/README.linux for more information
        # replace "test" with a new name and put the administrator into
        # the "owner-test" alias instead of "root".
        #
        #test:                  "|/usr/lib/majordomo/wrapper resend -l test
                                                             test-outgoing"
        #test-outgoing:         :include:/var/lib/majordomo/lists/test
        #test-request:          "|/usr/lib/majordomo/wrapper majordomo -l test"
        #test-approval:         owner-test,
        #owner-test-outgoing:   owner-test,
        #owner-test-request:    owner-test,
        #owner-test:            root,
        #
        # if you have bulk_mailer installed, you can replace the above
        # "test-outgoing" line with the following:
        #test-outgoing:         "|/usr/bin/bulk_mailer [email protected]
                                  /var/lib/majordomo/lists/test"
        #

#elsif redhat

        [...]

[...]

#endif

///////////////////////////////////////////////////////////////////////////////

On the piktmaster system, we would install the aliases file to the venice SuSE Linux system with the command:

# piktc -iv +F aliases +H venice

For more examples, see Samples.

 
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2019-01-12.   This site is PIKT® powered.
Copyright © 1998-2019 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
Learn new
techniques for
alert e-mail routing