Blocking spam based on domain

Creating and modifying plugins.
Post Reply
schimanke
Regular
Posts: 155
Joined: Mon Jan 07, 2008 5:38 pm
Location: Hameln, Germany
Contact:

Blocking spam based on domain

Post by schimanke » Wed Aug 09, 2017 11:11 am

Hi everybody,

is it possible to block spam comments based on their domain, for example mail.ru? I have already tried

Code: Select all

*\@mail\.ru
but to no avail. Any ideas?

User avatar
yellowled
Regular
Posts: 6909
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Blocking spam based on domain

Post by yellowled » Fri Aug 11, 2017 8:16 pm

schimanke wrote:is it possible to block spam comments based on their domain, for example mail.ru? I have already tried

Code: Select all

*\@mail\.ru
but to no avail.
How did you “try” that?

You should be able to add regular expressions to the word filter for email addresses in the configuration of the default spamblock plugin. (Which I never tried myself, but it says so.) You also need to activate the word filter by setting it to either moderate or block. I assume that's what you tried, but it's not working? Or are you using this with a different plugin and/or in a different config option?

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

thh
Regular
Posts: 212
Joined: Thu Oct 26, 2006 2:38 pm
Location: Stuttgart, Germany
Contact:

Re: Blocking spam based on domain

Post by thh » Fri Aug 11, 2017 9:59 pm

schimanke wrote:I have already tried

Code: Select all

*\@mail\.ru
That's no regular expression (at least none that makes any sense).

".+\@mail\.ru" should be (a little) better.

schimanke
Regular
Posts: 155
Joined: Mon Jan 07, 2008 5:38 pm
Location: Hameln, Germany
Contact:

Re: Blocking spam based on domain

Post by schimanke » Sat Aug 12, 2017 8:51 am

@YL: Yes, I tried exactly what you thought in the default spamblock plugin but it didn't work. However, the solution provided by thh obviously worked. I will monitor this.

@thh: Thank you very much! That seemed to do the trick. :-)

Post Reply