Restrict drupal user registration to specific email domain.

There are many modules  for allowing user to register and login by email address. One of those is Email registration.
But what when you want to allow or restrict the email registration by specific domain ?
A easy workaround without depending on any contributed module is by using  " Access Rules "

 Add the following e-mail rules:

  • Deny %@% (which blocks all e-mail addressess)
  • Allow

Sometimes task which seems to be difficult are very easy :P