Back to the main page

Mailing List Logs for ShadowRN

Message no. 1
From: Luke Kendall <luke@********.CANON.OZ.AU>
Subject: Shrinking mail log files
Date: Thu, 2 Mar 1995 23:18:00 +1100
If you're on a Unix machine, and your mail is coming from a
long way away (i.e., lots and lots of `Received:...' guff in
your mail headers, and you save lots of this mail, then
you might like this short awk script.

You give it a list of (mailbox) files as input, and it strips
out the guff and writes the shorter versions out under the same
filename, but with a `-c' appended to the filename. I've called
it `cmail', for `compress mail'.

For me, it makes my shadowrun mailboxes 30% shorter. They're still
perfectly intelligible to mail, and you can then compress them with
with true compression tools, of course, if you're archiving them.
(It has just saved me about 1.5Mb, before gzip'ing.)

Enjoy, (or not :-),

luke

(Script follows - save it as `cmail', and then: chmod 755 cmail)
#!/bin/sh
#
# Strip off the boring `Received: ...' lines from mail items in a
# Unix mailbox.
#
# Author: Luke Kendall
#
for f
do
echo "$f:"
awk '
BEGIN {
header = 0
}

/^From / {
header = 1
}

/^$/ {
if (header)
header = 0
}

/^[ ]/ {
if (recv)
next
}

{
if (header)
{
recv = ($1 == "Received:")
if (!recv)
print
}
else
{
print
}
}
' "$f" > "$f-c"
ls -l "$f" "$f-c"
done
Message no. 2
From: Martin Steffens <BDI05626@***.RHIJ.NL>
Subject: Re: Shrinking mail log files
Date: Thu, 2 Mar 1995 18:49:37 +0100
On Thu, 2 Mar, Luke Kendall wrote:

[a way to shorten your mail logs with 30-40%]

I wrote a macro for WordPerfect 5.1 which does exactly the same. I
haven't had time to rewrite it for 6.0, but if you are interested E-
mail me privately.

Martin
****************************************************************
Martin Steffens |"There is no stress like distress"
E-mail: bdi05626@***.rhij.nl |
****************************************************************

Further Reading

If you enjoyed reading about Shrinking mail log files, you may also be interested in:

Disclaimer

These messages were posted a long time ago on a mailing list far, far away. The copyright to their contents probably lies with the original authors of the individual messages, but since they were published in an electronic forum that anyone could subscribe to, and the logs were available to subscribers and most likely non-subscribers as well, it's felt that re-publishing them here is a kind of public service.