Project

General

Profile

Bug #5721

Configuring outgoing email settings: testmail failed with: Connection unexpectedly closed: timed out

Added by Oliver Götze about 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Nice to have
Assignee:
Jordan Hubbard
Category:
Middleware
Target version:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

I have an own email server and i tried to use its smtp capabilitys for the freeNAS email notifications. So i copied my working configuration/login data from thunderbird directly into the freeNAS -> system -> settings -> email : formular, but when trying to send a testmail only the message: Connection unexpe ctedly closed: timed out
appears. The mail server itself did not notice any attempts to send a mail.

This are the log entries regarding the failed sendmail attempt:

Aug 1 22:16:26 freenas freenas[2924]: Traceback (most recent call last):
Aug 1 22:16:26 freenas freenas[2924]: File "/usr/local/www/freenasUI/../freenasUI/common/system.py", line 172, in send_mail
Aug 1 22:16:26 freenas freenas[2924]: local_hostname=local_hostname)
Aug 1 22:16:26 freenas freenas[2924]: File "/usr/local/lib/python2.7/smtplib.py", line 251, in __init__
Aug 1 22:16:26 freenas freenas[2924]: (code, msg) = self.connect(host, port)
Aug 1 22:16:26 freenas freenas[2924]: File "/usr/local/lib/python2.7/smtplib.py", line 312, in connect
Aug 1 22:16:26 freenas freenas[2924]: (code, msg) = self.getreply()
Aug 1 22:16:26 freenas freenas[2924]: File "/usr/local/lib/python2.7/smtplib.py", line 360, in getreply
Aug 1 22:16:26 freenas freenas[2924]: + str(e))
Aug 1 22:16:26 freenas freenas[2924]: SMTPServerDisconnected: Connection unexpectedly closed: timed out

My freNAS version is: FreeNAS-9.2.1.6-RELEASE-x64 (ddd1e39)

History

#1 Updated by Jordan Hubbard about 6 years ago

  • Category set to 53
  • Assignee set to Josh Paetzel
  • Target version set to 9.3-BETA

#2 Updated by Oliver Götze about 6 years ago

Yes i can show you the logs. The following is the /var/log/mail.log of the described SMTP attempt (i masked my real IP using zeros)

Aug 1 22:14:41 rs206878 postfix/smtpd[12484]: connect from 000-00-000-000.dynamic.primacom.net[000.00.000.000]
Aug 1 22:14:51 rs206878 postfix/smtpd[12484]: SSL_accept error from 000-00-000-000.dynamic.primacom.net[000.00.000.000]: lost connection
Aug 1 22:14:51 rs206878 postfix/smtpd[12484]: lost connection after CONNECT from 000-00-000-000.dynamic.primacom.net[000.00.000.000]
Aug 1 22:14:51 rs206878 postfix/smtpd[12484]: disconnect from 000-00-000-000.dynamic.primacom.net[000.00.000.000]

btw: that was when using TLS as TLS/SSL setting in the freeNAS email configuration.
But i was curious what happens when changing this to SSL so i did, the test mail failed again but the errors are a bit different on the mail server i have:

Aug 6 23:18:42 rs206878 postfix/smtpd[5847]: connect from 000-00-000-000.dynamic.primacom.net[000.00.000.000]
Aug 6 23:18:42 rs206878 postfix/smtpd[5847]: Anonymous TLS connection established from 000-00-000-000.dynamic.primacom.net[000.00.000.000]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
Aug 6 23:18:42 rs206878 postfix/smtpd[5847]: warning: SASL authentication failure: incorrect digest response
Aug 6 23:18:42 rs206878 postfix/smtpd[5847]: warning: 000-00-000-000.dynamic.primacom.net[000.00.000.000]: SASL CRAM-MD5 authentication failed: authentication failure
Aug 6 23:18:42 rs206878 postfix/smtpd[5847]: lost connection after AUTH from 000-00-000-000.dynamic.primacom.net[000.00.000.000]
Aug 6 23:18:42 rs206878 postfix/smtpd[5847]: disconnect from 000-00-000-000.dynamic.primacom.net[000.00.000.000]

the /var/log/maillog on the freeNAS server shows:
Aug 6 23:17:21 freenas freenas[2924]: Traceback (most recent call last):
Aug 6 23:17:21 freenas freenas[2924]: File "/usr/local/www/freenasUI/../freenasUI/common/system.py", line 178, in send_mail
Aug 6 23:17:21 freenas freenas[2924]: em.em_pass.encode('utf-8'))
Aug 6 23:17:21 freenas freenas[2924]: File "/usr/local/lib/python2.7/smtplib.py", line 615, in login
Aug 6 23:17:21 freenas freenas[2924]: raise SMTPAuthenticationError(code, resp)
Aug 6 23:17:21 freenas freenas[2924]: SMTPAuthenticationError: (535, '5.7.8 Error: authentication failed: authentication failure')

On thunderbird there is only the combined setting SSL/TLS i cannot select only one of them (using this works on thunderbird btw)

And yes "use SMTP authentication" was checked in both cases especially in the SSL case.

#3 Updated by Josh Paetzel about 6 years ago

  • Status changed from Unscreened to Screened

Can you attach the server logs of the attempted connection?

#4 Updated by Jordan Hubbard almost 6 years ago

  • Target version changed from 9.3-BETA to 111

#5 Updated by Josh Paetzel over 5 years ago

  • Status changed from Screened to Unscreened
  • Assignee changed from Josh Paetzel to Jordan Hubbard

#6 Updated by Jordan Hubbard over 5 years ago

  • Status changed from Unscreened to Closed

BRB: We believe this to be fixed by the null mailer fix.

#7 Avatar?id=14398&size=24x24 Updated by Kris Moore about 4 years ago

  • Target version changed from 111 to N/A

Also available in: Atom PDF