Yes, DB_CONNECTION is defined in ~/.tmda/config . Here's a copy of that
file:


import MySQLdb
MySQLdb.connect(db='database1',
                    host='10.0.0.3',
                    user='username',
                    passwd='password')

SQL_WHITELIST = """SELECT email FROM temp WHERE email = %(criteria)s LIMIT
1"""

LOGFILE_DEBUG = "/var/spool/tmda/logs/debug"


Its connect to a MySQL database on another host with the correct username
and password and pulling from a temporary table named 'temp' in a database
called 'database1'.

The associated and only filter file is an incoming filter file which looks
like:

### ~/.tmda/filters/incoming (first match wins) ###
# Accept all bounces (messages with an empty envelope sender)
from <> ok
# Accept all messages to postmistress
to [EMAIL PROTECTED] accept
# SQL contacts accepted
from-sql -addr_column=email "${SQL_WHITELIST}" ok
# Accepted lists
from-file ~/.tmda/lists/whitelist_domains accept


The whitelist_domains file is currently blank.  I have also tried putting
the SELECT in the incoming filter file but got the same error.  Thanks for
your help.

Derek



_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to