1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

OVH: Add DMARC support (#2485)

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Gaspard d'Hautefeuille
2023-08-08 17:55:16 +02:00
committed by GitHub
parent 5c44e7eef9
commit 59cbb73a9f
4 changed files with 6 additions and 6 deletions

View File

@@ -227,8 +227,8 @@ func nativeToRecord(r *Record, origin string) (*models.RecordConfig, error) {
rtype := r.FieldType
// ovh uses a custom type for SPF and DKIM
if rtype == "SPF" || rtype == "DKIM" {
// ovh uses a custom type for SPF, DKIM and DMARC
if rtype == "SPF" || rtype == "DKIM" || rtype == "DMARC" {
rtype = "TXT"
}

View File

@@ -143,7 +143,7 @@ func (c *ovhProvider) updateRecordFunc(old *Record, rc *models.RecordConfig, fqd
if c.isDKIMRecord(rc) {
// When DKIM value is longer than 255, the MODIFY fails with "Try to alter read-only properties: fieldType"
// Setting FieldType to empty string results in the property not being altered, hence error does not occur.
record.FieldType = ""
record.FieldType = "DKIM"
}
err := c.client.CallAPI("PUT", fmt.Sprintf("/domain/zone/%s/record/%d", fqdn, old.ID), &record, &Void{}, true)