On 30.06.22 3:48 PM, Matt Pryor wrote: > Hi there, we are currently running James 3.4.0. > > 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? > To get the Message-ID, you must first get the message from the mail, i.e. mail.getMessage().getMessageID() But keep in mind that not all messages necessarily have a Message-ID, so this may be null.
> 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. > Basically sounds good, really depends on your mailetcontainer.xml, I don't know what the default was in 3.4.0. Do you only want to track outbound mails coming from local users going to remote servers? Or also inbound mails coming from remote servers to local users? What if they go from local to local? Best to draw the graph of ALL possible paths a mail can travel, starting from the "root" processor and keeping in mind it could switch to "error" at any time. (Some branches are easy to overlook, e.g. bounceProcessor on RemoteDelivery if you use this option.) The graph will tell you where you need to place your mailets. > Many thanks for your help. > Matt > Cheers, Karsten --------------------------------------------------------------------- To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org