How can I connect mail(1) to my Gmail/Yahoo/Hotmail account?
May 20, 2013 in answer
ANSWER:
Also I’d take a look at fetchmail. Fetchmail can be used to download mail from POP3/IMAP servers and deliver it locally. There’s a good tutorial here to get you started, titled: Using Fetchmail to Retrieve Email.
Examples
If you create a .fetchmailrc file in your $HOME directory as follows:
poll mail.example.com protocol imap:
username "admin" password "dir3cti0n" is "squire" here;
username "fore" password "0rd3r" is "foreman" here;
poll mail.example.org protocol pop3:
user "betty" password "p1nk" mda "/usr/bin/procmail -d %T"
The first rule will poll mail.example.com for mail using IMAP for the users admin & fore and deliver any mail for admin to squire (local user) and foreman (local user).
The second rule will use pop3 and any mail for betty will be run through procmail for delivery.

New Comments