Skip to content

rhinterberger/pfpolicyd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust

pfpolicyd - Simple Postfix policy daemon

Features

  • Accounting and Quotas per sasl_username

Missing and future Features

Installation

Setup Database

How to Integrate to systemd

Usage

How to use this

Theory of Operation

pfpolicyd runs as service and listens for connections on a tcp port. It takes requests from Postfix via check_policy_service as defined in http://www.postfix.org/SMTPD_POLICY_README.html

It looks up the current and maximum quotas in the backend database with sasl_username as key. On current_quota < default_quota a accept response is sent back to Postfix, if quotas are exceeded, a defer response is sent. Values for daily and monthly quotas are incremented.

If there are no entries found in the database, an entry with default values will be automatically created. Current default values are 200 mails per day and 2000 per month.

At the moment database entries for current_quota need do be reset manually or with a cron-job every day and on the 1st of every month.

Every Postfix-connection is handled in a seperate Thread. You can connect multiple Postfixservers to a single instance of pfpolicyd.

About

Simple Postfix Policy Service in Rust

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published