Quickstart
From SharemailWiki
The quick start assumes you're installing on a Linux/Unix platform. Both James and Jalls will work on other platforms, but you'll have to interpret what to change to get things going yourself.
- Download and install Java 6 from http://java.sun.com
- Download the James binary distribution from http://james.apache.org/download.cgi (latest version at time of writing is 2.3.2). Unpack it to a directory
- Download the james-jalls.sar from https://sourceforge.net/projects/jalls/files/james-jalls.sar/download, this is simply the 2.3.2 james sar archive with the JALLS mailet added.
- Copy james-jalls.sar to the apps directory in the root of the directory where you unpacked James. In this directory rename james.sar to james.sar.dist. Rename james-jalls.sar to james.sar
- Update the config.xml file in apps/james/SAR-INF to include sections to enable and configure the JALLS mailet (a complete samhttps://sourceforge.net/apps/mediawiki/jalls/skins/common/images/button_bold.pngple config is available in the subversion respository)
Change the mailetpackages stanza so that it looks like this:
<mailetpackages>
<mailetpackage>org.apache.james.transport.mailets</mailetpackage>
<mailetpackage>org.apache.james.transport.mailets.smime</mailetpackage>
<mailetpackage>com.sharemail.james.mailet</mailetpackage> <! --add this line to enable JALLS -->
</mailetpackages>
Add a configuration stanza to the root processor:
<mailet match="RecipientIsRegex=(.*)@james.sharemail.com$" class="LDAPListMailet">
<LdapBindUrl>ldap://127.0.0.1/</LdapBindUrl> <!-- connection URL for the LDAP server -->
<LdapBindDn>cn=admin,o=users</LdapBindDn> <!-- dn of the user to bind as, must have rights to query the group -->
<LdapBindPassword>password</LdapBindPassword> <!-- password of the user to bind as -->
<GroupObjectClass>groupOfNames</GroupObjectClass> <!-- objectClass of groups in LDAP, used to narrow the search -->
<GroupNameAttribute>cn</GroupNameAttribute> <!-- names of attribute holding the name of the group which maches the mail address (the bit before the @) -->
<SearchContext>o=groups</SearchContext> <!-- where in the LDAP directory to start the search for groups -->
<MemberAttributeName>member</MemberAttributeName> <!-- name of the attribute on a group object which holds the DNs of members -->
<MailAttributeName>mail</MailAttributeName> <!-- name of the attribute that holds the mail address for user objects -->
<passThrough>FALSE</passThrough> <!-- whether mail processing should continue after the JALLS mailet is finished -->
</mailet>
This configuration will search for a matching group for any mail that is address to <group name>@james.sharemail.com and resend the mail to all its members. Please note that you may well want to add restrictions on who can mail the group. This can be achieved by configuring standard James mailets - see the James documentation at http://james.apache.org/server/2.3.2/index.html.
- Start James with bin/run.sh
