File: mailcap

package info (click to toggle)
metamail 2.7-34
  • links: PTS
  • area: main
  • in suites: potato
  • size: 932 kB
  • ctags: 668
  • sloc: ansic: 7,986; sh: 1,661; csh: 229; makefile: 202
file content (185 lines) | stat: -rw-r--r-- 10,203 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# 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 that the effect of the following is to send ALL audio subtypes to the 
# showaudio program, but to compose audio (e.g. in the mailto program) 
# using "audio/basic" as the type.
audio/*; showaudio %s
audio/basic; showaudio %s; compose=audiocompose %s; edit=audiocompose %s; description="An audio fragment"

# The following line is for sites where xv understands jpeg but xloadimage is preferred.
image/jpeg; showpicture -viewer xv %s
# The following sends all other image subtypes to showpicture.
image/*; showpicture %s
# The following all appear AFTER the corresponding READING entries, and 
# are for use in messages composition, e.g. in the "mailto" program
# In the following lines, the exit 0 junk is necessary because xwd 
# doesn't always exit with a valid exit status!
# For sites with current (X11R5) pbm utilities
image/gif; showpicture %s; compose="xwd -frame | xwdtopnm | ppmtogif > %s\; exit 0"; description="An X11 window image dump in GIF format"
# The following line should be used instead of the previous by sites
# with old (X11R4) pbm utilities
#image/gif; showpicture %s; compose="xwd -frame | xwdtoppm | ppmtogif > %s\; exit 0"; description="An X11 window image dump in GIF format"
# For receiving X11 window image dumps from older versions of Andrew messages
image/x-xwd; showpicture %s; description="An X11 window image dump in X-XWD format"

message/partial; showpartial %s %{id} %{number} %{total}
message/external-body; showexternal %s %{access-type} %{name} %{site} %{directory} %{mode} %{server}; \
	needsterminal; composetyped = extcompose %s; \
	description="A reference to data stored in an external location"

# You can alter the above entry to only use certain access-types by 
# adding a clause like the following before the "description=" line:
#	test=test %{access-type}  = mail-server;  \


# 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...
application/postscript ; lpr %s \; echo SENT FILE TO PRINTER ; description="A Postscript File";\
	compose="getfilename Postscript %s"

# The following should be commented out if you do NOT have safe-tcl
# and should be uncommented if you DO have safe-tcl
#multipart/enabled-mail; show-enabled %F
#application/safe-tcl; swish -safe -messaging -f %s

# The following should be commented out if you do NOT have atomicmail
# and should be uncommented if you DO have ATOMICMAIL
#application/atomicmail; atomicmail %s; compose=surveyor.am -p %s; description="An interactive ATOMICMAIL survey"
# The following should be used instead if you have atomicmail but not TK.
#application/atomicmail; atomicmail %s ; needsterminal
#application/atomicmail; atomicmail %s; compose=surveyor.am -p %s; description="An interactive ATOMICMAIL survey"; needsterminal

# The following give rudimentary capabilities to read old andrew format
# even to non-Andrew sites, since "ezview" comes with metamail.
x-be2;     ezview %s ; copiousoutput
application/andrew-inset;     ezview %s ; copiousoutput; edit=ez -d %s; compose="ez -d %s"; description="An Andrew inset/document"

# The following gives rudimentary capability for receiving 
# text mail in the ISO-8859-1 character set, which covers many European 
# languages, and the ISO-8859-8 character set, which includes Hebrew
# Note that the pipe to tr ensures that the "ISO" is case-insensitive.
text/richtext; shownonascii iso-8859-8 -e richtext -p %s; test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`"  = iso-8859-8; copiousoutput
text/richtext; shownonascii iso-8859-1 -e richtext -p %s; test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`"  = iso-8859-1; copiousoutput
text/plain; shownonascii iso-8859-8 %s; test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`" = iso-8859-8; copiousoutput
text/plain; shownonascii iso-8859-1 %s; test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`" = iso-8859-1; copiousoutput
text/enriched; shownonascii iso-8859-8 -e richtext -e -p %s; test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`"  = iso-8859-8; copiousoutput
text/enriched; shownonascii iso-8859-1 -e richtext -e -p %s; test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`"  = iso-8859-1; copiousoutput

# The following displays Japanese text at sites where the "kterm" program is installed:
text/plain; kterm -geometry +0+0  -e more %s /dev/null; test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`" = iso-2022-jp


text/richtext; richtext %s; copiousoutput
# If you have Andrew at your site, you MIGHT prefer to replace the
# above line with the following one, but probably won't because
# ez takes so long to start up.
# text/richtext; richtoatk < %s | ezview - ; copiousoutput
text/enriched; richtext -e %s; copiousoutput

# The following is a VERY rough cut at showing mail from Sun's openwindows mailtool
# Old version
# x-sun-attachment; sun-to-mime %s
x-sun-attachment; sun2mime %s
audio-file; sun-audio-file %s
postscript-file; lpr %s \; echo SENT FILE TO PRINTER
default; sun-message.csh %s %{encoding}; needsterminal
mail-file; sun-message.csh %s %{encoding}; needsterminal
sun-deskset-message; sun-message.csh %s %{encoding}; needsterminal

# The following is used for distributing metamail patches
# It should probably be used only by those administering metamail at a site.
# You will need to replace "source-tree-root" with the real root of your 
# actual metamail source tree.
# You can also modify this line to get metamail patches from some trusted
# server other than thumper, if there is one -- man patch-metamail" for help.
application/x-metamail-patch; cat %s > /dev/null \; patch-metamail source-tree-root %{patchnumber}; needsterminal

# The following is for support of MacMIME, especially those
# the Columbia AppleTalk package (CAP) installed.
# For more info about MacMIME, send email to paf@nada.kth.se
#
# If you don't have CAP, and haven't changed rcvAppleSingle
# or sndAppleSingle, you should comment out this line.
application/applefile; rcvAppleSingle %s; compose="sndAppleSingle %s";description="An Apple Macintosh file in AppleSingle format"

#
# The following is for interoperability with Z-Mail version 3.0 and beyond.
# To enable this compatibility, uncomment all of the following lines.
#
# For more info about Z-Mail, send email to info@z-code.com
#
#application/x-movie; movieplayer %s; compose=moviemaker %s; \
#       description="Movie"; \
#        x11-bitmap="/usr/lib/Zmail/bitmaps/movie.xbm"
#application/x-inventor; examine %s; description="Inventor file"; \
#        x11-bitmap="/usr/lib/Zmail/bitmaps/inventor.xbm"
#application/x-zm-fax; zfax %s; description="Z-Fax document"; \
#	x11-bitmap="/usr/lib/Zmail/bitmaps/fax.xbm"
#application/x-showcase; showcase %s; compose=showcase %s; \
#	description="Showcase document"; \
#	x11-bitmap="/usr/lib/Zmail/bitmaps/showcase.xbm"
#application/x-jot; jot %s; compose=jot %s; description="Jot document"; \
#	x11-bitmap="/usr/lib/Zmail/bitmaps/jot.xbm"
#image/x-sgi; ipaste %s; compose=imgworks %s; description="SGI image"; \
#	x11-bitmap="/usr/lib/Zmail/bitmaps/image.xbm"
#audio/x-aiff; playaiff %s; compose=recordaiff -t 60 %s;	\
#	description="AIFF Audio"; x11-bitmap="/usr/lib/Zmail/bitmaps/sound.xbm"
#image/x-bitmap; bitmap %s; description="X11 bitmap"; \
#	x11-bitmap="/usr/lib/Zmail/bitmaps/bitmap.xbm"
#image/x-xpm1; olpixmap %s; description="OL pixmap"; \
#	x11-bitmap="/usr/lib/Zmail/bitmaps/bitmap.xbm"
#application/x-island-write; IslandWrite %s; compose=IslandWrite %s; \
#	description="IslandWrite document"; \
#	x11-bitmap="/usr/lib/Zmail/bitmaps/islwrite.xbm"
#application/x-island-draw; IslandDraw %s; compose=IslandDraw %s; \
#	description="IslandDraw document"; \
#	x11-bitmap="/usr/lib/Zmail/bitmaps/isldraw.xbm"
#application/x-island-paint; IslandPaint %s; compose=IslandPaint %s; \
#	description="IslandPaint document"; \
#	x11-bitmap="/usr/lib/Zmail/bitmaps/islpaint.xbm"
#application/x-framemaker; maker -f %s; compose=maker -f %s; \
#	description="FrameMaker document"; \
#	x11-bitmap="/usr/lib/Zmail/bitmaps/frame.xbm"
#application/x-wingz; Wingz %s; compose=Wingz %s; \
#	description="Wingz document"; \
#	x11-bitmap="/usr/lib/Zmail/bitmaps/wingz.xbm"
# Old Z-mail format
#x-zm-multipart: sun-to-mime %s

#Another suggested way to use FrameMaker
# application/x-framemaker; clclient -f %s \; sleep 60 ; \
#	compose="getfilename FrameMaker %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.  The following two mailcap entries should give you a model 
# for a hack that will allow you to get differential behavior from Mosaic and 
# metamail in spite of this fact.  It exploits the fact that metamail always 
# sets the MM_MAILER variable (if only to "unknown") while Mosaic does not.
#
# foo/bar; echo mosaic; test=test "$MM_MAILER" = ""
# foo/bar; echo not mosaic