Your Linux Data Center Experts

Postfix Config Makefile

Introduction

This is a Makefile to put in /etc/postfix which will track changes to the config files and hash/regex files and will rebuild databases or restart Postfix when necessary.

The idea is that you can simply make whatever changes you need in /etc/postfix and then run "make" and this will do whatever is necessary to make those changes live.

Requirements

This Makefile relies on specific naming of the hash files such as "access-ip" for the hash map of IP rules, "access-rcptto" for the recipient rules, etc... It also expects that aliases exists as "/etc/postfix/aliases", and that your virtual regexps are in "virtual-regexp".

Features

Getting started

Simply download the latest Makefile and put it in place in "/etc/postfix/Makefile". Then run "make".

The Makefile expects configuration similar to the following:

smtpd_client_restrictions =
        permit_mynetworks
        permit_sasl_authenticated
        check_client_access hash:/etc/postfix/access-ip
        reject_unknown_client
smtpd_helo_restrictions =
        permit_mynetworks
        check_client_access hash:/etc/postfix/access-ip
        check_helo_access hash:/etc/postfix/access-helo
        reject_non_fqdn_hostname
        reject_invalid_hostname
smtpd_recipient_restrictions =
        permit_mynetworks
        permit_sasl_authenticated
        reject_unauth_destination
        check_recipient_access hash:/etc/postfix/access-rcptto
        check_sender_access hash:/etc/postfix/access-mailfrom
        check_client_access hash:/etc/postfix/access-ip
        reject_non_fqdn_hostname
        reject_invalid_hostname
        reject_non_fqdn_sender
        reject_non_fqdn_recipient
        reject_unknown_sender_domain
        reject_unknown_recipient_domain
smtpd_sender_restrictions =
        permit_mynetworks
        permit_sasl_authenticated
        check_sender_access hash:/etc/postfix/access-mailfrom
        check_client_access hash:/etc/postfix/access-ip
        reject_unknown_sender_domain
        reject_non_fqdn_sender
        reject_unknown_address
smtpd_data_restrictions =
        reject_unauth_pipelining

virtual_maps = regexp:/etc/postfix/virtual-regexp $alias_maps
local_recipient_maps = regexp:/etc/postfix/virtual-regexp

Download

You can download the latest Makefile from:

License

Postfix Config Makefile is released under the GPL.

Copyright

Postfix Config Makefile (source, binaries, report formats , documentation and all related matter) is copyright © 2006 Sean Reifschneider, tummy.com, ltd.