Exim filter db lookups - full stop
http://botanicus.net/dw/exim-python.php hört sich gut an. In Verbindung mit einer mysql-addressen sollte da so einiges gehen.
Links
http://www.zugschlus.de/ weitere Links
http://www.fefe.de/muttfaq/faq.html MUTT FREQUENTLY ASKED (AND ANSWERED)]
http://wiki.grml.org/doku.php Debian Distro zum ansehen]
Now, check a local address: exim -bt local_user@your.domain
Next check a remote address: exim -bt remote_user@their.domain
Exim forks quite regularly,
Loading and initialising module resources.
Exim is a rather complex piece of software, and the execution path it takes can be quite confusing at times. For this reason, it is desirable to be as careful as possible when initialising and using resources.
The problem.
Exim forks quite regularly, and much of it's operation happens inside a subprocess. When Exim performs a fork, any objects existing in the Python interpreter at the time of fork will now be duplicated.
This can lead to dangerous and incorrect use of, for example, database connections, which will now have essentially two clients connected to only one client's connection.
The extension as yet does not provide any automatic means for handling objects that should be destroyed or reinitialised at fork time, so it is up to you to do this.
A simple solution.
Here, our dangerous resource is created and destroyed every time the function is entered. This avoids the problem in almost all cases.
def get_db():
db = MySQL.connect(**mysql_connection_details)
return db, db.cursor()
def lookup_password(username):
db, cursor = get_db()
if not cursor.execute("""SELECT ..."""):
return None # force failure.
return cursor.fetchone()[0]
Linux/Internet/Mail/Exim4/files (last modified 2008-11-04 06:59:56)