Configure exim to stop sending mail to yahoo

discovery

Active Member
Nov 11, 2008
28
0
51
Hi

What is the best method to instruct exim to reject all emails sent to yahoo domains?

I have some forums on my server and lot of users have yahoo emails, so all notifications, PM emails and others are just staying on queue beeng rejected from yahoo.

Also I want to reject all emails from yahoo if possible.

TKS.
 

eth00

Well-Known Member
PartnerNOC
Mar 30, 2003
721
1
168
NC
cPanel Access Level
Root Administrator
Out of curiosity have you tried to fix the problem rather then just disabling the emails to them?

Have you setup domain keys + spf + rdns ?
 

discovery

Active Member
Nov 11, 2008
28
0
51
yes I do and I still want to block them

so if you have a solution please help, if no let the others
 

Zaf

Well-Known Member
Aug 22, 2005
117
0
166
You may bounce or blackhole (delete) messages in the queue which have yahoo recipients, by one of the two in cron running every minute:

Code:
exiqgrep -r yahoo -i | xargs -n 1 exim -Mg
Code:
exiqgrep -r yahoo -i | xargs -n 1 exim -Mrm
You may also create a yahoo.com and park other yahoo.xxx on the server and set default email to bounce or blackhole to achieve the same.

But a slightly better solution would be to hack the Exim configuration to achieve this (not sure how, never tried it before).