Why is my email taking a long time to arrive?

TeamForge uses the James MTA to send and parse all email coming to and from the system. In this case, the best course of action is to look in the james mailet logfile.

Your logfile will help you to determine what is going on with the emails that are being sent from your system. Your logfiles will look very similar to this:

07/02/07 07:54:43
INFO James.Mailet: ?RemoteDelivery: 
Attempting delivery of Mail1170135534355-39088-to-domain.invalid to host domain.invalid at 192.168.0.1 to
addresses [invalid.user@domain.invalid] 07/02/07 07:55:43 
INFO James.Mailet: ?RemoteDelivery: Could not connect to SMTP host: 192.168.0.1, port: 25; nested exception
is: java.net.?ConnectException: connection to 192.168.0.1 timed out 07/02/07 07:58:43
INFO James.Mailet: ?RemoteDelivery: Storing message
Mail1170135534355-39088-to-domain.invalid into outgoing after 7 retries 07/02/07
07:58:43 INFO James.Mailet: ?RemoteDelivery: Attempting delivery of
Mail1170831482124-2756-to-company.com to host mx.company.com. at 127.0.0.1 to addresses
[good.user@company.com] 

As you can see, the James MTA stores outgoing emails to resend at a later time. These files can be located in this directory: /opt/collabnet/teamforge/james/james-<ver>/apps/james/var/mail/outgoing/

When you do a directory listing of the files, you will see a listing of files very similar to this:

4D61696C313137303833323131343031322.Repository.?FileObjectStore
4D61696C313137303833323131343031322.Repository.?FileStreamStore 

The FileObjectStore is a binary file, but, the FileStreamStore can be viewed with an editor or your favorite paging program in order to determine the contents. Sometimes, the directory can grow to a large number, where you will not be able to use a standard bash expander to delete all of the files. In that case, use the following shell script to remove all of the objects from the outgoing directory:

for i in * ; do /bin/rm $i; done