Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Only allow users from company domain to register or create a ticket

osTicket version: v1.9.14

I'm' trying to create a filter to only allow company emails to register.  See attached file for setup details.
Registration emails are getting through eventhough I'm not using the '' email address.  Not sure what I'm doing wrong or missing.  

Any ideas?  Thanks.


  • No attached file.
    You haven't shared your filter config.
    Registration emails do not go to osTicket so I'm not real sure what you mean by they are getting through.
  • File you see it?


  • Using REGEX to parse email is tricksy (like hobbits).
    You appear to be assuming that the TO field will only have one email address in it, and no name.

    Is it possible that your email headers are formatted like this:
    Neil Test <>

    I think that you would be better off changing "Does Not Match REGEX" to "Does Not contain" and put the domain in the pattern.
  • I initially had it set to "Does Not Contain" w/ domain pattern, but it wasn't working so I went the REGEX route.  I just changed it back to using "Does Not Contain", tested and the registration is still going through (email not from "")
  • Try removing the @ symbol?
  • Yes, still doesn't work.
  • What do you mean by "Registration emails are getting through"

    How are you testing?
  • edited September 2016
    I go to the web portal account registration page and sign up for a new account 

    (this is going through my domain)

  • Hello richardw,

    why not this:


    here my solution:

    edit: \upload\include\class.validator.php

    function is_valid_email($email) {
    global $cfg;

    $domain_suffix = substr(strrchr($email, "@"), 1);
    $tld_allow = array("", "");

    if (!in_array($domain_suffix, $tld_allow)) {
    return FALSE;

    // Default to FALSE for installation
    return self::is_email($email, false, $cfg && $cfg->verifyEmailAddrs());

    and unset "Verify email address domain" in osTicket __ Admin Control Panel

    if the e-mail suffix is not or the user can't register

    Best Regards
  • Thank you citrixraptor....I saw that "fix", but I prefer not to have to create custom code if this can be accomplished through the admin console (which seems pretty straightforward).  
  • Ticket filters... are filters that run when you open a ticket (via the ui or email or api, or all of the above).
    They will not prevent someone from registering for an account...

  • Hello richardw,

    >> Thank you citrixraptor....I saw that "fix", 
    You are welcome ..

    >> but I prefer not to have to create custom code if this can be accomplished through the admin 
    >> console (which seems pretty straightforward). 
    Understand your point of view ... is this perhaps a solution - see 01.jpg ... allowed mail domains via admin panel?

    Best Regards
  • edited September 2016
    That field does not exist in an unmodified 1.9.14, or in 1.10rc3.
  • edited September 2016
    Hello ntozier, 
     your are right! ... but now allowed mail domains are managed by admin panel 

    But a good add .. i think

    Best Regards


  • Thanks citrixraptor/ntozier for you assistance...definitely sounds like a good added feature for the future.
  • Hello richardw,

    >> Thanks citrixraptor/ntozier for you assistance...
    You are welcome ...

    >> definitely sounds like a good added feature for the future.

    Best Regards
Sign In or Register to comment.