records.append((qname,rtype,value,"(Set by user.)"))
# Add defaults if not overridden by the user's custom settings.
# Add defaults if not overridden by the user's custom settings (and not otherwise configured).
defaults=[
(None,"A",env["PUBLIC_IP"],"Required. May have a different value. Sets the IP address that %s resolves to for web hosting and other services besides mail. The A record must be present but its value does not affect mail delivery."%domain),
("www","A",env["PUBLIC_IP"],"Optional. Sets the IP address that www.%s resolves to, e.g. for web hosting."%domain),
records.append((m.group(1),"TXT",val,"Recommended. Provides a way for recipients to verify that this machine sent @%s mail."%domain))
# Append a DMARC record.
records.append(("_dmarc","TXT",'v=DMARC1; p=quarantine',"Optional. Specifies that mail that does not originate from the box but claims to be from @%s is suspect and should be quarantined by the recipient's mail system."%domain))
records.append((m.group(1),"TXT",val,"Recommended. Provides a way for recipients to verify that this machine sent @%s mail."%domain))
# Append a DMARC record.
records.append(("_dmarc","TXT",'v=DMARC1; p=quarantine',"Optional. Specifies that mail that does not originate from the box but claims to be from @%s is suspect and should be quarantined by the recipient's mail system."%domain))
# Sort the records. The None records *must* go first in the nsd zone file. Otherwise it doesn't matter.