hi,

i've inherited my company's mail server (the tech guy quit), and i need to manage a 
'cleanup'.

in doing so, i've come to understand that a perl script will best do what i need.

as i'm new to perl, i'm hoping to get help with a specific howto example from someone 
here that'll get me started ...

for my particular issue, i need to:

(1) login to the imap mail server as its "postmaster" (user with full priveleges)
(2) get a list of Domains & Accounts on the server
(3) for each existing Domain+Account pair, access two folders with the same relative-path, e.g. 
"/test/good" & "/test/bad"
(4) delete all the messages in each "/test/bad" folder
(5) move all the messages in each "/test/good" folder to the same Account's "/Inbox" 
folder

I've got perl version 5.8.4 running, and can write/execute simple scripts now.

I've also installed the Mail::IMAPClient module using the cpan utility.

I've managed the obvious part, well i stole it from an example:

       $host = "mail.mydomain.com";
       $id = "postmaster";
       $pass = "XXXXXXX";
       $imap = Mail::IMAPClient->new(
        Server => $host,
        User    => $id,
        Password=> $pass,
       )        or die "Cannot connect to $host as $id: $@";

but get lost as to how to do the rest.  These objects (are they?) have me a bit 
confused ...

can someone help with a walk through of the rest?

kate



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to