diff --git a/scripts/procmail-to-dispatch.py b/scripts/procmail-to-dispatch.py index 2bc39f0..181d758 100644 --- a/scripts/procmail-to-dispatch.py +++ b/scripts/procmail-to-dispatch.py @@ -23,14 +23,13 @@ logger.setLevel(logging.DEBUG) # set up config flags parser = argparse.ArgumentParser() parser.add_argument('-f', '--filename') -parser.add_argument('-k', '--key') parser.add_argument('-l', '--location') parser.add_argument('-u', '--user') args = parser.parse_args() -if (args.filename == None or args.key == None or args.user == None or +if (args.filename == None or args.user == None or args.location == None): - print("script needs -f/--filename (location of .procmailrc.log) -k/--key (dispatch key to use) " + print("script needs -f/--filename (location of .procmailrc.log) " "-l/--location (url to connect to) -u/--user (user to authenticate to XML-RPC as)") sys.exit(2) @@ -111,7 +110,7 @@ while 1: if sender and subject: logger.debug("notifying: '{0:s}' from {1:s}".format(subject, sender)) - message = "[{0:s}] '{1:s}' from {2:s}".format(args.key, subject, sender) + message = "'{0:s}' from {1:s}".format(subject, sender) payload = {'message': message} r = requests.post(args.location, verify=False, auth=auth, data=payload) print(r.json())