This page goes through instructions on how to configure Apache James with Alfresco for demos or other purposes.
Apache James has a command-line utility. All you really need to do is configure it to run on a specific port and create a user account for it. James would be used for outbound mail. This way you can POP3 into James to retrieve any emails.
For inbound, you configure the internal mail server. Then you can setup the email client to use Alfresco for outbound. That way you create a little closed-loop type of system. For email, I suggest you pick up Thunderbird.
Basic Instructions for Setting it up with James as an Outbound Server:
Download James Server
On a windows box the default config is good, but on Linux or Mac, it's best to remap the ports. Here the changes you should make to <JAMES_ROOT>\apps/james/SAR-INF/config.xml:
* SMTP is listening on port 9025 * POP is listening on port 9110
To create an account to be used by Alfresco:
telnet to localhost port 4555 login/pw: root/root adduser alfresco alfresco
Now, you can set it up to route email to it from Alfresco. Configure the server to respond to <user>@localhost and <user>@example.com. example.com is a reserved domain name specifically for testing purposes... Edit custom-repository.properties thus:
See James Quickstart steps 11, 12 and 13 to send a quick email and to make sure it's received.
Now, you can configure your email client to point to James and send and receive emails through that account.
Note: to send email to Alfresco, you'll have to add a user to the EMAIL_CONTRIBUTORS group.
Additionally, you'll need to send it to a space, so you'll need to both lookup the space email id, make sure that the user from whom you are sending this has access to that space and is a member of EMAIL_CONTRIBUTORS group.
For the inbound email, follow these instructions
Unzip custom-email-server.sample.zip from extensions directory and edit custom-email-server.properties
email.inbound.enabled=true # The username to authenticate as when the sender address is not recognised #email.inbound.unknownUser=anonymous
# Email Server properties email.server.enabled=true email.server.port=12525 email.server.domain=alfresco.example.com
# A comma separated list of email REGEX patterns of allowed senders. # If there are any values in the list then all sender email addresses # must match. For example: # .*\@alfresco\.com, .*\@alfresco\.org # Allow anyone: email.server.allowed.senders=.*
Finally, the last bit is that your SMTP configuration on the mail client should point to the Alfresco server and not James... This allows you to SMTP to alfresco, and POP to James.
Using James to Relay Email to Alfresco Server
A more interesting setup would be to configure James to relay to the Alfresco server... The idea would be that the email clients can be pointed to James for both SMTP (sending) and POP3 (receiving). It all goes through James, and James then routes the messages accordingly.