2 Replies Latest reply on May 22, 2006 12:14 PM by mikezzz

    Fixing Mail Lists (esp Mike Barker and Kabir Khan)

    acoliver

      So I'm working on fixing the mail list code (broke in M4 when we moved to EJB3). I've gotten the mail to go to the queue now, but I'm a bit confused on what is supposed to happen next. I'm guessing there should be another deliverymdb instance that sucks the mail off the queue and puts it into another chain.

      However, I can't help but think this could be really simplified:

      0. leave the To: header to be the list address
      1. ADD (but do not remove the list address) every recipient of the list to the RCPT list (real tos)

      Possible drawbacks:
      0. For lists with a lot of members this could take to long
      1. or may hit some kind of bounds (its like a big BCC)

      So I never touched the mail list code before now (I think this was a Mike Barker and Kabir Khan thing) -- how did it work? Why does it need its own queue? Would the above alternative work?

        • 1. Re: Fixing Mail Lists (esp Mike Barker and Kabir Khan)
          kabirkhan

          This has grown a lot since I last took a look :-)

          My memory is a pretty fuzzy of why this was implemented as it is/how it works. I think the main idea is that if the message is for a list, it is placed on the maillist queue. The handling MDB then expands the list, and delivers the message to the local mailbox queue for the local users and to the remote mail queue for the list's remote users.

          • 2. Re: Fixing Mail Lists (esp Mike Barker and Kabir Khan)

            I only changed it to use Hibernate instead of Entity Bean (EJB 2). I didn't look at any of the actual delivery pieces. I made sure not to change any of the interfaces, I only added a new implementation to store the list addresses.

            I think your approach will work. One thing you could to is group messages by domain, and create 1 Mail object & JMS message per domain. This will allow delivery in parallel (perhaps help with performance). If you have lots of messages per domain, you may have to group the TO addresses for the same domain into blocks. I believe the SMTP spec says something that mail servers MAY restrict the number of RCPT TO headers.

            Mike.