GNU bug report logs -
#2196
movemail.c, pop, and mbox
Previous Next
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
Message #30 received at 2196 <at> emacsbugs.donarmstrong.com (full text, mbox):
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.