1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-08-15 20:13:16 +02:00

Fix: POP3 size output to show compatible sizes (#312)

* Changed POP3 size output to show compatible size

* Setting POP3 10 minutes timeout according to RFC1939
This commit is contained in:
Antonio Nardella
2024-06-14 22:50:22 +02:00
committed by GitHub
parent 83c94c879a
commit ce7dcce61c

View File

@@ -118,7 +118,7 @@ func handleClient(conn net.Conn) {
// First welcome the new connection
sendResponse(conn, "+OK Mailpit POP3 server")
timeoutDuration := 30 * time.Second
timeoutDuration := 600 * time.Second
for {
// POP3 server enforced a timeout of 30 seconds
@@ -193,7 +193,7 @@ func handleClient(conn net.Conn) {
// print all sizes
for row, m := range messages {
sendData(conn, fmt.Sprintf("%d %d", row+1, m.Size))
sendData(conn, fmt.Sprintf("%d %d", row+1, int64(m.Size))) // Convert Size to int64 when printing
}
// end
sendData(conn, ".")