Community mailing list archives

community@mail.odoo.com

Re: SMTP timeout

by
Camptocamp France SAS, Alexandre Fayolle - Camptocamp
- 08/27/2015 05:33:12
probably yes. You should propose a patch for this to Odoo.

Alexandre

On 27/08/2015 11:14, Phui Hock wrote:
> Thanks for the suggestion. I use postfix to relay the mails after
> confirming the bug. Will give nullmailer a try. But I think this
> warrants a proper fix to the smtplib.SMTP calls in ir_mail_server.py so
> the row level lock is released properly.
> 
> 
> On Thu, Aug 27, 2015 at 2:37 PM, Alexandre Fayolle
> <alexandre.fayolle@camptocamp.com
> <mailto:alexandre.fayolle@camptocamp.com>> wrote:
> 
>     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 ir_mail_server.py, 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
>     (http://untroubled.org/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
>     immediately.
> 
> 
>     -- 
>     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
>     http://www.camptocamp.com
> 
>     _______________________________________________
>     Mailing-List: https://www.odoo.com/groups/community-59
>     Post to: mailto:community@mail.odoo.com <mailto:community@mail.odoo.com>
>     Unsubscribe: https://www.odoo.com/groups?unsubscribe
> 
> 
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59
> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe
> 


-- 
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
http://www.camptocamp.com