Hi, Just a comment about style and Java usage. Based on my limited experience in programming and troubleshooting errors through a development project, I find that cutting down on the use of global variables in a class lowers the chance that someone else editing your code will break it.
Even though MailmanBridge may not be modified by anyone else, this is just something to keep in mind. For example someone could mess with the variable 'headers' somewhere else in the class, so why not just use a local variable when headers isn't used anywhere else in the class? Anyway, that's my comment, and I don't mean to sound like I'm nit-picking, Jonathan >===== Original Message From "James Developers List" <server- [EMAIL PROTECTED]> ===== >Hi, James Developers, > >I wrote a first draft of a "Mailman Bridge Mailet" and have attached it. > I would really appreciate feedback on the use of the Mailet API, as >well as any comments/criticism on style, format, or Java usage. > >The MailmanBridge Mailet "pipes" mail to Mailman. The intent is for >James to be used as the MTA in (former) Postfix and Sendmail >environments. Each line of what was once an /etc/aliases alias mapping >can now be represented as a mailet block in James' config.xml. What was >formerly: > >list-announce: "|/var/mailman/mail/mailman post list-announce" > >can now be expressed as: > ><mailet match="[EMAIL PROTECTED]" >class="MailmanBridge"> > <debug>false</debug> > <passThrough>false</passThrough> > <runAs>mail</runAs> > <wrapperPath>/var/mailman/mail/mailman</wrapperPath> > <program>post</program> > <argument>list-announce</argument> ></mailet> > >I currently have it running on two personal lists and so far so good. > >As for enhancements, I plan on reworking the config, so the XML is less >verbose and, hopefully, to reduce the sheer number of Mailets, since it >currently operates as one Mailet per Mailman alias. > >I built it against the latest from CVS, which identifies as "James Mail >Server 3.0a1." This Mailet drops into >org.apache.james.transport.mailets and I call 'ant' to build it right >into the distribution. I am running it on Fedora Core 1 with >mailman-2.1.4 and j2sdk1.4.2_03. > >-enrique > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
