archivemail

1 SP

archivemail

archive and compress your old email

    options

## Description

``

By default it will read the mailbox ``

``

``

## Options

`-d ```

- Archive messages older than ``

`-D ```

- Archive messages older than ``

`-o ```

- Use the directory name ``

`-s ```

- Use the suffix `_archive`. For example, if you run `exsouthrock`, the archive will be created with the filename `exsouthrock_archive.gz`.

  ``

- `%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.

`-S ```

- Only archive messages that are ``

`-n, --dry-run`

- 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.

`-u, --preserve-unread`

- Do not archive any messages that have not yet been read. `:2,` then it assumes the message has been read.

`--delete`

- Delete rather than archive old mail. Use this option with caution!

`--include-flagged`

- Normally messages that are flagged important are not archived or deleted. If you specify this option, these messages can be archived or deleted just like any other message.

`--no-compress`

- Do not compress any archives using &gzip;.

`--warn-duplicate`

- Warn about duplicate

`-v, --verbose`

- Reports lots of extra debugging information about what is going on.

`-q, --quiet`

- Turns on quiet mode. Do not print any statistics about how many messages were archived. This should be used if you are running ``

`-V, --version`

- Display the version of ``

`-h, --help`

- Display brief summary information about how to run ``

## Notes

``

To archive an imap://username:password@server/mailbox to specify the mailbox.

When reading an .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 &flock;. ``

``

If ``

``

``

## Examples

To archive all messages in the mailbox `debian-user` that are older than 180 days to a compressed mailbox called `debian-user_archive.gz` in the current directory:

    bash$ archivemail debian-user

To archive all messages in the mailbox `debian-user` that are older than 180 days to a compressed mailbox called `debian-user_October_2001.gz` (where the current month and year is April, 2002) in the current directory:

    bash$ archivemail --suffix '_%B_%Y' debian-user

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

Exactly the same as the above example, using an ISO date format instead:

    bash$ archivemail --date=2002-01-01 cm-melb

To delete all messages in the mailbox `spam` that are older than 30 days:

    bash$ archivemail --delete --days=30 spam

To archive all read messages in the mailbox `incoming` that are older than 180 days to a compressed mailbox called `incoming_archive.gz` in the current directory:

    bash$ archivemail --preserve-unread incoming

To archive all messages in the mailbox `received` that are older than 180 days to an uncompressed mailbox called `received_archive` in the current directory:

    bash$ archivemail --no-compress received

To archive all mailboxes in the directory `$HOME/Mail` that are older than 90 days to compressed mailboxes in the `$HOME/Mail/Archive` directory:

    bash$ archivemail -d90 -o $HOME/Mail/Archive $HOME/Mail/*

## Tips

Probably the best way to run `--quiet` option.

Don't forget to try the `--dry-run` option for non-destructive testing.

## Exit Status

Normally the exit status is 0. Nonzero indicates an unexpected error.

## Bugs

There is no support yet for reading

``

## See Also

- &python;, &gzip;, &mutt;, &procmail;

## Url

The `sourceforge`

## Author

Paul Rodger <paul at paulrodger dot com>