Skip to content

Commit

Permalink
fix: SMTP STARTTLS (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
nt0xa authored Sep 21, 2021
1 parent 05ca6ca commit f1a2b36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func main() {
smtpx.OnClose(func(e *smtpx.Event) {
events.Emit(server.SMTPEvent(e))
}),
smtpx.TLSConfig(tlsConfig, false),
)

if err := srv.ListenAndServe(); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/smtpx/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func (s *session) handleEhlo(args string) error {
return err
}

if s.tlsConfig == nil {
if s.tlsConfig != nil {
if err := s.writeLine("250-STARTTLS"); err != nil {
return err
}
Expand Down

0 comments on commit f1a2b36

Please sign in to comment.