Closed
Bug 304999
Opened 19 years ago
Closed 17 years ago
Emails not generating Date header for non-sendmail methods
Categories
(Bugzilla :: Email Notifications, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: brock, Assigned: brion)
Details
Attachments
(1 file)
881 bytes,
patch
|
glob
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Ive noticed that my email client (Thunderbird) is displaying the date on
emails generated from my installation of bugzilla as 31/12/1969 4:00 PM.
Combing throught the mails i have received and comparing those to ones
that display correctly, the bugzilla mails seem to missing the "Date"
header. They contain the "Received" headers which contain the right date.
I am using qmail smtp for my mail server.
Reproducible: Always
Steps to Reproduce:
1. Do something in bugzilla to generate an email.
2. Open the email in your favorite text editor.
3. Look for the Date header.
Actual Results:
Date header is missing.
Expected Results:
The date header should be inserted by the MUA with something like:
Date: 12 Aug 2005 15:48:18 -0700
Perhaps Mail::Mailer should be doing this for bugzilla.
Comment 1•19 years ago
|
||
We need to determine exactly which Mail::Mailer methods have this problem, and
which don't.
I ran into this problem when I used to do tech support for a mail server.
Basically, the email RFCs require that there be a Date header, but the SMTP RFC
doesn't require the MTA to add one. So *who* is supposed to add the Date header
is unclear.
Usually the "sendmail" interface adds the Date header automatically.
I would argue that it's Mail::Mailer's job to be adding this header.
I don't want to confirm the bug, though, until somebody else has actually
reproduced this.
OS: Windows 2000 → All
Hardware: PC → All
Summary: Emails not generating Date header → Emails not generating Date header for non-sendmail methods
Target Milestone: --- → Bugzilla 2.20
Version: unspecified → 2.19.3
confirming.
i've encountered this before -- my sendmail wrapper will add the date header if
it's missing.
none of the Mailer::Mail methods insert the date, most smtp servers will, some
won't.
it shouldn't hurt things if we did it in BugMail..
off the top of my head..
use Date::Format qw(time2str);
...
my $headers = new Mail::Header \@header_lines, Modify => 0;
if (!defined $headers->get('Date') {
$headers->add('Date', time2str("%a, %e %b %Y %T %z", time()));
}
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 3•19 years ago
|
||
(In reply to comment #2)
> confirming.
>
> i've encountered this before -- my sendmail wrapper will add the date header if
> it's missing.
>
> none of the Mailer::Mail methods insert the date, most smtp servers will, some
> won't.
>
> it shouldn't hurt things if we did it in BugMail..
>
> off the top of my head..
>
> use Date::Format qw(time2str);
> ...
> my $headers = new Mail::Header \@header_lines, Modify => 0;
> if (!defined $headers->get('Date') {
> $headers->add('Date', time2str("%a, %e %b %Y %T %z", time()));
> }
>
>
>
I integrated this patch into my server (less the "use Date::Format line.. we
already use time2str in bugmail so i think its unecessary) and it works for me
correctly now. The date field is in my mail headers.
Updated•19 years ago
|
Whiteboard: [Good Intro Bug]
Updated•18 years ago
|
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
Assignee | ||
Comment 4•18 years ago
|
||
This bug appears to be alive and well in 3.0 with the SMTP method.
Assignee | ||
Comment 5•18 years ago
|
||
Patch against Bugzilla 3.0 which adds the Date: header when using non-Sendmail method. Seems to work for our installation (http://bugzilla.wikimedia.org)
Assignee | ||
Comment 6•18 years ago
|
||
Not sure if I'm a very bad person for trying to nominate this bug for 3.0.1, but I'm not sure how to get people's attention for patches to Bugzilla. ;)
Flags: blocking3.0.1?
Comment 7•18 years ago
|
||
Sure, we can take this for 3.0.1. Could you just link me to an RFC somewhere that proves that that's the right date format? I'm also not sure what time2str will do with %z there, with just time() as the second argument. Does it just grab the timezone from the local machine?
Flags: blocking3.0.1? → blocking3.0.1+
Target Milestone: Bugzilla 2.22 → Bugzilla 3.0
Comment 8•18 years ago
|
||
(In reply to comment #6)
> Not sure if I'm a very bad person for trying to nominate this bug for 3.0.1,
> but I'm not sure how to get people's attention for patches to Bugzilla. ;)
By the way, what you need to do is read the Contributor's Guide, which will explain that you need to ask for review:
http://www.bugzilla.org/docs/contributor.html
> Could you just link me to an RFC somewhere that proves that that's the
> right date format?
RFC 822: 5.1, RFC 1123: 5.2.14
> Does it just grab the timezone from the local machine?
yes
Comment 10•18 years ago
|
||
Comment on attachment 265082 [details] [diff] [review]
Patch to Bugzilla/Mailer.pm in 3.0
Byron seems the best reviewer for this patch.
Attachment #265082 -
Flags: review?(bugzilla)
Attachment #265082 -
Flags: review?(bugzilla) → review+
Updated•18 years ago
|
Flags: approval?
Flags: approval3.0+
Flags: approval+
Whiteboard: [Good Intro Bug]
Comment 11•17 years ago
|
||
tip:
Checking in Bugzilla/Mailer.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Mailer.pm,v <-- Mailer.pm
new revision: 1.8; previous revision: 1.7
done
3.0:
Checking in Bugzilla/Mailer.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Mailer.pm,v <-- Mailer.pm
new revision: 1.7.2.1; previous revision: 1.7
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•