mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-25 11:13:12 +02:00
allow custom e-mail server port for notify (#2700)
This commit is contained in:
@@ -36,6 +36,10 @@ if ! grep -Eq "^notifyMailServer=.*" /mnt/hdd/raspiblitz.conf; then
|
|||||||
echo "notifyMailServer=mail.example.com" | sudo tee -a /mnt/hdd/raspiblitz.conf >/dev/null
|
echo "notifyMailServer=mail.example.com" | sudo tee -a /mnt/hdd/raspiblitz.conf >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! grep -Eq "^notifyMailPort=.*" /mnt/hdd/raspiblitz.conf; then
|
||||||
|
echo "notifyMailPort=587" | sudo tee -a /mnt/hdd/raspiblitz.conf >/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
if ! grep -Eq "^notifyMailHostname=.*" /mnt/hdd/raspiblitz.conf; then
|
if ! grep -Eq "^notifyMailHostname=.*" /mnt/hdd/raspiblitz.conf; then
|
||||||
echo "notifyMailHostname=$(hostname)" | sudo tee -a /mnt/hdd/raspiblitz.conf >/dev/null
|
echo "notifyMailHostname=$(hostname)" | sudo tee -a /mnt/hdd/raspiblitz.conf >/dev/null
|
||||||
fi
|
fi
|
||||||
@@ -92,12 +96,12 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
cat << EOF | sudo tee /etc/msmtprc >/dev/null
|
cat << EOF | sudo tee /etc/msmtprc >/dev/null
|
||||||
# Set default values for all following accounts.
|
# Set default values for all following accounts.
|
||||||
defaults
|
defaults
|
||||||
port 587
|
|
||||||
tls on
|
tls on
|
||||||
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
||||||
|
|
||||||
account mail
|
account mail
|
||||||
host ${notifyMailServer}
|
host ${notifyMailServer}
|
||||||
|
port ${notifyMailPort}
|
||||||
from ${notifyMailFromAddress}
|
from ${notifyMailFromAddress}
|
||||||
auth on
|
auth on
|
||||||
user ${notifyMailUser}
|
user ${notifyMailUser}
|
||||||
|
Reference in New Issue
Block a user