james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan M. Schwehm" <...@sfr-lawfirm.com>
Subject RE: Mailman Bridge Mailet
Date Sun, 07 Mar 2004 16:14:12 GMT

Just a comment about style and Java usage.   Based on my limited experience in 
programming and troubleshooting errors through a development project, I find 
cutting down on the use of global variables in a class lowers the chance that 
else editing your code will break it.

Even though MailmanBridge may not be modified by anyone else, this is just 
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 
used anywhere else in the class?

Anyway, that's my comment, and I don't mean to sound like I'm nit-picking,


>===== Original Message From "James Developers List" <server-
dev@james.apache.org> =====
>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
>list-announce:         "|/var/mailman/mail/mailman post list-announce"
>can now be expressed as:
><mailet match="RecipientIs=list-announce@localhost.localdomain"
>     <debug>false</debug>
>     <passThrough>false</passThrough>
>     <runAs>mail</runAs>
>     <wrapperPath>/var/mailman/mail/mailman</wrapperPath>
>     <program>post</program>
>     <argument>list-announce</argument>
>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.
>To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>For additional commands, e-mail: server-dev-help@james.apache.org

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message