karmad - Karmasphere policy daemon for Postfix
This is a small postfix policy server. It is spawned by spawn(8). It offers an interface between Postfix and Mail::Karmasphere::Client.
Add the following to /etc/postfix/master.cf:
karma unix - n n - 0 spawn user=nobody argv=/usr/local/bin/karmad-postfix --action=prepend --verbose-header --syslog
Add the following to /etc/postfix/main.cf:
karma_time_limit = 3600
Append the following to smtpd_recipient_restrictions, somewhere AFTER reject_unauth_destination:
Watch your mail.debug syslog go by; you should see queries and responses.
cutoff-failwill turn into a "fail/reject". Scores above
cutoff-passwill turn into a "pass". You should set these thresholds yourself: Karmasphere provides the score, but you decide policy. If you do not, they will default to +300 and -300.
If you're running postfix, you can set --action to one of
reject. Prepend will prepend an X-Karma header. Reject will cause any mail with a karma score below
cutoff-failto be rejected. Use this only if you are happy with the results you've observed.
If not specified, defaults to
If you've set
prepend, this flag will add two fields to the X-Karma header:
identitiesshows what was queried, and
query_idincludes the timestamp and (if available) the MTA's queue ID.) This is useful for debugging purposes: it allows one to replay the query.
Query credentials for authenticated queries. You only need to set this if you're querying a restricted feedset. For more information, see http://www.karmasphere.com/devzone/client/configuration#credentials
Hostname of the Karmasphere Query Server to connect to. Defaults to query.karmasphere.com. You probably don't need to set this, unless you have set up a local query server, in which case you should be following the directions provided with that server.
The name of the feedset you want to query. Defaults to karmasphere.email-sender. You probably don't need to set this.
Syslog verbosely to mail.info and mail.debug.
Copyright (c) 2005 Shevek, Karmasphere. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.