Skip to content
Snippets Groups Projects
Commit 8f5513a5 authored by Stuart Gathman's avatar Stuart Gathman
Browse files

SRS domains were missing srs_reject check when SES was active.

parent 87482d57
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python #!/usr/bin/env python
# A simple milter that has grown quite a bit. # A simple milter that has grown quite a bit.
# $Log$ # $Log$
# Revision 1.71 2006/11/22 01:03:28 customdesigned
# Replace last use of deprecated rfc822 module.
#
# Revision 1.70 2006/11/21 18:45:49 customdesigned # Revision 1.70 2006/11/21 18:45:49 customdesigned
# Update a use of deprecated rfc822. Recognize report-type=delivery-status # Update a use of deprecated rfc822. Recognize report-type=delivery-status
# #
...@@ -325,6 +328,7 @@ def read_config(list): ...@@ -325,6 +328,7 @@ def read_config(list):
if SES: if SES:
ses = SES.new(secret=srs_secret,expiration=maxage) ses = SES.new(secret=srs_secret,expiration=maxage)
srs_domain = set(cp.getlist('srs','ses')) srs_domain = set(cp.getlist('srs','ses'))
srs_domain.update(cp.getlist('srs','srs'))
else: else:
srs_domain = set(cp.getlist('srs','srs')) srs_domain = set(cp.getlist('srs','srs'))
srs_domain.update(cp.getlist('srs','sign')) srs_domain.update(cp.getlist('srs','sign'))
...@@ -1582,6 +1586,8 @@ class bmsMilter(Milter.Milter): ...@@ -1582,6 +1586,8 @@ class bmsMilter(Milter.Milter):
try: try:
msg.dump(out) msg.dump(out)
out.seek(0) out.seek(0)
# Since we wrote headers with '\n' (no CR),
# the following header/body split should always work.
msg = out.read().split('\n\n',1)[-1] msg = out.read().split('\n\n',1)[-1]
self.replacebody(msg) # feed modified message to sendmail self.replacebody(msg) # feed modified message to sendmail
if spam_checked: if spam_checked:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment