Ubuntu使用fetchmail+procmail收邮件:
$ 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 (进行邮件同步)
原文链接:https://www.f2er.com/ubuntu/349633.html