I've been using squirrelmail for the last couple of
years and I really like it.
I'm building a gentoo box for my company as a dedicated
mail server and have installed:
uw imap 2002e
When I send a message from squirrelmail from and to
local addresses, squirrelmail fails to parse the
headers correctly and ends up displaying incorrect dates.
If any message fails to parse a date in
imap_messages.php: sqimap_get_small_header_list, the
date will come up 1969 because date is set to "" at
line 512, but then is tested below with isset (it
always passes). I changed it to look like this:
$cc = $to = $type = $inrepto = '';
// tfiner: isset is used below for both of these
unset( $date );
unset ( $type );
This fixes that bug - no longer will 1969 be displayed,
because the unset condition will be caught.
The headers that confuse squirrelmail don't have any
returns "\r" in them, only newlines "\n".
So instead of parsing on "\r\n", I changed it to eat up
all returns and tabs, but then parse on "\n":
// $hdr = trim(str_replace(array("\r\n\t", "\r\n
"),array('', ''), $header));
// tfiner: eat up all returns and tabs, leaving newline
as a delimeter
$hdr = trim(str_replace(array('\r', '\t'),array('',
//$hdr = explode("\r\n" , $hdr);
$hdr = explode("\n" , $hdr);