Re: [courier-users] Pythonfilter 1.6 doesn't work for MySQL

2009-07-01 Thread Paweł Tęcza
Gordon Messmer pisze:
 On 06/29/2009 07:48 AM, Paweł Tęcza wrote:
 Secondly, the latest version of Pythonfilter can't create automagically
 tables greylist_passed and greylist_notpassed in my pythonfilter
 database:
 
 Does your pythonfilter user have permissions to create tables in MySQL? 

Hi Gordon,

Thanks a lot for your reply and the hint! Yes, it was my fault and I am
really ashamed. I forgot about so simple thing like create table
permission. I only set privileges for select, insert, update, delete and
lock tables :)

BTW, what about the deprecation warnings? Can I ignore them?

Have a nice day,

Pawel


--
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Pythonfilter 1.6 doesn't work for MySQL

2009-07-01 Thread Gordon Messmer
On 06/30/2009 03:15 AM, Paweł Tęcza wrote:
 Thanks a lot for your reply and the hint! Yes, it was my fault and I am
 really ashamed. I forgot about so simple thing like create table
 permission. I only set privileges for select, insert, update, delete and
 lock tables :)

 BTW, what about the deprecation warnings? Can I ignore them?

Yeah, I think it's safe to ignore them.  I haven't gotten around to 
fixing the code for 2.6 or 3, and probably won't for a little while. 
Anyone who's bothered by the warnings can send patches. :)


--
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


[courier-users] Pythonfilter 1.6 doesn't work for MySQL

2009-06-29 Thread Paweł Tęcza
Hello Gordon,

I'm trying to switch from your Pythonfilter 1.5 and PostgreSQL storage
to Pythonfilter 1.6 and MySQL storage. Unfortunately it doesn't work
for me :(

Firsty, when I start Pythonfilter, then it displays me the following
warning messages:

Jun 29 15:57:15 apollo4 courierfilter: Starting pythonfilter
Jun 29 15:57:15 apollo4 courierfilter:
/var/lib/python-support/python2.6/courier/config.py:48:
DeprecationWarning: os.popen4 is deprecated.  Use the subprocess module.
Jun 29 15:57:15 apollo4 courierfilter: (chIn, chOut) =
os.popen4('courier-config')
Jun 29 15:57:15 apollo4 courierfilter:
/var/lib/python-support/python2.6/courier/config.py:68:
DeprecationWarning: os.popen4 is deprecated.  Use the subprocess module.
Jun 29 15:57:15 apollo4 courierfilter: (chIn, chOut) =
os.popen4('%s/courier --version' % sbindir)
Jun 29 15:57:15 apollo4 courierfilter: Initialized the whitelist_auth
python filter
Jun 29 15:57:15 apollo4 courierfilter: Initialized the whitelist_block
python filter
Jun 29 15:57:15 apollo4 courierfilter:
/var/lib/python-support/python2.6/pythonfilter/greylist.py:21:
DeprecationWarning: the md5 module is deprecated; use hashlib instead
Jun 29 15:57:15 apollo4 courierfilter: import md5
Jun 29 15:57:15 apollo4 courierfilter:
/var/lib/python-support/python2.6/MySQLdb/__init__.py:34:
DeprecationWarning: the sets module is deprecated
Jun 29 15:57:15 apollo4 courierfilter: from sets import ImmutableSet
Jun 29 15:57:15 apollo4 courierfilter: Initialized the greylist python
filter

Secondly, the latest version of Pythonfilter can't create automagically
tables greylist_passed and greylist_notpassed in my pythonfilter
database:

Jun 29 16:03:19 apollo4 courierfilter: Uncaught exception in greylist
doFilter function: class '_mysql_exceptions.ProgrammingError':(1146,
Table 'pythonfilter.greylist_Passed' doesn't exist)
Jun 29 16:03:19 apollo4 courierfilter: File
/etc/courier/filters/active/pythonfilter, line 200, in processMessage
Jun 29 16:03:19 apollo4 courierfilter: replyCode = i_filter[1](bodyFile,
controlFileList)
Jun 29 16:03:19 apollo4 courierfilter: File
/var/lib/python-support/python2.6/pythonfilter/greylist.py, line 104,
in doFilter
Jun 29 16:03:19 apollo4 courierfilter: _sendersPassed.purge()
Jun 29 16:03:19 apollo4 courierfilter: File
/var/lib/python-support/python2.6/pythonfilter/TtlDb.py, line 159, in
purge
Jun 29 16:03:19 apollo4 courierfilter: (('value', minVal),))
Jun 29 16:03:19 apollo4 courierfilter: File
/var/lib/python-support/python2.6/pythonfilter/TtlDb.py, line 134, in
_dbWrite
Jun 29 16:03:19 apollo4 courierfilter: c = self._dbExec(query, params)
Jun 29 16:03:19 apollo4 courierfilter: File
/var/lib/python-support/python2.6/pythonfilter/TtlDb.py, line 113, in
_dbExec
Jun 29 16:03:19 apollo4 courierfilter: c.execute(query, exec_params)
Jun 29 16:03:19 apollo4 courierfilter: File
/var/lib/python-support/python2.6/MySQLdb/cursors.py, line 166, in execute
Jun 29 16:03:19 apollo4 courierfilter: self.errorhandler(self, exc, value)
Jun 29 16:03:19 apollo4 courierfilter: File
/var/lib/python-support/python2.6/MySQLdb/connections.py, line 35, in
defaulterrorhandler
Jun 29 16:03:19 apollo4 courierfilter: raise errorclass, errorvalue

I remember that Pythonfilter created them for PostgreSQL without my
help. Do I need to create these tables for MySQL manually?

I have Ubuntu Jaunty box with the following Python packages:

python  2.6.2-0ubuntu1
python-apt  0.7.9~exp2ubuntu10
python-central  0.6.11ubuntu7
python-egenix-mxdatetime3.1.1-1ubuntu1
python-egenix-mxtools   3.1.1-1ubuntu1
python-gdbm 2.6.2-0ubuntu1
python-gnupginterface   0.3.2-9ubuntu2
python-minimal  2.6.2-0ubuntu1
python-mysqldb  1.2.2-7ubuntu1
python-psycopg2 2.0.8-0ubuntu2
python-support  0.8.7ubuntu4
python2.4   2.4.6-1ubuntu3
python2.4-minimal   2.4.6-1ubuntu3
python2.6   2.6.2-0ubuntu1
python2.6-minimal   2.6.2-0ubuntu1

My best regards,

Pawel


--
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Pythonfilter 1.6 doesn't work for MySQL

2009-06-29 Thread Gordon Messmer
On 06/29/2009 07:48 AM, Paweł Tęcza wrote:
 Secondly, the latest version of Pythonfilter can't create automagically
 tables greylist_passed and greylist_notpassed in my pythonfilter
 database:

Does your pythonfilter user have permissions to create tables in MySQL? 
  If you manually try to:

CREATE TABLE greylist_Passed (id CHAR(64) NOT NULL,
value BIGINT NOT NULL,
PRIMARY KEY(id));

.. what happens?


--
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users