On Tue, Nov 09, 1999 at 09:18:15AM -0000, Petr Novotny wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> since nobody answered the first question, I shall try to reword it:
>
> My qmail installation supports mail clients on local LAN. These
> clients may be deemed "broken clients" (irrepairably) as they put
> completely incorrect date stamps in the outgoing mail. The
> resolution is to have qmail fix the date stamps.
>
> I understand the RELAYCLIENT="@fixme" trick from FAQ. I also
> understand transparent proxying (and transparent remapping port
> 25 to port 26) for the LAN clients.
>
> The question is: Is there a djb program which would re-stamp the
> date? (It should not modify any other header; it might delete
> Return-Path and Received and stuff.)
>
> I read the documentation of qmail-inject and it would do what I want
> if I could filter out the old "Date" line.
>
> I can't (almost) write in Perl. I can write a C program. But first I
> wanted to know if there is some already done script/program which
> would delete a chosen line from RFC822 header. I don't want to
> reinvent a wheel.
Start with this old script. It rewrites the subject.
You can easily rewrite the date with this. Mail privately if you want more
help than this.
--------- %< cut here ------------------
!/usr/bin/perl
# tagmail.pl; 1999-02-18; [EMAIL PROTECTED]
use strict;
# read mail and split into hdr and body
my ($hdr, $body);
while (<STDIN>) { last if /^[\r\n]*$/; $hdr .= $_; }
$body = join '',<STDIN>;
# Fix subject-line
$hdr =~ s/^(subject:\s*)(.*)$/$1 ALERT: $2/mi;
# print mail
print "$hdr\n$body";
--------- %< cut here ------------------
/magnus
--
MOST useless 1998 * http://x42.com/