diff options
-rw-r--r-- | server.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -127,6 +127,12 @@ func (s *Server) parseIMAPUpstream() error { panic("unreachable") } + c, err := s.dialIMAP() + if err != nil { + return fmt.Errorf("failed to connect to IMAP server: %v", err) + } + c.Close() + s.e.Logger.Printf("Configured upstream IMAP server: %v", u) return nil } @@ -159,6 +165,12 @@ func (s *Server) parseSMTPUpstream() error { panic("unreachable") } + c, err := s.dialSMTP() + if err != nil { + return fmt.Errorf("failed to connect to SMTP server: %v", err) + } + c.Close() + s.e.Logger.Printf("Configured upstream SMTP server: %v", u) return nil } |