Unable to send emails through Gmail

Hi,

Basically I’m trying to send emails through Gmail without any success :frowning:

These are my settings -
Mail server = smtp.gmail.com
Port = 465 / 587 I tried both
Username = My Gmail address
Password = My Gmail password
Sender = My Gmail address
Send mails with SSL/TLS = Yes
Check certificate = Yes / No I tried both
Server admin address = My Gmail address

When I use port 465, it took a while to respond with error 56 “Response reading failed”.

When I use port 587, it comes back straightaway with error 67 “Login defined”.

Any ideas what it could be please? I can send emails through Gmail SMTP with other applications (e.g. FreeNAS).

Thanks.

EDIT - “Login DENIED” not defined

Can you try if you get it to work directly with curl? https://ec.haxx.se/usingcurl-smtp.html

Check your email.
Google may have blocked the sign in attempt.
If it has you may have to turn on support for ‘less secure apps’. (in the google account settings)

It is resolved now.

I am really sorry I forgot that Gmail uses a different separate password for apps that don’t support 2-factor authentication.

I am having a similar issue on my system that has been sending emails without issue for a long time. And then one day, it stopped sending emails and hasn’t sent one since. I can send test emails just fine using several different email addresses/servers settings, but it won’t voluntarily email the logs after any backups complete. How is the email test not using the same smtp settings?

UrBackup 2.1.19 on WinSvr2016

Found the server log for when the emails started to fail. Normally there would be (5) emails per weekday, one for each inc backup completed and then (3) emails on each full backup weekend day (the 6th client only does full backup on weekend). As the log shows, it started failing some of the emails for a few days before failing on all attempts.

Wednesday: got 3 emails, 2 fails.
2017-10-11 18:29:49: WARNING: Sending mail failed. Failure when receiving data from the peer(ec=56),
2017-10-11 19:59:52: WARNING: Sending mail failed. Failure when receiving data from the peer(ec=56),
Thursday: received all 5 emails.

No email failures.
Friday: got 4 emails, 1 fail.
2017-10-13 20:11:14: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550
Saturday: no emails
2017-10-14 08:09:30: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550
2017-10-14 11:19:08: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550
2017-10-14 20:20:47: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550
Sunday: no emails
2017-10-15 04:50:16: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550
2017-10-15 10:23:24: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550
2017-10-15 14:45:27: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550
Monday: no emails
2017-10-16 17:03:36: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550
2017-10-16 17:12:50: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550
2017-10-16 17:31:30: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550
2017-10-16 18:10:01: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550
2017-10-16 19:56:05: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550
Tuesday: no emails
2017-10-17 17:04:26: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 555
2017-10-17 17:26:13: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 555
2017-10-17 17:36:46: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 555
2017-10-17 18:14:36: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550
2017-10-17 19:57:55: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 550

The log from then on repeats with all failures for each day, until…

2017-10-29 07:33:48: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 555
2017-10-29 10:11:43: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 555
2017-10-29 15:08:25: WARNING: Sending mail failed. Failed sending data to the peer(ec=55), RCPT failed: 555

The “failed” code changed to “555” for some reason. No configuration changes were made to UrBackup during this time.

Any ideas where to look next? Thanks.

wywywywy : could you give more details of what you did ? Have same problem. Thanks.

Yes sure.

  1. Go to https://myaccount.google.com/security
  2. Go to the App Passwords section
  3. Generate a new password
  4. Use this password in UrBackup, instead of your usual password

Remember once generated, you cannot view or change the password any more. So keep it in your password manager. Also for security reason, generate a password for each app you want to use.

Thanks for your answer but I cannot find section “App Passwords” under the security tab (which is actually named “Sign-in & security”).
I have “Apps with account access” but it doesn’t allow for any password adding. By the way, 2-step verification is not activated on my account.

EDIT: Problem resolved : use of TLS (port 587) instead of SSL (port 525)…

1 Like

Just adding this so that people will get past this:

Urbackup Email settings:
Server name - smtp.gmail.com
Port - TLS (port 587)
username - your gmail address
Password - gmail password (if you use 2-factor auth, you will need an app password)
Sender email - your gmail address
Send mails only with SSL/TLS: enabled

Hi all,

Sorry for opening an old thread. I’m also getting “Less secure app blocked” message from Gmail.

Want to understand the root cause of this error (instead of blindly enabling “less secure apps” support)

By the sound of it, Gmail is blocking connection attempts using outdated versions of SSL/TLS - “Google blocked the app that you were trying to use because it doesn’t meet our security standards.”

Can anyone share what version of OpenSSL UrBackup is built against? I’m running UrBackup 2.2.10 (packaged in OpenMediaVault)

Regards,
N.

It uses the system openssl/gnutls. See on Debian Linux e.g. with dpkg --list | grep openssl / dpkg --list | grep libcurl

1 Like

After that Still showing error