Autor: Coax Data: Dla: exim-users Temat: [Exim] MySQL lookup acl language
Hiya!
I need to configure exim, using smtp_acl_connect, to selectively prohibit
incoming connections right at the start - without even displaying an SMTP
banner. (I've tested by placing a 'deny' in the acl - and it works just
as prescribed - that way - and denies all connections.)
At this point, I have a MySQL database called 'exim4' with a table called
'blocks' with a column called "address" which I need to check for, and
deny if a match is present.
I need a hand designing the ACL to do this..
The query I need to execute is this:
:/
select address from blocks where address = '$sender_host_address'
:/
I need this acl to selectively deny connections based upon the fact that
the $sender_host_address is found in the database. If it does NOT find
any entry for this, I want the acl to 'accept'.
Furthermore, I'd like the acl, if possible, to default to 'accept' if the
database doesn't respond - to ensure that a database failure doesn't take
the mail system down. (I can get around this if it is not possible..)
Could one of you kind folks help me out with this? I am not too good at
this acl language, and could definitely use a hand. :/
Thanks much in advance for any help you could provide.