Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up emails for successful/failed backup isn't easy, and give me some warning after several tries #123

Closed
MilesTEG1 opened this issue Aug 23, 2023 · 6 comments

Comments

@MilesTEG1
Copy link

Hello,
I wanted to setup the email notifications, so set the SMTP env var.
For now, I want to use gmail.
I succeed to get an email after a backup, but I have some warnings in the log:

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

Here what I have achieved to have an email sent:
(I use version: "2.4" for the docker-compose.yml file)

      - 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

And here the env var setup in Portainer from a .env file:
image

How can I get rid of the warnings?

Thanks in advance

@ttionya
Copy link
Owner

ttionya commented Aug 24, 2023

Starting from v1.19.0, we are using s-nail instead of heirloom-mailx. s-nail is warning users to switch to their new MTA credential verification method. For more detailed information, please refer to the #117 .

@MilesTEG1
Copy link
Author

@ttionya Hello,
I know about the change form heirloom-mailx to s-nail, I read the #117 and according to the doc here, I set the env variables accordingly to what you wrote (as you can see on my first post above).

What I don't understand is this: do your instructions in the repository are accurate to the changes starting from v1.19.0 and the new MTA credential verification method used by s-nail?

And, how to get rid of the warnings?
I don't understand the s-nail doc as it's not very readable nor well explained...
Could you help me?
(I know another user has the same interrogations and the same warning in the log.)

@ttionya
Copy link
Owner

ttionya commented Aug 24, 2023

In order to prevent users from needing to reconfigure their email due to switching the email sending tool, we aim to avoid disruptive changes as much as possible. Additionally, we won't upgrade to the MTA-only versions of s-nail v15 or v14.10. Therefore, in the documentation, I haven't suggested that users switch to MTA credentials. Users can choose to use either the old-style credentials or the new MTA credentials based on whether they are concerned about the warning messages.

I haven't tried MTA credential verification either. I will attempt this after my work hours.

@MilesTEG1
Copy link
Author

I haven't tried MTA credential verification either. I will attempt this after my work hours.

Thanks in advance 😄

@ttionya
Copy link
Owner

ttionya commented Aug 24, 2023

See #117 (comment)

@MilesTEG1
Copy link
Author

thanks, I'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants