Mail server using Docker : Connection refused

Suggestions on Mail Server Installation/Functionality
Zegorax
Posts: 13
Joined: Sat Mar 25, 2017 12:49 pm

Re: Mail server using Docker : Connection refused

Post by Zegorax » Mon Mar 27, 2017 3:32 pm

Hello,

Here's the database result :

Code: Select all

mysql> SELECT * FROM mail_server_server t limit 1;SELECT * from mail_mailbox_server t WHERE t.id in (@smtpId, @imapId);
+----+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------------+------------------+
| id | mx_record  | connection_string                                                                                                                                                                                                                                                                                                 | server_type | smtp_settings_id | imap_settings_id |
+----+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------------+------------------+
|  1 | b.ch | {"DbConnection" : "Server=onlyoffice-mail-server;Database=onlyoffice_mailserver;User ID=mail_admin;Password=Isadmin123;Pooling=True;Character Set=utf8;AutoEnlist=false", "Api":{"Protocol":"http", "Server":"onlyoffice-mail-server", "Port":"8081", "Version":"v1","Token":"d5d56b44bff53511949179ae79fb61bb"}} |           2 |             1000 |              999 |
+----+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------------+------------------+
1 row in set (0.00 sec)

+------+-------------+------+------------+------+-------------+----------------+----------------+--------------+
| id   | id_provider | type | hostname   | port | socket_type | username       | authentication | is_user_data |
+------+-------------+------+------------+------+-------------+----------------+----------------+--------------+
|  999 |          -1 | imap | b.ch |  143 | STARTTLS    | %EMAILADDRESS% |                |            0 |
| 1000 |          -1 | smtp | b.ch |  587 | STARTTLS    | %EMAILADDRESS% |                |            0 |
+------+-------------+------+------------+------+-------------+----------------+----------------+--------------+

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

Re: Mail server using Docker : Connection refused

Post by Maxim » Tue Mar 28, 2017 7:39 am

Hello Zegorax!
At first sight it's all good. I think you should check DNS configuration. Maybe smth. wrong with DNS parametrs.
Let's check, you need application DIG and TELNET. Install it in the community container.
Enter community container and execute command

Code: Select all

dig b.ch MX

Code: Select all

dig b.ch ANY
also use telnet to try to access to domain b.ch

Code: Select all

open b.ch 143
if it's ok you will see
+OK
USER l@b.ch
+OK

Zegorax
Posts: 13
Joined: Sat Mar 25, 2017 12:49 pm

Re: Mail server using Docker : Connection refused

Post by Zegorax » Tue Mar 28, 2017 7:52 am

Okay, you can check the DNS settings with the following domain : bde-arc.ch

I think everything is right. I don't know why it doesn't work. There's a NAT because I have only one IP, but I redirected everything correctly with iptables.

I can telnet the SMTP and IMAP on port 25 and 143 from the outside. Can you check that configuration ?

EDIT : I see now your edited post, I'll try that as soon as I can

Zegorax
Posts: 13
Joined: Sat Mar 25, 2017 12:49 pm

Re: Mail server using Docker : Connection refused

Post by Zegorax » Tue Mar 28, 2017 8:18 am

Here's the dig any :

Code: Select all

>> DiG 9.9.5-3ubuntu0.10-Ubuntu <<>> bde-arc.ch ANY
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43819
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 2, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;bde-arc.ch.                    IN      ANY

;; ANSWER SECTION:
bde-arc.ch.             3789    IN      HINFO   "ANY obsoleted" "See draft-ietf-dnsop-refuse-any"
bde-arc.ch.             245     IN      MX      0 bde-arc.ch.
bde-arc.ch.             3545    IN      NS      terry.ns.cloudflare.com.
bde-arc.ch.             3545    IN      NS      brit.ns.cloudflare.com.

;; AUTHORITY SECTION:
bde-arc.ch.             3545    IN      NS      brit.ns.cloudflare.com.
bde-arc.ch.             3545    IN      NS      terry.ns.cloudflare.com.

;; Query time: 9 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 28 10:13:07 CEST 2017
;; MSG SIZE  rcvd: 197

Here's the dig MX :

Code: Select all

<>> DiG 9.9.5-3ubuntu0.10-Ubuntu <<>> bde-arc.ch MX
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35402
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;bde-arc.ch.                    IN      MX

;; ANSWER SECTION:
bde-arc.ch.             300     IN      MX      0 bde-arc.ch.

;; AUTHORITY SECTION:
bde-arc.ch.             3600    IN      NS      terry.ns.cloudflare.com.
bde-arc.ch.             3600    IN      NS      brit.ns.cloudflare.com.

;; Query time: 342 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 28 10:12:12 CEST 2017
;; MSG SIZE  rcvd: 111
The command open does not do anything

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

Re: Mail server using Docker : Connection refused

Post by Maxim » Tue Mar 28, 2017 8:28 am

Zegorax
Where is the connection between b.ch and bde-arc.ch?
It is all okey with bde-arc.ch, but you posted your issue with b.ch.
b.ch doesn't exist, but this domain in your database.
I'm confused now.

Zegorax
Posts: 13
Joined: Sat Mar 25, 2017 12:49 pm

Re: Mail server using Docker : Connection refused

Post by Zegorax » Tue Mar 28, 2017 8:30 am

Yes, I renamed in the posts for confidentiality purposes, but finally I don't care, everything you saw with b.ch is bde-arc.ch, and l@b.ch is Luca.verardo@bde-arc.ch

Sorry for that misunderstanding !

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

Re: Mail server using Docker : Connection refused

Post by Maxim » Tue Mar 28, 2017 8:38 am

:lol: :lol: :lol:
Ok, if it's clear now let's continue ))))
Connection still refused?

Zegorax
Posts: 13
Joined: Sat Mar 25, 2017 12:49 pm

Re: Mail server using Docker : Connection refused

Post by Zegorax » Tue Mar 28, 2017 8:41 am

No I can telnet successfully into the 143, however I don't know how to get the result with the +OK

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

Re: Mail server using Docker : Connection refused

Post by Maxim » Tue Mar 28, 2017 8:53 am

Try to change 1000 and 999 records where hostname is bde-arc.ch (b.ch) to onlyoffice-mail-server

Code: Select all

Update mail_mailbox_server t SET t.hostname = 'onlyoffice-mail-server' WHERE t.id in (999,1000);

Zegorax
Posts: 13
Joined: Sat Mar 25, 2017 12:49 pm

Re: Mail server using Docker : Connection refused

Post by Zegorax » Tue Mar 28, 2017 9:10 am

In the mail docker container, or in the community one ?

Post Reply