[webmin-l] Postfix Virtual Domains MySQL Module Setup
"Paul R. Ganci" <[email protected]>
| Newsgroups | gmane.comp.web.webmin.general |
|---|---|
| Message-ID | <[email protected]> |
According to the Postfix documentation on MySQL table configuration (http://www.postfix.org/mysql_table.5.html) there is an obsolete query interface and a preferred query interface. For the obsolete query interface two fields have to be specified... namely the select_field and the where_field. The postfix MySQL configuration file /etc/postfix/mysql_virtual_maps.cf would look like this (names have been changed): user = postuser password = Xjk_1xxx dbname = postfix select_field = destination where_field = email table = postfix_virtual The select_field and where_field correspond to the Webmin Postfix Virtual Domains module setup Map Specifications mysql:/etc/postfix/mysql_virtual_maps.cf MySQL database Key field email and Value field destination. If I select the "SQL for where clause" checkbox for the MySQL database everything works as expected. However I would like to use the preferred query postfix mechanism. In that case the Postfix MySQL configuration file contains user = postuser password = Xjk_1xxx dbname = postfix select_field = destination where_field = email query = SELECT destination FROM postfix_virtual WHERE email = '%s' table = postfix_virtual So I tried to set up the Map Specifications by setting the Key field blank, Value field blank, selecting the "None" check box and then adding the query: SELECT destination FROM postfix_virtual WHERE email = %s into the box next to the the None check box. This does not work as I get config errors regarding the missing Key and Value fields. If I set the key and value fields per the obsolete query I then get errors about an error in my MySQL syntax: SQL query failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT destination FROM postfix_virtual WHERE email = '%s'' at line 1 If I remove the select_field and where_field from the postfix config file user = postuser password = Xjk_1xxx dbname = postfix table = postfix_virtual query = SELECT destination FROM postfix_virtual WHERE email = '%s' Then I get this error: This map cannot get edited. The MySQL configuration parameter select_field was not found. Webmin needs this to figure which table and fields to query. Is there any plan to make Webmin work with the preferred Query? It seems webmin has everything it needs with the query definition in the MySQL configuration file. Presently I am finding that I have to use the second form of the /etc/postfix/mysql_virtual_maps.cf file to get both Postfix and Webmin happy. I would like to migrate to the last /etc/postfix/mysql_virtual_maps.cf form to avoid the obsolete parameters but cannot do that if Webmin does not recognize the MySQL configuration. -- Paul ([email protected]) Cell: (303)257-5208 ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohomanageengine - Forwarded by the Webmin mailing list at [email protected] To remove yourself from this list, go to http://lists.sourceforge.net/lists/listinfo/webadmin-list