[Remail] [patch v2 09/11] remail: Fix closing boundaries
Thomas Gleixner
tglx at linutronix.de
Sun Jun 18 22:13:52 CEST 2023
EmailMessage.defects reports a CloseBoundaryNotFoundDefect on the outgoing
PGP message.
Add the missing closing boundary after the PGP payload section and fix up the
closing boundaries format in msg_strip_.*().
Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
---
remail/mail.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/remail/mail.py
+++ b/remail/mail.py
@@ -229,6 +229,7 @@ payload_valid_mime_headers = [
content += encpl + '\n'
if addpgp:
content += '-----END PGP MESSAGE-----\n\n'
+ content += '--%s--\n' % boundary
msg_set_payload(msg, msg_from_string(content))
msg_set_header(msg, 'Mime-Version', '1')
@@ -268,7 +269,7 @@ payload_valid_mime_headers = [
content += '--%s\n' % boundary
content += m.as_string()
content += '\n'
- content += '--%s\n' % boundary
+ content += '--%s--\n' % boundary
msg_set_payload(msg, msg_from_string(content))
def msg_sanitize_outlook(msg):
More information about the Remail
mailing list