Date: Mon, 15 Apr 2024 09:16:41 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 235136] cron email header has bogus date value Message-ID: <bug-235136-227-rpAyVQoSWf@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-235136-227@https.bugs.freebsd.org/bugzilla/> References: <bug-235136-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235136 --- Comment #3 from Michael Osipov <michaelo@FreeBSD.org> --- Here is the updated spec: https://datatracker.ietf.org/doc/html/rfc5322#section-3.3 You are right, but I think that the issue with the format isn't in cron its= elf regardless of th invalid time value. This what I see: Date: Mon, 15 Apr 2024 10:59:00 +0200 (CEST) That value isn't comming from cron: > 560 #ifdef MAIL_DATE > 561 /* Sat, 27 Feb 93 11:44:51 CST > 562 * 123456789012345678901234567 > 563 */ > 564 char * > 565 arpadate(clock) > 566 time_t *clock; > 567 { > 568 time_t t =3D clock ?*clock :time(0L); > 569 struct tm *tm =3D localtime(&t); > 570 static char ret[32]; /* zone name might be >3 chars */ > 571 > 572 if (tm->tm_year >=3D 100) > 573 tm->tm_year +=3D 1900; > 574 > 575 (void) snprintf(ret, sizeof(ret), "%s, %2d %s %d %02d:%02d:%02d %= s", > 576 DowNames[tm->tm_wday], > 577 tm->tm_mday, > 578 MonthNames[tm->tm_mon], > 579 tm->tm_year, > 580 tm->tm_hour, > 581 tm->tm_min, > 582 tm->tm_sec, > 583 TZONE(*tm)); > 584 return ret; > 585 } > 586 #endif /*MAIL_DATE*/ TZONE macro looks fine to me. Now look into config.h: 58 59 /* #define MAIL_DATE */ /*-*/ 60 /* should we include an ersatz Date: header in 61 * generated mail? if you are using sendmail 62 * for MAILCMD, it is better to let sendmail 63 * generate the Date: header. 64 */ So I consider the sendmail command is producing this value. If you are runn= ing from stable can you enable that MAIL_DATE macro and see what happens? As it really turns out: "Date: ..." isn't produced by cron at all. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-235136-227-rpAyVQoSWf>