Bug 185515 - Postfix MySQL map support
Postfix MySQL map support
Product: Fedora
Classification: Fedora
Component: postfix (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
: Reopened
: 244555 263921 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2006-03-15 09:05 EST by Elio Tondo
Modified: 2007-11-30 17:11 EST (History)
11 users (show)

See Also:
Fixed In Version: 2.4.3-2.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-29 10:44:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Elio Tondo 2006-03-15 09:05:25 EST
Description of problem: Postfix cannot use MySQL maps

Version-Release number of selected component (if applicable):

How reproducible: postconf -m lacks mysql map type

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

It would be very useful to have MySQL maps support by default; I need to add it
by recompiling the SRPM and this requires periodic checking for updates or
security fixes (MySQL maps are especially useful with Cyrus IMAP configurations).
The added dependency requirements (libmysql and mysql) should not be a relevant
problem (dovecot already has tle libmysql dependency).
Comment 1 Eric Smith 2006-05-23 19:03:12 EDT
I agree that MySQL support should be compiled into the standard RPMs.  This is
quite useful for sites supporting virtual domains or many aliases.

The required mysql packages (not including the mysql server itself, which is not
requires) are small enough that this should not be a problem for customers not
using the feature.
Comment 2 Stefano Cavallari 2006-05-29 12:37:08 EDT
I agree too. Postfix is almost useless in many environments without this.

PS: please change the version to fc5, as the bug is still here
Comment 3 Eric Smith 2006-08-02 19:00:14 EDT
Thomas, I've looked at your comments on earlier Postfix/MySQL requests.  I
strongly disagree with the notion that it would be a problem for users to have
to "install" MySQL to use Postfix.  It only requires the base mysql package, not
the actual mysql server.  The base mysql package is quite small (about 5MB, vs.
23MB for the server), and does not require any configuration, so Anaconda or RPM
would install it automatically and the user wouldn't have to do anything.

Please give this more serious consideration.  I'm fairly sure that your
enterprise customers would want MySQL support if they're using Postfix, and
there's almost no downside to enabling it in Fedora.
Comment 4 Nerijus Baliūnas 2006-08-31 07:23:26 EDT
Yes, please add mysql support. As Eric said, it does not require mysql server 
to be installed, only mysql, which usually is installed because lots of other 
packages depend on it. Besides, dovecot already includes mysql support and 
postfix includes ldap support.

I think more people will be happy than unhappy if you do it.

For now I have to recompile postfix on RHEL when update is released.
Comment 5 Tomas Hoger 2007-01-13 07:34:42 EST
What about trying modular approach instead of extending dependency chain? 
Debian Postfix packages have separate subpackage for each map type with extra
dependencies, so there's base postfix package and -pcre, -ldap, -mysql and
-pgsql subpackages.  However, I'm not sure if it's possible to achieve this
without extra patch.

Is there any good reason for not trying this approach in Fedora and RHEL?

I guess this comment also affects #180579 with similar request for PostgreSQL.
Comment 6 Elio Tondo 2007-06-02 08:56:17 EDT
I see that the situation is unchanged also in F7.

Are there any plans to include MySQL maps support in Postfix?

Comment 7 Eric Smith 2007-06-02 18:26:55 EDT
It seems that submitting bugs or feature requests into Bugzilla does not push
this forward, nor does discussion on the Fedora list, regardless of how much
justification we provide.  Is there some more appropriate forum where those of
us that need this issue can make our case and actually get some discussion of
it, rather than a knee-jerk response of "we can't do that, because it adds a
dependency on mysql"?
Comment 8 Tim Behrsin 2007-06-04 16:49:38 EDT
I'd like a separate package for postfix-mysql, I don't like the idea of bloating
postfix rpm itself. Has anyone got the time to work on a patch for the source rpm?

I'd be willing to do this myself, but don't have the time right now.
Comment 9 Eric Smith 2007-06-04 17:11:04 EDT
MySQL support won't "bloat" the postfix package.  It adds a trivial contribution
to the package size.

The dependency it introduces does use 6MB of disk space.  However, many other
packages are already dependent on mysql, so in most cases that will not be an
increase.  Anyhow, it does not require that mysql actually be configured or that
a database is actually running, unless the user configures postfix to actually
use mysql maps.  So the impact on a user that doesn't need mysql support is only
the 6MB of disk space.  This seems like a small price to pay in order to greatly
simplify things for users running a postfix mail server.

The problem with creating a separate postfix-mysql package is that there is no
simple way to do it that doesn't result in postfix being dependent on
postfix-mysql, which would still have the dependency on mysql.
Comment 10 Elio Tondo 2007-06-04 17:17:54 EDT
Actually the addition of MySQL support is already in the Postfix SRPM, it's only
a flag in the specs file. At least it was this way on FC4, and I don't think
that anybody changed it. This is the reason why I am wondering why that flag is
not switched on by default. As an example, dovecot already has a dependence on
the MySQL library in its standard RPM.

Comment 11 Eric Smith 2007-06-04 17:26:04 EDT
Yes, and turning on that flag is all that we've been asking for.

I'm really getting tired of having to rebuild Postfix after every time there's a
new release of the package.  And all because somebody, somewhere, apparently
thinks it is a bad idea, but hasn't put forth any concrete reasons.
Comment 12 Thomas Woerner 2007-06-05 07:17:02 EDT
Please have a look at postfix-2.4.3-1.fc7 in F7 testing.
Comment 13 Thorsten Leemhuis 2007-06-07 01:25:16 EDT
(In reply to comment #3)
> I
> strongly disagree with the notion that it would be a problem for users to have
> to "install" MySQL to use Postfix.  [...]

Well, I saw it when I ran "yum update" and immediately hit "CTRL + C" and
thought "what was that for a shit again; I don't want to get all that mysql
stuff install" (I didn't know that it were just thy mysql libs and client stuff
back then before reading this bug).

I assume many other will do the same and this has potential for a heated
discussion on the mailing lists. I'd say it would be best to have that
discussion before this update hits updates-proper.
Comment 14 Tim Behrsin 2007-06-07 02:43:57 EDT
How does Debian split the packages into postfix and postfix-mysql?
Comment 15 Tomas Hoger 2007-06-07 03:21:34 EDT
(In reply to comment #14)
> How does Debian split the packages into postfix and postfix-mysql?

Debian version uses extra patch to achieve that.  Support for various maps is
not compiled-in directly, but there's extra shared library built for each map
backend.  Those libs are loaded in runtime and can easily be packaged into
multiple packages.
Comment 16 Thomas Woerner 2007-06-08 12:41:54 EDT
This patches are totally unsupported by upstream.
Comment 17 Fedora Update System 2007-06-14 11:47:07 EDT
postfix-2.4.3-2.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 18 Tomas Hoger 2007-06-14 12:18:24 EDT
According to changelog, 2.4.3-2 re-disabled mysql support, which was enabled in
2.4.3-1, so this bug was probably closed by mistake (or changelog references
incorrect bug or changelog entry is incorrect ;).

Thomas, can you provide more info in addition to your comment #16?  Yes, you're
right, Wietse most likely does not support dynamic maps patch.  Do you know if
there are any plans to merge it upstream in some future version or whether
strict "no" was said and why?  It seems that many major binary distros use it.
Comment 19 Thomas Woerner 2007-06-14 12:58:06 EDT
The debian patches are not working with all supported architectures of postfix.
And they are big.
Comment 20 Elio Tondo 2007-06-15 05:11:12 EDT
Coming back to the first issue in comment #16, can you tell us why MySQL maps
support has been enabled in 2.4.3-1 and disabled again in 2.4.3-1?
Comment 21 Elio Tondo 2007-06-15 05:13:20 EDT
sorry, 2.4.3-2...
Comment 22 Elio Tondo 2007-06-15 05:15:36 EDT
well, it looks like I am unable to write two lines without at least a mistake
this morning... I rewrite the whole message again, sorry for the inconvenience:

Coming back to the first issue in comment #18, can you tell us why MySQL maps
support has been enabled in 2.4.3-1 and disabled again in 2.4.3-2?
Comment 23 Thomas Woerner 2007-06-15 09:00:18 EDT
Enabling MySQL support meanst to compile against MySQL, which adds a dependency
chain to the package. There is no upstream supported way to build it as a module.

BTW: There are requests to build also with PostgreSQL support...
Comment 24 Eric Smith 2007-06-15 13:42:22 EDT
Yes, it adds a dependency chain.  So?  Other packages depend on MySQL, yet the
MySQL support in those packages does not get disabled in order to remove a
dependency chain.
Comment 25 Nerijus Baliūnas 2007-06-16 17:34:53 EDT
1. Dovecot (POP3/IMAP server) already depends on mysql.
2. Postfix would depend on mysql-libs package only, not on mysql-server.
3. I am sure more people would be happier than unhappier if postfix starts
supporting mysql.
Comment 26 Thomas Woerner 2007-06-18 05:07:59 EDT
*** Bug 244555 has been marked as a duplicate of this bug. ***
Comment 27 Eric Smith 2007-06-18 05:28:36 EDT
Reopening bug, as the MySQL map support was removed again, so it is not resolved.
Comment 28 Martin Jürgens 2007-06-21 07:33:03 EDT
Debian provides two packages, postfix and postfix-mysql. Former is compiled
without mysql support, latter is compiled with mysql support. 

Maybe this would be a better way to add mysql support.
Comment 29 Tomas Hoger 2007-06-21 07:42:10 EDT
(In reply to comment #28)
> Debian provides two packages, postfix and postfix-mysql. Former is compiled
> without mysql support, latter is compiled with mysql support. 

No Martin, it's not done that way.  As discussed in previous comments for this
bug, postfix is main package and postfix-mysql only provide few files, which add
mysql support.  Dynamic maps patch makes that possible.

You can find listing of files included in Debian's postfix-mysql package on

Comment 30 Martin Jürgens 2007-06-21 07:53:06 EDT
Uh oh. I am sorry, I didn't read all the comments carefully.

Anyway, it would be nice to have MYSQL supporting Postfix packages in Fedora ;)
Comment 31 Nerijus Baliūnas 2007-06-21 08:13:28 EDT
But it's quite a good idea, to have 2 (or even 3 - with pgsql support) packages
- postfix and postfix-mysql. postfix would be the current package, and
postfix-mysql could be the full postfix package with mysql support. If a user
installs postfix-mysql, postfix should be uninstalled and vice versus.
Comment 32 Levente Farkas 2007-07-18 09:26:09 EDT
imho on a server which runs postfix the mysql client side 2.5MB doesn't matter.
and anyway who, where which spec denied to add further dependencies?
Comment 33 Thomas Woerner 2007-10-04 08:52:18 EDT
*** Bug 263921 has been marked as a duplicate of this bug. ***
Comment 34 Jon Baker 2007-10-06 10:12:42 EDT
I, too, have to disable postfix in yum.conf and then recompile it, hunting down
the source RPM every time I do a kernel update, to get my mailserver working. 
This is a pain on a production system.  I'm still waiting to hear a reason why
MySQL is not supported by default!
Comment 35 Thomas Woerner 2007-11-07 07:21:25 EST
Please have a look at the postfix-2.4.5-3 package in devel. MySQL is now enabled
by default.
Comment 36 Matt Darcy 2007-11-07 16:07:59 EST
fantastic news I'll check this straight away.
Comment 37 Jon Baker 2007-11-07 16:55:41 EST
Yay, thank you so much!  I look forward to updating to FC8 with more fervor than
Comment 38 Tomas Hoger 2007-11-12 14:49:45 EST
Just another 2c tossed in, maybe less relevant now...

Thomas, do you think it might make sense to change first few lines of spec file
to something like:

%{?!MYSQL: %define MYSQL 1}
%{?!PGSQL: %define PGSQL 0}

Not much value added, but may save some time to anyone who still needs to
rebuild postfix.  No SRPM needs to be extracted, spec modified and RPM build. 
Change above should make it possible to specify options without having to modify
spec by calling rpmbuild with right parameters:

rpmbuild --rebuild postfix-v-r.src.rpm --define 'MYSQL 1'
Comment 39 Thomas Woerner 2007-11-29 10:44:00 EST
Fixe din rawhide in package postfix-2.4.6-1.fc9.

Note You need to log in before you can comment on or make changes to this bug.