Gnus development mailing list
 help / color / mirror / Atom feed
From: SL Baur <steve@xemacs.org>
Subject: Re: losing mail
Date: 27 Jul 1997 21:16:00 -0700	[thread overview]
Message-ID: <m2en8j7qwv.fsf@altair.xemacs.org> (raw)
In-Reply-To: Michael R Cook's message of "27 Jul 1997 15:42:59 -0400"

Michael R Cook <mcook@cognex.com> writes:

> I just observed what I had always suspected: If gnus is fetching
> mail from my `nnmail-spool-file' while mailing is arriving, mail can
> be lost.

Without coordinated locking between procmail and movemail, yes, mail
can be lost.

Here's a simple definitive test to see if locking is working between
procmail and movemail.

Add something like this recipe to your .procmailrc:

:0 w:
* ^X-yzzy: Gnus Locking Test
| /home/steve/bin/locktest.sh >> foo.spool


locktest.sh should look something like:
#!/bin/sh

while read line; do
        echo $line
done
sleep 120
echo You Lose
## locktest.sh ends here

Now send a message to yourself with a header `X-yzzy: Gnus Locking Test'
and verify with ps that you have a `hung' procmail process.

Now in another Xterm execute something like:

$ /usr/src/xemacs-20.0/lib-src/movemail ~/spool/foo.spool /tmp/foo-bar

With a `sleep 120' in the test script you have two minutes to execute
the movemail command.  You can shorten the wait if you like.

The movemail command should also hang, because foo.spool is locked by
procmail.  If you _do_ have locking you will have your test message
complete with an appended `You Lose' line at the bottom in /tmp/foo-bar
and ~/spool/foo.spool is zero length.

If you _don't_ have locking, you will have two non-zero length files
when you're done.  /tmp/foo-bar with a copy of the test message, and
~/spool/foo.spool with the single line `You Lose'.

Adjust paths to fit the local environment, tested against procmail-3.11pre7
on Linux-2.0.30, your mileage may (but shouldn't) vary, batteries not
included, offer void where prohibited etc. etc.

See
	http://www.miranova.com/gnus-list/Nov-1995/0379.html
for more information from the mailing list archives.


  reply	other threads:[~1997-07-28  4:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-27 19:42 Michael R Cook
1997-07-28  4:16 ` SL Baur [this message]
1997-07-28 12:54   ` Michael R Cook
1997-07-28 15:08 ` Edward J. Sabol

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

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

  git send-email \
    --in-reply-to=m2en8j7qwv.fsf@altair.xemacs.org \
    --to=steve@xemacs.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.
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 NNTP newsgroup(s).