aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/utils
diff options
context:
space:
mode:
authorJ08nY2017-08-08 23:56:30 +0200
committerJ08nY2017-08-08 23:56:42 +0200
commitc0049055ab9d85c5e92e3c90837021620c9264cb (patch)
treef1d3e9246627aa9da6e01fecea130067b4364ba9 /src/mailman_pgp/utils
parent91d335b38dc14821280f9b281f87e226026274e1 (diff)
downloadmailman-pgp-c0049055ab9d85c5e92e3c90837021620c9264cb.tar.gz
mailman-pgp-c0049055ab9d85c5e92e3c90837021620c9264cb.tar.zst
mailman-pgp-c0049055ab9d85c5e92e3c90837021620c9264cb.zip
Diffstat (limited to 'src/mailman_pgp/utils')
-rw-r--r--src/mailman_pgp/utils/email.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mailman_pgp/utils/email.py b/src/mailman_pgp/utils/email.py
index ac1ab66..9122069 100644
--- a/src/mailman_pgp/utils/email.py
+++ b/src/mailman_pgp/utils/email.py
@@ -40,6 +40,10 @@ def copy_headers(from_msg, to_msg, overwrite=False):
to_msg[key] = value
if to_msg.get_unixfrom() is None or overwrite:
to_msg.set_unixfrom(from_msg.get_unixfrom())
+ if (hasattr(from_msg, 'original_size')
+ and (getattr(to_msg, 'original_size', None) is None
+ or overwrite)):
+ to_msg.original_size = from_msg.original_size
@public
@@ -61,6 +65,8 @@ def overwrite_message(from_msg, to_msg):
to_msg.preamble = from_msg.preamble
to_msg.epilogue = from_msg.epilogue
to_msg.set_default_type(from_msg.get_default_type())
+ if hasattr(from_msg, 'orignal_size') >
+ to_msg.original_size = from_msg.original_size
@public