
On Mon, 2003-10-20 at 18:57, Mihai Maties wrote:
I have OTRS installed on a server that uses qmail as SMTP relay. OTRS does not include a "Date: " header when sending messages maybe because it expects the MTA to do it instead. Unfortunately qmail does not add the missing header and if the e-mail message passes only through qmail servers then it arrives at destination "date-less".
That's not what's supposed to happen, and it's not what, in my experience, does happen. The behaviour I see is that described in the qmail-header man page: STAMPS Every message must contain a Date field, with the date in a strict format defined by RFC 822. If necessary qmail-inject creates a new Date field with the current date (in GMT). I know this because I investigated it recently when a customer "complained" that the Date header of messages from OTRS was displayed differently by his mail program (because the date originated in GMT time, not local time).
This is very annoying so I tried to modify the following section from the SMTP.pm file:
$Param{Header} .= "Subject: $Param{Subject}\n"; $Param{Header} .= "X-Mailer: OTRS Mail Service ($VERSION)\n";
by adding
$Param{Header} .= "Date: " . strftime "%a, %d %b %Y %T %z", localtime ;
Unfortunately this doesn't seem to solve the issue...
Do you have another suggestion ?
Check qmail. It shouldn't be behaving as you say it does. If you pipe a simple message without a Date header, e.g. From, To and body will do, to 'qmail-inject -n', you should get a Date header in the output. When I do that, I get Return-path, Date and Message-ID headers added. Jim