John,

> I've installed the free Linux AVG7, and I would like to make amavisd-new
> use it. My amavisd.conf has got configuration for an AVG daemon, and I
> have one running on the same port, but it doesn't quite work and I don't
> know enough about configuring virus scanners in Amavis to fix it.
>
> I've got amavisd-new 2.5.1 from an openSUSE package, and my conf file has:
>
> # ### http://www.grisoft.com/
>  ['AVG Anti-Virus',
>    \&ask_daemon, ["SCAN {}\n", '127.0.0.1:55555'],
>    qr/^200/, qr/^403/, qr/^403 .*?: ([^\r\n]+)/ ],
>
> The error in the log file when Amavis tries to use it is:
>
> Nov 10 21:36:48 linda amavis[5746]: (05746-14) (!!)ask_av (AVG
> Anti-Virus) FAILED - unexpected result: 220-AVG7 Anti-Virus daemon mode
> scanner\r\n220-Program version 7.5.51, engine 442\r\n220-Virus Database:
> Version 270.9.0/1779  2008-11-10
> \r\n220 Ready\r\n200 OK\r\n
>
> This I imagine is because the daemon outputs 3 informational lines that
> the rule doesn't understand. I don't know how to update the rule to make
> it ignore these. For completeness, a trace of an example daemon
> conversation:
>
> <<  220-AVG7 Anti-Virus daemon mode scanner
> <<  220-Program version 7.5.51, engine 442
> <<  220-Virus Database: Version 270.9.0/1779  2008-11-10
> <<  220 Ready
> >>  SCAN /tmp/xorg.conf.16465
> <<  200 OK
> >>  QUIT
> <<  221 Connection closed

Try adding a /m regexp flag, which changes how ^ matches in a
perl regular expressions, letting it match at any line beginning,
not only at the first line:

 ['AVG Anti-Virus',
   \&ask_daemon, ["SCAN {}\n", '127.0.0.1:55555'],
   qr/^200/m, qr/^403/m, qr/^403 .*?: ([^\r\n]+)/m ],

Let me know if it helps.

  Mark


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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