Germain <[EMAIL PROTECTED]>:
>As i said in another topic, there is a little bug with the ending date
>of the Received header (problem with the month in the locale).
>I've written a patch for the 1.16 version.
>
>--- qmail-scanner-queue.pl.orig 2003-03-18 16:16:50.000000000 +0100
>+++ qmail-scanner-queue.pl      2003-03-18 17:06:05.000000000 +0100
>@@ -848,7 +848,13 @@
>     open(QMQ,"|$qmailqueue")||&tempfail("Unable to fork $qmailqueue 
>(#4.3.0) - $!");
>     ($sec,$min,$hour,$mday,$mon,$year) = gmtime(time);
>     $elapsed_time = tv_interval ($start_time, [gettimeofday]);
>+
>+    # fix RFC822 non compliant date in Received header
>+    my $old_locale = POSIX::setlocale(LC_ALL);
>+    POSIX::setlocale( LC_ALL, "C" );
>     $findate = POSIX::strftime( "%d %b ",$sec,$min,$hour,$mday,$mon,$year);
>+    POSIX::setlocale(LC_ALL, $old_locale);
>+
>     $findate .= sprintf "%02d %02d:%02d:%02d -0000", $year+1900, $hour, 
>$min, $sec;
>     print QMQ "Received: from $returnpath by $hostname by uid $uid with 
>qmail-scanner-$VERSION \n";
>     print QMQ " ($SCANINFO Clear:$tag_score. \n";
>

You want to use NON LOCALIZED MONTH NAMES? Why you should use POSIX::strftime()?

        $findate = sprintf "%02d %s 02d %02d:%02d:%02d -0000",
            $mday, ('Jan','Feb','Mar','Apr','May','Jun','Jul','Sep',
            'Oct','Nov','Dec')[$mon], $year+1900, $hour, $min, $sec;



--
Tullio Andreatta          Finmatica S.p.A.    http://www.finmatica.com/
          Sede operativa: Via Sorbanella, 30 - I-25100 Brescia ITALY

Disclaimer: "Please treat this email message in a reasonable way, or we
    might get angry" ( http://www.goldmark.org/jeff/stupid-disclaimers )



-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
Qmail-scanner-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to