JAMES - Java Apache Mail Enterprise Server

James

Download

Guides

Project

Jakarta Information {web}

Jakarta Essentials {web}

Related Projects {web}

This FAQ

This is a living document that provides answers to common questions about James, installation, configuration, admin and running not already answered in the documentation. Last Updated February 2002.


Questions


Answers
Would you please teach me how to set up a mailing list

James currently (v2.0a2) includes only the most basic list functionality, users can subscribe and unsubscribe, but there is no moderation of messages or subscriptions

To enable a list you need the following in config.xml in the root processor block and above the final mailet block -

<mailet match="CommandForListserv=james@localhost"
    class="AvalonListservManager">
    <repositoryName>list-james</repositoryName>
</mailet>

that will intercept the command emails sent to

  • james-on@localhost to subscribe the sender
  • james-off@localhost to unsubscribe the sender

and-

<mailet match="RecipientIs=james@localhost" class="AvalonListserv">
    <membersonly> false </membersonly>
    <attachmentsallowed> true </attachmentsallowed>
    <replytolist> true </replytolist>
    <repositoryName>list-james</repositoryName>
    <subjectprefix>JamesList</subjectprefix>
</mailet>

Which will distribute the mail to the current subscribers

in addition to the above you need to have a repository configured in the users-store block(usually near the bottom of config.xml) like so (database)-

<repository name="list-james"
    class="org.apache.james.userrepository.ListUsersJdbcRepository"
    destinationURL="db://maildb/lists/list-james">
    <sqlFile>file://conf/sqlResources.xml</sqlFile>
</repository>

Database users will also need to ensure that they have configured a data-source named to match the destination URL

Using the filesystem:-

<repository name="list-james"
    class="org.apache.james.userrepository.UsersFileRepository">
    <destination URL="file://var/lists/list-james/"/>
</repository>

Restart James, send a mail to james-on@localhost and you should be subscribed.

The repository, be it a database table or directory in the filesystem will be created automatically.

Database users can manipulate the users repository using SQL, and hence any application capable of running SQL queries against it.
Danny Angus


James seems to be an open relay for Spam, is it?

In some simple tests of mail relays James appears to be an open relay, properly configured it is not.

Because James is an email application platform it currently accepts all mail delivered to it via SMTP for processing. Only after the mail has been recieved does this processing begin.

This means that James accepts Spam. However the default configuration, and any sensible re-configuration has a number of anti-spam measures which will prevent the re-transmisson of spam from James. This makes it a blackhole for spam.

This also means that James will not verify addresses, but of course this means that valid addresses can't be harvested from James by spammers either.
Danny Angus


I can send messages to James, but nobody is receiving them. What do I do?

Check that you've added valid DNS servers to your James installation. Email delivery requires the use of special mail related DNS information (MX records), so James needs to explicitly be given DNS servers. Look at your config.xml file for a <dnsserver> section and add one or more DNS servers.
Serge Knystautas


I can send people messages via James, but nobody can send me messages. What do I do?

You need to do one of two things:

  1. Update your domain's DNS entries so there are MX records that point to the machine that is running James. Note that it is illegal for MX records to point to IP addresses. You need to point MX records to a valid CNAME or A name entry, and then map that eventually to an IP address.
  2. You could alternatively give people an email address with IP addresses. Most people will think it's a very strange email address, but hello@[192.168.0.1] is a valid email address. Note that you need to wrap the IP address in brackets.
Serge Knystautas


I'm trying to debug messages that James is trying to deliver. Where should I look?

First step is to look in the log directory at the James.Mailet.log file. Look for entries that include the text "RemoteDelivery". This should provide some high-level debug information of James's attempt to delivery mail remotely.

If you want to delve into the code, look at the RemoteDelivery mailet. You may also want to review the mail repository source code for the repository type you are using (file, db, etc...).
Serge Knystautas


What about IMAP support?

Unfortunately IMAP support is currently stalled. There is a proposal in CVS, but IMAP is a significantly more complex than other mail protocols, both from a protocol command support and in terms of complexity you need on the server. If you are interested in taking the proverbial ball and running with it, we would all very much appreciated. (I personally am incredibly frustrated with an old Netscape Mail server, but I've sworn myself to upgrade only to James's IMAP once ready as incentive.)
Serge Knystautas


What about support virtual hosting?

Virtual hosting is something the developers are still wrestling with. The challenge is that POP3 does not support virtual hosting in that it does not have a command to indicate what domain the user is in. What this means is the mail server needs to develop a 'mapping' or 'translation', e.g., 'user1@domaina.com' gets a username 'domaina.user1'. This allows the mail server to have a single username namespace. We have seen a few good proposals put forward, but nothing that seemed the clear solution as ideally we could have this part solve the next issue.

Beyond that, James needs to refine virtual hosting for mailet processing. The mailet API has a Mail.getUser() method that no longer would be useable as a reliable indicator of whether they were in the local username namespace. To date we are unclear of the best way to bring this translation into the mailet processing. Similarly, it would be nice to support different mailet processing based on the domain, although this is somewhat feasible using the limited processing flow offered with a HostIs/ForwardTo combination.

This is one of the most requested feature, so hopefully this will be resolved soon.
Serge Knystautas


Where do I stick classes and jars?

We are largely reliant on what Avalon is doing in terms of classloading, but here are a few tips and suggestions:

  • Stick jars in the james/lib directory and add them to the classpath in run.bat or run.sh.
  • Custom mailets and matchers must be included in the james.bar (which is just a zip like a jar or war file).
Eventually we hope to support mailet reloading and a special lib and classes directory within the james directory that custom mailets can load from, but for now these are hopefully some useful tips.
Serge Knystautas




Copyright © 1999-2002, Apache Software Foundation