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/04/07 04:12:24 UTC

[GitHub] [james-project] quantranhong1999 commented on a diff in pull request #1501: [wip] JAMES-4865 Add FutureRelease Extension

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


##########
server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/futurerelease/FutureReleaseEHLOHook.java:
##########
@@ -0,0 +1,41 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+package org.apache.james.smtpserver.futurerelease;
+
+import org.apache.james.protocols.smtp.SMTPSession;
+import org.apache.james.protocols.smtp.hook.HeloHook;
+import org.apache.james.protocols.smtp.hook.HookResult;
+
+import java.util.Set;
+
+import com.google.common.collect.ImmutableSet;
+
+public class FutureReleaseEHLOHook implements HeloHook {
+
+    @Override
+    public Set<String> implementedEsmtpFeatures() {
+        return ImmutableSet.of("FUTURERELEASE");

Review Comment:
   > I don't know how to make server respond these 2 params. Can someone help me?
   
   I am not sure if we want to configure the max HOLD_UNTIL yet. Maybe start with something hardcode and work first?
   Something like (pseudo code)
   
   ```java
           return ImmutableSet.of("FUTURERELEASE", Duration.of(2days), Now + Duration.of(2days));
   ```



-- 
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