Convert to pyproject.toml
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
import sys, os
|
||||
import zipfile
|
||||
import argparse
|
||||
from datetime import datetime
|
||||
from email import message_from_file
|
||||
from tempfile import TemporaryDirectory
|
||||
@@ -152,3 +153,17 @@ def init(args):
|
||||
read_config_if_present(args)
|
||||
init_model()
|
||||
metadata.create_all()
|
||||
|
||||
def main_cli():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-b', dest='bounce_address', help='Forwarding address for messages that are not DMARC reports.')
|
||||
parser.add_argument('-f', dest='config_file', default='/etc/dmarc-receive.conf', help='Configuration file')
|
||||
parser.add_argument('-i', action='store_true', dest='init', default=False, help='Initialize database')
|
||||
args = parser.parse_args()
|
||||
if args.init:
|
||||
init(args)
|
||||
else:
|
||||
receive_report(args)
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user