You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Wojtek <wo...@unir.se> on 2024/08/21 09:12:08 UTC
Catch-all handling - current best practices
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?
--
Wojtek
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Catch-all handling - current best practices
Posted by Wojtek <wo...@unir.se>.
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-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org