Bug 448923 - Faulty mail date format
Summary: Faulty mail date format
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: vixie-cron
Version: 8
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-29 14:52 UTC by JW
Modified: 2008-06-11 09:38 UTC (History)
1 user (show)

Fixed In Version: vixie-cron-4.2-6.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-11 08:56:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description JW 2008-05-29 14:52:14 UTC
Description of problem:
When cron sends emails it doesn't format the date correctly (according to
RFC733). For positive timezone displacements it fails to insert a leading + sign.

Version-Release number of selected component (if applicable):
vixie-cron-4.2-3

How reproducible:
Always

Steps to Reproduce:
1. Catch a flight to the positive side of UTC (but ln -s
/usr/share/zoneinfo/Australia/Sydney /etc/timezone is cheaper).
2. Add a crontab entry which generates email
3. Read the header's Date field.
  
Actual results:
Date: Fri, 30 May 2008 00:33:01 1000 (EST)


Expected results:
Date: Fri, 30 May 2008 00:33:01 +1000 (EST)


Additional info:
Some mail clients like Seamonkey/Mozilla/Forefox don't handle unsigned
non-conformant timezones very well. Outlook Express does a lot better.

Comment 1 Marcela Mašláňová 2008-06-10 11:52:13 UTC
What MTA do you use? Is it postfix, sendmail, exim, ...?

Comment 2 JW 2008-06-10 12:00:41 UTC
It has nothing to do with the MTA.
Vixie cron generates the date internally.  The MTA uses the date that vixie cron
creates.

And vixie cron creates a faulty date (non rfc733 compliant) when the
displacement is positive.

I have read the code and seen the faulty "%2.2d" which should be a "%+2.2d".


Comment 3 Marcela Mašláňová 2008-06-10 14:05:52 UTC
I didn't find mentioned code, but anyway the problem is in MTA. In this version
was used macro, which is ok only for sendmail. For the fix is needed update at
least to vixie-cron-4.2-6.fc8 

Comment 4 JW 2008-06-10 14:28:25 UTC
Well you didn't look very hard did you.  It has nothing to do with the MTA.

A competent person would look in file src/misc.c in the function arpadate().

Would that be too difficult?  Where were you looking?

Also, the bug still exists in vixie-cron-4.2-8.fc8

Please pay more attention in the future.



Comment 5 Tomas Mraz 2008-06-10 20:22:06 UTC
Are you lying? Or are you just incompetent when veryfing whether you're actually
running an updated crond or not?

The arpadate() function is not compiled in in the version vixie-cron-4.2-8.fc8.


Comment 6 JW 2008-06-10 22:28:04 UTC
Are you really so incompetent?

In config.h:   #define MAIL_DATE 0

In misc.c:   #ifdef MAIL_DATE

Yes, MAIL_DATE is defined, albeit to 0.

Please pay much more attention in the future!


Comment 7 JW 2008-06-10 23:30:17 UTC
BTW, when you people are all done with mishandling this bug would you please
apologise.  Thanks.


Comment 8 Radek Vokál 2008-06-11 07:25:18 UTC
(In reply to comment #6)
> Are you really so incompetent?
> 
> In config.h:   #define MAIL_DATE 0
> 
> In misc.c:   #ifdef MAIL_DATE
> 
> Yes, MAIL_DATE is defined, albeit to 0.
> 
> Please pay much more attention in the future!
> 

Please! Next time, at least open a C book and think about the code before you
write something like this. 



Comment 9 Marcela Mašláňová 2008-06-11 08:08:15 UTC
If you can't download correct source I can't help you.

As you said:
> when you people are all done with mishandling this bug would you please 
> apologise.  Thanks.


Comment 10 JW 2008-06-11 08:27:54 UTC
(In reply to comment #8)
> 
> Please! Next time, at least open a C book and think about the code before you
> write something like this. 
> 
> 

LOL! Please sir, compile this program and tell me what it says when you run it:

#define MAIL_DATE 0

main()
{
#ifdef MAIL_DATE
printf("I am a C expert!\n");
#endif
}


Comment 11 JW 2008-06-11 08:40:53 UTC
Incidentally, the piece of code should me made to comply with rfc733 regardless
of whether a particular configuration includes it or not. Some host
configuration (ie without sendmail) may enable that conditional code code.

Therefore it should use "%+.2d%.2d" instead of "%.2d%.2d"


Comment 12 Tomas Mraz 2008-06-11 08:56:33 UTC
As you have probably finally realized in the vixie-cron >= 4.2-6.fc8 there is no
#define MAIL_DATE <whatever> in the config.h or anywhere else.

I'm sorry but if you keep reopening fixed bugs we will unfortunately have to ask
the Red Hat bugzilla administrator to close your account.

Fixing random code which is not compiled in is not a task for Fedora package
maintainers but for upstream.


Comment 13 Radek Vokál 2008-06-11 09:03:58 UTC
(In reply to comment #10)
> (In reply to comment #8)
> > 
> > Please! Next time, at least open a C book and think about the code before you
> > write something like this. 
> > 
> > 
> 
> LOL! Please sir, compile this program and tell me what it says when you run it:

My bad, what I meant is that it's not defined in the source code and not
compiled in the package by default. 

Simple `grep -r '#MAIL_DATE' vixie-cron-4.2` gives you nothing. 


Comment 14 JW 2008-06-11 09:19:42 UTC
(In reply to comment #13)
>
> My bad, what I meant is that it's not defined in the source code and not
> compiled in the package by default. 
> 
> Simple `grep -r '#MAIL_DATE' vixie-cron-4.2` gives you nothing. 
> 

Your bad again.
Why would you expect to find '#MAIL_DATE' anywhere?



Comment 15 JW 2008-06-11 09:38:28 UTC
(In reply to comment #12)
>
> I'm sorry but if you keep reopening fixed bugs we will unfortunately have to ask
> the Red Hat bugzilla administrator to close your account.
>

Why don't you castigate those RedHat employees who are closing bugs when they
haven't been fixed?

> Fixing random code which is not compiled in is not a task for Fedora package
> maintainers but for upstream.
> 

It isn't 'random' code.  Marcela supplied a patch "configure.patch" which fixed
a faulty date format problem by removing the offending code by removing a
configuration option (dependent on existence or otherwise of sendmail).  Not
only was the patch poorly named (what if several other sources are being
compiled with a patch of the same name!), but it solved a problem in a silly way.

How about admonishing Marcela for saying:

1. What MTA are you using?
2. I didn't find mentioned code, but anyway the problem is in MTA.





Note You need to log in before you can comment on or make changes to this bug.