SMTP settings ignored?

Adding a first (new) user / portal activity notifications / email / chat
Post Reply
scott
Posts: 2
Joined: Mon Jul 22, 2019 11:42 am

SMTP settings ignored?

Post by scott » Mon Jul 22, 2019 11:55 am

Dear ONLYOFFICE developers,

I've installed ONLYOFFICE via a custom made docker-compose file and I got everything basically working except a strange issue I am having with email. When I setup my domain I was able to send emails to my account setup on the the ONLYOFFICE portal. I was also able to send email to an account I've had on a shared host for ages fine. And as expected I was not able to send email to my gmail account because I'm hosting this server at home with a normal residential ISP. So the solution I was told was to use a SMTP relay. Now to setup the SMTP relay I assumed I would need to enter in the relay information under the settings=>integration=>SMTP settings section.

I setup all the values, sent a test message and everything seemed fine except when I sent an email to my gmail account it returned as undeliverable with the same message as before (your sender IP is not allowed). I also tried restarting my docker-compose file with the same effect.

then I tried entering nonsense values in the SMTP settings and tested them, and it says it failed (as expected). But I am able to send email anyway just as before with the same results (my domains are fine, but gmail won't allow). Same error messages as before.

So it seems my SMTP settings are being ignored.

If you need I have my docker-compose file here:
version: '2.1'
services:
nextcloud:
build:
context: /opt/mypetcloud/mpc_module_images/nextcloud
dockerfile: Dockerfile
image: mpc_nextcloud:latest
restart: always
depends_on:
mariadb:
condition: service_healthy
environment:
- UPLOAD_MAX_FILESIZE=10G
- NEXTCLOUD_TRUSTED_DOMAINS=${FQDN}
- MYSQL_HOST=mariadb
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_PASSWORD=${MYSQL_DATABASE_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- NEXTCLOUD_ADMIN_USER=${ADMIN_NAME}
- NEXTCLOUD_ADMIN_PASSWORD=${ADMIN_PASSWORD}
- VIRTUAL_HOST=${FQDN}
- ServerName=${FQDN}
ports:
- 11000:80
volumes:
- /var/mpc_data/deployed_apps/nextcloud/html:/var/www/html
# read_only: true
mariadb:
image: mariadb
#command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- /var/mpc_data/deployed_apps/nextcloud/db_volume:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_PASSWORD=${MYSQL_DATABASE_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
ports:
- 3306:3306
healthcheck:
test: mysqladmin -uroot -ppassword ping
interval: 20s
timeout: 30s
retries: 30
elasticsearch:
build:
context: /opt/mypetcloud/mpc_module_images/elasticsearch/
dockerfile: Dockerfile
depends_on:
- nextcloud
image: mpc_elasticsearch:latest
###image: ark74/nc_fts
restart: always
volumes:
- /var/mpc_data/deployed_apps/nextcloud/elasticsearch_data:/usr/share/elasticsearch/data
- /var/mpc_data/deployed_apps/nextcloud/readonlyrest_config/readonlyrest.yml:/usr/share/elasticsearch/config/readonlyrest.yml
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
# read_only: true
onlyoffice-mysql-server:
image: mysql:5.7
restart: always
stdin_open: true
tty: true
depends_on:
- nextcloud
volumes:
- ./app/onlyoffice/mysql/conf.d:/etc/mysql/conf.d
- ./app/onlyoffice/mysql/data:/var/lib/mysql
- ./app/onlyoffice/mysql/initdb:/docker-entrypoint-initdb.d
- ./app/onlyoffice/mysql/logs:/var/log/mysql
environment:
- MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
- MYSQL_DATABASE=onlyoffice
networks:
- onlyoffice
ports:
- 3306

onlyoffice-document-server:
image: onlyoffice/documentserver
restart: always
stdin_open: true
tty: true
depends_on:
- nextcloud
- onlyoffice-mysql-server
volumes:
- ./app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice
- ./app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data
- ./app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice
- ./app/onlyoffice/DocumentServer/db:/var/lib/postgresql
networks:
- onlyoffice

onlyoffice-mail-server:
build:
context: /opt/mypetcloud/mpc_module_images/mpc_mail_server_companion
dockerfile: Dockerfile
image: mpc_onlyoffice_mail_server:latest
restart: always
stdin_open: true
tty: true
depends_on:
- nextcloud
- onlyoffice-mysql-server
- onlyoffice-document-server
ports:
- "25:25"
- "110:110"
- "143:143"
- "465:465"
- "587:587"
- "993:993"
- "995:995"
expose:
# - '25'
# - '110'
# - '143'
# - '465'
# - '587'
# - '993'
# - '995'
- '8081'
environment:
- MYSQL_SERVER=onlyoffice-mysql-server
- MYSQL_SERVER_PORT=3306
- MYSQL_ROOT_USER=root
- MYSQL_ROOT_PASSWD=$MYSQL_ROOT_PASSWORD
- MYSQL_SERVER_DB_NAME=onlyoffice_mailserver
- SSL_KEY_PATH="/etc/pki/tls/mailserver"
- SSL_CERTIFICATE_PATH="/etc/pki/tls/mailserver"
- SSL_DHPARAM_PATH="/etc/pki/tls/mailserver"
volumes:
- ./app/onlyoffice/MailServer/data:/var/vmail
- ./app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver
cap_add:
- NET_ADMIN
- SYS_PTRACE
hostname: flieble.com
networks:
- onlyoffice

onlyoffice-community-server:
image: onlyoffice/communityserver
restart: always
stdin_open: true
tty: true
depends_on:
- nextcloud
- onlyoffice-mysql-server
- onlyoffice-mail-server
- onlyoffice-document-server
ports:
- '5222:5222'
- '11039:80'
environment:
- ONLYOFFICE_CORE_MACHINEKEY=a9oKccFz9WrYpkK
- MYSQL_SERVER_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
- MYSQL_SERVER_DB_NAME=onlyoffice
- MYSQL_SERVER_HOST=onlyoffice-mysql-server
- MYSQL_SERVER_USER=onlyoffice_user
- MYSQL_SERVER_PASS=$MYSQL_ROOT_PASSWORD

- DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server

- MAIL_SERVER_API_HOST=onlyoffice-mail-server
- MAIL_SERVER_DB_HOST=onlyoffice-mysql-server
- MAIL_SERVER_HOSTNAME=onlyoffice-mail-server
- MAIL_SERVER_DB_NAME=onlyoffice_mailserver
- MAIL_SERVER_DB_PORT=3306
- MAIL_SERVER_DB_USER=root
- MAIL_SERVER_DB_PASS=$MYSQL_ROOT_PASSWORD
- MAIL_SERVER_API_PORT=8081

- SSL_KEY_PATH="/var/www/onlyoffice/Data/certs"
- SSL_CERTIFICATE_PATH="/var/www/onlyoffice/Data/certs"
- SSL_DHPARAM_PATH="/var/www/onlyoffice/Data/certs"
volumes:
- ./app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data
- ./app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice
networks:
- onlyoffice

networks:
onlyoffice:
driver: 'bridge'

Maxim
Posts: 2017
Joined: Tue Oct 11, 2016 2:34 pm

Re: SMTP settings ignored?

Post by Maxim » Tue Jul 23, 2019 7:16 am

Hello scott!
Remember that 'SMTP settings' section us used for notifications of the Onlyoffice portal only.
notifications.png
notifications.png (14.19 KiB) Viewed 102 times
If you connected your mail account to the Onlyoffice portal in 'Mail' module you pointed SMTP/IMAP connection to this mail account and this is not connected with portal notifications. Onlyoffice portal doesn't use your mail account for sending its notifications.

scott
Posts: 2
Joined: Mon Jul 22, 2019 11:42 am

Re: SMTP settings ignored?

Post by scott » Tue Jul 23, 2019 11:42 am

Hi Maxim,
Thank you for your reply. This makes sense however there does not appear to be any direct way to do what i want, that is setup a relay smtp account for my emails in the portal. Is there a configuration file somewhere I could hack to make it work? I was looking into changing the main.cf file, would that be right?

Maxim
Posts: 2017
Joined: Tue Oct 11, 2016 2:34 pm

Re: SMTP settings ignored?

Post by Maxim » Thu Jul 25, 2019 10:21 am

Hello!
Is there a configuration file somewhere I could hack to make it work?
I was looking into changing the main.cf file, would that be right?
There is no such file.
You can use 'SMTP settings' for the mail notifications only.

Post Reply