James
Translated
Downloads
Current Documentation
Older Documentation
Project
Jakarta Information (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 August 2002.
|
Answers |
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.
|
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:
- 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.
- 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.
|
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 mailet.log file. Look for entries that include the text "RemoteDelivery". This should provide some high-level debug information of James' 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...).
|
What about IMAP support? |
IMAP development had been stalled, but has recently attracted new activity. IMAP support is scheduled for inclusion in James v3. In the meantime, there is experimental code in the repository. If you are interested in working on or trying the IMAP prototype code, join the james-dev mailing list and let us know.
|
What about support virtual hosting? |
James v2.1 includes a new mailet for database users, JDBCVirtualUserTable, that mimics some of the sendmail capabilities of the same name.
JDBCVirtualUserTable does not provide any administation tools.
You'll have to create and maintain the database table yourself. The
standard configuration is as follows:
 |  |  |
 |
CREATE TABLE VirtualUserTable
(
user varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY (user,domain)
);
|  |
 |  |  |
The standard query used with VirtualUserTable is:
 |  |  |
 |
select VirtualUserTable.target_address from VirtualUserTable, VirtualUserTable as VUTDomains
where (VirtualUserTable.user like ? or VirtualUserTable.user like "\%")
and (VirtualUserTable.domain like ?
or (VirtualUserTable.domain like "\%" and VUTDomains.domain like ?))
order by concat(VirtualUserTable.user,'@',VirtualUserTable.domain) desc limit 1
|  |
 |  |  |
For a given [user, domain, domain] used with the query, this will
match as follows (in precedence order):
- user@domain - explicit mapping for user@domain
- user@% - catchall mapping for user anywhere
- %@domain - catchall mapping for anyone at domain
- null - no valid mapping
A sample mailet looks like:
 |  |  |
 |
<mailet match="All" class="JDBCVirtualUserTable">
<table>db://maildb/VirtualUserTable</table>
</mailet>
|  |
 |  |  |
More generalized viirtual hosting is something the developers are still discussing. One issue 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 support a 'mapping' or 'translation' convention, 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. With the current user model, 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 matcher.
Virtual hosting is one of the most requested features, and additional work is scheduled for the 3.0 release.
|
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.
- Instructions for including classes for custom mailets and matchers can be found here and here respectively..
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.
|
How do I upgrade to a newer version of James? |
- Rename the previous james directory into a james.old
- Run phoenix to let the new james.sar be deployed.
- Copy config.xml from james.old to the new deployed james/conf directory
- Replace the var directory by the previous var directory. This will copy over user accounts, inboxes, spools, and whatever else.
- Restart James.
|
Why isn't my mailet making changes to a MimeMessage? |
Check the JavaMail docs. Per the API, when you call MimeMessage.setContent(blah), you have to call saveChanges() to apply your changes. James tries to automatically call this method so you don't have to, but in certain cases you'll still have to call saveChanges().
|
How to remove unneeded services like NNTP, POP3? |
The following information is based on James 2.0a3, but the
upcoming 2.1 version should be similar.
NNTP and other underlying services are called "blocks" in the
Avalon Phoenix terminology. Blocks are specified in the
assembly.xml file which is located in the apps/james/SAR-INF directory (2.1)
or apps/james/conf directory (2.0a3). Note: this file is created
during the first startup of James.
There are dependencies between the blocks, which you can read from
the file. For example the SMTP Server block depends on the
users-store block, so if you want SMTP then you cannot remove the
users-store block even if you only want to relay messages.
To remove the NNTP Server comment out the following blocks:
NNTP server, NNTP Authentication Service, NNTP repository.
To remove the POP3 Server comment out the POP3 Server block.
If you remove a block it wont't be loaded next time you restart
James. You must also remove all sections related to the removed
blocks from the James configuration file - config.xml - otherwise
you will get error messages, saying that there is no corresponding
block.
|
I am using Microsoft's SQL Type 4 JDBC Driver, why do I get a "Can't start manual transaction mode because there are cloned connections" exception? |
I am using Microsoft's SQL Type 4 JDBC Driver, why do I get the following exception? java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start manual transaction mode because there are cloned connections.
This seems to be a problem with the Microsoft Type 4 JDBC Driver and concurrent statements/transactions/resultsets on the same database conntection.
To solve this you need to add ;SelectMethod=cursor to the end of your dburl string. Your dburl string would then look something like this <dburl>jdbc:microsoft:sqlserver://dbserver.host.name:1433;SelectMethod=cursor</dburl>
NOTE: some people have complained about performance when using this option, the alternative is a 3rd party JDBC driver but these are often not free.
|
|
|