File: datefields.html

package info (click to toggle)
mhonarc 2.6.24-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,020 kB
  • sloc: perl: 280,086; makefile: 11
file content (193 lines) | stat: -rw-r--r-- 6,136 bytes parent folder | download | duplicates (8)
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
<html>
<head>
<title>MHonArc Resources: DATEFIELDS</title>
<link rel="stylesheet" type="text/css" href="../docstyles.css">
</head>
<body>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="conlen.html">CONLEN</a>]</td><td><nobr>[<a href="../resources.html#datefields">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="daybegin.html">DAYBEGIN</a>]</td></tr></table>
<!--/x-rc-nav-->
<hr>
<h1>DATEFIELDS</h1>
<!--X-TOC-Start-->
<ul>
<li><a href="#syntax">Syntax</a>
<li><a href="#description">Description</a>
<li><a href="#default">Default Setting</a>
<li><a href="#rcvars">Resource Variables</a>
<li><a href="#examples">Examples</a>
<ul>
<li><small><a href="#">Using composition date</a></small>
<li><small><a href="#">Indexed fields</a></small>
</ul>
<li><a href="#version">Version</a>
<li><a href="#seealso">See Also</a>
</ul>
<!--X-TOC-End-->

<!-- *************************************************************** -->
<hr>
<h2><a name="syntax">Syntax</a></h2>

<dl>

<dt><strong>Envariable</strong></dt>
<dd><p><br>
<code>M2H_DATEFIELDS=</code><var>field1</var><code>:</code><var
>field2</var><code>:</code><var>...</var><code>:</code><var
>fieldN</var>
</p>
</dd>

<dt><strong>Element</strong></dt>
<dd><p>
<code>&lt;DATEFIELDS&gt;</code><br>
<var>field1</var><code>:</code><var
>field2</var><code>:</code><var>...</var><code>:</code><var
>fieldN</var><br>
<code>&lt;/DATEFIELDS&gt;</code><br>
</p>
</dd>

<dt><strong>Command-line Option</strong></dt>
<dd><p>
<code>-datefields </code><var>field1</var><code>:</code><var
>field2</var><code>:</code><var>...</var><code>:</code><var
>fieldN</var>
</p>
</dd>

</dl>

<!-- *************************************************************** -->
<hr>
<h2><a name="description">Description</a></h2>

<p>DATEFIELDS specify the message header fields mhonarc will search to
determine the dates of messages.  Each field will be checked in
the ordered specified.
</p>
<p>The value of the DATEFIELDS is a colon separated
list of message header fields to check.  Since it is legal for
multiple fields with the same name to appear in a message header
(e.g. <tt>Received</tt>), indexed fields are supported.  For example,
</p>
<pre class="code">
<b>&lt;DateFields&gt;</b>
received[1]:received[0]:date
<b>&lt;/DateFields&gt;</b>
</pre>
<p>The example says that mhonarc should check the second received
field, then the first received field, and then the first date field
to determine the date of a message.
</p>
<p>Indexing starts at 0.  I.e. An index of 0 denotes the first
occurrence of the field, 1 denotes the second, etc.
If no integer index is specified, then 0 is used.
</p>

<!-- *************************************************************** -->
<hr>
<h2><a name="default">Default Setting</a></h2>

<pre class="code">
received:date
</pre>

<!-- *************************************************************** -->
<hr>
<h2><a name="rcvars">Resource Variables</a></h2>

<p>N/A
</p>

<!-- *************************************************************** -->
<hr>
<h2><a name="examples">Examples</a></h2>

<h3>Using composition date</h3>
<p>By default. mhonarc looks at the <tt>Received</tt> fields of
a message to determine a message's date.  This tends to be more
accurate as it tells when the message was actually received (it is
better to trust a date/time you have control over vs what the sender
has control over).  However, you may want to have the date based
upon the time the sender composed the message.  The <tt>Date</tt>
field usually reflects the composition date.  Therefore, the following
setting can be used:
</p>
<pre class="code">
<b>&lt;DateFields&gt;</b>
date:received
<b>&lt;/DateFields&gt;</b>
</pre>

<h3>Indexed fields</h3>
<p>Specified indexed fields can be used if mail you archive is known to
following a specific delivery path.  Here is an example
scenario:
</p>
<ol>
<li>All incoming mail is first delivered to a central POP mail server
    of our ISP.</li>
<li><a href="http://www.tuxedo.org/~esr/fetchmail/"><tt>fetchmail</tt></a>
    is used to download the mail from the POP server to our local
    SMTP server.</li>
<li>The local SMTP server delivers the mail to a local user account that
    is used to archive the mail.</li>
</ol>

<p>With this scenario, we prefer to use the date stamp from the ISP
server since our local system may not always be up.  Each step above
causes a <tt>Received</tt> header field to be added to the message.
Since <tt>Received</tt> fields are listed from final delivery point to
starting delivery point (i.e. each step inserts a <tt>Received</tt>
field above existing header fields), we want to base the message
date on the 3rd <tt>Received</tt> field (the one created by the
ISP mail server).  Hence, DATEFIELDS shall be set to the following:
</p>
<pre class="code">
<b>&lt;DateFields&gt;</b>
received[2]:received[1]:received[0]:date
<b>&lt;/DateFields&gt;</b>
</pre>
<p>We still specify fallback fields just-in-case.
</p>


<!-- *************************************************************** -->
<hr>
<h2><a name="version">Version</a></h2>

<p>2.1.1
</p>

<!-- *************************************************************** -->
<hr>
<h2><a name="seealso">See Also</a></h2>

<p>
<a href="fromfields.html">FROMFIELDS</a>
</p>

<!-- *************************************************************** -->
<hr>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="conlen.html">CONLEN</a>]</td><td><nobr>[<a href="../resources.html#datefields">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="daybegin.html">DAYBEGIN</a>]</td></tr></table>
<!--/x-rc-nav-->
<hr>
<address>
$Date: 2003/10/06 22:04:16 $ <br>
<img align="top" src="../monicon.png" alt="">
<a href="http://www.mhonarc.org/"
><strong>MHonArc</strong></a><br>
Copyright &#169; 1998,2002, <a href="http://www.earlhood.com/"
>Earl Hood</a>, <a href="mailto:mhonarc&#37;40mhonarc.org"
>mhonarc<!--
-->&#64;<!--
-->mhonarc.org</a><br>
</address>

</body>
</html>