Dashboard > SakaiPedia > ... > Tools and Components > Configuring Mail
  SakaiPedia Log In | Signup View a printable version of the current page.  
  Configuring Mail
Added by Mark J. Norton, last edited by Tony Atkins on Mar 01, 2007  (view change)
Labels: 
(None)

Glenn Golden

James is not supposed to be handling outgoing email, only incoming.

The "smtp" setting in your config is to identify the smtp server to contact for outgoing email.

While it's an interesting idea to point at your local James for this, this is not something I've ever tried. I recommend you setup a valid smtp server that will take mail from your application server.

All that said, I have seen James take over outgoing email even when so configured with a valid smtp server not localhost, which is naughty of it, and not a great idea, because of problems I've seen in the way it does this. This is one reason we don't run James on port 25 in our environments.

Clearing WAR Files when James is Changed

Worth mentioning- when you change your configuration in any way related to James / incoming mail processing, you must clear the sakai- james webapp expanded folder, leaving just the .war behind in your Tomcat webapps, as James does write it's configuration files as it starts up in part from from sakai.property settings, and will not do that again unless the expanded .war folder is missing.

Glenn Golden on mail in Sakai 2.2

We have had the TestEmailService enabled so far in 2.2. This causes any attempt to send mail from Sakai to not be sent out, but be logged to catalina.out instead.

I've just combined this functionality with the normal email service. If you set the "testMode" configuration parameter, email will not be sent, but instead it will be logged. This is very nice when working with test servers that might have real users and email addresses.

By default, the service will send mail. You can enable the test mode with this in your sakai.properties:

testMode@org.sakaiproject.email.api.EmailService=true

Max Recipients

Nuno Fernandes wrote:

We are dealing with a problem in our institution related to the way that EmailService implements sendMail(). Currently, if an announcement is placed on a 500 users site with email notification turned on, 500 connections to the SMTP server will be made. This has a terrible performance impact on our SMTP server.

Stephan Maquard replies:

This is fixed in 2.3. You can set the max recipients per outgoing email in sakai.properties. It defaults to 100, which is the minimum that the RFCs say an smtp server should accept:

maxRecipients@org.sakaiproject.email.api.EmailService=100

So with this configuration, Sakai would generate 5 emails with 100 recipients each, rather than 500 individual emails.

Postmaster Configuration

Zach Thomas

Anyone out there know what the !site mailarchive channel is used for? The XML for it looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<channel context="!site" id="postmaster" next-message-id="1">
    <properties />
</channel>

So is this an email archive for postmaster? What (if anything) sends messages to it? And if it is an archive, is there a site set up to view it?

Glenn Golden

As I recall (and I have to dig far back here), the idea was that you might want to get, not just reject, mail to Postmaster, and that by enabling this channel, that would happen. Would have to check the code in the mailet to see - there should be some reference to this.

Or else it is just old junk.

Zach Thomas

I looked at SakaiMailet.java and didn't see a mention of it, but maybe I didn't study it long enough.

Issue with James running on port 25 breaking outgoing mail is now logged in Jira as http://bugs.sakaiproject.org/jira/browse/SAK-1450

I have had all sorts of trouble getting James not to try and handle outgoing mail. If you pass tomcat the java system property -Dmail.smtp.host=<host ip> , this seems to work. IIRC, when I looked into this, the code was somehow always using 'localhost' for outgoing mail for some reason.

Site running on a free Atlassian Confluence Open Source Project License granted to Sakai Foundation. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.5 Build:#811 Jul 25, 2007) - Bug/feature request - Contact Administrators