ONLYOFFICE Mail Server Timeout

Questions/problems on Docker
GyozaGuy
Posts: 14
Joined: Tue Nov 17, 2020 4:10 am

ONLYOFFICE Mail Server Timeout

Post by GyozaGuy » Tue Nov 17, 2020 9:30 pm

Hello! I've recently set up an ONLYOFFICE server using the Docker installation script, and it's all working really well except for the mail server. I'm trying to set up my own mail server with my own domain. I've added my domain in the control panel, but when trying to send mail, I get the error message "Smtp.ConnectAsync timeout". After doing some research, I found the page located at https://helpcenter.onlyoffice.com/troub ... /mail.aspx that says this error means the server is having connectivity issues, but seems to mean external mail servers rather than the ONLYOFFICE mail server.

In my setup, I have an nginx reverse proxy server that is forwarding traffic to an internal server which is running ONLYOFFICE. I think I have my nginx config set up properly, but I wanted to check here to see if anybody sees any issues with it, or knows what else could be wrong. My DNS should be set up correctly, and the DNS settings UI gives me all green checkmarks.

This is the command I used to run the installer:

Code: Select all

bash workspace-install.sh -md "mail.mydomain.com"
Here is the nginx config for "mail.mydomain.com" on my reverse proxy:

Code: Select all

server {
    server_name mail.mydomain.com;
    listen 25;
    listen 143;
    listen 465;
    listen 587;
    listen 993;
    listen 995;

    access_log /var/log/nginx/onlyoffice.access.log;
    error_log /var/log/nginx/onlyoffice.error.log;

    location / {
        proxy_pass http://<internal-ip>:$server_port;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $server_name;
    }
}
This is the output of "docker port onlyoffice-mail-server" on the internal server:

Code: Select all

995/tcp -> 0.0.0.0:995
25/tcp -> 0.0.0.0:25
4190/tcp -> 0.0.0.0:4190
465/tcp -> 0.0.0.0:465
8081/tcp -> 0.0.0.0:8081
143/tcp -> 0.0.0.0:143
587/tcp -> 0.0.0.0:587
993/tcp -> 0.0.0.0:993
This is the output of "docker inspect onlyoffice" on the internal server:

Code: Select all

[
    {
        "Name": "onlyoffice",
        "Id": "07db7ddcc39a5a8bc6072c26ac4817b3e20e1a204238fa680fb907754f2bfa9d",
        "Created": "2020-11-12T12:25:05.87785526-07:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "172.18.0.0/16",
                    "Gateway": "172.18.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "011fd1625be5088c3beed4bcefb601f4b1d8038b8944e3ac55a3c8a602da97d3": {
                "Name": "onlyoffice-mysql-server",
                "EndpointID": "83605779984b6fdf695ff05b29666f1fa7bccf7176bf93d9f2df08f9b942b959",
                "MacAddress": "02:42:ac:12:00:03",
                "IPv4Address": "172.18.0.3/16",
                "IPv6Address": ""
            },
            "1f60a3b2b29e1be4ff4056e633caabf1852d474ed43d3b676ab997aab3329823": {
                "Name": "onlyoffice-community-server",
                "EndpointID": "4c9f393e1d1b74731c226a3974844d3c4be82f76900711bd28d2a2ac33d9f2d1",
                "MacAddress": "02:42:ac:12:00:04",
                "IPv4Address": "172.18.0.4/16",
                "IPv6Address": ""
            },
            "2f32a44ca9292eb4e8c9602d1fff8905b42699b20379ae060e153ade98676655": {
                "Name": "onlyoffice-mail-server",
                "EndpointID": "dc325d7eb9fcc26bee758e1e23ca72f752602eee246f3548b5c08bcf38738d56",
                "MacAddress": "02:42:ac:12:00:02",
                "IPv4Address": "172.18.0.2/16",
                "IPv6Address": ""
            },
            "40cd6ab12639c9902f5bf6bec86149bf9ab6f66e3ceb8d6ae6b3e006bc5700ce": {
                "Name": "onlyoffice-document-server",
                "EndpointID": "b19d0cc7b116cfe2c7ee6bd0a38965feff8907667ba5ea3bc1bc8f85324bb974",
                "MacAddress": "02:42:ac:12:00:06",
                "IPv4Address": "172.18.0.6/16",
                "IPv6Address": ""
            },
            "aac73f29108100f983abe09db37e6fae3137753ee04dcc8c3bccd6e003e5b575": {
                "Name": "onlyoffice-control-panel",
                "EndpointID": "2a393df5f857186741c5b8ec4c9adf2436c0058ff700e5d85c89c7e5f7b5ffc4",
                "MacAddress": "02:42:ac:12:00:05",
                "IPv4Address": "172.18.0.5/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]
Any help would be greatly appreciated!

Alexandre
Posts: 197
Joined: Thu Dec 12, 2019 11:08 am

Re: ONLYOFFICE Mail Server Timeout

Post by Alexandre » Mon Dec 07, 2020 1:28 pm

Hello GyozaGuy.
Sorry for the late reply.
Please provide us some additional infromation:
1. OS of the server where ONLYOFFICE Document Server is installed.
3. Version of ONLYOFFICE components installed (please go to Control Panel > Update >make screenshot of this page). Is Mail Server installed on the same server as portal? Or on a separate one?
4. Go to portal settings > Integration > SMTP settings. Try to send test email with open browser console:
- Open browser console (for example, F12 in Chrome) -> choose ‘Network' tab in browser console -> reproduce the issue (try to send a test mail) -> check if there are any error entries in console and send us a screenshot;- Choose ‘Console’ tab in browser console -> reproduce the issue  -> check if there are any error entries in console and send us a screenshot.
5. Also try to reproduce the issue (make a screenshot) and attach to your reply Community Server and Mail Server logs folders. They are located here:
/app/onlyoffice/MailServer/logs/
/app/onlyoffice/CommunityServer/logs/

GyozaGuy
Posts: 14
Joined: Tue Nov 17, 2020 4:10 am

Re: ONLYOFFICE Mail Server Timeout

Post by GyozaGuy » Wed Dec 09, 2020 6:30 am

Thanks for the reply!

1. The server OS is Ubuntu 20.04.1
2. Here are the component versions:
Image
The mail server is installed on the same server as the portal.
3. Sending a test email takes a couple minutes, but no errors occur in the developer console. The last message in the network tab has a response with "completed: true" and a statusCode of 200, but when the last message arrives a message briefly appears on the screen that says the connection to the SMTP server was lost, but it disappears after a fraction of a second.
4. Here are more screenshots of the issue:

Image

Image

Image

Image

Image

For the logs, do you want the entire folder or specific files?

Also, if my domain is "example.com" and I want the mail server to be "mail.example.com", should I run the install script with "-md mail.example.com" or "-md example.com"? I wasn't very sure about that, the documentation wasn't very clear to me. I ran the install script with "-md mail.mydomain.com".

Alexandre
Posts: 197
Joined: Thu Dec 12, 2019 11:08 am

Re: ONLYOFFICE Mail Server Timeout

Post by Alexandre » Thu Dec 10, 2020 10:12 am

Hello GyozaGuy.
I can't check screenshots. For some reason they did not load. Could you please archive them and attach to your next reply?
As for logs, please send whole folders.
As for mail server installation, is it possible to take a test? Remove current mail server and reinstall via "-md example.com". Will the error persist?

GyozaGuy
Posts: 14
Joined: Tue Nov 17, 2020 4:10 am

Re: ONLYOFFICE Mail Server Timeout

Post by GyozaGuy » Thu Dec 10, 2020 5:09 pm

I'm not sure why but the links to my screenshots changed after posting, I even edited the post to fix them but they were different again once the post showed up. Not sure what's happening. They are too big to attach to this post, so here is a link to them on Google Photos: https://photos.app.goo.gl/m9VtKMGwuiDBbDqN7

My Community Server logs are also too large to attach, are there just parts of those that are more important? The mail server logs are attached.

I'll go ahead and try the reinstall in the meantime and see if it makes a difference. Thanks!
Attachments
MailServerLogs.zip
(183.24 KiB) Downloaded 21 times

Alexandre
Posts: 197
Joined: Thu Dec 12, 2019 11:08 am

Re: ONLYOFFICE Mail Server Timeout

Post by Alexandre » Fri Dec 11, 2020 4:29 pm

Hello.
Most likely we will need all the Community Server logs to check the situation.

GyozaGuy
Posts: 14
Joined: Tue Nov 17, 2020 4:10 am

Re: ONLYOFFICE Mail Server Timeout

Post by GyozaGuy » Fri Dec 11, 2020 9:28 pm

I reinstalled everything using "mydomain.com" instead of "mail.mydomain.com" as suggested, but I still have the same errors.

Here are my Community Server and Mail Server logs from the new installation:

https://ordibanna.gyozaguy.com/f/7bdd33 ... 9c7a/?dl=1
https://ordibanna.gyozaguy.com/f/6687a6 ... bba7/?dl=1

I suspect using "mail.mydomain.com" is actually correct because now all of the setup instructions (including DNS records) indicate "mydomain.com" instead of "mail.mydomain.com".

GyozaGuy
Posts: 14
Joined: Tue Nov 17, 2020 4:10 am

Re: ONLYOFFICE Mail Server Timeout

Post by GyozaGuy » Sat Dec 12, 2020 12:37 am

One other issue to note is that after installing ONLYOFFICE using the script, I had to manually edit the network config for the "onlyoffice-mail-server" container to get it to listen on port 8081. I noticed at least one other thread on these forums mentioning this issue, it seems it's still not fixed.

Alexandre
Posts: 197
Joined: Thu Dec 12, 2019 11:08 am

Re: ONLYOFFICE Mail Server Timeout

Post by Alexandre » Thu Dec 17, 2020 8:34 am

Hello GyozaGuy.
It’s a little bit strange. According to provided logs Notify service can't reach MySQL.
Please take a test. Remove all logs from Community Server and Mail Server logs folders (do not delete the folders themselves) and reinstall Mail server as you did originally (“ I ran the install script with "-md mail.mydomain.com")
Then reproduce the issue with “Smtp.ConnectAsync timeout” and send us fresh logs.

GyozaGuy
Posts: 14
Joined: Tue Nov 17, 2020 4:10 am

Re: ONLYOFFICE Mail Server Timeout

Post by GyozaGuy » Fri Dec 18, 2020 1:08 am

Your comment about the logs caused me to realize I had an old MySQL instance running on that server, so I turned it off, reinstalled the mail server with "mail.mydomain.com", then restarted Docker and now I'm not getting the timeout error anymore. The test email messages succeed immediately and I even got a message about a password change. So at least there is some progress! I still can't send to or receive from other e-mail accounts, but no errors have been popping up. No MailServer logs have been generated again, but here is another set of CommunityServer logs.

I suspect I may have an SSL issue too because I can't seem to add any of this domain's accounts to my email client. IMAP connects but SMTP is having issues with each port I try (they are all open):

Code: Select all

----------SMTP----------
connect mail.mydomain.com 465


SASL_PATH: /snap/mailspring/488/usr/share/mailspring/resources/app.asar.unpacked

SMTP Last Response Code: 0
SMTP Last Response: 

mailsmtp Last Error Code: 3
mailsmtp Last Error Explanation: MAILSMTP_ERROR_STREAM
mailsmtp Last Error Location: 1
mailsmtp Last Auth Type: 0

Code: Select all

----------SMTP----------
connect mail.mydomain.com 25
220 mail.mydomain.com ESMTP Postfix
init
EHLO hostname
250-mail.mydomain.com
250-PIPELINING
250-SIZE 51200000
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
start TLS
STARTTLS
220 2.0.0 Ready to start TLS
done
OpenSSL version: OpenSSL 1.1.0f  25 May 2017
Verification failed:

X509_verify_cert_error_string:

self signed certificate
X509_get_subject_name:

QUIT


SASL_PATH: /snap/mailspring/488/usr/share/mailspring/resources/app.asar.unpacked

SMTP Last Response Code: 220
SMTP Last Response: 2.0.0 Ready to start TLS

Code: Select all

----------SMTP----------
connect mail.mydomain.com 587
220 mail.mydomain.com ESMTP Postfix
init
EHLO hostname
250-mail.mydomain.com
250-PIPELINING
250-SIZE 51200000
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
start TLS
STARTTLS
220 2.0.0 Ready to start TLS
done
OpenSSL version: OpenSSL 1.1.0f  25 May 2017
Verification failed:

X509_verify_cert_error_string:

self signed certificate
X509_get_subject_name:

QUIT


SASL_PATH: /snap/mailspring/488/usr/share/mailspring/resources/app.asar.unpacked

SMTP Last Response Code: 220
SMTP Last Response: 2.0.0 Ready to start TLS
Thanks for all the help!
Attachments
2020-12-17 - CommunityServerLogs.tar.gz
(144.47 KiB) Downloaded 16 times

Post Reply