Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using sendmail with gmail

568 views
Skip to first unread message

Hans Conreid

unread,
Jun 1, 2022, 7:38:22 AM6/1/22
to
When I try to relay an e-mail with sendmail through gmail, beginning 2022 June 1, it returns:

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

The Username and Password are correct: I can log in with them in my browser.
How do I make this work?

Marco Moock

unread,
Jun 1, 2022, 7:45:35 AM6/1/22
to
Am Wed, 1 Jun 2022 04:38:21 -0700 (PDT)
schrieb Hans Conreid <russe...@gmail.com>:
IIRC Google changed the auth for SMTP. You need to specify an app
password in your Google account for SMTP and use that in authinfo.

The reason is that if that password is known to others, they can only
use SMTP and cannot access your entire Google account.

Hans Conreid

unread,
Jun 1, 2022, 8:25:26 AM6/1/22
to
To get an app password requires 2-step verification: I'd have to receive an e-mail and enter a key every time I send a message. Can I automate this with sendmail?

Marco Moock

unread,
Jun 1, 2022, 2:27:36 PM6/1/22
to
Is that really the case?
I don't know any way to automate that process.
I also recommend you getting another mail provider, Google will annoy
you more and more in the future with such stuff.

Hans Conreid

unread,
Jun 1, 2022, 5:28:13 PM6/1/22
to
So the instructions at gmail tell me. Someone tells me about making msmtp work using oauth2. Is there any plan to make sendmail work with oauth2? What mailer do you recommend?

Claus Aßmann

unread,
Jun 2, 2022, 12:52:38 AM6/2/22
to
sendmail uses Cyrus-SASL to implement AUTH.
So you need to check with that software whether the mechanism
is provided: maybe cyrus-sasl-xoauth2 does this?
If so, you have to add that auth plugin and give it a try.

Then look at cf/README:

Providing SMTP AUTH Data when sendmail acts as Client
-----------------------------------------------------
...
or FEATURE(`authinfo') must be used which provides a separate map.


Specify an "socketmap" for this and you can provide any info
via a process which you can write to do whatever you want/need.


--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.

Henning Hucke

unread,
Jun 2, 2022, 4:37:30 AM6/2/22
to
Hans Conreid <russe...@gmail.com> wrote:

Hello Hans,
possibly just google this issue and try the first hit:

https://www.google.com/search?q=using+sendmail+with+google+mail&newwindow=1&sxsrf=ALiCzsa9cneVt-uHVAnSG2YzzhzbUkyLCg:1654155385071&source=lnt&tbs=qdr:y&sa=X&ved=2ahUKEwiZloWBoY74AhXLR_EDHeNKD6EQpwV6BAgcEB4&biw=1541&bih=1105&dpr=1

Best regards,
Henning
--
It's from Casablanca. I've been waiting all my life to use that line.
-- Woody Allen, "Play It Again, Sam"

Grant Taylor

unread,
Jun 2, 2022, 12:45:48 PM6/2/22
to
Hi Claus,

On 6/1/22 10:52 PM, Claus Aßmann wrote:
> sendmail uses Cyrus-SASL to implement AUTH.

Are you saying that Sendmail uses Cyrus-SASL when it's acting as a
sending client talking to another upstream server / MTA / smart host?

I know that Cyrus-SASL was used when sendmail was acting as the
receiving server talking to a down stream client / MUA.



--
Grant. . . .
unix || die

Claus Aßmann

unread,
Jun 2, 2022, 1:42:16 PM6/2/22
to
Grant Taylor wrote:

> On 6/1/22 10:52 PM, Claus Aßmann wrote:
> > sendmail uses Cyrus-SASL to implement AUTH.

> Are you saying that Sendmail uses Cyrus-SASL when it's acting as a
> sending client talking to another upstream server / MTA / smart host?

I didn't limit that statement to client or server side...
0 new messages