![]() |
mhonarc-dev
|
Archiving sent mail; Attachmants with non-ascii names; Preserving charset of message2002-12-16 14:09:411. Archiving sent mail
I needed to archive sent mail with MHonArc and I needed to put
contents of To: header to mesage index. It was not possible with
MHonArc-2.5.13 so I wrote a small patch that added rc-variable $TO$.
Then I used
<LiTemplate>
<li><strong>$SUBJECT$</strong><br>
$MSGLOCALDATE(CUR;%Y-%m-%d %H:%M)$<br>
<em>From</em>: $FROM$<br>
<em>To</em>: $TO$
</li>
</LiTemplate>
Check the attached file MHonArc-2.5.13-to.patch.
2. Attachmants with non-ascii names
I had problems with accessing attachments extracted with MHonArc from
Windows if they had non-ascii characters in name or characters
forbidden for file names: \/:*?"<>| (when using m2h_external::filter;
usename).
So I have written a patch that converts both types of characters to
underscore, just like spaces in original MHonArc.
Check the attached file MHonArc-2.5.13-attachment_name.patch.
3. Preserving charset of message
Most mails I have to convert use central european ISO-8859-2
encoding. Converting it to named entities did not work - it lacks
browsers support. Using UTF-8 would make my archives un-grep-able so
I wrote a patch that made possible that text/plain MIME-parts
preserve original charset by adding rc-variable $CHARSET$.
Then I could use:
<MsgPgBegin>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>$SUBJECTNA$</title>
<link rev="made" href="mailto:$FROMADDR$">
<meta http-equiv="Content-Type" content="text/html; charset=$CHARSET$">
</head>
<body>
</MsgPgBegin>
I've attached the patch: MHonArc-2.5.13-charset.patch.
I'm not a perl programmer so this patches are far from being perfect.
Mostly done by copy-paste/little-change technique. But they work good
enough to allow me to convert some people's mail to HTML format, so I
could burn it on CD and give them.
I think MHonArc needs this functionality so it can be used not only
for archiving mailing list.
I'm not a good english speaker so please forgive me language errors
or not very sophisticated vocabulary :-)
Best wishes
Tometzky
--
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
Winnie the Pooh
|
|
||||||||||||||||