SpamBlocked blacklist_to ?

bwrob

Verified User
Joined
Aug 20, 2004
Messages
9
Hi
How to use blacklist_to in Jeff's exim.conf with
Spam Assassin.
Something like if To: contains example.com or
[email protected].

Any idea.

Thanks
bob
 
I realize my answer comes 12 years later, but I'll post my answer any way because I was struggling with the same question and I might found the solution. If not then I hope the experts will jump in.

At first I created a file named blacklist_to in etc/virtual and filled it with email addresses that never should receive mail.
After a night with this setup I realized it didn't work because spammers received the registration mail and could sign up.

After some more digging I tried this:

In DA under user level you can configure Spamassassin Setup and Manually edit the config file yourself (scroll all the way down).
Add for example:
Code:
blacklist_to *@gmx.com
blacklist_to *@mailforspam.com

Save it and you're done.
 
Update: My solution above does not work. Spammers still receive their activation mail. :(

That is a pity, hoped I could manage an email blacklist server wide rather than blacklisting per website.
 
Update system filter /etc/system_filter.exim for global change.

Thanks for your reply.

Looked at the file but don't know how to proceed.
Is this the correct file?

It's about:
## Exim system filter to refuse potentially harmful payloads in
## mail messages

I want to to block outgoing emails to specific email addresses.
 
Indeed it can! Thanks for pointing me in the right direction.
Although I had to do a lot of searching and digging I finally came up with a working (tested) solution. :)

Add this to the bottom of /etc/system_filter.exim
Code:
## custom
if $header_to: contains "@mailforspam.com"
    then
    fail text "This message has been rejected"
    seen finish
endif

Not sure if a modified /etc/system_filter.exim file will survive a exim build or upgrade. So make a backup of your changes.
 
Good to know you've found a working solution. As for file updates, I've never seen it overwritten or changed with any software update. Anyway you might consider using chattr to add immutable attribute to the file.
 
Back
Top