Phil,

> I recently set up amavisd-new-2.6.3 (20090422) running on solaris 10,
> perl 5.8.8, and postfix 2.4 (using CSW packages).
> 
> Jan 12 01:44:03 host amavis[1884]: [ID 702911 mail.info] (01884)
> ClamAV-clamd: Can't connect to INET6 socket 127.0.0.1:3310: Address family
> not supported by protocol family, retrying (1)

> ['ClamAV-clamd',
>   \&ask_daemon, ["CONTSCAN {}\n", "127.0.0.1:3310"],
>   qr/\bOK$/m, qr/\bFOUND$/m,
>   qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
> 
> Clamd is installed and listening on 127.0.0.1:3310.  However
>  IO::Socket::INET6 is also installed and this (unique?) configuration seems
>  to be causing a problem.
> 
> The code that attempts to determine inet4 with this code:
>     my($is_inet4) = $is_inet && $socketname=~/^\d+.\d+.\d+.\d+\z/ ? 1 : 0;
> But that check fails when $socketname is "127.0.0.1:3310".  Obviously the
>  check is simple and doesn't allow host names instead.
> 
> Hopefully the simple patch below helps others out there (note the regex
>  above is used in one other place in the code but in that case it appears
>  the port comes in as a separate argument so it may be fine).

> - my($is_inet4) = $is_inet && $socketname=~/^\d+.\d+.\d+.\d+\z/ ? 1 : 0;
> + my($is_inet4) = $is_inet && $socketname=~/^\d+\.\d+\.\d+\.\d+/ ? 1 : 0;

Thanks, I will apply your fix to 2.6.5
(but use /^\d+.\d+.\d+.\d+(?:\z|:)/ instead, just in case).

Nevertheless, the IO::Socket::INET6 should be able to handle such
connection over IPv4, and it does here. I remember that some versions
had trouble with selecting wrong protocol family for the source socket,
thus producing the above error. Which version of IO::Socket::INET6
do you have?

  Mark


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
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