Tuesday, May 18, 2010

Mounting Alfresco as an IMAP Mount Point in Outlook 2007

A new feature from Alfresco version 3.2 is the ability to mount the repository within email clients that support IMAP.  I thought that I'd give it a try and I found that it is pretty easy to set up.

I'll show here what I did to get it to work within Outlook 2007 running on a Windows development machine.

Since I'm running on a development machine, I typically use localhost as the root location for my Alfresco URLs.  When trying to set up the IMAP user account in Outlook it doesn't seem possible to be able to define the IMAP mount point source to be localhost.  The Alfresco wiki pages for IMAP also recommend against using localhost.  To get around that, I defined a dummy domain name in my local hosts file.  On a production machine, just use the domain name for that machine.

In c:\Windows\system32\drivers\etc\hosts I added the following line at the top, leaving the entry for localhost in tact in the file (my apologies to the owner of this domain name).

127.0.0.1       xxxxxx.com
127.0.0.1       localhost

In the alfresco_globals.xml file, I uncommented two lines near the bottom of the file, one to enable IMAP and the other to set the server host name we just defined.:

#
# IMAP
#-------------
imap.server.enabled=true
#imap.server.port=143
imap.server.host=xxxxxx.com

After making that change, I recycled the Alfresco server.

Next I brought up my Outlook 2007 client and went through the following screens of the wizard for adding a new account.  Start at Tools -> Account Settings...

1.  Click on the Add button of the dialog to start the process for mounting the IMAP point in Alfresco.


2.  Select the default top option radio=button for adding a POP3, IMAP,...

 3.  Select the option on the bottom of the dialog to "Manually configure..." and then  click Next.


4.  Select "Internet E-mail" which has the IMAP option, and click on Next.
 5.  Next fill out the credentials for being able to connect to Alfresco IMAP.  Here I use the dummy domain name that we defined in the hosts file - xxxxxx.com.  I use the login information for the Alfresco admin user.


6.  Click Next and we are finished.


7.  After a few seconds pause, on the left navigation panel, you should see the Alfresco IMAP Point successfully mounted. 

8. Click through on the Alfresco IMAP folder and you'll see folders of the Alfresco repository.



Not all folders have yet been enabled for display in the IMAP Alfresco folder hierarchy.  I'm currently working with my Records Management site within Alfresco, so I log into Alfresco share, and from the Share main dashboard, I'm able to mark the Records Management folder as an IMAP favorite.  After doing that, the records management site folders also are available from within Outlook.


In Outlook I can see the following in the left folder navigation area:


From within Outlook I can now drag my emails from my Inbox into the Alfresco IMAP storage.  For example, I drag an email into the US20040249606 Folder of the Patents Category.  From Share Records Management, I see the following:



There is a new entry:  Message_755.eml.

Wednesday, May 5, 2010

Upload Files to Alfresco via Email -- Inbound Emails

"Data Ingestion"  -- that's the process of getting files and data into your content management system, and Alfresco makes it easy.  My favorite example is being able to drag-and-drop to a mounted Alfresco CIFS drive.  Alfresco 3.2R also introduces drag-and-drop within IMAP-compatible email clients like Outlook, which is pretty slick.

But there's another option that you may not know about that has been part of standard Alfresco for a while and it's something that you may find to be very handy.  That's the uploading of emails sent to an Alfresco email address.  This feature lets users send emails with attachments to Alfresco for archival.  Only emails coming from designated users whose originating email address matches the email address that Alfresco knows from the user profile are accepted.  This is a great option for people out in the field to be able to simply email in data and files that they need to be stored in the Alfresco repository.

You still need to use the Alfresco explorer JSF client to set it up, but once you've got it setup, you can file data into the Records Management module, an Alfresco Share site document library, or anywhere in the repository.

Step 1 -- Setup and Start the Alfresco Email Server
Edit the file Alfresco/tomcat/shared/classes/alfresco-global.properties.  Change the section in the file called "Alfresco Email Server" as show below. Basically, I've uncommented the email.server.* and email.inbound.* properties.  For the variable email.server.domain, I entered the name of the server where Alfresco is running.  In my case, I am testing on an Amazon EC2 instance, so I've entered the Amazon Public DNS for my instance.

In this case, I've set the email.server.port value to 25.  You might want to verify that there is no email server already running on the Alfresco server machine and listening to port 25.

On Linux to check this, I run the following command:
netstat -nap --inet | grep 25

On Windows, you could just run netstat.


After making those changes, I stop and restart the Alfresco server.

# Alfresco Email Service and Email Server
#-------------

# Enable/Disable the inbound email service.  The service could be used by processes other than
# the Email Server (e.g. direct RMI access) so this flag is independent of the Email Service.
#-------------
email.inbound.enabled=true

# Email Server properties 
#-------------
email.server.enabled=true
email.server.port=25
email.server.domain=ec2-184-73-58-194.compute-1.amazonaws.com
email.inbound.unknownUser=anonymous

# 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=.*


Step 2 -- Set Alfresco User Emails
Enable Alfresco users to be able to submit email uploads by starting up the Alfresco explorer client and going into the Admin area.  For each user that will be enabled for email submit verify that the email address entered in their Alfresco profiles match the address that they will be using when submitting emails.

Step 3 -- Add Users to the EMAIL_CONTRIBUTORS group
While still in the Alfresco administration area on the Alfresco explorer client, go into group administration.  Make sure that all users that are to be enabled to submit email uploads to Alfresco are part of the Alfresco group EMAIL_CONTRIBUTORS.

Step 3 -- Setup email aliases for Alfresco folders (spaces)
Identify which folders in Alfresco that you'd like users to be able to submit to.  To do that, navigate to each of the target folders in the repository.

For example, here is a new folder in my user home area that is called "Email Inbox"
On examination of the properties for this folder, you can see an entry called "Email ID".  This is really all you need for being able to send emails.  I can do an email upload submit by sending my email to this email address, like:  545@ec2-184-73-58-194.compute-1.amazonaws.com.


But it is somewhat nicer to be able to send to an email address that is easier to remember than just a number.

To create an alias for the Email ID numeric, you need to first add an aspect to the folder.
Run Action -> Add Aspect to Item. Select the "Email alias" aspect.

Once the aspect is added, you'll see something like this.
The property "Email Alias" is now available. By selecting edit for the properties, you can define an alias for the submit email name. For example, I can use 'inbox'. Note that the name you select is case sensitive. After doing that, I can submit emails to populate the folder associated with the alias name, like: inbox@ec2-184-73-58-194.compute-1.amazonaws.com.


Step 4 -- Start sending Emails


Send an email to the Alfresco email server: inbox@ec2-184-73-58-194.compute-1.amazonaws.com, using the name appropriate for your system.
In this case I sent an email and an attachment called 'AlfrescoRMintro.txt'.


Then check the folder.  Both the email body (with name based on the email subject) and attachment have been uploaded to the folder.

Yes, that's really great.  If you look at the property page for this email, you'll see something like this:


There's only one thing that makes it not totally perfect.  On the property page for the email body, you can see the Attachments property with a link to the attachment document.  That's great, but it isn't a live link.  You need to manually go back to the folder level and find the attachment document.  It would nice to just be able to click right there to see the attachment.

Overall though this can be a very useful feature, and one not to forget about.

Saturday, May 1, 2010

Alfresco Records Management Free Trial

With the 3.2r release of Alfresco Share, the Alfresco Records Management module is now available in the Enterprise edition.

Alfresco has recently started a free trial program to get started using Alfresco Share and Records Management.  Click here to sign up for it.

Paul Hampton, Product Manager at Alfresco, has recorded a number of Share Records Management videos. More of them are available on this page. I've included one of the videos below for your viewing interest.

Introduction to Fileplan

This video reviews the Fileplan within the Alfresco Records Management solution. It shows how multiple users will be presented with different views of the Fileplan based on their security setting and role.