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:
committed by
GitHub
parent
5c44e7eef9
commit
59cbb73a9f
@@ -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"
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user