summaryrefslogtreecommitdiff
path: root/Mailman/GatewayManager.py
diff options
context:
space:
mode:
authorbwarsaw1999-04-02 21:39:14 +0000
committerbwarsaw1999-04-02 21:39:14 +0000
commit4398ce8606c2bd554288c45630f568ee794d693d (patch)
tree1f20000b150f4134da5b72be6935002b51cb15a6 /Mailman/GatewayManager.py
parent3a43470cfc279186fdf5328490536fa18b7791a8 (diff)
downloadmailman-4398ce8606c2bd554288c45630f568ee794d693d.tar.gz
mailman-4398ce8606c2bd554288c45630f568ee794d693d.tar.zst
mailman-4398ce8606c2bd554288c45630f568ee794d693d.zip
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: