Community mailing list archives
Re: SMTP timeoutby
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 <firstname.lastname@example.org> 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