LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Telnet localhost 465, pop3s, imaps. connection closed by foreign host (https://www.linuxquestions.org/questions/linux-newbie-8/telnet-localhost-465-pop3s-imaps-connection-closed-by-foreign-host-4175513803/)

tuanhqit 08-07-2014 12:00 AM

Telnet localhost 465, pop3s, imaps. connection closed by foreign host
 
Hello! I'm setting up SSL encrypted connection in Postfix, Dovecot. I use vps amazon ec2.
Error:
telnet localhost 465
Escape character is '^]'.
Connection closed by foreign host.

Code:

# ss -tpl | grep -E 'imaps|pop3s'
LISTEN    0      100                    :::imaps                  :::*        users:(("dovecot",17085,26))
LISTEN    0      100                    *:imaps                    *:*        users:(("dovecot",17085,25))
LISTEN    0      100                    :::pop3s                  :::*        users:(("dovecot",17085,20))
LISTEN    0      100                    *:pop3s                    *:*        users:(("dovecot",17085,19))
///////////////////////////////////////////////////////////////////
# ss -tnpl | grep 465
LISTEN    0      100                      :::465                    :::*      users:(("master",17696,18))
LISTEN    0      100                      *:465                      *:*      users:(("master",17696,17))

Have a something wrong ? telnet localhost 465
connection closed by foreign host
If you need anything else (configuration file), post reply. I would show you.
Thank you very much. I am a newbie. Not good english. Please explain clearly.

unSpawn 08-07-2014 04:58 PM

0) If the port uses SSL then you don't want to telnet as you can't do a SSL handshake. Instead use something like
Code:

true | openssl s_client -connect localhost:465
1) If a port seems "closed" when it should be open always check: a) tcp_wrappers (/etc/hosts.{allow,deny}), b) iptables-save output, c) system and daemon logs in /var/log/ and d) the daemon configuration for clues.

tuanhqit 08-12-2014 02:32 AM

Pop3s, Imaps Dovecot can't receive email
 
Hello everybody.
I configued mail server. I can send email form port 465 but i can't receive email by pop3s, imaps. if I don't use SSL, my server would work. Sorry my english.
These are configuration files

Dovecot
Code:

protocols = imap pop3 lmtp
ssl = yes
ssl_cert = </etc/pki/tls/certs/sucsongtre.vn.crt
ssl_key = </etc/pki/tls/private/sucsongtre.vn.key

Master.cf
Code:

smtps    inet  n      -      n      -      -      smtpd
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes

Main.cf
Code:

home_mailbox = Maildir/
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
smtpd_use_tls = yes
smtpd_tls_key_file  = /etc/pki/tls/private/sucsongtre.vn.key
smtpd_tls_cert_file = /etc/pki/tls/certs/sucsongtre.vn.crt
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes

Code:

# ss -tpl | grep -E 'imaps|pop3s'
LISTEN    0      100                    :::imaps                  :::*        users:(("dovecot",20254,26))
LISTEN    0      100                    *:imaps                    *:*        users:(("dovecot",20254,25))
LISTEN    0      100                    :::pop3s                  :::*        users:(("dovecot",20254,20))
LISTEN    0      100                    *:pop3s                    *:*        users:(("dovecot",20254,19))

Code:

# ss -tnpl | grep 465
LISTEN    0      100                      :::465                    :::*      users:(("master",8920,13))
LISTEN    0      100                      *:465                      *:*      users:(("master",8920,12))

If you want to know more configuration file, you can reply, i will show you.
Thank you for help. Sorry my english not good.

tuanhqit 08-12-2014 03:29 AM

Quote:

Originally Posted by unSpawn (Post 5217163)
0) If the port uses SSL then you don't want to telnet as you can't do a SSL handshake. Instead use something like
Code:

true | openssl s_client -connect localhost:465
1) If a port seems "closed" when it should be open always check: a) tcp_wrappers (/etc/hosts.{allow,deny}), b) iptables-save output, c) system and daemon logs in /var/log/ and d) the daemon configuration for clues.

Hello, can you help me? i have a problem. my mail server can send email by 465 but not receive email by pop3s, imaps.

Tinkster 08-12-2014 05:49 PM

Merged the two closely related threads - please stick to one thread per topic.


All times are GMT -5. The time now is 02:07 PM.