Skip to content. | Skip to navigation

Navigation

You are here: Home / Support / Guides / Tools / Email / PolicyD / Introduction

Personal tools

PolicyD

A Postfix policy daemon

Introduction

PolicyD is a policy daemon for Postfix which allows you to make decisions about whether or not an email should be rejected or allowed to continue based on several criteria: quotas, anti-spam techniques etc..

Attributes of the source and destination (IP address, sender and recipient addresses) are used to categorise incoming mail into policies, then various modules are applied (if enabled for the matching policies) and if any determine that the mail is suspect the daemon can advise Postfix to reject the mail without further processing.

That further processing can be very expensive. PolicyD requires some database lookups (on a small ISP that might be tens of thousands of sqlite3 disks IO operations per second -- spread over several hosts) but allowing the mail through to something like Amavis and SpamAssassin might be several seconds of CPU per email. That's a huge cost in resource. Much better to nip spam in the bud if we can.

Also, buy some SSDs. Or some of these fancy new 3D XPoint chips...

PolicyD can prove very useful, it has some inconsistencies and could probably do with some meta-programming to allow you to cross reference results between tables.

Document Actions