1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-04-02 21:37:23 +02:00
# Conflicts:
#	README.md
#	management/mailconfig.py
#	management/web_update.py
This commit is contained in:
downtownallday
2020-06-11 15:13:40 -04:00
11 changed files with 74 additions and 33 deletions

View File

@@ -432,7 +432,7 @@ def get_domain(emailaddr, as_unicode=True):
pass
return ret
def get_mail_domains(env, as_map=False, filter_aliases=None, category=None):
def get_mail_domains(env, as_map=False, filter_aliases=None, category=None, users_only=False):
# Retrieves all domains, IDNA-encoded, we accept mail for.
#
# If as_map is False, the function returns the lowercase domain
@@ -453,7 +453,12 @@ def get_mail_domains(env, as_map=False, filter_aliases=None, category=None):
# category is another type of filter. Set to a string value to
# return only those domains of that category. ie. the
# "businessCategory" attribute of the domain must include this
# category.
# category. [TODO: this doesn't really belong there, it is here to
# make it easy for dns_update to get ssl domains]
#
# If users_only is True, only return domains with email addresses
# that correspond to user accounts. [TODO: This currently has no
# effect - this function only returns user mail domains]
#
conn = open_database(env)
filter = "(&(objectClass=domain)(businessCategory=mail))"