/usr/bin/sb_client is in spambayes 1.1b1-4.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/usr/bin/python
"""A client for sb_xmlrpcserver.py.
Just feed it your mail on stdin, and it spits out the same message
with the spambayes score in a new X-Spambayes-Disposition header.
"""
import xmlrpclib
import sys
RPCBASE = "http://localhost:65000"
def main():
msg = sys.stdin.read()
try:
x = xmlrpclib.ServerProxy(RPCBASE)
m = xmlrpclib.Binary(msg)
out = x.filter(m)
print out.data
except:
if __debug__:
import traceback
traceback.print_exc()
print msg
if __name__ == "__main__":
main()
|