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.

Full log


View this message in rfc822 format

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: 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);
  }




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.