1

Topic: failed connection transport server

Hi everybody,

iRedMail-0.8.4
Store: Mysql
CentOS6.3-64

In log of the server I have:
postfix/smtpd[32123]: lost connection after UNKNOWN from

In client:
failed connection transport server

This client is a app that send electronic files (.xml...etc) to several destinations and return the error above.
This app is configured to send messages mode tls and authentication of the user.
Please help me..
Best regards,
Joe Bernardes

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: failed connection transport server

How does your app send this files? Does it send HELO/EHLO identity? Perform SMTP AUTH?

3

Re: failed connection transport server

ZhangHuangbin wrote:

How does your app send this files? Does it send HELO/EHLO identity? Perform SMTP AUTH?

Hi,

Thansk to answer,

I really do not know if the app sends HELO / EHLO identity but it sends the file as an attachment and SMTP AUTH TLS.
Best regards,

Joe

4

Re: failed connection transport server

I think the problem is how your application send out email. You must perform SMTP AUTH first, then send mail body/attachments.

I suggest you search in Google first to see how the SMTP related library work for your application. For example, PHP/Python/Java have their own smtp library, just check the sample code and you will get it work.

5

Re: failed connection transport server

Hi ZhangHuangbin,
sorry my insistence but, I compiled the app again with the parameters of google and it worked perfectly.
Theoretically, I believe that this condition should be equal to iredmail except port 465 of google and 587 iredmail.
What else can I do to solve this problem?
Best regards,
Joe Bernardes

6

Re: failed connection transport server

Hi Joe,

It's hard to say why it doesn't work for you without your smtp related code.
Port 465 uses SSL, but port 587 uses STARTTLS. They're different, and you must adjust your code to perform STARTTLS connection or SSL connection.

The main difference is, STARTTLS is a SMTP command you should execute after connection is established, then session is secure.
But with SSL, you have to establish a secure connection first, then execute all other SMTP commands.

I don't know which programming language you're using to write your application, so let me take Python for example here.
In Python smtplib module, there's a class "smtplib.SMTP_SSL" for SSL connection, and function "SMTP.starttls()" for STARTTLS connection.

As described in the module document:

SMTP_SSL should be used for situations where SSL is required from the beginning of the connection and using starttls() is not appropriate.

And you cannot use them the same way. Here's simple example:

# SSL connection.
server = smtplib.SMTP_SSL('localhost')    # It uses port 465 by default.
server.login(...)
server.sendmail(...)
server.quit()

# STARTTLS connection.
server = smtplib.SMTP('localhost')
server.starttls()    # This is a SMTP command.
server.login(...)
server.sendmail(...)
server.quit()

Hope it helps.

7

Re: failed connection transport server

Hi,
Can you show me an example in visual basic?
Or change to an alternative solution? because I have some problems with the users.
Best regards
Joe Bernardes

8

Re: failed connection transport server

Hi,
If I disable STARTTLS I will have SSL support in my connection yet ?
Thanks,
Best regards.
Joe Bernardes

9

Re: failed connection transport server

joe_bernardes wrote:

Can you show me an example in visual basic?

Sorry, i don't know Visual Basic at all. sad

joe_bernardes wrote:

If I disable STARTTLS I will have SSL support in my connection yet ?

No. You can try to use SMTP port 25, but it's insecure and not recommended.
Maybe you can find some examples with Google?