All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mes.custom-mailets.3.4.0.source-code.mailetcontainer.xml Maven / Gradle / Ivy

There is a newer version: 3.5.0
Show newest version
<?xml version="1.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.
 -->

<mailetcontainer enableJmx="true">

    <context>
        <postmaster>[email protected]</postmaster>
    </context>

    <spooler>
        <threads>20</threads>
    </spooler>

    <processors>
        <processor state="root" enableJmx="true">
            <mailet match="All" class="PostmasterAlias"/>

            <mailet match="org.apache.james.examples.custom.mailets.IsDelayedForMoreThan=1 day"
                    class="org.apache.james.examples.custom.mailets.SendPromotionCode">
                <reason>Your email had been delayed for a long time. Because we are sorry about it, please find the
                    following promotion code.</reason>
                <promotionCode>1542-2563-5469</promotionCode>
            </mailet>

            <mailet match="RelayLimit=30" class="Null"/>
            <mailet match="All" class="ToProcessor">
                <processor>transport</processor>
            </mailet>
        </processor>

        <processor state="error" enableJmx="true">
            <mailet match="All" class="MetricsMailet">
                <metricName>mailetContainerErrors</metricName>
            </mailet>
            <mailet match="All" class="Bounce"/>
            <mailet match="All" class="ToRepository">
                <repositoryPath>file://var/mail/error/</repositoryPath>
            </mailet>
        </processor>

        <processor state="transport" enableJmx="true">
            <mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
                <name>X-UserIsAuth</name>
                <value>true</value>
                <onMailetException>ignore</onMailetException>
            </mailet>
            <mailet match="HasMailAttribute=org.apache.james.SMIMECheckSignature" class="SetMimeHeader">
                <name>X-WasSigned</name>
                <value>true</value>
                <onMailetException>ignore</onMailetException>
            </mailet>
            <mailet match="All" class="RemoveMimeHeader">
                <name>bcc</name>
                <onMailetException>ignore</onMailetException>
            </mailet>
            <mailet match="All" class="RecipientRewriteTable">
                <errorProcessor>rrt-error</errorProcessor>
            </mailet>
            <mailet match="RecipientIsLocal" class="Sieve"/>
            <mailet match="RecipientIsLocal" class="AddDeliveredToHeader"/>
            <mailet match="RecipientIsLocal" class="LocalDelivery"/>
            <mailet match="HostIsLocal" class="ToProcessor">
                <processor>local-address-error</processor>
                <notice>550 - Requested action not taken: no such user here</notice>
            </mailet>

            <mailet match="SMTPAuthSuccessful" class="ToProcessor">
                <processor>relay</processor>
            </mailet>
            <mailet match="SMTPIsAuthNetwork" class="ToProcessor">
                <processor>relay</processor>
            </mailet>
            <mailet match="SentByMailet" class="ToProcessor">
                <processor>relay</processor>
            </mailet>

            <mailet match="All" class="ToProcessor">
                <processor>relay-denied</processor>
            </mailet>
        </processor>

        <processor state="relay" enableJmx="true">
            <mailet match="All" class="RemoteDelivery">
                <outgoingQueue>outgoing</outgoingQueue>
                <delayTime>5000, 100000, 500000</delayTime>
                <maxRetries>25</maxRetries>
                <maxDnsProblemRetries>0</maxDnsProblemRetries>
                <deliveryThreads>10</deliveryThreads>
                <sendpartial>true</sendpartial>
                <bounceProcessor>bounces</bounceProcessor>
            </mailet>
        </processor>

        <processor state="spam" enableJmx="true">
            <mailet match="All" class="MetricsMailet">
                <metricName>mailetContainerSpam</metricName>
            </mailet>
            <mailet match="All" class="ToRepository">
                <repositoryPath>file://var/mail/spam/</repositoryPath>
            </mailet>
        </processor>

        <processor state="local-address-error" enableJmx="true">
            <mailet match="All" class="MetricsMailet">
                <metricName>mailetContainerLocalAddressError</metricName>
            </mailet>
            <mailet match="All" class="Bounce">
                <attachment>none</attachment>
            </mailet>
            <mailet match="All" class="ToRepository">
                <repositoryPath>file://var/mail/address-error/</repositoryPath>
            </mailet>
        </processor>

        <processor state="relay-denied" enableJmx="true">
            <mailet match="All" class="MetricsMailet">
                <metricName>mailetContainerRelayDenied</metricName>
            </mailet>
            <mailet match="All" class="Bounce">
                <attachment>none</attachment>
            </mailet>
            <mailet match="All" class="ToRepository">
                <repositoryPath>file://var/mail/relay-denied/</repositoryPath>
                <notice>Warning: You are sending an e-mail to a remote server. You must be authenticated to perform such an operation</notice>
            </mailet>
        </processor>

        <processor state="bounces" enableJmx="true">
            <mailet match="All" class="MetricsMailet">
                <metricName>bounces</metricName>
            </mailet>
            <mailet match="All" class="DSNBounce">
                <passThrough>false</passThrough>
            </mailet>
        </processor>

        <processor state="rrt-error" enableJmx="false">
            <mailet match="All" class="ToRepository">
                <repositoryPath>file://var/mail/rrt-error/</repositoryPath>
                <passThrough>true</passThrough>
            </mailet>
            <mailet match="IsSenderInRRTLoop" class="Null"/>
            <mailet match="All" class="Bounce"/>
        </processor>

    </processors>

</mailetcontainer>






© 2015 - 2024 Weber Informatics LLC | Privacy Policy