fix header handling

This commit is contained in:
2020-11-10 20:08:13 +01:00
parent 1e228c91ba
commit 7b179d197a
2 changed files with 6 additions and 4 deletions

View File

@@ -253,7 +253,7 @@ class ModifyMilter(Milter.Base):
def header(self, name, value):
try:
if self.fields_data is not None:
if self.fields_bytes is not None:
self.fields_bytes.append(
(name.encode("ascii", errors="surrogateescape"),
value.encode("ascii", errors="surrogateescape")))