mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Email Server and EmailService in a working state.
- Fixed authentication - Fixed I18N - Fixed mimetype and encoding issues Changed 'avm' remote ports and hosts to be 'alfresco.rmi.services' as the 'avm' was starting to creep into non-avm stuff. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7281 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -2,19 +2,12 @@
|
||||
# Properties shared between the Alfresco server
|
||||
# and its remote clients (e.g.: the virtualization server).
|
||||
#
|
||||
# Ports used by Alfresco AVM
|
||||
# Ports used by Alfresco
|
||||
#
|
||||
# Note: These ports are also used by the virtualization server
|
||||
# (hence, they're in a seperate file that's can be copied easily).
|
||||
|
||||
|
||||
# Name of the host running AVM
|
||||
avm.remote.host=localhost
|
||||
|
||||
# AVMRemote API
|
||||
avm.remote.port=50500
|
||||
# (hence, they're in a seperate file that can be copied easily).
|
||||
|
||||
# Remote RMI services
|
||||
rmi.services.remote.port=${avm.remote.port}
|
||||
rmi.services.remote.host=${avm.remote.host}
|
||||
alfresco.rmi.services.port=50500
|
||||
alfresco.rmi.services.host=localhost
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
<import resource="classpath:alfresco/node-services-context.xml" />
|
||||
<import resource="classpath:alfresco/scheduled-jobs-context.xml" />
|
||||
<import resource="classpath:alfresco/network-protocol-context.xml" />
|
||||
<import resource="classpath:alfresco/email-service-context.xml" />
|
||||
<import resource="classpath:alfresco/emailserver/email-service-context.xml" />
|
||||
<import resource="classpath:alfresco/content-services-context.xml" />
|
||||
<import resource="classpath*:alfresco/extension/mt/mt-contentstore-context.xml"/>
|
||||
<import resource="classpath:alfresco/hibernate-context.xml" />
|
||||
|
@@ -100,6 +100,10 @@
|
||||
<prop key="path">/${alfresco_user_store.system_container.childname}</prop>
|
||||
<prop key="location">alfresco/bootstrap/alfrescoAuthorityStorePermission.xml</prop>
|
||||
</props>
|
||||
<props>
|
||||
<prop key="path">/${alfresco_user_store.system_container.childname}/sys:authorities</prop>
|
||||
<prop key="location">alfresco/bootstrap/emailServer.xml</prop>
|
||||
</props>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
@@ -432,12 +436,25 @@
|
||||
</bean>
|
||||
|
||||
<!-- Email Server -->
|
||||
<!--
|
||||
<bean id="emailServer" class="org.alfresco.email.server.impl.subetha.SubethaEmailServer">
|
||||
<constructor-arg>
|
||||
<ref bean="emailServerConfiguration"/>
|
||||
</constructor-arg>
|
||||
<property name="enabled">
|
||||
<value>${email.server.enabled}</value>
|
||||
</property>
|
||||
<property name="domain">
|
||||
<value>${email.server.domain}</value>
|
||||
</property>
|
||||
<property name="port">
|
||||
<value>${email.server.port}</value>
|
||||
</property>
|
||||
<property name="blockedSenders">
|
||||
<value>${email.server.blocked.senders}</value>
|
||||
</property>
|
||||
<property name="allowedSenders">
|
||||
<value>${email.server.allowed.senders}</value>
|
||||
</property>
|
||||
<property name="emailService">
|
||||
<ref bean="EmailService" />
|
||||
</property>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
</beans>
|
||||
|
@@ -55,7 +55,7 @@
|
||||
<bean id="alfrescoMBeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"/>
|
||||
|
||||
<bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean">
|
||||
<property name="port" value="${avm.remote.port}"/>
|
||||
<property name="port" value="${alfresco.rmi.services.port}"/>
|
||||
</bean>
|
||||
|
||||
<!-- MBeanServer Connector (registers itself with custom alfrescoMBeanServer) -->
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<property name="server" ref="alfrescoMBeanServer"/>
|
||||
<property name="objectName" value="connector:name=rmi"/>
|
||||
<property name="serviceUrl" value="service:jmx:rmi://localhost/jndi/rmi://localhost:${avm.remote.port}/alfresco/jmxrmi" />
|
||||
<property name="serviceUrl" value="service:jmx:rmi://localhost/jndi/rmi://localhost:${alfresco.rmi.services.port}/alfresco/jmxrmi" />
|
||||
|
||||
<property name="environment">
|
||||
<map>
|
||||
|
@@ -1,6 +0,0 @@
|
||||
mail.inbound.enabled=false
|
||||
email.server.enabled=false
|
||||
email.server.port=25
|
||||
email.server.domain=alfresco.com
|
||||
email.server.allowed.senders=
|
||||
email.server.blocked.senders=
|
13
config/alfresco/emailserver/email-server.properties
Normal file
13
config/alfresco/emailserver/email-server.properties
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# Alfresco Email Service and Email Server
|
||||
# - See the sample config for descriptions of the properties
|
||||
#
|
||||
|
||||
email.inbound.unknownUser=anonymous
|
||||
email.inbound.enabled=false
|
||||
|
||||
email.server.enabled=false
|
||||
email.server.port=25
|
||||
email.server.domain=alfresco.com
|
||||
email.server.allowed.senders=
|
||||
email.server.blocked.senders=
|
@@ -13,45 +13,17 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="emailServerConfigurationProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="ignoreUnresolvablePlaceholders">
|
||||
<value>true</value>
|
||||
</property>
|
||||
<property name="locations">
|
||||
<list>
|
||||
<value>classpath:alfresco/email-server.properties</value>
|
||||
<value>classpath:alfresco/emailserver/email-server.properties</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="emailServerConfiguration" class="org.alfresco.email.server.EmailServerConfiguration">
|
||||
|
||||
<property name="domain">
|
||||
<value>${email.server.domain}</value>
|
||||
</property>
|
||||
|
||||
<property name="port">
|
||||
<value>${email.server.port}</value>
|
||||
</property>
|
||||
|
||||
<property name="enabled">
|
||||
<value>${email.server.enabled}</value>
|
||||
</property>
|
||||
|
||||
<property name="blockedSenders">
|
||||
<value>${email.server.blocked.senders}</value>
|
||||
</property>
|
||||
|
||||
<property name="allowedSenders">
|
||||
<value>${email.server.allowed.senders}</value>
|
||||
</property>
|
||||
|
||||
<property name="emailService">
|
||||
<ref bean="emailService" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean class="org.springframework.remoting.rmi.RmiServiceExporter">
|
||||
<property name="service">
|
||||
<ref bean="emailService"/>
|
||||
@@ -60,55 +32,74 @@
|
||||
<value>org.alfresco.service.cmr.email.EmailService</value>
|
||||
</property>
|
||||
<property name="serviceName">
|
||||
<value>emailService</value>
|
||||
<value>EmailService</value>
|
||||
</property>
|
||||
<property name="registryPort">
|
||||
<value>${avm.remote.port}</value>
|
||||
<value>${alfresco.rmi.services.port}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<alias name="emailService" alias="EmailService"/>
|
||||
|
||||
<bean id="emailService" class="org.alfresco.email.server.EmailServiceImpl">
|
||||
|
||||
<property name="mailInboundEnabled">
|
||||
<value>${mail.inbound.enabled}</value>
|
||||
<property name="emailInboundEnabled">
|
||||
<value>${email.inbound.enabled}</value>
|
||||
</property>
|
||||
<property name="unknownUser">
|
||||
<value>${email.inbound.unknownUser}</value>
|
||||
</property>
|
||||
|
||||
<property name="unknownUser" value="admin" />
|
||||
|
||||
<property name="emailMessageHandlerMap">
|
||||
<map>
|
||||
<entry key="folder">
|
||||
<entry key="cm:folder">
|
||||
<ref bean="folderEmailMessageHandler"></ref>
|
||||
</entry>
|
||||
<entry key="forum">
|
||||
<ref bean="forumEmailMessageHandler"></ref>
|
||||
</entry>
|
||||
<entry key="discussion">
|
||||
<ref bean="forumEmailMessageHandler"></ref>
|
||||
</entry>
|
||||
<entry key="topic">
|
||||
<ref bean="topicEmailMessageHandler"></ref>
|
||||
</entry>
|
||||
<entry key="post">
|
||||
<ref bean="topicEmailMessageHandler"></ref>
|
||||
</entry>
|
||||
<entry key="content">
|
||||
<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>
|
||||
|
||||
<property name="namespaceService">
|
||||
<ref bean="NamespaceService" />
|
||||
</property>
|
||||
<property name="nodeService">
|
||||
<ref bean="nodeService" />
|
||||
<ref bean="NodeService" />
|
||||
</property>
|
||||
<property name="searchService">
|
||||
<ref bean="searchService" />
|
||||
<ref bean="SearchService" />
|
||||
</property>
|
||||
|
||||
<property name="retryingTransactionHelper">
|
||||
<ref bean="retryingTransactionHelper" />
|
||||
</property>
|
||||
|
||||
</bean>
|
||||
|
||||
<bean id="emailMessageHandlerBase" abstract="true">
|
||||
<property name="dictionaryService">
|
||||
<ref bean="DictionaryService" />
|
||||
</property>
|
||||
<property name="nodeService">
|
||||
<ref bean="NodeService" />
|
||||
</property>
|
||||
<property name="searchService">
|
||||
<ref bean="SearchService" />
|
||||
</property>
|
||||
<property name="contentService">
|
||||
<ref bean="ContentService" />
|
||||
</property>
|
||||
<property name="mimetypeService">
|
||||
<ref bean="MimetypeService" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="folderEmailMessageHandler"
|
||||
@@ -127,28 +118,7 @@
|
||||
parent="emailMessageHandlerBase"
|
||||
class="org.alfresco.email.server.handler.TopicEmailMessageHandler" />
|
||||
|
||||
<bean id="emailMessageHandlerBase" abstract="true">
|
||||
<property name="authenticationService">
|
||||
<ref bean="authenticationService" />
|
||||
</property>
|
||||
<property name="authenticationComponent">
|
||||
<ref bean="authenticationComponent" />
|
||||
</property>
|
||||
<property name="nodeService">
|
||||
<ref bean="nodeService" />
|
||||
</property>
|
||||
<property name="personService">
|
||||
<ref bean="personService" />
|
||||
</property>
|
||||
<property name="searchService">
|
||||
<ref bean="searchService" />
|
||||
</property>
|
||||
<property name="contentService">
|
||||
<ref bean="contentService" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="alisableAspect"
|
||||
<bean id="aliasableAspect"
|
||||
class="org.alfresco.email.server.AliasableAspect"
|
||||
init-method="initialise">
|
||||
<property name="nodeService">
|
||||
@@ -162,5 +132,4 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
</beans>
|
@@ -32,7 +32,7 @@
|
||||
<value>org.alfresco.FileFolderRemote</value>
|
||||
</property>
|
||||
<property name="registryPort">
|
||||
<value>${rmi.services.remote.port}</value>
|
||||
<value>${alfresco.rmi.services.port}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<value>org.alfresco.LoaderRemote</value>
|
||||
</property>
|
||||
<property name="registryPort">
|
||||
<value>${rmi.services.remote.port}</value>
|
||||
<value>${alfresco.rmi.services.port}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
BIN
config/alfresco/extension/custom-email-server.sample.zip
Normal file
BIN
config/alfresco/extension/custom-email-server.sample.zip
Normal file
Binary file not shown.
@@ -1,17 +1,24 @@
|
||||
email.server.denied-address="Address {0} is in black list"
|
||||
email.server.not-white-address="Address {0} is not in white list"
|
||||
email.server.incorrect-node-ref="Incorrect node ref"
|
||||
email.server.incorrect-node-address="Incorrect node address"
|
||||
email.server.incorrect-node-type="Incorrect node type"
|
||||
email.server.handler-not-found="Hanlder wasn't found"
|
||||
email.server.unknown-user="Unknown user is not in email contribute group"
|
||||
email.server.not-contribute-user="User {0} is not in contribute group"
|
||||
email.server.contribute-group-not-exist="Email contribute group is not created"
|
||||
email.server.content-error="Content error"
|
||||
email.server.incorrect-message-part="Incorrect message part"
|
||||
email.server.error-getting-message-content="Couldn't get message part content"
|
||||
email.server.error-getting-content-stream="Couldn't get stream of the message part content"
|
||||
email.server.error-creating-message="Couldn't create MIME message from input stream"
|
||||
email.server.error-parse-message="Couldn't parse the message"
|
||||
email.server.mail-inbound-disabled="Email behaviour to be disabled completely on the server"
|
||||
email.server.usupported-encoding="Encoding {0} is not support"
|
||||
email.server.msg.received_by_smtp=Received by SMTP from ''{0}''.
|
||||
email.server.msg.default_subject=Email-{0}
|
||||
|
||||
email.server.err.sender_blocked=''{0}'' has been denied access.
|
||||
email.server.err.inbound_mail_disabled=The Alfresco server is not configured to accept inbound emails.
|
||||
email.server.err.access_denied=''{0}'' has been denied access to ''{1}''.
|
||||
email.server.err.invalid_subject=The subject line must be a valid file name.
|
||||
email.server.err.unknown_source_address=The 'from' email address was not recognised: {0}.
|
||||
email.server.err.user_not_email_contributor=The user ''{0}'' in not in the email contributor group.
|
||||
email.server.err.no_email_contributor_group=The Email Contributor Group doesn't exist.
|
||||
email.server.err.invalid_node_address=The email address ''{0}'' does not reference a valid accessible node.
|
||||
email.server.err.handler_not_found=Email message handler was not found for node type ''{0}''.
|
||||
email.server.err.mail_read_error=An error occured while reading the mail message: {0}
|
||||
email.server.err.failed_to_create_mime_message=Failed to create MIME message from input stream: {0}
|
||||
email.server.err.extracting_from_address=Failed to extract the 'from' address: {0}
|
||||
email.server.err.no_from_address=The message has no 'from' address.
|
||||
email.server.err.extracting_to_address=Failed to extract the 'to' address: {0}
|
||||
email.server.err.no_to_address=The message has no 'to' address.
|
||||
email.server.err.extracting_subject=Failed to extract the message subject: {0}
|
||||
email.server.err.extracting_sent_date=Failed to extract the 'sent on' date: {0}
|
||||
email.server.err.parse_message=Failed to parse the email message: {0}
|
||||
email.server.err.usupported_encoding=Encoding ''{0}'' is not supported
|
||||
email.server.err.failed_to_read_content_stream=Failed to read the message part content: {0}
|
||||
email.server.err.incorrect_message_part=Incorrect message part: {0}
|
||||
|
@@ -177,3 +177,5 @@ patch.customMessages.description=Adds Messages space to Data Dictionary.
|
||||
patch.customWebClientExtension.description=Adds Web Client Extension space to Data Dictionary.
|
||||
|
||||
patch.customWorkflowDefs.description=Adds Workflow Definitions space to Data Dictionary.
|
||||
|
||||
patch.emailContributorGroup.description=Adds the 'GROUP_EMAIL_CONTRIBUTORS' group.
|
||||
|
@@ -25,6 +25,13 @@
|
||||
prefix="emailserver" />
|
||||
</namespaces>
|
||||
|
||||
<constraints>
|
||||
<constraint name="emailserver:alias" type="REGEX">
|
||||
<parameter name="expression"><value><![CDATA[[a-zA-Z0-9.\-]*]]></value></parameter>
|
||||
<parameter name="requiresMatch"><value>true</value></parameter>
|
||||
</constraint>
|
||||
</constraints>
|
||||
|
||||
<aspects>
|
||||
|
||||
<aspect name="emailserver:attached">
|
||||
@@ -51,12 +58,15 @@
|
||||
</aspect>
|
||||
|
||||
<aspect name="emailserver:aliasable">
|
||||
<title>Aliasable</title>
|
||||
<title>Email Alias</title>
|
||||
<properties>
|
||||
<property name="emailserver:alias">
|
||||
<title>Alias</title>
|
||||
<type>d:text</type>
|
||||
<mandatory>true</mandatory>
|
||||
<constraints>
|
||||
<constraint ref="emailserver:alias" />
|
||||
</constraints>
|
||||
</property>
|
||||
</properties>
|
||||
</aspect>
|
||||
|
@@ -1037,5 +1037,26 @@
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.emailContributorGroup" class="org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.emailContributorGroup</value></property>
|
||||
<property name="description"><value>patch.emailContributorGroup.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>108</value></property>
|
||||
<property name="targetSchema"><value>109</value></property>
|
||||
<!-- bootstrap view -->
|
||||
<property name="importerBootstrap">
|
||||
<ref bean="userBootstrap" />
|
||||
</property>
|
||||
<property name="checkPath">
|
||||
<value>/${alfresco_user_store.system_container.childname}/sys:authorities/usr:GROUP_EMAIL_CONTRIBUTORS</value>
|
||||
</property>
|
||||
<property name="bootstrapView">
|
||||
<props>
|
||||
<prop key="path">/${alfresco_user_store.system_container.childname}/sys:authorities</prop>
|
||||
<prop key="location">alfresco/bootstrap/emailServer.xml</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
@@ -29,7 +29,7 @@
|
||||
<value>avm</value>
|
||||
</property>
|
||||
<property name="registryPort">
|
||||
<value>${avm.remote.port}</value>
|
||||
<value>${alfresco.rmi.services.port}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<value>avmsync</value>
|
||||
</property>
|
||||
<property name="registryPort">
|
||||
<value>${avm.remote.port}</value>
|
||||
<value>${alfresco.rmi.services.port}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<value>attributes</value>
|
||||
</property>
|
||||
<property name="registryPort">
|
||||
<value>${avm.remote.port}</value>
|
||||
<value>${alfresco.rmi.services.port}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<value>authentication</value>
|
||||
</property>
|
||||
<property name="registryPort">
|
||||
<value>${avm.remote.port}</value>
|
||||
<value>${alfresco.rmi.services.port}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
<value>repo</value>
|
||||
</property>
|
||||
<property name="registryPort">
|
||||
<value>${avm.remote.port}</value>
|
||||
<value>${alfresco.rmi.services.port}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
<value>action</value>
|
||||
</property>
|
||||
<property name="registryPort">
|
||||
<value>${avm.remote.port}</value>
|
||||
<value>${alfresco.rmi.services.port}</value>
|
||||
</property>
|
||||
</bean>
|
||||
</beans>
|
@@ -19,4 +19,4 @@ version.build=@build-number@
|
||||
|
||||
# Schema number
|
||||
|
||||
version.schema=108
|
||||
version.schema=109
|
||||
|
Reference in New Issue
Block a user