I have the following hostlist:

hostlist known_mailhosts        = pgsql;select coalesce ((select true 
from "mail_servers" where "ip_address" = '${quote_pgsql:$sender_host_addres
s}'), ${if def:sender_host_name {(select true from "exempt_domains" 
where '${quote_pgsql:$sender_host_name}' like '%' || "domain"), }}false);

The SQL works as expected as demonstrated below, returning a true or false 
result.  I don't think the SQL has anything to do with the actual problem...

In my connect acl I have the line:
accept  hosts           = +known_mailhosts

This works as expected.

I then in my helo acl had:
accept  hosts           = : +relay_from_hosts

...which worked as expected.

I tried changing this to:
accept  hosts           = : +relay_from_hosts : +known_mailhosts

This does NOT work as expected - instead of only allowing local host or items 
in either of those two hostlists through, it accepts ANYTHING.  Why is that?


Question 2:

I have the following in my rcpt acl:
                log_message     = RCPT (deny): Rejected due to prior setting 
($acl_m8).

When $acl_m8 is set to a string containing "Please see 
http://help.seattleserver.com/?page=email_reverse_dns - Reverse DNS records 
are required for sending mail servers, but your mail server, 
$sender_host_address, does not have one!"

...what actually gets logged is not the expected:

RCPT (deny): Rejected due to prior setting (Please see 
http://help.seattleserver.com/?page=email_reverse_dns - Reverse DNS records 
are required for sending mail servers, but your mail server, 
$sender_host_address, does not have one!).

...but instead:

RCPT (deny): Rejected due to prior setting (Please see 
http://help.seattleserver.com/?page=email_reverse_dns - Reverse DNS records 
are required for sending mail servers, but your mail server, 
$sender_host_address, does not have one!

(note the missing ').' at the end).  Why is this?


My full configuration file may be viewed at 
http://test.seattleserver.com/conf/exim/exim.conf.primary_mx

Hostlist query results using actual logged queries:

seattleserver=# select coalesce ((select true from "mail_servers" 
where "ip_address" = '199.72.170.147'), false);
 coalesce
----------
 f
(1 row)
seattleserver=# select coalesce ((select true from "mail_servers" 
where "ip_address" = '88.9.148.246'), (select true from "exempt_domains" 
where '%246.red-88-9-148.dynamicip.rima-tde.net' like '%' || "domain"), 
false);
 coalesce
----------
 f
(1 row)

...and here's a couple just to show that it returns true when it should:

seattleserver=# select coalesce ((select true from "mail_servers" 
where "ip_address" = '88.9.148.246'), (select true from "exempt_domains" 
where '%foobar.efax.com' like '%' || "domain"), false);
 coalesce
----------
 t
(1 row)
seattleserver=# select coalesce ((select true from "mail_servers" 
where "ip_address" = '205.234.78.130'), false);
 coalesce
----------
 t
(1 row)

Cheers,
-- 
Casey Allen Shobe | [EMAIL PROTECTED] | 206-381-2800
SeattleServer.com, Inc. | http://www.seattleserver.com

-- 
## 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