- Notifications
You must be signed in to change notification settings - Fork1
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
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Go library implementing Dovecot authentication protocol 1.1.The library is based onemersion/go-sasl.
- Specification:https://wiki.dovecot.org/Design/AuthProtocol
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!
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)
MIT.
About
Go library implementing client and server side of Dovecot authentication protocol 1.1
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published