Digging more into it, one could use Forward with `forwardto`, Resend with `to` or Redirect with `to` but the problem I see - they all require configuring full email address instead of specifying only username, which could be somewhat problematic on installations with multiple domains.

Is there a mailet or a configuration that would allow specifying only local mailbox name instead of full email?

Wojtek

On 21/08/2024 11:12, Wojtek wrote:
Hi all,
what is the current best practices to add handling of "catch all" use case (i.e. redirect all messages that do not match - and only those that doesn't match! - existing mailbox to "catch all" mailbox)?

I found https://cwiki.apache.org/confluence/display/JAMES2/ConfigureJamesAsCatchAll but it's from 5 years ago and doesn't even mention version. From the looking at it, it would redirect all messages to "catch-all".

OTOH I found https://github.com/foilen/james-extra-components but it hasn't been update since 5 years as well.

Currently we have:
```xml
<processor state="transport" enableJmx="true">
…
     <mailet match="HostIsLocal" class="ToProcessor">
         <processor>local-address-error</processor>
         <notice>550 - Requested action not taken: no such user here</notice>
     </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>
```

I would assume that changing last mailet (ToRepository with error repository) to some mailet. I looked a the list and mailets in the sources but none of them seems to fit it.

Any suggestion how to configure it?



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org

Reply via email to