No email notifications being send, running in docker compose

140 views
Skip to first unread message

Samuel Arcos

unread,
Feb 18, 2020, 6:06:16 AM2/18/20
to Restya
I have installed the docker version of restya board in a Docker Compose proxy setup: 


Everything seems to work ok, but I am not getting email notifications.
I am not sure if it is because they are getting marked as spam or if there are more settings that I need to setup (IMAP tab)
I have not entered any settings in the IMAP tab yet,
so maybe I need IMAP setup before notifications work? 

thanks

Restya

unread,
Feb 18, 2020, 7:26:37 AM2/18/20
to Restya

 
There is no need to configure IMAP for receiving email notifications and can you please check if the main.sh file in the Restyaboard folder path /usr/share/nginx/html/restyaboard/server/php/shell have executable permission, if the file is not having executable permission, please execute the command chmod +x /usr/share/nginx/html/restyaboard/server/php/shell/main.sh and please tell us if you are receiving mail  notifications

For avoiding spam mails for Restyaboard, please follow the instructions from the link https://restya.com/board/docs/mailserver-configuration/

Thanks,
Restya Support

Samuel Arcos

unread,
Feb 19, 2020, 10:18:13 PM2/19/20
to Restya
I went and changed the permissions but it didn't worked. 
also I went and added the imap settings same result, no notifications by email

here is what I have in my docker container: 

Capture.JPG


please note that the  folder path is not  /usr/share/nginx/html/restyaboard/server/php/shell

Thanks 

Samuel Arcos

unread,
Feb 19, 2020, 10:18:13 PM2/19/20
to Restya
I went and changed the permissions on the mail.sh file.
 but still no notifications. 

thanks

On Tuesday, February 18, 2020 at 4:26:37 AM UTC-8, Restya wrote:

Restya

unread,
Feb 19, 2020, 11:37:03 PM2/19/20
to Restya


On Thursday, February 20, 2020 at 8:48:13 AM UTC+5:30, Samuel Arcos wrote:
I went and changed the permissions on the mail.sh file.
 but still no notifications. 

Can you please execute the command "crontab -l" and please tell us the output and can you please manually execute the shell script file by executing the command "/usr/share/nginx/html/server/php/shell/main.sh" and please paste the response here. 

Samuel Arcos

unread,
Feb 20, 2020, 10:12:40 PM2/20/20
to Restya
In my efords to try to get this working I added the x permissions to other files, let me know if I should remove those permissions,
also I am not sure why there is two cron jobs, yesterday when I was working on it, there was only 1 cron job. 

here is the terminal output:

Capture.JPG


Right after I did this, I recreated the container to remove the permissions, because I was getting a blank website. 

I tried the webpage again, but same result, this is what I am getting on docker-compose log:


Capture.JPG


Proabably not related to the email issue, but FYI. 

I am proabably just going to rebuild the container from scratch and lose the boards I had made before. maybe there is an easy way to restore the boards from the old installations? 


thanks for the help. 

Restya

unread,
Feb 20, 2020, 11:45:55 PM2/20/20
to Restya


On Friday, February 21, 2020 at 8:42:40 AM UTC+5:30, Samuel Arcos wrote:
In my efords to try to get this working I added the x permissions to other files, let me know if I should remove those permissions,
also I am not sure why there is two cron jobs, yesterday when I was working on it, there was only 1 cron job. 

here is the terminal output:

Capture.JPG


Right after I did this, I recreated the container to remove the permissions, because I was getting a blank website. 

I tried the webpage again, but same result, this is what I am getting on docker-compose log:


Capture.JPG


Proabably not related to the email issue, but FYI. 

I am proabably just going to rebuild the container from scratch and lose the boards I had made before. maybe there is an easy way to restore the boards from the old installations? 

thanks for the help. 

Can you please send us the "mail.log" file in the "/var/log" folder path to understand and solve the email notification issue. For restoring the boards from the old installations, please import the old database and use it in the new installation.

Samuel Arcos

unread,
Feb 21, 2020, 11:41:35 PM2/21/20
to Restya
I was unable to find mail.log under the /var/log folder:

Capture.JPG

I did some research and it looks like in the php.ini file the mail log option is commented out. 

I un-commented it and placed it in the /var/log/mail.log however, I was unable to test it, because I still get a blank page on my restya board home page.  


should I open a new thread for the new issue (blank page) or do i just leave it here? 

thanks. 

Restya

unread,
Feb 21, 2020, 11:46:25 PM2/21/20
to Restya


On Friday, February 21, 2020 at 10:15:55 AM UTC+5:30, Restya wrote:

I was unable to find mail.log under the /var/log folder:

I did some research and it looks like in the php.ini file the mail log option is commented out. 

I un-commented it and placed it in the /var/log/mail.log however, I was unable to test it, because I still get a blank page on my restya board home page.  


should I open a new thread for the new issue (blank page) or do i just leave it here? 


For the blank page, please set R_DEBUG as true on the config.inc.php file in line 15 on /usr/share/nginx/html/server/php path like https://github.com/RestyaPlatform/board/blob/dev/server/php/config.inc.php#L15 and copy the response of http://localhost/restyaboard/api/v1/oauth.json on the Network tab of Browser developer tools and paste it here. 

Samuel Arcos

unread,
Feb 24, 2020, 10:16:10 PM2/24/20
to Restya
Here is what I got:

Capture.JPG

Here is the URL i got my board hosted on: https://board.dev.windermeregroupone.com/ 
This might make it easier for you, try not to make it public.

thanks. 

Restya

unread,
Feb 24, 2020, 11:49:18 PM2/24/20
to Restya


On Tuesday, February 25, 2020 at 8:46:10 AM UTC+5:30, Samuel Arcos wrote:
Here is what I got:


thanks. 

Here is the URL i got my board hosted on: https://board.dev.windermeregroupone.com/ 
This might make it easier for you, try not to make it public.

Can you please send us the "/var/log/nginx/error.log"  file for understanding and solving the blank page problem?

Samuel Arcos

unread,
Feb 25, 2020, 11:36:42 PM2/25/20
to Restya

Samuel Arcos

unread,
Feb 25, 2020, 11:36:42 PM2/25/20
to Restya
I looked for the nginx error log, I noticed it was empty (only two entries after I refreshed the site several times) 

I checked my docker logs, and there was a database connection error,
I fixed the database connection error

then I looked at the nginx error log again, still only two lines.

Then I looked at the docker-compose log between the proxy and the restya container.
it shows a 401 error getting this file: /api/v1/settings.json

Docker Compose Log: 
-proxy                | nginx.1    | board.dev.windermeregroupone.com x.x.x.x - - [25/Feb/2020:19:53:51 +0000] "GET / HTTP/2.0" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
-proxy                | nginx.1    | board.dev.windermeregroupone.com x.x.x.x - - [25/Feb/2020:19:53:52 +0000] "GET /api/v1/settings.json?token=195d9c5ee080dbbb9b23a78eb8be46895f78c416&_=1582660432040 HTTP/2.0" 401 0 "https://board.dev.windermeregroupone.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
-resty-board          | 172.21.0.3 - - [25/Feb/2020:11:53:51 -0800] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
-resty-board          | 172.20.0.2 - - [25/Feb/2020:11:53:52 -0800] "GET /api/v1/settings.json?token=195d9c5ee080dbbb9b23a78eb8be46895f78c416&_=1582660432040 HTTP/1.1" 401 5 "https://board.dev.windermeregroupone.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"


Restya container Nginx Error.log:
2020/02/25 10:26:28 [error] 66#66: *9 open() "/usr/share/nginx/html/client/service/extdirect" failed (2: No such file or directory), client: 5.101.0.209, server: localhost, request: "POST /service/extdirect HTTP/1.1", host: "66.191.31.3:8081"
2020/02/25 10:55:49 [error] 66#66: *10 open() "/usr/share/nginx/html/client/jars" failed (2: No such file or directory), client: 5.101.0.209, server: localhost, request: "GET /jars HTTP/1.1", host: "x.x.x.3:8081"




thanks


On Monday, February 24, 2020 at 8:49:18 PM UTC-8, Restya wrote:

Restya

unread,
Feb 26, 2020, 12:16:34 AM2/26/20
to Restya


On Wednesday, February 26, 2020 at 10:06:42 AM UTC+5:30, Samuel Arcos wrote:
I looked for the nginx error log, I noticed it was empty (only two entries after I refreshed the site several times) 

I checked my docker logs, and there was a database connection error,
I fixed the database connection error

then I looked at the nginx error log again, still only two lines.

Then I looked at the docker-compose log between the proxy and the restya container.
it shows a 401 error getting this file: /api/v1/settings.json

Docker Compose Log: 
-proxy                | nginx.1    | board.dev.windermeregroupone.com x.x.x.x - - [25/Feb/2020:19:53:51 +0000] "GET / HTTP/2.0" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
-proxy                | nginx.1    | board.dev.windermeregroupone.com x.x.x.x - - [25/Feb/2020:19:53:52 +0000] "GET /api/v1/settings.json?token=195d9c5ee080dbbb9b23a78eb8be46895f78c416&_=1582660432040 HTTP/2.0" 401 0 "https://board.dev.windermeregroupone.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
-resty-board          | 172.21.0.3 - - [25/Feb/2020:11:53:51 -0800] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
-resty-board          | 172.20.0.2 - - [25/Feb/2020:11:53:52 -0800] "GET /api/v1/settings.json?token=195d9c5ee080dbbb9b23a78eb8be46895f78c416&_=1582660432040 HTTP/1.1" 401 5 "https://board.dev.windermeregroupone.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"


Restya container Nginx Error.log:
2020/02/25 10:26:28 [error] 66#66: *9 open() "/usr/share/nginx/html/client/service/extdirect" failed (2: No such file or directory), client: 5.101.0.209, server: localhost, request: "POST /service/extdirect HTTP/1.1", host: "66.191.31.3:8081"
2020/02/25 10:55:49 [error] 66#66: *10 open() "/usr/share/nginx/html/client/jars" failed (2: No such file or directory), client: 5.101.0.209, server: localhost, request: "GET /jars HTTP/1.1", host: "x.x.x.3:8081"


Please schedule the zoom screen share meeting at the link  https://calendly.com/restya/it-support?email=elami...@gmail.com&name=elamigosam to undertsand and solve the problem.

Samuel Arcos

unread,
Mar 2, 2020, 11:18:07 PM3/2/20
to Restya
After some troubleshooting, I was able to access the restya website again.
I recreated the docker-compose stack several times and my browser was remembering sessions from old stacks.  I deleted my browser cookies and got the Restya login pages right away

I still have no notification emails going out. 

What I have done:
I made the main.sh file executable, chmod +x main.sh
There is no /var/log/mail.log file
I ran "bash mail.sh" because I cant run "main.sh" alone. 
I have added the imap settings.

is there anything else I can test? 
This is inside a Docker compose proxy setup, running the default restya docker container. 

Thanks

Restya

unread,
Mar 3, 2020, 12:29:52 AM3/3/20
to Restya

Samuel Arcos

unread,
Mar 3, 2020, 11:06:16 PM3/3/20
to Restya
I saw the time slots available in the calendar, they are all in the super early morning, 2:00 to 5:30 am 
any chance there is a 8:00 am slot? 

thanks.

On Monday, March 2, 2020 at 9:29:52 PM UTC-8, Restya wrote:


On Tuesday, March 3, 2020 at 9:48:07 AM UTC+5:30, Samuel Arcos wrote:
After some troubleshooting, I was able to access the restya website again.
I recreated the docker-compose stack several times and my browser was remembering sessions from old stacks.  I deleted my browser cookies and got the Restya login pages right away

I still have no notification emails going out. 

What I have done:
I made the main.sh file executable, chmod +x main.sh
There is no /var/log/mail.log file
I ran "bash mail.sh" because I cant run "main.sh" alone. 
I have added the imap settings.

is there anything else I can test? 
This is inside a Docker compose proxy setup, running the default restya docker container. 

Please schedule the zoom screen share meeting at the link  https://calendly.com/restya/it-support?to undertsand and solve the problem.

Restya

unread,
Mar 3, 2020, 11:32:32 PM3/3/20
to Restya


On Wednesday, March 4, 2020 at 9:36:16 AM UTC+5:30, Samuel Arcos wrote:
I saw the time slots available in the calendar, they are all in the super early morning, 2:00 to 5:30 am 
any chance there is a 8:00 am slot? 

Can you please tell us your timezone?

Samuel Arcos

unread,
Mar 4, 2020, 9:50:05 AM3/4/20
to Restya
Pacific Time
America/Los_Angeles
Washington USA

Thanks

Samuel Arcos

unread,
Mar 9, 2020, 9:31:12 AM3/9/20
to Restya
What is the link to the zoom screen share meeting today at 6:30 am

Samuel Arcos

unread,
Mar 9, 2020, 9:31:12 AM3/9/20
to Restya
I was able to find the link

thanks


On Wednesday, March 4, 2020 at 6:50:05 AM UTC-8, Samuel Arcos wrote:

Samuel Arcos

unread,
Mar 12, 2020, 11:24:44 PM3/12/20
to Restya
FYI,
I gave up on fixing the email notifications, 
I setup postfix and it was working, I could see it on the logs, but
it would only work when I ran bash main.sh (maybe cron was broken too)
But emails would not go out to the smtp server, or to the recipient email box. 
hopefully this gets fixed in the next version of Restya Board. 

This is the Docker Compose I am ussing: 
version: '2'
services:
  proxy:
    image: jwilder/nginx-proxy
    container_name: proxy
    restart: unless-stopped
    labels:
      com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - certs:/etc/nginx/certs:rw
      - vhost.d:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - ./uploadsize.conf:/etc/nginx/conf.d/uploadsize.conf:ro
    ports:
      - "80:80"
      - "443:443"
    networks:
      - "default"
      - "proxy-tier"

  proxy-letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: letsencrypt
    restart: unless-stopped
    environment:
      - NGINX_PROXY_CONTAINER=proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    volumes_from:
      - "proxy"
    depends_on:
      - "proxy"
    networks:
      - proxy-tier
      - default

  restyaboard:
    image: restyaplatform/restyaboard:dev
    restart: always
    container_name: resty-board
    environment:
      VIRTUAL_HOST: board.example.com
      LETSENCRYPT_HOST: board.example.com
      LETSENCRYPT_EMAIL: ad...@example.com
      POSTGRES_DB: restyaboard
      POSTGRES_HOST: postgres
      POSTGRES_PASSWORD: admin
      POSTGRES_USER: admin
      SMTP_DOMAIN: domain
      SMTP_USERNAME: user
      SMTP_PASSWORD: pass
      SMTP_SERVER: server
      SMTP_PORT: 465
      TZ: America/Los_Angeles
    volumes:
    - ./restyaboard_media:/usr/share/nginx/html/media
    ports:
     - "8081:80"
    networks:
     - proxy-tier
     - default

  postgres:
    image: postgres:9-alpine
    restart: unless-stopped
    container_name: resty-database
    environment:
      POSTGRES_DB: restyaboard
      POSTGRES_HOST: postgres
      POSTGRES_PASSWORD: admin
      POSTGRES_USER: admin
    volumes:
     - ./restyaboard_db:/var/lib/postgresql/data
    networks:
     - default

volumes:
  certs:
  vhost.d:
  html:

networks:
  proxy-tier:

Restya

unread,
Mar 17, 2020, 3:53:26 AM3/17/20
to Restya
Please set R_DEBUG as true on the config.inc.php file in line 15 on /usr/share/nginx/html/server/php path like https://github.com/RestyaPlatform/board/blob/dev/server/php/config.inc.php#L15 and

please download the attached file and pasye it in the "/usr/share/nginx/html/server/php/libs" folder path and

Execute the command crontab -e and delete all the cron jobs and add the below command 
*/5 * * * * /usr/share/nginx/html/server/php/shell/main.sh > /usr/share/nginx/html/tmp/cache/mail_error.log

After adding the command, press "Esc" button and type ":wq!" and press enter.

Please execute the command "sudo service cron reload" and add board members who have Email notification as Instant and perform any actions to send mail notification

Wait for five minutes and send us the "/usr/share/nginx/html/tmp/cache/mail_error.log", "/usr/share/nginx/html/tmp/cache/mail.log" files.

Restya

unread,
Mar 17, 2020, 3:58:41 AM3/17/20
to Restya
Please download the attached file
core.php

Samuel Arcos

unread,
Mar 18, 2020, 12:54:37 AM3/18/20
to Restya
I did as requested,
I then made some changes to my board.
the mail_error.log file was created it was not there before, but was empty. 
I went and added a new user. 
mail_error.log was still empty. 

I tried to check for a updated docker container "docker-compose pull" but nothing new. 

Samuel Arcos

unread,
Mar 24, 2020, 12:13:02 AM3/24/20
to Restya
Some how i fixed it,

I think this is the solution:

I had it hosted with a board.dev.website.com domain

I was resetting everything, then i noticed on the docker compose file that it asks for the smtp_domain, 
I was using my email address domain, website.com
I then decided to move the site from board.dev.website.com to board.website.com
I then had to to chmod +x main.sh (because I build the container, deleting any previous changes)
and it worked, restya board was sending emails through the smtp server. 




On Tuesday, March 17, 2020 at 12:53:26 AM UTC-7, Restya wrote:

Restya

unread,
Mar 24, 2020, 12:33:41 AM3/24/20
to Restya
On Tuesday, March 24, 2020 at 9:43:02 AM UTC+5:30, Samuel Arcos wrote:
Some how i fixed it,

I think this is the solution:

I had it hosted with a board.dev.website.com domain

I was resetting everything, then i noticed on the docker compose file that it asks for the smtp_domain, 
I was using my email address domain, website.com
I then decided to move the site from board.dev.website.com to board.website.com
I then had to to chmod +x main.sh (because I build the container, deleting any previous changes)
and it worked, restya board was sending emails through the smtp server. 

Thanks for the sharing the the issue fixes.
Reply all
Reply to author
Forward
0 new messages