https://src.bluestatic.org
/
mailpopbox.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b72b957
)
Add more logging for the POP3 server.
author
Robert Sesek <rsesek@bluestatic.org>
Mon, 2 Jan 2017 08:07:56 +0000
(
03:07
-0500)
committer
Robert Sesek <rsesek@bluestatic.org>
Mon, 2 Jan 2017 08:07:56 +0000
(
03:07
-0500)
pop3/conn.go
patch
|
blob
|
history
diff --git
a/pop3/conn.go
b/pop3/conn.go
index b1df280f45ab12091b0d00943b2fcdd6c9cc64a8..a15c1f657901be9656a6118a08b0566a04685902 100644
(file)
--- a/
pop3/conn.go
+++ b/
pop3/conn.go
@@
-93,7
+93,6
@@
func AcceptConnection(netConn net.Conn, po PostOffice, log zap.Logger) {
case "UIDL":
conn.doUIDL()
default:
case "UIDL":
conn.doUIDL()
default:
- conn.log.Error("unknown command")
conn.err("unknown command")
}
}
conn.err("unknown command")
}
}
@@
-241,6
+240,7
@@
func (conn *connection) doRETR() {
return
}
return
}
+ conn.log.Info("retreive message", zap.String("unique-id", msg.UniqueID()))
conn.ok(fmt.Sprintf("%d", msg.Size()))
w := conn.tp.DotWriter()
conn.ok(fmt.Sprintf("%d", msg.Size()))
w := conn.tp.DotWriter()
@@
-268,6
+268,7
@@
func (conn *connection) doDELE() {
conn.log.Error("failed to delete message", zap.Error(err))
conn.err(err.Error())
} else {
conn.log.Error("failed to delete message", zap.Error(err))
conn.err(err.Error())
} else {
+ conn.log.Info("delete message", zap.String("unique-id", msg.UniqueID()))
conn.ok("")
}
}
conn.ok("")
}
}
@@
-278,6
+279,7
@@
func (conn *connection) doRSET() {
return
}
conn.mb.Reset()
return
}
conn.mb.Reset()
+ conn.log.Info("reset")
conn.ok("")
}
conn.ok("")
}