fix(model): add interface ip to SPF entry
This commit is contained in:
1 parent
f3b0df1937
commit
4680f4b809
1 file changed
+3
-1
+3
-1
@@ -123,7 +123,9 @@ class Domain(models.Model):
|
||||
ipv6addr.full_address(),
|
||||
)
|
||||
|
||||
if host.allow_email:
|
||||
if host.allow_email and interface.ip4address:
|
||||
content += f'{host.hostname}\tTXT\t"v=spf1 mx ip4:{interface.ip4address.address} -all"\n'
|
||||
elif host.allow_email:
|
||||
content += f'{host.hostname}\tTXT\t"v=spf1 mx -all"\n'
|
||||
|
||||
return content
|
||||
|
||||
Reference in new issue
Block a user