Manpage: lots of cleanup and fixes in the XML and formatting

This commit is contained in:
Nikolaus Schulz 2011-03-28 23:01:24 +02:00
parent 0437ec3e8b
commit 8190e4807e
5 changed files with 223 additions and 208 deletions

View File

@ -4,9 +4,6 @@ VERSION_TAG=v$(subst .,_,$(VERSION))
TARFILE=archivemail-$(VERSION).tar.gz TARFILE=archivemail-$(VERSION).tar.gz
HTDOCS=htdocs-$(VERSION) HTDOCS=htdocs-$(VERSION)
# Path to XSLT stylesheet. Adapt to your needs.
XSLT_MAN=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
default: default:
@echo "no default target" @echo "no default target"
@ -45,8 +42,8 @@ $(HTDOCS).tgz: index.html archivemail.html RELNOTES style.css manpage.css
cd $(HTDOCS) && mv archivemail.html manpage.html cd $(HTDOCS) && mv archivemail.html manpage.html
tar czf $(HTDOCS).tgz $(HTDOCS) tar czf $(HTDOCS).tgz $(HTDOCS)
archivemail.1: archivemail.xml archivemail.1: archivemail.xml db2man.xsl
xsltproc $(XSLT_MAN) archivemail.xml xsltproc db2man.xsl archivemail.xml
archivemail.html: archivemail.xml db2html.xsl archivemail.html: archivemail.xml db2html.xsl
xsltproc --output archivemail.html \ xsltproc --output archivemail.html \

View File

@ -2,37 +2,29 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"file:///usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd" [ "file:///usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd" [
<!ENTITY lockf "<citerefentry> <!ENTITY lockf '<citerefentry>
<refentrytitle><command>lockf</command></refentrytitle> <refentrytitle><emphasis role="bold">lockf</emphasis></refentrytitle>
<manvolnum>2</manvolnum></citerefentry>"> <manvolnum>2</manvolnum></citerefentry>'>
<!ENTITY gzip "<citerefentry> <!ENTITY gzip '<citerefentry>
<refentrytitle><command>gzip</command></refentrytitle> <refentrytitle><emphasis role="bold">gzip</emphasis></refentrytitle>
<manvolnum>1</manvolnum></citerefentry>"> <manvolnum>1</manvolnum></citerefentry>'>
<!ENTITY mutt "<citerefentry> <!ENTITY procmail '<citerefentry>
<refentrytitle><command>mutt</command></refentrytitle> <refentrytitle><emphasis role="bold">procmail</emphasis></refentrytitle>
<manvolnum>1</manvolnum></citerefentry>"> <manvolnum>1</manvolnum></citerefentry>'>
<!ENTITY procmail "<citerefentry> <!ENTITY python '<citerefentry>
<refentrytitle><command>procmail</command></refentrytitle> <refentrytitle><emphasis role="bold">python</emphasis></refentrytitle>
<manvolnum>1</manvolnum></citerefentry>"> <manvolnum>1</manvolnum></citerefentry>'>
<!ENTITY python "<citerefentry> <!ENTITY crontab '<citerefentry>
<refentrytitle><command>python</command></refentrytitle> <refentrytitle><emphasis role="bold">crontab</emphasis></refentrytitle>
<manvolnum>1</manvolnum></citerefentry>"> <manvolnum>5</manvolnum></citerefentry>'>
<!ENTITY seteuid "<citerefentry> <!ENTITY mbox '<citerefentry>
<refentrytitle><command>seteuid</command></refentrytitle> <refentrytitle><emphasis role="bold"><acronym>mbox</acronym></emphasis></refentrytitle>
<manvolnum>2</manvolnum></citerefentry>"> <manvolnum>5</manvolnum></citerefentry>'>
<!ENTITY crontab "<citerefentry>
<refentrytitle><command>crontab</command></refentrytitle>
<manvolnum>5</manvolnum></citerefentry>">
<!ENTITY mbox "<citerefentry>
<refentrytitle><command>mbox</command></refentrytitle>
<manvolnum>5</manvolnum></citerefentry>">
]> ]>
<refentry> <refentry>
@ -65,9 +57,10 @@
<title>Description</title> <title>Description</title>
<para> <para>
archivemail is a tool for archiving and compressing old email in mailboxes. <command>archivemail</command> is a tool for archiving and compressing old
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 messages
that are older that the specified number of days (180 by default) to a that are older than the specified number of days (180 by default) to a
&mbox;-format mailbox in the same directory that is compressed &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.
@ -84,9 +77,9 @@ a custom suffix, a prefix, or a completely custom name for the archive.
</para> </para>
<para> <para>
<command>archivemail</command> supports reading <application>IMAP</application>, <command>archivemail</command> supports reading <acronym>IMAP</acronym>,
<application>Maildir</application>, <application>MH</application> and <application>mbox</application>-format <acronym>Maildir</acronym>, <acronym>MH</acronym> and <acronym>mbox</acronym>-format
mailboxes, but always writes <application>mbox</application>-format archives. mailboxes, but always writes <acronym>mbox</acronym>-format archives.
</para> </para>
<para> <para>
@ -97,12 +90,12 @@ mailboxes, but always writes <application>mbox</application>-format archives.
</para> </para>
<para> <para>
To archive an <application>IMAP</application>-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 the mailbox. </replaceable> to specify the mailbox.
<application>archivemail</application> will expand wildcards in <application>IMAP</application> mailbox <command>archivemail</command> will expand wildcards in <acronym>IMAP</acronym> mailbox
names according to <acronym>RFC</acronym> 3501, which says: <quote> names according to <citation><acronym>RFC</acronym> 3501</citation>, which says:
The character "*" is a wildcard, and matches zero or more characters at this <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
@ -111,9 +104,10 @@ 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> does not
look for a password in the <acronym>URL</acronym>, and the colon is not considered a look for a password in the <acronym>URL</acronym>, and the colon is not considered a
delimiter. delimiter.
Substitute '<userinput>imap</userinput>' with '<userinput>imaps</userinput>', and Substitute <replaceable>imap</replaceable> with
<command>archivemail</command> will establish a secure <acronym>SSL</acronym> connection. <replaceable>imaps</replaceable>, and <command>archivemail</command> will
See below for more <application>IMAP</application> peculiarities. establish a secure <acronym>SSL</acronym> connection.
See below for more <acronym>IMAP</acronym> peculiarities.
</para> </para>
</refsect1> </refsect1>
@ -123,9 +117,8 @@ See below for more <application>IMAP</application> peculiarities.
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term> <term><option>-d <replaceable>NUM</replaceable></option></term>
<option>-d <replaceable>NUM</replaceable>, --days=<replaceable>NUM</replaceable></option> <term><option>--days=<replaceable>NUM</replaceable></option></term>
</term>
<listitem><para>Archive messages older than <replaceable>NUM</replaceable> days. <listitem><para>Archive messages older than <replaceable>NUM</replaceable> days.
The default is 180. This option is incompatible with the The default is 180. This option is incompatible with the
<option>--date</option> option below. <option>--date</option> option below.
@ -133,21 +126,20 @@ The default is 180. This option is incompatible with the
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-D <replaceable>DATE</replaceable></option></term>
<option>-D <replaceable>DATE</replaceable>, --date=<replaceable>DATE</replaceable></option> <term><option>--date=<replaceable>DATE</replaceable></option></term>
</term>
<listitem><para>Archive messages older than <replaceable>DATE</replaceable>. <listitem><para>Archive messages older than <replaceable>DATE</replaceable>.
<replaceable>DATE</replaceable> can be a date string in ISO format (eg '2002-04-23'), <replaceable>DATE</replaceable> can be a date string in ISO format (eg
Internet format (eg '23 Apr 2002') or Internet format with full month names <quote>2002-04-23</quote>), Internet format (<abbrev>eg</abbrev> <quote>23 Apr
(eg '23 April 2002'). Two-digit years are not supported. 2002</quote>) or Internet format with full month names (<abbrev>eg</abbrev>
<quote>23 April 2002</quote>). Two-digit years are not supported.
This option is incompatible with the <option>--days</option> option above. This option is incompatible with the <option>--days</option> option above.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-o <replaceable>PATH</replaceable></option></term>
<option>-o <replaceable>PATH</replaceable>, --output-dir=<replaceable>PATH</replaceable></option> <term><option>--output-dir=<replaceable>PATH</replaceable></option></term>
</term>
<listitem><para>Use the directory name <replaceable>PATH</replaceable> to store the <listitem><para>Use the directory name <replaceable>PATH</replaceable> to store the
mailbox archives. The default is the same directory as the mailbox to be mailbox archives. The default is the same directory as the mailbox to be
read. read.
@ -155,44 +147,41 @@ read.
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-P <replaceable>FILE</replaceable></option></term>
<option>-P <replaceable>FILE</replaceable>, --pwfile=<replaceable>FILE</replaceable></option> <term><option>--pwfile=<replaceable>FILE</replaceable></option></term>
</term> <listitem><para>Read <acronym>IMAP</acronym> password from file
<listitem><para>Read <acronym>IMAP</acronym> password from file <replaceable>FILE</replaceable> <replaceable>FILE</replaceable> instead of from the command line. Note
instead of from the command line. Note that this will probably not work if you that this will probably not work if you are archiving folders from
are archiving folders from more than one IMAP account. more than one IMAP account.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-F <replaceable>STRING</replaceable></option></term>
<option>-F <replaceable>STRING</replaceable>, <term><option>--filter-append=<replaceable>STRING</replaceable></option></term>
--filter-append=<replaceable>STRING</replaceable></option> <listitem><para>Append <replaceable>STRING</replaceable> to the
</term> <acronym>IMAP</acronym> filter string.
<listitem><para>Append <replaceable>STRING</replaceable> to the <acronym>IMAP</acronym> filter string.
For <acronym>IMAP</acronym> wizards. For <acronym>IMAP</acronym> wizards.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-p <replaceable>NAME</replaceable></option></term>
<option>-p <replaceable>NAME</replaceable>, --prefix=<replaceable>NAME</replaceable></option> <term><option>--prefix=<replaceable>NAME</replaceable></option></term>
</term>
<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
<application>time.strftime()</application>, 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 the archive
cut-off date. 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
<application>strftime()</application> directives. <function>strftime()</function> directives.
The default is not to add a prefix. The default is not to add a prefix.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-s <replaceable>NAME</replaceable></option></term>
<option>-s <replaceable>NAME</replaceable>, --suffix=<replaceable>NAME</replaceable></option> <term><option>--suffix=<replaceable>NAME</replaceable></option></term>
</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 archives.
The default is <filename>_archive</filename>, unless a prefix is specified. The default is <filename>_archive</filename>, unless a prefix is specified.
@ -200,85 +189,82 @@ The default is <filename>_archive</filename>, unless a prefix is specified.
<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 &python;
function <application>time.strftime()</application> with the archive cut-off date. function <function>time.strftime()</function> with the archive cut-off date.
<application>time.strftime()</application> understands the following directives: <function>time.strftime()</function> understands the following directives:
<itemizedlist mark='none'> <variablelist id="strftime">
<listitem><para><option>%a</option> <varlistentry><term><code>%a</code></term>
Locale's abbreviated weekday name.</para></listitem> <listitem><simpara>Locale's abbreviated weekday name.</simpara></listitem></varlistentry>
<listitem><para><option>%A</option> <varlistentry><term><code>%A</code></term>
Locale's full weekday name.</para></listitem> <listitem><simpara>Locale's full weekday name.</simpara></listitem></varlistentry>
<listitem><para><option>%b</option> <varlistentry><term><code>%b</code></term>
Locale's abbreviated month name.</para></listitem> <listitem><simpara>Locale's abbreviated month name.</simpara></listitem></varlistentry>
<listitem><para><option>%B</option> <varlistentry><term><code>%B</code></term>
Locale's full month name.</para></listitem> <listitem><simpara>Locale's full month name.</simpara></listitem></varlistentry>
<listitem><para><option>%c</option> <varlistentry><term><code>%c</code></term>
Locale's appropriate date and time representation.</para></listitem> <listitem><simpara>Locale's appropriate date and time representation.</simpara></listitem></varlistentry>
<listitem><para><option>%d</option> <varlistentry><term><code>%d</code></term>
Day of the month as a decimal number [01,31].</para></listitem> <listitem><simpara>Day of the month as a decimal number [01,31].</simpara></listitem></varlistentry>
<listitem><para><option>%H</option> <varlistentry><term><code>%H</code></term>
Hour (24-hour clock) as a decimal number [00,23].</para></listitem> <listitem><simpara>Hour (24-hour clock) as a decimal number [00,23].</simpara></listitem></varlistentry>
<listitem><para><option>%I</option> <varlistentry><term><code>%I</code></term>
Hour (12-hour clock) as a decimal number [01,12].</para></listitem> <listitem><simpara>Hour (12-hour clock) as a decimal number [01,12].</simpara></listitem></varlistentry>
<listitem><para><option>%j</option> <varlistentry><term><code>%j</code></term>
Day of the year as a decimal number [001,366].</para></listitem> <listitem><simpara>Day of the year as a decimal number [001,366].</simpara></listitem></varlistentry>
<listitem><para><option>%m</option> <varlistentry><term><code>%m</code></term>
Month as a decimal number [01,12].</para></listitem> <listitem><simpara>Month as a decimal number [01,12].</simpara></listitem></varlistentry>
<listitem><para><option>%M</option> <varlistentry><term><code>%M</code></term>
Minute as a decimal number [00,59].</para></listitem> <listitem><simpara>Minute as a decimal number [00,59].</simpara></listitem></varlistentry>
<listitem><para><option>%p</option> <varlistentry><term><code>%p</code></term>
Locale's equivalent of either AM or PM.</para></listitem> <listitem><simpara>Locale's equivalent of either AM or PM.</simpara></listitem></varlistentry>
<listitem><para><option>%S</option> <varlistentry><term><code>%S</code></term>
Second as a decimal number [00,61]. (1)</para></listitem> <listitem><simpara>Second as a decimal number [00,61]. (1)</simpara></listitem></varlistentry>
<listitem><para><option>%U</option> <varlistentry><term><code>%U</code></term>
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.</para></listitem> <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><para><option>%w</option> <varlistentry><term><code>%w</code></term>
Weekday as a decimal number [0(Sunday),6].</para></listitem> <listitem><simpara>Weekday as a decimal number [0(Sunday),6].</simpara></listitem></varlistentry>
<listitem><para><option>%W</option> <varlistentry><term><code>%W</code></term>
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.</para></listitem> <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><para><option>%x</option> <varlistentry><term><code>%x</code></term>
Locale's appropriate date representation.</para></listitem> <listitem><simpara>Locale's appropriate date representation.</simpara></listitem></varlistentry>
<listitem><para><option>%X</option> <varlistentry><term><code>%X</code></term>
Locale's appropriate time representation.</para></listitem> <listitem><simpara>Locale's appropriate time representation.</simpara></listitem></varlistentry>
<listitem><para><option>%y</option> <varlistentry><term><code>%y</code></term>
Year without century as a decimal number [00,99].</para></listitem> <listitem><simpara>Year without century as a decimal number [00,99].</simpara></listitem></varlistentry>
<listitem><para><option>%Y</option> <varlistentry><term><code>%Y</code></term>
Year with century as a decimal number.</para></listitem> <listitem><simpara>Year with century as a decimal number.</simpara></listitem></varlistentry>
<listitem><para><option>%Z</option> <varlistentry><term><code>%Z</code></term>
Time zone name (or by no characters if no time zone exists).</para></listitem> <listitem><simpara>Time zone name (or by no characters if no time zone exists).</simpara></listitem></varlistentry>
<listitem><para><option>%%</option> <varlistentry><term><code>%%</code></term>
A literal "%" character.</para></listitem> <listitem><simpara>A literal <quote>%</quote> character.</simpara></listitem></varlistentry>
</itemizedlist> </variablelist>
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-a <replaceable>NAME</replaceable></option></term>
<option>-a <replaceable>NAME</replaceable>, --archive-name=<replaceable>NAME</replaceable></option> <term><option>--archive-name=<replaceable>NAME</replaceable></option></term>
</term>
<listitem><para>Use <replaceable>NAME</replaceable> as the archive name, ignoring the name <listitem><para>Use <replaceable>NAME</replaceable> as the archive name, ignoring the name
of the mailbox that is archived. 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
<application>strftime()</application> 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
archiving multiple mailboxes. archiving multiple mailboxes.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-S <replaceable>NUM</replaceable></option></term>
<option>-S <replaceable>NUM</replaceable>, --size=<replaceable>NUM</replaceable></option> <term><option>--size=<replaceable>NUM</replaceable></option></term>
</term>
<listitem><para>Only archive messages that are <replaceable>NUM</replaceable> bytes or <listitem><para>Only archive messages that are <replaceable>NUM</replaceable> bytes or
greater. greater.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-n</option></term>
<option>-n, --dry-run</option> <term><option>--dry-run</option></term>
</term>
<listitem><para> <listitem><para>
Don't write to any files -- just show what would have been done. This is Don't write to any files -- just show what would have been done. This is
useful for testing to see how many messages would have been archived. useful for testing to see how many messages would have been archived.
@ -286,18 +272,19 @@ useful for testing to see how many messages would have been archived.
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-u</option></term>
<option>-u, --preserve-unread</option> <term><option>--preserve-unread</option></term>
</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. <command>archivemail</command>
determines if a message in a <application>mbox</application>-format or determines if a message in a <acronym>mbox</acronym>-format or
<application>MH</application>-format mailbox has been read by looking at the <acronym>MH</acronym>-format mailbox has been read by looking at the
<application>Status</application> header (if it exists). If the status <literal>Status</literal> header (if it exists). If the status
header is equal to 'RO' or 'OR' then <application>archivemail</application> assumes the header is equal to <quote><literal>RO</literal></quote> or
message has been read. <command>archivemail</command> determines if a <quote><literal>OR</literal></quote> then <command>archivemail</command>
<application>maildir</application> message has assumes the message has been read.
been read by looking at the filename. If the filename contains an 'S' after <command>archivemail</command> determines if a <acronym>maildir</acronym>
message has been read by looking at the filename.
If the filename contains an <quote><literal>S</literal></quote> after
<filename>:2,</filename> then it assumes the message has been read. <filename>:2,</filename> then it assumes the message has been read.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@ -307,11 +294,13 @@ been read by looking at the filename. If the filename contains an 'S' after
<option>--dont-mangle</option> <option>--dont-mangle</option>
</term> </term>
<listitem><para> <listitem><para>
Do not mangle lines in message bodies beginning with "From ". When archiving Do not mangle lines in message bodies beginning with
a message from a mailbox not in <application>mbox</application> format, by default <quote><literal>From&nbsp;</literal></quote>.
<command>archivemail</command> mangles such lines by prepending a '>' to them, since mail When archiving a message from a mailbox not in <acronym>mbox</acronym>
user agents might otherwise interpret these lines as message separators. format, by default <command>archivemail</command> mangles such lines by
Messages from <application>mbox</application> folders are never mangled. See &mbox; for more prepending a <quote><literal>&gt;</literal></quote> to them, since mail user
agents might otherwise interpret these lines as message separators.
Messages from <acronym>mbox</acronym> folders are never mangled. See &mbox; for more
information. information.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@ -374,14 +363,13 @@ Do not compress any archives.
<option>--warn-duplicate</option> <option>--warn-duplicate</option>
</term> </term>
<listitem><para> <listitem><para>
Warn about duplicate <application>Message-ID</application>s that appear in the input Warn about duplicate <literal>Message-ID</literal>s that appear in the input
mailbox.</para></listitem> mailbox.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-v</option></term>
<option>-v, --verbose</option> <term><option>--verbose</option></term>
</term>
<listitem><para> <listitem><para>
Reports lots of extra debugging information about what is going on. Reports lots of extra debugging information about what is going on.
</para></listitem> </para></listitem>
@ -402,9 +390,8 @@ literally to <literal>imaplib.Debug</literal>.)
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-q</option></term>
<option>-q, --quiet</option> <term><option>--quiet</option></term>
</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 <command>archivemail</command> from
@ -413,18 +400,16 @@ cron.
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-V</option></term>
<option>-V, --version</option> <term><option>--version</option></term>
</term>
<listitem><para> <listitem><para>
Display the version of <command>archivemail</command> and exit. Display the version of <command>archivemail</command> and exit.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term><option>-h</option></term>
<option>-h, --help</option> <term><option>--help</option></term>
</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>
@ -437,9 +422,9 @@ Display brief summary information about how to run <command>archivemail</command
<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 <application>mbox</application>-format mailbox, <command>archivemail</command> will When reading an <acronym>mbox</acronym>-format mailbox, <command>archivemail</command> will
create a lockfile with the extension <filename>.lock</filename> so that create a lockfile with the extension <filename class="extension">.lock</filename> so that
procmail will not deliver to the mailbox while it is being processed. It will &procmail; will not deliver to the mailbox while it is being processed. It will
also create an advisory lock on the mailbox using &lockf;. also create an advisory lock on the mailbox using &lockf;.
The archive is locked in the same way when it is updated. The archive is locked in the same way when it is updated.
<command>archivemail</command> will also complain and abort if a 3rd-party modifies the <command>archivemail</command> will also complain and abort if a 3rd-party modifies the
@ -449,7 +434,7 @@ mailbox while it is being read.
<para> <para>
<command>archivemail</command> will always attempt to preserve the <command>archivemail</command> will always attempt to preserve the
last-access and last-modify times of the input mailbox. Archive last-access and last-modify times of the input mailbox. Archive
mailboxes are always created with a mode of <application>0600</application>. mailboxes are always 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 append rather than overwrite that archive. will 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 symbolic
@ -459,19 +444,19 @@ links.
<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 by
looking for valid dates in the following headers, in order of precedence: looking for valid dates in the following headers, in order of precedence:
<application>Delivery-date</application>, <literal>Delivery-date</literal>,
<application>Received</application>, <literal>Received</literal>,
<application>Resent-Date</application> and <literal>Resent-Date</literal> and
<application>Date</application>. <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 last-modified file timestamp on <application>MH</application> and will use the last-modified file timestamp on <acronym>MH</acronym> and
<application>Maildir</application> format mailboxes, or the date on the <acronym>Maildir</acronym> format mailboxes, or the date on the
<application>From</application> line on <application>mbox</application>-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,
<application>archivemail</application> 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.
@ -481,39 +466,37 @@ will use the last-modified file timestamp on <application>MH</application> and
<para> <para>
A conversion from other formats to &mbox; will silently overwrite existing A conversion from other formats to &mbox; will silently overwrite existing
<application>Status</application> and <application>X-Status</application> 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 <application>IMAP</application> folder, all messages When <command>archivemail</command> processes an <acronym>IMAP</acronym> folder, all messages
in that folder will have their <literal>\Recent</literal> flag unset, and they will in that folder will have their <literal>\Recent</literal> flag unset, and they will
probably not show up as 'new' in your user agent later on. probably not show up as <quote>new</quote> in your user agent later on.
There is no way around this, it's just how <application>IMAP</application> 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 the options
<option>--dry-run</option> or <option>--copy</option>. <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 messages
that should be archived. that should be archived.
When matching message dates, <application>IMAP</application> servers refer to server internal When matching message dates, <acronym>IMAP</acronym> servers refer to server internal
message dates, and these may differ from both delivery time of a message and message dates, and these may differ from both delivery time of a message and
its <application>Date</application> header. 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>URLS</acronym></title> <refsect3><title><acronym>IMAP</acronym> <acronym>URL</acronym>s</title>
<para> <para>
<command>archivemail</command>'s <application>IMAP</application> <acronym>URL</acronym> parser was written <command>archivemail</command>'s <acronym>IMAP</acronym> <acronym>URL</acronym> parser was written
with the <acronym>RFC</acronym> 2882 (<citetitle>Internet Message with the <acronym>RFC</acronym> 2882 (<citetitle>Internet Message Format</citetitle>) rules for
Format</citetitle>) rules for the <token>local-part</token> of email addresses the <token>local-part</token> of email addresses in mind.
in mind.
So, rather than enforcing an <acronym>URL</acronym>-style encoding of non-<acronym>ascii</acronym> 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. and reserved characters, it allows to double-quote the username and password.
If your username or password contains the delimiter characters '@' or ':', just If your username or password contains the delimiter characters
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>imap://"username@bogus.com":"password"@imap.bogus.com/mailbox</replaceable>.
</replaceable>.
You can use a backslash to escape double-quotes that are part of a quoted You can use a backslash to escape double-quotes that are part of a quoted
username or password. username or password.
Note that quoting only a substring will not work, and be aware that your shell Note that quoting only a substring will not work, and be aware that your shell
@ -563,14 +546,14 @@ To archive all messages in the mailbox <filename>cm-melb</filename> that
are older than the first of January 2002 to a compressed mailbox called are older than the first of January 2002 to a compressed mailbox called
<filename>cm-melb_archive.gz</filename> in the current directory: <filename>cm-melb_archive.gz</filename> in the current directory:
<screen> <screen>
<prompt>bash$ </prompt><userinput>archivemail --date'1 Jan 2002' cm-melb</userinput> <prompt>bash$ </prompt><userinput>archivemail --date='1 Jan 2002' cm-melb</userinput>
</screen> </screen>
</para> </para>
</informalexample> </informalexample>
<informalexample> <informalexample>
<para> <para>
Exactly the same as the above example, using an ISO 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>
@ -622,8 +605,8 @@ 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 <application>IMAP</application> To archive all mails older than 180 days from the given <acronym>IMAP</acronym>
INBOX to a compressed mailbox INBOX_archive.gz in the <literal>INBOX</literal> to a compressed mailbox <filename>INBOX_archive.gz</filename> in the
<filename>$HOME/Mail/Archive</filename> directory, quoting the password and <filename>$HOME/Mail/Archive</filename> directory, quoting the password and
reading it from the environment variable <envar>PASSWORD</envar>: reading it from the environment variable <envar>PASSWORD</envar>:
</para> </para>
@ -638,10 +621,10 @@ that are older than 90 days to compressed mailboxes in the
<informalexample> <informalexample>
<para> <para>
To archive all mails older than 180 days in subfolders of "foo" on the To archive all mails older than 180 days in subfolders of <filename
given <application>IMAP</application> server to corresponding archives in the current class="directory">foo</filename> on the given <acronym>IMAP</acronym>
working directory, reading the password from the file server to corresponding archives in the current working directory, reading
<filename>~/imap-pass.txt</filename>: the 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>
@ -668,28 +651,28 @@ 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 <application>IMAP</application> mailbox path contains slashes, the archive filename If an <acronym>IMAP</acronym> mailbox path contains slashes, the archive filename
will be derived from the basename of the mailbox. 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 the
<application>IMAP</application> <acronym>URL</acronym>, however, the whole path will be considered <acronym>IMAP</acronym> <acronym>URL</acronym>, however, the whole path will be considered
the basename of the mailbox. the basename of the mailbox.
E.g. 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
archived in <filename>subfolder_archive.gz</filename> and archived in <filename>subfolder_archive.gz</filename> and
<filename>folder.subfolder_archive.gz</filename>, respectively, although they <filename>folder.subfolder_archive.gz</filename>, respectively, although they
might refer to the same <application>IMAP</application> mailbox. might refer to the same <acronym>IMAP</acronym> mailbox.
</simpara> </simpara>
<simpara> <simpara>
<command>archivemail</command> does not support reading <application>MMDF</application> or <command>archivemail</command> does not support reading <acronym>MMDF</acronym> or
<application>Babyl</application>-format mailboxes. In fact, it will probably think it is <acronym>Babyl</acronym>-format mailboxes. In fact, it will probably think it is
reading an <application>mbox</application>-format mailbox and cause all sorts of problems. 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 &crontab;
you won't care. Archiving <application>maildir</application>-format mailboxes should be you won't care. Archiving <acronym>maildir</acronym>-format mailboxes should be
a lot quicker than <application>mbox</application>-format mailboxes since it is less a lot quicker than <acronym>mbox</acronym>-format mailboxes since it is less
painful for the original mailbox to be reconstructed after selective message painful for the original mailbox to be reconstructed after selective message
removal. removal.
</simpara> </simpara>
@ -697,13 +680,16 @@ removal.
<refsect1> <refsect1>
<title>See Also</title> <title>See Also</title>
<simplelist> <simplelist type="inline">
<member> &python;, &gzip;, &mutt;, &procmail;</member> <member>&mbox;</member>
<member>&crontab;</member>
<member>&python;</member>
<member>&procmail;</member>
</simplelist> </simplelist>
</refsect1> </refsect1>
<refsect1> <refsect1>
<title>Url</title> <title><acronym>Url</acronym></title>
<simpara>The <command>archivemail</command> home page is currently hosted at <simpara>The <command>archivemail</command> home page is currently hosted at
<ulink type="http" url="http://archivemail.sourceforge.net">sourceforge</ulink> <ulink type="http" url="http://archivemail.sourceforge.net">sourceforge</ulink>
</simpara> </simpara>

View File

@ -8,4 +8,3 @@
<hr/> <hr/>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

29
db2man.xsl Normal file
View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl"/>
<!-- Use .TP list for the variablelist describing the strtime() directives. -->
<!-- This hack aligns the indented paragraphs horizontally with their -->
<!-- labels. -->
<xsl:template match="variablelist[attribute::id='strftime']/varlistentry">
<xsl:text>.TP&#10;</xsl:text>
<xsl:for-each select="term">
<xsl:variable name="content">
<xsl:apply-templates/>
</xsl:variable>
<xsl:value-of select="normalize-space($content)"/>
<xsl:choose>
<xsl:when test="position() = last()"/> <!-- do nothing -->
<xsl:otherwise>
<!-- * if we have multiple terms in the same varlistentry, generate -->
<!-- * a separator (", " by default) -->
<xsl:value-of select="$variablelist.term.separator"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:text>&#10;</xsl:text>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>

View File

@ -9,3 +9,7 @@ h2 {
div.informalexample .screen { div.informalexample .screen {
margin-left: 2ex; margin-left: 2ex;
} }
a#strftime + dl dt { float: left; margin: 0.3ex 0; width: 1.5em; }
a#strftime + dl dd { float: left; margin: 0.3ex 0; margin-left: 1.2em; width: 90%; }
dt { clear: left; }