Hello Navid,
yes.
In your outgoing mailet
<mailet match="All" class="RemoteDelivery">
you configure a bounce processor:
<!-- By default we send bounces to the "bounce" processor -->
<!-- By removing this configuration James will fall back to hardcoded
bounce -->
<!-- notifications -->
<bounceProcessor>bounces</bounceProcessor>
.... skipped the rest here ....
</mailet>
Then you configure this bounces processor, here the default:
<!-- This processor handle the bounces from RemoteDelivery: As of James
v2.3, this is the new -->
<!-- Default. -->
<!-- DSNBounce properly create a DSN compliant bounce -->
<processor name="bounces">
<mailet match="All" class="DSNBounce">
<passThrough>false</passThrough>
<!-- optional subject prefix prepended to the original message -->
<!--
<prefix>[bounce]</prefix>
-->
<!-- message, heads or none, default=message -->
<!--
<attachment>heads</attachment>
-->
<!-- the message sent in the bounce, the first occurrence of the
pattern [machine] is -->
<!-- replaced with the name of the executing machine -->
<!-- Default: Hi. This is the James mail server at [machine] ... -->
<!--
<messageString>Here is [machine]. I'm not able to deliver this
message.</messageString>
-->
<messageString>Hi, this is the mail server at MyDomainOrWhatever.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out. Below
I include the list of recipients and the reason why I was unable to deliver
your message.
</messageString>
</mailet>
</processor>
</spoolmanager>
You should be aware that a "DSNBounce" is different from "Bounce".
There is a "Bounce" mailet, and a "DSNBounce" mailet. They could be used to
push a "bounce", but they behave differently.
I am not sure, but I think this is the way it could be handled:
The DSNBounce constructs a new mail. This new Mail object will "enter" the
James mail process.
That means, you could act on this new DSNBounce-Mail, and route the new
DSNBounce-Mail to another "RemoteDelivery".
You need to use a matcher like "HasHeader".
As code reference:
@see: org.apache.james.transport.mailets.DSNBounce.java
Greetings
Bernd
-----Ursprüngliche Nachricht-----
Von: Navid Allahverdi [mailto:[email protected]]
Gesendet: Dienstag, 3. Mai 2016 18:01
An: [email protected]
Betreff: James 2.3.1 config for bounces
Hi all,We are using James 2.3.1 and have a problem configuring bounces.We would
like the bounces to be sent through another mail-relay that the one the
original message came through.
Is that possible?
Thank you in advance,Navid
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]