mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-06 18:36:45 +02:00
opendkim fix for ubuntu
This commit is contained in:
@@ -308,12 +308,14 @@ class DNS:
|
||||
path = "/etc/opendkim/keys/" + topLevelDomain + "/default.txt"
|
||||
command = "sudo cat " + path
|
||||
output = subprocess.check_output(shlex.split(command))
|
||||
leftIndex = output.index('(') + 2
|
||||
rightIndex = output.rindex(')') - 1
|
||||
|
||||
record = Records(domainOwner=zone,
|
||||
domain_id=zone.id,
|
||||
name="default._domainkey." + topLevelDomain,
|
||||
type="TXT",
|
||||
content="v=DKIM1; k=rsa; p=" + output[53:269],
|
||||
content=output[leftIndex:rightIndex],
|
||||
ttl=3600,
|
||||
prio=0,
|
||||
disabled=0,
|
||||
|
||||
Reference in New Issue
Block a user