From owner-freebsd-bugs Tue Nov 3 05:30:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA07605 for freebsd-bugs-outgoing; Tue, 3 Nov 1998 05:30:03 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA07549 for ; Tue, 3 Nov 1998 05:29:59 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id FAA04034; Tue, 3 Nov 1998 05:30:00 -0800 (PST) Received: from smilla.rueskamp.com (smilla.rueskamp.com [194.97.69.109]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA06668 for ; Tue, 3 Nov 1998 05:22:06 -0800 (PST) (envelope-from br@smilla.rueskamp.com) Received: (from br@localhost) by smilla.rueskamp.com (8.8.8/8.8.8) id OAA26460; Tue, 3 Nov 1998 14:21:55 +0100 (CET) (envelope-from br) Message-Id: <199811031321.OAA26460@smilla.rueskamp.com> Date: Tue, 3 Nov 1998 14:21:55 +0100 (CET) From: Bodo Rueskamp Reply-To: br@rueskamp.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/8553: /usr/libexec/mail.local doesn't handle ">From " lines transparently Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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 <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