From owner-freebsd-questions@FreeBSD.ORG Sat Jan 28 13:43:58 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C57DA1065670 for ; Sat, 28 Jan 2012 13:43:58 +0000 (UTC) (envelope-from rocky@herveybayaustralia.com.au) Received: from mail.unitedinsong.com.au (mail.unitedinsong.com.au [150.101.178.33]) by mx1.freebsd.org (Postfix) with ESMTP id 787448FC08 for ; Sat, 28 Jan 2012 13:43:58 +0000 (UTC) Received: from mail.unitedinsong.com.au (bell.herveybayaustralia.com.au [192.168.0.40]) by mail.unitedinsong.com.au (Postfix) with ESMTP id 48F7B5C28 for ; Sat, 28 Jan 2012 23:56:31 +1000 (EST) Received: from laptop1.herveybayaustralia.com.au (laptop1.herveybayaustralia.com.au [192.168.0.179]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.unitedinsong.com.au (Postfix) with ESMTPSA id 157855C21 for ; Sat, 28 Jan 2012 23:56:31 +1000 (EST) Message-ID: <4F23FAA1.5020700@herveybayaustralia.com.au> Date: Sat, 28 Jan 2012 23:39:45 +1000 From: Da Rock User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111109 Thunderbird/7.0.1 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: OT: perl mail problems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jan 2012 13:43:58 -0000 I know this is not exactly FreeBSD related, but I'm in need of a monk that can enlighten me on a sacred incantation to connect perl to an imap server using Mail::Box modules :) If it helps people sleep, its all running only on FreeBSD systems... I have googled and searched, and googled some more, and tested, and then went back to the drawing board and googled yet again... there is simply no clear answer out there. All the docs are very disjointed from my reckoning- with no clear direction that explains how you get from a-b. I have enabled a connection (I think - based on my tests and logs), but I cannot get further than that. I have a Mail::Box::Manager instantiated, and then I have to use Mail::Box::IMAP4 to open a connection to the server. From there I need to get a list of the folders available- and thats where I get stymied. All the docs are pop3 based, or maildir based, or mbox. The imap is very sketchy... and what is out there says to basically connect, and then there is a jump to folders and messages with no idea of what is involved in between. Although I did see one complete example with pop3, but it won't work for imap. One of the biggest problems is the username confuses any other module method than the Mail::Box::IMAP4 - the syntax is user@domain, and so if I use Mail::Box::Manager it will compile it into a url form ie imap4://user@domain:password@mail.server which it obviously barfs on and refuses to look beyond user@domain. I really seem to be missing something fundamental here. I'm only trying to create some tools which will handle some situations apparently only local to my systems, and improve my perl foo before I start creating modules of my own and testing mod_perl. If someone can help clear this up I'll be happy to communicate off list if that is necessary. TIA