setup-email-pve.sh aktualisiert
This commit is contained in:
@@ -5,31 +5,23 @@ CFG="/etc/pve/notifications.cfg"
|
|||||||
BACKUP="/etc/pve/notifications.cfg.bak.$(date +%Y%m%d%H%M%S)"
|
BACKUP="/etc/pve/notifications.cfg.bak.$(date +%Y%m%d%H%M%S)"
|
||||||
|
|
||||||
cp "$CFG" "$BACKUP"
|
cp "$CFG" "$BACKUP"
|
||||||
echo "Backup angelegt: $BACKUP"
|
echo "Backup erstellt: $BACKUP"
|
||||||
|
|
||||||
read -rp "Author (z.B. MH-PVE02 | MAIERHOME H33): " AUTHOR
|
cat > "$CFG" << 'EOF'
|
||||||
read -rp "From-Address (z.B. MH-PVE02@vmd55888.de): " FROMADDR
|
|
||||||
read -rp "SMTP Server (z.B. mail.vmd55888.de): " SERVER
|
|
||||||
read -rp "SMTP Port (z.B. 587): " PORT
|
|
||||||
read -rp "Mode (starttls/ssl/none): " MODE
|
|
||||||
read -rp "Username: " USERNAME
|
|
||||||
read -rp "Mailto Adresse: " MAILTO
|
|
||||||
|
|
||||||
cat > "$CFG" <<EOF
|
|
||||||
sendmail: mail-to-root
|
sendmail: mail-to-root
|
||||||
comment Send mails to root@pam's email address
|
comment Send mails to root@pam's email address
|
||||||
disable false
|
disable false
|
||||||
mailto-user root@pam
|
mailto-user root@pam
|
||||||
|
|
||||||
smtp: mailout
|
smtp: mailout
|
||||||
author $AUTHOR
|
author MH-PVE02 | MAIERHOME H33
|
||||||
from-address $FROMADDR
|
from-address MH-PVE02@vmd55888.de
|
||||||
mailto $MAILTO
|
mailto pbs-dashboard@mail.vmd55888.de
|
||||||
mailto-user root@pam
|
mailto-user root@pam
|
||||||
mode $MODE
|
mode starttls
|
||||||
port $PORT
|
port 587
|
||||||
server $SERVER
|
server mail.vmd55888.de
|
||||||
username $USERNAME
|
username mailout
|
||||||
|
|
||||||
matcher: default-matcher
|
matcher: default-matcher
|
||||||
comment Route all notifications to mail-to-root
|
comment Route all notifications to mail-to-root
|
||||||
@@ -41,4 +33,4 @@ policy: default
|
|||||||
targets mail-to-root
|
targets mail-to-root
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "Config geschrieben. Bitte Passwort manuell in der WebUI setzen."
|
echo "Config geschrieben. Passwort bitte manuell in WebUI setzen."
|
||||||
|
|||||||
Reference in New Issue
Block a user