Explorar o código

Move AddReceivedLine before further processing.

Ben Ubois %!s(int64=4) %!d(string=hai) anos
pai
achega
3f627d3281
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      main.go

+ 2 - 2
main.go

@@ -170,6 +170,8 @@ func mailHandler(peer smtpd.Peer, env smtpd.Envelope) error {
 		return nil
 	}
 
+	env.AddReceivedLine(peer)
+
 	if *command != "" {
 		cmdLogger := logger.WithField("command", *command)
 
@@ -196,8 +198,6 @@ func mailHandler(peer smtpd.Peer, env smtpd.Envelope) error {
 
 	logger.Info("delivering mail from peer using smarthost")
 
-	env.AddReceivedLine(peer)
-
 	var sender string
 
 	if *remoteSender == "" {