1TNEF(1)                     General Commands Manual                    TNEF(1)
2
3
4

NAME

6       tnef - decode Microsoft's Transport Neutral Encapsulation Format
7

SYNOPSIS

9       tnef [options] [FILE]
10
11       tnef {--help | --version}
12

DESCRIPTION

14       This  manual  page  documents  the  tnef  filter.   tnef decodes e-mail
15       attachments encoded in Microsoft's Transport Neutral Encapsulation For‐
16       mat (hereafter, TNEF), which "wraps" Microsoft e-mail attachments.
17
18       Unfortunately,thesewrappedattachmentsareinaccessibleto    any    e-mail
19       client that does not understand TNEF.  Fortunately, the tnef filter can
20       be used by any MIME-aware client to unpack these attachments.
21

OPTIONS

23       -f FILE,  --file=FILE
24              use  FILE  as  input  ('-'  denotes stdin).  When this option is
25              omitted, tnef reads data from stdin.
26
27       -C DIR,  --directory=DIR
28              unpack file attachments into DIR.
29
30       -x SIZE, --maxsize=SIZE
31              limit maximum size of extracted archive (bytes)
32
33       -t,  --list
34              list attached files, do not extract.
35
36       -w,  --interactive,  --confirmation
37              ask for confirmation for every action.
38
39       --overwrite
40              when extracting attachments, overwrite existing files.
41
42       --number-backups
43              when extracting attachments, if file FOO  will  be  overwritten,
44              create FOO.n instead.
45
46       --use-paths
47              honor  file  pathnames  specified  in  the TNEF attachment.  For
48              security  reasons,  paths  to  attached  files  are  ignored  by
49              default.
50
51       --save-body FILE
52              Save  message body data found in the TNEF data.  There can be up
53              to three message bodies in the file, plain text,  HTML  encoded,
54              and  RTF  encoded.   Which are saved is specified by the --body-
55              pref option.  By default the message bodies  are  written  to  a
56              file  named  message with an extension based upon the type (txt,
57              html, rtf).
58
59       --body-pref PREF
60              Specifies which of the possibly three message body formats  will
61              be  saved.   PREF  can  be  up to three characters long and each
62              character must be one of 'r', 'h', or 't' specifying  RTF,  HTML
63              or  text.  The order is the order that the data will be checked,
64              the first type found will be saved.   If  PREF  is  the  special
65              value  of 'all' then any and all message body data found will be
66              saved.  The default is 'rht'.
67
68       --save-rtf FILE
69              DEPRECATED.  Equivalent to --save-body=FILE --body-pref=r
70
71       -h,  --help
72              show usage message.
73
74       -V,  --version
75              display version and copyright.
76
77       -v,  --verbose
78              produce verbose output.
79
80       --debug
81              enable debug output.
82

EXAMPLE

84       The following example demonstrates typical tnef usage  with  a  popular
85       Unix mail client called "mutt".
86
87   Step 1 -- Configure ~/.mailcap
88       Mutt  can't use tnef for its intended purpose until an appropriate con‐
89       tent type definition exists in ~/.mailcap .  Here's  a  sample  defini‐
90       tion:
91
92              application/ms-tnef; tnef -w %s
93
94       This mailcap entry says that whenever the MIME content type:
95
96              application/ms-tnef
97
98       is encountered, use this command to decode it:
99
100              tnef -w %s
101
102       The  latter  command string invokes tnef, specifying both the -w option
103       and the attachment (created as a temporary file) as command line  argu‐
104       ments.
105
106   Step 2 -- Add The Filter To $PATH
107       Mutt can't invoke tnef if the filter isn't accessible via $PATH.
108
109   Step 3 -- Test Mutt
110       Use  mutt to read a message that includes a TNEF attachment.  Mutt will
111       note that an attachment of type "application/ms-tnef is unsupported".
112
113       Press the "v" key to open mutt's "view attachment" menu.
114
115       Move the cursor over the TNEF attachment and press  the  enter  key  to
116       "view"  the  attachment.  Mutt will launch tnef and invoke it using the
117       command line syntax  specified  in  ~/.mailcap  (step  1).   tnef  then
118       decodes all file(s) included in the TNEF attachment, prompting for con‐
119       firmation prior to creating an individual  file  (refer  to  -w  option
120       above).   -w  is  useful here because it gives the end user a chance to
121       view the filename(s) included in the mail message.
122
123       Note that Mutt's attachment menu also supports  a  pipe  option,  which
124       permits  the user to pipe attachments to an external filter (how conve‐
125       nient).  So, to list the contents of a TNEF attachment prior to  decod‐
126       ing it, press the "|" key and enter this command:
127
128              tnef -t
129

SEE ALSO

131       metamail(1), mailcap(4), mutt(1), other email clients.
132

AUTHOR

134       Mark Simpson.
135

REPORTING BUGS

137       Report bugs to Mark Simpson <verdammelt@users.sourceforge.net>
138

OTHER REFERENCES

140       This web page:
141
142       http://support.microsoft.com/support/kb/articles/Q136/2/04.asp
143
144       describes  how  to  configure  Microsoft email clients so that the TNEF
145       format  is  disabled  when  sending  messages  to   non-TNEF-compatible
146       clients.
147
148
149
150
151
152
153Filter                         TNEF MIME Decoder                       TNEF(1)
Impressum