0

After a mail has been processed by Apache James it seems that the "Return-Path" header is set. I want to change its value - or if that is not possible - prevent it from being generated altogether. I tried using the RemoveMimeHeader mailet in the mailetcontainer.xml, but that does not seem to work. Configuration looks as follows:

<mailet match="All" class="RemoveMimeHeader">
<name>Return-Path</name>
</mailet>

I added this mailet before and after the RemoteDelivery mailet in processor state outbound, but both do not seem to be working. In context the whole outbound processor looks as follows:

            <processor state="outbound" enableJmx="true">

                          <mailet match="All" class="RemoveMimeHeader">
                            <name>Return-Path</name>
                    </mailet>


                    <mailet match="All" class="RemoteDelivery">
                            <outgoingQueue>outgoing</outgoingQueue>

                            <!-- Delivery Schedule based upon RFC 2821, 4.5.4.1 -->
                            <!-- 5 day retry period, with 4 attempts in the first hour, two more within the first 6 hours, and then every 6 hours for the rest of the period. -->
                            <delayTime>5 minutes</delayTime>
                            <delayTime>10 minutes</delayTime>
                            <delayTime>45 minutes</delayTime>
                            <delayTime>2 hours</delayTime>
                            <delayTime>3 hours</delayTime>
                            <delayTime>6 hours</delayTime>
                            <maxRetries>25</maxRetries>

                            <!-- The max reties which will used if no A or MX record for the domain was found. -->
                            <!-- If 0 it will fail on first time -->
                            <maxDnsProblemRetries>0</maxDnsProblemRetries>

                            <!-- The number of threads that should be trying to deliver outgoing messages -->
                            <deliveryThreads>10</deliveryThreads>

                            <!-- If false the message will not be sent to given server if any recipients fail -->
                            <sendpartial>true</sendpartial>

                            <!-- By default we send bounces to the "bounce" processor -->
                            <!-- By removing this configuration James will fallback to hardcoded bounce -->
                            <!-- notifications -->
                            <bounceProcessor>bounces</bounceProcessor>

                            <!--
                            CHANGE ME: Replace smtp relay hostname  -->
                            <heloName>[host]</heloName>

                    </mailet>


        </processor>

Any help of how the value could be changed (statically for now) or removed?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.