Bug 188586 - Enable Exim mysql lookup
Summary: Enable Exim mysql lookup
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Other (show other bugs)
Version: Final
Hardware: All Other
: P5 - None : Enhancement (vote)
Target Milestone: ---
Assignee: Peter Poeml
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-27 13:33 UTC by Christian Schweingruber
Modified: 2006-08-07 11:58 UTC (History)
2 users (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Schweingruber 2006-06-27 13:33:30 UTC
It only needs a few lines in the exim.spec to let mysql lookup work:
diff exim.spec exim.spec.orig
15c15
< BuildRequires:  db-devel openldap2-devel pcre-devel tcpd-devel xorg-x11-devel mysql-devel
---
> BuildRequires:  db-devel openldap2-devel pcre-devel tcpd-devel xorg-x11-devel
107c107
<       LOOKUP_MYSQL=yes
---
>       # LOOKUP_MYSQL=yes
119d118
<       LOOKUP_INCLUDE=-I /usr/include/mysql
121c120
<       LOOKUP_LIBS=-lldap -llber -lmysqlclient
---
>       LOOKUP_LIBS=-lldap -llber
Comment 1 Andreas Jaeger 2006-08-02 08:16:45 UTC
Please do not reassign bugs around!
Comment 2 Peter Poeml 2006-08-02 14:48:36 UTC
It takes only a few lines, yes. But it unconditionally makes exim
bigger, and adds an RPM dependency. I'm not sure that many people would
want that.

Debian has a patch which adds dynamical loading, but I'm not keen on
maintaining an external patch either.

We could build it twice.
As exim is in the Build Service now, 
http://software.opensuse.org/download/server:/mail/
it wouldn't be an issue of CD space anymore.

Opinions?
Comment 3 Christian Schweingruber 2006-08-02 15:09:57 UTC
I use mysql lookup for exim (together with mysql-authentication for courier-imap see bug 188587 (added in 10.2)) in a productive environment on a suse 9.3 box. 
Using a mysql-db is a really good thing for virtualuser mailsystems! 

Mysql support can be used for a lot of useful things:
- spam-blacklists
- domain administration (smtp-forward, catchall, etc.)
- autoresponders
...

I build the original an the mysql-enabled exim for 10.1 to compare the size:
exim-4.51-21.i586.rpm:
original:   1079787 
with mysql: 1081707 (+1.9kB 0.18%)

/usr/sbin/exim
original:   778180
with mysql: 782432  (+4.2kB 0.5%)

So: size is not a big issue.




Comment 4 Peter Poeml 2006-08-03 23:02:46 UTC
       USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
w/o:   mail     32552  0.0  0.4   6720  1136 ?        Ss   23:53   0:00 /usr/sbin/exim -bd -q5m
with:  mail     32617  0.0  0.4   8044  1224 ?        Ss   23:54   0:00 /usr/sbin/exim -bd -q5m


Since the mysql library is loaded dynamically, it doesn't really add to
the binary or rpm size. But it makes the process bigger at runtime.


The mysql library also pulls in other libraries that it is linked
against... and those are at least:

exim      32617       mail  mem       REG      253,3  1283312     442510 /usr/lib/libmysqlclient.so.15.0.0
exim      32617       mail  mem       REG        3,2   180631      44405 /lib/libm-2.4.so
exim      32617       mail  mem       REG        3,2    47259      44393 /lib/libcrypt-2.4.so
exim      32617       mail  mem       REG        3,2    87850      44411 /lib/libnsl-2.4.so
exim      32617       mail  mem       REG        3,2    70512      44465 /lib/libz.so.1.2.3

So that's a 20-30 % increase in runtime process size.
Something which many people could live with, but lean package
dependencies are also important. You don't want to install mysql,
postgresql, X11, Java, Mono, whatnot on every machine... 

And since mysql support cannot be split off into a module (and
subpackage), I still advocate the separate specfile solution.
Comment 5 Peter Poeml 2006-08-04 14:36:16 UTC
It is now built in the buildservice as a variant.
See http://software.opensuse.org/download/server:/mail/SuSE_Linux_Factory/

I meanwhile think that it is better to build both binaries in the same
spec, put them in subpackages, and use update-alternatives, because this
avoids other issues (including a forest of %ifs in the specfile).
But for the moment, I'm fine with the way I'm doing it now, because I
wanted to play with linked packages in the buildservice anyway.
BTW, autobuild will have only the standard exim package for now, so the
mysql-enables binary will be in the BS. Is that okay for you?
Comment 6 Christian Schweingruber 2006-08-04 15:22:10 UTC
Yes! Thanks very much. 
How and where are special packages in the BS announced?
I mean how people find out in general, if there are variants of installable packages?
Comment 7 Christian Schweingruber 2006-08-04 15:33:08 UTC
I just looked into the SPEC of the BS package and the changelog.
You did a lot of work on the new version! I will try it, specially looking forward to the eximstat reports.
Comment 8 Peter Poeml 2006-08-07 11:55:14 UTC
> How and where are special packages in the BS announced?

The BS is still work in progress, there is no announcement or search
mechanism yet, but it will come in the future :)
Comment 9 Peter Poeml 2006-08-07 11:58:43 UTC
I'm closing this bug now, since exim-mysql is in the build service, and
the exim package containing the needed changes for that is submitted to
Factory.