Help for Pine - MIME |
You are in Home > Miscellaneous > MIME |
This section talks about handling of attachments in Pine. We describe here how you can set variables so that opening attachments in Pine (and sending them) will be smooth for you and the recipients of your messages.
The most important point that you must understand is that what is described here only works if all involved parties in the handling of the message decide to cooperate. It is enough that at least one of the parties misconfigures his/her system to make it fail for you (and vice versa). Therefore it's important that you configure your system correctly.
There are two main issues when transporting a message. That is transporting its text and attached files. First we will discuss the case of attachments, leaving the case of handling of text in the e-mail for later in this document.
mimetype-search-path = /home/id/.mime-typesor
mimetype-search-path = /etc/mime-types:/home/id/.mime-types
The same method is applied to create the .mime-types file. All the information that this file contains is just associations of extensions of files and their corresponding mime-type, in the format
file/type extension1 extension2 extension3For example, the following are possible entries in a .mime-types file
video/mpeg mpeg mpg mpe text/html html htm image/gif gif image/jpeg jpeg jpg jpe application/msword doc application/VND.MS-EXEL xls application/pdf pdf application/postscript psA cautionary note is that Pine does not recognize the mime-types file generated by Netscape. The format used by Pine is exactly as shown above, and any other format will result in Pine not making the right association of file and type.
In particular, the above table implies that the file thesis.doc is a word document of type application/msword. This information is used in two ways by Pine. If you were to attach the file thesis.doc, then Pine would attach that file as application/msword, and in that form will be received by the user. On the other hand when you have received a file of type application/msword, if you have configured your mailcap file correctly you may be able to open it from Pine, without any need to save it first.
Here you can find a list of recognized file types. Note in particular the type Application/octet-stream. This type is used to identify files that do not conform to any specified type, and therefore, you should not associate it to any extension type.
file/type; command %s;[test]; extra_parameterHere is a sample entry .mailcap file:
application/pdf;acroread3 -geometry 700x800 -tempFile %s ; ; test=test -n "$DISPLAY" application/postscript; gv %s ; ; test=test -n "$DISPLAY" text/html;/usr/local/bin/lynx -use_mouse -force_html %s;needsterminal image/gif;xv %s ; ; test=test -n "$DISPLAY" video/mpeg; mpeg_play %s ; ; test=test -n "$DISPLAY"As a cautionary note. You should never add to this list programs that may have bad effect on your system. For example adding an entry for application/x-sh (for a shell script) is a bad idea, as that could perfectly be a virus, and you certainly don't need to get infected by one. For the same reason, you should not associate a program to the file type application/octet-stream.
You are in Home > Miscellaneous > MIME |