You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "quantranhong1999 (via GitHub)" <gi...@apache.org> on 2023/09/26 05:17:13 UTC

[GitHub] [james-project] quantranhong1999 commented on a diff in pull request #1738: JAMES-3942 Audit user trail

quantranhong1999 commented on code in PR #1738:
URL: https://github.com/apache/james-project/pull/1738#discussion_r1336634885


##########
server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/LocalDelivery.java:
##########
@@ -62,6 +66,15 @@ public LocalDelivery(UsersRepository usersRepository, @Named("mailboxmanager") M
 
     @Override
     public void service(Mail mail) throws MessagingException {
+        AuditTrail.entry()
+            .protocol("mailetcontainer")
+            .action("LocalDelivery")
+            .parameters(ImmutableMap.of("mailId", mail.getName(),
+                "mimeMessageId", mail.getMessage().getMessageID(),
+                "sender", mail.getMaybeSender().asString(),
+                "recipients", StringUtils.join(mail.getRecipients())))
+            .log("Local delivering mail.");

Review Comment:
   > Let's add a field: mailboxSessionId
   
   Can we really get sessionId upon LocalDelivery?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org