Re: [exim] MySQL - Blocking senders at RCPT time

Góra strony
Delete this message
Reply to this message
Autor: thunder
Data:  
Dla: exim-users
Temat: Re: [exim] MySQL - Blocking senders at RCPT time
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-emailer@??? |
|  2 | reply@???          |

+----+--------------------------------+
2 rows in set (0.01 sec

Sorry for the multiple posts.

A.


On 2017-08-02 21:54, thunder@??? wrote:
> Hi All,
>
> I was wondering whether anyone could help me with getting some
> configuration to work. Currently I have the following in my exim
> configuration, and I am using it for manually blocking addresses (its
> handy where someone is dumb enough to keep using the same 'from'
> address, its even been handy for blocking various new domain TLD's
> that spammers like to use of late.
>
> Here's what I have in my configuration, which just reads from a file:
>
> drop    senders = /usr/local/etc/eximreject.lst
>         message = Not acceptable - You are blacklisted

>
> The above has worked a treat for years. But I would like to move
> things to a database instead so I can have more things centralised.
>
> I have imported the contents of this file into an SQL table I made:
>
> MariaDB [mail]> describe bannedsenders;
> +--------+---------------------+------+-----+---------+----------------+
> | Field  | Type                | Null | Key | Default | Extra          
> |
> +--------+---------------------+------+-----+---------+----------------+
> | id     | tinyint(3) unsigned | NO   | PRI | NULL    | auto_increment 
> |
> | sender | tinytext            | NO   |     | NULL    |                
> |
> +--------+---------------------+------+-----+---------+----------------+

>
> The 'sender' column contains the equivalent of what is in tne plain
> text file, just addresses.
>
> I had a read of the exim manual for MySQL lookups but there is
> obviously something I don't get, since I cant get it to work. I made a
> futile attempt which failed:
>
> drop    senders = ${lookup mysql{select sender from
> mail.bannedsenders} {$value}fail}
>         message = Not acceptable - You are blacklisted

>
> Doesn't work. Any suggestions would be appreciated.
>
> Thanks!
> A.