NAME
karmad - Karmasphere policy daemon for Postfix
DESCRIPTION
This is a small postfix policy server. It is spawned by spawn(8). It offers an interface between Postfix and Mail::Karmasphere::Client.
USAGE
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:
check_policy_service unix:private/karma
Watch your mail.debug syslog go by; you should see queries and responses.
COMMAND LINE PARAMETERS
- --cutoff-pass
- --cutoff-fail
-
Recommended.
Scores below
cutoff-fail
will turn into a "fail/reject". Scores abovecutoff-pass
will 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. - --action
-
Optional.
If you're running postfix, you can set --action to one of
prepend
(default) orreject
. Prepend will prepend an X-Karma header. Reject will cause any mail with a karma score belowcutoff-fail
to be rejected. Use this only if you are happy with the results you've observed.If not specified, defaults to
prepend
. - --verbose-header
-
Optional.
If you've set
action
toprepend
, this flag will add two fields to the X-Karma header:identities
shows what was queried, andquery_id
includes the timestamp and (if available) the MTA's queue ID.) This is useful for debugging purposes: it allows one to replay the query. - --username
- --password
-
Optional.
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
- --server
-
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.
- --feedset
-
The name of the feedset you want to query. Defaults to karmasphere.email-sender. You probably don't need to set this.
- --syslog
-
Syslog verbosely to mail.info and mail.debug.
BUGS
SEE ALSO
Mail::Karmasphere::Client Mail::Karmasphere::Query Mail::Karmasphere::Response karmaclient http://www.karmasphere.com/ http://www.postfix.org/SMTPD_POLICY_README.html
COPYRIGHT
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.