Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMTP authentication method(loginauth) #40817

Closed
cfclong opened this issue Aug 16, 2020 · 8 comments
Closed

SMTP authentication method(loginauth) #40817

cfclong opened this issue Aug 16, 2020 · 8 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@cfclong
Copy link

cfclong commented Aug 16, 2020

What version of Go are you using (go version)?

$ go version
go version go1.13.4 windows/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\15737\AppData\Local\go-build
set GOENV=C:\Users\15737\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\15737\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=D:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=D:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\15737\AppData\Local\Temp\go-build883883038=/tmp/go-build -gno-record-gcc-switches

What did you do?

I just added an authentication method: loginAuth

What did you expect to see?

I hope that the official can provide the authentication method of SMTP

What did you see instead?

Lack of an authentication method of SMTP

@davecheney
Copy link
Contributor

Would you be able to link to the rfc that describes loginAuth authentication. Thank you

@dmitshur dmitshur added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 18, 2020
@dmitshur
Copy link
Contributor

Is this issue about the net/smtp package or something else?

@david7482
Copy link

I could only find this obsoleted RFC for the AUTH LOGIN mechanism.
https://www.ietf.org/archive/id/draft-murchison-sasl-login-00.txt

In section 1, it mentioned:

The LOGIN SASL mechanism is obsoleted in favor of the PLAIN
SASL mechanism ([PLAIN]). The LOGIN mechanism is documented here
only for the purpose of backwards compatibility with legacy software.
Clients SHOULD implement the PLAIN SASL mechanism and use it whenever
offered by a server. The LOGIN SASL mechanism SHOULD NOT be used by
a client when other plaintext mechanisms are offered by a server.

Although this is obsoleted SMTP auth mechanism, it is still widely supported by SMTP servers, eg., smtp.gmail.com, smtp.mail.yahoo.com, smtp.outlook.office365.com for backward compatibility.

@davecheney
Copy link
Contributor

Thanks for checking. It looks like this is an obsolete server side authentication mechanism, however net/smtp only supplies a client.

@cfclong could you please explain why you need to use this auth method

@david7482
Copy link

Client side also needs to implement this authentication mechanism which is similar with the plainAuth:

func PlainAuth(identity, username, password, host string) Auth {

My use case is working on a SMTP client needs to authenticate with some legacy SMTP servers which only support this AUTH LOGIN mechanism.

I understand application could implement its own LoginAuth and just need to fulfill the Auth interface. But, it’s still useful to have this natively out of box.

@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@jandersonbt
Copy link

I am requesting that this issue be reopened and implemented. The AUTH LOGIN standard is very much alive as was pointed out by @david7482. AUTH PLAIN is actually no longer supported by outlook.com, as I just discovered with a project I am currently working on. Office365 SMTP servers don't support it either. I was able to easily add AUTH LOGIN to my project following this post, but I completely agree with previous comments that this should be supported in the net/smtp package. Below is a great reference for how the different types of SMTP authentication work. Between this and the other links I have provided someone should be able to easily implement a AUTH LOGIN method into the net/smtp package.
https://www.samlogic.net/articles/smtp-commands-reference-auth.htm

@ianlancetaylor ianlancetaylor added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jun 7, 2021
@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Jun 7, 2021
@ianlancetaylor
Copy link
Contributor

Reopening.

@golang golang locked and limited conversation to collaborators Jun 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

7 participants