mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 08:23:48 +03:00
add to previous commit, adding multiline smtp responses in dsn
also include api change.
This commit is contained in:
parent
50c13965a7
commit
fd359d5973
2 changed files with 6 additions and 5 deletions
|
@ -50,6 +50,7 @@ Below are the incompatible changes between v0.0.9 and v0.0.10, per package.
|
|||
|
||||
# smtpclient
|
||||
- Dial: changed from func(context.Context, *golang.org/x/exp/slog.Logger, Dialer, github.com/mjl-/mox/dns.IPDomain, []net.IP, int, map[string][]net.IP, []net.IP) (net.Conn, net.IP, error) to func(context.Context, *log/slog.Logger, Dialer, github.com/mjl-/mox/dns.IPDomain, []net.IP, int, map[string][]net.IP, []net.IP) (net.Conn, net.IP, error)
|
||||
- Error: old is comparable, new is not
|
||||
- GatherDestinations: changed from func(context.Context, *golang.org/x/exp/slog.Logger, github.com/mjl-/mox/dns.Resolver, github.com/mjl-/mox/dns.IPDomain) (bool, bool, bool, github.com/mjl-/mox/dns.Domain, []github.com/mjl-/mox/dns.IPDomain, bool, error) to func(context.Context, *log/slog.Logger, github.com/mjl-/mox/dns.Resolver, github.com/mjl-/mox/dns.IPDomain) (bool, bool, bool, github.com/mjl-/mox/dns.Domain, []github.com/mjl-/mox/dns.IPDomain, bool, error)
|
||||
- GatherIPs: changed from func(context.Context, *golang.org/x/exp/slog.Logger, github.com/mjl-/mox/dns.Resolver, github.com/mjl-/mox/dns.IPDomain, map[string][]net.IP) (bool, bool, github.com/mjl-/mox/dns.Domain, []net.IP, bool, error) to func(context.Context, *log/slog.Logger, github.com/mjl-/mox/dns.Resolver, github.com/mjl-/mox/dns.IPDomain, map[string][]net.IP) (bool, bool, github.com/mjl-/mox/dns.Domain, []net.IP, bool, error)
|
||||
- GatherTLSA: changed from func(context.Context, *golang.org/x/exp/slog.Logger, github.com/mjl-/mox/dns.Resolver, github.com/mjl-/mox/dns.Domain, bool, github.com/mjl-/mox/dns.Domain) (bool, []github.com/mjl-/adns.TLSA, github.com/mjl-/mox/dns.Domain, error) to func(context.Context, *log/slog.Logger, github.com/mjl-/mox/dns.Resolver, github.com/mjl-/mox/dns.Domain, bool, github.com/mjl-/mox/dns.Domain) (bool, []github.com/mjl-/adns.TLSA, github.com/mjl-/mox/dns.Domain, error)
|
||||
|
|
|
@ -897,16 +897,16 @@ func (c *Client) auth(auth func(mechanisms []string, cs *tls.ConnectionState) (s
|
|||
}
|
||||
name, cleartextCreds := a.Info()
|
||||
|
||||
abort := func() (int, string, string) {
|
||||
abort := func() (int, string, string, []string) {
|
||||
// Abort authentication. ../rfc/4954:193
|
||||
c.xwriteline("*")
|
||||
|
||||
// Server must respond with 501. // ../rfc/4954:195
|
||||
code, secode, firstLine, _ := c.xread()
|
||||
code, secode, firstLine, moreLines := c.xread()
|
||||
if code != smtp.C501BadParamSyntax {
|
||||
c.botched = true
|
||||
}
|
||||
return code, secode, firstLine
|
||||
return code, secode, firstLine, moreLines
|
||||
}
|
||||
|
||||
toserver, last, err := a.Next(nil)
|
||||
|
@ -952,8 +952,8 @@ func (c *Client) auth(auth func(mechanisms []string, cs *tls.ConnectionState) (s
|
|||
// For failing SCRAM, the client stops due to message about invalid proof. The
|
||||
// server still sends an authentication result (it probably should send 501
|
||||
// instead).
|
||||
xcode, xsecode, firstLine := abort()
|
||||
c.xerrorf(false, xcode, xsecode, firstLine, moreLines, "client aborted authentication: %w", err)
|
||||
xcode, xsecode, xfirstLine, xmoreLines := abort()
|
||||
c.xerrorf(false, xcode, xsecode, xfirstLine, xmoreLines, "client aborted authentication: %w", err)
|
||||
}
|
||||
c.xwriteline(base64.StdEncoding.EncodeToString(toserver))
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue