On 2017-08-02, thun...@ahhyes.net <thun...@ahhyes.net> wrote:
> On 2017-08-02 22:16, Marius Stan wrote:
>> On 2/8/2017 3:03 PM, thun...@ahhyes.net wrote:
>>> Hi,
>>> 
>>> Sorry this is a followup after writing as there might not be 
>>> sufficient information in my OP about whats in the database:
>>> 
>>> Some sample data:
>>> 
>>> MariaDB [mailauth]> select * from bannedsenders limit 2;
>>> +----+--------------------------------+
>>> | id | sender                         |
>>> +----+--------------------------------+
>>> |  1 | communities-emai...@vmware.com |
>>> |  2 | re...@oracle-mail.com          |
>>> +----+--------------------------------+
>>> 2 rows in set (0.01 sec
>>> 
>>> Sorry for the multiple posts.
>> 
>> Here's how I've done it, I'm sure there are other ways to do it:
>> 
>> Q_BL_SENDERS = SELECT email FROM blacklists WHERE
>> email='${quote_mysql:$sender_address}'
>> 
>> addresslist blockedsenders = mysql;Q_BL_SENDERS
>> 
>> acl_check_rcpt:
>> 
>>   deny    senders        = +blockedsenders
>>           message        = Sender $sender_address is blocked
>
> Hi Maruis,
>
> I have data like this in the table:
>
>| 21 | *.date                               |
>| 22 | *.top                                |
>| 23 | *.us                                 |
>
> Would it still work?

No, but like this it will.

Q_BL_SENDERS = SELECT email FROM blacklists WHERE \
  email='${quote_mysql:$sender_address}' \
  OR email LIKE '*%';


-- 
This email has not been checked by half-arsed antivirus software 

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to