User Tools

Site Tools


products:emailcollector

Email Collector

Installation

Use the Module Management Tool to install the Email Collector. Information about how to do this can be found at: Module Management Tool Guide The Module Management Tool can be downloaded here.

Don't forget to create an email-collector.properties file as described in the next section of this manual. If this file is not available Alfresco will not start up.

Configuration

Mailbox and check interval configuration

Mailboxes and how often they are checked is configured in the email-collector.properties file. This file must be present in the classpath of your server.

For Tomcat: <tomcat-home>/shared/classes/alfresco/extension/email-collector.properties

For JBoss: <jboss-home>/server/default/conf/alfresco/extension/email-collector.properties

This is an example properties file:

# A single sample mailbox configuration.
# Mailbox properties always start with 'mailbox'. The next term is some arbitrary name for the mailbox 
# in this case 'somebox'. The third term is the mailbox property name.
mailbox.somebox.host=pop3.strato.de
mailbox.somebox.protocol=pop3
mailbox.somebox.port=110
mailbox.somebox.folder=Inbox
mailbox.somebox.user=mail@mycompany.de
mailbox.somebox.password=mailpassword
mailbox.somebox.ssl=false
# If the mail should end up in a specific space rather than being distributed by email aliases
# then specify the space name here as XPATH.
mailbox.somebox.space=app:company_home
# By default an email is saved as a node with text content and attachments are saved in the same space
# With the 'format' option the format of the saved mail can be predefined. Formats are:
# - separate (this is the default way of saving email that separates body and attachments)
# - eml (saves the mail as an eml file)
# - attachments (saves attachments only)
# For this option to work the emailCollectorFolderEmailMessageHandler must be the 
# email message handler for folders configured in the email-service-context.xml
mailbox.somebox.format=eml

# the start delay of the Email Collector in milliseconds
emailCollector.startDelay=5000
# the repeat interval of the Email Collector in milliseconds
emailCollector.repeatInterval=300000

The upper part of the configuration is the mailbox configuration. The mailbox Properties configure the mailbox. Mailbox properties always start with mailbox. The next term is some arbitrary name for the mailbox in this case somebox. The third term is the mailbox property name. All available properties can be seen in the example above. The properties host, protocol, user and password are required. If no folder is given, Inbox will be taken as the default folder. If no port is given the default port for the selected protocol will be taken. If no ssl property value is given then ssl will be disabled. The format option was added in release 1.2 of the EmailCollector. It can be used to store mail in a space:

  • as an eml file, if eml is given as the format or
  • without the body, if attachments is given as the format or
  • as usual with the body as a text node and the attachments as separate nodes if separate is given as the format.

All the format require the email message handler for folders to be changed in the email-service-context.xml file.

Email Service Configuration

To store emails into Alfresco the Email Collector uses the Alfresco in-built Email Service. Check the Email Server Configuration on how to configure the Email Service. You can skip the Email Server configuration part and start reading at the chapter 'How Email Messages are Handled'.

Alfresco 2.9 To use the format option the email-service-properties.xml file has to be changed. It can be found in the alfresco.war file under web-inf/alfresco/classes/emailserver. In this file the emailMessageHandler property of the emailMessageHandlerMap bean has to be changed as shown in the code snippet below.

Alfresco 3.3 To use the format and target space option the inboundSMTP-context.xml file has to be changed. It can be found in the alfresco.war file under WEB-INF\classes\alfresco\subsystems\email\InboundSMTP. In this file the emailMessageHandler property of the emailMessageHandlerMap bean has to be changed as shown in the code snippet below.

<property name="emailMessageHandlerMap">
    <map>
	<entry key="cm:folder">
	    <ref bean="emailCollectorFolderEmailMessageHandler"/>
	</entry>
	<entry key="cm:content">
	    <ref bean="documentEmailMessageHandler"></ref>
	</entry>
	<entry key="fm:forum">
	    <ref bean="forumEmailMessageHandler"></ref>
	</entry>
	<entry key="fm:discussion">
	    <ref bean="forumEmailMessageHandler"></ref>
	</entry>
	<entry key="fm:topic">
	    <ref bean="topicEmailMessageHandler"></ref>
	</entry>
	<entry key="fm:post">
	    <ref bean="topicEmailMessageHandler"></ref>
	</entry>
    </map>
</property>

Troubleshooting

  • If you experience the problem that some of your Email Aliases do not work check this forum entry
  • ERROR: The Alfresco server is not configured to accept inbound emails. You have to enable the Alfresco Email Service to accept incoming emails in alfresco/WEB-INF/classes/alfresco/emailserver/email-server.properties. Though the Alfresco email server may not be in use the Email Service used by the Email Collector has to be configured in the email servers properties.
products/emailcollector.txt · Last modified: 2023/11/19 22:46 (external edit)