LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Using sendmail with gmail (https://www.linuxquestions.org/questions/linux-software-2/using-sendmail-with-gmail-4175712857/)

RandomTroll 06-01-2022 06:27 AM

Using sendmail with gmail
 
I tried to relay an e-mail through gmail June 1. gmail responds:
Quote:

050 535-5.7.8 Username and Password not accepted. Learn more at
050 535 5.7.8 https://support.google.com/mail/?p=BadCredentials p15-20020a635b0f000000b003fc4894c270sm1081442pgb.69 - gsmtp
which doesn't help. The Username and Password are correct: I can log in with them on my browser.

Has anyone made this work?

michaelk 06-01-2022 08:17 AM

As far as I know google has turned off use less secure apps for most users as of 30 May. Here is is a workaround.

https://wiki.archlinux.org/title/msmtp

I have mutt working with oauth2...

cwizardone 06-01-2022 08:28 AM

This might help, https://support.google.com/accounts/answer/6010255

RandomTroll 06-02-2022 12:38 AM

As best as I can tell, Google requires either 2-factor authentication (all of which require a telephone number, which I lack) or an authentication key, which they sell for $30. Instead I made an old account elsewhere work and gave up on gmail.

cwizardone 06-02-2022 05:36 AM

I've never given them a phone number or paid a fee.
I simply went to the settings for the account directly on their site and confirmed they were correct.

RandomTroll 06-03-2022 03:53 AM

Quote:

Originally Posted by cwizardone (Post 6358175)
I've never given them a phone number or paid a fee.
I simply went to the settings for the account directly on their site and confirmed they were correct.

Do you relay outgoing SMTP traffic through your account?

cwizardone 06-03-2022 07:27 AM

Yes.
I use Thunderbird to retrieve e-mail from their server and to send e-mail.
In Thunderbird, under outgoing server (smtp) settings,
it is,
description = whatever name you use
server name = smtp.gmail.com
port = 465
user name = your gmail account user name
authorization method = OAuth2
connection security = SSL/TLS

uteck 06-03-2022 08:52 AM

Google's use of 2FA breaks lots of programs, but they do have an option to make an App Password for that app.
Use the link in post #3, scroll down to the bottom to get info on setting one up. I used it to send a monthly email from one of may gmail accounts when the old company email stopped working when it was sold and the new company helpless desk could not help.

RandomTroll 06-03-2022 11:52 PM

Quote:

Originally Posted by uteck (Post 6358414)
Google's use of 2FA breaks lots of programs, but they do have an option to make an App Password for that app.
Use the link in post #3, scroll down to the bottom to get info on setting one up.

I tried that before I asked the question. The option to create an app password isn't there. They tell me that I need to use 2FA to create an app password. When I try to set up 2FA it requires: a phone, or phone number to send a text message or call to, or a security key. How do you get away without this?


All times are GMT -5. The time now is 04:38 AM.