mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
Better soultion for DKIM DNS reloading
This commit is contained in:
parent
fbac2699a4
commit
073c0164f1
2 changed files with 2 additions and 5 deletions
|
@ -123,10 +123,7 @@ if [ ! -z "$DNS_SYSTEM" ] && [ "$dkim" = 'yes' ]; then
|
|||
p=$(cat $USER_DATA/mail/$domain.pub|grep -v ' KEY---'|tr -d '\n')
|
||||
record='_domainkey'
|
||||
policy="\"t=y; o=~;\""
|
||||
$BIN/v-add-dns-record $user $domain $record TXT "$policy"
|
||||
|
||||
# Wait one second to avoid editing bind zone in the same unixtime second, because bind will not reload zone if new and last modification occur in the same unixtime second
|
||||
sleep 1
|
||||
$BIN/v-add-dns-record $user $domain $record TXT "$policy" '' '' 'no'
|
||||
|
||||
record='mail._domainkey'
|
||||
selector="\"k=rsa\; p=$p\""
|
||||
|
|
|
@ -126,7 +126,7 @@ if (!empty($_POST['ok'])) {
|
|||
|
||||
// Add DNS domain
|
||||
if (($_POST['v_dns'] == 'on') && (empty($_SESSION['error_msg']))) {
|
||||
exec (VESTA_CMD."v-add-dns-domain ".$user." ".$v_domain." ".$v_public_ip, $output, $return_var);
|
||||
exec (VESTA_CMD."v-add-dns-domain ".$user." ".$v_domain." ".$v_public_ip." '' '' '' '' '' '' '' '' 'no'", $output, $return_var);
|
||||
check_return_code($return_var,$output);
|
||||
unset($output);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue