1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
.\" This manpage has been automatically generated by docbook2man-spec
.\" from a DocBook document. docbook2man-spec can be found at:
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "ARCHIVEMAIL" "1" "12 April 2002" "SP" ""
.SH NAME
archivemail \- archive and compress your old email
.SH SYNOPSIS
.sp
\fBarchivemail\fR [ \fBoptions\fR ] \fB\fIMAILBOX\fB\fR\fI...\fR
.SH "DESCRIPTION"
.PP
\fBarchivemail\fR is a tool written in \fBpython\fR(1) for archiving and
compressing old email in mailboxes.
.PP
By default it will read the mailbox \fIMAILBOX\fR, moving messages
that are older that the specified number of days (180 by default) to a
\fBmbox\fR-format mailbox in the same directory that is compressed
with \fBgzip\fR(1).
.PP
\fBarchivemail\fR supports reading \fBMaildir\fR,
\fBMH\fR and \fBmbox\fR-format mailboxes, but it will
always write archive files to \fBmbox\fR-format mailboxes that
are compressed with \fBgzip\fR(1).
.PP
\fBarchivemail\fR has some support for being run as the root user on
user mailboxes. When running as root, it will \fBseteuid\fR(2) to the owner of the
mailbox it is reading, creating any archive files as that user.
.SH "OPTIONS"
.TP
\fB-d \fINUM\fB, --days=\fINUM\fB\fR
Archive messages older than \fINUM\fR days.
The default is 180.
.TP
\fB-o \fIPATH\fB, --output-dir=\fIPATH\fB\fR
Use the directory name \fIPATH\fR to store the
mailbox archives. The default is the same directory as the mailbox to be
read.
.TP
\fB-s \fINAME\fB, --suffix=\fINAME\fB\fR
Use the suffix \fINAME\fR to create the filename used for archive
mailboxes. The default is \fI_archive\fR. For example, if you
run \fBarchivemail\fR on a mailbox called
\fIexsouthrock\fR, any archive mailbox file will be created
with the filename \fIexsouthrock_archive.gz\fR.
.TP
\fB-n, --dry-run\fR
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.
.TP
\fB-u, --preserve-unread\fR
Do not archive any messages that have not yet been read. \fBarchivemail\fR
determines if a message in a \fBmbox\fR-format or
\fBMH\fR-format mailbox has been read by looking at the
\fBStatus\fR header (if it exists). If the status
header is equal to 'RO' or 'OR' then \fBarchivemail\fR assumes the
message has been read. \fBarchivemail\fR determines if a
\fBmaildir\fR message has
been read by looking at the filename. If the filename contains an 'S' after
\fI:2,\fR then it assumes the message has been read.
.TP
\fB--delete\fR
Delete rather than archive old mail. Use this option with caution!
.TP
\fB--no-compress\fR
Do not compress any archives using \fBgzip\fR(1).
.TP
\fB--warn-duplicate\fR
Warn about duplicate \fBMessage-ID\fRs that appear in the input
mailbox.
.TP
\fB-v, --verbose\fR
Reports lots of extra debugging information about what is going on.
.TP
\fB-q, --quiet\fR
Turns on quiet mode. Do not print any statistics about how many messages were
archived. This should be used if you are running \fBarchivemail\fR from
cron.
.TP
\fB-V, --version\fR
Display the version of \fBarchivemail\fR and exit.
.TP
\fB-h, --help\fR
Display brief summary information about how to run \fBarchivemail\fR.
.SH "NOTES"
.PP
\fBarchivemail\fR requires \fBpython\fR(1) version 2.0 or later.
.PP
When reading an \fBmbox\fR-format mailbox, \fBarchivemail\fR will
create a lockfile with the extension \fI.lock\fR 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 \fBflock\fR(2).
.PP
\fBarchivemail\fR will always attempt to preserve the mode,
last-access and last-modify times of the input mailbox. However, archive
mailboxes are always created with a mode of \fB0600\fR.
.PP
If \fBarchivemail\fR finds a pre-existing archive mailbox it
will append rather than overwrite that archive.
.PP
\fBarchivemail\fR attempts to find the delivery date of a message by
looking for valid dates in the following headers, in order of precedence:
\fBDelivery-date\fR,
\fBDate\fR and
\fBResent-Date\fR.
If it cannot find any valid date in these headers, it
will use the last-modified file timestamp on \fBMH\fR and
\fBMaildir\fR format mailboxes, or the date on the
\fBFrom\fR line on \fBmbox\fR-format mailboxes.
.PP
\fBarchivemail\fR will refuse to operate on mailboxes that are symbolic
links or create tempfiles or archives in world-writable directories.
.SH "EXAMPLES"
.PP
To archive all messages in the mailbox \fIdebian-user\fR that
are older than 180 days to a compressed mailbox called
\fIdebian-user_archive.gz\fR in the current directory:
.sp
.nf
bash$ \fBarchivemail debian-user\fR
.sp
.fi
.PP
To delete all messages in the mailbox \fIspam\fR that
are older than 30 days:
.sp
.nf
bash$ \fBarchivemail --delete --days=30 spam\fR
.sp
.fi
.PP
To archive all read messages in the mailbox \fIincoming\fR that
are older than 180 days to a compressed mailbox called
\fIincoming_archive.gz\fR in the current directory:
.sp
.nf
bash$ \fBarchivemail --preserve-unread incoming\fR
.sp
.fi
.PP
To archive all messages in the mailbox \fIreceived\fR that
are older than 180 days to an uncompressed mailbox called
\fIreceived_archive\fR in the current directory:
.sp
.nf
bash$ \fBarchivemail --no-compress received\fR
.sp
.fi
.PP
To archive all mailboxes in the directory \fI$HOME/Mail\fR
that are older than 90 days to compressed mailboxes in the
\fI$HOME/Mail/Archive\fR directory:
.sp
.nf
bash$ \fBarchivemail -d90 -o $HOME/Mail/Archive $HOME/Mail/*\fR
.sp
.fi
.SH "TIPS"
.PP
Probably the best way to run \fBarchivemail\fR is from your \fBcrontab\fR(5)
file, using the \fB--quiet\fR option.
.PP
Don't forget to try the \fB--dry-run\fR option for non-destructive
testing.
.SH "EXIT STATUS"
.PP
Normally the exit status is 0. Nonzero indicates an unexpected error.
.SH "BUGS"
.PP
There is no support yet for reading \fBMMDF\fR or
\fBBabyl\fR-format mailboxes. In fact, \fBarchivemail\fR will
probably think it is reading an \fBmbox\fR-format mailbox and cause
all sorts of problems.
.PP
\fBarchivemail\fR is still too slow, but if you are running from \fBcrontab\fR(5)
you won't care. Archiving \fBmaildir\fR-format mailboxes should be
a lot quicker than \fBmbox\fR-format mailboxes since it is less
painful for the original mailbox to be reconstructed after selective message
removal.
.SH "SEE ALSO"
\fBpython\fR(1), \fBgzip\fR(1), \fBmutt\fR(1), \fBprocmail\fR(1)
.SH "URL"
.PP
The \fBarchivemail\fR home page is currently hosted at
sourceforge <URL:http://archivemail.sourceforge.net>
.SH "AUTHOR"
.PP
Paul Rodger <paul@paulrodger.com>
|