This is an automated email from the ASF dual-hosted git repository.

jhelou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git


The following commit(s) were added to refs/heads/master by this push:
     new 6afa656b49 [JAMES-4065] drop habeas warrant mark mailet
6afa656b49 is described below

commit 6afa656b497aeb187f5331907b02c706ed7fc3bc
Author: Jean Helou <[email protected]>
AuthorDate: Sun Aug 4 15:37:40 2024 +0200

    [JAMES-4065] drop habeas warrant mark mailet
    
    The habeas.com domain redirects to returnpath.com which itself has been 
bought by validity and lists itself as kinda dead.
    I could not find any way to obtain a license for the mark.
---
 .../pages/distributed/configure/mailets.adoc       |   2 -
 .../pages/distributed/configure/matchers.adoc      |   2 -
 .../servers/partials/AddHabeasWarrantMark.adoc     |  54 ---------
 .../servers/partials/HasHabeasWarrantMark.adoc     |  40 ------
 .../transport/mailets/AddHabeasWarrantMark.java    | 121 -------------------
 .../transport/matchers/HasHabeasWarrantMark.java   | 134 ---------------------
 6 files changed, 353 deletions(-)

diff --git a/docs/modules/servers/pages/distributed/configure/mailets.adoc 
b/docs/modules/servers/pages/distributed/configure/mailets.adoc
index d8ac82fc0c..cf19932da0 100644
--- a/docs/modules/servers/pages/distributed/configure/mailets.adoc
+++ b/docs/modules/servers/pages/distributed/configure/mailets.adoc
@@ -120,8 +120,6 @@ include::partial$WithStorageDirective.adoc[]
 
 == Experimental mailets
 
-include::partial$AddHabeasWarrantMark.adoc[]
-
 include::partial$ClamAVScan.adoc[]
 
 include::partial$ClassifyBounce.adoc[]
diff --git a/docs/modules/servers/pages/distributed/configure/matchers.adoc 
b/docs/modules/servers/pages/distributed/configure/matchers.adoc
index 25cc76ccf7..2d85fc3465 100644
--- a/docs/modules/servers/pages/distributed/configure/matchers.adoc
+++ b/docs/modules/servers/pages/distributed/configure/matchers.adoc
@@ -122,8 +122,6 @@ include::partial$CompareNumericHeaderValue.adoc[]
 
 include::partial$FileRegexMatcher.adoc[]
 
-include::partial$HasHabeasWarrantMark.adoc[]
-
 include::partial$InSpammerBlacklist.adoc[]
 
 include::partial$NESSpamCheck.adoc[]
diff --git a/docs/modules/servers/partials/AddHabeasWarrantMark.adoc 
b/docs/modules/servers/partials/AddHabeasWarrantMark.adoc
deleted file mode 100644
index f86e309001..0000000000
--- a/docs/modules/servers/partials/AddHabeasWarrantMark.adoc
+++ /dev/null
@@ -1,54 +0,0 @@
-=== AddHabeasWarrantMark
-
-This matcher adds the Hebeas Warrant Mark to a message.
-
-For details see: http://www.hebeas.com</p>
-
-Usage:
-
-....
-<mailet match="All" class="AddHabeasWarrantMark" />;
-....
-
-NOTE: Although this mailet is covered by the Apache Software License,
-the Habeas Warrant Mark is copyright.  A separate license from Habeas
-is required in order to legally attach the Habeas Warrant Mark to
-e-mail messages.  Each James Administrator is responsible for
-ensuring that James is configured to attach the Habeas Warrant Mark
-only to e-mail covered by a suitable license received from Habeas.
-
-Because the Habeas Warrant Mark is copyright material, I have asked
-for and received the following explicit statement from Habeas:
-
-....
------------------------------------
-From: Lindsey Pettit [mailto:[email protected]]
-Sent: Sunday, September 29, 2002 5:51
-To: Noel J. Bergman
-Subject: RE: Habeas and Apache James
-*
-Dear Noel,
-*
-> FURTHERMORE, if James is to be capable of sending Habeas SWE, I need
-> to write a Mailet that attaches the headers.  As with any MTA, it
-> would be up to the administrator to properly configure James and make
-> sure that licenses are acquired.  Since the Habeas Warrant Mark is
-> copyright, I believe that I require authorization from you for that
-> Mailet, especially since it attaches the Habeas Warrant Mark.  For my
-> own protection, please show me why such authorization is unnecessary,
-> send me a digitally signed e-mail, or FAX a signed authorization
-*
-You do not yourself need the authorization to build the functionality
-into the [mailet];  what one needs authorization, in the form of a
-license, for, is to use the mark *in headers*, in outgoing email.
-However, please let me know if you would like something more
-formal, and I can try to have something faxed to you.
-*
-> The Mailet docs would reference the Habeas website, and inform
-> administrators that in order to USE the mailet, they need to ensure
-> that they have whatever licenses are required from you as appropriate
-> to your licensing terms.
-*
-That's absolutely perfect!
------------------------------------
-....
\ No newline at end of file
diff --git a/docs/modules/servers/partials/HasHabeasWarrantMark.adoc 
b/docs/modules/servers/partials/HasHabeasWarrantMark.adoc
deleted file mode 100644
index 856401306a..0000000000
--- a/docs/modules/servers/partials/HasHabeasWarrantMark.adoc
+++ /dev/null
@@ -1,40 +0,0 @@
-=== HasHabeasWarrantMark
-
-This matcher tests for the Hebeas Warrant Mark.
-For details see: http://www.hebeas.com
-
-Usage: Place this matcher
-
-....
-<mailet match="HasHabeasWarrantMark" class="ToProcessor">
-    <processor> transport </processor>
-</mailet>
-....
-
-in the root processes before the DNSRBL block lists (the InSpammerBlacklist 
matcher).
-
-Because the Habeas Warrant Mark is copyright material, I have asked for and
-received the following explicit statement from Habeas:
-
-....
------------------------------------
-From: Lindsey Pettit [mailto:[email protected]]
-Sent: Sunday, September 29, 2002 5:51
-To: Noel J. Bergman
-Subject: RE: Habeas and Apache James
-
-Dear Noel,
-
-> I guess that since your Warrant Mark is copyright, I should ask for
-> something from you to explicitly authorize that Hebeas will permit
-> this code to be included and distributed as part of Apache James
-> under the Apache Software License.  As we have established, the use
-> of the Habeas Warrant Mark for filtering is not restricted, but I
-> would like something to confirm that, so that Apache will be happy.
-
-I can hereby confirm to you that there is no license necessary in
-order to use the Habeas mark for filtering.  That said, however, we
-do insist that it not ever be used as a basis for rejecting email which
-bears the Habeas mark.
------------------------------------
-....
\ No newline at end of file
diff --git 
a/mailet/standard/src/main/java/org/apache/james/transport/mailets/AddHabeasWarrantMark.java
 
b/mailet/standard/src/main/java/org/apache/james/transport/mailets/AddHabeasWarrantMark.java
deleted file mode 100644
index ab9abe196d..0000000000
--- 
a/mailet/standard/src/main/java/org/apache/james/transport/mailets/AddHabeasWarrantMark.java
+++ /dev/null
@@ -1,121 +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 jakarta.mail.MessagingException;
-import jakarta.mail.internet.MimeMessage;
-
-import org.apache.james.transport.matchers.HasHabeasWarrantMark;
-import org.apache.mailet.Experimental;
-import org.apache.mailet.Mail;
-import org.apache.mailet.base.GenericMailet;
-
-/**
- * <p>This matcher adds the Hebeas Warrant Mark to a message.
- * For details see: http://www.hebeas.com</p>
- *
- * <p>
- * Usage:
- * </p>
- * 
- * <pre><code>
- * &lt;mailet match="&lt;suitable-matcher&gt;" class="AddHabeasWarrantMark" 
/&gt;
- * </code></pre>
- *
- * <p>
- * NOTE: Although this mailet is covered by the Apache Software License,
- * the Habeas Warrant Mark is copyright.  A separate license from Habeas
- * is required in order to legally attach the Habeas Warrant Mark to
- * e-mail messages.  Each James Administrator is responsible for
- * ensuring that James is configured to attach the Habeas Warrant Mark
- * only to e-mail covered by a suitable license received from Habeas.
- * 
- * Because the Habeas Warrant Mark is copyright material, I have asked
- * for and received the following explicit statement from Habeas:
- * </p>
- * <pre>
- * -----------------------------------
- * From: Lindsey Pettit [mailto:[email protected]]
- * Sent: Sunday, September 29, 2002 5:51
- * To: Noel J. Bergman
- * Subject: RE: Habeas and Apache James
- *
- * Dear Noel,
- * 
- * > FURTHERMORE, if James is to be capable of sending Habeas SWE, I need
- * > to write a Mailet that attaches the headers.  As with any MTA, it
- * > would be up to the administrator to properly configure James and make
- * > sure that licenses are acquired.  Since the Habeas Warrant Mark is
- * > copyright, I believe that I require authorization from you for that
- * > Mailet, especially since it attaches the Habeas Warrant Mark.  For my
- * > own protection, please show me why such authorization is unnecessary,
- * > send me a digitally signed e-mail, or FAX a signed authorization
- * 
- * You do not yourself need the authorization to build the functionality 
- * into the [mailet];  what one needs authorization, in the form of a 
- * license, for, is to use the mark *in headers*, in outgoing email.
- * However, please let me know if you would like something more 
- * formal, and I can try to have something faxed to you.
- * 
- * > The Mailet docs would reference the Habeas website, and inform
- * > administrators that in order to USE the mailet, they need to ensure
- * > that they have whatever licenses are required from you as appropriate
- * > to your licensing terms.
- * 
- * That's absolutely perfect!
- * -----------------------------------
- * </pre>
- */
-@Experimental
-public class AddHabeasWarrantMark extends GenericMailet {
-
-    /**
-     * Called by the mailet container to allow the mailet to process to
-     * a message message.
-     *
-     * This method adds the Habeas Warrant Mark headers to the message,
-     * saves the changes, and then allows the message to fall through
-     * in the pipeline.
-     *
-     * @param mail - the Mail object that contains the message and routing 
information
-     * @throws MessagingException - if an message or address parsing exception 
occurs or
-     *      an exception that interferes with the mailet's normal operation
-     */
-    @Override
-    public void service(Mail mail) throws MessagingException {
-        MimeMessage message = mail.getMessage();
-
-        for (int i = 0; i < HasHabeasWarrantMark.warrantMark.length; i++) {
-            message.setHeader(HasHabeasWarrantMark.warrantMark[i][0], 
HasHabeasWarrantMark.warrantMark[i][1]);
-        }
-
-        message.saveChanges();
-    }
-
-    /*
-     * Return a string describing this mailet.
-     *
-     * @return a string describing this mailet
-     */
-    @Override
-    public String getMailetInfo() {
-        return "Add Habeas Warrant Mark.  Must be used in accordance with a 
license from Habeas (see http://www.habeas.com for details).";
-    }
-}
diff --git 
a/mailet/standard/src/main/java/org/apache/james/transport/matchers/HasHabeasWarrantMark.java
 
b/mailet/standard/src/main/java/org/apache/james/transport/matchers/HasHabeasWarrantMark.java
deleted file mode 100644
index 560d54d735..0000000000
--- 
a/mailet/standard/src/main/java/org/apache/james/transport/matchers/HasHabeasWarrantMark.java
+++ /dev/null
@@ -1,134 +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.matchers;
-
-import java.util.Collection;
-
-import jakarta.mail.MessagingException;
-import jakarta.mail.internet.MimeMessage;
-
-import org.apache.james.core.MailAddress;
-import org.apache.mailet.Experimental;
-import org.apache.mailet.Mail;
-import org.apache.mailet.base.GenericMatcher;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <p>This matcher tests for the Hebeas Warrant Mark.
- * For details see: http://www.hebeas.com</p>
- *
- * <p>Usage: Place this matcher</p>
- * <pre><code>
- * &lt;mailet match="HasHabeasWarrantMark" class="ToProcessor"&gt;
- *     &lt;processor&gt; transport &lt;/processor&gt;
- * &lt;/mailet&gt;
- * </code></pre>
- * <p>in the root processs before the DNSRBL block lists (the 
InSpammerBlacklist matcher).</p>
- *
- * <p>Because the Habeas Warrant Mark is copyright material, I have asked for 
and
- * received the following explicit statement from Habeas:</p>
- * <pre>
- * -----------------------------------
- * From: Lindsey Pettit [mailto:[email protected]]
- * Sent: Sunday, September 29, 2002 5:51
- * To: Noel J. Bergman
- * Subject: RE: Habeas and Apache James
- *
- * Dear Noel,
- * 
- * > I guess that since your Warrant Mark is copyright, I should ask for
- * > something from you to explicitly authorize that Hebeas will permit
- * > this code to be included and distributed as part of Apache James
- * > under the Apache Software License.  As we have established, the use
- * > of the Habeas Warrant Mark for filtering is not restricted, but I
- * > would like something to confirm that, so that Apache will be happy.
- *
- * I can hereby confirm to you that there is no license necessary in 
- * order to use the Habeas mark for filtering.  That said, however, we 
- * do insist that it not ever be used as a basis for rejecting email which 
- * bears the Habeas mark.
- * -----------------------------------
- * </pre>
- */
-@Experimental
-public class HasHabeasWarrantMark extends GenericMatcher {
-    private static final Logger LOGGER = 
LoggerFactory.getLogger(HasHabeasWarrantMark.class);
-
-    public static final String[][] warrantMark =
-    {
-        { "X-Habeas-SWE-1", "winter into spring" }, 
-        { "X-Habeas-SWE-2", "brightly anticipated" }, 
-        { "X-Habeas-SWE-3", "like Habeas SWE (tm)" }, 
-        { "X-Habeas-SWE-4", "Copyright 2002 Habeas (tm)" }, 
-        { "X-Habeas-SWE-5", "Sender Warranted Email (SWE) (tm). The sender of 
this" }, 
-        { "X-Habeas-SWE-6", "email in exchange for a license for this Habeas" 
}, 
-        { "X-Habeas-SWE-7", "warrant mark warrants that this is a Habeas 
Compliant" }, 
-        { "X-Habeas-SWE-8", "Message (HCM) and not spam. Please report use of 
this" }, 
-        { "X-Habeas-SWE-9", "mark in spam to <http://www.habeas.com/report/>." 
}, 
-    };
-
-    @Override
-    public Collection<MailAddress> match(Mail mail) throws MessagingException {
-        MimeMessage message = mail.getMessage();
-
-        //Loop through all the patterns
-        for (String[] aWarrantMark : warrantMark) {
-            try {
-                String headerName = aWarrantMark[0];                      
//Get the header name
-                String requiredValue = aWarrantMark[1];                   
//Get the required value
-                String headerValue = message.getHeader(headerName, null);   
//Get the header value(s)
-
-                // We want an exact match, so only test the first value.
-                // If there are multiple values, the header may be
-                // (illegally) forged.  I'll leave it as an exercise to
-                // others if they want to detect and report potentially
-                // forged headers.
-
-                if (!(requiredValue.equals(headerValue))) {
-                    return null;
-                }
-            } catch (Exception e) {
-                LOGGER.info("Caught an exception while reading message", e);
-                return null;            //if we get an exception, don't 
validate the mark
-            }
-        }
-
-        // If we get here, all headers are present and match.
-        return mail.getRecipients();
-    }
-
-    /*
-     * Returns information about the matcher, such as author, version, and 
copyright.
-     * <p>
-     * The string that this method returns should be plain text and not markup
-     * of any kind (such as HTML, XML, etc.).
-     *
-     * @return a String containing matcher information
-     */
-
-    @Override
-    public String getMatcherInfo() {
-        return "Habeas Warrant Mark Matcher (see http://www.habeas.com for 
details).";
-    }
-}
-


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to