Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Go library implementing client and server side of Dovecot authentication protocol 1.1

License

NotificationsYou must be signed in to change notification settings

foxcpp/go-dovecot-sasl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go.dev reference

Go library implementing Dovecot authentication protocol 1.1.The library is based onemersion/go-sasl.

Examples

Client

s,err:=net.Dial("unix","/var/lib/dovecot/sasl.sock")iferr!=nil {// Handle error.}cl:=dovecotsasl.NewClient(s)err:=cl.Do("SMTP",sasl.NewPlainClient("","foxcpp","1234"),dovecotsasl.RemoteIP(net.IPv4(1,2,3,4)),dovecotsasl.Secured,)iferr!=nil {// Nope!}// Authenticated!

Server

l,err:=net.Listen("unix","/var/lib/maddy/sasl.sock")iferr!=nil {// Handle error.}varauthenticator sasl.PlainAuthenticator=func(_,user,passstring)error {ifuser=="foxcpp"&&pass=="1234" {returnnil    }returnerrors.New("nope!")}s:=NewServer()s.AddMechanism("PLAIN", dovecotsasl.Mechanism{},func(*dovecotsasl.AuthReq) sasl.Server {returnsasl.NewPlainServer(authenticator)    })gos.Serve(l)

License

MIT.

About

Go library implementing client and server side of Dovecot authentication protocol 1.1

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp