aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/server.go b/server.go
index 267f6ad..a59c0e4 100644
--- a/server.go
+++ b/server.go
@@ -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
}