Postfix access

In this access_files.cfg example, we specify a Postfix access table (/etc/postfix/access).  We have several different networks and wish to restrict mail to internal traffic only, hence all the #if ... #endif directives.

///////////////////////////////////////////////////////////////////////////////
//
// access_files.cfg
//
///////////////////////////////////////////////////////////////////////////////

access          path "/etc/postfix/access" mode 644 uid 0 gid 0

#if suse

        # ACCESS(5)                                               ACCESS(5)
        # 
        # NAME
        #        access - format of Postfix access table
        # 
        # SYNOPSIS
        #        postmap /etc/postfix/access
        # 
        
[text omitted here for brevity]
        
#endif

        127.0.0.1               OK
        localhost.localdomain   OK
        localhost               OK
#if mailserver
        earlymusichicago.org    OK
        192.168.4               OK
        192.168.2               OK
#else
#  if baksubnet
        192.168.2               OK
#  endif
#  if earthlinksubnet
        192.168.3               OK
#  endif
#  if roadrunnersubnet
        192.168.4               OK
#  endif
#endif

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

On the piktmaster system, we would install the access file to the naples system with the command:

# piktc -iv +F access +H naples

Here is the resulting access file as installed on the naples system (on the backup and Road Runner subnets):

# ACCESS(5)                                               ACCESS(5)
# 
# NAME
#        access - format of Postfix access table
# 
# SYNOPSIS
#        postmap /etc/postfix/access
# 

[text omitted here for brevity]

127.0.0.1               OK
localhost.localdomain   OK
localhost               OK
192.168.2               OK
192.168.4               OK

Open Hand 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 2010-04-15.   This site is PIKT® powered.
PIKT® is a registered trademark of the University of Chicago.   Copyright © 1998-2010 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
Postfix access table
config file