Hey,
I am having a problem with my mailetcontainer configuration that I have
not been able to fix, yet.
We have problems delivering emails to some specific email servers
because of their expired certificate. James tries delivering them as
often as configured, everything as expected.
However, some of the emails (not all as far as I can see) for which
delivery has been tried, have been put in the spool again.
I thought that everything that has been put in the outgoing queue has
left the mailetcontainer for good. If delivery fails, the configured
bounce processor can be used to send a bounce.
How do these emails end up on the spool again?
Additionally, the attributes of these emails have changed. They do not
have the attribute for the authenticated SMTP user anymore and are
therefore routed completely different in their second run through the
processing pipeline.
If somebody is interested, I put my mailetcontainer configuration at the
end of this email.
I suspect that it might have to do with my configuration of the default
error processor which should catch any errors in mailets / matchers and
store them in a specific repository. There is nothing in that repository
but emails are still respooled.
Best regards,
Felix
--
Gesellschaft für Interkulturelles Zusammenleben gGmbH (GIZ)
Felix Auringer (he/him)
Softwareentwickler
Reformationsplatz 2
13597 Berlin
Tel: -; Fax: +4930513010009
www.giz.berlin; [email protected]
Amtsgericht Charlottenburg HRB 200872 B
Geschäftsführerin: Dr. Britta Marschke
<?xml version="1.0"?>
<mailetcontainer enableJmx="false">
<context>
<postmaster>redacted</postmaster>
</context>
<spooler>
<threads>1</threads>
<errorRepository>postgres://var/mail/error/</errorRepository>
</spooler>
<processors>
<processor state="root">
<mailet match="All" class="PostmasterAlias"/>
<mailet match="RelayLimit=30" class="ToProcessor">
<processor>relay-limit</processor>
<notice>Warning: This email was relayed 30 times and
will not be processed further.</notice>
</mailet>
<mailet match="All" class="ToProcessor">
<processor>transport</processor>
</mailet>
</processor>
<processor state="transport">
<mailet match="All" class="RemoveMimeHeader">
<name>bcc</name>
</mailet>
<mailet match="All" class="RecipientRewriteTable">
<errorProcessor>rrt-error</errorProcessor>
</mailet>
<matcher name="external-to-internal"
match="org.apache.james.mailetcontainer.impl.matchers.And">
<matcher notmatch="SMTPAuthSuccessful"/>
<matcher match="HostIsLocal"/>
</matcher>
<mailet match="external-to-internal" class="ToProcessor">
<processor>from-external</processor>
</mailet>
<matcher name="internal-to-everywhere"
match="org.apache.james.mailetcontainer.impl.matchers.Or">
<matcher match="SMTPAuthSuccessful"/>
<matcher match="SentByMailet"/>
</matcher>
<mailet match="internal-to-everywhere" class="ToProcessor">
<processor>delivery</processor>
</mailet>
<mailet notmatch="internal-to-everywhere"
class="ToProcessor">
<processor>relay-denied</processor>
<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="from-external">
<mailet match="All"
class="org.apache.james.rspamd.RspamdScanner">
<rewriteSubject>true</rewriteSubject>
<virusProcessor>virus</virusProcessor>
<rejectSpamProcessor>spam</rejectSpamProcessor>
</mailet>
<mailet
match="IsMarkedAsSpam=org.apache.james.rspamd.status"
class="WithStorageDirective">
<targetFolderName>Spam</targetFolderName>
</mailet>
<mailet match="All" class="ToProcessor">
<processor>local-delivery</processor>
</mailet>
</processor>
<processor state="local-delivery">
<mailet match="RecipientIsLocal" class="Sieve"/>
<mailet match="RecipientIsLocal"
class="AddDeliveredToHeader"/>
<mailet match="RecipientIsLocal"
class="com.linagora.tmail.mailets.TmailLocalDelivery"/>
<mailet match="All" class="ToProcessor">
<processor>local-address-error</processor>
<notice>550 - Error: This mailbox does not exist
here.</notice>
</mailet>
</processor>
<processor state="delivery">
<!-- DKIM configuration redacted -->
<mailet match="HostIsLocal" class="ToProcessor">
<processor>local-delivery</processor>
</mailet>
<mailet notmatch="HostIsLocal" class="ToProcessor">
<processor>relay</processor>
</mailet>
</processor>
<processor state="relay">
<mailet match="All" class="RemoteDelivery">
<outgoingQueue>outgoing</outgoingQueue>
<delayTime>12 * 1 hour</delayTime>
<maxRetries>12</maxRetries>
<maxDnsProblemRetries>3</maxDnsProblemRetries>
<deliveryThreads>1</deliveryThreads>
<sendpartial>true</sendpartial>
<bounceProcessor>remote-error</bounceProcessor>
<startTLS>true</startTLS>
<mail.smtp.starttls.required>true</mail.smtp.starttls.required>
<heloName>smtp.email.giz.berlin</heloName>
</mailet>
</processor>
<processor state="spam">
<mailet match="All" class="ToRepository">
<repositoryPath>postgres://var/mail/spam/</repositoryPath>
</mailet>
</processor>
<processor state="virus">
<mailet match="All" class="ToRepository">
<repositoryPath>postgres://var/mail/virus/</repositoryPath>
</mailet>
</processor>
<processor state="safe-bounce">
<mailet match="IsSenderInRRTLoop" class="Null"/>
<mailet match="All" class="DSNBounce">
<attachment>message</attachment>
<prefix>Error: </prefix>
<passThrough>false</passThrough>
</mailet>
</processor>
<processor state="local-address-error">
<mailet match="All" class="MetricsMailet">
<metricName>mailetContainerLocalAddressError</metricName>
</mailet>
<mailet match="All" class="ToRepository">
<repositoryPath>postgres://var/mail/address-error/</repositoryPath>
<passThrough>true</passThrough>
</mailet>
<mailet match="All" class="ToProcessor">
<processor>safe-bounce</processor>
</mailet>
</processor>
<processor state="relay-denied">
<mailet match="All" class="MetricsMailet">
<metricName>mailetContainerRelayDenied</metricName>
</mailet>
<mailet match="All" class="ToRepository">
<repositoryPath>postgres://var/mail/relay-denied/</repositoryPath>
<passThrough>true</passThrough>
</mailet>
<mailet match="All" class="ToProcessor">
<processor>safe-bounce</processor>
</mailet>
</processor>
<processor state="relay-limit">
<mailet match="All" class="MetricsMailet">
<metricName>mailetContainerRelayLimit</metricName>
</mailet>
<mailet match="All" class="ToRepository">
<repositoryPath>postgres://var/mail/relay-limit-exceeded/</repositoryPath>
<passThrough>true</passThrough>
</mailet>
<mailet match="All" class="ToProcessor">
<processor>safe-bounce</processor>
</mailet>
</processor>
<processor state="remote-error">
<mailet match="All" class="MetricsMailet">
<metricName>mailetContainerRemoteError</metricName>
</mailet>
<mailet match="All" class="ToRepository">
<repositoryPath>postgres://var/mail/remote-error/</repositoryPath>
<passThrough>true</passThrough>
</mailet>
<mailet match="All" class="ToProcessor">
<processor>safe-bounce</processor>
</mailet>
</processor>
<processor state="rrt-error" enableJmx="false">
<mailet match="All" class="MetricsMailet">
<metricName>mailetContainerRRTError</metricName>
</mailet>
<mailet match="All" class="ToRepository">
<repositoryPath>postgres://var/mail/rrt-error/</repositoryPath>
<passThrough>true</passThrough>
</mailet>
<mailet match="All" class="ToProcessor">
<processor>safe-bounce</processor>
</mailet>
</processor>
<processor state="error">
<mailet match="All" class="MetricsMailet">
<metricName>mailetContainerError</metricName>
<onMailetException>ignore</onMailetException>
<onMatchException>ignore</onMatchException>
</mailet>
<mailet match="All" class="ToRepository">
<repositoryPath>postgres://var/mail/error/</repositoryPath>
<onMailetException>propagate</onMailetException>
<onMatchException>propagate</onMatchException>
<passThrough>true</passThrough>
</mailet>
<mailet match="IsSenderInRRTLoop" class="Null"/>
<mailet match="All" class="DSNBounce">
<onMailetException>propagate</onMailetException>
<onMatchException>propagate</onMatchException>
<attachment>message</attachment>
<prefix>Error: </prefix>
<passThrough>false</passThrough>
</mailet>
</processor>
</processors>
</mailetcontainer>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]