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 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
|
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.52
from spec on 25 November 2000 -->
<TITLE>Exim Specification - 56. Format of spool files</TITLE>
</HEAD>
<body bgcolor="#FFFFFF" text="#00005A" link="#FF6600" alink="#FF9933" vlink="#990000">
Go to the <A HREF="spec_1.html">first</A>, <A HREF="spec_55.html">previous</A>, <A HREF="spec_57.html">next</A>, <A HREF="spec_59.html">last</A> section, <A HREF="spec_toc.html">table of contents</A>.
<P><HR><P>
<H1><A NAME="SEC923" HREF="spec_toc.html#TOC923">56. Format of spool files</A></H1>
<P>
<A NAME="IDX2010"></A>
<A NAME="IDX2011"></A>
A message on Exim's spool consists of two files, whose names are the message id
followed by -D and -H, respectively. The data portion of the message is kept in
the -D file on its own. The message's `envelope', status, and headers are all
kept in the -H file, whose format is described in this chapter. Each of these
two files contains the final component of its own name as its first line. This
is insurance against disc crashes where the directory is lost but the files
themselves are recoverable.
</P>
<P>
Files whose names end with -J may also be seen in the spool directory. These
are journal files, used to record addresses to which the message has been
delivered during the course of a delivery run. At the end of the run, the -H
file is updated, and the -J file is deleted.
</P>
<P>
<A NAME="IDX2012"></A>
<A NAME="IDX2013"></A>
The second line of the header file contains the login id of the process that
called Exim to create the file, followed by the numerical uid and gid. For a
locally generated message, this is normally the user who sent the message. For
an external message, the user is either root or exim.
</P>
<P>
The third line of the file contains the address of the message's sender as
transmitted in the `envelope', contained in angle brackets. In the case of
incoming SMTP mail, this is the address given in the MAIL command. For
locally generated mail, the sender address is created by Exim from the login of
the current user and the configured <EM>qualify_domain</EM>, except when Exim is
called by a trusted user that supplied a sender address via the -<EM>f</EM> option,
or a leading `From' line.
<A NAME="IDX2014"></A>
The sender address is null if the message is a delivery failure report.
</P>
<P>
The fourth line contains two numbers. The first is the time that the message
was received, in the form supplied by the Unix <EM>time()</EM> function -- a number of
seconds since the start of the epoch. The second number is a count of the
number of messages warning of delayed delivery that have been sent to the
sender.
</P>
<P>
There follow a number of lines starting with a hyphen. These can appear in any
order, and are omitted when not relevant.
</P>
<UL>
<LI>
-<EM>auth_id <<EM>text</EM>></EM>: The id information for a message received on an
authenticated SMTP connection -- the value of the $<EM>authenticated_id</EM>
variable.
<LI>
-<EM>auth_sender <<EM>address</EM>></EM>: The address of an authenticated sender -- the
value of the $<EM>authenticated_sender</EM> variable.
<LI>
-<EM>body_linecount <<EM>number</EM>></EM>: This records the number of lines in the body of
the message, and is always present.
<LI>
-<EM>deliver_firsttime</EM>: This is written when a new message is first added to the
spool. When the spool file is updated after a deferral, it is omitted.
<LI>
<A NAME="IDX2015"></A>
-<EM>frozen <<EM>time</EM>></EM>: The message is frozen, and the freezing happened at
<<EM>time</EM>>. No deliveries will be attempted while the message remains frozen, but
the <EM>auto_thaw</EM> configuration option can specify a time delay after which a
delivery will be attempted.
<LI>
-<EM>helo_name <<EM>text</EM>></EM>: This records the host name as specified by a remote
host in a HELO or EHLO command.
<LI>
-<EM>host_auth <<EM>text</EM>></EM>: If the message was received on an authenticated SMTP
connection, this records the name of the authenticator -- the value of the
$<EM>sender_host_authenticated</EM> variable.
<LI>
-<EM>host_lookup_failed</EM>: This is present if an attempt to look up the sending
host's name from its IP address failed. It corresponds to the
$<EM>host_lookup_failed</EM> variable.
<LI>
<A NAME="IDX2016"></A>
<A NAME="IDX2017"></A>
-<EM>host_name <<EM>text</EM>></EM>: This records the name of the remote host from which the
message was received, if the host name was looked up from the IP address. It is
not present if no reverse lookup was done.
<LI>
<font color=green>
-<EM>host_address <<EM>address</EM>>.<<EM>port</EM>></EM>: This records the IP address of the remote
host from which the message was received and the remote port number that was
used. It is omitted for locally generated messages.
</font>
<LI>
-<EM>ident <<EM>text</EM>></EM>: For locally submitted messages, this records the login of
the originating user, unless it was a trusted user and the -<EM>oMt</EM> option was
used to specify an ident value. For messages received over TCP/IP, this records
the ident string supplied by the remote host.
<LI>
-<EM>interface_address <<EM>address</EM>></EM>: This records the IP address of the local
interface through which a message was received from a remote host. It is
omitted for locally generated messages.
<LI>
-<EM>local</EM>: The message is from a local sender.
<LI>
-<EM>localerror</EM>: The message is a locally-generated delivery error report.
<LI>
-<EM>manual_thaw</EM>: The message was frozen but has been thawed manually, that is,
by an explicit Exim command rather than via the auto-thaw process.
<LI>
<font color=green>
-<EM>N</EM>: A testing delivery process was started using the -<EM>N</EM> option to suppress
any actual deliveries, but delivery was deferred. At the next delivery attempt,
-<EM>N</EM> is assumed.
</font>
<LI>
-<EM>received_protocol</EM>: This records the value of the $<EM>received_protocol</EM>
variable, which contains the name of the protocol by which the message was
received.
<LI>
-<EM>resent</EM>: The message contains <TT>`Resent-'</TT> headers, so the alternative set of
header names is to be used (see RFC 822).
<LI>
<font color=green>
-<EM>sender_set_untrusted</EM>: The envelope sender of this message was set by an
untrusted local caller (used to ensure that the caller is displayed in queue
listings).
<LI>
-<EM>tls_cipher <<EM>cipher name</EM>></EM>: When the message was received over an
encrypted channel, this records the name of the cipher that was used.
<LI>
-<EM>tls_peerdn <<EM>peer DN</EM>></EM>: When the message was received over an encrypted
channel, and a certificate was requested from the client, this records the
Distinguished Name from that certificate.
</font>
<LI>
-<EM>user_null_sender</EM>: The message was received from an unprivileged user with
the -<EM>f</EM> option specifying `<>' as the sender.
</UL>
<P>
Following the options are those addresses to which the message is not to be
delivered. This set of addresses is initialized from the command line
when the -<EM>t</EM> option is used
and <EM>extract_addresses_remove_arguments</EM> is set;
otherwise it starts out empty. Whenever a successful delivery is made, the
address is added to this set. The addresses are kept internally as a balanced
binary tree, and it is a representation of that tree which is written to the
spool file. If an address is expanded via an alias or forward file, the
original address is added to the tree when deliveries to all its child
addresses are completed.
</P>
<P>
If the tree is empty, there is a single line in the spool file containing just
the text `XX'. Otherwise, each line consists of two letters, which are either Y
or N, followed by an address. The address is the value for the node of the
tree, and the letters indicate whether the node has a left branch and/or a
right branch attached to it, respectively. If branches exist, they immediately
follow. Here is an example of a three-node tree:
<PRE>
YY darcy@austen.fict.book
NN alice@wonderland.fict.book
NN editor@thesaurus.ref.book
</PRE>
<P>
After the non-recipients tree, there is a list of the message's recipients.
This is a simple list, preceded by a count. It includes all the original
recipients of the message, including those to whom the message has already been
delivered.
In the simplest case, the list contains one address per line.
For example:
<PRE>
4
editor@thesaurus.ref.book
darcy@austen.fict.book
rdo@foundation
alice@wonderland.fict.book
</PRE>
<P>
However, when a child address has been added to the top-level addresses as a
result of the use of the <EM>one_time</EM> option on an <EM>aliasfile</EM> or <EM>forwardfile</EM>
director, each line is of the following form:
<PRE>
<<EM>top-level address</EM>> <<EM>flags number</EM>>,<<EM>parent number</EM>>,0
</PRE>
<P>
The flags at present contain only one bit, which is set for <EM>one_time</EM>
addresses. It indicates that <<EM>parent number</EM>> is the offset in the recipients
list of the original parent of the address. The third number of the trio is for
future expansion and is currently always zero.
A blank line separates the envelope and status information from the headers
which follow. A header may occupy several lines of the file, and to save effort
when reading it in, each header is preceded by a number and an identifying
character. The number is the number of characters in the header, including any
embedded newlines and the terminating newline. The character is one of the
following:
<PRE>
<<EM>blank</EM>> header in which Exim has no special interest
B <EM>Bcc:</EM> header
C <EM>Cc:</EM> header
F <EM>From:</EM> header
I <EM>Message-id:</EM> header
P <EM>Received:</EM> header -- P for `postmark'
R <EM>Reply-To:</EM> header
S <EM>Sender:</EM> header
T <EM>To:</EM> header
* replaced or deleted header
</PRE>
<P>
Deleted or replaced (rewritten) headers remain in the spool file for debugging
purposes. They are not transmitted when the message is delivered. When
<TT>`Resent-'</TT> headers are present, it is those headers that have the appropriate
flags. Here is a typical set of headers:
<PRE>
111P Received: by hobbit.fict.book with local (Exim 0.17 #8)
id E0tHplY-0000mG-00; Tue, 21 Nov 1995 10:17:32 +0000
049 Message-Id: <E0tHplY-0000mG-00@hobbit.fict.book>
038* X-rewrote-sender: bb@hobbit.fict.book
042* From: Bilbo Baggins <bb@hobbit.fict.book>
049F From: Bilbo Baggins <B.Baggins@hobbit.fict.book>
099* To: alice@wonderland.fict.book, rdo@foundation,
darcy@austen.fict.book, editor@thesaurus.ref.book
109T To: alice@wonderland.fict.book, rdo@foundation.fict.book,
darcy@austen.fict.book, editor@thesaurus.ref.book
038 Date: Tue, 21 Nov 1995 10:17:32 +0000
</PRE>
<P>
The asterisked headers indicate that the envelope sender, <EM>From:</EM> header, and
<EM>To:</EM> header have been rewritten, the last one because routing expanded the
unqualified domain <EM>foundation</EM>.
</P>
<P><HR><P>
Go to the <A HREF="spec_1.html">first</A>, <A HREF="spec_55.html">previous</A>, <A HREF="spec_57.html">next</A>, <A HREF="spec_59.html">last</A> section, <A HREF="spec_toc.html">table of contents</A>.
</BODY>
</HTML>
|