Hi guys,

i was trying to create a config which requires dynamic hosts to use 
their IPS's smtp server.  I found this:

http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20040913/msg00172.html

which gave the original idea.  So i started playing and modified it to this:

  deny hosts          = \N^.*demo1.*$\N
      log_message     = $sender_host_address is required to use ISP SMTP
      message         = $sender_host_address rejected: You are required 
\ to use your ISP's SMTP server!


Testing confirmed it's ok.  So i continued to transform the config to this:

hostlist domain_reject = ${lookup mysql {SELECT concat(domain, ' : ') 
from domain_reject order by domain}}

(this was a single line in the config, no linebreaks)

deny hosts          = +domain_reject
      log_message     = $sender_host_address is required to use ISP SMTP
      message         = $sender_host_address rejected: You are required 
\ to use your ISP's SMTP server!

And the sql table:
mysql> select * from domain_reject;
+------------------------+
| domain                 |
+------------------------+
| \N^.*demo1.*$\N        |
| \N^.*\.demo2\..*$\N    |
+------------------------+

But the second config does not work.  I was trying to add more \'s to 
see if it's a simple problem, and i was also restarting exim after every 
modification, but still no luck.

I was trying to look at exim debug (exim -d -bd -q10m), to see what it 
asks from mysql, and what reply it gets, but i did not find any trace of 
this query (output was over 7 screens long, so i may have missed it).

I have virtual users in mysql, so mysql access rights for exim is not a 
problem.

Can someone point out what i'm doing wrong here?

thanks
Adam

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to