From e53817196aa481ca2f29d1eae9c3ac9e7ed52531 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sun, 7 Oct 2007 16:06:39 +0100 Subject: [PATCH] error on encounter of an unknown header slot --- mailplate | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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() -- 2.39.5