Accessing the scanners from the commandline?

Mark Martinec Mark.Martinec+amavis at ijs.si
Fri Aug 17 16:06:00 CEST 2012


Ralf,

> Is there any way of accessing the scanners directly from the
> commandline in the same way amavis does it?
> 
> I can of course do stuff like:
> 
> # socat stdin unix-connect:/var/run/avast/avast.sock
> 220 DAEMON Welcome to New Avast! daemon 0.0.92 (VPS 120808-0 08.08.2012)
> $PID=11762$ SCAN /var/lib/amavis/tmp/testvirus.zip
> 200 OK
> /var/lib/amavis/tmp/testvirus.zip/Bestellung 10.07.2012 .pif [L] 1759314145
> Win32:Injector-ARW [Trj] /var/lib/amavis/tmp/testvirus.zip/azel.exe [L]
> 1046957622 Win32:Downloader-PXR [Trj] /var/lib/amavis/tmp/testvirus.zip[+]
> QUIT
> 221 Service closing transmission channel

The expect(1) program, and the Expect.pm perl module come to mind :)

> But the point is that it would be cool to somehow harness the power of
> amavis for that :)
> 
> While creating the fixed pattern for avast! yesterday I was sending
> LOTS of mails just to see if the output could be parsed properly...

If you enable some AM.PDP socket in amavisd.conf, you could
use the 'amavisd-submit' program from a command line to pass
an e-mail from stdin to amavisd.

  Mark


More information about the amavis-users mailing list