From 4398ce8606c2bd554288c45630f568ee794d693d Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Fri, 2 Apr 1999 21:39:14 +0000 Subject: PollNewsGroup(): Synthesize unixfrom header ("From ") for interoperability with Pipermail. --- Mailman/GatewayManager.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Mailman/GatewayManager.py') 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: -- cgit v1.2.3-70-g09d2