I think that I set it up correctly, but after the backup finished I got the following error:
I’m guessing that my gmail setup is different than the standard (probably because I use my own domain instead of gmail.com).
I set up email on TrueNAS recently. They supported using Google OAuth instead of requiring the password. I’m not sure how complicated that is, but might be worth investigating.
2024-06-05 16:55:08 -04 - [Warning-Duplicati.Library.Modules.Builtin.ReportHelper-ReportSubmitError]: Failed to send message: MailKit.Security.AuthenticationException: 534: 5.7.9 Application-specific password required. For more information, go to 5.7.9 Sign in with app passwords - Google Account Help 71dfb90a1353d-4eb4ad32a21sm5103e0c.35 - gsmtp → MailKit.Net.Smtp.SmtpCommandException:
Soon we’ll start automatically enrolling users in 2SV if their accounts are appropriately configured.
How we get along with OAuth is Duplicati’s scheme, whereas TrueNAS probably uses local storage.
The OAuth server is due for a move, but is currently at https://duplicati-oauth-handler.appspot.com/.
You can see the Destination storage providers that it supports, but I don’t think it now supports email.
In order to have Duplicati send email via a Gmail account you’ll need to set up an App Password. This is necessary because Google doesn’t allow your account credentials to be used for anything that doesn’t support enhanced authentication (OAuth). Duplicati supports OAuth for the purposes of using Google Drive as a destination, but not for the purposes of sending email.
To do this, navigate into your Google Account settings and search for “App Passwords” (I’ve never been able to find it any other way).
Once there you’ll be asked to provide a name for this App Password. It’s just a label so you can identify it later.
Then, when you are setting up Duplicati to send email via Gmail, use this password instead of your real Gmail password.
If I recall correctly, Google will require you to set up 2FA before it allows you to make app passwords, but I suspect that nearly everyone will have done that by now.
If you decide later that you don’t want this App Password to exist anymore, you can delete it from the same place.
Thank you! That was the information I needed. For some reason the suggested format for -send-mail-from produced an error but changing it just to my email address worked fine. Duplicati is now set up and working great.