bradfitz / go-smtpd

SMTP server library for Go
BSD 3-Clause "New" or "Revised" License
212 stars 67 forks source link

smtpd: ability to stop the server #9

Open dmitshur opened 4 years ago

dmitshur commented 4 years ago

This is a feature request. I want to find out if it's in scope for this package.

It'd be nice to be able to stop the smtpd.Server, similar to http.Server.Close and/or http.Server.Shutdown. That would make it easier to write a program that uses smtpd and can shutdown gracefully, without the risk of quitting in the middle of writing a file or so.

What do you think? /cc @bradfitz @crawshaw

bradfitz commented 4 years ago

That's fine. Not intentional or anything; this package is just super old & predates many modern conventions.