create_opendkim_key.sh: fix several errors.
This commit is contained in:
parent
6a81033790
commit
e935c1e9ee
@ -24,8 +24,10 @@ dns_server="b.ns.oopen.de"
|
|||||||
# -
|
# -
|
||||||
# - Zone containing the DKIM TXT record.
|
# - Zone containing the DKIM TXT record.
|
||||||
# -
|
# -
|
||||||
# - Example:
|
# - Defaults to '_domainkey.<dkim_domaini>'
|
||||||
# - update_zone="dkim.oopen.de"
|
# -
|
||||||
|
# - Note:
|
||||||
|
# - do NOT change/set this option unless you know what you do.
|
||||||
# -
|
# -
|
||||||
#update_zone=""
|
#update_zone=""
|
||||||
|
|
||||||
@ -33,8 +35,10 @@ dns_server="b.ns.oopen.de"
|
|||||||
# -
|
# -
|
||||||
# - TTL for the DKIM TXT Record.
|
# - TTL for the DKIM TXT Record.
|
||||||
# -
|
# -
|
||||||
# - Defaults to "360"
|
# - Defaults to "" if update_dns=false
|
||||||
#TTL=360
|
# - Defaults to "43200" if update_dns=true
|
||||||
|
#
|
||||||
|
#TTL=""
|
||||||
|
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
|
@ -18,7 +18,7 @@ log_file="${LOCK_DIR}/${script_name%%.*}.log"
|
|||||||
LOGGING=false
|
LOGGING=false
|
||||||
BATCH_MODE=false
|
BATCH_MODE=false
|
||||||
DEFAULT_key_algo="hmac-sha256"
|
DEFAULT_key_algo="hmac-sha256"
|
||||||
DEFAULT_ttl=360
|
DEFAULT_ttl="43200"
|
||||||
|
|
||||||
opendkim_dir="/etc/opendkim"
|
opendkim_dir="/etc/opendkim"
|
||||||
|
|
||||||
@ -83,11 +83,14 @@ usage() {
|
|||||||
|
|
||||||
-n
|
-n
|
||||||
Do \033[1mNOT\033[m set/update DNS TXT record for DKIM domain. The default is
|
Do \033[1mNOT\033[m set/update DNS TXT record for DKIM domain. The default is
|
||||||
to update DNS entry.
|
to update DNS entry. This option is ignored if flag \033[1m-n\033[m is set.
|
||||||
|
|
||||||
-s <secret>
|
-s <secret>
|
||||||
Give the secret for the key used by nsupdate to create/update the DNS TXT record.
|
Give the secret for the key used by nsupdate to create/update the DNS TXT record.
|
||||||
|
|
||||||
|
-t <ttl>
|
||||||
|
Specify the TTL value for the DKIM TXT record.
|
||||||
|
|
||||||
-z <update-zone>
|
-z <update-zone>
|
||||||
The zone which is updated with the TXT entry for DKIM by using 'nsupdate'.
|
The zone which is updated with the TXT entry for DKIM by using 'nsupdate'.
|
||||||
|
|
||||||
@ -113,32 +116,19 @@ clean_up() {
|
|||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
containsElement () {
|
|
||||||
local e
|
|
||||||
for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# - Remove leading/trailling whitespaces
|
|
||||||
# -
|
|
||||||
trim() {
|
|
||||||
local var="$*"
|
|
||||||
var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
|
|
||||||
var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters
|
|
||||||
echo -n "$var"
|
|
||||||
}
|
|
||||||
|
|
||||||
echononl(){
|
echononl(){
|
||||||
|
if $terminal ; then
|
||||||
echo X\\c > /tmp/shprompt$$
|
echo X\\c > /tmp/shprompt$$
|
||||||
if [ `wc -c /tmp/shprompt$$ | awk '{print $1}'` -eq 1 ]; then
|
if [ `wc -c /tmp/shprompt$$ | awk '{print $1}'` -eq 1 ]; then
|
||||||
echo -e -n "$*\\c" 1>&2
|
echo -e -n " $*\\c" 1>&2
|
||||||
else
|
else
|
||||||
echo -e -n "$*" 1>&2
|
echo -e -n " $*" 1>&2
|
||||||
fi
|
fi
|
||||||
rm /tmp/shprompt$$
|
rm /tmp/shprompt$$
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fatal(){
|
fatal(){
|
||||||
echo ""
|
echo ""
|
||||||
if $terminal ; then
|
if $terminal ; then
|
||||||
@ -236,6 +226,14 @@ blank_line() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
containsElement () {
|
||||||
|
local e
|
||||||
|
for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# - Remove leading/trailling whitespaces
|
||||||
|
# -
|
||||||
trim() {
|
trim() {
|
||||||
local var="$*"
|
local var="$*"
|
||||||
var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
|
var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
|
||||||
@ -243,6 +241,23 @@ trim() {
|
|||||||
echo -n "$var"
|
echo -n "$var"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete_generated_files() {
|
||||||
|
|
||||||
|
for _file in ${generated_files_arr[@]} ; do
|
||||||
|
|
||||||
|
echononl " Delete file \033[1m$_file\033[m .."
|
||||||
|
|
||||||
|
rm "$_file" > $log_file 2>&1
|
||||||
|
if [[ $? -eq 0 ]] ; then
|
||||||
|
echo_ok
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
error "$(cat $log_file)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -382,14 +397,13 @@ if $update_dns && [[ -z "$update_zone" ]] && ! $BATCH_MODE ; then
|
|||||||
echo ""
|
echo ""
|
||||||
echo " Which zone should contain the DKIM TXT record?"
|
echo " Which zone should contain the DKIM TXT record?"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo -e " Type \033[33m<return>\033[m to use the default value \033[33m_domainkey.${dkim_domain}\033[m"
|
||||||
echo ""
|
echo ""
|
||||||
echononl " update Zone: "
|
echononl " update Zone [_domainkey.${dkim_domain}]: "
|
||||||
read update_zone
|
read update_zone
|
||||||
while [ "X$update_zone" = "X" ] ; do
|
if [[ -z "$(trim $update_zone)" ]]; then
|
||||||
echo -e "\n\t\033[33m\033[1mEingabe erforderlich.\033[m\n"
|
update_zone="_domainkey.${dkim_domain}"
|
||||||
echononl " update Zone: "
|
fi
|
||||||
read update_zone
|
|
||||||
done
|
|
||||||
elif $update_dns && $terminal ; then
|
elif $update_dns && $terminal ; then
|
||||||
echo -e "\033[32m--\033[m"
|
echo -e "\033[32m--\033[m"
|
||||||
info "Zone \033[37m\033[1m$update_zone\033[m is used for DKIM TXT record"
|
info "Zone \033[37m\033[1m$update_zone\033[m is used for DKIM TXT record"
|
||||||
@ -458,7 +472,7 @@ if [[ -z "$dkim_domain" ]] ; then
|
|||||||
fatal "Running in batch mode, but no domain was given!"
|
fatal "Running in batch mode, but no domain was given!"
|
||||||
fi
|
fi
|
||||||
if $update_dns && [[ -z "$update_zone" ]] ; then
|
if $update_dns && [[ -z "$update_zone" ]] ; then
|
||||||
fatal "No update-zone is given!"
|
update_zone="_domainkey.${dkim_domain}"
|
||||||
fi
|
fi
|
||||||
if $update_dns && [[ -z "$key_secret" ]] ; then
|
if $update_dns && [[ -z "$key_secret" ]] ; then
|
||||||
fatal "No secret for the update key used by nsupdate is given!"
|
fatal "No secret for the update key used by nsupdate is given!"
|
||||||
@ -487,17 +501,21 @@ if $terminal ; then
|
|||||||
echo -e " \033[1m----------\033[m"
|
echo -e " \033[1m----------\033[m"
|
||||||
echo " DKIM Domain......................: $dkim_domain"
|
echo " DKIM Domain......................: $dkim_domain"
|
||||||
if $update_dns ; then
|
if $update_dns ; then
|
||||||
echo " Create/Update DKIM TXT record....: Yes"
|
echo -e " Create/Update DKIM TXT record....: \033[32mYes\033[m"
|
||||||
echo " Domain used for DKIM TXT record..: $update_zone"
|
echo " Domain used for DKIM TXT record..: $update_zone"
|
||||||
echo " Secret for the update key........: $key_secret"
|
echo " Secret for the update key........: $key_secret"
|
||||||
echo " Algorithm used for the TSIG key..: $key_algo"
|
echo " Algorithm used for the TSIG key..: $key_algo"
|
||||||
echo " Name of the TSIG key.............: $key_name"
|
echo " Name of the TSIG key.............: $key_name"
|
||||||
else
|
else
|
||||||
echo " Create/Update DKIM TXT record....: No"
|
echo -e " Create/Update DKIM TXT record....: \033[33mNo\033[m"
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
echo " DNS Server.......................: $dns_server"
|
echo " DNS Server.......................: $dns_server"
|
||||||
|
if [[ -z "$ttl" ]] || [[ "${ttl,,}" = "none" ]] ; then
|
||||||
|
echo -e " TTL for the DKIM TXT Record......: \033[33m- Not set -\033[m"
|
||||||
|
else
|
||||||
echo " TTL for the DKIM TXT Record......: $ttl"
|
echo " TTL for the DKIM TXT Record......: $ttl"
|
||||||
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
echo " OpenDKIM's etc-directory.........: $opendkim_dir"
|
echo " OpenDKIM's etc-directory.........: $opendkim_dir"
|
||||||
echo " Key directory....................: ${key_base_dir}/${dkim_domain}"
|
echo " Key directory....................: ${key_base_dir}/${dkim_domain}"
|
||||||
@ -527,6 +545,37 @@ time_stamp=$(date +%s)
|
|||||||
key_dir=${key_base_dir}/${dkim_domain}
|
key_dir=${key_base_dir}/${dkim_domain}
|
||||||
dkim_domain_shortname="${dkim_domain%.*}"
|
dkim_domain_shortname="${dkim_domain%.*}"
|
||||||
|
|
||||||
|
declare -a generated_files_arr=()
|
||||||
|
|
||||||
|
_wait=false
|
||||||
|
if $update_dns && [[ "$dkim_domain" != "$update_zone" ]] ; then
|
||||||
|
if ! $BATCH_MODE ; then
|
||||||
|
if [[ -z "$(dig +short ${update_zone}. NS)" ]] ; then
|
||||||
|
|
||||||
|
_tmp_string="; ----- Delegation DKIM Keys ${dkim_domain}"
|
||||||
|
for _server in $(dig +short ${dkim_domain} NS) ; do
|
||||||
|
_tmp_string="$_tmp_string\n${update_zone}. IN NS $_server"
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
blank_line
|
||||||
|
todo "Create a delegation for zone \033[1m${update_zone}.\033[m\n\n$_tmp_string"
|
||||||
|
_wait=true
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo -e " After adjusting your nameserver continue with this script"
|
||||||
|
echo ""
|
||||||
|
echo -en " \033[33mType <return> to continue or <CTRL>+C to abort:\033[m "
|
||||||
|
read OK
|
||||||
|
echo
|
||||||
|
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ -z "$(dig +short ${update_zone}. NS)" ]] ; then
|
||||||
|
fatal "No NS Record found for zone \033[1m${update_zone}.\033[m"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# - Generate private/public keys
|
# - Generate private/public keys
|
||||||
# -
|
# -
|
||||||
@ -567,6 +616,8 @@ echononl " Generate private key for domain '$dkim_domain'.."
|
|||||||
opendkim-genkey -D $key_dir -d $dkim_domain -b 2048 -r -s $time_stamp > $log_file 2>&1
|
opendkim-genkey -D $key_dir -d $dkim_domain -b 2048 -r -s $time_stamp > $log_file 2>&1
|
||||||
if [[ $? -eq 0 ]] ; then
|
if [[ $? -eq 0 ]] ; then
|
||||||
echo_ok
|
echo_ok
|
||||||
|
generated_files_arr+=("${key_dir}/${time_stamp}.private")
|
||||||
|
generated_files_arr+=("${key_dir}/${time_stamp}.txt")
|
||||||
else
|
else
|
||||||
echo_failed
|
echo_failed
|
||||||
error "$(cat $log_file)"
|
error "$(cat $log_file)"
|
||||||
@ -596,65 +647,13 @@ echononl " Print out public key key for domain '$dkim_domain'.."
|
|||||||
openssl rsa -in ${key_dir}/${time_stamp}.private -pubout -out ${key_dir}/${time_stamp}.public > $log_file 2>&1
|
openssl rsa -in ${key_dir}/${time_stamp}.private -pubout -out ${key_dir}/${time_stamp}.public > $log_file 2>&1
|
||||||
if [[ $? -eq 0 ]] ; then
|
if [[ $? -eq 0 ]] ; then
|
||||||
echo_ok
|
echo_ok
|
||||||
|
generated_files_arr+=("${key_dir}/${time_stamp}.public ")
|
||||||
else
|
else
|
||||||
echo_failed
|
echo_failed
|
||||||
error "$(cat $log_file)"
|
error "$(cat $log_file)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# - Configure OpenDKIM
|
|
||||||
# -
|
|
||||||
if $terminal ; then
|
|
||||||
echo ""
|
|
||||||
echo -e " \033[32mConfigure OpenDKIM for domain \033[37m\033[1m$dkim_domain\033[m"
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# - Configure/Adjust the signing table
|
|
||||||
# -
|
|
||||||
echononl " Configure/Adjust the signing table.."
|
|
||||||
if grep -q -E "^\s*\*@$dkim_domain\s" $signing_table_file 2>/dev/null ; then
|
|
||||||
perl -i -n -p -e "s/^\*@$dkim_domain\s.*/*@$dkim_domain\t$dkim_domain_shortname/" $signing_table_file 2> $log_file
|
|
||||||
if [[ $? -eq 0 ]] ; then
|
|
||||||
echo_ok
|
|
||||||
else
|
|
||||||
echo_failed
|
|
||||||
error "$(cat $log_file)"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo -e "*@$dkim_domain\t$dkim_domain_shortname" >> $signing_table_file 2> $log_file
|
|
||||||
if [[ $? -eq 0 ]] ; then
|
|
||||||
echo_ok
|
|
||||||
else
|
|
||||||
echo_failed
|
|
||||||
error "$(cat $log_file)"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# - Configure/Adjust the key table
|
|
||||||
# -
|
|
||||||
echononl " Configure/Adjustkey table"
|
|
||||||
if grep -q -E "^\s*$dkim_domain_shortname\s" $key_table_file 2>/dev/null ; then
|
|
||||||
perl -i -n -p -e "s#^\s*$dkim_domain_shortname\s.*#${dkim_domain_shortname}\t\t${dkim_domain}:${time_stamp}:${key_dir}/${time_stamp}.private#" $key_table_file 2> $log_file
|
|
||||||
if [[ $? -eq 0 ]] ; then
|
|
||||||
echo_ok
|
|
||||||
else
|
|
||||||
echo_failed
|
|
||||||
error "$(cat $log_file)"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo -e "${dkim_domain_shortname}\t\t${dkim_domain}:${time_stamp}:${key_dir}/${time_stamp}.private" >> $key_table_file 2> $log_file
|
|
||||||
if [[ $? -eq 0 ]] ; then
|
|
||||||
echo_ok
|
|
||||||
else
|
|
||||||
echo_failed
|
|
||||||
error "$(cat $log_file)"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# - Generate TXT record for use in bind9
|
# - Generate TXT record for use in bind9
|
||||||
# -
|
# -
|
||||||
if $terminal ; then
|
if $terminal ; then
|
||||||
@ -683,6 +682,7 @@ while IFS='' read -r _line || [[ -n $_line ]] ; do
|
|||||||
done < "${key_dir}/${time_stamp}.public"
|
done < "${key_dir}/${time_stamp}.public"
|
||||||
echo " )" >> ${key_dir}/${time_stamp}.bind9
|
echo " )" >> ${key_dir}/${time_stamp}.bind9
|
||||||
echo_ok
|
echo_ok
|
||||||
|
generated_files_arr+=("${key_dir}/${time_stamp}.bind9")
|
||||||
|
|
||||||
# - Write TXT record as string for 'nsupdate'
|
# - Write TXT record as string for 'nsupdate'
|
||||||
# -
|
# -
|
||||||
@ -702,6 +702,22 @@ while IFS='' read -r _line || [[ -n $_line ]] ; do
|
|||||||
|
|
||||||
done < "${key_dir}/${time_stamp}.public"
|
done < "${key_dir}/${time_stamp}.public"
|
||||||
echo_ok
|
echo_ok
|
||||||
|
generated_files_arr+=("${key_dir}/${time_stamp}.nsupdate")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ! $update_dns ; then
|
||||||
|
blank_line
|
||||||
|
todo "Now you have to add the TXT Record to your zone file.\n\n Copy/Paste the following data:\n\n$(cat ${key_dir}/${time_stamp}.bind9)"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo -e "After adjusting your nameserver continue with this script"
|
||||||
|
echo ""
|
||||||
|
echo -n "Type <return> to continue: "
|
||||||
|
read OK
|
||||||
|
echo
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -721,9 +737,42 @@ server $dns_server
|
|||||||
zone $update_zone
|
zone $update_zone
|
||||||
key ${key_algo}:$key_name $key_secret
|
key ${key_algo}:$key_name $key_secret
|
||||||
update delete ${dkim_domain}.${update_zone}.
|
update delete ${dkim_domain}.${update_zone}.
|
||||||
update add ${dkim_domain}.${update_zone}. $ttl TXT $(cat ${key_dir}/${time_stamp}.nsupdate)
|
update add ${time_stamp}.${update_zone}. $ttl IN TXT $(cat ${key_dir}/${time_stamp}.nsupdate)
|
||||||
send
|
send
|
||||||
EOF
|
EOF
|
||||||
|
if [[ $? -eq 0 ]] ; then
|
||||||
|
echo_ok
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
error "$(cat $log_file)"
|
||||||
|
delete_generated_files
|
||||||
|
clean_up 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# - Configure OpenDKIM
|
||||||
|
# -
|
||||||
|
if $terminal ; then
|
||||||
|
echo ""
|
||||||
|
echo -e " \033[32mConfigure OpenDKIM for domain \033[37m\033[1m$dkim_domain\033[m"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# - Configure/Adjust the signing table
|
||||||
|
# -
|
||||||
|
echononl " Configure/Adjust signing table.."
|
||||||
|
if grep -q -E "^\s*\*@$dkim_domain\s" $signing_table_file 2>/dev/null ; then
|
||||||
|
perl -i -n -p -e "s/^\*@$dkim_domain\s.*/*@$dkim_domain\t$dkim_domain_shortname/" $signing_table_file 2> $log_file
|
||||||
|
if [[ $? -eq 0 ]] ; then
|
||||||
|
echo_ok
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
error "$(cat $log_file)"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -e "*@$dkim_domain\t$dkim_domain_shortname" >> $signing_table_file 2> $log_file
|
||||||
if [[ $? -eq 0 ]] ; then
|
if [[ $? -eq 0 ]] ; then
|
||||||
echo_ok
|
echo_ok
|
||||||
else
|
else
|
||||||
@ -733,27 +782,30 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
_wait=false
|
# - Configure/Adjust the key table
|
||||||
if ! $update_dns ; then
|
# -
|
||||||
blank_line
|
echononl " Configure/Adjust key table"
|
||||||
todo "Now you have to add the TXT Record to your zone file.\n\n Copy/Paste the following data:\n\n$(cat ${key_dir}/${time_stamp}.bind9)"
|
if grep -q -E "^\s*$dkim_domain_shortname\s" $key_table_file 2>/dev/null ; then
|
||||||
_wait=true
|
perl -i -n -p -e "s#^\s*$dkim_domain_shortname\s.*#${dkim_domain_shortname}\t\t${dkim_domain}:${time_stamp}:${key_dir}/${time_stamp}.private#" $key_table_file 2> $log_file
|
||||||
elif [[ "$dkim_domain" != "$update_zone" ]]; then
|
if [[ $? -eq 0 ]] ; then
|
||||||
if [[ -z "$(dig +short ${time_stamp}._domainkey.${dkim_domain}. CNAME)" ]]; then
|
echo_ok
|
||||||
blank_line
|
else
|
||||||
todo "Create a CNAME Record to your zone file.\n\n $cname_record"
|
echo_failed
|
||||||
_wait=true
|
error "$(cat $log_file)"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -e "${dkim_domain_shortname}\t\t${dkim_domain}:${time_stamp}:${key_dir}/${time_stamp}.private" >> $key_table_file 2> $log_file
|
||||||
|
if [[ $? -eq 0 ]] ; then
|
||||||
|
echo_ok
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
error "$(cat $log_file)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! $BATCH_MODE && $_wait ; then
|
echononl " Adjust file ${key_dir}/generated_keys.selectors"
|
||||||
echo ""
|
echo "${time_stamp}" >> ${key_dir}/generated_keys.selectors
|
||||||
echo -e "After adjusting your nameserver continue with this script"
|
echo_done
|
||||||
echo ""
|
|
||||||
echo -n "Type <return> to continue: "
|
|
||||||
read OK
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# - Restart OpenDKIM
|
# - Restart OpenDKIM
|
||||||
@ -787,6 +839,20 @@ if [[ -n "$log_file" ]]; then
|
|||||||
rm -f "$log_file"
|
rm -f "$log_file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if $terminal ; then
|
||||||
|
info "DKIM Key for domain \033[1m${dkim_domain}\033[m created/updated."
|
||||||
|
if $update_dns ; then
|
||||||
|
info "DKIM TXT Record with selector \033[1m$time_stamp\033[m created."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo " [ Info ] DKIM Key for domain ${dkim_domain} created/updated."
|
||||||
|
echo ""
|
||||||
|
echo " [ Info ] DKIM TXT Record with selector $time_stamp created."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
blank_line
|
blank_line
|
||||||
clean_up 0
|
clean_up 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user