diff options
| author | Simeon Simeonov | 2018-02-26 11:23:00 +0100 |
|---|---|---|
| committer | Simeon Simeonov | 2018-02-26 11:23:00 +0100 |
| commit | 0b3cbf57875fd692e4ba0b336fefa4bee1ed00dc (patch) | |
| tree | af916a30553c78ce9d4f2d8658656a175c5b6921 /manual/en/sylpheed-14.html | |
Initial commit for sylpheed 3.7.0
Diffstat (limited to 'manual/en/sylpheed-14.html')
| -rw-r--r-- | manual/en/sylpheed-14.html | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/manual/en/sylpheed-14.html b/manual/en/sylpheed-14.html new file mode 100644 index 0000000..dde34f2 --- /dev/null +++ b/manual/en/sylpheed-14.html | |||
| @@ -0,0 +1,152 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> | ||
| 2 | <HTML> | ||
| 3 | <HEAD> | ||
| 4 | <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> | ||
| 5 | <TITLE>Sylpheed User's Manual: Handling MIME types</TITLE> | ||
| 6 | <LINK HREF="sylpheed-15.html" REL=next> | ||
| 7 | <LINK HREF="sylpheed-13.html" REL=previous> | ||
| 8 | <LINK HREF="sylpheed.html#toc14" REL=contents> | ||
| 9 | </HEAD> | ||
| 10 | <BODY> | ||
| 11 | <A HREF="sylpheed-15.html">Next</A> | ||
| 12 | <A HREF="sylpheed-13.html">Previous</A> | ||
| 13 | <A HREF="sylpheed.html#toc14">Contents</A> | ||
| 14 | <HR> | ||
| 15 | <H2><A NAME="s14">14. Handling MIME types</A></H2> | ||
| 16 | |||
| 17 | <H2><A NAME="ss14.1">14.1 How Sylpheed checks for Mime types</A> | ||
| 18 | </H2> | ||
| 19 | |||
| 20 | <P>When attaching a file to a message (composing a new message), the | ||
| 21 | MIME type of the attached file is choosen based on the file extension | ||
| 22 | from the mapping list defined in the <I>mime.types</I> file(s). | ||
| 23 | Sylpheed defines its MIME type mapping table by loading the | ||
| 24 | system wide MIME types file, then the user file. | ||
| 25 | The systeme file is <I>SYSCONFDIR/mime.types</I> (SYSCONFDIR can | ||
| 26 | be defined a compile time), or if it does not exist, <I>/etc/mime.types</I>. | ||
| 27 | The user file is <I>$HOME/.sylpheed/mime.types</I>. | ||
| 28 | <P>A <I>mime.types</I> file consist of one MIME type definition per line, | ||
| 29 | each definition line starting with the name of the MIME type, followed by | ||
| 30 | a space separated list of the corresponding file extensions. | ||
| 31 | The file can contain empty lines, and comments start with the <CODE>#</CODE> | ||
| 32 | character and close at line's end. | ||
| 33 | <P>Following is a typical <I>mime.types</I> file (an extract of mine): | ||
| 34 | <P> | ||
| 35 | <PRE> | ||
| 36 | # This file controls what Internet media types are sent to the client for | ||
| 37 | # given file extension(s). Sending the correct media type to the client | ||
| 38 | # is important so they know how to handle the content of the file. | ||
| 39 | # The Internet media type registry is at | ||
| 40 | # <ftp://ftp.iana.org/in-notes/iana/assignments/media-types/>. | ||
| 41 | |||
| 42 | # MIME type Extension | ||
| 43 | application/mac-binhex40 hqx | ||
| 44 | application/mac-compactpro cpt | ||
| 45 | application/msword doc | ||
| 46 | application/pdf pdf | ||
| 47 | application/postscript ai eps ps | ||
| 48 | application/rtf rtf | ||
| 49 | application/x-bcpio bcpio | ||
| 50 | application/x-bzip2 bz2 | ||
| 51 | application/x-csh csh | ||
| 52 | application/x-gtar gtar | ||
| 53 | application/x-gzip gz tgz | ||
| 54 | application/x-kword kwd kwt | ||
| 55 | application/x-kspread ksp | ||
| 56 | application/x-kpresenter kpr kpt | ||
| 57 | application/x-kchart chrt | ||
| 58 | application/x-latex latex | ||
| 59 | application/x-sh sh | ||
| 60 | application/x-shar shar | ||
| 61 | application/x-shockwave-flash swf | ||
| 62 | application/x-tar tar | ||
| 63 | application/x-tcl tcl | ||
| 64 | application/x-tex tex | ||
| 65 | application/x-texinfo texinfo texi | ||
| 66 | application/x-troff t tr roff | ||
| 67 | application/x-troff-man man | ||
| 68 | application/zip zip | ||
| 69 | audio/mpeg mpga mp2 mp3 | ||
| 70 | audio/x-aiff aif aiff aifc | ||
| 71 | audio/x-wav wav | ||
| 72 | image/gif gif | ||
| 73 | image/ief ief | ||
| 74 | image/jpeg jpeg jpg jpe | ||
| 75 | image/png png | ||
| 76 | image/tiff tiff tif | ||
| 77 | text/plain asc txt | ||
| 78 | text/rtf rtf | ||
| 79 | text/sgml sgml sgm | ||
| 80 | text/xml xml | ||
| 81 | video/mpeg mpeg mpg mpe | ||
| 82 | video/x-msvideo avi | ||
| 83 | text/html html htm | ||
| 84 | </PRE> | ||
| 85 | <P> | ||
| 86 | <P>If the file can be found or has the wrong format, Sylpheed will assume | ||
| 87 | the default MIME type for all the attachments: <I>application/octet-stream</I>. | ||
| 88 | In such a case, the recipients mail client may not know what application | ||
| 89 | to use to view the attachment. | ||
| 90 | <P> | ||
| 91 | <H2><A NAME="ss14.2">14.2 How Sylpheed handles attachments (reception)</A> | ||
| 92 | </H2> | ||
| 93 | |||
| 94 | <P>When opening an attachment (select the attachment, right click and select | ||
| 95 | <I>Open</I>) Sylpheed uses one of the following methods to determine | ||
| 96 | the application to launch: | ||
| 97 | <P> | ||
| 98 | <UL> | ||
| 99 | <LI>The attachment is an image: the application is the one defined by the | ||
| 100 | <I>mime_image_viewer</I> variable of the common preferences configuration | ||
| 101 | file (<I>$HOME/.sylpheed/sylpheedrc</I>). If no application is defined, or | ||
| 102 | if the format of the definition is not valid, the default application | ||
| 103 | command is <I>display</I> (ImageMagick viewer).</LI> | ||
| 104 | <LI>The attachment is a sound file: the application is the one defined by the | ||
| 105 | <I>mime_audio_player</I> variable of the common preferences configuration | ||
| 106 | file (<I>$HOME/.sylpheed/sylpheedrc</I>). If no application is defined, or | ||
| 107 | if the format of the definition is not valid, the default application | ||
| 108 | command is <I>play</I>.</LI> | ||
| 109 | <LI>The attachment is a HTML file: the application is the one defined by the | ||
| 110 | <I>uri_cmd</I> variable of the common preferences configuration | ||
| 111 | file (<I>$HOME/.sylpheed/sylpheedrc</I>). This can also be changed in the | ||
| 112 | <I>Common preferences</I>, by changing the <I>Web browser</I> defined | ||
| 113 | in the <I>Other</I> tab.</LI> | ||
| 114 | <LI>Any other attachment type: Sylpheed relies on <I>metamail</I> to use | ||
| 115 | the correct application (Sylpheed starts <I>metamail</I> giving it | ||
| 116 | the attachment file and the MIME type taken from the mail).</LI> | ||
| 117 | </UL> | ||
| 118 | <P> | ||
| 119 | <P>The binding of the applications to each MIME type is defined in the | ||
| 120 | <I>mailcap</I> file. The systeme wide file is <I>/etc/mailcap</I>, | ||
| 121 | while the user file is <I>$HOME/.mailcap</I>. | ||
| 122 | <P> | ||
| 123 | <P>In the mailcap file, there is one definition per line, big lines | ||
| 124 | can be broken by escaping the newline with a <I>\</I> character, | ||
| 125 | the first element of the line is the MIME type, then a semi-colon, | ||
| 126 | (<I>;</I>), and finally the application to launch. | ||
| 127 | The application part (right side of the semi-colon) can contain several | ||
| 128 | shell commands separated by an escaped semi-colon (<I>\;</I>) and | ||
| 129 | the <I>%s</I> string is replaced by the name of the file when | ||
| 130 | launching the command. | ||
| 131 | <P> | ||
| 132 | <P>Following is a typical <I>mailcap</I> file (an extract of mine): | ||
| 133 | <P> | ||
| 134 | <PRE> | ||
| 135 | |||
| 136 | image/*; ee %s | ||
| 137 | |||
| 138 | video/mpeg; gtv %s | ||
| 139 | video/*; xanim %s | ||
| 140 | |||
| 141 | application/pdf; xpdf %s | ||
| 142 | |||
| 143 | text/html; dillo %s | ||
| 144 | </PRE> | ||
| 145 | <P> | ||
| 146 | <P> | ||
| 147 | <HR> | ||
| 148 | <A HREF="sylpheed-15.html">Next</A> | ||
| 149 | <A HREF="sylpheed-13.html">Previous</A> | ||
| 150 | <A HREF="sylpheed.html#toc14">Contents</A> | ||
| 151 | </BODY> | ||
| 152 | </HTML> | ||
