Score:0

STMP connection error with roundcube

za flag

recently I was trying to install roundcube on my server and everything works fine until smtp test. When I try to connect i always get this error: SMTP send: NOT OK(Connection failed: Failed to connect socket: fsockopen(): unable to connect to ssl://mx.mydomain.me:587 (Unknown error))

Syslog at time of connection:

Feb  1 11:14:35 mx postfix/smtpd[196497]: initializing the server-side TLS engine
Feb  1 11:14:35 mx postfix/smtpd[196497]: connect from Ubuntu-2004-focal-64-minimal-hwe[ip]
Feb  1 11:14:35 mx postfix/smtpd[196497]: lost connection after CONNECT from Ubuntu-2004-focal-64-minimal-hwe[ip]
Feb  1 11:14:35 mx postfix/smtpd[196497]: disconnect from Ubuntu-2004-focal-64-minimal-hwe[ip] commands=0/0

My postfix config:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2



# TLS parameters
smtpd_tls_cert_file = /etc/letsencrypt/live/mx.mydomain.me/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mx.mydomain.me/privkey.pem
smtpd_tls_security_level = may

smtp_tls_CApath=/etc/ssl/certs
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_tls_note_starttls_offer = yes

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mx.raveoultion.me
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, mydomain.me, mx.mydomain.me, localhost.mydomain.me, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 4
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_received_header = yes

Also, I have ufw rule for my port.

After some testing, now i also get this error:

 mx postfix/smtpd[208262]: warning: SASL: Connect to private/auth failed: No such file or directory
 mx postfix/smtpd[208262]: fatal: no SASL authentication mechanisms

I have libsas12 installed

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.