diff --git a/smtpd.go b/smtpd.go index ca7ac31..516fcea 100644 --- a/smtpd.go +++ b/smtpd.go @@ -236,6 +236,11 @@ func (srv *Server) Shutdown() error { return lnerr } +// Address returns the listening address of the server +func (srv *Server) Address() net.Addr { + return (*srv.listener).Addr(); +} + func (srv *Server) configureDefaults() { if srv.MaxMessageSize == 0 {