code: func (srv *Server) Serve(l net.Listener) error {
  
  	srv.configureDefaults()
  
  	defer l.Close()
  
  	var limiter chan struct{}
  
  	if srv.MaxConnections > 0 {
  		limiter = make(chan struct{}, srv.MaxConnections)
  	} else {
  		limiter = nil
  	}
  
  	for {
  
  		conn, e := l.Accept()
  		if e != nil {
  			if ne, ok := e.(net.Error); ok && ne.Temporary() {
  				time.Sleep(time.Second)
  				continue
  			}
  			return e
  		}
  
  		session := srv.newSession(conn)
  
  		if limiter != nil {
  			go func() {
  				select {
  				case limiter <- struct{}{}:
  					session.serve()
  					<-limiter
  				default:
  					session.reject()
  				}
  			}()
  		} else {
  			go session.serve()
  		}
  
  	}
  
  }
docs: // Serve starts the SMTP server and listens on the Listener provided