Block particular domain

rodrigorlx

Registered
Oct 22, 2010
3
0
51
Hi all.
I have about 10 sites in my server and some of them are being "attacked" by users registering and registering using disposable e-mail addresses.
I wanna know how can I block a specific domain name from reciving e-mails from my server.

I've browsered the web a lot before opening this topic but I was unable to find an answer. The best I've found is:

Code:
if $header_from: contains “@domain.com”
then
fail text “Error Message Here”
seen finish
endif”
I tryed changing $header_from to $header_to but that doesn't work.

Any idea how can I do that?
 

rodrigorlx

Registered
Oct 22, 2010
3
0
51
No,
Users go and register fake accounts using services like www. spam.la (no link because this kind of service doesn't desire a link!) and I need to ban one by one.

And as there are lots of sites in my server, I need to do it in all.


The point is:
All sites have a email confirmation system, so, blocking my server to send e-mails to @spam.la will have effect as the user won't be able to confirm the account! :)


Got it?
 

Infopro

Well-Known Member
May 20, 2003
17,091
516
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Yep, and what you're doing is not the best way to go.

All sites have a email confirmation system
What software are the sites using? Many popular scripts these days offer spam prevention plugins of some sort. This, might be the best way to go. Mod Security might also be another tool to help here if these are bots registering to spam.
 

rodrigorlx

Registered
Oct 22, 2010
3
0
51
Yep, and what you're doing is not the best way to go.



What software are the sites using? Many popular scripts these days offer spam prevention plugins of some sort. This, might be the best way to go. Mod Security might also be another tool to help here if these are bots registering to spam.
Why it's not the best way?
Each site uses a different script and none of them have this option.
I found ModSecurity webpage. Is that a mod for WHM?

There isn't any other way to block that domains?
 

onef

Member
Mar 19, 2007
10
0
151
I'm a bit confused, do these users have to email your server to register for membership on your site? Like, an email pipe into your registration script or something?

If so, and you know you'll never receive legit mail from that domain, just add that domain as an addon domain. Then, whenever they email in, the server will see that a remote mail server is trying to use a local domain, and the mail should be blocked.

If you're just talking about your cms/forum/whatever, there's most likely something you'll have to enable in there.
 
Last edited: