++ed by:
ILUX DCPETROV ALEXM MICHIELB MDOM

5 PAUSE users
3 non-PAUSE users.

Phil Pearl (Lobbes)
and 1 contributors

NAME

imtestExample.pl -- uses imtest to connect and authenticate to imap server

DESCRIPTION

Options

-h

print this help message

-a auth

authenticate as user 'auth'. This value is passed as the '-a' value to imtest and defaults to whatever you supplied for -u.

-d

turn on Mail::IMAPClient debugging

-f file

write Mail::IMAPClient debugging info to file 'file'

-m mech

use authentication mechanism "mech"; default is to not supply -m to imtest

-i path

path to imtest executable; default is to let your shell find it via the PATH environmental variable.

-p port

port on mail server to connect to (default is 143)

-r rlm

Use realm 'rlm' (default is name of mail server)

-s srvr

Name of IMAP mail server (default is the localhost's hostname)

-u usr

Use 'usr' as the user id (required)

-w pswd

Use 'pswd' as the password for 'usr' (required)

-x path

Path to Unix socket (fifo). Default is '/tmp/$0.sock'.

-o 'ops'

Pass the string 'ops' directy to imtest as additional options. This is how you get "other" imtest options passed to imtest. (I only included switches for options that are either really common or useful to the IMAPClient object as well as to imtest.)

Many of these switches have the same function here as with imtest. I added a few extras though!

Example:

        imtestExample.pl -o '-k 128 -l 128' -s imapmail -u test -w testpswd     \
                -i /usr/local/src/cyrus/cyrus-imapd-2.1.11/imtest/              \
                -m DIGEST-MD5 

It's a good idea to test your options by running imtest from the command line (but without the -x switch) first. Once you have it working by hand you should be able to get it to work from this script (or one remarkably like it) without too much bloodshed.

AUTHOR

David J. Kernen

The Kernen Group, Inc.

imap@kernengroup.com

Based on a suggestion by Tara L. Andrews.

COPYRIGHT

This example and Mail::IMAPClient are Copyright (c) 2003 by The Kernen Group, Inc. All rights reserved.

This example is distributed with Mail::IMAPClient and subject to the same licensing requirements as Mail::IMAPClient.

imtest is a utility distributed with Cyrus IMAP server, Copyright (c) 1994-2000 Carnegie Mellon University. All rights reserved.