@@ -256,6 +256,9 @@ func (h logHook) Fire(e *log.Entry) error {
if !ok {
return nil
}
+ if len(helo) > 16 {
+ helo = helo[:16]
+ }
ip, ok = e.Data["address"].(string)
@@ -405,7 +405,7 @@ func (server *server) handleClient(client *client) {
} else {
server.log.WithFields(map[string]interface{}{
"event": "mailfrom",
- "helo": client.Helo[:16],
+ "helo": client.Helo,
"domain": from.Host,
"address": client.RemoteAddress,
"id": client.ID,