              ,---. 
            ,.'-.   \ 
           ( ( ,'"""""-. 
           `,X          `. 
           /` `           `._ 
          (            ,   ,_\ 
          |          ,---.,'o `. 
          |         / o   \     ) 
           \ ,.    (      .____, 
            \| \    \____,'     \ 
          '`'\  \        _,____,' 
          \  ,--      ,-'     \ 
            ( C     ,'         \ 
             `--'  .'           | 
               |   |         .O | 
             __|    \        ,-'_ 
            / `L     `._  _,'  ' `. 
           /    `--.._  `',.   _\  ` 
           `-.       /\  | `. ( ,\  \ 
          _/  `-._  /  \ |--'  (     \ 
         '  `-.   `'    \/\`.   `.    ) 
               \  -hrr-    \ `.  |    | 



Welcome to imap2mbox.py fantastic README :-)

Usage: imap2mbox.py [options]

Options:
    -h, --help            		Show this help message and exit
    -m MAILSRV, --mailsrv=MAILSRV  	*Mailserver to connect to
    -p PORT, --port=PORT  		Port to connect to
    -u USERNAME, --username=USERNAME  	*Username (defaults to current user)
    -w PASSWORD, --password=PASSWORD  	Specify Password (less secure)
    -f FOLDER, --folder=FOLDER  	Select folders to download (wildcards supported)
    -s, --ssl             		Enable SSL
    -v, --verbose         		Be verbose (debug)
    -r, --readonly        		Do not mark messages as read
    -t, --test            		Test Mode
    -o OUTPUT, --output=OUTPUT 		How to save mails ? mbox (default) or html (save text and mime attachments)
    --fromdate=FROMDATE   		Start date (format: YYYY-MM-DD)
    --todate=TODATE       		To date (format: YYYY-MM-DD)
    --markdelete          		Mark as deleted all saved messages

Field with * are required

When ran, imap2mbox.py create directories that reflect your IMAP4 structure, like this:

`-- imap.mailserver.my
    `-- username
        |-- INBOX.mbox
        |-- Trash.mbox

so you can do multiple runs without care 'bout it. After you export your IMAP4 to MBOX format, use MHonarc (www.mhonarc.org) to convert it to HTML ! 
From v.1.4.0 you don't need MHonarc to have your mailbox converted to HTML: you can still try "html" as output and enjoy our simple export.

Thanks to Gregory Boyce <gboyce@badbelly.com> for those patches: OptionParser, SSL, read-only, skip not-matched.
Thanks also to Peter Huewe <PeterHuewe@gmx.de> for his fixes.

Michele "o-zone@zerozone.it" Pinassi 
WEB @ http://www.zerozone.it
BLOG @ http://www.openitaly.net/diary/o-zone

