unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Austin Clements <amdragon@MIT.EDU>, Tomi Ollila <tomi.ollila@iki.fi>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] test: attempt to send QUIT to smtp-dummy in case mail send failed
Date: Sat, 12 Nov 2011 12:02:08 +0200	[thread overview]
Message-ID: <yf662iplkv3.fsf@taco2.nixu.fi> (raw)
In-Reply-To: <20111112024941.GY2658@mit.edu>

On Fri, 11 Nov 2011 21:49:41 -0500, Austin Clements <amdragon@MIT.EDU> 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 :)

Tomi

> Quoth Tomi Ollila on Nov 11 at  1:38 am:
> > If mail sending from emacs fails before it has chance to connect
> > to the smtp-dummy mail server, the opportunistic QUIT message
> > sending makes smtp-dummy to exit.
> > ---
> >  test/test-lib.sh |    8 +++++---
> >  1 files changed, 5 insertions(+), 3 deletions(-)
> > 
> > diff --git a/test/test-lib.sh b/test/test-lib.sh
> > index af723ad..57cb088 100755
> > @@ -397,6 +397,8 @@ emacs_deliver_message ()
> >  	   (insert \"${body}\")
> >  	   $@
> >  	   (message-send-and-exit))" >/dev/null 2>&1
> > +    # opportunistically quit smtp-dummy in case above fails.
> > +    echo QUIT | nc 127.0.0.1 25025 >/dev/null 2>&1
> >      wait ${smtp_dummy_pid}
> >      notmuch new >/dev/null
> >  }
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
> 

  reply	other threads:[~2011-11-12 10:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-10 23:38 [PATCH] test: attempt to send QUIT to smtp-dummy in case mail send failed Tomi Ollila
2011-11-12  2:49 ` Austin Clements
2011-11-12 10:02   ` Tomi Ollila [this message]
2011-11-12 15:41     ` Austin Clements
2011-11-12 21:07       ` Tomi Ollila
2011-11-12 21:24         ` Jameson Graef Rollins
2011-11-16 12:44           ` Pieter Praet
2011-11-13  7:01         ` Dmitry Kurochkin
2011-11-13  8:44           ` Tomi Ollila
2011-11-16 21:25             ` [PATCH v2] " Tomi Ollila
2011-11-17 21:52               ` Austin Clements
2011-11-18 14:56               ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yf662iplkv3.fsf@taco2.nixu.fi \
    --to=tomi.ollila@iki.fi \
    --cc=amdragon@MIT.EDU \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).