I found a clue toward figuring why James-generated bounces are going to the Reply-To header. When I look at the spool files corresponding to messages that are being retried, I find no Return-Path headers in them. So I suspect that when these messages eventually fail all the configured retries, James sends a bounce message, finds no Return-Path, and uses Reply-To instead. This doesn't explain why fast fails are also bouncing to the Reply-To, but I'll generate a whole bunch of fast fails and see what happens.I'm finding that James is responding to some fast fails with[...]
a bounce message to the email address specified in the
Reply-To: header rather than the Return-Path.
I don't know why you don't have a Return-Path: header off-hand, but that is
the cause of your problem. I'm not entirely sure that we need to be using
the header. I would have to review the RFC, again, but I believe that
Mail.getSender() would provide a suitable value. [...]
I'll also generate a large bunch of fast successes so I can eyeball some of the spooled files before they get sent.
-- Bosco
