Open fredleger opened 5 years ago
When trying to use mailhog in a kuebernetes cluster i noticed the following error.
Steps to reproduce:
Mailhog -maildir-path /data
Traces:
[mailhog-7c99fd689d-jgxlj] ' mailhog-7c99fd689d-jgxlj] 2019/03/14 16:54:28 Parsing Content from string: 'Date: Thu, 14 Mar 2019 17:44:28 +0100 mailhog-7c99fd689d-jgxlj] To: contact@webofmars.com mailhog-7c99fd689d-jgxlj] From: beta@streax.io mailhog-7c99fd689d-jgxlj] Subject: test Thu, 14 Mar 2019 17:44:28 +0100 mailhog-7c99fd689d-jgxlj] Message-Id: <20190314174428.036078@localhost> mailhog-7c99fd689d-jgxlj] X-Mailer: swaks v20170101.0 jetmore.org/john/code/swaks/ mailhog-7c99fd689d-jgxlj] mailhog-7c99fd689d-jgxlj] This is a test mailing [mailhog-7c99fd689d-jgxlj] [mailhog-7c99fd689d-jgxlj] ' [mailhog-7c99fd689d-jgxlj] 2019/03/14 16:54:28 http: panic serving 127.0.0.1:60956: read /data/lost+found: is a directory [mailhog-7c99fd689d-jgxlj] goroutine 224 [running]: [mailhog-7c99fd689d-jgxlj] net/http.(*conn).serve.func1(0xc820132180) [mailhog-7c99fd689d-jgxlj] /usr/lib/go/src/net/http/server.go:1389 +0xc1 [mailhog-7c99fd689d-jgxlj] panic(0x913ae0, 0xc820124990) [mailhog-7c99fd689d-jgxlj] /usr/lib/go/src/runtime/panic.go:443 +0x4e9 [mailhog-7c99fd689d-jgxlj] github.com/mailhog/MailHog/vendor/github.com/mailhog/MailHog-Server/api.(*APIv2).messages(0xc8201aa6e0, 0x7eff6e0ef8c0, 0xc8201201a0, 0xc8201402a0) [mailhog-7c99fd689d-jgxlj] /root/gocode/src/github.com/mailhog/MailHog/vendor/github.com/mailhog/MailHog-Server/api/v2.go:110 +0x22d [mailhog-7c99fd689d-jgxlj] github.com/mailhog/MailHog/vendor/github.com/mailhog/MailHog-Server/api.(*APIv2).(github.com/mailhog/MailHog/vendor/github.com/mailhog/MailHog-Server/api.messages)-fm(0x7eff6e0ef8c0, 0xc8201201a0, 0xc8201402a0) [mailhog-7c99fd689d-jgxlj] /root/gocode/src/github.com/mailhog/MailHog/vendor/github.com/mailhog/MailHog-Server/api/v2.go:34 +0x3e [mailhog-7c99fd689d-jgxlj] net/http.HandlerFunc.ServeHTTP(0xc8201b8890, 0x7eff6e0ef8c0, 0xc8201201a0, 0xc8201402a0) [mailhog-7c99fd689d-jgxlj] /usr/lib/go/src/net/http/server.go:1618 +0x3a [mailhog-7c99fd689d-jgxlj] github.com/mailhog/MailHog/vendor/github.com/gorilla/pat.(*Router).ServeHTTP(0xc820126000, 0x7eff6e0ef8c0, 0xc8201201a0, 0xc8201402a0) [mailhog-7c99fd689d-jgxlj] /root/gocode/src/github.com/mailhog/MailHog/vendor/github.com/gorilla/pat/pat.go:92 +0x26e [mailhog-7c99fd689d-jgxlj] github.com/mailhog/MailHog/vendor/github.com/mailhog/http.BasicAuthHandler.func1(0x7eff6e0ef8c0, 0xc8201201a0, 0xc8201402a0) [mailhog-7c99fd689d-jgxlj] /root/gocode/src/github.com/mailhog/MailHog/vendor/github.com/mailhog/http/server.go:92 +0xfd [mailhog-7c99fd689d-jgxlj] net/http.HandlerFunc.ServeHTTP(0xc8201ab4e0, 0x7eff6e0ef8c0, 0xc8201201a0, 0xc8201402a0) [mailhog-7c99fd689d-jgxlj] /usr/lib/go/src/net/http/server.go:1618 +0x3a [mailhog-7c99fd689d-jgxlj] net/http.serverHandler.ServeHTTP(0xc8201e0080, 0x7eff6e0ef8c0, 0xc8201201a0, 0xc8201402a0) [mailhog-7c99fd689d-jgxlj] /usr/lib/go/src/net/http/server.go:2081 +0x19e [mailhog-7c99fd689d-jgxlj] net/http.(*conn).serve(0xc820132180) [mailhog-7c99fd689d-jgxlj] /usr/lib/go/src/net/http/server.go:1472 +0xf2e [mailhog-7c99fd689d-jgxlj] created by net/http.(*Server).Serve [mailhog-7c99fd689d-jgxlj] /usr/lib/go/src/net/http/server.go:2137 +0x44e [mailhog-7c99fd689d-jgxlj] 2019/03/14 16:54:28 [SMTP 51.83.14.10:48886] Starting session
Workaround :
rm -rf /data/lost\+found
Actually any folder created in maildir will produce the error. I would suggest to just skip folders if thsi is possible
When trying to use mailhog in a kuebernetes cluster i noticed the following error.
Steps to reproduce:
Mailhog -maildir-path /data
Traces:
Workaround :
rm -rf /data/lost\+found