jeantil commented on code in PR #2913:
URL: https://github.com/apache/james-project/pull/2913#discussion_r2694866149
##########
server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/VacationMailet.java:
##########
@@ -100,18 +119,16 @@ public void service(Mail mail) {
@Override
public void init() throws MessagingException {
useUserAsMailFrom = MailetUtil.getInitParameter(getMailetConfig(),
"useUserAsMailFrom").orElse(false);
+ replyMode = Optional.ofNullable(getInitParameter("replyMode"))
+ .map(value -> ReplyMode.parse(value).orElseThrow(() -> new
IllegalArgumentException("Unsupported ReplyMode " + value)))
+ .orElse(ReplyMode.REPLY_TO_HEADER);
Review Comment:
:thinking: shouldn't this default to `envelope` since this is the current
behaviour ?
##########
docs/modules/servers/partials/VacationMailet.adoc:
##########
@@ -3,4 +3,9 @@
This mailet uses https://jmap.io/spec-mail.html#vacation-response[JMAP
VacationResponse] and
sends back a vacation notice to the sender if needed.
-The `useUserAsMailFrom` property can be set to true to use the user as the
transport sender instead of `MAIL FROM: <>`.
\ No newline at end of file
+The `useUserAsMailFrom` property can be set to true to use the user as the
transport sender instead of `MAIL FROM: <>`.
+
+The `replyMode` property determine how we compute the recipient of the
vacation reply:
+ - `replyToHeader` (default mode) we lookup the `Reply-To` field of the
incoming email
+ - `envelope` (legacy, here to enable backward behavioural compatibility) use
the MAIL FROM of the original mail, which could
Review Comment:
:+1:
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]