Pythonfilter - Greylist Stopped Working

View: New views
5 Messages — Rating Filter:   Alert me  

Pythonfilter - Greylist Stopped Working

by Aldisa Admin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello All,

My greylisting filter has suddenly stopped working.  I have not touched
the server for several months, and the problem seems to have appeared on
its own two days ago.  Realized something was wrong as volume of spam
messages suddenly went significantly higher.

Here is what the log shows when the problem started:

Oct 11 08:35:58 server courieresmtpd: started,ip=[84.255.224.167]
Oct 11 08:36:01 server courieresmtpd:
error,relay=84.255.224.167,from=<teoeqxz@...>:
451 4.7.1 Greylisting in action, please come back in 00:05:00
Oct 11 08:36:25 server courieresmtpd: started,ip=[222.253.178.146]
Oct 11 08:36:41 server courieresmtpd:
error,relay=222.253.178.146,from=<vacanciesgd1@...>:
517-MX records for nallatech-inc.com violate section 3.3.9 of RFC 1035.
Oct 11 08:36:41 server courieresmtpd:
error,relay=222.253.178.146,from=<vacanciesgd1@...>: 517
Invalid domain, see <URL:ftp://ftp.isi.edu/in-notes/rfc1035.txt>
Oct 11 08:36:41 server courieresmtpd:
error,relay=222.253.178.146,msg="502 ESMTP command error",cmd: RCPT TO:
<abid@...>
Oct 11 08:36:57 server courieresmtpd:
error,relay=222.253.178.146,msg="502 ESMTP command error",cmd: RCPT TO:
<abid@...>
Oct 11 08:37:29 server courieresmtpd:
error,relay=222.253.178.146,msg="502 ESMTP command error",cmd: DATA
Oct 11 08:38:11 server courieresmtpd: started,ip=[121.148.120.85]
Oct 11 08:40:10 server courieresmtpd: started,ip=[213.233.64.160]
Oct 11 08:41:24 server courieresmtpd: started,ip=[114.116.64.16]
Oct 11 08:41:26 server courierfilter: Uncaught exception in "greylist"
doFilter function: exceptions.KeyError:'b8963151215870c3169ffaa28721abbd'
Oct 11 08:41:27 server courierfilter: File
"/usr/local/etc/courier/filters/active/pythonfilter", line 178, in
processMessage
Oct 11 08:41:27 server courierfilter: replyCode = i_filter[1](bodyFile,
controlFileList)
Oct 11 08:41:27 server courierfilter: File
"/usr/local/lib/python2.4/site-packages/pythonfilter/greylist.py", line
131, in doFilter
Oct 11 08:41:27 server courierfilter: _sendersNotPassed.purge()
Oct 11 08:41:27 server courierfilter: File
"/usr/local/lib/python2.4/site-packages/pythonfilter/TtlDb.py", line
109, in purge
Oct 11 08:41:27 server courierfilter: if float(self.db[key]) < minVal:
Oct 11 08:41:27 server courierd: newmsg,id=0024A80A.4AD1D276.0000802B:
dns; OJNISRSHTR ([114.116.64.16])
Oct 11 08:41:27 server courierd:
started,id=0024A80A.4AD1D276.0000802B,from=<barge4@...>,module=local,host=abid!!1003!1003!/var/vmail/aldisa/abid!!,addr=<abid>
Oct 11 08:41:27 server courierd: Waiting.  shutdown time=none, wakeup
time=none, queuedelivering=1, inprogress=1

You can see that it worked fine at 08:36, but suddenly started
generating an exception at 08:41.  Since I discovered the problem, I
have stopped and re-started the filter, stopped and restarted courier
and rebooted the machine.  No luck.

I'm thinking it might be disk corruption.

Any feedback on how to fix the problem will be greatly appreciated.

Thanks,

Abid

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Re: Pythonfilter - Greylist Stopped Working

by Milan Obuch-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 14 October 2009 04:47:33 Aldisa Admin wrote:
> Hello All,
>
> My greylisting filter has suddenly stopped working.  I have not touched
> the server for several months, and the problem seems to have appeared on
> its own two days ago.  Realized something was wrong as volume of spam
> messages suddenly went significantly higher.
>
> Here is what the log shows when the problem started:
>

[ snip ]

> Oct 11 08:41:24 server courieresmtpd: started,ip=[114.116.64.16]
> Oct 11 08:41:26 server courierfilter: Uncaught exception in "greylist"
> doFilter function: exceptions.KeyError:'b8963151215870c3169ffaa28721abbd'
> Oct 11 08:41:27 server courierfilter: File
> "/usr/local/etc/courier/filters/active/pythonfilter", line 178, in
> processMessage
> Oct 11 08:41:27 server courierfilter: replyCode = i_filter[1](bodyFile,
> controlFileList)
> Oct 11 08:41:27 server courierfilter: File
> "/usr/local/lib/python2.4/site-packages/pythonfilter/greylist.py", line
> 131, in doFilter
> Oct 11 08:41:27 server courierfilter: _sendersNotPassed.purge()
> Oct 11 08:41:27 server courierfilter: File
> "/usr/local/lib/python2.4/site-packages/pythonfilter/TtlDb.py", line
> 109, in purge
> Oct 11 08:41:27 server courierfilter: if float(self.db[key]) < minVal:
> Oct 11 08:41:27 server courierd: newmsg,id=0024A80A.4AD1D276.0000802B:
> dns; OJNISRSHTR ([114.116.64.16])
> Oct 11 08:41:27 server courierd:
> started,id=0024A80A.4AD1D276.0000802B,from=<barge4@...>,module=local,
>host=abid!!1003!1003!/var/vmail/aldisa/abid!!,addr=<abid> Oct 11 08:41:27
> server courierd: Waiting.  shutdown time=none, wakeup time=none,
> queuedelivering=1, inprogress=1
>

This indicates some corrugtion in db file. I see it occasionally with
comeagain module, too. I have no real fix, just workaround - delete
correspondents.db from /var/spool/courier/pythonfilter directory, which
(unfortunately) deletes history and restarts data collecting. In your case,
it would be greylist(something) file. You can try to rename it one by one to
see which file got corrupted. Then restart pythonfilter.

Regards,
Milan

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Re: Pythonfilter - Greylist Stopped Working

by Aldisa Admin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I deleted all the greylisting*.db files in /var/spool/courier/pythonfilter folder and this fixed the problem.

Thank you, Milan.

Abid

On 14/10/2009 1:02 AM, Milan Obuch wrote:
On Wednesday 14 October 2009 04:47:33 Aldisa Admin wrote:
  
Hello All,

My greylisting filter has suddenly stopped working.  I have not touched
the server for several months, and the problem seems to have appeared on
its own two days ago.  Realized something was wrong as volume of spam
messages suddenly went significantly higher.

Here is what the log shows when the problem started:

    

[ snip ]

  
Oct 11 08:41:24 server courieresmtpd: started,ip=[114.116.64.16]
Oct 11 08:41:26 server courierfilter: Uncaught exception in "greylist"
doFilter function: exceptions.KeyError:'b8963151215870c3169ffaa28721abbd'
Oct 11 08:41:27 server courierfilter: File
"/usr/local/etc/courier/filters/active/pythonfilter", line 178, in
processMessage
Oct 11 08:41:27 server courierfilter: replyCode = i_filter[1](bodyFile,
controlFileList)
Oct 11 08:41:27 server courierfilter: File
"/usr/local/lib/python2.4/site-packages/pythonfilter/greylist.py", line
131, in doFilter
Oct 11 08:41:27 server courierfilter: _sendersNotPassed.purge()
Oct 11 08:41:27 server courierfilter: File
"/usr/local/lib/python2.4/site-packages/pythonfilter/TtlDb.py", line
109, in purge
Oct 11 08:41:27 server courierfilter: if float(self.db[key]) < minVal:
Oct 11 08:41:27 server courierd: newmsg,id=0024A80A.4AD1D276.0000802B:
dns; OJNISRSHTR ([114.116.64.16])
Oct 11 08:41:27 server courierd:
started,id=0024A80A.4AD1D276.0000802B,from=barge4@...,module=local,
host=abid!!1003!1003!/var/vmail/aldisa/abid!!,addr=<abid> Oct 11 08:41:27
server courierd: Waiting.  shutdown time=none, wakeup time=none,
queuedelivering=1, inprogress=1

    

This indicates some corrugtion in db file. I see it occasionally with 
comeagain module, too. I have no real fix, just workaround - delete 
correspondents.db from /var/spool/courier/pythonfilter directory, which 
(unfortunately) deletes history and restarts data collecting. In your case, 
it would be greylist(something) file. You can try to rename it one by one to 
see which file got corrupted. Then restart pythonfilter.

Regards,
Milan

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

  

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Re: Pythonfilter - Greylist Stopped Working

by Milan Obuch-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 15 October 2009 04:12:40 Aldisa Admin wrote:
> I deleted all the greylisting*.db files in
> /var/spool/courier/pythonfilter folder and this fixed the problem.
>
> Thank you, Milan.
>
> Abid
>

[ snip ]

Incidentally, the same error occurred on one of my mail servers couple of
hours ago. What does 'file /var/spool/courier/pythonfilter/*' tell in your
case?

file /var/spool/courier/pythonfilter/*
/var/spool/courier/pythonfilter/auto_whitelist.db:   Berkeley DB 1.85 (Hash,
version 2, native byte-order)
/var/spool/courier/pythonfilter/correspondents.db: Berkeley DB 1.85 (Hash,
version 2, native byte-order)

Milan

> >
> >> Oct 11 08:41:26 server courierfilter: Uncaught exception in "greylist"
> >> doFilter function:
> >> exceptions.KeyError:'b8963151215870c3169ffaa28721abbd' Oct 11 08:41:27
> >> server courierfilter: File
> >> "/usr/local/etc/courier/filters/active/pythonfilter", line 178, in
> >> processMessage
> >> Oct 11 08:41:27 server courierfilter: replyCode = i_filter[1](bodyFile,
> >> controlFileList)
> >> Oct 11 08:41:27 server courierfilter: File
> >> "/usr/local/lib/python2.4/site-packages/pythonfilter/greylist.py", line
> >> 131, in doFilter
> >> Oct 11 08:41:27 server courierfilter: _sendersNotPassed.purge()
> >> Oct 11 08:41:27 server courierfilter: File
> >> "/usr/local/lib/python2.4/site-packages/pythonfilter/TtlDb.py", line
> >> 109, in purge
> >> Oct 11 08:41:27 server courierfilter: if float(self.db[key]) < minVal:
> >
> > This indicates some corrugtion in db file. I see it occasionally with
> > comeagain module, too. I have no real fix, just workaround - delete
> > correspondents.db from /var/spool/courier/pythonfilter directory, which
> > (unfortunately) deletes history and restarts data collecting. In your
> > case, it would be greylist(something) file. You can try to rename it one
> > by one to see which file got corrupted. Then restart pythonfilter.
> >
> > Regards,
> > Milan
> >

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Re: Pythonfilter - Greylist Stopped Working

by Aldisa Admin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Milan,

This is what the folder looks like right now:

# file /var/spool/courier/pythonfilter/*
/var/spool/courier/pythonfilter/auto_whitelist.db:                  
Berkeley DB 1.85 (Hash, version 2, native byte-order)
/var/spool/courier/pythonfilter/greylist_NotPassed.db:              data
/var/spool/courier/pythonfilter/greylist_Passed.db:                 empty
/var/spool/courier/pythonfilter/greylist_whitelistDomains.db:       empty
/var/spool/courier/pythonfilter/greylist_whitelistIPAddresses.db:   empty
/var/spool/courier/pythonfilter/greylist_whitelistMailAddresses.db: empty

When I deleted the "greylist_*" files, the last four were not empty.  
I'm not sure where the data for these files comes from??

Anything else I can assist with?

Abid

On 15/10/2009 12:47 AM, Milan Obuch wrote:

> On Thursday 15 October 2009 04:12:40 Aldisa Admin wrote:
>  
>> I deleted all the greylisting*.db files in
>> /var/spool/courier/pythonfilter folder and this fixed the problem.
>>
>> Thank you, Milan.
>>
>> Abid
>>
>>    
> Incidentally, the same error occurred on one of my mail servers couple of
> hours ago. What does 'file /var/spool/courier/pythonfilter/*' tell in your
> case?
>
> file /var/spool/courier/pythonfilter/*
> /var/spool/courier/pythonfilter/auto_whitelist.db:   Berkeley DB 1.85 (Hash,
> version 2, native byte-order)
> /var/spool/courier/pythonfilter/correspondents.db: Berkeley DB 1.85 (Hash,
> version 2, native byte-order)
>
> Milan
>
>  

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users