diff options
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | go.sum | 4 | ||||
-rw-r--r-- | main.go | 1 | ||||
-rw-r--r-- | serve_imap.go | 39 |
4 files changed, 0 insertions, 46 deletions
@@ -3,13 +3,11 @@ module go.lindenii.runxiyu.org/maild go 1.23.4 require ( - github.com/emersion/go-imap/v2 v2.0.0-beta.4 github.com/jackc/pgx/v5 v5.7.2 go.lindenii.runxiyu.org/lindenii-common v0.0.0-20250113062520-2daa71bfa256 ) require ( - github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect @@ -1,10 +1,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emersion/go-imap/v2 v2.0.0-beta.4 h1:BS7+kUVhe/jfuFWgn8li0AbCKBIDoNvqJWsRJppltcc= -github.com/emersion/go-imap/v2 v2.0.0-beta.4/go.mod h1:BZTFHsS1hmgBkFlHqbxGLXk2hnRqTItUgwjSSCsYNAk= -github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43 h1:hH4PQfOndHDlpzYfLAAfl63E8Le6F2+EL/cdhlkyRJY= -github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43/go.mod h1:iL2twTeMvZnrg54ZoPDNfJaJaqy0xIQFuBdrLsmspwQ= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= @@ -17,7 +17,6 @@ func main() { clog.Fatal(1, "Error while loading configuration file: "+err.Error()) } - go serve_imap() go serve_mx() deadlock := make(chan struct{}) diff --git a/serve_imap.go b/serve_imap.go deleted file mode 100644 index 5337570..0000000 --- a/serve_imap.go +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import ( - "crypto/tls" - - "github.com/emersion/go-imap/v2" - "github.com/emersion/go-imap/v2/imapserver" - "go.lindenii.runxiyu.org/lindenii-common/clog" -) - -func serve_imap() { - var tls_config *tls.Config - var imap_net, imap_addr string - config_consistent_run(func() { - tls_config = config._tls_config - imap_net = config.IMAP.Net - imap_addr = config.IMAP.Addr - }) - listener, err := tls.Listen(imap_net, imap_addr, tls_config) - if err != nil { - clog.Fatal(1, "IMAP: Cannot listen TLS: "+err.Error()) - } - clog.Info("IMAP: Listening via " + imap_net + " on " + imap_addr) - - server := imapserver.New(&imapserver.Options{ - NewSession: func(conn *imapserver.Conn) (imapserver.Session, *imapserver.GreetingData, error) { - return nil, nil, nil - }, - Caps: imap.CapSet{ - imap.CapIMAP4rev1: {}, - imap.CapIMAP4rev2: {}, - }, - DebugWriter: nil, // TODO - }) - err = server.Serve(listener) - if err != nil { - clog.Fatal(1, "IMAP: Failed serving: "+err.Error()) - } -} |