$ sudo apt-get install fetchmail
$ sudo apt-get install procmail
$ cp -rv /usr/share/doc/fetchmail/examples/fetchmailrc.example ~/.fetchmailrc
$ vi ~/.fetchmailrc (最后添加)
poll pop.126.com with protocol pop3
username "yanming0@126.com"
password "xxxxxx" (此处仍为授权码,非邮箱密码)
mda "/usr/bin/procmail -d %T"
no keep
:wq
$ vi ~/.procmailrc
VERBOSE=yes
DEFAULT=/var/spool/mail/aa
MAILDIR=$HOME/Mail
LOGFILE=$HOME/.procmail.log
:wq
$ sudo touch /var/spool/mail/aa (aa为登录的账号名,跟邮箱名无关)
$ sudo chown aa /var/spool/mail/aa
$ fetchmail -v (进行邮件同步)
$ mutt (就能看到邮件箱邮件了)
q:退出 r:回复(根据提示操作即可)
原文地址:http://blog.51cto.com/yangzhiming/2105753