You will probably want to use the included ServerKit personality as a starting point, found in the source archive as a directory named personality. Within the personality you will find a c11n file, a modules subdirectory, and a svsdir subdirectory.
The c11n file is a ServerKit configuration file, you will need to at least modify the database settings so ServerKit can successfully communicate with your database system. Another configuration value that you will definitely have to set is action_query_format_string.
The action_query_format_string is the SQL query postfix-policy will use to retrieve an action to send back to Postfix in response to policy delegation requests. See the Configuration section for a list of supported substitutions for use in the format string.
You are responsible for creating a query that is compatible with your mail system database schema, and ensuring that the query will:
For an explanation of valid policy action responses, see the access(5) manual reference from Postfix, you're interested in the *ACTIONS sections
| Name | Type | Description |
|---|---|---|
| min_sessions | integer | Minimum number of sessions to allocate. |
| max_sessions | integer | Maximum number of sessions to allocate. |
| min_threads | integer | Minimum number of worker threads to create. |
| max_threads | integer | Maximum number of worker threads to create. |
| backlog | integer | Size of kernel-level connection backlog, passed to listen() as-is. |
| database | string | Identifier of database connection pool instance to use, see ServerKit configuration for assistance with database connection pool configuration. |
| socket_path | string | Path to use for the UNIX socket Postfix will communicate with postfix-policy through. See SMTPD_POLICY_README from your Postfix documentation for information on configuring Postfix to use this socket for policy checks. |
| action_query_format_string | string | SQL query with some special characters which get substituted at runtime. Currently supported substitutions include:
|
You can query the module for its supported configuration options by simply running it like a normal executable program. This is the preferred method of keeping informed on what configuration values are supported and what the defaults are.
Here is some sample output of running the module:
swivel@volatile:~/postfix-policy$ ./postfix-policy.so ServerKit bundled module inspector - Summary - Name: postfix_policy Description: High performance Postfix policy server Version: 0.0.2 Authors: Vito Caputo |
| Release date | Tar.gz | MD5 checksum |
|---|---|---|
| 12-04-2007 | postfix-policy-0.0.3.tar.gz | 2b1bd771fb74d038246ac3c3efa3a346 |
| 12-16-2006 | postfix-policy-0.0.2.tar.gz | 208aa3adc9130d12919fa6bbd5fd3dab |
| 12-12-2006 | postfix-policy-0.0.1.tar.gz | 4ac071adb9d6d7387a58797ecf6ccab6 |
If you would like to contribute to this project monetarily, feel free to donate via the paypal button below.