Bug 448923 - Faulty mail date format
Faulty mail date format
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: vixie-cron (Show other bugs)
8
All Linux
low Severity medium
: ---
: ---
Assigned To: Marcela Mašláňová
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-29 10:52 EDT by JW
Modified: 2008-06-11 05:38 EDT (History)
1 user (show)

See Also:
Fixed In Version: vixie-cron-4.2-6.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-11 04:56:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description JW 2008-05-29 10:52:14 EDT
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 07:52:13 EDT
What MTA do you use? Is it postfix, sendmail, exim, ...?
Comment 2 JW 2008-06-10 08:00:41 EDT
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 10:05:52 EDT
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 10:28:25 EDT
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 16:22:06 EDT
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 18:28:04 EDT
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 19:30:17 EDT
BTW, when you people are all done with mishandling this bug would you please
apologise.  Thanks.
Comment 8 Radek Vokal 2008-06-11 03:25:18 EDT
(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 04:08:15 EDT
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 04:27:54 EDT
(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 04:40:53 EDT
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 04:56:33 EDT
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 Vokal 2008-06-11 05:03:58 EDT
(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 05:19:42 EDT
(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 05:38:28 EDT
(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.