X-Git-Url: https://git.madduck.net/code/mailplate.git/blobdiff_plain/21e948a069d5a416a4a714523dd03d432d25f02e..ba41f18b6c5fd8ce4d811d375e4dc7856531686e:/mailplate diff --git a/mailplate b/mailplate index 0cceef1..c7a02b9 100755 --- a/mailplate +++ b/mailplate @@ -415,10 +415,14 @@ for line in templ: l = line[:-1] if len(l) == 0: payload = '' # end of headers - elif l[0] == KEEP_SLOT_LEADER and KEEP_HEADERS.has_key(l[1:]): - # found predefined header slot keyword - for header in KEEP_HEADERS[l[1:]]: - headers[header.lower()] = (header, _keep_header) + elif l[0] == KEEP_SLOT_LEADER: + if KEEP_HEADERS.has_key(l[1:]): + # found predefined header slot keyword + for header in KEEP_HEADERS[l[1:]]: + headers[header.lower()] = (header, _keep_header) + else: + err('unknown header slot ' + l + ' found') + sys.exit(posix.EX_CONFIG) else: header, content = l.split(':', 1) content = content.strip()