diff --git a/server/server.go b/server/server.go
index 47d4f19fae75d5d0713f3458b122fac09d6e448a..52c1c853dffb8c390cce72073afa6a7f9e563d1a 100644
--- a/server/server.go
+++ b/server/server.go
@@ -735,8 +735,11 @@ func (s *Server) updateStatsAndPrune() {
 		messages += msgs
 	}
 
-	// Mail
-	mailSuccess, mailFailure := s.smtpBackend.Counts()
+	// Mail stats
+	var mailSuccess, mailFailure int64
+	if s.smtpBackend != nil {
+		mailSuccess, mailFailure = s.smtpBackend.Counts()
+	}
 
 	// Print stats
 	log.Printf("Stats: %d message(s) published, %d in cache, %d successful mails, %d failed, %d topic(s) active, %d subscriber(s), %d visitor(s)",