More attribute tidying

This commit is contained in:
3wc 2024-02-29 16:56:45 -03:00
parent d548ae824e
commit 9a93c3e70f
1 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import json
import sys
from functools import partial
from copy import deepcopy
from math import floor
from bs4 import BeautifulSoup
@ -110,6 +111,7 @@ TYPES['include_rfc2369_headers'] = lambda x: bool(x)
TYPES['allow_list_posts'] = lambda x: bool(x)
TYPES['advertised'] = lambda x: bool(x)
TYPES['require_explicit_destination'] = lambda x: bool(x)
TYPES['bounce_score_threshold'] = lambda x: floor(float(x))
TYPES_EXTRA = {
'autorespond_requests': lambda x, y: x(y).name,
@ -252,6 +254,8 @@ if __name__ == "__main__":
globalconfig['dmarc_mitigate_unconditionally'] = False
if 'from_is_list' in globalconfig.keys():
del globalconfig['from_is_list']
if 'dmarc_moderation_action' in globalconfig.keys():
del globalconfig['dmarc_moderation_action']
# Handle the archiving policy. In MM2.1 there were two boolean options
# but only three of the four possible states were valid. Now there's just
# an enum.