Gnus development mailing list
 help / color / mirror / Atom feed
* losing mail
@ 1997-07-27 19:42 Michael R Cook
  1997-07-28  4:16 ` SL Baur
  1997-07-28 15:08 ` Edward J. Sabol
  0 siblings, 2 replies; 4+ messages in thread
From: Michael R Cook @ 1997-07-27 19:42 UTC (permalink / raw)


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.

I was receiving a large file, uuencode and broken up into multiple
messages.  I hit `g' a couple times as the parts were coming in.
One part never showed up in my nnml folder.  But, according to the
log kept by my procmail script, that message *was* stored into my
`nnmail-spool-file'.

Should there be some kind of locking going on between my procmail
script and the gnus nnml backend?  Hmm...


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: losing mail
  1997-07-27 19:42 losing mail Michael R Cook
@ 1997-07-28  4:16 ` SL Baur
  1997-07-28 12:54   ` Michael R Cook
  1997-07-28 15:08 ` Edward J. Sabol
  1 sibling, 1 reply; 4+ messages in thread
From: SL Baur @ 1997-07-28  4:16 UTC (permalink / raw)


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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: losing mail
  1997-07-28  4:16 ` SL Baur
@ 1997-07-28 12:54   ` Michael R Cook
  0 siblings, 0 replies; 4+ messages in thread
From: Michael R Cook @ 1997-07-28 12:54 UTC (permalink / raw)


>>>>> "sb" == SL Baur <steve@xemacs.org> writes:

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

Yes, that was my problem--locking wasn't working properly (my own
fault, really).

Thanks for the thorough response.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: losing mail
  1997-07-27 19:42 losing mail Michael R Cook
  1997-07-28  4:16 ` SL Baur
@ 1997-07-28 15:08 ` Edward J. Sabol
  1 sibling, 0 replies; 4+ messages in thread
From: Edward J. Sabol @ 1997-07-28 15:08 UTC (permalink / raw)
  Cc: Gnus Mailing List

Excerpts from mail: (27-Jul-97) losing mail by Michael R Cook
> 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.
[...]
> Should there be some kind of locking going on between my procmail
> script and the gnus nnml backend?  Hmm...

You need to recompile your movemail binary to use procmail-compatible .lock
semaphore files. Read this article <http://www.rosat.mpe-garching.mpg.de/
mailing-lists/procmail/1997-03/msg00173.html> from the procmail mailing list
Web archive for details on how to do this.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-07-28 15:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-27 19:42 losing mail Michael R Cook
1997-07-28  4:16 ` SL Baur
1997-07-28 12:54   ` Michael R Cook
1997-07-28 15:08 ` Edward J. Sabol

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).