Bugzilla – Bug 1095144
Postfix does not support mysql maps
Last modified: 2020-07-07 08:13:38 UTC
Postfix 3.3 in Leap-15 does no longer support mysql virtual maps. Installed is: i | postfix | A fast, secure, and flexible mailer i+ | postfix-mysql | Postfix plugin to support MySQL maps When I use this line in main.cf: virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf and restart postfix, or check postfix with postconf -n this ends up in this warn messages: postconf: warning: mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf: unused parameter: password=xxxxxxx postconf: warning: mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf: unused parameter: dbname=postfix postconf: warning: mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf: unused parameter: query=SELECT maildir FROM mailbox WHERE username='%u' AND active=1 postconf: warning: mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf: unused parameter: user=postfix postconf: warning: mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf: unused parameter: hosts=localhost In Leap 43.2 this was possible without any issue. Another MySQL/MariaDB Client problem in Leap 15? Postfix manpage and sample configurations still suggest this as a possibility.
Could someone look at this problem and give feedback. It seems that Mr. varkoly is not interested in doing anything here - at least I can't find a ticket he would have contacted already. You can also say that SuSe does not want any more bug reports from the current distribution - then we stop and switch to a provider that takes the customers first. This bug is a blocker that prevents migration! Translated with www.DeepL.com/Translator
postconf -m shows mysql as a supported map: test150:/etc/postfix # postconf -m [snip] memcache mysql nis pcre pgsql [snip] I see the same problem though.
It is very odd. this fails (with the warnings about unused paramneter): virtual_mailbox_maps = proxy:mysql:/etc/postfix/klop.cf this works (produce no warnings): virtual_mailbox_maps = proxy:mysql:klop.cf
I can confirm that the error message disappears if you enter the map without path. virtual_mailbox_maps = mysql:mysql_virtual_mailbox_maps.cf However, no error message is displayed if you specify a non-existing map file - so it is possible that the maps are simply not found in this variant. virtual_mailbox_maps = mysql:blablubbhaha_mysql_virtual_mailbox_maps.cf does also not print out an error message, and this file is not present in any path.
(In reply to Martin Willisegger from comment #4) > I can confirm that the error message disappears if you enter the map without > path. > > virtual_mailbox_maps = mysql:mysql_virtual_mailbox_maps.cf > > However, no error message is displayed if you specify a non-existing map > file - so it is possible that the maps are simply not found in this variant. Yes, I think that is probably the explanation. > virtual_mailbox_maps = mysql:blablubbhaha_mysql_virtual_mailbox_maps.cf > > does also not print out an error message, and this file is not present in > any path. Also very weird.
(In reply to Martin Willisegger from comment #0) > Postfix 3.3 in Leap-15 does no longer support mysql virtual maps. > > Installed is: > i | postfix | A fast, secure, and flexible mailer > i+ | postfix-mysql | Postfix plugin to support MySQL maps > > When I use this line in main.cf: > virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf > > and restart postfix, or check postfix with postconf -n this ends up in this > warn messages: > > postconf: warning: mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf: unused > parameter: password=xxxxxxx > postconf: warning: mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf: unused > parameter: dbname=postfix > postconf: warning: mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf: unused > parameter: query=SELECT maildir FROM mailbox WHERE username='%u' AND active=1 > postconf: warning: mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf: unused > parameter: user=postfix > postconf: warning: mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf: unused > parameter: hosts=localhost > > In Leap 43.2 this was possible without any issue. Another MySQL/MariaDB > Client problem in Leap 15? Postfix manpage and sample configurations still > suggest this as a possibility. Sorry for being too late. Now I've found that in 3.3.0 a new function pcf_check_dbms_client was introduced to "report unknown database client configuration parameters". This function will be called only if the database configuration files are given with absolute path. Unfortunately this function seems to be buggy. But this warnings should not have any influence on the functionality.
(In reply to Per Jessen from comment #5) > (In reply to Martin Willisegger from comment #4) > > I can confirm that the error message disappears if you enter the map without > > path. > > > > virtual_mailbox_maps = mysql:mysql_virtual_mailbox_maps.cf > > > > However, no error message is displayed if you specify a non-existing map > > file - so it is possible that the maps are simply not found in this variant. > > Yes, I think that is probably the explanation. > > > virtual_mailbox_maps = mysql:blablubbhaha_mysql_virtual_mailbox_maps.cf > > > > does also not print out an error message, and this file is not present in > > any path. > > Also very weird. Do not forget: In case mysql:blablubbhaha_mysql_virtual_mailbox_maps.cf postconf -d do not read the file /etc/postfix/blablblablubbhaha_mysql_virtual_mailbox_maps.cf. Instead of postconf requires now the virtual_mailbox_maps mysql parameters in main.cf in form of: blablubbhaha_mysql_virtual_mailbox_maps.cf_hosts blablubbhaha_mysql_virtual_mailbox_maps.cf_query ... See man mysql_table: OBSOLETE MAIN.CF PARAMETERS For compatibility with other Postfix lookup tables, MySQL parameters can also be defined in main.cf. In order to do that, specify as MySQL source a name that doesn't begin with a slash or a dot. The MySQL parameters will then be accessible as the name you've given the source in its definition, an underscore, and the name of the parameter. For example, if the map is specified as "mysql:mysqlname", the parameter "hosts" would be defined in main.cf as "mysqlname_hosts".
(In reply to Peter Varkoly from comment #7) > Sorry for being too late. Now I've found that in 3.3.0 a new function > pcf_check_dbms_client was introduced to "report unknown database client > configuration parameters". This function will be called only if the database > configuration files are given with absolute path. Unfortunately this > function seems to be buggy. But this warnings should not have any influence > on the functionality. Aha - I didn't test any actual functionality.
Since these messages are probably only a display error I will try to see if the content of the maps are actually read and used. I don't use the deprecated main.cf parameters - it was just an attempt to verify if a non-existent file causes an error message or not.
I have this same issue. Running on Tumbleweed. I do believe everything is working properly. But it is dirty-ing up the postfix log file, which I like to see fixed.
Ignore my comment. It is fixed now.
This problem still exists in Leap 15.1. Also note that the database password gets logged to syslog/journal, which probably qualifies as security issue - therefore adding the security team to CC.
Am am using Leap 15.1, the problem still exists. According to: https://bugzilla.redhat.com/show_bug.cgi?id=1619111 and http://postfix.1071664.n5.nabble.com/LDAP-quot-unused-parameter-start-tls-yes-quot-td91375.html the reason might be the way postfix was build. There seems to be a new build dependency (m4 needed).
It seems Peter is busy, therefore I took the liberty to fix this myself - see SR 718911. A quick test on my 15.1 server shows that the warnings are gone (the MySQL password no longer gets logged :-) and postfix still works. Peter, if you don't like my SR, feel free to submit your own ;-)
This is an autogenerated message for OBS integration: This bug (1095144) was mentioned in https://build.opensuse.org/request/show/718911 15.0+15.1 / postfix
fixed