iprecMX=$(curl -s -X POST https://dnsapi.cn/Record.Info -d "login_token=${ID},${Token}&format=json&domain_id=${Domain_id}&record_id=${RecordMX_id}" | jq .record.value | sed 's/\"//g;s/.$//')
if [ ${iprecMX} != 'null' ]; then
if [ "${myip}" != "${iprecMX}" ]; then
DNSstatus=$(curl -X POST https://dnsapi.cn/Record.Modify -d "login_token=${ID},${Token}&format=json&domain_id=${Domain_id}&record_id=${RecordMX_id}&value=${myip}&record_type=MX&mx=5&record_line_id=0" | jq .status.message)
echo "${DNSstatus} 您的域名 MX=5记录更新"
else
echo "您的域名 MX=5记录 无需更新"
fi
else
echo 'No Record Info'
fi