Solved e-mail not working in luckyBackup app with smtp-cli app

luckyBackup options pane for e-mail settings showing the command and various parameters that have been set. It also lists some options that be set with text options for sender address, smtp server, and text body.

I love the free and open source luckyBackup app for doing rsync backups of my user data, as rsync is fast and reliable, and you can easily verify seeing your files that are backed up. I’ve been using luckyBackup for many years now, despite it no longer being supported from about 12 years ago (little has changed with regards to rsync, which it uses, and rsync updates still).

The only problem I, and many others had, was when Google tightened up their SMTP access for sending of mail. We started getting authentication errors for SMTP logins with app passwords. But I’d seen many complain but no easy solution was ever mentioned for luckyBackup, which executes a command line execution to send the logs via e-mail.

This week it became critical as I noticed my backups stopped running a few days ago, and of course, I got no error e-mail. I looked to using Duplicati backup now which is really excellent and saves masses of space, but it is horribly slow, especially on the first run. For my 1.1 TB of data it has now been running nearly 24 hours and it has 230 GB still to go!

So, a renewed effort on luckyBackup finally found a breakthrough. I looked at alternative CLI mail command apps and actually got ssmtp to work, by adding an option AuthMethod=LOGIN. This got me to realise that of course GMail’s (and some other SMTP servers) are not always standard. But the ssmtp app does not execute properly from within luckyBackup.

Then I came upon a comment in a post where someone said they had created an open-source app called smtp-cli for the command line, and it also did some diagnostics along with some optional parameters including also an option --auth-login. And it worked, including inside of luckyBackup!

The app only had updates done 5 years ago, but I see various issues have been closed, and more than once it was said no update was actually required as users can use the numerous parameters to control various issues. It also has a --verbose option to give lots of feedback on its progress or issues.

This app is also pretty useful if you’re having any issue with e-mailing from cron jobs as it will handle that job pretty well too.

I just wish I’d come across this app sooner!

See https://github.com/mludvig/smtp-cli