def runit():
    """run things"""
    parser = OptionParser()
    parser.add_option('-s', '--server',
                      help='The spamassassin spamd server to connect to',
                      dest='server',
                      type='str',
                      default='standalone.home.topdog-software.com')
    parser.add_option('-p', '--port',
                      help='The spamassassin spamd server port to connect to',
                      dest='port',
                      type='int',
                      default=783)
    parser.add_option('-u', '--unix-socket',
                      help='The spamassassin spamd unix socket to connect to',
                      dest='socket_path',
                      type='str')
    parser.add_option('-t', '--tls',
                      help='Use TLS',
                      dest='tls',
                      action='store_true',
                      default=False)
    parser.add_option('-z', '--use-zlib-compression',
                      help='Use Zlib compression',
                      dest='gzip',
                      action='store_true',
                      default=False)
    parser.add_option('-l', '--zlib-compression-level',
                      help='Zlib compression level',
                      dest='compress_level',
                      type='choice',
                      choices=[str(val) for val in range(0, 10)],
                      default=6)
    parser.add_option('-a', '--user',
                      help=('''Username of the user on whose behalf'''
                            '''this scan is being performed'''),
                      dest='user',
                      type='str',
                      default='exim')
    options, _ = parser.parse_args()
    sslopts = {}
    if options.tls:
        sslopts = dict(ssl_version=PROTOCOL_TLSv1)
    if options.socket_path and os.path.exists(options.socket_path):
        options.server = None
    client = SpamC(
        options.server,
        port=options.port,
        socket_file=options.socket_path,
        user=options.user,
        gzip=options.gzip,
        compress_level=int(options.compress_level),
        is_ssl=options.tls,
        **sslopts)
    pprint.pprint(client.ping())
    path = os.path.dirname(__file__)
    for test in FILES:
        filename = os.path.join(path, test['name'])
        print "File => %s" % filename
        fileobj = open(filename)
        print "=" * 10, "client.check()"
        pprint.pprint(client.check(fileobj))
        print "=" * 10, "client.symbols()"
        pprint.pprint(client.symbols(fileobj))
        print "=" * 10, "client.report()"
        pprint.pprint(client.report(fileobj))
        print "=" * 10, "client.report_ifspam()"
        pprint.pprint(client.report_ifspam(fileobj))
        print "=" * 10, "client.process()"
        pprint.pprint(client.process(fileobj))
        print "=" * 10, "client.headers()"
        pprint.pprint(client.headers(fileobj))
        print "=" * 10, "client.learn()"
        pprint.pprint(client.learn(fileobj, test['type']))
        print "=" * 10, "client.tell()"
        pprint.pprint(client.tell(fileobj, 'forget'))
        print "=" * 10, "client.revoke()"
        pprint.pprint(client.revoke(fileobj))