imtestExample.pl -- uses imtest to connect and authenticate to imap server
print this help message
authenticate as user 'auth'. This value is passed as the '-a' value to imtest and defaults to whatever you supplied for -u.
turn on Mail::IMAPClient debugging
write Mail::IMAPClient debugging info to file 'file'
use authentication mechanism "mech"; default is to not supply -m to imtest
path to imtest executable; default is to let your shell find it via the PATH environmental variable.
port on mail server to connect to (default is 143)
Use realm 'rlm' (default is name of mail server)
Name of IMAP mail server (default is the localhost's hostname)
Use 'usr' as the user id (required)
Use 'pswd' as the password for 'usr' (required)
Path to Unix socket (fifo). Default is '/tmp/$0.sock'.
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.
David J. Kernen
The Kernen Group, Inc.
imap@kernengroup.com
Based on a suggestion by Tara L. Andrews.
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.
To install Mail::IMAPClient, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::IMAPClient
CPAN shell
perl -MCPAN -e shell install Mail::IMAPClient
For more information on module installation, please visit the detailed CPAN module installation guide.