Fixed bug domains backends

This commit is contained in:
Marc Aymerich 2015-05-04 12:58:20 +00:00
parent 80b4fde287
commit 0f27123ab0

View file

@ -219,7 +219,7 @@ class PostfixAddressBackend(ServiceController):
if context['domain'] != context['local_domain']:
# Check if the domain is hosted on this mail server
# TODO this is dependent on the domain model
if Domain.objects.filter(records__type=Record.MX, name=context['address_domain']).exists():
if Domain.objects.filter(records__type=Record.MX, name=context['domain']).exists():
self.append(textwrap.dedent("""
[[ $(grep '^\s*%(domain)s\s*$' %(virtual_alias_domains)s) ]] || {
echo '%(domain)s' >> %(virtual_alias_domains)s