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

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

                    <mailet match="All" class="RemoteDelivery">

                            <!-- Delivery Schedule based upon RFC 2821, -->
                            <!-- 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>

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

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

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

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

                            CHANGE ME: Replace smtp relay hostname  -->



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.