Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Arg, spend the whole day fixing Exim4, and now I get this strange error:

2011-04-23 20:31:12 failed to expand "${lookup mysql{SELECT DISTINCT transport FROM mail_transports WHERE transport = '${quote_mysql:$domain}'}}" while checking a list: lookup of "SELECT DISTINCT transport FROM mail_transports WHERE transport = '***.net'" gave DEFER: incomplete MySQL server data:
2011-04-23 20:31:12 H=(195031.***.nl) [] F=<kevin@***.nl> temporarily rejected RCPT <kevin@***.net>: incomplete MySQL server data:

In 01_exim4-config_listmacrosdefs I use this:

hide mysql_servers =<db>/<user>/<pass>

What am I doing wrong?

share|improve this question
up vote 0 down vote accepted

The colon is normally used as a list separator in the exim4 config. You will need to escape it in the host/port specification:


share|improve this answer
That did the trick indeed :). – Kevin Apr 24 '11 at 12:36

Normally in situations like this, you can use "localhost" instead of the IP/Port combination. This is one possible reason. The other might be, that there are spaces between the = sign in the last line of your code.

share|improve this answer
I created 2 SQL servers and I want to use the one that uses port 3307. I tried to remove the spaces, but still got that error... – Kevin Apr 23 '11 at 18:50
Yes, i missed that. I did a quick search and found out: The MySQL option is eventually not enabled in your exim distribution. Debian/Ubuntu sihps a light and a heavy version of exim4, but I actually don't know all the activated features. I use DBmail to work with mails and MySQL. But this approach is also interesting for smaller mailserver. – ansi_lumen Apr 23 '11 at 19:02
BTW: There is normally an option to connect to local mysql servers without the tcp/ip stack in between. It's faster and uses less resources. Normally you can point to the socket file in /var/mysql/ or wherever your MySQL resides. – ansi_lumen Apr 23 '11 at 19:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.