I want to download mails (batch download) i have in the "sample" folder from my yahoo mail to local folder.
any command-line client for downloading mails from mail?
there are a lot of tools that can do this, some can both, imap and pop3, some are limited to pop3 or imap.
for example take a look at getmail: http://www.howtogeek.com/138713/how-to-backup-your-gmail-account-using-your-ubuntu-pc/ (in standard repo (xubuntu 13.1 is getmail4)
another one is "offlineimap" that can copy mails from a imap server to a local dir: http://popey.com/blog/2010/12/30/backup-email-with-offlineimap/
hope this helps!