[exim] Mysql support - no errors but checking compiled in

Góra strony
Delete this message
Reply to this message
Autor: Ron White
Data:  
Dla: exim-users
Temat: [exim] Mysql support - no errors but checking compiled in
Good morning list users,

I've had a spell of brain freeze away from Exim and need to reacquaint
myself with a few things. This is probably very simple and the last
paragraph may be all that in needed to give a yes/no answer. For the
sake of clarity some detail is provided:

I've just put together a CentOS 6 server and installed Exim the lazy way
(yum install exim) and it works flawlessly with SELinux as to be
expected. The box will be for virtual domains and users and I'm happy
and comfortable with MySQL as a data store for this configuration. I've
previously used Exim in this way without any issues.

With this in mind I added a few lines to a very spare running config:
....
MYSQL_HOSTEDDOMAINLIST = SELECT domain FROM domainslist WHERE
domain='${quote_mysql:$domain}';

hide mysql_servers = localhost/database_name/user_name/password
domainlist hosted_domains = ${lookup mysql{MYSQL_HOSTEDDOMAINLIST}}

<relevant ACL clause>
check_rcpt:
accept  domains = local_domains : *.local_domains
deny    message = relay not permitted
.....


Unfortunately, attempting to put mail in to Exim locally via telnet,
using a domain that is in the database always fails with 'relay not
permitted'. Running the query by hand using the MySQL client produces a
hit - so the data is there and the query works as expected.


My initial thoughts were "I bet this lazy version of Exim has no MySQL
support compiled in!" but I would have expected an error in the panic
log, or the config checker to complain - but nothing. But if I run: exim
-bV I'm not seeing any mention of MySQL, just sqllite:

...................
Exim version 4.72 #1 built 24-May-2011 17:40:23
Copyright (c) University of Cambridge, 1995 - 2007
Berkeley DB: Berkeley DB 4.7.25: (June 4, 2010)
Support for: crypteq iconv() IPv6 PAM Perl Expand_dlfunc TCPwrappers
OpenSSL Content_Scanning DKIM Old_Demime
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm
dbmnz dnsdb dsearch ldap ldapdn ldapm nis nis0 nisplus passwd sqlite
Authenticators: cram_md5 cyrus_sasl dovecot plaintext spa
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
OpenSSL compile-time version: OpenSSL 1.0.0-fips 29 Mar 2010
OpenSSL runtime version: OpenSSL 1.0.0-fips 29 Mar 2010
Configuration file is /etc/exim/exim.conf
....................

My guess is I am going to have to build this from scratch to compile
this in - and then fight the various issues this throws up (replacing
the start scripts, SELinux issues, dependency hell et al) it throws up?
Perhaps there is a simpler way to just recompile the various Exim
binaries without them trashing the current start + config scripts and
SELinux policy for Exim? It seems quite extreme just to add support for
MySQL, but I guess there is some solid reasoning behind it.

Ron