Bug 185515

Summary: Postfix MySQL map support
Product: [Fedora] Fedora Reporter: Elio Tondo <elio>
Component: postfixAssignee: Thomas Woerner <twoerner>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7CC: adv, bugzilla, jbaker, ksorensen, ma, matt, misek, nerijus, spacewar, thoger, tim
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.4.3-2.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-29 15:44:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Elio Tondo 2006-03-15 14:05:25 UTC
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:
1.
2.
3.
  
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 23:03:12 UTC
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 Sara Cavallari 2006-05-29 16:37:08 UTC
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 23:00:14 UTC
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 11:23:26 UTC
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 12:34:42 UTC
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 12:56:17 UTC
I see that the situation is unchanged also in F7.

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

Elio


Comment 7 Eric Smith 2007-06-02 22:26:55 UTC
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 20:49:38 UTC
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 21:11:04 UTC
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 21:17:54 UTC
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.

Elio


Comment 11 Eric Smith 2007-06-04 21:26:04 UTC
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 11:17:02 UTC
Please have a look at postfix-2.4.3-1.fc7 in F7 testing.

Comment 13 Thorsten Leemhuis 2007-06-07 05:25:16 UTC
(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 06:43:57 UTC
How does Debian split the packages into postfix and postfix-mysql?

Comment 15 Tomas Hoger 2007-06-07 07:21:34 UTC
(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 16:41:54 UTC
This patches are totally unsupported by upstream.

Comment 17 Fedora Update System 2007-06-14 15:47:07 UTC
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 16:18:24 UTC
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 16:58:06 UTC
The debian patches are not working with all supported architectures of postfix.
And they are big.

Comment 20 Elio Tondo 2007-06-15 09:11:12 UTC
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 09:13:20 UTC
sorry, 2.4.3-2...

Comment 22 Elio Tondo 2007-06-15 09:15:36 UTC
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 13:00:18 UTC
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 17:42:22 UTC
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 21:34:53 UTC
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 09:07:59 UTC
*** Bug 244555 has been marked as a duplicate of this bug. ***

Comment 27 Eric Smith 2007-06-18 09:28:36 UTC
Reopening bug, as the MySQL map support was removed again, so it is not resolved.

Comment 28 Martin Jürgens 2007-06-21 11:33:03 UTC
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 11:42:10 UTC
(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
packages.debian.org:

http://packages.debian.org/cgi-bin/search_contents.pl?searchmode=filelist&word=postfix-mysql&version=stable&arch=i386

Comment 30 Martin Jürgens 2007-06-21 11:53:06 UTC
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 12:13:28 UTC
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 13:26:09 UTC
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 12:52:18 UTC
*** Bug 263921 has been marked as a duplicate of this bug. ***

Comment 34 Jon Baker 2007-10-06 14:12:42 UTC
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 12:21:25 UTC
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 21:07:59 UTC
fantastic news I'll check this straight away.

Comment 37 Jon Baker 2007-11-07 21:55:41 UTC
Yay, thank you so much!  I look forward to updating to FC8 with more fervor than
ever!

Comment 38 Tomas Hoger 2007-11-12 19:49:45 UTC
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 15:44:00 UTC
Fixe din rawhide in package postfix-2.4.6-1.fc9.