Re: Custom mailet question

Benoit TELLIER <[email protected]>
Newsgroups gmane.comp.jakarta.james.user
Message-ID <[email protected]>
Hello Matt

On 30/06/2022 20:48, Matt Pryor wrote:
> Hi there, we are currently running James 3.4.0.
Upgrade to 3.7.0 advised.
>
> I am looking to create two implementations of Mailet to do the following:
>
> 1) Store message ID and a custom header in a database table after email has
> been submitted via smtp
> 2) Update table with failed status if the email bounces
>
> Please can you let me know how I can obtain the message ID, is it in an
> attribute and if so which one?
You can obtain it from the email's mime message error.

Eg: mail.getMessage().getMessageID()

Careful you might need to handle a null value...
>
> Where in mailetcontainer.xml should I define the custom mailets? I am
> thinking that the first one should go in the transport processor, before
> RemoteDelivery mailet (but after the DKIM mailet), and the second should go
> in the "bounces" processor, after DSNBounce but would appreciate
> confirmation.
Looks good to me ;-)
>
> Many thanks for your help.
> Matt
>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.