NAME

rit - Ruby IMAP tool

SYNOPSIS

rit [-d|--debug] [-D|--dump] [-f|--safe [char]]
    [-m|--mailbox <mailbox>] [-n|--no-copy] [-c|--no-create]
    [-r|--delete] [-b|--batch <size>] [-t|--translate foo/bar]
    -s|--src-server <source server> -u|--src-user <source user>
    [-S|--dst-server <dest. server>] [-U|--dst-user <dest. user>]
rit -h|--help|-v|--version

DESCRIPTION

rit is a tool for copying e-mail between mail servers and mailboxes, using the IMAP protocol.

OPTIONS

-b batch or --batch batch

Specifies the batch size to use for meta-data fetches. This defaults to 100, but some speed gains can be made at the expense of memory usage by picking batch sizes up to 500.

-c or --no-create

No mailboxes will be created on the destination side. If you are not using -n|--no-copy and the mailboxes do not exist on the destination, an error will occur.

-d or --debug

Debugging messages will be printed. Use of this switch is recommended.

-D or --dump

The IMAP protocol exchange occuring over the wire will be displayed in its entirety. Note that the program will be very noisy when this option is used, so it is not recommended for following the program's progress. Use -d|--debug instead.

-f or --safe

Different IMAP server implementations use different namespaces. UW IMAP allows mailbox names to be comprised of characters that Cyrus IMAP does not, for example. Mirapoint mail appliances restrict the set of allowable characters even further. Use of this option will, by default, strip all suspicious characters from mailbox names when creating them on the destination server. If this option is passed a single character argument, that character will be used to replace suspicious characters in the mailbox name. If copying multiple mailboxes and stripping unsafe characters from a mailbox name results in a destination mailbox name the same as another mailbox to be copied, a warning will be printed and the mailbox will not be copied.

-h or --help

The usage message will be printed.

-m name or --mailbox name

Only the named mailbox will be acted upon, rather than all the user's mailboxes.

-n or --no-copy

No messages will be copied.

-r or --delete

If any mailboxes on the source server also exist on the destination, they will be deleted prior to any other operation being carried out.

-s host or --src-server host

Specify the source server.

-S host or --dst-server host

Specify the destination server. If no destination server is given, all operations will be carried out on the source server.

-t find/replace or --translate find/replace

The string find in the source mailbox name will be replaced with the string replace in the destination mailbox name. The text to be replaced should be separated from the replacement text by a literal slash ('/').

-u user or --src-user user

Specifies the user to authenticate as on the source server.

-U user or --dst-user user

Specifies the user to authenticate as on the destination server. If no destination user is given, all operations will be carried out as the same user, whether or not a separate destination server is specified. Specifies the shared secret for authentication.

-V or --version

Display version information.

EXAMPLES

$ rit -df -s foo -S bar -b 500 -u ibiggun

This command will copy mail for ibiggun from foo to bar, displaying debug messages, filtering unsafe characters from mailbox names, and batching mailbox meta-data fetches on foo into chunks of 500 for greater throughput.

$ rit -dcnrs foo -u ibiggun

After copying ibiggun's e-mail with the previous command, the above command will remove the old mailboxes and their contents from foo without recreating the mailboxes and copying the mail. Again, debugging messages will be displayed.

AUTHOR

Written by Ian Macdonald <ian@caliban.org>

COPYRIGHT

Copyright (C) 2003 Ian Macdonald

This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

SEE ALSO

BUGS