فهرست منبع

Move AddReceivedLine before further processing.

Ben Ubois 4 سال پیش
والد
کامیت
3f627d3281
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  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 == "" {