🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.4bsd
Article #1383

ucb/Mail doesn't handle From lines with a date DST field

#1383
From: Diomidis Spinellis
Date: Wed, 10 May 1989 16:58
78 lines
3034 bytes
Index: ucb/Mail 4.3BSD-tahoe

Description:
	When Mail(1) reads mailboxes with ``From'' lines containing
	dates with an additional DST field it ignores the whole message.  
	This field indicates daylight savings time in the European 
	timezones (WET MET EET).  It is returned by timezone(3) and 
	can get into the ``From'' lines by programs that create them 
	using the output of date(1).  Mail has provisions for handling 
	the timezone field, but only if it does not contain a DST part.

Repeat-By:
	
	% echo 'From dds Wed May 10 18:19:35 MET DST 1989' >mailbox
	% /usr/ucb/Mail -f mailbox
	Mail version 5.3 2/18/88.  Type ? for help.
	"mailbox": 0 messages
	& q
	Removing the DST field from the ``From'' line fixes the problem.

Fix:

	Modify "ucb/Mail/head.c" as follows:

*** head.c.orig	Wed May 10 18:32:50 1989
--- head.c	Wed May 10 18:41:34 1989
***************
*** 126,131 ****
--- 126,133 ----
   * below is used as the criterion of correctness.
   * Also, we check for a possible trailing time zone using
   * the auxtype template.
+  * Also, we check for a possible trailing daylight savings time using
+  * the dsttypes template. (dds)
   */
  
  #define	L	1		/* A lower case char */
***************
*** 138,143 ****
--- 140,146 ----
  
  char ctypes[] = { U,L,L,S,U,L,L,S,O,D,S,D,D,C,D,D,C,D,D,S,D,D,D,D,0 };
  char tmztypes[] = { U,L,L,S,U,L,L,S,O,D,S,D,D,C,D,D,C,D,D,S,U,U,U,S,D,D,D,D,0 };
+ char dsttypes[] = {U,L,L,S,U,L,L,S,O,D,S,D,D,C,D,D,C,D,D,S,U,U,U,S,U,U,U,S,D,D,D,D,0};
  
  isdate(date)
  	char date[];
***************
*** 145,151 ****
  
  	if (cmatch(date, ctypes))
  		return (1);
! 	return (cmatch(date, tmztypes));
  }
  
  /*
--- 148,156 ----
  
  	if (cmatch(date, ctypes))
  		return (1);
! 	if (cmatch(cp, tmztypes))
! 		return(1);
! 	return(cmatch(cp, dsttypes));
  }
  
  /*

--
Diomidis Spinellis                   European Computer-Industry Research Centre
Arabellastrasse 17, D-8000 Muenchen 81, West Germany          +49 (89) 92699199
USA: diomidis%ecrcvax.uucp@pyramid.pyramid.com     ...!pyramid!ecrcvax!diomidis
Europe: diomidis@ecrcvax.uucp                        ...!unido!ecrcvax!diomidis
-- 
Diomidis Spinellis                   European Computer-Industry Research Centre
Arabellastrasse 17, D-8000 Muenchen 81, West Germany          +49 (89) 92699199
USA: diomidis%ecrcvax.uucp@pyramid.pyramid.com     ...!pyramid!ecrcvax!diomidis
Europe: diomidis@ecrcvax.uucp                        ...!unido!ecrcvax!diomidis
Technical Details
Message-ID: <719@ecrcvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!sun-barr!texsun!pitstop!sundc!seismo!uunet!mcvax!unido!ecrcvax!diomidis

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!sun-barr!texsun!pitstop!sundc!seismo!uunet!mcvax!unido!ecrcvax!diomidis
From: diomidis@ecrcvax.UUCP (Diomidis Spinellis)
Newsgroups: comp.bugs.4bsd
Subject: ucb/Mail doesn't handle From lines with a date DST field
Keywords: mail DST daylight savings time
Message-ID: <719@ecrcvax.UUCP>
Date: 10 May 89 16:58:19 GMT
Reply-To: diomidis@ecrcvax.UUCP (Diomidis Spinellis)
Organization: ECRC, Munich 81, West Germany
Lines: 78