cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to enable connect the alfresco to the postfix

sreejith
Champ in-the-making
Champ in-the-making
Hi,

I am using this app for the firswt time. I have been trying to implement the AWS SES service with the Alfresco. I have configured the postfix in such a way that mails send from the server will be send via SES. But emails are not getting send by the alfresco app when i create a user, etc.

Please find the method that i did to connect the postfix running from on the same machine.

1)  Added the following lines to the file : tomcat/shared/classes/alfresco-global.properties


mail.host=localhost
mail.port=25
mail.username=anonymous
mail.password=


2) Created the file named tomcat/shared/classes/alfresco/extension/custom-email-context.xml having the following entries:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
<!–                        –>
<!– MAIL SERVICE           –>
<!–                        –>

<bean id="mailService" class="org.springframework.mail.javamail.JavaMailSenderImpl">
    <property name="host">
        <value>${mail.host}</value>
    </property>
    <property name="port">
        <value>${mail.port}</value>
    </property>
    <property name="protocol">
        <value>${mail.protocol}</value>
    </property>
    <property name="username">
        <value>${mail.username}</value>
    </property>
    <property name="password">
        <value>${mail.password}</value>
    </property>
    <property name="defaultEncoding">
        <value>${mail.encoding}</value>
    </property>
    <property name="javaMailProperties">
        <props>
            <prop key="mail.smtps.auth">${mail.smtps.auth}</prop>
            <prop key="mail.smtps.starttls.enable">${mail.smtps.starttls.enable}</prop>
        </props>
    </property>
</bean>
</beans>


3) Edited the file tomcat/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/email/OutboundSMTP/outboundSMTP.properties as shown below:

# Outbound SMTP properties

# use these properties to configure the out-bound SMTP server.
mail.host=localhost
mail.port=25
mail.username=anonymous
mail.password=
mail.encoding=UTF-8
mail.from.default=test@example.com
mail.protocol=smtp

# Additional Java Mail properties for SMTP protocol
mail.smtp.auth=false
mail.smtp.debug=false
mail.smtp.timeout=5000
mail.smtp.starttls.enable=false

# Additional Java Mail properties for SMTPS protocol
mail.smtps.auth=false
mail.smtps.starttls.enable=false


#use these properties to send test message during start of subsystem
mail.testmessage.send=false
mail.testmessage.to=
mail.testmessage.subject=Outbound SMTP
mail.testmessage.text=The Outbound SMTP email subsystem is working.




Can you guys please help me to set this up.

Thanks
Sreejith
9 REPLIES 9

sreejith
Champ in-the-making
Champ in-the-making
I have also added the lines given below to /usr/local/alfresco/tomcat/shared/classes/alfresco-global.properties

# Should send emails as part of invitation process.
notification.email.siteinvite=true

Still the email service is not working.

mrogers
Star Contributor
Star Contributor
That custom email context is obsolete and should not be used on 4.0.  You should not be touching files below WEB-INF either.

Is your email server really on localhost?

sreejith
Champ in-the-making
Champ in-the-making
That custom email context is obsolete and should not be used on 4.0.  You should not be touching files below WEB-INF either.

Is your email server really on localhost?

Yes, the postfix (mail server ) is on the same server where the alfresco is running.
So do you want me to delete the Custome email context ?

mrogers
Star Contributor
Star Contributor
Yes.  So you are attempting to connect to localhost:25, unauthenticated, smtp protocol.

Also check that Alfresco's own email server has not bound to localhost.

sreejith
Champ in-the-making
Champ in-the-making
Yes.  So you are attempting to connect to localhost:25, unauthenticated, smtp protocol.

Also check that Alfresco's own email server has not bound to localhost.

Hi,

I have deleted the file "tomcat/shared/classes/alfresco/extension/custom-email-context.xml"

< Also check that Alfresco's own email server has not bound to localhost >

Can you help me to check this. As i dont see any logs in catalina.out for mails sending by the alfresco.


Here , i am trying to set AWS-SES on alfresco so that this will send emails from alfresco via SES. Can you guid me to set this up.

sreejith
Champ in-the-making
Champ in-the-making
Yes.  So you are attempting to connect to localhost:25, unauthenticated, smtp protocol.

Also check that Alfresco's own email server has not bound to localhost.

Hi,

I have deleted the file "tomcat/shared/classes/alfresco/extension/custom-email-context.xml"

< Also check that Alfresco's own email server has not bound to localhost >

Can you help me to check this. As i dont see any logs in catalina.out for mails sending by the alfresco.


Here , i am trying to set AWS-SES on alfresco so that this will send emails from alfresco via SES. Can you guid me to set this up.


Can anybody have a look into this issue.

sreejith
Champ in-the-making
Champ in-the-making
Hi,

Now i have added the below line on to the [TomcatHome]/shared/classes/alfresco-global.properties

mail.host=localhost
mail.port=25
mail.username=anonymous
mail.password=
### E-mail site invitation setting ###
notification.email.siteinvite=true


## test message when the subsystem starts ##
mail.testmessage.send=true
mail.testmessage.to=sreejithp@agileblaze.com
mail.testmessage.subject=Outbound SMTP
mail.testmessage.text=Outbound SMTP email subsystem is working

And found that mail has been received from the postfix server, but when i create a user from the alfresco console this doesnt send any email notification to the user's email id?

Please let me know if i have to change any parameters mentioned above .

Thanks Sreejith

mrogers
Star Contributor
Star Contributor
What "alfresco console"?

Creating a user will not send an email.   Inviting a new user will.

sreejith
Champ in-the-making
Champ in-the-making
What "alfresco console"?

Creating a user will not send an email.   Inviting a new user will.

Ok. Tested and found that the mails been send from the postfix installed on the local machine. : ) thanks

Now i want is to know how will i be able to configure the alfresco so that i can send mails directly from the aws -ses . ( Without using the postfix installed on the localmachine )