NAME

karmaclient - Karmasphere commandline query client

DESCRIPTION

A commandline query client which allows access to most of the features of Mail::Karmasphere::Client.

USAGE

karmaclient [--username=<login> --password=<pass>] [--host=<hostname>][--port=port] [--tcp][--feed=<feedname>] [--composite=<compositename>][--combiner=<combinername>] [--ip4=<ip4>[=tag]] [--url=<url>[=tag]] [--domain=<domain>[=tag]] [--help] [--version]

EXAMPLES

Querying an IP4 identity

You can query an IP4 identity using the --ip4 argument to karmaclient. Here, we query the composite (or feedset), karmasphere.email-sender-ip for an opinion on the identity 127.0.0.1:

$ karmaclient --ip4=127.0.0.2 --composite=karmasphere.email-sender-ip
Response id 'mkc0': 1ms, 1 combinations, 5 attributes
Warning: Truncated
Combiner 'karmasphere.email-sender-ip': verdict -1000 (abuseat.cbl: if-bad(0) => return-bad(1.0))
Attribute 'trusted-forwarder.ips': identity '127.0.0.2' value 1000 (Listed in trusted-forwarder.org)
Attribute 'returnpath.senderscorecertified': identity '127.0.0.2' value 1000 (Listed in ReturnPath Sender Score Certified)
Attribute 'sorbs.safe': identity '127.0.0.2' value -1000 (Low false positive zone See: http://www.sorbs.net/lookup.shtml?$)
Attribute 'uribl.ip-black': identity '127.0.0.2' value -1000 (Blacklisted, see http://lookup.uribl.com/?domain=$)
Attribute 'tqmcube.dhcp': identity '127.0.0.2' value -1000 (TEST record. See http://tqmcube.com)>

Querying a domain identity

Similarly, we can query the composite karmasphere.email-sender for opinions on the domain example.com using the --domain argument. We can also specify the query get sent to query.karmasphere.com by using the --host argument:

$ karmaclient --host=query.karmasphere.com --composite=karmasphere.email-sender --domain=example.com
Response id 'mkc0': 1ms, 1 combinations, 0 attributes
Combiner 'karmasphere.email-sender': verdict 0 ()

Querying a url identity

It follows, then, that we can use the --url argument to ask questions about the URL http://www.example.com/:

$ karmaclient --composite=karmasphere.email-body --url=http://www.example.com/
Response id 'mkc0': 24ms, 1 combinations, 0 attributes
Combiner 'karmasphere.email-body': verdict 0 ()

Querying many identities at once

We aren't limited to one identity per query. karmaclient can send queries that contain many identities to a query server. As we saw when querying an IP4 identity, the response can be truncated when sending UDP queries. This situation is much more likely to arise, and more problematic, when sending many identities in a single query, but the problem can be mitigated by specifying that TCP queries be sent, using the --tcp flag to karmaclient:

$ karmaclient --composite=karmasphere.email-sender --ip4=127.0.0.2 --ip4=192.168.3.4 --ip4=10.11.12.13 --domain=example.com --tcp
Response id 'mkc0': 1ms, 1 combinations, 14 attributes
Combiner 'karmasphere.email-sender': verdict -1000 (abuseat.cbl: if-bad(0) => return-bad(1.0))
Attribute 'spamcop.bl': identity '127.0.0.2' value -1000 (Blocked - see http://www.spamcop.net/bl.shtml?$)
Attribute 'uribl.ip-grey': identity '127.0.0.2' value -1000 (Greylisted, see http://lookup.uribl.com/?domain=$)
Attribute 'dsbl.list': identity '127.0.0.2' value -1000 (http://dsbl.org/listing?$)
Attribute 'cymru.bogons': identity '192.168.3.4' value -1000 (Invalid source IP address (cymru))
Attribute 'sorbs.safe': identity '127.0.0.2' value -1000 (Low false positive zone See: http://www.sorbs.net/lookup.shtml?$)
Attribute 'cymru.bogons': identity '127.0.0.2' value -1000 (Invalid source IP address (cymru))
Attribute 'abuseat.cbl': identity '127.0.0.2' value -1000 (Blocked - see http://cbl.abuseat.org/lookup.cgi?ip=$)
Attribute 'virbl.blacklist': identity '127.0.0.2' value -1000 (VIRBL test entry)
Attribute 'njabl.dnsbl': identity '127.0.0.2' value 1000 (open relay -- 1008601823)
Attribute 'trusted-forwarder.ips': identity '127.0.0.2' value 1000 (Listed in trusted-forwarder.org)
Attribute 'cymru.bogons': identity '10.11.12.13' value -1000 (Invalid source IP address (cymru))
Attribute 'returnpath.senderscorecertified': identity '127.0.0.2' value 1000 (Listed in ReturnPath Sender Score Certified)
Attribute 'uribl.ip-black': identity '127.0.0.2' value -1000 (Blacklisted, see http://lookup.uribl.com/?domain=$)
Attribute 'tqmcube.dhcp': identity '127.0.0.2' value -1000 (TEST record. See http://tqmcube.com)

BUGS

The examples in this document do not sit well on the page.

SEE ALSO

Mail::Karmasphere::Client Mail::Karmasphere::Query Mail::Karmasphere::Response karmad http://www.karmasphere.com/

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.