Hello We can add a new attribute to those mail and have a companion "SentByWebAdmin" matcher ?
Would you like to contribute this? -- Best regards, Benoit TELLIER General manager of Linagora VIETNAM <https://linagora.vn>. Product owner for Twake-Mail <https://github.com/linagora/tmail-flutter> product. Chairman of the Apache James project <https://james.apache.org/>. Mail: [email protected] Tel: (0033) 6 77 26 04 58 (WhatsApp, Signal) On Nov 11, 2026 at 9:41 AM, Felix Auringer via server-user <[email protected]> wrote: > Hey, > > I found my mistake. > Because we had problems with our mail queue in the beginning, we > sometimes had to manually respool emails. > With my configuration, they were treated as emails from external. > However, because most of these emails had an internal sender and > recipient, they were delivered normally. Only the ones with an external > recipient resulted in the relay-denied error, so I did not make the > connection at that time. > > To fix this issue, it would be nice if it was possible to select emails > sent via the webadmin API via matchers. As far as I can tell there is no > matcher and also no attribute on the email that would allow for > something like that, am I correct? > > Best regards, > Felix > > --- > Gesellschaft für Interkulturelles Zusammenleben gGmbH (GIZ) > Felix Auringer (er/ihm) > Softwareentwickler > > Reformationsplatz 2 > 13597 Berlin > > Tel: -; Fax: +4930513010009 > www.giz.berlin; [email protected] > > Amtsgericht Charlottenburg HRB 200872 B > Geschäftsführerin: Dr. Britta Marschke > > On 2026-10-28 09:44, Felix Auringer via server-user wrote: > > Hey Benoit, > > > > In the last 8 days, there is only one log line including 'requeued'. > > That was during a server restart because James tried to enqueue > > something and that action was interrupted by the shutdown. > > Sadly, I do not have debug logs of those emails, otherwise I could > > probably trace their way through the mailetcontainer myself. > > We are having some issues with the queue, so maybe that could be the > > reason for the requeuing. > > But is it expected that the SMTP authentication attribute is lost when > > an email is requeued? > > > > Anyway, we only observed the requeuing a few times, it's nothing > > urgent. Thanks for looking into it, Benoit! > > I just wanted to check that I did not make any obvious configuration > > mistakes in my mailetcontainer. > > > > 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 > > > > On 2026-10-27 19:09, Benoit TELLIER via server-user wrote: > >> Hello Felix > >> > >> Having a look... > >> > >> Setting bounceProcessor to remote-error sets the mail itself. It's > >> remote-error responsibility to generate the bounce. > >> Which is done here (DSNBounce) bounces are emmited as new mails who > >> undergo mail processor from the root processor and have their own > >> state (sentByMailet). > >> Failures in DeliveryRunnable are not sent to error processor as they > >> are out of the mailetcontainer. Remote delivery errors are bounced, > >> dequeing issues dead-lettered or requeued. > >> > >> Any log "Mail is requeued with increased failure count" ? > >> > >> Also do you have logs in DEBUG mode with MDC of such a respooled mail > >> ? > >> > >> -- > >> > >> Best regards, > >> > >> Benoit TELLIER > >> > >> General manager of Linagora VIETNAM <https://linagora.vn>. > >> Product owner for Twake-Mail > >> <https://github.com/linagora/tmail-flutter> product. > >> Chairman of the Apache James project <https://james.apache.org/>. > >> > >> Mail: [email protected] > >> Tel: (0033) 6 77 26 04 58 (WhatsApp, Signal) > >> > >> On Oct 26, 2026 at 12:48 PM, Felix Auringer via server-user > >> <[email protected]> wrote: > >> > >>> 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] > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected]
