# Exclude certain email sub-domains from automatic group membership

**URL:** <https://meta.discourse.org/t/exclude-certain-email-sub-domains-from-automatic-group-membership/86212>\
**Category:** Feature\
**Tags:** groups\
**Created:** [26.Апрель.2018 11:51:14 UTC](https://meta.discourse.org/t/exclude-certain-email-sub-domains-from-automatic-group-membership/86212 "2018-04-26T11:51:14Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)\
**Post date:** [26.Апрель.2018 11:51:14 UTC](https://meta.discourse.org/t/exclude-certain-email-sub-domains-from-automatic-group-membership/86212/1 "2018-04-26T11:51:14Z")

</div>

I’m looking at the automatic group membership setting (in group settings). It states

> Users who register with an email domain that exactly matches one in this list will be automatically added to this group:

Am I correct in assuming that entering `bar.com` will also trigger membership for emails ending in `foo.bar.com`? Or is the word “exactly” meant to state that exactly that is not the case?

Assuming that my assumption is correct, I’m looking for a solution for the following:

Goal: All employees (and only employees) of a university should automatically get membership in the group employees .

Strategy: Use the university’s domain `uni.edu` in the above setting to automatically assign membership

Problem: Student email-addresses also end in `uni.edu` but they should not get access to the group.

Possible solution: If I could exclude `student.uni.edu` from getting automatic membership, that should work, but I believe this is currently not possible. Or am I missing something? Any smart workarounds?

---

_[View the full topic](https://meta.discourse.org/t/exclude-certain-email-sub-domains-from-automatic-group-membership/86212)._
