Re: [PATCH / request for vote ] traptoemail script breaks date in mail header

Josef Ridky <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <[email protected]>
Hi Bart,

thanks for your message. You're right, the patch description don't reflect the content, due patch content has been modified to reflect discussion from bug report.
I'll be more careful next time.

Josef 

----- Original Message -----
| From: "Bart Van Assche" <[email protected]>
| To: "Josef Ridky" <[email protected]>, "net-snmp-coders" <[email protected]>
| Sent: Wednesday, June 20, 2018 4:22:22 PM
| Subject: Re: [PATCH / request for vote ] traptoemail script breaks date in mail header
| 
| 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.