Date: Tue, 3 Nov 1998 14:21:55 +0100 (CET) From: Bodo Rueskamp <br@rueskamp.com> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/8553: /usr/libexec/mail.local doesn't handle ">From " lines transparently Message-ID: <199811031321.OAA26460@smilla.rueskamp.com>
next in thread | raw e-mail | index | archive | help
>Number: 8553 >Category: bin >Synopsis: /usr/libexec/mail.local doesn't handle ">From " lines transparently >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Nov 3 05:30:00 PST 1998 >Last-Modified: >Originator: Bodo Rueskamp >Organization: >Release: FreeBSD 2.2.6-RELEASE i386 >Environment: FreeBSD smilla.rueskamp.com 2.2.6-RELEASE FreeBSD 2.2.6-RELEASE #21: Thu Oct 15 16:26:53 CEST 1998 roof@smilla.rueskamp.com:/u1/src/sys/compile/SMILLA i386 >Description: mail.local inserts a ">" before "From " lines but doesn't insert ">" before ">From " lines. Because of this a mail frontend (like ELM) cannot convert the message back into its original form. >How-To-Repeat: (XXX inserted to preserve 'From ' lines) XXX mail root <<EOF XXX XXX From - Thu Jan 1 09:36:29 1998 XXX XXX >From - Thu Jan 1 09:36:29 1998 XXX XXX EOF >Fix: *** mail.local.c.orig Fri Feb 20 18:32:27 1998 --- mail.local.c Tue Nov 3 13:43:37 1998 *************** *** 143,148 **** --- 143,158 ---- exit(eval); } + static + int + fromcmp(line) + char *line; + { + while (*line == '>') + ++line; + return(memcmp(line, "From ", 5)); + } + int store(from) char *from; *************** *** 168,175 **** if (line[0] == '\n') eline = 1; else { ! if (eline && line[0] == 'F' && ! !memcmp(line, "From ", 5)) (void)putc('>', fp); eline = 0; } --- 178,185 ---- if (line[0] == '\n') eline = 1; else { ! if (eline && ((line[0] == 'F') || (line[0] == '>')) && ! !fromcmp(line)) (void)putc('>', fp); eline = 0; } >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811031321.OAA26460>