Consistently use surrogate escape by default.

This commit is contained in:
Stuart D. Gathman
2020-06-17 12:54:58 -04:00
parent 0efddd316a
commit 132e8326b5
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ class sampleMilter(Milter.Milter):
# even if we wanted the Taiwanese spam, we can't read Chinese
# (delete if you read chinese mail)
print('val=',val)
print('val=',val.encode(errors='surrogateescape'))
if val.startswith('=?big5') or val.startswith('=?ISO-2022-JP'):
self.log('REJECT: %s: %s' % (name,val))
#self.setreply('550','','Go away spammer')