HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Ban Email Addresses by Domain

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#102893 (In Topic #20149)
Avatar

Fan in training

Is there a way to disallow certain email domains?

Hello. I've been building my website with OCPortal for a few months now, and I absolutely love it. Unfortunately, there is a group of users who has been constantly spamming me via proxy servers. I have enabled e-mail address confirmation, but the users apparently have lots of time on their hands, and have been repeatedly trashing my website while I'm at school.

I've been banning their IP addresses in the hopes that they'd run out of proxies, but it looks like they're using a service with lots of different IP's, and I wouldn't want anyone to not be able to access the site if they receive one of those IP's in the future. The users know that I'll go to the authorities as soon as I have any information on them, so they haven't used any real e-mail addresses. Is there any way I can ban certain e-mail domains? For instance, nobody would be able to use any addresses that are @10minutemail.net or @fakeinbox.com.

I've been lurking in the community (without an account) for a while, and I've seen lots of great people here. Thanks for any help in advance!
Back to the top
 
Posted
Rating:
#102894
Avatar

Hey :),

It's pretty technical, but you could probably fudge something together with the fields.xml file, which is an obscure little corner of ocPortal designed to allow non-programmers to achieve this kind of thing on a field.

ocPortal Tutorial: The form field filter system - ocPortal.com

I haven't tried it, but have a go with:

Code

<fieldRestrictions>
   <qualify pages="join" fields="email_address">
      <shun error="Sorry we don't like gmail">@gmail.com</shun>
   </qualify>
</fieldRestrictions>


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#102895
Avatar

Fan in training

Using <shun> didn't work, but I changed it to <disallowedsubstring> and now it does:

Code

<fieldRestrictions>
   <qualify pages="join" fields="email_address">
      <disallowedsubstring error="Sorry, we don't allow temp e-mail accounts.">@fakeinbox.com</disallowedsubstring>
   </qualify>
</fieldRestrictions>


It just occurred to me that using *@fakeinbox.com (adding an 
asterisk) might have made <shun> work, but I'll just stick with <disallowedsubstring> unless there's something wrong with that method.

Thanks for the help!
Back to the top
 
Posted
Rating:
#102896
Avatar

Great - and I think you're right about shun.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: