|
@@ -125,19 +125,19 @@ while true; do
|
|
|
;;
|
|
|
esac
|
|
|
done
|
|
|
-if [ -z $to ];then
|
|
|
+if [ -z $to ] && [ $email = true ];then
|
|
|
echo -en "WARNING: El envio de correo está desactivado (Compruebe comfiguración).\n"
|
|
|
email=false
|
|
|
fi
|
|
|
-if [ -z $from ];then
|
|
|
+if [ -z $from ] && [ $mail = true ];then
|
|
|
echo -en "WARNING: El envio de correo está desactivado (Compruebe comfiguración).\n"
|
|
|
email=false
|
|
|
fi
|
|
|
-if [ -z $password ];then
|
|
|
+if [ -z $password ] && [ $email = true ];then
|
|
|
echo -en "WARNING: El envio de correo está desactivado (Compruebe comfiguración).\n"
|
|
|
email=false
|
|
|
fi
|
|
|
-if [ -z $host ];then
|
|
|
+if [ -z $host ] && [ $email = true ];then
|
|
|
host=$(echo "$from" | cut -d '@' -f 2)
|
|
|
host=$(dig -t MX "$host" +short | cut -d ' ' -f 2 | sed 's/.$//' | head -1)
|
|
|
if [ -z $host];then
|