Re: [Exim] help with mysql host_accept_relay becoming open R…

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: creslin
CC: Exim-users
Subject: Re: [Exim] help with mysql host_accept_relay becoming open RELAY!
On Sun, 4 Mar 2001, creslin wrote:

> When i configure exim to collect its range of addresses allowed to
> relay from mysql the server becomes open relay.


This really is becoming FAQ. Sigh.

You cannot configure Exim to collect its range of addresses allowed to
relay from anywhere. What you can do is to configure it to look up *one*
domain and see if it is in a list in your server. This seems to be a
concept that people find difficult to grasp. (I see that I've already
written "poorly explained" next to the relevant point in the manual.
I'll try to do better in the next edition.) Think of a file

domain1
domain2
...

The setting relay_domains = lsearch;/that/file does NOT insert the whole
list into the setting [*]; it does a single proble ("is the domain in
the file?") Similarly if you use mysql or any other database. You need
something like

relay_domains = mysql;select x from domains where domain='$key';

the value of $key is the domain that is being looked up. It doesn't
matter what "x" is - the data isn't going to be used. What Exim wants to
know is whether $key is a domain in the database.

------------
[*] If you gave a file name *without* lsearch; then it would be an
interpolation, but you can't interpolate any other way.



-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.