Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pymilter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
misc
pymilter
Commits
a01c5d31
Commit
a01c5d31
authored
20 years ago
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
Ignore HeaderParseError decoding header
parent
493741c8
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bms.py
+6
-2
6 additions, 2 deletions
bms.py
with
6 additions
and
2 deletions
bms.py
+
6
−
2
View file @
a01c5d31
#!/usr/bin/env python
# A simple milter that has grown quite a bit.
# $Log$
# Revision 1.9 2005/06/14 21:55:29 customdesigned
# Check internal_domains for outgoing mail.
#
# Revision 1.8 2005/06/06 18:24:59 customdesigned
# Properly log exceptions from pydspam
#
...
...
@@ -460,9 +463,9 @@ def parse_addr(t):
return
t
.
split
(
'
@
'
)
def
parse_header
(
val
):
try
:
h
=
decode_header
(
val
)
if
not
len
(
h
)
or
(
not
h
[
0
][
1
]
and
len
(
h
)
==
1
):
return
val
try
:
u
=
[]
for
s
,
enc
in
h
:
if
enc
:
...
...
@@ -479,6 +482,7 @@ def parse_header(val):
except
UnicodeError
:
continue
except
UnicodeDecodeError
:
pass
except
LookupError
:
pass
except
email
.
errors
.
HeaderParseError
:
pass
return
val
class
bmsMilter
(
Milter
.
Milter
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment