> > IIRC, the one caveat is that NotifiySender is currently hardcoded
> > to notify the Postmaster as well, because it assumes that the
> > message is a problem.
> Are you sure?
Not entirely, no, and the more I read, the more I think I was mistaken.
I had taken a quick look and found this:
//Create the list of recipients in the Address[] format
InternetAddress[] rcptAddr = new InternetAddress[1];
rcptAddr[0] =
getMailetContext().getPostmaster().toInternetAddress();
reply.setRecipients(Message.RecipientType.TO, rcptAddr);
which I initially took to mean that we were setting the recipient to be the
postmaster address. I now believe this code to be incorrect but "harmless."
Later on we have (edited for brevity):
//Create the list of recipients in our MailAddress format
Set recipients = new HashSet();
recipients.add(mail.getSender());
...
//Send it off...
getMailetContext().sendMail(notifier, recipients, reply);
So we have two sets of recipients: one set in the MimeMessage, and another
carried within the MailImpl object. Without knowing the convention used
within JAMES, which we should document, there is no way to know which set of
recipients will be used without tracing the code all the way to
Transport.send[Message](). One way of using the transport overrides the
recipients in MimeMessage, the other doesn't. As best I can tell from
RemoteDelivery, the convention in JAMES is to put the real recipients in
MailImpl's collection, allowing the MimeMessage to have "display names"
(e.g., a list name).
If this understanding is correct, my earlier interpretation is wrong.
Either way, we really should document the convention and clean up the code.
Furthermore, if I am correct as to how we are using the recipient list(s),
I'd like to suggest that the MimeMessage's recipient list be used as the
real list unless MailImpl's collection is not null. That would eliminate
the potential for error and cut down on redundant data. And it is a
backwards compatible change.
FWIW, the sample configuration in the Javadoc still refers to
NotifyPostmaster.
--- Noel
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>