Sections:
all
about
computers
general
links

How to fix Vipul's Razor's "Invalid argument" error

25 September 04

If you are using Razor and you get the following error (which I received as well, on Redhat 8/i386):

Unable to connect to pride.cloudmark.com:2703; Reason: Invalid argument.
Unable to connect to wonder.cloudmark.com:2703; Reason: Invalid argument.
Unable to connect to thrill.cloudmark.com:2703; Reason: Invalid argument.
Unable to connect to pride.cloudmark.com:2703; Reason: Invalid argument.

I modified Razor2/Client/Core.pm (which will be somewhere in /usr/lib/perl5). You can either download the patch file or edit it yourself. Basically add a ‘Use Socket’ at the top. go to line 1733 (its right before the second use of ‘IO::Socket::INET’) and add:

my $ghbn = gethostbyname($server);
my $addr = inet_ntoa($ghbn);

Change the ‘PeerAddr => $server’ to ‘PeerAddr => $addr’. Also you can modify the log line (about 6 or so lines down) from ’$server:$port’ to ’$server:$addr:$port’ so it will also print the IP address in the error log.

Comment

  1. Thanks! :)
    I was wondering why amavis was leaving razor-agent.log files everywhere filled with this error…
    Evgeny    Sun Jan 9th, 11:37pm    #

commenting closed for this article

Older Articles