Fix whitespace and formatting of the manpage XML source

This commit is contained in:
Nikolaus Schulz 2011-07-05 23:43:12 +02:00
parent 88653766db
commit 947be25f82
1 changed files with 238 additions and 158 deletions

View File

@ -59,51 +59,52 @@
<para> <para>
<command>archivemail</command> is a tool for archiving and compressing old <command>archivemail</command> is a tool for archiving and compressing old
email in mailboxes. email in mailboxes.
By default it will read the mailbox <replaceable>MAILBOX</replaceable>, moving messages By default it will read the mailbox <replaceable>MAILBOX</replaceable>, moving
that are older than the specified number of days (180 by default) to a messages that are older than the specified number of days (180 by default) to
&mbox;-format mailbox in the same directory that is compressed a &mbox;-format mailbox in the same directory that is compressed with &gzip;.
with &gzip;.
It can also just delete old email rather than archive it. It can also just delete old email rather than archive it.
</para> </para>
<para> <para>
By default, <command>archivemail</command> derives the archive filename from the By default, <command>archivemail</command> derives the archive filename from
mailbox name by appending an <filename>_archive</filename> suffix to the mailbox the mailbox name by appending an <filename>_archive</filename> suffix to the
name. For example, if you run <command>archivemail</command> on a mailbox called mailbox name. For example, if you run <command>archivemail</command> on a
<filename>exsouthrock</filename>, the archive will be created with the mailbox called <filename>exsouthrock</filename>, the archive will be created
filename <filename>exsouthrock_archive.gz</filename>. with the filename <filename>exsouthrock_archive.gz</filename>.
This default behavior can be overridden with command line options, choosing This default behavior can be overridden with command line options, choosing
a custom suffix, a prefix, or a completely custom name for the archive. a custom suffix, a prefix, or a completely custom name for the archive.
</para> </para>
<para> <para>
<command>archivemail</command> supports reading <acronym>IMAP</acronym>, <command>archivemail</command> supports reading <acronym>IMAP</acronym>,
<acronym>Maildir</acronym>, <acronym>MH</acronym> and <acronym>mbox</acronym>-format <acronym>Maildir</acronym>, <acronym>MH</acronym> and
mailboxes, but always writes <acronym>mbox</acronym>-format archives. <acronym>mbox</acronym>-format mailboxes, but always writes
<acronym>mbox</acronym>-format archives.
</para> </para>
<para> <para>
Messages that are flagged important are not archived or deleted unless Messages that are flagged important are not archived or deleted unless
explicitly requested with the <option>--include-flagged</option> option. explicitly requested with the <option>--include-flagged</option> option.
Also, <command>archivemail</command> can be configured not to archive unread mail, or Also, <command>archivemail</command> can be configured not to archive unread
to only archive messages larger than a specified size. mail, or to only archive messages larger than a specified size.
</para> </para>
<para> <para>
To archive an <acronym>IMAP</acronym>-format mailbox, use the format To archive an <acronym>IMAP</acronym>-format mailbox, use the format
<replaceable>imap://username:password@server/mailbox <replaceable>imap://username:password@server/mailbox </replaceable> to specify
</replaceable> to specify the mailbox. the mailbox.
<command>archivemail</command> will expand wildcards in <acronym>IMAP</acronym> mailbox <command>archivemail</command> will expand wildcards in
names according to <citation><acronym>RFC</acronym> 3501</citation>, which says: <acronym>IMAP</acronym> mailbox names according to
<quote>The character "*" is a wildcard, and matches zero or more characters at this <citation><acronym>RFC</acronym> 3501</citation>, which says: <quote>The
character "*" is a wildcard, and matches zero or more characters at this
position. The character "%" is similar to "*", but it does not match a position. The character "%" is similar to "*", but it does not match a
hierarchy delimiter.</quote> hierarchy delimiter.</quote>
You can omit the password from the <acronym>URL</acronym>; use the You can omit the password from the <acronym>URL</acronym>; use the
<option>--pwfile</option> option to make <command>archivemail</command> read the <option>--pwfile</option> option to make <command>archivemail</command> read
password from a file, or alternatively just enter it upon request. the password from a file, or alternatively just enter it upon request.
If the <option>--pwfile</option> option is set, <command>archivemail</command> does not If the <option>--pwfile</option> option is set, <command>archivemail</command>
look for a password in the <acronym>URL</acronym>, and the colon is not considered a does not look for a password in the <acronym>URL</acronym>, and the colon is
delimiter. not considered a delimiter.
Substitute <replaceable>imap</replaceable> with Substitute <replaceable>imap</replaceable> with
<replaceable>imaps</replaceable>, and <command>archivemail</command> will <replaceable>imaps</replaceable>, and <command>archivemail</command> will
establish a secure <acronym>SSL</acronym> connection. establish a secure <acronym>SSL</acronym> connection.
@ -119,8 +120,8 @@ See below for more <acronym>IMAP</acronym> peculiarities.
<varlistentry> <varlistentry>
<term><option>-d <replaceable>NUM</replaceable></option></term> <term><option>-d <replaceable>NUM</replaceable></option></term>
<term><option>--days=<replaceable>NUM</replaceable></option></term> <term><option>--days=<replaceable>NUM</replaceable></option></term>
<listitem><para>Archive messages older than <replaceable>NUM</replaceable> days. <listitem><para>Archive messages older than <replaceable>NUM</replaceable>
The default is 180. This option is incompatible with the days. The default is 180. This option is incompatible with the
<option>--date</option> option below. <option>--date</option> option below.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@ -140,9 +141,9 @@ This option is incompatible with the <option>--days</option> option above.
<varlistentry> <varlistentry>
<term><option>-o <replaceable>PATH</replaceable></option></term> <term><option>-o <replaceable>PATH</replaceable></option></term>
<term><option>--output-dir=<replaceable>PATH</replaceable></option></term> <term><option>--output-dir=<replaceable>PATH</replaceable></option></term>
<listitem><para>Use the directory name <replaceable>PATH</replaceable> to store the <listitem><para>Use the directory name <replaceable>PATH</replaceable> to
mailbox archives. The default is the same directory as the mailbox to be store the mailbox archives. The default is the same directory as the mailbox
read. to be read.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@ -171,8 +172,8 @@ For <acronym>IMAP</acronym> wizards.
<listitem><para>Prefix <replaceable>NAME</replaceable> to the archive name. <listitem><para>Prefix <replaceable>NAME</replaceable> to the archive name.
<replaceable>NAME</replaceable> is expanded by the &python; function <replaceable>NAME</replaceable> is expanded by the &python; function
<function>time.strftime()</function>, which means that you can specify special <function>time.strftime()</function>, which means that you can specify special
directives in <replaceable>NAME</replaceable> to make an archive named after the archive directives in <replaceable>NAME</replaceable> to make an archive named after
cut-off date. the archive cut-off date.
See the discussion of the <option>--suffix</option> option for a list of valid See the discussion of the <option>--suffix</option> option for a list of valid
<function>strftime()</function> directives. <function>strftime()</function> directives.
The default is not to add a prefix. The default is not to add a prefix.
@ -183,70 +184,139 @@ The default is not to add a prefix.
<term><option>-s <replaceable>NAME</replaceable></option></term> <term><option>-s <replaceable>NAME</replaceable></option></term>
<term><option>--suffix=<replaceable>NAME</replaceable></option></term> <term><option>--suffix=<replaceable>NAME</replaceable></option></term>
<listitem><para> <listitem><para>
Use the suffix <replaceable>NAME</replaceable> to create the filename used for archives. Use the suffix <replaceable>NAME</replaceable> to create the filename used for
The default is <filename>_archive</filename>, unless a prefix is specified. archives. The default is <filename>_archive</filename>, unless a prefix is
specified.
</para> </para>
<para> <para>
Like a prefix, the suffix <replaceable>NAME</replaceable> is expanded by the &python; Like a prefix, the suffix <replaceable>NAME</replaceable> is expanded by the
function <function>time.strftime()</function> with the archive cut-off date. &python; function <function>time.strftime()</function> with the archive
<function>time.strftime()</function> understands the following directives: cut-off date. <function>time.strftime()</function> understands the following
directives:
<variablelist id="strftime"> <variablelist id="strftime">
<varlistentry><term><code>%a</code></term> <varlistentry><term><code>%a</code></term>
<listitem><simpara>Locale's abbreviated weekday name.</simpara></listitem></varlistentry> <listitem><simpara>
Locale's abbreviated weekday name.
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%A</code></term> <varlistentry><term><code>%A</code></term>
<listitem><simpara>Locale's full weekday name.</simpara></listitem></varlistentry> <listitem><simpara>
Locale's full weekday name.
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%b</code></term> <varlistentry><term><code>%b</code></term>
<listitem><simpara>Locale's abbreviated month name.</simpara></listitem></varlistentry> <listitem><simpara>
Locale's abbreviated month name.
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%B</code></term> <varlistentry><term><code>%B</code></term>
<listitem><simpara>Locale's full month name.</simpara></listitem></varlistentry> <listitem><simpara>
Locale's full month name.
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%c</code></term> <varlistentry><term><code>%c</code></term>
<listitem><simpara>Locale's appropriate date and time representation.</simpara></listitem></varlistentry> <listitem><simpara>
Locale's appropriate date and time representation.
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%d</code></term> <varlistentry><term><code>%d</code></term>
<listitem><simpara>Day of the month as a decimal number [01,31].</simpara></listitem></varlistentry> <listitem><simpara>
Day of the month as a decimal number [01,31].
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%H</code></term> <varlistentry><term><code>%H</code></term>
<listitem><simpara>Hour (24-hour clock) as a decimal number [00,23].</simpara></listitem></varlistentry> <listitem><simpara>
Hour (24-hour clock) as a decimal number [00,23].
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%I</code></term> <varlistentry><term><code>%I</code></term>
<listitem><simpara>Hour (12-hour clock) as a decimal number [01,12].</simpara></listitem></varlistentry> <listitem><simpara>
Hour (12-hour clock) as a decimal number [01,12].
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%j</code></term> <varlistentry><term><code>%j</code></term>
<listitem><simpara>Day of the year as a decimal number [001,366].</simpara></listitem></varlistentry> <listitem><simpara>
Day of the year as a decimal number [001,366].
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%m</code></term> <varlistentry><term><code>%m</code></term>
<listitem><simpara>Month as a decimal number [01,12].</simpara></listitem></varlistentry> <listitem><simpara>
Month as a decimal number [01,12].
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%M</code></term> <varlistentry><term><code>%M</code></term>
<listitem><simpara>Minute as a decimal number [00,59].</simpara></listitem></varlistentry> <listitem><simpara>
Minute as a decimal number [00,59].
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%p</code></term> <varlistentry><term><code>%p</code></term>
<listitem><simpara>Locale's equivalent of either AM or PM.</simpara></listitem></varlistentry> <listitem><simpara>
Locale's equivalent of either AM or PM.
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%S</code></term> <varlistentry><term><code>%S</code></term>
<listitem><simpara>Second as a decimal number [00,61]. (1)</simpara></listitem></varlistentry> <listitem><simpara>
Second as a decimal number [00,61]. (1)
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%U</code></term> <varlistentry><term><code>%U</code></term>
<listitem><simpara>Week number of the year (Sunday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Sunday are considered to be in week 0.</simpara></listitem></varlistentry> <listitem><simpara>
Week number of the year (Sunday as the first day of the week)
as a decimal number [00,53]. All days in a new year preceding
the first Sunday are considered to be in week 0.
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%w</code></term> <varlistentry><term><code>%w</code></term>
<listitem><simpara>Weekday as a decimal number [0(Sunday),6].</simpara></listitem></varlistentry> <listitem><simpara>
Weekday as a decimal number [0(Sunday),6].
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%W</code></term> <varlistentry><term><code>%W</code></term>
<listitem><simpara>Week number of the year (Monday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Sunday are considered to be in week 0.</simpara></listitem></varlistentry> <listitem><simpara>
Week number of the year (Monday as the first day of the week)
as a decimal number [00,53]. All days in a new year preceding
the first Sunday are considered to be in week 0.
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%x</code></term> <varlistentry><term><code>%x</code></term>
<listitem><simpara>Locale's appropriate date representation.</simpara></listitem></varlistentry> <listitem><simpara>
Locale's appropriate date representation.
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%X</code></term> <varlistentry><term><code>%X</code></term>
<listitem><simpara>Locale's appropriate time representation.</simpara></listitem></varlistentry> <listitem><simpara>
Locale's appropriate time representation.
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%y</code></term> <varlistentry><term><code>%y</code></term>
<listitem><simpara>Year without century as a decimal number [00,99].</simpara></listitem></varlistentry> <listitem><simpara>
Year without century as a decimal number [00,99].
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%Y</code></term> <varlistentry><term><code>%Y</code></term>
<listitem><simpara>Year with century as a decimal number.</simpara></listitem></varlistentry> <listitem><simpara>
Year with century as a decimal number.
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%Z</code></term> <varlistentry><term><code>%Z</code></term>
<listitem><simpara>Time zone name (or by no characters if no time zone exists).</simpara></listitem></varlistentry> <listitem><simpara>
Time zone name (or by no characters if no time zone exists).
</simpara></listitem>
</varlistentry>
<varlistentry><term><code>%%</code></term> <varlistentry><term><code>%%</code></term>
<listitem><simpara>A literal <quote>%</quote> character.</simpara></listitem></varlistentry> <listitem><simpara>
A literal <quote>%</quote> character.
</simpara></listitem>
</varlistentry>
</variablelist> </variablelist>
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>-a <replaceable>NAME</replaceable></option></term> <term><option>-a <replaceable>NAME</replaceable></option></term>
<term><option>--archive-name=<replaceable>NAME</replaceable></option></term> <term><option>--archive-name=<replaceable>NAME</replaceable></option></term>
<listitem><para>Use <replaceable>NAME</replaceable> as the archive name, ignoring the name <listitem><para>Use <replaceable>NAME</replaceable> as the archive name,
of the mailbox that is archived. ignoring the name of the mailbox that is archived.
Like prefixes and suffixes, <replaceable>NAME</replaceable> is expanded by Like prefixes and suffixes, <replaceable>NAME</replaceable> is expanded by
<function>time.strftime()</function> with the archive cut-off date. <function>time.strftime()</function> with the archive cut-off date.
Because it hard-codes the archive name, this option cannot be used when Because it hard-codes the archive name, this option cannot be used when
@ -257,8 +327,8 @@ archiving multiple mailboxes.
<varlistentry> <varlistentry>
<term><option>-S <replaceable>NUM</replaceable></option></term> <term><option>-S <replaceable>NUM</replaceable></option></term>
<term><option>--size=<replaceable>NUM</replaceable></option></term> <term><option>--size=<replaceable>NUM</replaceable></option></term>
<listitem><para>Only archive messages that are <replaceable>NUM</replaceable> bytes or <listitem><para>Only archive messages that are <replaceable>NUM</replaceable>
greater. bytes or greater.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@ -275,11 +345,11 @@ useful for testing to see how many messages would have been archived.
<term><option>-u</option></term> <term><option>-u</option></term>
<term><option>--preserve-unread</option></term> <term><option>--preserve-unread</option></term>
<listitem><para> <listitem><para>
Do not archive any messages that have not yet been read. <command>archivemail</command> Do not archive any messages that have not yet been read.
determines if a message in a <acronym>mbox</acronym>-format or <command>archivemail</command> determines if a message in a
<acronym>MH</acronym>-format mailbox has been read by looking at the <acronym>mbox</acronym>-format or <acronym>MH</acronym>-format mailbox has
<literal>Status</literal> header (if it exists). If the status been read by looking at the <literal>Status</literal> header (if it exists).
header is equal to <quote><literal>RO</literal></quote> or If the status header is equal to <quote><literal>RO</literal></quote> or
<quote><literal>OR</literal></quote> then <command>archivemail</command> <quote><literal>OR</literal></quote> then <command>archivemail</command>
assumes the message has been read. assumes the message has been read.
<command>archivemail</command> determines if a <acronym>maildir</acronym> <command>archivemail</command> determines if a <acronym>maildir</acronym>
@ -300,8 +370,8 @@ When archiving a message from a mailbox not in <acronym>mbox</acronym>
format, by default <command>archivemail</command> mangles such lines by format, by default <command>archivemail</command> mangles such lines by
prepending a <quote><literal>&gt;</literal></quote> to them, since mail user prepending a <quote><literal>&gt;</literal></quote> to them, since mail user
agents might otherwise interpret these lines as message separators. agents might otherwise interpret these lines as message separators.
Messages from <acronym>mbox</acronym> folders are never mangled. See &mbox; for more Messages from <acronym>mbox</acronym> folders are never mangled. See &mbox;
information. for more information.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@ -322,8 +392,8 @@ Delete rather than archive old mail. Use this option with caution!
Copy rather than archive old mail. Copy rather than archive old mail.
Creates an archive, but the archived messages are not deleted from the Creates an archive, but the archived messages are not deleted from the
originating mailbox, which is left unchanged. originating mailbox, which is left unchanged.
This is a complement to the <option>--delete</option> option, and mainly useful for This is a complement to the <option>--delete</option> option, and mainly
testing purposes. useful for testing purposes.
Note that multiple passes will create duplicates, since messages are blindly Note that multiple passes will create duplicates, since messages are blindly
appended to an existing archive. appended to an existing archive.
</para></listitem> </para></listitem>
@ -380,12 +450,14 @@ Reports lots of extra debugging information about what is going on.
<option>--debug-imap=<replaceable>NUM</replaceable></option> <option>--debug-imap=<replaceable>NUM</replaceable></option>
</term> </term>
<listitem><para> <listitem><para>
Set <acronym>IMAP</acronym> debugging level. This makes <command>archivemail</command> dump its Set <acronym>IMAP</acronym> debugging level. This makes
conversation with the <acronym>IMAP</acronym> server and some internal <acronym>IMAP</acronym> <command>archivemail</command> dump its conversation with the
processing to <literal>stdout</literal>. Higher values for <replaceable>NUM</replaceable> give more <acronym>IMAP</acronym> server and some internal <acronym>IMAP</acronym>
elaborate output. Set <replaceable>NUM</replaceable> to 4 to see all exchanged processing to <literal>stdout</literal>. Higher values for
<acronym>IMAP</acronym> commands. (Actually, <replaceable>NUM</replaceable> is just passed <replaceable>NUM</replaceable> give more elaborate output. Set
literally to <literal>imaplib.Debug</literal>.) <replaceable>NUM</replaceable> to 4 to see all exchanged
<acronym>IMAP</acronym> commands. (Actually, <replaceable>NUM</replaceable>
is just passed literally to <literal>imaplib.Debug</literal>.)
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@ -394,8 +466,8 @@ literally to <literal>imaplib.Debug</literal>.)
<term><option>--quiet</option></term> <term><option>--quiet</option></term>
<listitem><para> <listitem><para>
Turns on quiet mode. Do not print any statistics about how many messages were Turns on quiet mode. Do not print any statistics about how many messages were
archived. This should be used if you are running <command>archivemail</command> from archived. This should be used if you are running
cron. <command>archivemail</command> from cron.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@ -411,7 +483,8 @@ Display the version of <command>archivemail</command> and exit.
<term><option>-h</option></term> <term><option>-h</option></term>
<term><option>--help</option></term> <term><option>--help</option></term>
<listitem><para> <listitem><para>
Display brief summary information about how to run <command>archivemail</command>. Display brief summary information about how to run
<command>archivemail</command>.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
@ -420,80 +493,85 @@ Display brief summary information about how to run <command>archivemail</command
<refsect1> <refsect1>
<title>Notes</title> <title>Notes</title>
<para> <para>
<command>archivemail</command> requires &python; version 2.3 or later. <command>archivemail</command> requires &python; version 2.3 or later.
When reading an <acronym>mbox</acronym>-format mailbox, <command>archivemail</command> will When reading an <acronym>mbox</acronym>-format mailbox,
create a lockfile with the extension <filename class="extension">.lock</filename> so that <command>archivemail</command> will create a lockfile with the extension
&procmail; will not deliver to the mailbox while it is being processed. It will <filename class="extension">.lock</filename> so that &procmail; will not
also create an advisory lock on the mailbox using &lockf;. deliver to the mailbox while it is being processed. It will also create an
The archive is locked in the same way when it is updated. advisory lock on the mailbox using &lockf;. The archive is locked in the same
<command>archivemail</command> will also complain and abort if a 3rd-party modifies the way when it is updated.
mailbox while it is being read. <command>archivemail</command> will also complain and abort if a 3rd-party
modifies the mailbox while it is being read.
</para> </para>
<para> <para>
<command>archivemail</command> will always attempt to preserve the <command>archivemail</command> will always attempt to preserve the last-access
last-access and last-modify times of the input mailbox. Archive and last-modify times of the input mailbox. Archive mailboxes are always
mailboxes are always created with a mode of <literal>0600</literal>. created with a mode of <literal>0600</literal>.
If <command>archivemail</command> finds a pre-existing archive mailbox it If <command>archivemail</command> finds a pre-existing archive mailbox it will
will append rather than overwrite that archive. append rather than overwrite that archive.
<command>archivemail</command> will refuse to operate on mailboxes that are symbolic <command>archivemail</command> will refuse to operate on mailboxes that are
links. symbolic links.
</para> </para>
<para> <para>
<command>archivemail</command> attempts to find the delivery date of a message by <command>archivemail</command> attempts to find the delivery date of a message
looking for valid dates in the following headers, in order of precedence: by looking for valid dates in the following headers, in order of precedence:
<literal>Delivery-date</literal>, <literal>Delivery-date</literal>,
<literal>Received</literal>, <literal>Received</literal>,
<literal>Resent-Date</literal> and <literal>Resent-Date</literal> and
<literal>Date</literal>. <literal>Date</literal>.
If it cannot find any valid date in these headers, it If it cannot find any valid date in these headers, it will use the
will use the last-modified file timestamp on <acronym>MH</acronym> and last-modified file timestamp on <acronym>MH</acronym> and
<acronym>Maildir</acronym> format mailboxes, or the date on the <acronym>Maildir</acronym> format mailboxes, or the date on the
<literal>From_</literal> line on <acronym>mbox</acronym>-format mailboxes. <literal>From_</literal> line on <acronym>mbox</acronym>-format mailboxes.
</para> </para>
<para> <para>
When archiving mailboxes with leading dots in the name, When archiving mailboxes with leading dots in the name,
<command>archivemail</command> will strip the dots off the archive name, so <command>archivemail</command> will strip the dots off the archive name, so
that the resulting archive file is not hidden. that the resulting archive file is not hidden.
This is not done if the <option>--prefix</option> or This is not done if the <option>--prefix</option> or
<option>--archive-name</option> option is used. <option>--archive-name</option> option is used.
Should there really be mailboxes distinguished only by leading dots in the Should there really be mailboxes distinguished only by leading dots in the
name, they will thus be archived to the same archive file by default. name, they will thus be archived to the same archive file by default.
</para> </para>
<para> <para>
A conversion from other formats to &mbox; will silently overwrite existing A conversion from other formats to &mbox; will silently overwrite existing
<literal>Status</literal> and <literal>X-Status</literal> message headers. <literal>Status</literal> and <literal>X-Status</literal> message headers.
</para> </para>
<refsect2> <refsect2>
<title><acronym>IMAP</acronym></title> <title><acronym>IMAP</acronym></title>
<para> <para>
When <command>archivemail</command> processes an <acronym>IMAP</acronym> folder, all messages When <command>archivemail</command> processes an <acronym>IMAP</acronym>
in that folder will have their <literal>\Recent</literal> flag unset, and they will folder, all messages in that folder will have their <literal>\Recent</literal>
probably not show up as <quote>new</quote> in your user agent later on. flag unset, and they will probably not show up as <quote>new</quote> in your
user agent later on.
There is no way around this, it's just how <acronym>IMAP</acronym> works. There is no way around this, it's just how <acronym>IMAP</acronym> works.
This does not apply, however, if you run <command>archivemail</command> with the options This does not apply, however, if you run <command>archivemail</command> with
<option>--dry-run</option> or <option>--copy</option>. the options <option>--dry-run</option> or <option>--copy</option>.
</para> </para>
<para> <para>
<command>archivemail</command> relies on server-side searches to determine the messages <command>archivemail</command> relies on server-side searches to determine the
that should be archived. messages that should be archived.
When matching message dates, <acronym>IMAP</acronym> servers refer to server internal When matching message dates, <acronym>IMAP</acronym> servers refer to server
message dates, and these may differ from both delivery time of a message and internal message dates, and these may differ from both delivery time of a
its <literal>Date</literal> header. message and its <literal>Date</literal> header.
Also, there exist broken servers which do not implement server side searches. Also, there exist broken servers which do not implement server side searches.
</para> </para>
<refsect3><title><acronym>IMAP</acronym> <acronym>URL</acronym>s</title> <refsect3><title><acronym>IMAP</acronym> <acronym>URL</acronym>s</title>
<para> <para>
<command>archivemail</command>'s <acronym>IMAP</acronym> <acronym>URL</acronym> parser was written <command>archivemail</command>'s <acronym>IMAP</acronym>
with the <acronym>RFC</acronym> 2882 (<citetitle>Internet Message Format</citetitle>) rules for <acronym>URL</acronym> parser was written with the <acronym>RFC</acronym> 2882
the <token>local-part</token> of email addresses in mind. (<citetitle>Internet Message Format</citetitle>) rules for the
So, rather than enforcing an <acronym>URL</acronym>-style encoding of non-<acronym>ascii</acronym> <token>local-part</token> of email addresses in mind.
and reserved characters, it allows to double-quote the username and password. So, rather than enforcing an <acronym>URL</acronym>-style encoding of
non-<acronym>ascii</acronym> and reserved characters, it allows to
double-quote the username and password.
If your username or password contains the delimiter characters If your username or password contains the delimiter characters
<quote>@</quote> or <quote>:</quote>, just quote it like this: <quote>@</quote> or <quote>:</quote>, just quote it like this:
<replaceable>imap://"username@bogus.com":"password"@imap.bogus.com/mailbox</replaceable>. <replaceable>imap://"username@bogus.com":"password"@imap.bogus.com/mailbox</replaceable>.
@ -513,14 +591,13 @@ wildcards in mailbox names.
</para> </para>
<para> <para>
<command>archivemail</command> tries to be smart when handling mailbox paths. <command>archivemail</command> tries to be smart when handling mailbox paths.
In particular, it will automatically add an <acronym>IMAP</acronym> <literal>NAMESPACE</literal> In particular, it will automatically add an <acronym>IMAP</acronym>
prefix to the mailbox path if necessary; and if you are archiving a subfolder, <literal>NAMESPACE</literal> prefix to the mailbox path if necessary; and if
you can use the slash as a path separator instead of the <acronym>IMAP</acronym> server's you are archiving a subfolder, you can use the slash as a path separator
internal representation. instead of the <acronym>IMAP</acronym> server's internal representation.
</para> </para>
</refsect3> </refsect3>
</refsect2> </refsect2>
</refsect1> </refsect1>
<refsect1> <refsect1>
@ -562,7 +639,8 @@ are older than the first of January 2002 to a compressed mailbox called
<informalexample> <informalexample>
<para> <para>
Exactly the same as the above example, using an <acronym>ISO</acronym> date format instead: Exactly the same as the above example, using an <acronym>ISO</acronym> date
format instead:
<screen> <screen>
<prompt>bash$ </prompt><userinput>archivemail --date=2002-01-01 cm-melb</userinput> <prompt>bash$ </prompt><userinput>archivemail --date=2002-01-01 cm-melb</userinput>
</screen> </screen>
@ -614,26 +692,27 @@ that are older than 90 days to compressed mailboxes in the
<informalexample> <informalexample>
<para> <para>
To archive all mails older than 180 days from the given <acronym>IMAP</acronym> To archive all mails older than 180 days from the given
<literal>INBOX</literal> to a compressed mailbox <filename>INBOX_archive.gz</filename> in the <acronym>IMAP</acronym> <literal>INBOX</literal> to a compressed mailbox
<filename>$HOME/Mail/Archive</filename> directory, quoting the password and <filename>INBOX_archive.gz</filename> in the
reading it from the environment variable <envar>PASSWORD</envar>: <filename>$HOME/Mail/Archive</filename> directory, quoting the password and
reading it from the environment variable <envar>PASSWORD</envar>:
</para> </para>
<!-- i'm open to suggestions how to avoid making such a super-long line here. --> <!-- i'm open to suggestions how to avoid making such a super-long line here. -->
<screen> <screen>
<prompt>bash$ </prompt><userinput>archivemail -o $HOME/Mail/Archive imaps://user:'"'$PASSWORD'"'@example.org/INBOX</userinput> <prompt>bash$ </prompt><userinput>archivemail -o $HOME/Mail/Archive imaps://user:'"'$PASSWORD'"'@example.org/INBOX</userinput>
</screen> </screen>
<para> <para>
Note the protected quotes. Note the protected quotes.
</para> </para>
</informalexample> </informalexample>
<informalexample> <informalexample>
<para> <para>
To archive all mails older than 180 days in subfolders of <filename To archive all mails older than 180 days in subfolders of <filename
class="directory">foo</filename> on the given <acronym>IMAP</acronym> class="directory">foo</filename> on the given <acronym>IMAP</acronym>
server to corresponding archives in the current working directory, reading server to corresponding archives in the current working directory, reading the
the password from the file <filename>~/imap-pass.txt</filename>: password from the file <filename>~/imap-pass.txt</filename>:
</para> </para>
<screen> <screen>
<prompt>bash$ </prompt><userinput>archivemail --pwfile=~/imap-pass.txt imaps://user@example.org/foo/*</userinput> <prompt>bash$ </prompt><userinput>archivemail --pwfile=~/imap-pass.txt imaps://user@example.org/foo/*</userinput>
@ -644,8 +723,8 @@ that are older than 90 days to compressed mailboxes in the
<refsect1> <refsect1>
<title>Tips</title> <title>Tips</title>
<para> <para>
Probably the best way to run <command>archivemail</command> is from your &crontab; Probably the best way to run <command>archivemail</command> is from your
file, using the <option>--quiet</option> option. &crontab; file, using the <option>--quiet</option> option.
Don't forget to try the <option>--dry-run</option> and perhaps the Don't forget to try the <option>--dry-run</option> and perhaps the
<option>--copy</option> option for non-destructive testing. <option>--copy</option> option for non-destructive testing.
</para> </para>
@ -660,11 +739,11 @@ Don't forget to try the <option>--dry-run</option> and perhaps the
<refsect1> <refsect1>
<title>Bugs</title> <title>Bugs</title>
<simpara> <simpara>
If an <acronym>IMAP</acronym> mailbox path contains slashes, the archive filename If an <acronym>IMAP</acronym> mailbox path contains slashes, the archive
will be derived from the basename of the mailbox. filename will be derived from the basename of the mailbox.
If the server's folder separator differs from the Unix slash and is used in the If the server's folder separator differs from the Unix slash and is used in
<acronym>IMAP</acronym> <acronym>URL</acronym>, however, the whole path will be considered the <acronym>IMAP</acronym> <acronym>URL</acronym>, however, the whole path
the basename of the mailbox. will be considered the basename of the mailbox.
<abbrev>E.g.</abbrev> the two <acronym>URL</acronym>s <abbrev>E.g.</abbrev> the two <acronym>URL</acronym>s
<userinput>imap://user@example.com/folder/subfolder</userinput> and <userinput>imap://user@example.com/folder/subfolder</userinput> and
<userinput>imap://user@example.com/folder.subfolder</userinput> will be <userinput>imap://user@example.com/folder.subfolder</userinput> will be
@ -673,17 +752,18 @@ archived in <filename>subfolder_archive.gz</filename> and
might refer to the same <acronym>IMAP</acronym> mailbox. might refer to the same <acronym>IMAP</acronym> mailbox.
</simpara> </simpara>
<simpara> <simpara>
<command>archivemail</command> does not support reading <acronym>MMDF</acronym> or <command>archivemail</command> does not support reading
<acronym>Babyl</acronym>-format mailboxes. In fact, it will probably think it is <acronym>MMDF</acronym> or <acronym>Babyl</acronym>-format mailboxes. In fact,
reading an <acronym>mbox</acronym>-format mailbox and cause all sorts of problems. it will probably think it is reading an <acronym>mbox</acronym>-format mailbox
and cause all sorts of problems.
</simpara> </simpara>
<simpara> <simpara>
<command>archivemail</command> is still too slow, but if you are running from &crontab; <command>archivemail</command> is still too slow, but if you are running from
you won't care. Archiving <acronym>maildir</acronym>-format mailboxes should be &crontab; you won't care. Archiving <acronym>maildir</acronym>-format
a lot quicker than <acronym>mbox</acronym>-format mailboxes since it is less mailboxes should be a lot quicker than <acronym>mbox</acronym>-format
painful for the original mailbox to be reconstructed after selective message mailboxes since it is less painful for the original mailbox to be
removal. reconstructed after selective message removal.
</simpara> </simpara>
</refsect1> </refsect1>
@ -706,8 +786,8 @@ removal.
<refsect1> <refsect1>
<title>Author</title> <title>Author</title>
<simpara> This manual page was written by Paul Rodger &lt;paul at paulrodger dot <simpara> This manual page was written by Paul Rodger &lt;paul at paulrodger
com&gt;. Updated and supplemented by Nikolaus Schulz dot com&gt;. Updated and supplemented by Nikolaus Schulz
<email>microschulz@web.de</email></simpara> <email>microschulz@web.de</email></simpara>
</refsect1> </refsect1>