get postfwd | tarball | https
Apr 2019: postfwd3 2.02 is available at postfwd-2.02 (tarball). Please refer to the changelog and the manual for more information.
Mar 2019: postfwd pre-built docker images are now based on alpine linux at DockerHub.
Nov 2018: postfwd can be found at GitHub.
Mar 2018: postfwd.org is now available via HTTPS.
postfwd is written in perl to combine complex postfix restrictions in a ruleset
similar to those of the most firewalls. The program uses the postfix policy delegation protocol to control access to the mail system before a message has been
accepted (please visit http://www.postfix.org/SMTPD_POLICY_README.html for more information).
It allows you to choose an action (e.g. reject, dunno) for a combination of several smtp parameters
(like sender and recipient address, size or the client's TLS fingerprint).
- Complex combinations of smtp parameters in a single rule
- Macros/ACLs/Groups for frequently used statements
- Combined asynchronous dnsbl lookups with arbitrary actions depending on the results
(e.g. allows dns whitelists or selective greylisting based on rbl lookup results)
- Automatic deactivation of non-responding dnsbls
- Rate limits for message count and size for any available item (user, client, sender, recipient, ...)
- Scoring system for fine granular access control
- Date/time based rules
- Conditional jumps to certain rules (like iptables -j)
- Internal caching for requests and dns lookups
- Runs as network daemon (no need to spawn processes)
- Built in statistics for rule efficiency analysis
Here you will receive the latest announcements regarding new versions
and related topics. Volume will be very low. Subscribe to this list at
Here users will be able to share their experiences and ask questions regarding the
setup or configuration of postfwd. Volume will be low. Subscribe to this list at
- contact the developer
If you don't want to use the public mailinglists you are welcome to share your experiences
with postfwd by e-mail to info (AT) postfwd (DOT) org.
Required PERL modules
To install them you may either run:
perl -MCPAN -e shell
or get them from CPAN archive and run:
On debian based distributions you could run:
apt-get update && apt-get install \
On alpine you could run:
apk update && apk add \
Development, testing and hosting of postfwd consumes time and ressources. It is and will stay free software (see "License" below). If you want to support this, consider a donation at https://www.paypal.me/postfwd.
postfwd is free software and released under BSD license, which basically means that you can do what you want as long as you keep the copyright notice below:
Copyright (c) 2007 - 2019, Jan Peter Kessler
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ME ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the authors nor the names of his contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.