hi!
I am trying to restrict Authenticated users from sending from a domain name other than those designated as local domains.
in acl_smtp_rcpt
I have the following code:
deny log_message = Sender trying to send from an unapproved domain name.
authenticated = *
sender_domains = !+local_domains
message = You must send from an approved domain name.
Where local_domains is defined by
domainlist local_domains = mysql;MYSQL_Q_LDOMAIN
and
MYSQL_Q_LDOMAIN=SELECT SQL_CACHE DISTINCT domaintable.domain FROM domaintable LEFT JOIN accounts ON domaintable.domain = accounts.domain WHERE domaintable.domain='$domain' and accounts.active = ‘1'
Could someone please point out where I am going wrong as this is rejecting all domains?
Kind Regards,
Jonathan Gilpin