diff --git a/Makefile b/Makefile index 4432631..f803e59 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,6 @@ VERSION_TAG=v$(subst .,_,$(VERSION)) TARFILE=archivemail-$(VERSION).tar.gz HTDOCS=htdocs-$(VERSION) -# Path to XSLT stylesheet. Adapt to your needs. -XSLT_MAN=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl - default: @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 tar czf $(HTDOCS).tgz $(HTDOCS) -archivemail.1: archivemail.xml - xsltproc $(XSLT_MAN) archivemail.xml +archivemail.1: archivemail.xml db2man.xsl + xsltproc db2man.xsl archivemail.xml archivemail.html: archivemail.xml db2html.xsl xsltproc --output archivemail.html \ diff --git a/archivemail.xml b/archivemail.xml index 99c7cd5..a0448a5 100644 --- a/archivemail.xml +++ b/archivemail.xml @@ -2,37 +2,29 @@ -lockf -2"> + +lockf +2'> - -gzip -1"> + +gzip +1'> - -mutt -1"> + +procmail +1'> - -procmail -1"> + +python +1'> - -python -1"> + +crontab +5'> - -seteuid -2"> - - -crontab -5"> - - -mbox -5"> + +mbox +5'> ]> @@ -65,9 +57,10 @@ Description -archivemail is a tool for archiving and compressing old email in mailboxes. +archivemail is a tool for archiving and compressing old +email in mailboxes. By default it will read the mailbox MAILBOX, 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 with &gzip;. 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. -archivemail supports reading IMAP, -Maildir, MH and mbox-format -mailboxes, but always writes mbox-format archives. +archivemail supports reading IMAP, +Maildir, MH and mbox-format +mailboxes, but always writes mbox-format archives. @@ -97,12 +90,12 @@ mailboxes, but always writes mbox-format archives. -To archive an IMAP-format mailbox, use the format +To archive an IMAP-format mailbox, use the format imap://username:password@server/mailbox to specify the mailbox. -archivemail will expand wildcards in IMAP mailbox -names according to RFC 3501, which says: -The character "*" is a wildcard, and matches zero or more characters at this +archivemail will expand wildcards in IMAP mailbox +names according to RFC 3501, which says: +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 hierarchy delimiter. You can omit the password from the URL; use the @@ -111,9 +104,10 @@ password from a file, or alternatively just enter it upon request. If the option is set, archivemail does not look for a password in the URL, and the colon is not considered a delimiter. -Substitute 'imap' with 'imaps', and -archivemail will establish a secure SSL connection. -See below for more IMAP peculiarities. +Substitute imap with +imaps, and archivemail will +establish a secure SSL connection. +See below for more IMAP peculiarities. @@ -123,9 +117,8 @@ See below for more IMAP peculiarities. - - - + + Archive messages older than NUM days. The default is 180. This option is incompatible with the option below. @@ -133,21 +126,20 @@ The default is 180. This option is incompatible with the - - - + + Archive messages older than DATE. -DATE can be a date string in ISO format (eg '2002-04-23'), -Internet format (eg '23 Apr 2002') or Internet format with full month names -(eg '23 April 2002'). Two-digit years are not supported. +DATE can be a date string in ISO format (eg +2002-04-23), Internet format (eg 23 Apr +2002) or Internet format with full month names (eg +23 April 2002). Two-digit years are not supported. This option is incompatible with the option above. - - - + + Use the directory name PATH to store the mailbox archives. The default is the same directory as the mailbox to be read. @@ -155,44 +147,41 @@ read. - - - -Read IMAP password from file FILE -instead of from the command line. Note that this will probably not work if you -are archiving folders from more than one IMAP account. + + +Read IMAP password from file +FILE instead of from the command line. Note +that this will probably not work if you are archiving folders from +more than one IMAP account. - - - -Append STRING to the IMAP filter string. + + +Append STRING to the +IMAP filter string. For IMAP wizards. - - - + + Prefix NAME to the archive name. NAME is expanded by the &python; function -time.strftime(), which means that you can specify special +time.strftime(), which means that you can specify special directives in NAME to make an archive named after the archive cut-off date. See the discussion of the option for a list of valid -strftime() directives. +strftime() directives. The default is not to add a prefix. - - - + + Use the suffix NAME to create the filename used for archives. The default is _archive, unless a prefix is specified. @@ -200,85 +189,82 @@ The default is _archive, unless a prefix is specified. Like a prefix, the suffix NAME is expanded by the &python; -function time.strftime() with the archive cut-off date. -time.strftime() understands the following directives: +function time.strftime() with the archive cut-off date. +time.strftime() understands the following directives: - - - Locale's abbreviated weekday name. - - Locale's full weekday name. - - Locale's abbreviated month name. - - Locale's full month name. - - Locale's appropriate date and time representation. - - Day of the month as a decimal number [01,31]. - - Hour (24-hour clock) as a decimal number [00,23]. - - Hour (12-hour clock) as a decimal number [01,12]. - - Day of the year as a decimal number [001,366]. - - Month as a decimal number [01,12]. - - Minute as a decimal number [00,59]. - - Locale's equivalent of either AM or PM. - - Second as a decimal number [00,61]. (1) - - 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. - - Weekday as a decimal number [0(Sunday),6]. - - 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. - - Locale's appropriate date representation. - - Locale's appropriate time representation. - - Year without century as a decimal number [00,99]. - - Year with century as a decimal number. - - Time zone name (or by no characters if no time zone exists). - - A literal "%" character. - + + %a + Locale's abbreviated weekday name. + %A + Locale's full weekday name. + %b + Locale's abbreviated month name. + %B + Locale's full month name. + %c + Locale's appropriate date and time representation. + %d + Day of the month as a decimal number [01,31]. + %H + Hour (24-hour clock) as a decimal number [00,23]. + %I + Hour (12-hour clock) as a decimal number [01,12]. + %j + Day of the year as a decimal number [001,366]. + %m + Month as a decimal number [01,12]. + %M + Minute as a decimal number [00,59]. + %p + Locale's equivalent of either AM or PM. + %S + Second as a decimal number [00,61]. (1) + %U + 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. + %w + Weekday as a decimal number [0(Sunday),6]. + %W + 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. + %x + Locale's appropriate date representation. + %X + Locale's appropriate time representation. + %y + Year without century as a decimal number [00,99]. + %Y + Year with century as a decimal number. + %Z + Time zone name (or by no characters if no time zone exists). + %% + A literal % character. + - - - + + Use NAME as the archive name, ignoring the name of the mailbox that is archived. Like prefixes and suffixes, NAME is expanded by -strftime() with the archive cut-off date. +time.strftime() with the archive cut-off date. Because it hard-codes the archive name, this option cannot be used when archiving multiple mailboxes. - - - + + Only archive messages that are NUM bytes or greater. - - - + + 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. @@ -286,18 +272,19 @@ useful for testing to see how many messages would have been archived. - - - + + Do not archive any messages that have not yet been read. archivemail -determines if a message in a mbox-format or -MH-format mailbox has been read by looking at the -Status header (if it exists). If the status -header is equal to 'RO' or 'OR' then archivemail assumes the -message has been read. archivemail determines if a -maildir message has -been read by looking at the filename. If the filename contains an 'S' after +determines if a message in a mbox-format or +MH-format mailbox has been read by looking at the +Status header (if it exists). If the status +header is equal to RO or +OR then archivemail +assumes the message has been read. +archivemail determines if a maildir +message has been read by looking at the filename. +If the filename contains an S after :2, then it assumes the message has been read. @@ -307,11 +294,13 @@ been read by looking at the filename. If the filename contains an 'S' after -Do not mangle lines in message bodies beginning with "From ". When archiving -a message from a mailbox not in mbox format, by default -archivemail mangles such lines by prepending a '>' to them, since mail -user agents might otherwise interpret these lines as message separators. -Messages from mbox folders are never mangled. See &mbox; for more +Do not mangle lines in message bodies beginning with +From . +When archiving a message from a mailbox not in mbox +format, by default archivemail mangles such lines by +prepending a > to them, since mail user +agents might otherwise interpret these lines as message separators. +Messages from mbox folders are never mangled. See &mbox; for more information. @@ -374,14 +363,13 @@ Do not compress any archives. -Warn about duplicate Message-IDs that appear in the input +Warn about duplicate Message-IDs that appear in the input mailbox. - - - + + Reports lots of extra debugging information about what is going on. @@ -402,9 +390,8 @@ literally to imaplib.Debug.) - - - + + Turns on quiet mode. Do not print any statistics about how many messages were archived. This should be used if you are running archivemail from @@ -413,18 +400,16 @@ cron. - - - + + Display the version of archivemail and exit. - - - + + Display brief summary information about how to run archivemail. @@ -437,9 +422,9 @@ Display brief summary information about how to run archivemailNotes archivemail requires &python; version 2.3 or later. -When reading an mbox-format mailbox, archivemail will -create a lockfile with the extension .lock so that -procmail will not deliver to the mailbox while it is being processed. It will +When reading an mbox-format mailbox, archivemail will +create a lockfile with the extension .lock so that +&procmail; will not deliver to the mailbox while it is being processed. It will also create an advisory lock on the mailbox using &lockf;. The archive is locked in the same way when it is updated. archivemail will also complain and abort if a 3rd-party modifies the @@ -449,7 +434,7 @@ mailbox while it is being read. archivemail will always attempt to preserve the last-access and last-modify times of the input mailbox. Archive -mailboxes are always created with a mode of 0600. +mailboxes are always created with a mode of 0600. If archivemail finds a pre-existing archive mailbox it will append rather than overwrite that archive. archivemail will refuse to operate on mailboxes that are symbolic @@ -459,19 +444,19 @@ links. archivemail attempts to find the delivery date of a message by looking for valid dates in the following headers, in order of precedence: -Delivery-date, -Received, -Resent-Date and -Date. +Delivery-date, +Received, +Resent-Date and +Date. If it cannot find any valid date in these headers, it -will use the last-modified file timestamp on MH and -Maildir format mailboxes, or the date on the -From line on mbox-format mailboxes. +will use the last-modified file timestamp on MH and +Maildir format mailboxes, or the date on the +From_ line on mbox-format mailboxes. When archiving mailboxes with leading dots in the name, - archivemail will strip the dots off the archive name, so + archivemail will strip the dots off the archive name, so that the resulting archive file is not hidden. This is not done if the or option is used. @@ -481,39 +466,37 @@ will use the last-modified file timestamp on MH and A conversion from other formats to &mbox; will silently overwrite existing - Status and X-Status message headers. + Status and X-Status message headers. <acronym>IMAP</acronym> -When archivemail processes an IMAP folder, all messages +When archivemail processes an IMAP folder, all messages in that folder will have their \Recent flag unset, and they will -probably not show up as 'new' in your user agent later on. -There is no way around this, it's just how IMAP works. +probably not show up as new in your user agent later on. +There is no way around this, it's just how IMAP works. This does not apply, however, if you run archivemail with the options or . archivemail relies on server-side searches to determine the messages that should be archived. -When matching message dates, IMAP servers refer to server internal +When matching message dates, IMAP servers refer to server internal message dates, and these may differ from both delivery time of a message and -its Date header. +its Date header. Also, there exist broken servers which do not implement server side searches. -<acronym>IMAP</acronym> <acronym>URLS</acronym> +<acronym>IMAP</acronym> <acronym>URL</acronym>s -archivemail's IMAP URL parser was written -with the RFC 2882 (Internet Message -Format) rules for the local-part of email addresses -in mind. +archivemail's IMAP URL parser was written +with the RFC 2882 (Internet Message Format) rules for +the local-part of email addresses in mind. So, rather than enforcing an URL-style encoding of non-ascii and reserved characters, it allows to double-quote the username and password. -If your username or password contains the delimiter characters '@' or ':', just -quote it like this: -imap://"username@bogus.com":"password"@imap.bogus.com/mailbox -. +If your username or password contains the delimiter characters +@ or :, just quote it like this: +imap://"username@bogus.com":"password"@imap.bogus.com/mailbox. You can use a backslash to escape double-quotes that are part of a quoted username or password. 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 cm-melb that are older than the first of January 2002 to a compressed mailbox called cm-melb_archive.gz in the current directory: -bash$ archivemail --date'1 Jan 2002' cm-melb +bash$ archivemail --date='1 Jan 2002' cm-melb -Exactly the same as the above example, using an ISO date format instead: +Exactly the same as the above example, using an ISO date format instead: bash$ archivemail --date=2002-01-01 cm-melb @@ -622,8 +605,8 @@ that are older than 90 days to compressed mailboxes in the - To archive all mails older than 180 days from the given IMAP - INBOX to a compressed mailbox INBOX_archive.gz in the + To archive all mails older than 180 days from the given IMAP + INBOX to a compressed mailbox INBOX_archive.gz in the $HOME/Mail/Archive directory, quoting the password and reading it from the environment variable PASSWORD: @@ -638,10 +621,10 @@ that are older than 90 days to compressed mailboxes in the - To archive all mails older than 180 days in subfolders of "foo" on the - given IMAP server to corresponding archives in the current - working directory, reading the password from the file - ~/imap-pass.txt: + To archive all mails older than 180 days in subfolders of foo on the given IMAP + server to corresponding archives in the current working directory, reading + the password from the file ~/imap-pass.txt: bash$ archivemail --pwfile=~/imap-pass.txt imaps://user@example.org/foo/* @@ -668,28 +651,28 @@ Don't forget to try the and perhaps the Bugs -If an IMAP mailbox path contains slashes, the archive filename +If an IMAP mailbox path contains slashes, the archive 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 -IMAP URL, however, the whole path will be considered +IMAP URL, however, the whole path will be considered the basename of the mailbox. -E.g. the two URLs +E.g. the two URLs imap://user@example.com/folder/subfolder and imap://user@example.com/folder.subfolder will be archived in subfolder_archive.gz and folder.subfolder_archive.gz, respectively, although they -might refer to the same IMAP mailbox. +might refer to the same IMAP mailbox. -archivemail does not support reading MMDF or -Babyl-format mailboxes. In fact, it will probably think it is -reading an mbox-format mailbox and cause all sorts of problems. +archivemail does not support reading MMDF or +Babyl-format mailboxes. In fact, it will probably think it is +reading an mbox-format mailbox and cause all sorts of problems. archivemail is still too slow, but if you are running from &crontab; -you won't care. Archiving maildir-format mailboxes should be -a lot quicker than mbox-format mailboxes since it is less +you won't care. Archiving maildir-format mailboxes should be +a lot quicker than mbox-format mailboxes since it is less painful for the original mailbox to be reconstructed after selective message removal. @@ -697,13 +680,16 @@ removal. See Also - - &python;, &gzip;, &mutt;, &procmail; + + &mbox; + &crontab; + &python; + &procmail; -Url +<acronym>Url</acronym> The archivemail home page is currently hosted at sourceforge diff --git a/db2html.xsl b/db2html.xsl index 1ef6a09..d3be5f6 100644 --- a/db2html.xsl +++ b/db2html.xsl @@ -8,4 +8,3 @@
- diff --git a/db2man.xsl b/db2man.xsl new file mode 100644 index 0000000..bcc3f61 --- /dev/null +++ b/db2man.xsl @@ -0,0 +1,29 @@ + + + + + + + + + .TP + + + + + + + + + + + + + + + + + + + diff --git a/manpage.css b/manpage.css index b46ad9c..915cea2 100644 --- a/manpage.css +++ b/manpage.css @@ -9,3 +9,7 @@ h2 { div.informalexample .screen { 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; }