- BACKUP_FILE_DATE=%d-%m-%Y--%Hh%Mm%Ss
- BACKUP_KEEP_DAYS=7
- MAIL_SMTP_ENABLE=TRUE
- MAIL_SMTP_VARIABLES='-S smtp-use-starttls -S smtp=smtp.free.fr:587 -S smtp-auth-user=xxxx.xxxx@free.fr -S smtp-auth- password=xxxxxxxxx -S from=toto@free.fr'
- MAIL_TO='toto@laposte.net'
- MAIL_WHEN_SUCCESS=TRUE
- MAIL_WHEN_FAILURE=TRUE
- TIMEZONE=Europe/Paris
sudo docker run --rm -it -e MAIL_SMTP_VARIABLES='-S smtp-use-starttls -S mta=smtp://smtp.free.fr:587 -S smtp-auth-password=xxxxxxxx -S from=xxxxx.xxxx@free.fr' -e MAIL_TO='toto@free.fr' ttionya/vaultwarden-backup:latest mail
mail send was successfully
smtp-auth- password=xxxxxxxxx
--> smtp-auth-password=xxxxxxxxx
mail: '"-S' is an invalid alias name
mail: -S is an invalid alias name
mail: smtp=smtp://smtp.gmail.com:465: *expandaddr* does not allow file target
mail: smtp-auth=login is an invalid alias name
mail: smtp-auth-password=MONMDP is an invalid alias name
/root/dead.letter 9/312
sendmail: can't connect to remote host (127.0.0.1): Connection refused
/root/dead.letter 9/312
mail: ... message not sent
mail sending failed
- MAIL_SMTP_VARIABLES="-S smtp-use-starttls -S smtp=smtp://${SMTP_HOST}:${SMTP_PORT} -S smtp-auth=login -S smtp-auth-user=${SMTP_USERNAME} -S smtp-auth-password=${SMTP_PASSWORD} -S from=${SMTP_FROM}"
docker-compose.yml
: - MAIL_SMTP_ENABLE=TRUE
- MAIL_SMTP_VARIABLES=-S smtp-use-starttls -S smtp=smtp://${SMTP_HOST}:${SMTP_PORT_STARTTLS} -S smtp-auth=login -S smtp-auth-user=${SMTP_USERNAME} -S smtp-auth-password=${SMTP_PASSWORD} -S from=${SMTP_FROM}
- MAIL_TO=${SMTP_FROM}
- MAIL_WHEN_SUCCESS='TRUE'
- MAIL_WHEN_FAILURE='TRUE'
# Variables SMTP utilisées pour Vaultwarden
# - SMTP_HOST=$SMTP_HOST
# - SMTP_PORT=$SMTP_PORT
# - SMTP_SECURITY=$SMTP_SECURITY
# - SMTP_USERNAME=$SMTP_USERNAME
# - SMTP_PASSWORD=$SMTP_PASSWORD
# - SMTP_FROM=$SMTP_FROM
# - SMTP_FROM_NAME=$SMTP_FROM_NAME
upload backup file to storage system [Backup_Syno:/rclone_backup]
delete 31 days ago backup files [Backup_Syno:/rclone_backup]
mail: Warning: variable superseded or obsoleted: smtp
mail: Warning: variable superseded or obsoleted: smtp-auth-user
mail: Warning: variable superseded or obsoleted: smtp-auth-password
mail: Obsoletion warning: please do not use *smtp*, instead assign a smtp:// URL to *mta*!
mail: Obsoletion warning: Use of old-style credentials, which will vanish in v15!
mail: Please read the manual section "On URL syntax and credential lookup"
mail send was successfully
mail: Warning: variable superseded or obsoleted: smtp
mail: Warning: variable superseded or obsoleted: smtp-auth-user
mail: Warning: variable superseded or obsoleted: smtp-auth-password
mail: Obsoletion warning: please do not use *smtp*, instead assign a smtp:// URL to *mta*!
mail: Obsoletion warning: Use of old-style credentials, which will vanish in v15!
mail: Please read the manual section "On URL syntax and credential lookup"
mail send was successfully
Ok toi aussi tu as donc les mêmes warning.bonjour
ça y est ça fonctionne. Merci pour tes tests et ta réponse. Voici le résultat
Bash:mail: Warning: variable superseded or obsoleted: smtp mail: Warning: variable superseded or obsoleted: smtp-auth-user mail: Warning: variable superseded or obsoleted: smtp-auth-password mail: Obsoletion warning: please do not use *smtp*, instead assign a smtp:// URL to *mta*! mail: Obsoletion warning: Use of old-style credentials, which will vanish in v15! mail: Please read the manual section "On URL syntax and credential lookup" mail send was successfully
# ${SMTP_USERNAME_MTA} = @ devient %40 ; ici avec mon_mail@gmail.com
SMTP_USERNAME_MTA=mon_mail%40gmail.com
# /!\ Vieille variable MAIL_SMTP_VARIABLES, encore fonctionnelle, mais générant des alertes (warning)
# - MAIL_SMTP_VARIABLES=-S smtp-use-starttls -S smtp=smtp://${SMTP_HOST}:${SMTP_PORT_STARTTLS} -S smtp-auth=login -S smtp-auth-user=${SMTP_USERNAME} -S smtp-auth-password=${SMTP_PASSWORD} -S from=${SMTP_FROM}
# /!\ Nouvelle variable MAIL_SMTP_VARIABLES : Conversion vers MTA
# Attention : @ => %40
- MAIL_SMTP_VARIABLES=-S v15-compat -S smtp-use-starttls -S mta=smtp://${SMTP_USERNAME_MTA}:${SMTP_PASSWORD}@${SMTP_HOST}:${SMTP_PORT_STARTTLS} -S smtp-auth=login -S from=${SMTP_FROM}
Hello @ADQB-PandaJe me suis même permis d'adapter le script pour ne plus être obligé de passer les 3 arguments.