On 29/12/2020 13:58, Wolfgang Paul Rauchholz wrote: > I am setting up an email server on my home box with postfix and dovecot > My server is modem router and has as such an internal and external > network interface > > *>From my laptop (LAN) > *From Thunderbird I get the message: Could not connect to server > localhost. The connection was refused. > Testing with telnet from CLI I get > (1) telnet home smtp > Trying 10.5.2.1... > telnet: connect to address 10.5.2.1 <http://10.5.2.1>: Connection refused > (2) telnet home imap > Trying 10.5.2.1... > Connected to home. > Escape character is '^]'. > * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE > IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
The Thunderbird error message is about a server named localhost (meaning: the host on which Thunderbird itself is running). Localhost always resolves to the loopback interface, usually with IP address 127.0.0.1. So your Thunderbird test was irrelevant in that it was configured to connect to the wrong host. Your telnet tests suggest that you expect the server to be running and reachable at IP address 10.5.2.1. > *Testing from server works fine. > *telnet localhost imap > * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE > IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready. This test demonstrates that the IMAP server is running on your server machine and is bound to the localhost IP address (again: typically 127.0.0.1 which resolves to the loopback interface). > > telnet localhost smtp > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > 220 home.wo-lar.com <http://home.wo-lar.com> ESMTP Same here. > The server is listening on port 25, 587 and 465 > netstat -plutn | grep 25 and 587 > tcp 0 0 127.0.0.1:25 <http://127.0.0.1:25> > 0.0.0.0:* LISTEN 28704/master > tcp 0 0 127.0.0.1:587 <http://127.0.0.1:587> > 0.0.0.0:* LISTEN 21435/smtpd You need to configure your IMAP and SMTP servers to listen on 10.5.2.1:587 and 10.5.2.1:25 respectively. So not localhost.
