Re: [exim] ACL/Router

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Jakob Hirsch
Ημερομηνία:  
Προς: 'Exim-users'
Αντικείμενο: Re: [exim] ACL/Router
Paulo Andre wrote:

> I have to check the users and am now using::
>
>  !senders      = ${lookup mysql{SELECT User FROM users WHERE 
> User='$sender_address' and Domain='$sender_address_domain' and 
> Allowed='Y'}{$value}}


What is the complete ACL? What is in your database? It's hard to help
without enought information...

> This works, but I need to able able to have 'User=*@domain.com' in the
> database and then exim will allow all users for that domain to send.
> Possible?


Sure. But I would do that with "condition".
Set up your database with local_part and domain in two seperate columns.
Then use something like this:

deny condition = ${lookup mysql {SELECT * FROM table WHERE
domain='$sender_address_domain' AND local_part IN
('*','$local_part')}{no}{yes}}

And always use quote_mysql with variables you use in a query...