Skip certain headers in OVER results
This commit is contained in:
parent
1698eaafce
commit
ff19d88c3e
1 changed files with 11 additions and 0 deletions
|
@ -667,7 +667,18 @@ class Session(Connection):
|
||||||
str(message.content.count('\n') + 1),
|
str(message.content.count('\n') + 1),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
HEADERS_SKIP = {
|
||||||
|
'subject': True,
|
||||||
|
'from': True,
|
||||||
|
'date': True,
|
||||||
|
'message-id': True,
|
||||||
|
'references': True
|
||||||
|
}
|
||||||
|
|
||||||
for k in message.headers:
|
for k in message.headers:
|
||||||
|
if k.casefold() in HEADERS_SKIP:
|
||||||
|
continue
|
||||||
|
|
||||||
parts.append("%s: %s" % (
|
parts.append("%s: %s" % (
|
||||||
k, message.headers[k]
|
k, message.headers[k]
|
||||||
))
|
))
|
||||||
|
|
Loading…
Add table
Reference in a new issue