This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new fda19d2 Fake attachment name if inline attached forwarded email
fda19d2 is described below
commit fda19d2896708c796925c7104f3a38c777d9bd70
Author: Daniel Gruno <[email protected]>
AuthorDate: Thu Jan 6 18:16:14 2022 +0100
Fake attachment name if inline attached forwarded email
---
tools/archiver.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/archiver.py b/tools/archiver.py
index 0af7f59..43d44f9 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -139,6 +139,9 @@ def parse_attachment(
if fd is None:
return None, None
filename = part.get_filename()
+ # If inline-attached email, fake a name
+ if not filename and part.get_content_type() and
part.get_content_type().lower() == "message/rfc822":
+ filename = "attached_email.eml"
if filename:
attachment = {
"content_type": part.get_content_type(),