GNU bug report logs - #2196
movemail.c, pop, and mbox

Previous Next

Package: emacs;

Reported by: jpff <jpff <at> cs.bath.ac.uk>

Date: Wed, 4 Feb 2009 14:30:02 UTC

Severity: minor

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2196 in the body.
You can then email your comments to 2196 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2196; Package emacs. (Wed, 04 Feb 2009 14:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to jpff <jpff <at> cs.bath.ac.uk>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Wed, 04 Feb 2009 14:30:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: jpff <jpff <at> cs.bath.ac.uk>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.90; rmail not reading email
Date: Wed,  4 Feb 2009 14:24:31 +0000
I have just tried to read new mail (g) in rmail mode 
It appeared to lose the mail -- the external mailbox was cleared but
the mail did not appear.  I later found it appended to the last message
but in a format that is neither one nor the other.  It starts as
below....



0, unseen,,
Return-Path: <cyrus <at> air>
Received: from murder ([unix socket])
	 by air (Cyrus v2.3.8) with LMTPA;
	 Wed, 04 Feb 2009 10:27:50 +0000
X-Sieve: CMU Sieve 2.3
Envelope-to: jpff <at> cs.bath.ac.uk
Delivery-date: Wed, 04 Feb 2009 10:27:50 +0000
Received: from authenticated user by air.cs.bath.ac.uk with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.69)
	(envelope-from <jhd <at> cs.bath.ac.uk>)
	id 1LUez0-0002dZ-4X; Wed, 04 Feb 2009 10:27:50 +0000
Date: Wed, 4 Feb 2009 10:27:50 +0000 (GMT)
From: Professor James Davenport <jhd <at> cs.bath.ac.uk>
To: J P Fitch <jpff <at> cs.bath.ac.uk>, J A Padget <jap <at> cs.bath.ac.uk>, 
    Russell Bradford <rjb <at> cs.bath.ac.uk>
cc: James Davenport <jhd <at> cs.bath.ac.uk>
Subject: Blast from the past
Message-ID: <Pine.LNX.4.61.0902041026480.7689 <at> ralph.cs.bath.ac.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

I found myself reading, or at leats looking for,

@Article{ McArthuretal1988,
  title = "{Skill-oriented task sequencing in an intelligent tutor for 
basic algebra}",
  author = {McArthur,D. Stasz,C. Hotta,J. and Peter,O. and Burdorf,C.},
  journal = {Instructional Science},
  volume = {17},
  year = {1988},
  pages = {281-307},
  annote = {DOI	10.1007/BF00056218},
  keywords = {EDUC}
}




0, unseen,,
Return-Path: <cyrus <at> air>
Received: from murder ([unix socket])
	 by air (Cyrus v2.3.8) with LMTPA;
	 Wed, 04 Feb 2009 10:44:59 +0000
etc etc ...........................................

unrmail will not touch it as there are no *** EOOH *** lines.  Looks
liek I need to do a lot of hand editing.

This was working on my other machine.  Only significant different I
can think of it that teh mail is from po:jpff rather than a file



In GNU Emacs 23.0.90.2 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2009-02-04 on xenakis
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  auto-image-file-mode: t
  show-paren-mode: t
  display-time-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x C-f R M A <tab> <return> M-x r m a i l - m o d 
e <return> u k r b l <tab> - <tab> l i s t e d <return> 
C-x k <return> y e s <return> C-x C-f R M A <tab> <return> 
<escape> > <escape> v <escape> v <escape> v <escape> 
v <escape> v <escape> v <escape> v <escape> v <escape> 
v <escape> v <escape> v <escape> v <escape> v <escape> 
v <escape> v <escape> v <escape> v <escape> v <escape> 
v <escape> v <escape> v <escape> v <escape> v <escape> 
v <escape> v <escape> v <escape> v <escape> v <escape> 
v <escape> v <escape> v <escape> v <escape> v <escape> 
v <escape> v <escape> v <escape> v <escape> v <escape> 
v C-r m o n e y <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
C-a <escape> SPC <escape> > C-x C-x M-x w r SPC r <return> 
l o s t _ m a i l _ f e b <return> C-w C-x C-s C-x 
k <return> C-x C-f l o s <tab> <return> M-x u n r <tab> 
<tab> <return> l o s t + m <tab> <backspace> <backspace> 
_ <tab> <return> x x . f e b <return> C-x 2 C-x C-f 
M A I L / e x <tab> <backspace> <backspace> <backspace> 
<backspace> c - <tab> _ <tab> <return> n <down-mouse-1> 
<mouse-movement> <mouse-movement> <drag-mouse-1> <help-echo> 
<down-mouse-2> <mouse-2> <help-echo> <down-mouse-1> 
<mouse-1> C-x k <return> C-x o C-x C-s M-x u n r m 
<tab> <return> l o s t <tab> <return> x . <backspace> 
x . f e b <return> C-g M-m C-x k <return> M-x r e p 
o <tab> r t <tab> <return>

Recent messages:
File mode specification error: (error "Aborted")
Mark set
Saving file /bigdisk/jpff/lost_mail_feb...
Wrote /bigdisk/jpff/lost_mail_feb
Writing messages to /bigdisk/jpff/xx.feb...
unrmail: Search failed: "^[*][*][*] EOOH [*][*][*]
"
Quit
Parsing /bigdisk/jpff/.mailrc... done
Making completion list...

==John ffitch




bug reassigned from package `emacs' to `emacs,rmail'. Request was from Juanma Barranquero <lekktu <at> gmail.com> to control <at> emacsbugs.donarmstrong.com. (Wed, 04 Feb 2009 16:50:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>:
bug#2196; Package emacs,rmail. (Thu, 05 Feb 2009 05:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to rms <at> gnu.org:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>. (Thu, 05 Feb 2009 05:50:03 GMT) Full text and rfc822 format available.

Message #12 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Richard M Stallman <rms <at> gnu.org>
To: jpff <jpff <at> cs.bath.ac.uk>, 2196 <at> debbugs.gnu.org
Cc: emacs-pretest-bug <at> gnu.org
Subject: Re: bug#2196: 23.0.90; rmail not reading email
Date: Thu, 05 Feb 2009 00:40:01 -0500
    I have just tried to read new mail (g) in rmail mode 
    It appeared to lose the mail -- the external mailbox was cleared but
    the mail did not appear.  I later found it appended to the last message
    but in a format that is neither one nor the other.

I see that some of what you sent us is in Babyl format.  That is
strange, because as far as I know there is nothing in Rmail now that
converts to Babyl format except in some cases `rmail-output', and I
don't think that was involved.

Was your inbox in Babyl format?  If not, can you find out which
code tried to convert it to Babyl format?

Is it possible you are running an old version of rmail.el?




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>:
bug#2196; Package emacs,rmail. (Thu, 05 Feb 2009 05:50:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to rms <at> gnu.org:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>. (Thu, 05 Feb 2009 05:50:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>:
bug#2196; Package emacs,rmail. (Thu, 05 Feb 2009 08:40:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to jpff <jpff <at> codemist.co.uk>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>. (Thu, 05 Feb 2009 08:40:03 GMT) Full text and rfc822 format available.

Message #22 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: jpff <jpff <at> codemist.co.uk>
To: rms <at> gnu.org
Cc: 2196 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#2196: 23.0.90; rmail not reading email
Date: Thu,  5 Feb 2009 08:30:17 +0000
I think the culprit is movemail in lib-src

the mail I collected is in a central server, and I have always
collected mail using po:jpff which calls movemail

Looking at the course of movemail.c after I sent the report i see
references to ^_ and similar that suggests to me that it is not
working in mbox format.

line 908-914 lib-src/movemail.c
  if (line[0] == '\037')
    {
      if (fputs ("^_", mbf) == EOF)
	return (NOTOK);
      line++;
      len--;
    }
 

==John ffitch




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>:
bug#2196; Package emacs,rmail. (Thu, 05 Feb 2009 08:40:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to jpff <jpff <at> codemist.co.uk>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>. (Thu, 05 Feb 2009 08:40:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>:
bug#2196; Package emacs,rmail. (Tue, 10 Feb 2009 03:45:04 GMT) Full text and rfc822 format available.

Message #30 received at 2196 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: jpff <jpff <at> codemist.co.uk>
Cc: 2196 <at> debbugs.gnu.org, rms <at> gnu.org
Subject: Re: bug#2196: 23.0.90; rmail not reading email
Date: Mon, 09 Feb 2009 22:35:44 -0500
retitle 2196 movemail.c, pop, and mbox
severity 2196 minor
stop

jpff wrote:

> I think the culprit is movemail in lib-src

Indeed. The specific bit you cited is not a problem (I think), but the
functions mbx_delimit_begin and mbx_delimit_end are Babyl-specific,
and so movemail was totally broken for the retrieval of mail via pop.
That's rather bad.

I've installed a fix that just prints

From movemail

at the start of each message. I think this is enough to make it work.
It would be nice to add the time:

From movemail  Mon Feb  9 14:51:58 2009

A further patch for this is attached. I don't know how
correct/portable the code is though (?).


*** movemail.c	10 Feb 2009 03:30:41 -0000	1.98
--- movemail.c	10 Feb 2009 03:31:20 -0000
***************
*** 60,65 ****
--- 60,67 ----
  #include <sys/file.h>
  #include <stdio.h>
  #include <errno.h>
+ #include <string.h>
+ #include <time.h>
  
  #include <getopt.h>
  #ifdef HAVE_UNISTD_H
***************
*** 923,929 ****
  mbx_delimit_begin (mbf)
       FILE *mbf;
  {
!   if (fputs ("From movemail\n", mbf) == EOF)
      return (NOTOK);
    return (OK);
  }
--- 925,940 ----
  mbx_delimit_begin (mbf)
       FILE *mbf;
  {
!   time_t now;
!   struct tm *ltime;
!   char fromline[40] = "From movemail ";
! 
!   now = time (NULL);
!   ltime = localtime (&now);
! 
!   strcat (fromline, asctime (ltime));
! 
!   if (fputs (fromline, mbf) == EOF)
      return (NOTOK);
    return (OK);
  }




Changed bug title to `movemail.c, pop, and mbox' from `23.0.90; rmail not reading email'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 10 Feb 2009 03:45:07 GMT) Full text and rfc822 format available.

Severity set to `minor' from `normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 10 Feb 2009 03:45:07 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>:
bug#2196; Package emacs,rmail. (Tue, 10 Feb 2009 09:35:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>. (Tue, 10 Feb 2009 09:35:04 GMT) Full text and rfc822 format available.

Message #39 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>, 2196 <at> debbugs.gnu.org
Cc: jpff <at> codemist.co.uk, bug-submit-list <at> donarmstrong.com,
        2196 <at> debbugs.gnu.org, rms <at> gnu.org, bug-gnu-emacs <at> gnu.org,
        bug-gnu-emacs <at> gnu.org
Subject: Re: bug#2196: 23.0.90; rmail not reading email
Date: Tue, 10 Feb 2009 11:32:31 +0200
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Mon, 09 Feb 2009 22:35:44 -0500
> Cc: 2196 <at> emacsbugs.donarmstrong.com, rms <at> gnu.org
> 
> A further patch for this is attached. I don't know how
> correct/portable the code is though (?).

Thanks.  I don't see anything unportable here: `time' and `localtime'
are ANSI C89 functions, IIRC.





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>:
bug#2196; Package emacs,rmail. (Tue, 10 Feb 2009 09:35:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>. (Tue, 10 Feb 2009 09:35:05 GMT) Full text and rfc822 format available.

Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Wed, 11 Feb 2009 04:10:11 GMT) Full text and rfc822 format available.

Notification sent to jpff <jpff <at> cs.bath.ac.uk>:
bug acknowledged by developer. (Wed, 11 Feb 2009 04:10:11 GMT) Full text and rfc822 format available.

Message #49 received at 2196-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 2196-done <at> debbugs.gnu.org, rms <at> gnu.org
Subject: Re: bug#2196: 23.0.90; rmail not reading email
Date: Tue, 10 Feb 2009 22:58:42 -0500
Eli Zaretskii wrote:

> Thanks.  I don't see anything unportable here: `time' and `localtime'
> are ANSI C89 functions, IIRC.

Thanks. You'd be amazed (perhaps not...) how little I know about C.

Installed, bug closed.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Rmail Maintainers <bug-gnu-emacs <at> gnu.org>:
bug#2196; Package emacs,rmail. (Wed, 11 Feb 2009 08:05:05 GMT) Full text and rfc822 format available.

Message #52 received at 2196 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>, 2196 <at> debbugs.gnu.org
Subject: Re: bug#2196: 23.0.90; rmail not reading email
Date: Wed, 11 Feb 2009 02:57:12 -0500
Glenn Morris wrote (on Tue, 10 Feb 2009 at 22:58 -0500):

> Installed, bug closed.

I'm told, off-list, that the installed version (I moved the includes
inside ifdef MAIL_USE_POP) causes breakage. I cannot reproduce. Can
someone fix? Thanks.

    (mbx_delimit_begin): Also write the current time.

    2 files changed, 16 insertions(+), 1 deletions(-)
    boot=bootstrap-emacs;                         \
    if [ -x "src/$boot" ]; then boot=""; fi;                   \
    cd lib-src; make all                            \
    CC='gcc' CFLAGS='-g -O2 -Wno-pointer-sign ' CPPFLAGS='-D_BSD_SOURCE  ' \
    LDFLAGS='-Wl,-znocombreloc ' MAKE='make' BOOTSTRAPEMACS="$boot"
    make[1]: Entering directory `/usr/local/src/emacs/lib-src'
    gcc -c -D_BSD_SOURCE -DHAVE_CONFIG_H -I. -I../src
    -I/usr/local/src/emacs/lib-src -I/usr/local/src/emacs/lib-src/../src
    -D_BSD_SOURCE   -g -O2 -Wno-pointer-sign  -Demacs
    /usr/local/src/emacs/lib-src/movemail.c
    /usr/local/src/emacs/lib-src/movemail.c: In function 'main':
    /usr/local/src/emacs/lib-src/movemail.c:326: warning: ignoring return
    value of 'mktemp', declared with attribute warn_unused_result
    /usr/local/src/emacs/lib-src/movemail.c: In function 'error':
    /usr/local/src/emacs/lib-src/movemail.c:624: warning: format not a
    string literal and no format arguments
    In file included from /usr/local/src/emacs/lib-src/movemail.c:687:
    /usr/include/time.h: At top level:
    /usr/include/time.h:187: error: conflicting types for 'time'
    /usr/local/src/emacs/lib-src/movemail.c:362: error: previous implicit
    declaration of 'time' was here
    /usr/local/src/emacs/lib-src/movemail.c: In function 'popmail':
    /usr/local/src/emacs/lib-src/movemail.c:762: warning: ignoring return
    value of 'fchown', declared with attribute warn_unused_result
    make[1]: *** [movemail.o] Error 1
    make[1]: Leaving directory `/usr/local/src/emacs/lib-src'
    make: *** [lib-src] Error 2




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Wed, 11 Mar 2009 14:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 188 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.