Index: nntpdup.py ================================================================== --- nntpdup.py +++ nntpdup.py @@ -5,11 +5,18 @@ nntplib._MAXLINE = 1024 * 1024 config = configparser.ConfigParser(allow_no_value = True) config.read('nntpdup.conf') -server = nntplib.NNTP_SSL(config['connection']['newsserver']) +try: + server = nntplib.NNTP_SSL(config['connection']['newsserver']) +except nntplib.NNTPTemporaryError as err: + if err.response.startswith('400 load at '): + print(err.response) + exit(0) + else: + raise(err) mserver = imaplib.IMAP4_SSL(config['connection']['mailserver']) reMessageId = re.compile('(<[-\][a-zA-Z0-9@.%/=_\$+!&~#\?}]+>)"?\)\)(\d+ \(FLAGS\(\)\))?$') mserver.login(config['connection']['mail_user'], config['connection']['mail_password']) if 'mail_limit' in config['connection']: mailLimit = int(config['connection']['mail_limit'])