From ce7dcce61c10c53169006601505ec64bde52e40c Mon Sep 17 00:00:00 2001 From: Antonio Nardella Date: Fri, 14 Jun 2024 22:50:22 +0200 Subject: [PATCH] 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 --- server/pop3/pop3.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/pop3/pop3.go b/server/pop3/pop3.go index f9e424acb..7c5fc0440 100644 --- a/server/pop3/pop3.go +++ b/server/pop3/pop3.go @@ -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, ".")