Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A706E429E27 for ; Sat, 12 Nov 2011 07:39:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E09cNK2oXewj for ; Sat, 12 Nov 2011 07:39:09 -0800 (PST) Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU [18.7.68.37]) by olra.theworths.org (Postfix) with ESMTP id 1E0EA429E25 for ; Sat, 12 Nov 2011 07:39:09 -0800 (PST) X-AuditID: 12074425-b7f116d0000008fe-a8-4ebe931c3115 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP id 82.2D.02302.C139EBE4; Sat, 12 Nov 2011 10:39:08 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id pACFd7wt031744; Sat, 12 Nov 2011 10:39:08 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pACFd5Tq002141 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sat, 12 Nov 2011 10:39:06 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1RPFhw-0006rU-WA; Sat, 12 Nov 2011 10:41:29 -0500 Date: Sat, 12 Nov 2011 10:41:28 -0500 From: Austin Clements To: Tomi Ollila Subject: Re: [PATCH] test: attempt to send QUIT to smtp-dummy in case mail send failed Message-ID: <20111112154128.GB2658@mit.edu> References: <20111112024941.GY2658@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnleLIzCtJLcpLzFFi42IRYrdT15WZvM/PYOYRHovrN2cyW7xZOY/V gcnj8NeFLB7PVt1iDmCK4rJJSc3JLEst0rdL4MqYtXsLW8Fzrorv7cuYGxgvcnQxcnJICJhI vPnTxQRhi0lcuLeerYuRi0NIYB+jxK+f7UwQzgZGic9zeqCck0wSLw5/YIFwljBKTFt/gR2k n0VAVeL7u/mMIDabgIbEtv3LwWwRARWJB23rWUFsZgFpiW+/m8H2CQtESOw7v4UNxOYV0JY4 cvsj0FAOoKH5Ele210CEBSVOznzCAtGqJXHj30smkBKQMcv/gX3AKaAj8WrPbbApokCbppzc xjaBUWgWku5ZSLpnIXQvYGRexSibklulm5uYmVOcmqxbnJyYl5dapGuhl5tZopeaUrqJERzW Lqo7GCccUjrEKMDBqMTDuyBpr58Qa2JZcWXuIUZJDiYlUd71E/f5CfEl5adUZiQWZ8QXleak Fh9ilOBgVhLhXW0HlONNSaysSi3Kh0lJc7AoifO+3uHgJySQnliSmp2aWpBaBJOV4eBQkuBd PwmoUbAoNT21Ii0zpwQhzcTBCTKcB2j4bJAa3uKCxNzizHSI/ClGXY51V5pPMwqx5OXnpUqJ 8zaCFAmAFGWU5sHNgaWjV4ziQG8J86qCVPEAUxncpFdAS5iAlrAo7AVZUpKIkJJqYPR3nx9y LSIgksttXgDntm9++TzTFEVE7Z8nCG2Iqr2XET1zjYp2tvKzI+vd7nFs+ZDbkl9z8d3Bee4P Ytmqvq//rCk9v/GYnfy9PSdEixdMPFjALif6UvPUmedrjGO+7qhXqtN5qn5lT/CVHfpSey9e 8GcSblNh1Dj9Wdvty2WHbrUTtdbCckosxRmJhlrMRcWJAJoDqmoiAwAA Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Nov 2011 15:39:09 -0000 Quoth Tomi Ollila on Nov 12 at 12:02 pm: > On Fri, 11 Nov 2011 21:49:41 -0500, Austin Clements wrote: > > Good idea, but this introduces a dependency on netcat. Would it work > > to simply kill the SMTP dummy? > > I cannot guarantee 6 nines of probability (but can guarantee as many eights > as one migh wish ;) > > Socket buffering and timing might cause smtp dummy to be killed before > it has read all content... > > But... i recall bash has a way to do tcp stuff .../dev/tcp/host/port > is mentioned in manual page. > I'll investigate this later (or, anyone of you, provide a patch :) Actually, since sending mail is synchronous, there shouldn't be any issues with buffering or timing. If Emacs successfully sends the message, it will wait for the OK response (`smtpmail-via-smtp'), which should indicate that the message is in stable storage on the SMTP server (this is rather fundamental to SMTP's reliability as a protocol, after all). Thus, the smtp-dummy *should* be done by the time Emacs exits. If Emacs fails to send the message, then it doesn't really matter and you just want the smtp-dummy to go away. I say "should" because smtp-dummy needs a one line patch to add an fflush at the end of receive_data_to_file. Any real SMTP server would do this (not to mention a full fsync) before acknowledging the message.