Re: [CBLX] mutt ou mailcap ?

[ Thread Index | Date Index | More lists.tuxfamily.org/carrefourblinux Archives ]


Salut Philippe et tous,

On Sat, Apr 23, 2011 at 05:48:18PM +0200, Philippe Delavalade wrote:
> Bonjour tout le monde.
> 
> J'ai fais plusieurs essai dans ^/.mailcap bien sûr :-)
> 
> J'ai tenu compte des observations de Dominique mais ça ne change rien.
> 
> J'ai remarqué que dans un message reçu récemment, en cherchant dans les
> headers, pour content-type je trouve une ligne avec multipart/alternative
> et une avec text/plain mais aucune avec text/html (ou approchant).
> 
> À tout hasard je mets ma dernière mouture de mon mailcap personnel en pièce
> jointe.

Dans ta pièce jointe, il y a plusieurs entrée pour text/html et
compagnie. Il me semble que mutt ne prend en compte que le premier... De
toute façon, par sécurité, ne laisse que les lignes avec lynx et vire
sensible-browser.

Pour le multipart/... pas besoin de le mettre.

Amicalement,

Manu

> 
> En tout cas merci pour vos aides, Michel, Emmanuel et Dominique.
> 
> -- 
> Philippe
> 

> # Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
> # 
> # Permission to use, copy, modify, and distribute this material 
> # for any purpose and without fee is hereby granted, provided 
> # that the above copyright notice and this permission notice 
> # appear in all copies, and that the name of Bellcore not be 
> # used in advertising or publicity pertaining to this 
> # material without the specific, prior written permission 
> # of an authorized representative of Bellcore.  BELLCORE 
> # MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
> # OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
> # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
> #
> # Prototype Mailcap file
> # Note that support for text & multipart are "built in" to metamail,
> # as are rudimentary support for message, and application.
> # However, any of these may be overridden in mailcap.
> #
> # Note that users may override or extend this with a .mailcap
> # file in their own directory.  However, there is NO NEED
> # for them to copy entries from this file, as metamail will
> # pick up entries from both the system and personal mailcap files.
> #
> 
> # NOTE:  This file has been heavily modified for use as an example
> #        configuration file for Lynx
> 
> # In the samples given   test=test -n "$DISPLAY"   is used to
> # determine if the current session is X capible by checking
> # for the existance of a DISPLAY environment variable.
> # Lynx actually uses a getenv() call for DISPLAY (DECW$DISPLAY
> # on VMS) when it encounters   test=test -n "$DISPLAY"  or
> # test=test -z "$DISPAY"  in a viewer assignment, instead of
> # spawning to execute "test" via a system() call, i.e., those
> # two strings, respectively, are handled equivalently to the
> # :XWINDOWS and :NON_XWINDOWS flags for VIEWER: assignments
> # in lynx.cfg.  Any system without the DISPLAY (or DECW$DISPLAY)
> # environment variable will be assumed to be Non-X.
> 
> # You can append a ';' followed by "q=#.#", e.g.,  ; q=0.002
> # to set the quality parameter for the Content-Type, which can be
> # included in the Accept: header Lynx sends to http servers (the
> # default quality value is 1.0, and Lynx appends the parameter
> # to the Content-Type only if the value is less than 1.0).
> 
> # You can append a ';' followed by "mxb=#", e.g.,  ; mxb=1000000
> # to set the maxbytes parameter for the Content-Type, which can be
> # included in the Accept: header Lynx sends to http servers (the
> # default maxbytes value is 0, meaning no maximum, and Lynx appends
> # the parameter to the Content-Type only if the value exceeds 0).
> 
> # The following line is for sites where xv understands jpeg but xloadimage 
> # is preferred.
> #
> # the test line specifies that this viewer should only be used if
> # the display variable is set.
> #image/jpeg; xv %s;  test=test -n "$DISPLAY"
> 
> # The following sends all other image subtypes to xloadimage
> #image/*; xloadimage %s; ;  test=test -n "$DISPLAY"
> 
> # The following sends all other image subtypes to xv
> #image/*; xv %s; ;  test=test -n "$DISPLAY"
> 
> 
> # If you have an interactive Postscript interpreter, you should think carefully 
> # before replacing lpr with it in the following line, because PostScript
> # can be an enormous security hole.  It is RELATIVELY harmless
> # when sent to the printer...
> 
> # This one is for NON-X
> #application/postscript; lpr %s \; echo SENT FILE TO PRINTER; ;test=test -z "$DISPLAY"
> 
> # This one is for X.  It's already the default via src/HTInit.c.
> #application/postscript; ghostview %s; ;  test=test -n "$DISPLAY"
> 
> # The following should be commented out if you do NOT have safe-tcl
> # and should be uncommented if you DO have safe-tcl
> #application/safe-tcl; swish -safe -messaging -f %s
> 
> # A common problem with the mailcap mechanism is getting differential 
> # behavior from different programs.  This problem is compounded by the fact 
> # that some programs, notably Mosaic, do not implement the "test" clause in 
> # mailcap files.  If you are using Lynx and X Mosaic together you should
> # place all X-centric entries before non-X entries.  X Mosaic will use
> # whichever entry is defined first so further entries will be ignored.
> #
> # Lynx exports the environment variable LYNX_VERSION, so it can be tested
> # by scripts to determine if Lynx is running or not.  However, the string
> #   test=test -n "$LYNX_VERSION"
> # is handled simply as a flag which yields success when Lynx encounters it
> # in the mailcap file (i.e., Lynx does not bother to execute "test" via a
> # system() call to find out if it's running, because it obviously is).
> # Inclusion of the string for that test can be used to prevent other
> # software which reads the mailcap file from acting on assignments intended
> # only for Lynx.  The string
> #   test=test -z "$LYNX_VERSION"
> # similarly is treated by Lynx simply as a flag which yields failure.
> 
> text/html; /usr/bin/sensible-browser '%s'; description=HTML Text; nametemplate=%s.html
> text/xhtml; /usr/bin/sensible-browser '%s'; description=HTML Text; nametemplate=%s.html
> text/xhtml+xml; /usr/bin/sensible-browser '%s'; description=HTML Text; nametemplate=%s.html
> multipart/alternative; lynx -force_html '%s'
> text/html; lynx -force_html '%s'
> text/xhtml; lynx -force_html '%s'
> text/xhtml+xml; lynx -force_html '%s'
> application/xhtml+xml; lynx -force_html  '%s'
> 
> application/pgp-keys; pgp -f < '%s' ; copiousoutput
> 
> application/msword; antiword '%s' |less
> application/pdf; pdftotext -layout '%s' - |less
> application/x-pdf; pdftotext -layout '%s' - |less
> application/acrobat; pdftotext -layout '%s' - |less
> application/vnd.ms-excel; xls2csv '%s' |less
> 
> audio/mpeg; mplayer '%s'; nametemplate=%s.mp3
> audio/mpegurl; mplayer -playlist '%s'; nametemplate=%s.m3u
> audio/x-mpegurl; mplayer -playlist '%s'; nametemplate=%s.m3u
> audio/x-scpls; mplayer '%s'; nametemplate=%s.pls
> audio/x-wav; mplayer '%s'; nametemplate=%s.wav
> application/x-ogg; mplayer '%s'; nametemplate=%s.ogg
> application/ogg; mplayer '%s'; nametemplate=%s.ogg
> audio/x-flac; mplayer '%s'; nametemplate=%s.flac
> application/x-flac; mplayer '%s'; nametemplate=%s.flac
> audio/x-pn-realaudio; mplayer -playlist '%s'; nametemplate=%s.ram
> #audio/*; mplayer '%s'


---
-- 
   CarrefourBLinuX MailingListe 
   Pour obtenir de l'aide, envoyez le sujet  help  à: 
   carrefourblinux-request@xxxxxxxxxxxxxxxxxxx
   Archives: 
   http://listengine.tuxfamily.org/lists.tuxfamily.org/carrefourblinux


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/