Mark,

Here is the diff -u from your 2.5.4 source tarball and from my rpm.
I wonder how this could have been changed, I'll ask my teammates why. I 
think that is a human mistake, and that is not from rpmforge packagers.
It's seems that with your original code everything is OK. Thanks a lot 
for helping me and excuse me for wasting your time.

--- amavisd.fromtarball    2009-06-29 13:57:07.000000000 +0200
+++ /usr/sbin/amavisd    2008-11-10 11:37:08.000000000 +0100
@@ -3123,6 +3123,8 @@
 # for my $f (sort {$s{$a}<=>$s{$b}} keys %fld)
 #   { do_log(5, "%-8s -> /%s/", $f,$fld{$f}) }
   \%fld;
+
+   do_log(2, "premier -> /%s/", $fld{'from-tcp'});
 }
 
 sub fish_out_ip_from_received($) {

Sebastien

Mark Martinec a écrit :
> Sébastien,
>
>   
>> Acutally I run a postfix 2.5.4 and amavisd-new 2.5.4 on a centos 4 box.
>> We got these error :
>> /(!!)TROUBLE in check_mail, but must continue (1): main_log_entry
>> FAILED: Can't use stri
>> ng ("1") as a HASH ref while "strict refs" in use at /usr/sbin/amavisd
>> line 3134, <GEN78> line 648.
>> /In our logs, mails are scanned with no problem but this warning is very
>> annoying because all of the amavis temporary directories are not
>> suppressed :
>> /(!)PRESERVING EVIDENCE in /var/amavis/tmp/amavis-20090629T105243-24158
>> /
>> I can't see what is the problem, it seems that it's in
>> fish_out_ip_from_received function on this line:
>> /for (grep {defined} (@$fields_ref{qw(from-tcp from from-com)}))/
>>     
>
> I don't remember any know problems in that area.
> Could you please check if your subroutines 'sub parse_received'
> and 'sub fish_out_ip_from_received' are the same as in my
> original distribution tarball?
>
> You may want to add some debugging printouts, e.g.:
>
> --- amavisd~  2008-04-10 16:18:49.000000000 +0200
> +++ amavisd   2009-06-29 13:39:04.000000000 +0200
> @@ -3123,5 +3123,7 @@
>  # for my $f (sort {$s{$a}<=>$s{$b}} keys %fld)
>  #   { do_log(5, "%-8s -> /%s/", $f,$fld{$f}) }
> -  \%fld;
> +  my($result) = \%fld;
> +  do_log(0, "TEST1 parse_received, result=%s", $result);
> +  $result;
>  }
>  
> @@ -3129,6 +3131,8 @@
>    my($received) = @_;
>    my($fields_ref) = parse_received($received);
> +  do_log(0, "TEST2 fish_out_ip_from_received, got %s", $fields_ref);
>    my($ip); local($1);
>    for (grep {defined} (@$fields_ref{qw(from-tcp from from-com)})) {
> +    do_log(0, "TEST3 field %s", $_);
>      if (/ \[ (\d{1,3} (?: \. \d{1,3}){3}) (?: \. \d{4,5} )? \] /x) {
>        $ip = $1;  last;
>
>
>
> Mark
>
> ------------------------------------------------------------------------------
> _______________________________________________
> AMaViS-user mailing list
> AMaViS-user@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/amavis-user 
>  AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
>  AMaViS-HowTos:http://www.amavis.org/howto/ 
>   


------------------------------------------------------------------------------
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to