On 06/20/18 00:37, Josef Ridky wrote: > traptoemail Perl script emits a locale-dependent Date header, which does> not > conform to RFC 5322 in general. This happens because strftime() is> locale-dependent, and could be solved for example by temporarily resetting> the locale to C for the strftime() call. > > Actual results: Date: Ăšt, 5 ÄŤen 2018 09:11:05 +0200 > > See https://sourceforge.net/p/net-snmp/bugs/2631/ > > --- > diff -urNp a/local/traptoemail b/local/traptoemail > --- a/local/traptoemail 2018-06-20 09:32:10.202489526 +0200 > +++ b/local/traptoemail 2018-06-20 09:32:36.261432167 +0200 > @@ -63,7 +63,6 @@ $message->to(@ARGV) || die "failed to se > $message->data(); > $message->datasend("To: " . join(", ",@ARGV) . "\n"); > $message->datasend("From: $opts{f}\n"); > -$message->datasend("Date: ".strftime("%a, %e %b %Y %X %z", > localtime())."\n"); > $message->datasend("Subject: trap received from $hostname: $values[1]\n"); > $message->datasend("\n"); > $message->datasend("Host: $hostname ($ipaddress)\n");
There is a contradiction between the patch description and the actual patch: the description refers to temporarily resetting to the C locale while the patch removes the code that submits the date to the SMTP server. Additionally, a description of what the effect is of not sending the date to the SMTP server is missing from the patch description. Thanks, Bart. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders