因为家里的网络连接国外的线路速度超慢,连接gmail基本就不动,但是连接办公室的机器速度却很快,所以就想利用把gmail里的邮件转发到办公室的邮件上,然后再从办公室里拉到家里。
大概有几种办法:
1、作代理
2、利用ssh tunels进行端口转发
3、利用fetchmail进行email转发
我选择了第3种方法进行处理,机器上已经安装了fetchmail,只需要配置好就可以了。
1. 配置fetchmail
cd
nano .fetchmailrc
#File : .fetchmailrc
set postmaster “wlx”poll pop.gmail.com with proto POP3 and options no dns
user ‘wlx@mygis.org’ is ‘wlx@cngis.org’ here options ssl
user ‘wangliangxu@gmail.com’ is ‘wlx@cngis.org’ here options ssl
2. email转发
fetchmail -vk
也可以在fetchmailrc文件中加入邮箱密码。
3. 存在问题
开始我是直接转发到本地用户的离线邮件的,发现其和我设置的邮箱不是同一个东西,因此就需要把这些邮件再转发给自己。直接把这个mail文件(/var/mail/wlx)移动到本机上,然后再在evolution中导入就可以处理这些邮件了。要注意设置此文件的属性(自己拥有,组属于mail)。
发表回复