Skip to content

Commit

Permalink
Fix: POP3 size output to show compatible sizes (#312)
Browse files Browse the repository at this point in the history
* Changed POP3 size output to show compatible size

* Setting POP3 10 minutes timeout according to RFC1939
  • Loading branch information
antonionardella authored Jun 14, 2024
1 parent 83c94c8 commit ce7dcce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/pop3/pop3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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, ".")
Expand Down

0 comments on commit ce7dcce

Please sign in to comment.