Receiver Policy Framework (RPF)

Author: Kazu Yamamoto
The latest version

Receiver Policy Framework (RPF) is a Milter program to change actions of e-mail receiver side according to results of the anti-spam technologies.

It supports IP/Domain based filtering, SPF(Sender Policy Framework), SenderID, DomainKeys, and DKIM.

RPF provides a language to describe policy. Here is an example:

// #ip
connect {
    accept: #ip == 127.0.0.1;
    continue;
}

// #spf, #mail_from
mail_from {
    accept: #spf == pass;
    continue;
}

// #from, #pra, #sender_id, #dkim_from, #domainkeys_from,
// #sig_dkim, #sig_domainkeys
header {
    accept: #sender_id == pass;
    reject: #mail_from == "yahoo.com" && #sig_domainkeys == No;
    continue;
}

// #dkim, #domainkeys
body {
    accept: #dkim == pass;
    accept: #domainkeys == pass;
    continue;
}

RPF is implemented against solve the dilemma of the anti-spam technologies. That is, SPF/Sender-ID is strong against ML but weak against forwarding while DomainKeys/DKIM is strong against forwarding but weak against ML. So, e-mail receiver would implement policy such that either result of SPF/Sender-ID or that of DomainKeys/DKIM is PASS, the server accepts the message.

RPF is written in Haskell without using libmilter. Comments, requests, and/or bug reports should be posted to github.