dict_pgsql
This is the homepage of dict_pgsql, a postfix- dictionary-plugin. On this homepage you may find information about the current version or get some hints.
What is dict_pgsql?dict_pgsql is a dictionary for the mailer postfix. This dictionary is able to get all virtual users out of a postgres database. This is very helpful if you have a large amount of users who make updates on their aliases quite often. You don't have to extract all values into system-files. The entries will be fetched directly from the database.
What do I need to run dict_pgsql?
It is based on postgresql-6.5.3 (probably it may work with postgresql less/higher than 6.5.3, but has not been tested) and postfix-19991231-pl08.
To compile dict_pgsql you will need these libraries and include-files additionally to dict_pgsql.
The latest version is 0.2
Where are the sources?There is a patch available from http://home.primusnetz.de/mgeisler/dict_pgsql/patch-dict_pgsql-postfix-19991231-pl08.
Warning:
This code has not been tested. You may crash your system!. I will not take any responsibilty.
Stop bothering me! I want to see screenshots!Yes. Of course. Screenshots of a Mail-Daemon.
Here you go:
tail -f /var/log/mail Sep 21 22:44:51 imap postfix-script: starting the Postfix mail system Sep 21 22:44:51 imap postfix/master[12870]: daemon started Sep 21 22:44:51 imap postfix/qmgr[12872]: [pgsql] : reading config file /etc/postfix/pgsql.cfg Sep 21 22:44:51 imap postfix/qmgr[12872]: [pgsql] : got pgsql_user-entry Sep 21 22:44:51 imap postfix/qmgr[12872]: [pgsql] : got pgsql_password-entry Sep 21 22:44:51 imap postfix/qmgr[12872]: [pgsql] : got pgsql_host-entry Sep 21 22:44:51 imap postfix/qmgr[12872]: [pgsql] : got pgsql_port-entry Sep 21 22:44:51 imap postfix/qmgr[12872]: [pgsql] : got pgsql_database-entry Sep 21 22:44:51 imap postfix/qmgr[12872]: [pgsql] : got pgsql_table-entry Sep 21 22:44:51 imap postfix/qmgr[12872]: [pgsql] : got pgsql_select-entry Sep 21 22:44:51 imap postfix/qmgr[12872]: [pgsql] : got pgsql_wherefield-entry Sep 21 22:44:51 imap postfix/qmgr[12872]: [pgsql] : got postgres connection! Sep 21 22:45:12 imap postfix/smtpd[12875]: A3643381FB: client=unknown[192.168.0.2] Sep 21 22:45:17 imap postfix/smtpd[12875]: [pgsql] : got virtuser entry for geisler@somwhere.lan : mail will be sent to geisler@primusnetz.de Sep 21 22:45:17 imap postfix/smtpd[12875]: [pgsql] : got virtuser entry for geisler@somwhere.lan : mail will be sent to geisler@lan2.lan Sep 21 22:45:17 imap postfix/smtpd[12875]: [pgsql] : got virtuser entry for geisler@somwhere.lan : mail will be sent to geisler@lan3.lan
Hints:
First untar your postfix-dist: tar xzvf postfix-19991231-pl08.tar.gz
Then apply the patch with: patch -p0 < patch-dict_pgsql-postfix-19991231-pl08
And then follow the instructions in postfix-19991231-pl08/PGSQL_README