Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed POP3 size output to show compatible size #312

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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