Re: mail messages with only html

2007-09-18 Thread Michelle Konzack
Am 2007-09-14 18:15:39, schrieb Richard Lyons:
 My mutt doesn't do that.  Just gives me a blank page (i.e. the contents
 of the empty email without the html attachment).  Anyway I want to have
 the html stripped of tags to reply to.
- END OF REPLIED MESSAGE -

Not tested but you can try this procmail recipe:

8--
:0
* ^Content-Type:.*text/html
{
  HEADER=`formail -X '' |sed 's|text/html|text/plain|'`
  BODY=`formail -I '' |w3m -dump -T text/html -`

  :0fw
  |/dev/null  echo -e ${HEADER}\n\n${BODY}\n
}
8--


Thanks, Greetings and nice Day
Michelle Konzack
Tamay Dogan Network


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSN LinuxMichi
0033/6/6192519367100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


Re: mail messages with only html

2007-09-18 Thread Michelle Konzack
Am 2007-09-14 16:54:27, schrieb Jude DaShiell:
 # create backup for de-html'd email
 :0 c
 * ^Content-Type: text/html
 de-html-backup
 
 # de-html
 :0 fbw
 * ^Content-Type:[ ]*text/html
 | lynx -dump -stdin -nolist \
  echo  \
  echo  \
  echo This HTML message has been made into text by lynx \
  echo 
 
- END OF REPLIED MESSAGE -

Better:

# create backup for de-html'd email
:0
* ^Content-Type: text/html
{
  :0c
  de-html-backup
  
  # de-html
  :0 fbw
  * ^Content-Type:[ ]*text/html
  | lynx -dump -stdin -nolist \
   echo  \
   echo  \
   echo This HTML message has been made into text by lynx \
   echo 
}


Thanks, Greetings and nice Day
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSN LinuxMichi
0033/6/6192519367100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


Re: mail messages with only html

2007-09-18 Thread Jude DaShiell
Right, those braces now logically link those two recipes together into one 
unit.




On Tue, 18 Sep 2007, Michelle Konzack wrote:


Am 2007-09-14 16:54:27, schrieb Jude DaShiell:

# create backup for de-html'd email
:0 c
* ^Content-Type: text/html
de-html-backup

# de-html
:0 fbw
* ^Content-Type:[ ]*text/html
| lynx -dump -stdin -nolist \
 echo  \
 echo  \
 echo This HTML message has been made into text by lynx \
 echo 


- END OF REPLIED MESSAGE -

Better:

# create backup for de-html'd email
:0
* ^Content-Type: text/html
{
 :0c
 de-html-backup

 # de-html
 :0 fbw
 * ^Content-Type:[ ]*text/html
 | lynx -dump -stdin -nolist \
  echo  \
  echo  \
  echo This HTML message has been made into text by lynx \
  echo 
}


Thanks, Greetings and nice Day
   Michelle Konzack
   Systemadministrator
   Tamay Dogan Network
   Debian GNU/Linux Consultant


--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
Michelle Konzack   Apt. 917  ICQ #328449886
  50, rue de Soultz MSN LinuxMichi
0033/6/6192519367100 Strasbourg/France   IRC #Debian (irc.icq.com)




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: mail messages with only html

2007-09-15 Thread Richard Lyons
On Fri, Sep 14, 2007 at 10:42:00PM -0500, Jude DaShiell wrote:

 If there's another plumbing facility like lynx that can move parts into 
 message bodies that could be attached to the lynx pipe so the message 
 first goes through the part shifter and then goes through lynx.

Jude thanks for your various useful comments.  I do not have procmail
running at the moment, so this will have to wait till I have time to
check I don't break something, but I have saved your code snippet etc.

-- 
richard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-15 Thread Richard Lyons
On Fri, Sep 14, 2007 at 02:18:08PM -0700, John L Fjellstad wrote:

 Richard Lyons [EMAIL PROTECTED] writes:
 
  I fail to see why you couldn't write a filter (using maildrop or
  procmail) to pipe the message through w3m -dump (or links -dump) before
  storing the message.
 
  Thanks John.  That seems to be the definitively best way to go.  I just
  have to work out how to reliably identify or flag the offending messages for
  treatment.
 
 All html mail should have content type set to text/html
 
  Also, IMAP won't care if you change the message. You just upload the
  message as a new message. I do it all the time with I add labels etc.
 
  It will be better if I leave the headers alone, so that threading
  doesn't get broken.
 
 Well, I was talking about created a brand new message.  When I add
 labels etc, I add header lines, but the message itself is like the
 original.  But as far as IMAP is concerned, I deleted the old message
 and uploaded a new message.  As long the In-Reply-To header is still
 there, the threading shouldn't be broken

Ok, I suppose that is obvious, but I have never tinkered with mail
before.  Thanks for the help.

-- 
richard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-15 Thread s. keeling
Ron Johnson [EMAIL PROTECTED]:
 
  On 09/13/07 17:36, Richard Lyons wrote:
  This is becoming more of a problem.  There is a growing number of firms
  that are incapable of sending out normal emails.  They insist on sending
  blank messages with an html attachment only.  Of course this is usually
 
  Not a direct answer to your question, but if you are using mutt
  under X, then there are html viewers that can hook into mutt.

Not just X.  w3m works just fine with mutt.

(0) heretic /home/keeling_ grep w3m mutt/mailcap
multipart/alternative ;  /usr/bin/w3m -dump %s; copiousoutput; 
nametemplate=%s.html
multipart/related ;  /usr/bin/w3m -dump %s; copiousoutput; 
nametemplate=%s.html
text/html ;  /usr/bin/w3m -T text/html -dump %s ; copiousoutput


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)http://blinkynet.net/comp/uip5.html  Linux Counter #80292
- -http://www.faqs.org/rfcs/rfc1855.htmlPlease, don't Cc: me.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-15 Thread Richard Lyons
On Sat, Sep 15, 2007 at 07:59:13PM +0200, s. keeling wrote:

 Ron Johnson [EMAIL PROTECTED]:
  
   On 09/13/07 17:36, Richard Lyons wrote:
   This is becoming more of a problem.  There is a growing number of firms
   that are incapable of sending out normal emails.  They insist on sending
   blank messages with an html attachment only.  Of course this is usually
  
   Not a direct answer to your question, but if you are using mutt
   under X, then there are html viewers that can hook into mutt.
 
 Not just X.  w3m works just fine with mutt.
 
 (0) heretic /home/keeling_ grep w3m mutt/mailcap
 multipart/alternative ;  /usr/bin/w3m -dump %s; copiousoutput; 
 nametemplate=%s.html
 multipart/related ;  /usr/bin/w3m -dump %s; copiousoutput; 
 nametemplate=%s.html
 text/html ;  /usr/bin/w3m -T text/html -dump %s ; copiousoutput
 

Thanks.  I have now set up mutt and mailcap as you and Benjamin suggest
and the whole issue is greatly eased.  The reply function also now picks
up the w3m output as someone else indicated so it is pretty convenient.
I probably shall one day set up the filter to scrap the html part
completely and save only the email version (by which I mean plain text),
but it is no longer urgent.

Another example of my having given up without learning enoough first :-(

But thanks to everybody for the support.

-- 
richard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-15 Thread Douglas A. Tutty
On Fri, Sep 14, 2007 at 06:09:14PM +0100, Richard Lyons wrote:
 On Fri, Sep 14, 2007 at 09:33:37AM -0700, Andrew Sackville-West wrote:
 
  that's what others were saying about using procmail (or some other
  MDA) to pipe the message through a console based html reader and
  dumping the output back into the message body.
 
 Sounds a good idea.  I'll have to wait till I'm feeling strong before
 starting on that though.  Procmail scares me.
 

Perhaps the exim filter facility can do it without needing procmail?

Doug.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-14 Thread Richard Lyons
On Fri, Sep 14, 2007 at 12:24:03AM +0100, Benjamin A'Lee wrote:

 On Thu, Sep 13, 2007 at 05:46:21PM -0500, Ron Johnson wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
  
  On 09/13/07 17:36, Richard Lyons wrote:
[...]
   could I in principle write a script to take such void plus html
   messages, strip the tags (replacing URLs when the href text
   doesn't have it) and write the bare text back into the source
   email 
[...]
 
 There are viewers that can hook into Mutt even if you don't run it under
 X. 
 
 In .muttrc:
 auto_view text/html
 
 In .mailcap:
 text/html; w3m -dump -T text/html '%s'; copiousoutput
 
 Or:
 text/html; lynx -dump '%s'; copiousoutput # or something like that.
 
 Or use the pipe function to feed it into one of those viewers, for an
 interactive session.

Obviously a better method, yes.  But when I reply, I will not get the
received text quoted ready for editing if the email is void.  The best
approach might be to take the output of w3m (or links2, elinks, or lynx)
and write that back instead of the original attachment.  Then the
archive copy will be neat and parsimonious, and any reply will have
text to edit.  I wonder how to find $myMessageId to do that.  Could even
automate it so that it happens for every void email with an html
attachment before I even open it...

-- 
richard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-14 Thread John L Fjellstad
Richard Lyons [EMAIL PROTECTED] writes:

 Obviously a better method, yes.  But when I reply, I will not get the
 received text quoted ready for editing if the email is void. 

If you click on v, and select the text/html version of the message and
click on r, mutt will quote the text/html version of message, and not
the plain text.  

-- 
John L. Fjellstad
web: http://www.fjellstad.org/  Quis custodiet ipsos custodes


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-14 Thread Andrew Sackville-West
On Fri, Sep 14, 2007 at 09:02:56AM -0700, John L Fjellstad wrote:
 Richard Lyons [EMAIL PROTECTED] writes:
 
  Obviously a better method, yes.  But when I reply, I will not get the
  received text quoted ready for editing if the email is void. 
 
 If you click on v, and select the text/html version of the message and
 click on r, mutt will quote the text/html version of message, and not
 the plain text.  

nice. thanks! learn something every day.

A


signature.asc
Description: Digital signature


Re: mail messages with only html

2007-09-14 Thread Andrew Sackville-West
On Fri, Sep 14, 2007 at 09:10:44AM +0100, Richard Lyons wrote:
 On Fri, Sep 14, 2007 at 12:24:03AM +0100, Benjamin A'Lee wrote:
 
  On Thu, Sep 13, 2007 at 05:46:21PM -0500, Ron Johnson wrote:
   -BEGIN PGP SIGNED MESSAGE-
   Hash: SHA1
   
   On 09/13/07 17:36, Richard Lyons wrote:
 [...]
could I in principle write a script to take such void plus html
messages, strip the tags (replacing URLs when the href text
doesn't have it) and write the bare text back into the source
email 
 [...]
  
  There are viewers that can hook into Mutt even if you don't run it under
  X. 
  
  In .muttrc:
  auto_view text/html
  
  In .mailcap:
  text/html; w3m -dump -T text/html '%s'; copiousoutput
  
  Or:
  text/html; lynx -dump '%s'; copiousoutput # or something like that.
  
  Or use the pipe function to feed it into one of those viewers, for an
  interactive session.
 
 Obviously a better method, yes.  But when I reply, I will not get the
 received text quoted ready for editing if the email is void.  The best
 approach might be to take the output of w3m (or links2, elinks, or lynx)
 and write that back instead of the original attachment. 

that's what others were saying about using procmail (or some other
MDA) to pipe the message through a console based html reader and
dumping the output back into the message body.

A


signature.asc
Description: Digital signature


Re: mail messages with only html

2007-09-14 Thread Richard Lyons
On Fri, Sep 14, 2007 at 09:33:37AM -0700, Andrew Sackville-West wrote:

 On Fri, Sep 14, 2007 at 09:10:44AM +0100, Richard Lyons wrote:
  On Fri, Sep 14, 2007 at 12:24:03AM +0100, Benjamin A'Lee wrote:
  
   On Thu, Sep 13, 2007 at 05:46:21PM -0500, Ron Johnson wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/13/07 17:36, Richard Lyons wrote:
  [...]
 could I in principle write a script to take such void plus html
 messages, strip the tags (replacing URLs when the href text
 doesn't have it) and write the bare text back into the source
 email 
  [...]
   
   There are viewers that can hook into Mutt even if you don't run it under
   X. 
   
   In .muttrc:
   auto_view text/html
   
   In .mailcap:
   text/html; w3m -dump -T text/html '%s'; copiousoutput
   
   Or:
   text/html; lynx -dump '%s'; copiousoutput # or something like that.
   
   Or use the pipe function to feed it into one of those viewers, for an
   interactive session.
  
  Obviously a better method, yes.  But when I reply, I will not get the
  received text quoted ready for editing if the email is void.  The best
  approach might be to take the output of w3m (or links2, elinks, or lynx)
  and write that back instead of the original attachment. 
 
 that's what others were saying about using procmail (or some other
 MDA) to pipe the message through a console based html reader and
 dumping the output back into the message body.

Sounds a good idea.  I'll have to wait till I'm feeling strong before
starting on that though.  Procmail scares me.

-- 
richard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-14 Thread Richard Lyons
On Fri, Sep 14, 2007 at 09:02:56AM -0700, John L Fjellstad wrote:

 Richard Lyons [EMAIL PROTECTED] writes:
 
  Obviously a better method, yes.  But when I reply, I will not get the
  received text quoted ready for editing if the email is void. 
 
 If you click on v, and select the text/html version of the message and
 click on r, mutt will quote the text/html version of message, and not
 the plain text.  

My mutt doesn't do that.  Just gives me a blank page (i.e. the contents
of the empty email without the html attachment).  Anyway I want to have
the html stripped of tags to reply to.

-- 
richard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-14 Thread Richard Lyons
On Thu, Sep 13, 2007 at 08:55:46PM -0700, John L Fjellstad wrote:

 Richard Lyons [EMAIL PROTECTED] writes:
 
  Here is the thought that struck me: could I in principle write a script
  to take such void plus html messages, strip the tags (replacing URLs
  when the href text doesn't have it) and write the bare text back into
  the source email so that I can see it? The html attachment could be left
  in place or discarded, it usually won't matter which.  Or would this
  mess up the IMAP or Maildir indexing in some way?  
 
 I fail to see why you couldn't write a filter (using maildrop or
 procmail) to pipe the message through w3m -dump (or links -dump) before
 storing the message.

Thanks John.  That seems to be the definitively best way to go.  I just
have to work out how to reliably identify or flag the offending messages for
treatment.


 
 Also, IMAP won't care if you change the message. You just upload the
 message as a new message. I do it all the time with I add labels etc.

It will be better if I leave the headers alone, so that threading
doesn't get broken.

-- 
richard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-14 Thread Andrei Popescu
Richard Lyons [EMAIL PROTECTED] wrote:

 Sounds a good idea.  I'll have to wait till I'm feeling strong before
 starting on that though.  Procmail scares me.

What about maildrop? 

Regards,
Andrei
-- 
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)


signature.asc
Description: PGP signature


Re: mail messages with only html

2007-09-14 Thread Jude DaShiell
I have a couple procmail scripts that can deal with html messages provided 
the html is in the main message body.  What they do is to backup the 
message first to another folder; then they run the message contents 
through lynx -dump -stdin -nolist and back out into the message stream. 
They also put a little note at the bottom of the message letting you know 
this message was processed with lynx. Now how to move the message parts 
into the main message body wasn't described in the procmail article I read 
earlier.




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: mail messages with only html

2007-09-14 Thread Alex Samad
On Fri, Sep 14, 2007 at 09:32:39AM -0700, Andrew Sackville-West wrote:
 On Fri, Sep 14, 2007 at 09:02:56AM -0700, John L Fjellstad wrote:
  Richard Lyons [EMAIL PROTECTED] writes:
  
   Obviously a better method, yes.  But when I reply, I will not get the
   received text quoted ready for editing if the email is void. 
  
  If you click on v, and select the text/html version of the message and
  click on r, mutt will quote the text/html version of message, and not
  the plain text.  
 
 nice. thanks! learn something every day.
I believe there is a setting in mutt which lets you give a precedence to which 
mime encoding attachment to view first text/plain or maybe for you the html one 
?
 
 A




signature.asc
Description: Digital signature


Re: mail messages with only html

2007-09-14 Thread Rob Mahurin
On Fri, Sep 14, 2007 at 09:10:44AM +0100, Richard Lyons wrote:
 On Fri, Sep 14, 2007 at 12:24:03AM +0100, Benjamin A'Lee wrote:
  In .muttrc:
  auto_view text/html
  
  In .mailcap:
  text/html; w3m -dump -T text/html '%s'; copiousoutput
  text/html; lynx -dump '%s'; copiousoutput # or something like that.
or  text/html; /usr/bin/elinks -force-html -dump -source '%s'; 
copiousoutput; description=HTML Text; nametemplate=%s.html

which, among other things, gives you a numbered list of links.

 Obviously a better method, yes.  But when I reply, I will not get the
 received text quoted ready for editing if the email is void.  

This isn't true for me: the quoted text sent to the editor for the
reply includes all the auto_view'd attachments, including text,
html, doc, pdf, ... with the [-- Autoview using ... --] header removed.

Maybe I've tried a trick that you haven't, or you get more
pathological messages than I do.

Rob

-- 
Rob Mahurin
Dept. of Physics  Astronomy
University of Tennessee phone:  865 207 2594
Knoxville, TN  37996email:  [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-14 Thread Richard Lyons
On Fri, Sep 14, 2007 at 08:29:48PM +0300, Andrei Popescu wrote:

 Richard Lyons [EMAIL PROTECTED] wrote:
 
  Sounds a good idea.  I'll have to wait till I'm feeling strong before
  starting on that though.  Procmail scares me.
 
 What about maildrop? 

After a lightning skim of the man page, I'd say it scares me less.  I've
noted it for a rainy weekend.  Thanks.

-- 
richard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-14 Thread Richard Lyons
On Fri, Sep 14, 2007 at 03:50:13PM -0500, Jude DaShiell wrote:

 I have a couple procmail scripts that can deal with html messages provided 
 the html is in the main message body.  What they do is to backup the 
 message first to another folder; then they run the message contents 
 through lynx -dump -stdin -nolist and back out into the message stream. 

So far, so good...

 They also put a little note at the bottom of the message letting you know 
 this message was processed with lynx. 

Useful...

 Now how to move the message parts 
 into the main message body wasn't described in the procmail article I read 
 earlier.

Pity.  Still, this is getting very near to a plan.

-- 
richard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-14 Thread Richard Lyons
On Sat, Sep 15, 2007 at 06:54:46AM +1000, Alex Samad wrote:

 On Fri, Sep 14, 2007 at 09:32:39AM -0700, Andrew Sackville-West wrote:
  On Fri, Sep 14, 2007 at 09:02:56AM -0700, John L Fjellstad wrote:
   Richard Lyons [EMAIL PROTECTED] writes:
   
Obviously a better method, yes.  But when I reply, I will not get the
received text quoted ready for editing if the email is void. 
   
   If you click on v, and select the text/html version of the message and
   click on r, mutt will quote the text/html version of message, and not
   the plain text.  
  
  nice. thanks! learn something every day.
 I believe there is a setting in mutt which lets you give a precedence to 
 which 
 mime encoding attachment to view first text/plain or maybe for you the html 
 one 
 ?

Thanks, that I didn't know.  But I am veering toward the mailfilter
alternative: it should give more like the functionality I would like.

-- 
richard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-14 Thread Jude DaShiell
What I have over here appears to be working since the de-html-backup file 
already has 29 lines of text in it.  So here's a little patch to be placed 
in the .procmailrc file above the default recipe if one exists.

Cut here:


# create backup for de-html'd email
:0 c
* ^Content-Type: text/html
de-html-backup

# de-html
:0 fbw
* ^Content-Type:[ ]*text/html
| lynx -dump -stdin -nolist \
 echo  \
 echo  \
 echo This HTML message has been made into text by lynx \
 echo 

cut here.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: mail messages with only html

2007-09-14 Thread John L Fjellstad
Richard Lyons [EMAIL PROTECTED] writes:

 I fail to see why you couldn't write a filter (using maildrop or
 procmail) to pipe the message through w3m -dump (or links -dump) before
 storing the message.

 Thanks John.  That seems to be the definitively best way to go.  I just
 have to work out how to reliably identify or flag the offending messages for
 treatment.

All html mail should have content type set to text/html

 Also, IMAP won't care if you change the message. You just upload the
 message as a new message. I do it all the time with I add labels etc.

 It will be better if I leave the headers alone, so that threading
 doesn't get broken.

Well, I was talking about created a brand new message.  When I add
labels etc, I add header lines, but the message itself is like the
original.  But as far as IMAP is concerned, I deleted the old message
and uploaded a new message.  As long the In-Reply-To header is still
there, the threading shouldn't be broken

-- 
John L. Fjellstad
web: http://www.fjellstad.org/  Quis custodiet ipsos custodes


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-14 Thread Jude DaShiell
If there's another plumbing facility like lynx that can move parts into 
message bodies that could be attached to the lynx pipe so the message 
first goes through the part shifter and then goes through lynx.





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




mail messages with only html

2007-09-13 Thread Richard Lyons
This is becoming more of a problem.  There is a growing number of firms
that are incapable of sending out normal emails.  They insist on sending
blank messages with an html attachment only.  Of course this is usually
a sign of spam, and I usually delete such messages without wasting time
wondering what might be in them.  But I do get some messages in this 
form that I want to read, and even keep.  

Here is the thought that struck me: could I in principle write a script
to take such void plus html messages, strip the tags (replacing URLs
when the href text doesn't have it) and write the bare text back into
the source email so that I can see it? The html attachment could be left
in place or discarded, it usually won't matter which.  Or would this
mess up the IMAP or Maildir indexing in some way?  

Obviously there are plenty of examples of html-strippers around, but
generally the output lands up somewhere else, and it would be a great
help if the missing original message could be inserted so as to be
viewable while browsing the email folder hierarchy.

-- 
richard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-13 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/13/07 17:36, Richard Lyons wrote:
 This is becoming more of a problem.  There is a growing number of firms
 that are incapable of sending out normal emails.  They insist on sending
 blank messages with an html attachment only.  Of course this is usually
 a sign of spam, and I usually delete such messages without wasting time
 wondering what might be in them.  But I do get some messages in this 
 form that I want to read, and even keep.  
 
 Here is the thought that struck me: could I in principle write a script
 to take such void plus html messages, strip the tags (replacing URLs
 when the href text doesn't have it) and write the bare text back into
 the source email so that I can see it? The html attachment could be left
 in place or discarded, it usually won't matter which.  Or would this
 mess up the IMAP or Maildir indexing in some way?  
 
 Obviously there are plenty of examples of html-strippers around, but
 generally the output lands up somewhere else, and it would be a great
 help if the missing original message could be inserted so as to be
 viewable while browsing the email folder hierarchy.

Not a direct answer to your question, but if you are using mutt
under X, then there are html viewers that can hook into mutt.

- --
Ron Johnson, Jr.
Jefferson LA  USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG6b29S9HxQb37XmcRArWpAJ43ndkzbzCPS1mnvdbmBt8oHzbzjQCg4ZiJ
GK7cboXfkXqLA6xn/9MySMI=
=wwGb
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mail messages with only html

2007-09-13 Thread Benjamin A'Lee
On Thu, Sep 13, 2007 at 05:46:21PM -0500, Ron Johnson wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 09/13/07 17:36, Richard Lyons wrote:
  This is becoming more of a problem.  There is a growing number of firms
  that are incapable of sending out normal emails.  They insist on sending
  blank messages with an html attachment only.  Of course this is usually
  a sign of spam, and I usually delete such messages without wasting time
  wondering what might be in them.  But I do get some messages in this 
  form that I want to read, and even keep.  
  
  Here is the thought that struck me: could I in principle write a script
  to take such void plus html messages, strip the tags (replacing URLs
  when the href text doesn't have it) and write the bare text back into
  the source email so that I can see it? The html attachment could be left
  in place or discarded, it usually won't matter which.  Or would this
  mess up the IMAP or Maildir indexing in some way?  
  
  Obviously there are plenty of examples of html-strippers around, but
  generally the output lands up somewhere else, and it would be a great
  help if the missing original message could be inserted so as to be
  viewable while browsing the email folder hierarchy.
 
 Not a direct answer to your question, but if you are using mutt
 under X, then there are html viewers that can hook into mutt.

There are viewers that can hook into Mutt even if you don't run it under
X. 

In .muttrc:
auto_view text/html

In .mailcap:
text/html; w3m -dump -T text/html '%s'; copiousoutput

Or:
text/html; lynx -dump '%s'; copiousoutput # or something like that.

Or use the pipe function to feed it into one of those viewers, for an
interactive session.

I could be wrong, but I don't think that editing the contents of a
message would mess up the indexing (most applications that I know of
only index the headers). On the other hand, it might be safest to write
it to a new file in the maildir, with a new unique name.

-- 
Benjamin A'Lee [EMAIL PROTECTED]
http://subvert.org.uk/~bma/
A fan club is a group of people who tell an actor he's not alone in the
way he feels about himself. - Kenneth Williams


signature.asc
Description: Digital signature


Re: mail messages with only html

2007-09-13 Thread John L Fjellstad
Richard Lyons [EMAIL PROTECTED] writes:

 Here is the thought that struck me: could I in principle write a script
 to take such void plus html messages, strip the tags (replacing URLs
 when the href text doesn't have it) and write the bare text back into
 the source email so that I can see it? The html attachment could be left
 in place or discarded, it usually won't matter which.  Or would this
 mess up the IMAP or Maildir indexing in some way?  

I fail to see why you couldn't write a filter (using maildrop or
procmail) to pipe the message through w3m -dump (or links -dump) before
storing the message.

Also, IMAP won't care if you change the message. You just upload the
message as a new message. I do it all the time with I add labels etc.

-- 
John L. Fjellstad
web: http://www.fjellstad.org/  Quis custodiet ipsos custodes


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]