Guys, I'm trying to use the perl script that Mark posted, for feeding bayes with mail in our Exchange5.5 public folders. But when I execute the script it, it gives me the error below. I know squat about perl and google isn't giving me much, so I'm hoping you guys can help me help me with this. Thanks all.
System info: OpenBSD 3.3 with Postfix 2.0.13 Amavisd-new with SA 2.55 Perl modules, including SA, installed via CPAN. When I run the script it gives me this error: Can't call method "select" on an undefined value at /usr/local/sbin/my-msex-spam.pl line 17. And here is my personalized version of his script (thanks much Mark): ---- start of file --- #!/usr/bin/perl use Mail::IMAPClient; use Sys::Syslog; my $FOLDER_NAME = 'Public Folders/All Public Folders/SpamLearn'; my $SEQ = 1; openlog('pullspam','cons,pid', 'user'); my $server = Mail::IMAPClient->new( Server => "<msexsrv1.knust.com>", User => "<spamlearn>", Password => "<houston>", Uid => 1, Debug => 0 ); $server->select($FOLDER_NAME); my @msgs = $server->search("ALL"); foreach my $msg (@msgs) { $server->message_to_file("/var/amavisd/spamlearn/" . $SEQ,$msg); $server->delete_message($msg); $SEQ++; }; $server->expunge($FOLDER_NAME); print "Pulled ". ($SEQ-1) . " messages from spam folder.\n"; syslog('mail|info', 'Pulled '.($SEQ-1) . ' messages from ham folder.'); --- end of file --- ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk