This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 544710b5e1958db7c757d088078b49aa80a98d32 Author: Benoit Tellier <[email protected]> AuthorDate: Thu May 13 12:27:46 2021 +0700 JAMES-3574 LMTP DATA responses can specify the recipient in the comment part Mostly this helps debugging. --- .../james/lmtpserver/hook/MailboxDeliverToRecipientHandler.java | 2 +- .../src/test/java/org/apache/james/lmtpserver/LmtpServerTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/hook/MailboxDeliverToRecipientHandler.java b/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/hook/MailboxDeliverToRecipientHandler.java index 3ee7bc4..0016c4d 100644 --- a/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/hook/MailboxDeliverToRecipientHandler.java +++ b/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/hook/MailboxDeliverToRecipientHandler.java @@ -98,7 +98,7 @@ public class MailboxDeliverToRecipientHandler implements DeliverToRecipientHook return HookResult.builder() .hookReturnCode(HookReturnCode.ok()) .smtpReturnCode(SMTPRetCode.MAIL_OK) - .smtpDescription(DSNStatus.getStatus(DSNStatus.SUCCESS, DSNStatus.CONTENT_OTHER) + " Message received") + .smtpDescription(DSNStatus.getStatus(DSNStatus.SUCCESS, DSNStatus.CONTENT_OTHER) + " Message received <" + recipient.asString() + ">") .build(); } catch (MailboxException | UsersRepositoryException e) { LOGGER.error("Unexpected error handling DATA stream", e); diff --git a/server/protocols/protocols-lmtp/src/test/java/org/apache/james/lmtpserver/LmtpServerTest.java b/server/protocols/protocols-lmtp/src/test/java/org/apache/james/lmtpserver/LmtpServerTest.java index 41bb558..3184e5d 100644 --- a/server/protocols/protocols-lmtp/src/test/java/org/apache/james/lmtpserver/LmtpServerTest.java +++ b/server/protocols/protocols-lmtp/src/test/java/org/apache/james/lmtpserver/LmtpServerTest.java @@ -364,8 +364,8 @@ class LmtpServerTest { server.write(ByteBuffer.wrap(("QUIT\r\n").getBytes(StandardCharsets.UTF_8))); assertThat(new String(dataResponse, StandardCharsets.UTF_8)) - .contains("250 2.6.0 Message received\r\n" + - "250 2.6.0 Message received"); + .contains("250 2.6.0 Message received <[email protected]>\r\n" + + "250 2.6.0 Message received <[email protected]>"); } @Test --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
