The Book of
Postfix

Downloads

This section contains scripts, data and patches that are used in The Book of Postfix.

Chapter 5

delete_from_mailq.pl
This script, written by Victor Duchovni, deletes any mail from the Postfix mailqueue which matches a regular expression given as argument to the script. See p.51
delete_from_mailq.pl.gz

Chapter 12

add_disclaimer.sh
This script helps to add a disclaimer to mail messages using Postfix and AlterMIME. See p.144
add_disclaimer.sh.gz
remove_amavisd-new_stale_files.sh
This script removes stale files from amavisd-new's $TEMPBASE directory. Call if from your cron service. See p.157
remove_amavisd-new_stale_files.sh.gz

Chapter 13

extract_e3k_recipients
A collection of scripts to extract valid recipients from a Microsoft Exchange servers Active Directory. It will also build a map for Postfix to be used in recipient validation. The collection contains extract_valid_recipients and extract_valid_senders. See p.181ff
extract_e3k_recipients.tar.gz

Chapter 14

build_virtual_maps.sh
This script builds all necessary virtual mailbox maps from one file. See p.202
build_virtual_maps.sh.gz
virtual_mailbox_domains.sql
This example SQL statement creates a table in MySQL with the default fields for virtual mailbox domains. See p.205
virtual_mailbox_domains.tar.gz

Chapter 15

smtpauth_mysql_database.sql
This example SQL statement creates a table in MySQL with the default fields that Cyrus SASL expects, plus an extra field that lets you disable relay access for a particular user. See p.239
smtpauth_mysql_database.sql.gz
smtpauth_postgresql_database.sql
This example SQL statement creates a table in PostgreSQL with the default fields that Cyrus SASL expects, plus an extra field that lets you disable relay access for a particular user. See p.240
smtpauth_postgresql_database.sql.gz

Chapter 18

add_ccerts_to_relay_clientcerts.sh
This script extracts MD5 fingerprints from a (directory of) certificate(s) that end on *.pem and adds them to a Postfix map that may be used to control certificate based relaying. See p.300
add_ccerts_to_relay_clientcerts.sh.tar.gz

Chapter 19

ldap.example.com.ldif
This OpenLDAP LDIF file is a dump from the Example, Inc. Corporation used in Chapter 19 of The Book of Postfix.
ldap.example.com.ldif.gz

Appendix A

rpmbuild_environment.sh
This script, written by Tuomo Soini, builds a rpmbuild environment to build RPMs as a regular user. See p. 415
rpmbuild_environment.sh.gz

Miscellaneous

These are scripts we did not refer to in The Book of Postfix, which we believe to be helpful in everyday tasks.

get_rejected_ips.sh
Print IP subnets with more than 5 mail rejections in the last 2 postfix logs. The script was written by Peter Kiem.
get_rejected_ips.sh.gz
postfix_errors.pl
filter from stdin or given file all "expected" errors/warnings so that we can see if something serious happens. The script was written by David Schweikert.
postfix_errors.pl.gz