simonrob/email-oauth2-proxy

SMTP< 530 5.7.57 Client not authenticated to send mail

Closed this issue · 4 comments

On an organizational Office 365 account, I'm trying to send email through Claws-Mail client with email-oauth2-proxy. The IMAP thing works fine (I can receive emails), but when I try to send an email, Claws-Mail gives me this error:

SMTP< 530 5.7.57 Client not authenticated to send mail

I'm a little hesitant to post the whole network log because I don't know which of it is my personal information. But if you let me know which part you want to know about, I can post that part here.

The bits around authentication might be the personal information you're worried about... but also in most cases they're also the main way to figure out any issues since that is the proxy's primary purpose.

Here, if I had to guess, my hunch would be that your client is not actually sending the authentication commands. Have a look at the log in debug mode to see whether you can spot AUTH PLAIN or AUTH LOGIN. If not, you need to configure it to actually do this.

@simonrob:

Here, if I had to guess, my hunch would be that your client is not actually sending the authentication commands. Have a look at the log in debug mode to see whether you can spot AUTH PLAIN or AUTH LOGIN. If not, you need to configure it to actually do this.

The network log does show a AUTH PLAIN LOGIN trace. Here is the relevant (I think) parts:

* Account 'enan@YU': Connecting to SMTP server: 127.0.0.1:1587...
[2025-01-05 16:47:58] SMTP< 220 YQBPR0101CA0294.outlook.office365.com Microsoft ESMTP MAIL Service ready at Sun, 5 Jan 2025 21:47:56 +0000 [08DD2D7591F195DA]
[2025-01-05 16:47:58] ESMTP> EHLO localhost
[2025-01-05 16:47:58] ESMTP< 250-YQBPR0101CA0294.outlook.office365.com Hello [130.63.100.46]
[2025-01-05 16:47:58] ESMTP< 250-SIZE 157286400
[2025-01-05 16:47:58] ESMTP< 250-PIPELINING
[2025-01-05 16:47:58] ESMTP< 250-DSN
[2025-01-05 16:47:58] ESMTP< 250-ENHANCEDSTATUSCODES
[2025-01-05 16:47:58] ESMTP< 250-AUTH PLAIN LOGIN
[2025-01-05 16:47:58] ESMTP< 250-8BITMIME
[2025-01-05 16:47:58] ESMTP< 250-BINARYMIME
[2025-01-05 16:47:58] ESMTP< 250-CHUNKING
[2025-01-05 16:47:58] ESMTP< 250 SMTPUTF8
[2025-01-05 16:47:58] ESMTP> MAIL FROM:<enan@myuni.ca> SIZE=281
[2025-01-05 16:48:03] SMTP< 530 5.7.57 Client not authenticated to send mail. [YQBPR0101CA0294.CANPRD01.PROD.OUTLOOK.COM 2025-01-05T21:48:02.515Z 08DD2D7591F195DA]
** error occurred on SMTP session
*** Error occurred while sending the message:
530 5.7.57 Client not authenticated to send mail. [YQBPR0101CA0294.CANPRD01.PROD.OUTLOOK.COM 2025-01-05T21:48:02.515Z 08DD2D7591F195DA]

This shows the server's response to your EHLO command (i.e., what the server supports), but there's no attempt from your side to actually authenticate before sending email (the MAIL FROM line). So, the issue is exactly as suspected, and not a problem with the proxy. Please take a look at the documentation for your email client to find out how to configure it to authenticate before sending messages.

@simonrob:

This shows the server's response to your EHLO command (i.e., what the server supports), but there's no attempt from your side to actually authenticate before sending email (the MAIL FROM line). So, the issue is exactly as suspected, and not a problem with the proxy. Please take a look at the documentation for your email client to find out how to configure it to authenticate before sending messages.

You're right (obviously). I just needed to enable SMTP authentication in my client.

Thank you for the proxy program. It makes email-handling times better.