April Lorenzen wrote:
> Running ./dbmail.py alone - get this:
>
> Dbmail configuration error: missing key [STORAGE] for stanza [DBMAIL]
Which tell you *exactly* why I don't work, no? :-)
This script does *not* use libdbmail. It doesn't share the normal dbmail utils'
way of knowing what backend-driver to use. To compensate for this lack of common
knowlegde it requires a new config item:
[DBMAIL]
# add one of these for the python libs and utils (for now)
#STORAGE=pgsql
#STORAGE=sqlite
#STORAGE=mysql
db=
user=
host=
etc...
You also need to check the path to your dbmail.conf as defined in lib/dbmail.py
(for now).
> On 9/3/05, April Lorenzen <[EMAIL PROTECTED]> wrote:
>
>> def _setPgsqlDictCursor(self):
>> import psycopg
>> conn = psycopg.connect("host=%s dbname=%s user=%s password=%s" % \
>> self.getConfig('host'), self.getConfig('user'), \
>> self.getConfig('db'), self.getConfig('pass'))
>> conn.autocommit(1)
>> self._cursor = conn.cursor()
Thanks.
>>
>>
>>Paul - if you could tell me where to put some "print"s or something to
>>make it print to the screen when it gets thru certain sections of the
>>dbmail.py or autoreplier.py? then I could maybe see why a reply isn't
>>coming out of it.
The code is self-testing. Running python lib/dbmail.py should finish with no
errors. There's a set of unit-tests in there, use them!
>>Well first let me look at permissions on the py files i guess. When
>>you cat pipe a message to the autoreplier.py, the cursor just returns
>>as if everything went normally. I haven't found relevant logs yet.
Mmmm, it should probably trigger an exception here. Too quiet is too quiet.
Run the tests.
python lib/dbmail.py -v
testGetConfig (__main__.testDbmail) ... ok
testSetCursor (__main__.testDbmail) ... ok
testDelete (__main__.testDbmailAlias) ... ok
testGet (__main__.testDbmailAlias) ... ok
testSet (__main__.testDbmailAlias) ... ok
testGetReply (__main__.testDbmailAutoreply) ... ok
testGetConfig (__main__.testDbmailConfig) ... ok
testParse (__main__.testDbmailConfig) ... ok
testGet (__main__.testDbmailUser) ... ok
testGetGidNumber (__main__.testDbmailUser) ... ok
testGetUidNumber (__main__.testDbmailUser) ... ok
----------------------------------------------------------------------
Ran 11 tests in 0.079s
OK
--
________________________________________________________________
Paul Stevens mailto:[EMAIL PROTECTED]
NET FACILITIES GROUP PGP: finger [EMAIL PROTECTED]
The Netherlands________________________________http://www.nfg.nl