cancel
Showing results for 
Search instead for 
Did you mean: 

Configure mail service on Alfresco Community 7.2 installed using Docker Compose

Phfirst
Champ on-the-rise
Champ on-the-rise

Hello community
I installed alfresco Community 7.2 using Docker Compose on Ubuntu 20.04
I want to implement mail service for notifications. I followed the official documentation but found that I may not have the alfresco-global.properties file where to add the properties.
However, I have four alfresco-global.properties files located at:
/var/lib/docker/overlay2/615da5d5f405f76a9b1eca9143061ab4f42bb7c0221488544ea1ff5bdf61f6dd/diff/usr/local/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module/alfresco-share-services/alfresco-global.properties

/var/lib/docker/overlay2/b2b206abb8d61b31245e997d9c528d84ae00ef0df98a6bba10b431c440d6392a/diff/usr/local/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module/alfresco-share-services/alfresco-global.properties

/var/lib/docker/overlay2/502e766e1649c6a6c8bb73354bb77a8f6c126acd6d99fad635048a6a2a20b64c/diff/usr/local/tomcat/shared/classes/alfresco-global.properties

/var/lib/docker/overlay2/adce94ea8056b9973759739f4f56379fa832d1739e0c627f50bbc5d32643b25b/diff/usr/local/tomcat/shared/classes/alfresco-global.properties

The first two contain only:
# Disable load of sample site
#
sample.site.disabled=false

And the last two are empty. So I don't know in which files to put the properties

I followed this instruction from the hub ( https://hub.alfresco.com/t5/alfresco-content-services-forum/alfresco-community-6-2-docker-outbound-e... ) where it's the docker-compose.yml file which contains the properties but my email is not sent. In the logs, I get the following errors after adding a user to a site or after assigning a workflow to a user:

2022-06-09 10:48:50,801 ERROR [action.executer.MailActionExecuter] [http-nio-8080-exec-7] Failed to send email to ***********@gmail.com : org.springframework.mail.MailSendException: Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.example.com, 25; timeout -1; nested exception is: java.net.UnknownHostException: smtp.example.com. Failed messages: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.example.com, 25; timeout -1; nested exception is: java.net.UnknownHostException: smtp.example.com; message exceptions (1) are:Failed message 1: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.example.com, 25; timeout -1; nested exception is: java.net.UnknownHostException: smtp.example.com

Here are the added properties:

-notification.email.siteinvite=true
-Dmail.host=smtp.gmail.com
-Dmail.port=465
-Dmail.username=***************@gmail.com
-Dmail.password=***************
-Dmail.protocol=smtps
-Dmail.smtps.starttls.enable=true
-Dmail.smtps.auth=true
-mail.smtps.starttls.enable=true
-mail.smtps.auth=true

Here are my constraints, what can I do?
Please help me to get out of this. Tanks.

12 REPLIES 12

abhinavmishra14
World-Class Innovator
World-Class Innovator

yes, this the admin console i mentioned. It seems somehow those properties are overriden and that's why it tries to connect to smtp.example.com. You have to investigate that

As you can see, click on  "Alfresco Administration Console" (make sure you are logged in as admin user or have admin previledges). You will find the settings for email configs as stated here: https://docs.alfresco.com/content-services/latest/config/email/#manage-outbound-emails

or connect to Alfresco using jconsole and update the properties via JMX mbeans. 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

I always thank you for your help.
When I access the Admin Console, I can't find myself. I do not know in particular how to find the parameters concerned in the file which it is necessary in order to check if they are correct or not as you recommend it to me. (remember that I use Docker).
Can I find a tutorial to do this? Any other advice or recommendation will also be welcome.

Actually, I'm a newbie and this is my first time to work on Alfresco. And I need your help to get through this, sorry.
Here is the console interface (in the Templates and messages Console section) :

image

And here is the complete output of the help command :

Spoiler

##
## Meta commands
##

ok> help

List this help.

ok> r

Repeat last command.

##
## Quit / Exit
##

If running in a web browser, then close this window or tab (and logout from Alfresco Explorer or close the web browser).

If running as a command-line utility, then type 'quit' or 'exit'.

##
## General Repo Admin Commands
##

ok> show file <fileClassPath>

Output the contents of the file located at <fileClassPath>.

<fileClassPath> class path to a file

e.g. show file alfresco/extension/xxxModel.xml
e.g. show file alfresco/extension/yyy-messages.properties

ok> show file-list <filesClassPath>

Show list of files located at <filesClassPath> with first match being listed for each filename.

<filesClassPath> class path to a list of files. Wildcard * is allowed. For example, to see
a list of message resource bundles that would be loaded, use: /path1/path2/bundlename*.properties

e.g. show file-list alfresco/extension/*
e.g. show file-list alfresco/extension/*Model.xml
e.g. show file-list alfresco/extension/zzz-messages*.properties

##
## Model Admin Commands
##

ok> show models

Show deployed models - that are stored in the repository data dictionary.

ok> deploy model <fileClassPath>

Upload model to repository and load into runtime data dictionary. This will also
set the repository model as active.

If a model is already deployed then it will be updated and re-deployed.

e.g. deploy model alfresco/extension/exampleModel.xml

ok> undeploy model <modelFileName>

Permanently delete model from repository (all versions) and unload from runtime data dictionary.

e.g. undeploy model exampleModel.xml

ok> activate model <modelFileName>

Set repository model to active and load into runtime data dictionary.

e.g. activate model exampleModel.xml

ok> deactivate model <modelFileName>

Set repository model to inactive and unload from runtime data dictionary.

e.g. deactivate model exampleModel.xml

##
## Message Admin Commands
##

ok> show messages

Show deployed message resource bundles - that are stored in the repository data dictionary.

ok> deploy messages <resourceBundleClassPath>

Upload message resource bundle to repository and runtime message service.

e.g. deploy messages alfresco/extension/lifecycle-messages

ok> undeploy messages <resourceBundleBaseName>

Remove message resource bundle from repository and from runtime message service.

e.g. undeploy messages lifecycle-messages

ok> reload messages <resourceBundleBaseName>

Reload message resource bundle from repository into runtime message service.

e.g. reload messages lifecycle-messages

##
## end
##

Phfirst
Champ on-the-rise
Champ on-the-rise

Please, someone was able to find an answer to my problem or another way to solving ?

I am trying to start the the instal again to see if there will be a change.

Thanks in advance.