You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2019/09/26 02:10:03 UTC
[james-project] 09/38: JAMES-2703 Remove
UsersRepositoryAliasingForwarding
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 622269ecf448c7b298b48ad0d136f03aabfb0108
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue Sep 10 10:07:23 2019 +0700
JAMES-2703 Remove UsersRepositoryAliasingForwarding
---
.../mailets/UsersRepositoryAliasingForwarding.java | 93 ----------------------
1 file changed, 93 deletions(-)
diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/UsersRepositoryAliasingForwarding.java b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/UsersRepositoryAliasingForwarding.java
deleted file mode 100644
index 495d7b7..0000000
--- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/UsersRepositoryAliasingForwarding.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************
- * 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.transport.mailets;
-
-import javax.inject.Inject;
-import javax.mail.MessagingException;
-
-import org.apache.james.domainlist.api.DomainList;
-import org.apache.james.rrt.api.RecipientRewriteTable;
-import org.apache.james.user.api.UsersRepository;
-import org.apache.mailet.Experimental;
-import org.apache.mailet.Mail;
-import org.apache.mailet.base.GenericMailet;
-
-import com.google.common.base.Preconditions;
-
-/**
- * Receives a Mail from JamesSpoolManager and takes care of delivery of the
- * message to local inboxes.
- *
- * Available configurations are:
- *
- * <code><enableAliases>true</enableAliases></code>: specify wether
- * the user aliases should be looked up or not. Default is false.
- *
- * <code><enableForwarding>true</enableForwarding></code>: enable
- * the forwarding. Default to false.
- *
- *
- * @deprecated use org.apache.james.transport.mailets.RecipientRewriteTable
- *
- * JAMES-2703 This class is deprecated and will be removed straight after upcoming James 3.4.0 release
- */
-@Experimental
-@Deprecated
-public class UsersRepositoryAliasingForwarding extends GenericMailet {
- private final UsersRepository usersRepository;
- private final DomainList domainList;
- private RecipientRewriteTableProcessor processor;
-
- @Inject
- public UsersRepositoryAliasingForwarding(UsersRepository usersRepository, DomainList domainList) {
- this.usersRepository = usersRepository;
- this.domainList = domainList;
- }
-
- @Override
- public void init() throws MessagingException {
- if (usersRepository instanceof RecipientRewriteTable) {
- RecipientRewriteTable virtualTableStore = (RecipientRewriteTable) usersRepository;
- processor = new RecipientRewriteTableProcessor(virtualTableStore, domainList, getMailetContext(), Mail.ERROR);
- } else {
- throw new MessagingException("The user repository is not RecipientRewriteTable");
- }
- }
-
- @Inject
- public final void setProcessor(RecipientRewriteTableProcessor processor) {
- this.processor = processor;
- }
-
- @Override
- public void service(Mail mail) throws MessagingException {
- Preconditions.checkNotNull(mail);
- Preconditions.checkNotNull(mail.getMessage());
- Preconditions.checkNotNull(processor);
-
- processor.processMail(mail);
- }
-
- @Override
- public String getMailetInfo() {
- return "Local User Aliasing and Forwarding Mailet";
- }
-
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org