04-27-2021 11:12 AM
Hi, i need your help to configure outbound email in alfresco community 6.2 docker intallation.
who have some tutorial to send me the link please.
In advance thank you.
04-29-2021 11:26 PM
You can add following properties in docker-compose for alfresco service. Check the docs here : https://docs.alfresco.com/content-services/latest/config/email/
-Dmail.host=smtphost -Dmail.port=25 -Dmail.username=anonymous -Dmail.password= -Dmail.protocol=smtp -Dmail.smtps.starttls.enable=false -Dmail.smtps.auth=false
SAMPLE DOCKER COMPOSE: https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose-v3.yml#L47
Make sure host and port is accessible and open to use
Additionally, if you are maintaining the properties in alfresco-global.properties then you can add the above properties in there as well. You need to make sure the global properties is copied everytime you restart the containers, anychanges made to global properties on container level may be lost on restart and relaunch.
You can make use of DockerFile and docker-compose in combination to copy the global properties file when image is build and container is launched.
Sample use :
https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose-v3.yml#L9
You can also use this tool to generate a docker-compose with smtp configs, or at least take reference from the generated docker compose file:
https://github.com/Alfresco/alfresco-docker-installer
04-30-2021 06:25 AM
Hi, thank you for your help,
Sorry i am new with alfresco and sorry for my English.
I use this in my docker-compose.yml file and i restart de alfresco docker but the email not work when i create task
-Dmail.host=smtp.gmail.com -Dmail.port=465 -Dmail.username=marcos******@gmail.com -Dmail.password=*************** -Dmail.protocol=smtp -Dmail.smtps.starttls.enable=false -Dmail.smtps.auth=false
Please help me to solve this problem.
04-30-2021 07:58 AM
Hi @marcosfgo25
Have you tried the following:
-Dmail.protocol=smtps -Dmail.smtps.starttls.enable=true -Dmail.smtps.auth=true
In the documentation it suggests the following config for Gmail:
# Sample Gmail settings mail.host=smtp.gmail.com mail.port=465 mail.username=user@gmail.com mail.password=password mail.protocol=smtps mail.smtps.starttls.enable=true mail.smtps.auth=true
HTH
04-30-2021 09:58 AM
i did all this but email not working.
I have one con job with email configuration and its work good but my alfresco configuration not work.
05-01-2021 04:51 AM
as @EddieMay mentioned and documented here: https://docs.alfresco.com/content-services/community/config/email/
the below config works fine. Make sure you have enabled less secure apps settings in your gmail: https://help.dreamhost.com/hc/en-us/articles/115001719551-Troubleshooting-GMAIL-SMTP-authentication-...
mail.host=smtp.gmail.com mail.port=465 mail.username=xyz@gmail.com mail.password=pass123 mail.protocol=smtps mail.smtps.starttls.enable=true mail.smtps.auth=true
In docker compose the config looks like:
acs62-aio-demo-project-acs: image: alfresco-content-services-acs62-aio-demo-project:development mem_limit: 1700m build: dockerfile: ./Dockerfile context: ../../../acs62-aio-demo-project-platform-docker/target environment: CATALINA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8888" JAVA_OPTS: " -Dsample.site.disabled=true -Dftp.enabled=true -Dftp.port=21 -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos -Dmessaging.broker.url=\"failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true\" -Dmessaging.broker.userName=admin -Dmessaging.broker.password=admin -Ddeployment.method=DOCKER_COMPOSE -Dlocal.transform.service.enabled=true -DlocalTransform.pdfrenderer.url=http://alfresco-pdf-renderer:8090/ -DlocalTransform.imagemagick.url=http://imagemagick:8090/ -DlocalTransform.libreoffice.url=http://libreoffice:8090/ -DlocalTransform.tika.url=http://tika:8090/ -DlocalTransform.misc.url=http://transform-misc:8090/ -Dlegacy.transform.service.enabled=true -Dalfresco-pdf-renderer.url=http://alfresco-pdf-renderer:8090/ -Djodconverter.url=http://libreoffice:8090/ -Dimg.url=http://imagemagick:8090/ -Dtika.url=http://tika:8090/ -Dtransform.misc.url=http://transform-misc:8090/ -Dmail.host=smtp.gmail.com -Dmail.port=465 -Dmail.username=xyz@gmail.com -Dmail.password=pass123 -Dmail.protocol=smtps -Dmail.smtps.starttls.enable=true -Dmail.smtps.auth=true -Xms1500m -Xmx1500m " TZ: "America/New_York" ports: - "${acs.port}:8080" - "${acs.debug.port}:8888" - 21:2121 #FTP port - 25:2525 #SMTP port - 143:1143 #IMAP port volumes: #Bind mount SHORT SYNTAX - [SOURCE:]TARGET[:MODE] #SOURCE can be a named volume or a (relative or absolute) path on the host system. #TARGET is an absolute path in the container where the volume is mounted. #MODE is a mount option which can be read-only (ro) or read-write (rw) (default). - ../../../data/alfresco/alf_data:/usr/local/tomcat/alf_data/:rw - ../../../logs/alfresco:/usr/local/tomcat/logs/:rw depends_on: - acs62-aio-demo-project-postgres
Change email and password as per your settings.
05-03-2021 03:10 AM
Thank you, but still not send email:
My docker-compose file:
services: alfresco: build: context: ./alfresco args: ALFRESCO_TAG: ${ALFRESCO_CE_TAG} DB: postgres API_EXPLORER_TAG: ${API_EXPLORER_TAG} mem_limit: 4416m depends_on: - postgres environment: JAVA_OPTS : ' -Ddb.driver=org.postgresql.Driver -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.postgresql.Driver -Ddb.url=jdbc:postgresql://postgres:5432/alfresco -Dsolr.host=solr6 -Dsolr.port=8983 -Dsolr.secureComms=none -Dsolr.baseUrl=/solr -Dindex.subsystem.name=solr6 -Dalfresco.host=${SERVER_NAME} -Dalfresco.port=80 -Dshare.host=${SERVER_NAME} -Dshare.port=80 -Daos.baseUrlOverwrite=http://${SERVER_NAME}/alfresco/aos -Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true" -Ddeployment.method=DOCKER_COMPOSE -Dcsrf.filter.enabled=false -Dopencmis.server.override=true -Dopencmis.server.value=http://${SERVER_NAME}:80 -Dlocal.transform.service.enabled=true -DlocalTransform.pdfrenderer.url=http://alfresco-pdf-renderer:8090/ -DlocalTransform.imagemagick.url=http://imagemagick:8090/ -DlocalTransform.libreoffice.url=http://libreoffice:8090/ -DlocalTransform.tika.url=http://tika:8090/ -DlocalTransform.misc.url=http://transform-misc:8090/ -Dlegacy.transform.service.enabled=true -Dalfresco-pdf-renderer.url=http://alfresco-pdf-renderer:8090/ -Djodconverter.url=http://libreoffice:8090/ -Dimg.url=http://imagemagick:8090/ -Dtika.url=http://tika:8090/ -Dtransform.misc.url=http://transform-misc:8090/ -Dcsrf.filter.enabled=false -Dalfresco.restApi.basicAuthScheme=true -Dauthentication.protection.enabled=false -XX:+UseG1GC -XX:+UseStringDeduplication -Dmail.host=smtp.gmail.com -Dmail.port=465 -Dmail.username=my_gmail -Dmail.password=my_gmail_password -Dmail.protocol=smtps -Dmail.smtps.starttls.enable=true -Dmail.smtps.auth=true -Xms3904m -Xmx3904m ' volumes: - ./data/alf-repo-data:/usr/local/tomcat/alf_data - ./logs/alfresco:/usr/local/tomcat/logs alfresco-pdf-renderer: image: alfresco/alfresco-pdf-renderer:${TRANSFORM_ENGINE_TAG} mem_limit: 512m environment: JAVA_OPTS: " -Xms256m -Xmx512m" ports: - 8090:8090 imagemagick: image: alfresco/alfresco-imagemagick:${TRANSFORM_ENGINE_TAG} mem_limit: 512m environment: JAVA_OPTS: " -Xms256m -Xmx512m" ports: - 8091:8090 libreoffice: image: alfresco/alfresco-libreoffice:${TRANSFORM_ENGINE_TAG} mem_limit: 512m environment: JAVA_OPTS: " -Xms256m -Xmx512m" ports: - 8092:8090 tika: image: alfresco/alfresco-tika:${TRANSFORM_ENGINE_TAG} mem_limit: 512m environment: JAVA_OPTS: " -Xms256m -Xmx512m" ports: - 8093:8090 transform-misc: image: alfresco/alfresco-transform-misc:${TRANSFORM_ENGINE_TAG} mem_limit: 512m environment: JAVA_OPTS: " -Xms256m -Xmx512m" ports: - 8094:8090 share: build: context: ./share args: SHARE_TAG: ${SHARE_TAG} SERVER_NAME: ${SERVER_NAME} mem_limit: 1104m environment: REPO_HOST: "alfresco" REPO_PORT: "8080" CSRF_FILTER_REFERER: "http://localhost/.*" CSRF_FILTER_ORIGIN: "http://localhost" JAVA_OPTS: " -Xms976m -Xmx976m -Dalfresco.context=alfresco -Dalfresco.protocol=http " volumes: - ./logs/share:/usr/local/tomcat/logs postgres: image: postgres:${POSTGRES_TAG} mem_limit: 1104m environment: - POSTGRES_PASSWORD=alfresco - POSTGRES_USER=alfresco - POSTGRES_DB=alfresco command: " postgres -c max_connections=200 -c logging_collector=on -c log_min_messages=LOG -c log_directory=/var/log/postgresql" ports: - 5432:5432 volumes: - ./data/postgres-data:/var/lib/postgresql/data - ./logs/postgres:/var/log/postgresql solr6: build: context: ./search args: SEARCH_TAG: $SEARCH_CE_TAG SOLR_HOSTNAME: solr6 ALFRESCO_HOSTNAME: alfresco ALFRESCO_COMMS: none CROSS_LOCALE: "true" mem_limit: 2208m environment: #Solr needs to know how to register itself with Alfresco SOLR_ALFRESCO_HOST: "alfresco" SOLR_ALFRESCO_PORT: "8080" #Alfresco needs to know how to call solr SOLR_SOLR_HOST: "solr6" SOLR_SOLR_PORT: "8983" #Create the default alfresco and archive cores SOLR_CREATE_ALFRESCO_DEFAULTS: "alfresco,archive" SOLR_JAVA_MEM: "-Xms1952m -Xmx1952m" SOLR_OPTS: " -XX:NewSize=848m -XX:MaxNewSize=848m " volumes: - ./data/solr-data:/opt/alfresco-search-services/data - ./backup/solr/alfresco:/opt/alfresco-search-services/backup/alfresco - ./backup/solr/archive:/opt/alfresco-search-services/backup/archive activemq: image: alfresco/alfresco-activemq:${ACTIVEMQ_TAG} mem_limit: 1g ports: - 8161:8161 # Web Console - 5672:5672 # AMQP - 61616:61616 # OpenWire - 61613:61613 # STOMP content-app: image: alfresco/alfresco-content-app:${ACA_TAG} mem_limit: 256m depends_on: - alfresco - share # HTTP proxy to provide HTTP Default port access to services # SOLR API and SOLR Web Console are protected to avoid unauthenticated access proxy: image: angelborroy/acs-proxy:1.2.0 mem_limit: 128m environment: - PORT=80 depends_on: - alfresco - solr6 - share - content-app volumes: - ./config/nginx.htpasswd:/etc/nginx/conf.d/nginx.htpasswd ports: - 80:80 #Email smtp configuration #smtp: # image: mwader/postfix-relay # networks: # - internal
And i get this error when send user notification:
proxy_1 | 192.168.1.246 - - [03/May/2021:09:57:45 +0000] "POST /share/proxy/alfresco/api/sites/teste/invitations HTTP/1.1" 408 0 "http://192.168.1.242/share/page/site/teste/add-users" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0" alfresco_1 | 2021-05-03 09:57:55,410 ERROR [action.executer.MailActionExecuter] [http-nio-8080-exec-10] Failed to send email to antonio.smonteiro@gov.cv : org.springframework.mail.MailSendException: Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1; nested exception is: java.net.ConnectException: Connection timed out (Connection timed out). Failed messages: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1; nested exception is: java.net.ConnectException: Connection timed out (Connection timed out); message exceptions (1) are:Failed message 1: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1; nested exception is: java.net.ConnectException: Connection timed out (Connection timed out)
Adicional information:
I use this link to install alfresco:
And i can send email from my ubuntu server 20.04 when i make alfresco backup in bash script
I have the google less secure app enabled
05-03-2021 08:29 AM
I see, but this error:
alfresco_1 | 2021-05-03 09:57:55,410 ERROR [action.executer.MailActionExecuter] [http-nio-8080-exec-10] Failed to send email to antonio.smonteiro@gov.cv : org.springframework.mail.MailSendException: Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1; nested exception is: java.net.ConnectException: Connection timed out (Connection timed out). Failed messages: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1; nested exception is: java.net.ConnectException: Connection timed out (Connection timed out); message exceptions (1) are:Failed message 1: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1; nested exception is: java.net.ConnectException: Connection timed out (Connection timed out)
Indicates that, it can't connect to gmail SMTP server. It could be due to your server blocking the connection or server doesn't have connectivity enabled for public internet. May be check this one
Explore our Alfresco products with the links below. Use labels to filter content by product module.