Skip to content

Commit 0774ffe

Browse files
committed
avoid creating duplicate mail records
1 parent 0ee87e1 commit 0774ffe

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plogical/dnsUtilities.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,8 @@ def dnsTemplate(domain, admin):
441441

442442
## Mail Record
443443

444-
DNS.createDNSRecord(zone, 'mail.' + actualSubDomain, "A", ipAddress, 0, 3600)
444+
if ('mail.%s' % (actualSubDomain)).find('mail.mail') == -1:
445+
DNS.createDNSRecord(zone, 'mail.' + actualSubDomain, "A", ipAddress, 0, 3600)
445446

446447
# CNAME Records.
447448

0 commit comments

Comments
 (0)