Finally I have pythonfilter running. But it's giving me an error, and as
much as I had reviewed the code I can'f find what's hapening. There's
the /var/log/maillog snip:
Jun 8 15:53:34 jupiter courierfilter: Debugging filter invoked:
Jun 8 15:53:34 jupiter courierfilter: PID: 16764
Jun 8 15:53:34 jupiter courierfilter: CWD: /usr/lib/courier
Jun 8 15:53:34 jupiter courierfilter: EUID: 200
Jun 8 15:53:34 jupiter courierfilter: EGID: 200
Jun 8 15:53:34 jupiter courierfilter: UID: 200
Jun 8 15:53:34 jupiter courierfilter: GID: 200
Jun 8 15:53:34 jupiter courierfilter: Additional groups: [200]
Jun 8 15:53:34 jupiter courierfilter: Body:
/usr/lib/courier/var/tmp/118132/D3562314
Jun 8 15:53:34 jupiter courierfilter: Raw stat: (33200, 3562315L,
2304L, 1, 200, 200, 2362L, 1181328814, 1181328814, 1181328814)
Jun 8 15:53:34 jupiter courierfilter: Control file:
/usr/lib/courier/var/tmp/118132/1181328814.16783.mail.uygroup.com.uy
Jun 8 15:53:34 jupiter courierfilter: Raw stat: (33200, 3562314L,
2304L, 1, 200, 200, 143L, 1181328814, 1181328814, 1181328814)
Jun 8 15:53:34 jupiter courierfilter: Uncaught exception in "clamav"
doFilter function: ScanError:lstat() failed. ERROR
Jun 8 15:53:34 jupiter courierfilter: File
"/usr/lib/courier/etc/filters/active/pythonfilter", line 180, in
processMessage
Jun 8 15:53:34 jupiter courierfilter: replyCode = i_filter[1](bodyFile,
controlFileList)
Jun 8 15:53:34 jupiter courierfilter: File
"/usr/lib/python2.4/site-packages/pythonfilter/clamav.py", line 33, in
doFilter
Jun 8 15:53:34 jupiter courierfilter: avresult =
pyclamd.scan_file(bodyFile)
Jun 8 15:53:34 jupiter courierfilter: File
"/usr/lib/python2.4/pyclamd.py", line 286, in scan_file
Jun 8 15:53:34 jupiter courierfilter: raise ScanError, virusname
I've replaced pyclamav with pyclamd in clamav.py
def doFilter(bodyFile, controlFileList):
# check for viruses
try:
pyclamd.init_unix_socket('/var/run/clamav/clamd.socket')
avresult = pyclamd.scan_file(bodyFile)
except Exception, e:
return "554 " + str(e)
if avresult[0]:
return "554 %s was detected. Abort!" % avresult[1]
return ''
Somebody using pythonfilter can check if I'm lacking something?
--
*/------------------------------------------------------------------------------------------------------------------
Enrique Verdes/**
UyGroup*/ /Consulting & Technology
*/_
www.uygroup.com.uy <http://www.uygroup.com.uy>_/*/
Av. Gral. Paz 1481 - CP 11400
Montevideo - Uruguay
Phone/Fax: (+598-2) 600-6200 - ext. 223
*/------------------------------------------------------------------------------------------------------------------/*
AVISO DE CONFIDENCIALIDAD:
LA INFORMACIÓN CONTENIDA EN ESTE CORREO ELECTRÓNICO ES PRIVILEGIADA Y
CONFIDENCIAL Y FUE ENVIADO PARA EL USO EXCLUSIVO DEL DESTINATARIO
DESIGNADO EN EL MISMO.
Si usted no es el destinatario, se prohibe estrictamente la
reproducción, distribución, y cualquier otra forma de difusión o uso de
esta comunicación.
Si usted ha recibido este correo electrónico por error, por favor
contéctese con nosotros inmediatamente al teléfono: (+598-2) 600-62-00 o
por el correo electrónico: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
*/------------------------------------------------------------------------------------------------------------------/*
CONFIDENTIALITY NOTICE:
THE INFORMATION CONTAINED IN THIS E-MAIL IS PRIVILEGED AND CONFIDENTIAL
AND IS INTENDED FOR THE EXCLUSIVE USE OF THE ADDRESSEE DESIGNATED ABOVE.
If you are not the addressee, any disclosure, reproduction distribution,
or other dissemination or use of this communication is strictly prohibited.
If you have received this electronic mail by error please contact us
immediately by telephone: (+598-2) 600-62-00 or by e-mail:
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
*/------------------------------------------------------------------------------------------------------------------/*
/
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users