Hello tx for the help
I can now use pythonfilter + clamd

For the record :
this below did not work
[clamav.py]
LocalSocket = '/var/run/clamav/clamd.sock'


What I had to do :
- add clamav user to daemon group

- in  /usr/lib/python2.2/site-packages/pythonfilter/clamav.py
pyclamd.init_unix_socket("/var/run/clamav/clamd.sock") instead of 
pyclamd.init_unix_socket()

I am using th V 1.0.0

Regards,




------------------------------------
Frédéric Médery
Administrateur Système /
System Administrator
LexUM, Université de Montréal
email : [EMAIL PROTECTED]
tel.  : (514) 343-6111  p. 1-3288
fax. : (514) 343-7359
------------------------------------



Jérôme Blion wrote:
> FM a écrit :
>> Hello everybody,
>>
>> To force pythonfilter to use the clamd  and clamd.conf config , I 
>> remove pyclamav.so.
>>
>> in clamd.conf I have :
>> LocalSocket /var/run/clamav/clamd.sock
>>
>> but I receive these error from pythonfilter :
>> (...)
>> Jan  4 10:40:20 verona courierfilter: Uncaught exception in "clamav" 
>> doFilter function: ScanError:Could not reach clamd using unix socket 
>> (/var/run/clamd)
>> Jan  4 10:40:20 verona courierfilter: File 
>> "/etc/courier/filters/active/pythonfilter", line 194, in processMessage
>> Jan  4 10:40:20 verona courierfilter: replyCode = 
>> i_filter[1](bodyFile, controlFileList)
>> Jan  4 10:40:20 verona courierfilter: File 
>> "/usr/lib/python2.2/site-packages/pythonfilter/clamav.py", line 50, 
>> in doFilter
>> Jan  4 10:40:20 verona courierfilter: return scanMessage(bodyFile)
>> Jan  4 10:40:20 verona courierfilter: File 
>> "/usr/lib/python2.2/site-packages/pythonfilter/clamav.py", line 35, 
>> in scanMessage
>> Jan  4 10:40:20 verona courierfilter: pyclamd.init_unix_socket()
>> Jan  4 10:40:20 verona courierfilter: File 
>> "/usr/lib/python2.2/site-packages/pyclamd.py", line 111, in 
>> init_unix_socket
>> Jan  4 10:40:20 verona courierfilter: ping()
>> Jan  4 10:40:20 verona courierfilter: File 
>> "/usr/lib/python2.2/site-packages/pyclamd.py", line 167, in ping
>> Jan  4 10:40:20 verona courierfilter: s = __init_socket__()
>> Jan  4 10:40:20 verona courierfilter: File 
>> "/usr/lib/python2.2/site-packages/pyclamd.py", line 414, in 
>> __init_socket__
>> Jan  4 10:40:20 verona courierfilter: raise ScanError, 'Could not 
>> reach clamd using unix socket (%s)' % (clamd_SOCKET)
>> (...)
>>
>> Is there a way to set the unix socket to /var/run/clamav/clamd.sock 
>> instead of /var/run/clamd ?
>>
>> Regards,
>>
>>
>> ------------------------------------------------------------------------- 
>>
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2005.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> courier-users mailing list
>> [email protected]
>> Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
>>   
> Which pythonfilter do you use ?
> With 1.0, I posted a message some days ago...
> Here is a version which allow to use a specific socket...
>
> You have to modify /etc/pythonfilter-modules.conf
>
> Add:
>
> [clamav.py]
> LocalSocket = '/var/run/clamav/clamd.sock'
>
> HTH.
> Jerome Blion.
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> ------------------------------------------------------------------------
>
> _______________________________________________
> courier-users mailing list
> [email protected]
> Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to