summaryrefslogtreecommitdiff
path: root/Mailman/GatewayManager.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/GatewayManager.py')
-rw-r--r--Mailman/GatewayManager.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Mailman/GatewayManager.py b/Mailman/GatewayManager.py
index e8d3013d6..e96e4e309 100644
--- a/Mailman/GatewayManager.py
+++ b/Mailman/GatewayManager.py
@@ -92,6 +92,13 @@ class GatewayManager:
os.path.join(mm_cfg.SCRIPTS_DIR, 'post'),
self._internal_name)
file = os.popen(cmd, 'w')
+ # Usenet originated messages will not have a Unix envelope
+ # (i.e. "From " header). This breaks Pipermail archiving, so
+ # we will synthesize one. Be sure to use the format searched
+ # for by mailbox.UnixMailbox._isrealfromline()
+ timehdr = time.asctime(time.localtime(time.time()))
+ envhdr = 'From ' + self.GetAdminEmail() + ' ' + timehdr
+ file.write(envhdr + '\n')
file.write(string.join(headers,'\n'))
# If there wasn't already a TO: header, add one.
if not found_to: