Community mailing list archives

Re: SMTP timeout

Camptocamp France SAS, Alexandre Fayolle - Camptocamp
- 08/27/2015 02:34:31
On 27/08/2015 04:51, Phui Hock wrote:
> I was hit by a mail bug that seems to be caused by a partial connection
> to SMTP server that never returns, preventing subsequent mail job to
> skip and no mail is sent ever since.
> In, SMTP connection is made without setting a timeout.
> Without the optional timeout argument, the global default timeout is
> used, which is None. Should the connection to the SMTP fails to return,
> the connection will hang indefinitely. This will cause subsequent mail
> job to skip without notice.
> I checked the latest v7 and v8 head and no timeout is set. Did anyone
> encounter the same issue, or is it just me missing something here?

We fixed this for the fetchmail part recently.

I suggest you set up a local SMTP relay such as nullmailer
(, also available in most Linux
distributions), which will handle the queueing for you in case your
official SMTP server is not reachable. This is because Odoo does not
handle an internal outgoing mail queue and is therefore not able to
retry sending mails. It expects the SMTP server to be available

Alexandre Fayolle
Chef de Projet
Tel : +33 4 58 48 20 30

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex