Hello Adolf,
thx a lot for this link.
I was able to solve my problem.
I removed in /var/ipfire/dma/dma.conf
MASQUERADE vorname.nachname@gmx.at
with this entry System | Mail Service [Send test mail] did not work anymore.
this is my bash script:
#/bin/bash
IP=$(/sbin/ip address | /bin/grep inet | /bin/grep red0 | /usr/bin/cut -b 10-22)
IP_alt=$(/bin/cat /root/mail/ip_red_alt)
/bin/echo $IP
/bin/echo $IP_alt
if [[ "$IP" != "$IP_alt" ]]; then
echo "IP address change!";
echo $IP > /root/mail/ip_red_alt
SUBJECT="IP Adresse: "$IP
FROM="alexander.kratky@gmx.at"
TO="alexander.kratky@gmx.at"
(
echo From: $FROM
echo To: $TO
echo Subject: $SUBJECT
) | sudo -u nobody /usr/sbin/sendmail -t -f $FROM
else
echo "IP address did not change!";
fi
exit 0
in the subject of the mail I find my IP Address.
I was not able to send also a mail body.
But I’ve my information …
EDIT: moderator formatted code block