7 Replies Latest reply on Apr 6, 2004 12:36 PM by Andrew Oliver

    MailLog considered harmful and other bugfixes

    Andrew Oliver Master

      In the process of tracking down a bug I ran into the nasty mail log thing again. It was a dumb idea when I implemented it. Or rather it was a good idea with HORRIBLE tradeoffs. I wanted to be able to turn on and off conversational logging from the JMX Console or some similar tool. The nasty tradeoffs were:

      a divide between our normal log4j logging and this logging.
      a disgusting amount of passing around MailLog references which made the code nasty

      We do loose the functionality of a on and off switch but we still can turn conversational logging on and off at runtime with a mere log4j Appender and/ or grep for "LoggingInputStream" or "WrappedWriter". Here is my log setup:

      (normal with the addition near the end of)









      <appender-ref ref="JBMAIL"/>


      Lastly the bug I tracked down was in AUTH method PLAIN (AUTH PLAIN). A code change had assumed that the parameter to AUTH would have NO spaces after "AUTH " and concatanated it. Acutally AUTH PLAIN takes a parameter after plain which is the users BASE64'd password. This was being concatinated with PLAIN which made any client (such as mozilla's thunderbird mail client) just seem to hang. Bummer. I fixed the change to only kill carriage returns and tabs and the such. It was MUCH easier after I simplified the logging.

      Any other thoughts on this? Objections? Questions? Comments? Social Criticisims?

        • 1. Calendar Server proposal
          Andrew Oliver Master

          Hi all,

          I have been prototyping a calendar server, and I am curious to hear people input on it:
          http://sourceforge.net/projects/themoses

          My goal was to create a core set of services to manage calendar, addressbook, possibly todo's since most of the free and even major commercial calendar servers lack programmable API's to schedule events.

          The implementation is based on JBoss and technologies that should be very similar to what you guys use. I got a couple of things working:
          - AddressBook.
          - Calendar/ Group schduleing.
          - Live Ical export for integration with Mozilla Calendar.
          - Templateable email notification of invitation and meeting changes.

          I am working on:
          - VCard, FBURL, VFreeBusy to allow some integration with Outlook and Evolution.
          - LDAP replication of Address Book for OutLook and Mozilla (maybe Evolution).

          I think with Mozilla Calendar and Mail it would be a viable solution.

          The reason I write to you is because I was looking to integrate with a mail server for IMIP implementation. Haveing a hook to a mailserver would allow to implement IMIP scheduleing and intercept mail for processing. It would open the door to better interoperability with Evolution, and maybe Outlook(I read somewher it does some IMIP).

          Also since the persistent state is centralized it could be exposed many other ways:
          -to the mobile too via WAP, and syncML with Sync4j.
          -CAP if somebody ever gets a free CAP client working.
          -SOAP.

          I really think that having an open and functional backoffice server would allow integration of custom workflows and IT soultions with the desktop in a much more coherent way than it is done today.

          So what you guys think?

          Aron

          • 2. Re: MailLog considered harmful and other bugfixes
            Andrew Oliver Master

            the log4j sniplet I posted didn't come through all the way. I'll repost it on the wiki when I write the docs for mail services M1. This week I'm mostly testing, fixing bugs and writing docs (aka the dirty work). I'm counting on you guys to nail the few final issues.

            • 3. Re: MailLog considered harmful and other bugfixes
              mike andrews Newbie

              i share the blame for propagating this mail log stuff (see my earlier forum post and cvs commits), sorry.

              but would still be nice to treat conversational logging specially and be able to manage logging via jmx, as opposed to manually going in and redeploying log4j.xml. only way to treat conversational logging specially is to augment the simple Logger.getLogger(...) log4j factory with other factories that create client or server loggers. we have that option now from our mail log mbean.

              so maybe what we need instead is a generic jmx interface to log4j then, and not just for jboss-mail? that would benefit the whole jboss platform as well.

              • 5. Re: MailLog considered harmful and other bugfixes
                mike andrews Newbie

                thanks --- looks like someone halfway beat me to it though --- i'm looking in 3.2.4RC2, and there's an mbean called "jboss.system:service=Logging,type=Log4jService". folks can take a peek to see what it offers.

                doesn't seem as fine-grained as what we're talking about, and rather seems to rely on redeployment of the log4j.xml configuration file for full manageability.

                • 6. Re: MailLog considered harmful and other bugfixes
                  Andrew Oliver Master

                  Lets put this off though. We need to focus on getting M1 out and planning for what goes in M2. I posted some ideas on the wiki (refined the planning). It is ambitious but we can revise it as needed.

                  • 7. Re: MailLog considered harmful and other bugfixes
                    mike andrews Newbie

                    absolutely. its in my to-do list at low priority, so it won't get touched till all our M1 stuff gets done.