The smtp server does not work with the tryton version 5.2

Hi,

After make a tick on send email on Level field when i try to create a dunning,there was an error shown below ,otherwise i have configured my smtp server on trytond.conf , my tryton version is 5.2.

Is the version have a relation about that !?because when i have tested that on my own version 6.0 it works normally!

this is the error:

Traceback (most recent call last):
File “/trytond/wsgi.py”, line 104, in dispatch_request
return endpoint(request, **request.view_args)
File “/trytond/protocols/dispatcher.py”, line 47, in rpc
return methods.get(request.rpc_method, _dispatch)(
File “/trytond/wsgi.py”, line 72, in auth_required
return wrapped(*args, **kwargs)
File “/trytond/protocols/wrappers.py”, line 131, in wrapper
return func(request, pool, *args, **kwargs)
File “/trytond/protocols/dispatcher.py”, line 209, in _dispatch
transaction.commit()
File “/trytond/transaction.py”, line 221, in commit
datamanager.tpc_vote(self)
File “/trytond/sendmail.py”, line 101, in tpc_vote
self._server = get_smtp_server(self.uri)
File “/trytond/sendmail.py”, line 59, in get_smtp_server
server = connector(uri.hostname, uri.port, **extra)
File “/smtplib.py”, line 255, in init
(code, msg) = self.connect(host, port)
File “/smtplib.py”, line 339, in connect
self.sock = self._get_socket(host, port, self.timeout)
File “/smtplib.py”, line 310, in _get_socket
return socket.create_connection((host, port), timeout,
File “/socket.py”, line 808, in create_connection
raise err
File “/socket.py”, line 796, in create_connection
sock.connect(sa)
OSError: [Errno 101] Network is unreachable

thanks in advance.

Your SMTP server configured is not reachable. It is a configuration or network issue.

I strongly suggest you to use only supported tryton series.

my network is fine and about the configuration of trytond.conf i have copy just the workful statements that i already used for my tryton 6.0 and work normally.

this is my own configuration (settings smtp) on trytond.conf

[email]
uri = smtp+tls://alvarespokomi@gmail.com:xxx@gmail.com:587
from = alvarespokomi@gmail.com

is there other settings i should made !

The error says it’s a network issue. Please try to telnet the Gmail service from your server before any further validation.

Hi,

what do you mean by telnet the Gmail service from the server

If you’re in a linux server:
$telnet smtp.gmail.com 587

I use tryton 6.0.x on a linux server. and succed today to configure it

A) i installed postfix and configure to use a smarthost (i choose internet with smarthost)

https://www.cyberciti.biz/faq/how-to-configure-postfix-relayhost-smarthost-to-send-email-using-an-external-smptd/

postfix system name mail is the user name server that you will use to send mail. for exemple if your FAI is fai.com and you smtp user is user@fai.com the system name mail (in postfix configuration) is fai.com

get the infos from your isp for smtp to tweek main.conf

you will have to install one or 2 module more (postfix tells you in /var/log/messages/mail.info) i can’t remember i am not with the computer i tweek

B) in postfix main.conf

myhostname =fai.com

C) ou must rename the from header in postfix

at this moment the mail command can use the fai’ smtp

in tryton.conf you must configure the mail from info

[mail]
from="Sender Name" <address>

i did not touch anything else and it worked