Re: Export HTML emails with images

2009-02-27 Thread Christian Ebert
* Matthias Apitz on Friday, February 27, 2009 at 18:44:37 +0100
> Thanks for this piece of software; I have set in ~/.muttrc:
> 
> macro pager  "\
>  set my_wait_key=\$wait_key wait_key=no\
> PYTHONPATH=~/lib/python /home/guru/bin/viewhtmlmsg -b
> konqueror -s\
>  set wait_key=\$my_wait_key &my_wait_key\
> " "view HTML (safe) in browser"
> ...
> 
> this brings up on F8 a konqueror window with the HTML mail, but in the
> mutt-window some error like:
> 
> Press any key to continue...  (I press CR)
> Usage: set variable=yes|no
> 
> this is with mutt 1.4.2.3i; any idea? thx

Your mutt version doesn't support "my_" variables. The good news
is that configuration is simpler.

macro pager  "\
PYTHONPATH=~/lib/python /home/guru/bin/viewhtmlmsg -b konqueror 
-s\
" "view HTML (safe) in browser"

Is basically enough from viewhtmlmsg's, errmh, view. Of course
this is less flexible. You'd have to hard code your $wait_key
settings in case you have it on by default and want it turned off
for the macro etc.

c
-- 
  Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]

_F R E E_  _V I D E O S_  -->>  http://www.blacktrash.org/underdogma/


Re: Forward message and leave From: intact?

2009-02-27 Thread Jörg Sommer
Hallo Dave,

Dave Woodfall  wrote:
> I need to forward messages to a certain email address and have it so that
> the recipient will reply to original sender rather than me.
>
> Is this possible?

Do you ask for  bound by default to b?

Bye, Jörg.
-- 
Nicht was Du bist, ist es was Dich ehrt, wie Du bist bestimmt den Wert.
Wünsche hat man oft und viel, nur wer lernt erreicht sein Ziel.


Re: urlview - open firefox tab

2009-02-27 Thread Cameron Simpson
On 27Feb2009 09:07, Joseph  wrote:
> On 02/27/09 17:40, Cameron Simpson wrote:
>> Ok, try this in your .urlview file:
>>  COMMAND exec >>urlview.out 2>&1; set -x; firefox -remote 
>> openURL\(%s,new-tab\)
>> i.e. insert "exec >>urlview.out 2>&1; set -x;" into the front of your
>> COMMAND string.
>>
>> Then use urlview from mutt and examine the urlview.out file afterwards.
>>
>> If we don't learn anything there we can write a small shell script.
>
> I tried as you suggested in urlview:
> COMMAND exec >>urlview.out 2>&1; set -x; firefox -remote openURL\(%s,new-tab\)
>
> response:
> Executing: exec >>urlview.out 2>&1; set -x; firefox -remote 
> openURL\('http://www.mutt.org/',new-tab\)...

So, there was _nothing_ in the file "urlview.out"?
That is strange.

BTW, what is your shell? I'd expect urlview to use /bin/sh for its
command but if it uses your login shell and your login shell is unusual
there might be some trouble.
-- 
Cameron Simpson  DoD#743
http://www.cskk.ezoshosting.com/cs/

You can blip it twice to clear the bore,
But blip it thrice, and you've sinned once more.
- Tom Warner 


Re: Show my replies in thread

2009-02-27 Thread Patrick Shanahan
* Carlos Pita  [01-01-70 12:34]:
> 
> I don't think this is supported but I'm going to ask it anyway. I would
> like to see my replies intercalated in threads. I use gmail imap server,
> and sent emails are correctly stored under "[Gmail]/Sent Mail" (this is
> the default gmail imap server behavior, no extra config is required,
> except that I set copy=no to avoid duplicated copies). "[Gmail]/Sent
> Mail" is a huge non-archivable (in the gmail sense) folder, which makes
> things even worse when I pretend to follow the natural flow of a thread
> without distractions.
> 

Then you will need to change the way you *send* mail.  I see on my
system exactly what you are wanting, but I *only* use gmail to
*receive* mail, not send.  I use my provider to send and include a
gmail "from" address.  This way you get gmail's storage and spam
filtering and see your own posts.

-- 
Patrick Shanahan Plainfield, Indiana, USAHOG # US1244711
http://wahoo.no-ip.org Photo Album:  http://wahoo.no-ip.org/gallery2
Registered Linux User #207535@ http://counter.li.org


Re: urlview - open firefox tab

2009-02-27 Thread Brian Salter-Duke
On Fri, Feb 27, 2009 at 12:24:24PM +0100, Joost Kremers wrote:
> On Thu, Feb 26, 2009 at 10:20:22PM -0700, Joseph wrote:
> > On 02/26/09 22:02, Kyle Wheeler wrote:
> >>
> >>> firefox -remote openURL('http://www.cskk.ezoshosting.com/cs/',new-tab)...
> >>> sh: -c: line 0: syntax error near unexpected token `('
> >>
> >> Well, sure - bare parentheses mean something to your shell. That's why  
> >> you have to put the backslashes in front of them. It's got nothing to  
> >> do with the single quotes inside. You could do this:
> >
> > in urlview I have:
> > OMMAND firefox -remote openURL\(%s,new-tab\)
> >
> > When I try to open any URL:
> > Executing: firefox -remote 
> > openURL\('http://domainkeys.sourceforge.net/',new-tab\)...
> > Error: Failed to send command: 500 command not parseable
> 
> i haven't used urlview since i started using xfce4's Terminal, which
> recognises urls and makes them clickable, but back when i did, my .urlview
> looked like this:
> 
> ###
> # Urlview configuration file.
> # man urlview  
> #
> # The defaults are shown here:
> #
> REGEXP  (((https?|ftp|gopher)://|(mailto|file|news):)[^' 
> \t<>"]+|(www|web|w3)\.[-a-z0-9.]+)[^' \t.,;<>"\):]
> COMMAND /home/joost/bin/urlhandler.sh %s
> #
> ###
> 
> and the script urlhandler.sh looked like this:
> 
> ==
> 
> #!/bin/bash
> 
> export PATH=/usr/bin:/usr/local/bin:
> 
> if [ ! -z $DISPLAY ] ; then
> 
> # for some stupid reason, firefox -remote cannot handle the fact that
> # there are commas in urls. therefore, we have to parse the url through
> # sed and replace commas with their ascii code %2c:
> 
> exec firefox -remote "openURL($(echo $@|sed 's/,/%2c/g'),new-tab)" 
> else
> TERM=linux
> exec links "$@"
> fi
> 
> ==
> 
> however, given that firefox doesn't need the -remote option nor the command
> openURL anymore, i'd try this in .urlview:
> 
> COMMAND firefox %s
> 
> my guess is that'll work just fine...

I use Cygwin ion a laptop for mail, with mutt of course, and:-

COMMAND "/cygdrive/c/Program Files/Mozilla Firefox/firefox" %s

in my .urlview works fine, so you are certainly correct if firefox is on
your path.

Brian.
 
> 
> -- 
> Joost Kremers, PhD
> University of Frankfurt
> Institute for Cognitive Linguistics
> Gr??neburgplatz 1
> 60629 Frankfurt am Main, Germany

-- 
Brian Salter-Duke (Brian Duke)   



Re: Forward message and leave From: intact?

2009-02-27 Thread Dave Woodfall

On (22:42 27/02/09), Jussi Peltola  put forth the proposition:

On Fri, Feb 27, 2009 at 08:21:00PM +, Dave Woodfall wrote:

I need to forward messages to a certain email address and have it so that
the recipient will reply to original sender rather than me.

Is this possible?

I can do this automagically with procmail but the problem is that some spam
is getting through, which I'd rather not have forwarded.



bounce-message?


Ah ok - I should have thought of that. Thanks very much.

--
In seeking the unattainable, simplicity only gets in the way.
-- Epigrams in Programming, ACM SIGPLAN Sept. 1982


pgpxGWBU7rkGA.pgp
Description: PGP signature


Re: Show my replies in thread

2009-02-27 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Friday, February 27 at 06:08 PM, quoth Carlos Pita:
> I don't think this is supported but I'm going to ask it anyway. I 
> would like to see my replies intercalated in threads.

That's the way *my* email works. :)

> I use gmail imap server,

Ew... Well, you may be out of luck there, I don't know.

The trick is that your replies must be stored in the same folder as 
the messages you're replying to.

One way of doing this (on a NORMAL mail server) is to change the value 
of $record:

 folder-hook . 'set record=^'

That will assure that the value of $record is whatever folder you're 
currently in. You can be more intelligent about it based on replies to 
lists or whatever... but that should work for you (it works for me!).

Of course, that then means that sent messages are NOT stored in a 
centralized "sent" folder. If this is important to you... then you may 
be in trouble.

> At least, is it a way to quickly open a mail referenced by the 
> in-reply-to header?

Not if it's in a different folder.

~Kyle
- -- 
Idealism increases in direct proportion to one's distance from the 
problem.
 -- John Galsworthy
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iEYEARECAAYFAkmoVIQACgkQBkIOoMqOI16mKQCeJxcwGGMJP95iM3W9wX++SN8r
ynQAn1h97vgsA52Tl/0/z/pzt09gpCsF
=QpBx
-END PGP SIGNATURE-


Re: Forward message and leave From: intact?

2009-02-27 Thread Jussi Peltola
On Fri, Feb 27, 2009 at 08:21:00PM +, Dave Woodfall wrote:
> I need to forward messages to a certain email address and have it so that
> the recipient will reply to original sender rather than me.
> 
> Is this possible?
> 
> I can do this automagically with procmail but the problem is that some spam
> is getting through, which I'd rather not have forwarded.
> 

bounce-message?



Forward message and leave From: intact?

2009-02-27 Thread Dave Woodfall

I need to forward messages to a certain email address and have it so that
the recipient will reply to original sender rather than me.

Is this possible?

I can do this automagically with procmail but the problem is that some spam
is getting through, which I'd rather not have forwarded.

--


pgpWZvRBN3xTx.pgp
Description: PGP signature


Show my replies in thread

2009-02-27 Thread Carlos Pita
Hi all,

I don't think this is supported but I'm going to ask it anyway. I would
like to see my replies intercalated in threads. I use gmail imap server,
and sent emails are correctly stored under "[Gmail]/Sent Mail" (this is
the default gmail imap server behavior, no extra config is required,
except that I set copy=no to avoid duplicated copies). "[Gmail]/Sent
Mail" is a huge non-archivable (in the gmail sense) folder, which makes
things even worse when I pretend to follow the natural flow of a thread
without distractions.

At least, is it a way to quickly open a mail referenced by the in-reply-to
header?

Best regards
-Carlos


Re: Export HTML emails with images

2009-02-27 Thread Matthias Apitz
El día Friday, February 27, 2009 a las 04:35:13PM +0100, Christian Ebert 
escribió:

> Shamelessly plugging my muttils package (needs Python >= 2.4):
> 
> http://www.blacktrash.org/hg/muttils/
> 
> You can use its viewhtmlmsg command in a macro:
> 
> macro index,pager  "\
>  set my_wait_key=\$wait_key wait_key=no\
> viewhtmlmsg\
>  set wait_key=\$my_wait_key &my_wait_key\
> " "view HTML in browser"
> 
> macro index,pager  "\
>  set my_wait_key=\$wait_key wait_key=no\
> viewhtmlmsg -s\
>  set wait_key=\$my_wait_key &my_wait_key\
> " "view HTML (safe) in browser"

Hi Christian,

Thanks for this piece of software; I have set in ~/.muttrc:

macro pager  "\
 set my_wait_key=\$wait_key wait_key=no\
PYTHONPATH=~/lib/python /home/guru/bin/viewhtmlmsg -b
konqueror -s\
 set wait_key=\$my_wait_key &my_wait_key\
" "view HTML (safe) in browser"
...

this brings up on F8 a konqueror window with the HTML mail, but in the
mutt-window some error like:

Press any key to continue...  (I press CR)
Usage: set variable=yes|no

this is with mutt 1.4.2.3i; any idea? thx

matthias
-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e  - w http://www.oclc.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/


Re: urlview - open firefox tab

2009-02-27 Thread Joseph

On 02/27/09 17:40, Cameron Simpson wrote:


Ok, try this in your .urlview file:

 COMMAND exec >>urlview.out 2>&1; set -x; firefox -remote openURL\(%s,new-tab\)

i.e. insert "exec >>urlview.out 2>&1; set -x;" into the front of your
COMMAND string.

Then use urlview from mutt and examine the urlview.out file afterwards.

If we don't learn anything there we can write a small shell script.


I tried as you suggested in urlview:
COMMAND exec >>urlview.out 2>&1; set -x; firefox -remote openURL\(%s,new-tab\)

response:
Executing: exec >>urlview.out 2>&1; set -x; firefox -remote 
openURL\('http://www.mutt.org/',new-tab\)...

--
#Joseph
GPG KeyID: ED0E1FB7


Re: Export HTML emails with images

2009-02-27 Thread Bertrand Janin
Christian Ebert wrote :
> Shamelessly plugging my muttils package (needs Python >= 2.4):
> 
> http://www.blacktrash.org/hg/muttils/
> 
> You can use its viewhtmlmsg command in a macro:
> 
> macro index,pager  "\
>  set my_wait_key=\$wait_key wait_key=no\
> viewhtmlmsg\
>  set wait_key=\$my_wait_key &my_wait_key\
> " "view HTML in browser"
> 
> macro index,pager  "\
>  set my_wait_key=\$wait_key wait_key=no\
> viewhtmlmsg -s\
>  set wait_key=\$my_wait_key &my_wait_key\
> " "view HTML (safe) in browser"

Awesome, that is exactly what I needed!

It took me a minute to find out why it didn't open my browser, then I
read 'viewhtmlmsgcommand.py' and realised my $BROWSER was not set.

Thanks,
Bertrand


Re: Export HTML emails with images

2009-02-27 Thread Christian Ebert
* Bertrand Janin on Friday, February 27, 2009 at 09:56:59 -0500
> I work in a company using mainly HTML emails. They format their mails
> and from time to time insert screenshots and images to illustrate their
> point. While I obviously disagree with the process, I am not in position
> to change that right now.
> 
> The text version generated by their thunderbirds is good 95% of the time
> and mutt serves me well. But I still receive this email from time to
> time with screenshots and formatting in a specific order. It is rare but
> I hate to juggle between firefox, mutt and an image viewer.
> 
> I tried to search quickly for solutions to 'export' the mail with its
> image attachment so it can be viewed as-is in firefox, with the images
> at the right place. I tried to fiddle with 'metamail' but without
> success, 'uudecode' doesn't find anything... 
> 
> I can probably write a script to handle this kind of situation, but
> before I code a square wheel I'd like to know if someone out there ever
> accomplished this.

Shamelessly plugging my muttils package (needs Python >= 2.4):

http://www.blacktrash.org/hg/muttils/

You can use its viewhtmlmsg command in a macro:

macro index,pager  "\
 set my_wait_key=\$wait_key wait_key=no\
viewhtmlmsg\
 set wait_key=\$my_wait_key &my_wait_key\
" "view HTML in browser"

macro index,pager  "\
 set my_wait_key=\$wait_key wait_key=no\
viewhtmlmsg -s\
 set wait_key=\$my_wait_key &my_wait_key\
" "view HTML (safe) in browser"


c
-- 
\black\trash movie_C O W B O Y_  _C A N O E_  _C O M A_
Ein deutscher Western/A German Western
-->> http://www.blacktrash.org/underdogma/ccc.html
-->> http://www.blacktrash.org/underdogma/ccc-en.html


Re: open a browser

2009-02-27 Thread bill lam
On Fri, 27 Feb 2009, Andreas Kalex wrote:
> Hi,
> 
> I want to tune my muttrc and/or mailcap to do the following: when
> getting a mail with html inside or as an attachment, I want to
> decide whether to open it with html2text, w3m or occasionally with
> dillo or firefox.  Now it is so that the first matching entry from
> the mailcap will open.

I make it default to w3m, and if that page requires javascript then I
open firefox from w3m using hotkeys.  w3m provides 3 external browser
commands if you need more, elinks can provides unlimited choices in
that it popup a menu to choose from.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩280 劉禹錫  烏衣巷
朱雀橋邊野草花  烏衣巷口夕陽斜  舊時王謝堂前燕  飛入尋常百姓家


Re: open a browser

2009-02-27 Thread Rado S
=- Andreas Kalex wrote on Fri 27.Feb'09 at 12:18:49 +0100 -=

> I want to tune my muttrc and/or mailcap to do the following:
> when getting a mail with html inside or as an attachment, I want
> to decide whether to open it with html2text, w3m or occasionally
> with dillo or firefox. Now it is so that the first matching entry
> from the mailcap will open.

Use a dispatcher script in mailcap which prompts you for your choice.

-- 
© Rado S. -- You must provide YOUR effort for your goal!
EVERY effort counts: at least to show your attitude.
You're responsible for ALL you do: you get what you give.


Export HTML emails with images

2009-02-27 Thread Bertrand Janin
Hey everyone,

I work in a company using mainly HTML emails. They format their mails
and from time to time insert screenshots and images to illustrate their
point. While I obviously disagree with the process, I am not in position
to change that right now.

The text version generated by their thunderbirds is good 95% of the time
and mutt serves me well. But I still receive this email from time to
time with screenshots and formatting in a specific order. It is rare but
I hate to juggle between firefox, mutt and an image viewer.

I tried to search quickly for solutions to 'export' the mail with its
image attachment so it can be viewed as-is in firefox, with the images
at the right place. I tried to fiddle with 'metamail' but without
success, 'uudecode' doesn't find anything... 

I can probably write a script to handle this kind of situation, but
before I code a square wheel I'd like to know if someone out there ever
accomplished this.

Bertrand



Re: urlview - open firefox tab

2009-02-27 Thread Joost Kremers
On Thu, Feb 26, 2009 at 10:20:22PM -0700, Joseph wrote:
> On 02/26/09 22:02, Kyle Wheeler wrote:
>>
>>> firefox -remote openURL('http://www.cskk.ezoshosting.com/cs/',new-tab)...
>>> sh: -c: line 0: syntax error near unexpected token `('
>>
>> Well, sure - bare parentheses mean something to your shell. That's why  
>> you have to put the backslashes in front of them. It's got nothing to  
>> do with the single quotes inside. You could do this:
>
> in urlview I have:
> OMMAND firefox -remote openURL\(%s,new-tab\)
>
> When I try to open any URL:
> Executing: firefox -remote 
> openURL\('http://domainkeys.sourceforge.net/',new-tab\)...
> Error: Failed to send command: 500 command not parseable

i haven't used urlview since i started using xfce4's Terminal, which
recognises urls and makes them clickable, but back when i did, my .urlview
looked like this:

###
# Urlview configuration file.
# man urlview  
#
# The defaults are shown here:
#
REGEXP  (((https?|ftp|gopher)://|(mailto|file|news):)[^' 
\t<>"]+|(www|web|w3)\.[-a-z0-9.]+)[^' \t.,;<>"\):]
COMMAND /home/joost/bin/urlhandler.sh %s
#
###

and the script urlhandler.sh looked like this:

==

#!/bin/bash

export PATH=/usr/bin:/usr/local/bin:

if [ ! -z $DISPLAY ] ; then

# for some stupid reason, firefox -remote cannot handle the fact that
# there are commas in urls. therefore, we have to parse the url through
# sed and replace commas with their ascii code %2c:

exec firefox -remote "openURL($(echo $@|sed 's/,/%2c/g'),new-tab)" 
else
TERM=linux
exec links "$@"
fi

==

however, given that firefox doesn't need the -remote option nor the command
openURL anymore, i'd try this in .urlview:

COMMAND firefox %s

my guess is that'll work just fine...


-- 
Joost Kremers, PhD
University of Frankfurt
Institute for Cognitive Linguistics
Grüneburgplatz 1
60629 Frankfurt am Main, Germany


open a browser

2009-02-27 Thread Andreas Kalex
Hi,

I want to tune my muttrc and/or mailcap to do the following:
when getting a mail with html inside or as an attachment, I want to decide 
whether to open it with
html2text, w3m or occasionally with dillo or firefox.
Now it is so that the first matching entry from the mailcap will open.

Andreas