-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
I've two related pythonfilter problems and hope to get some help. First problem is the quarantine release process. pythonfilter-modules.conf contains: ... [clamav.py] localSocket = '/tmp/clamd' action = 'quarantine' [Quarantine] siteid = '7d35f0b0-492a-47c6-b513-f28bd50476d3' dir = '/var/lib/pythonfilter/quarantine' days = 14 notifyRecipient = 1 alsoNotify = '[email protected]' userRelease = 1 Notification received (parts) was: Received: from mserv.mydomain.com ([::ffff:127.0.0.1]) by mserv.mydomain.com with esmtp; Sat, 09 Oct 2010 21:02:53 +0900 id 00008096.4CB059ED.00002AE6 From: Mail Quarantine System <[email protected]> To: [email protected] Subject: Quarantine notice Message ID: <[email protected]> Date: Sat, 09 Oct 2010 21:02:53 +0900 You received a message that was quarantined because: The virus ClamAV-Test-File was found in the message ..... If this was a message that you were expecting, and you know that it is safe to continue, then forward this message to the following address to release the quarantined message. ..... Quarantine release address: quarantine-7d35f0b0-4a07-40a6-b513-f28bd50476d3-32...@mserv.mydomain.com Therefore I forwarded the email to the quarantine address: Oct 9 21:04:44 mserv courierd: newmsg,id=00008071.4CB05A5C.00002B05: dns; mypc ([::ffff:183.105.22.32]) Oct 9 21:04:44 mserv courierd: started,id=00008071.4CB05A5C.00002B05,from=<[email protected]>,module=esmtp,host=mserv.mydomain.com,addr=<quarantine-7d35f0b0-4a07-40a6-b513-f28bd50476d3-32...@mserv.mydomain.com> Oct 9 21:04:44 mserv courierd: Waiting. shutdown time=none, wakeup time=Sat Oct 9 21:08:39 2010, queuedelivering=5, inprogress=1 Oct 9 21:04:44 mserv courieresmtp: id=00008071.4CB05A5C.00002B05,from=<[email protected]>,addr=<quarantine-7d35f0b0-4a07-40a6-b513-f28bd50476d3-32...@mserv.mydomain.com>: configuration error: mail loops back to myself (MX problem). Oct 9 21:04:44 mserv courieresmtp: id=00008071.4CB05A5C.00002B05,from=<[email protected]>,addr=<quarantine-7d35f0b0-4a07-40a6-b513-f28bd50476d3-32...@mserv.mydomain.com>,status: failure Oct 9 21:04:44 mserv courierd: completed,id=00008071.4CB05A5C.00002B05 Oct 9 21:04:44 mserv courierd: started,id=00008071.4CB05A5C.00002B05,from=<>,module=dsn,host=,addr=<[email protected]> Oct 9 21:04:44 mserv courierd: Waiting. shutdown time=none, wakeup time=Sat Oct 9 21:08:39 2010, queuedelivering=5, inprogress=1 Oct 9 21:04:44 mserv courierd: newmsg,id=00008096.4CB05A5C.00002B0A: dns; localhost (localhost [127.0.0.1]) Oct 9 21:04:44 mserv courierd: started,id=00008096.4CB05A5C.00002B0A,from=<>,module=local,host=info!!950!950!/home/mydomain.com/mail/info!!,addr=<info> Oct 9 21:04:44 mserv courierd: Waiting. shutdown time=none, wakeup time=Sat Oct 9 21:08:39 2010, queuedelivering=6, inprogress=2 Oct 9 21:04:44 mserv courierd: completed,id=00008071.4CB05A5C.00002B05 Which sent a mail back complaining about a mail loop - --------------------------------------------------------------------------- UNDELIVERABLE MAIL Your message to the following recipients cannot be delivered: <quarantine-7d35f0b0-4a07-40a6-b513-f28bd50476d3-32...@mserv.mydomain.com>: <<< configuration error: mail loops back to myself (MX problem). - --------------------------------------------------------------------------- => Note that I don't have 'local' in the 'enablefiltering' configuration file! Also note that the sender address is empty! Problem 2: Because of this problem I thought I just disable the quarantine release and the alsoNotify: - --- pythonfilter-modules.conf: ... [clamav.py] localSocket = '/tmp/clamd' action = 'quarantine' [Quarantine] siteid = '7d35f0b0-492a-47c6-b513-f28bd50476d3' dir = '/var/lib/pythonfilter/quarantine' days = 14 notifyRecipient = 1 alsoNotify = '' userRelease = 0 This crashed the filter because of the empty alsoNotify: - -- - - (test) virus mail arrives: Oct 9 21:19:43 mserv courieresmtpd: started,ip=[::ffff:213.165.64.23] Oct 9 21:19:43 mserv courieresmtpd: HELO mail.gmx.net Oct 9 21:19:44 mserv courieresmtpd: MAIL FROM:<[email protected]> Oct 9 21:19:45 mserv courieresmtpd: RCPT TO:<[email protected]> Oct 9 21:19:45 mserv courieresmtpd: DATA Oct 9 21:19:46 mserv courieresmtpd: started,ip=[::ffff:193.26.13.231] - - virus message to recipient - but FROM address is empty Oct 9 21:19:46 mserv courieresmtpd: started,ip=[::ffff:127.0.0.1] Oct 9 21:19:46 mserv courieresmtpd: ehlo mserv.mydomain.com Oct 9 21:19:46 mserv courieresmtpd: mail FROM:<> size=955 Oct 9 21:19:46 mserv courieresmtpd: rcpt TO:<[email protected]> Oct 9 21:19:46 mserv courieresmtpd: data Oct 9 21:19:46 mserv courierd: newmsg,id=00008097.4CB05DE2.00002D17: dns; mserv.mydomain.com ([::ffff:127.0.0.1]) Oct 9 21:19:46 mserv courierd: started,id=00008097.4CB05DE2.00002D17,from=<>,module=local,host=info!!950!950!/home/mydomain.com/mail/info!!,addr=<info> - - mail to recipient delivered Oct 9 21:19:46 mserv courierlocal: id=00008097.4CB05DE2.00002D17,from=<>,addr=<[email protected]>,size=1205,success: Message delivered. Oct 9 21:19:46 mserv courierd: completed,id=00008097.4CB05DE2.00002D17 Oct 9 21:19:46 mserv courierd: Waiting. shutdown time=Sat Oct 9 22:18:40 2010, wakeup time=Sat Oct 9 21:20:31 2010, queuedelivering=4, inprogress=0 - - alsoNotify address not set Oct 9 21:19:46 mserv courieresmtpd: mail FROM:<> size=955 Oct 9 21:19:46 mserv courieresmtpd: rcpt TO:<> Oct 9 21:19:50 mserv courieresmtpd: DATA Oct 9 21:19:54 mserv courieresmtpd: error,relay=::ffff:127.0.0.1,from=<>,to=<>: 500 Invalid address Oct 9 21:19:54 mserv courieresmtpd: rset Oct 9 21:19:54 mserv courierfilter: Uncaught exception in "clamav" doFilter function: <class 'smtplib.SMTPRecipientsRefused'>:{'': (500, 'Invalid address')} Oct 9 21:19:54 mserv courierfilter: File "/etc/courier/filters/active/pythonfilter", line 200, in processMessage Oct 9 21:19:54 mserv courierfilter: replyCode = i_filter[1](bodyFile, controlFileList) Oct 9 21:19:54 mserv courierfilter: File "/usr/lib/python2.5/site-packages/pythonfilter/clamav.py", line 68, in doFilter Oct 9 21:19:54 mserv courierfilter: return scanMessage(bodyFile, controlFileList) Oct 9 21:19:54 mserv courierfilter: File "/usr/lib/python2.5/site-packages/pythonfilter/clamav.py", line 36, in scanMessage Oct 9 21:19:54 mserv courierfilter: return handleVirus(bodyFile, controlFileList, avresult[1]) Oct 9 21:19:54 mserv courierfilter: File "/usr/lib/python2.5/site-packages/pythonfilter/clamav.py", line 56, in handleVirus Oct 9 21:19:54 mserv courierfilter: 'The virus %s was found in the message' % virusSignature) Oct 9 21:19:54 mserv courierfilter: File "/usr/lib/python2.5/site-packages/courier/quarantine.py", line 180, in quarantine Oct 9 21:19:54 mserv courierfilter: sendNotice(message, x[0]) Oct 9 21:19:54 mserv courierfilter: File "/usr/lib/python2.5/site-packages/courier/quarantine.py", line 84, in sendNotice Oct 9 21:19:54 mserv courierfilter: server.sendmail('', config['alsoNotify'], msg) Oct 9 21:19:54 mserv courierfilter: File "/usr/lib/python2.5/smtplib.py", line 703, in sendmail Oct 9 21:19:54 mserv courierfilter: raise SMTPRecipientsRefused(senderrs) Oct 9 21:19:54 mserv courierd: newmsg,id=00008071.4CB05DE1.00002D13: dns; mail.gmx.net ([::ffff:213.165.64.23]) Oct 9 21:19:54 mserv courierd: completed,id=00008071.4CB05DE1.00002D13 Once another virus mail arrived you'll see this: Oct 9 22:19:34 mserv courieresmtpd: EHLO mobil.com Oct 9 22:19:35 mserv courieresmtpd: MAIL FROM: <[email protected]> Oct 9 22:19:35 mserv courieresmtpd: RCPT TO: <[email protected]> Oct 9 22:19:35 mserv courierfilter: LibClamAV Error: cl_load: engine == NULL Oct 9 22:19:35 mserv courierfilter: pythonfilter clamav reject,from=<[email protected]>,addr=<[email protected]>: 430 Null argument passed to function Oct 9 22:19:35 mserv courieresmtpd: error,relay=::ffff:67.193.68.129,from=<[email protected]>: 430 Null argument passed to function Oct 9 22:19:35 mserv courieresmtpd: QUIT And from now you can't send any mail from the server. You need to restart the server. This is not only annoying but business wise not acceptable because you don't know when this 'next mail' comes. The default 'Reject' action seems to work ok and therefore I'm using it now. But would be great if the 'release' action would work as well. Cheers, Bernd -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkywjQYACgkQpYU8M8PbPV6GFgCdGcEWifVYOZC2wkPhWEaRuy0u tEcAn2jzRWRbOuFvRQTmgTVrHeDUq6WU =uldB -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ courier-users mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
