自打从Win转移到GNU/Linux后,之前计算机里边大部分专有软件也随之转移至自由软件,KMail就是其中一例啦!但是在天朝这么一个「中国特色」的网络环境下,正常使用Gmail也成了白日梦… 但是!网络长城是阻挡不了我们前进的步伐的!带上你的代理,跟我来吧!

从KMail4.95的设置里边虽然能够找到proxy的设置选项,Settings->Configure KMail->Misc Page->proxy 但是实际上是无效的,进入proxy页时KMail会提示找不到桌面文件,手册上也唯独没有proxy的设置选项。上午Google得出的结果是KMail proxy的设置得小小地hack一下,但Settings 的Misc Page中确实是有proxy的设置的呀!?抱着打破沙锅问到底的精神,我把KMail 4.95的源码大致看了下,发现KMail 4.95的源码中确实是包含了proxy的设置的,但是… 却没有图形界面的配置选项,源码中也确实缺少proxy.desktop文件,所以喽~ Settings中切到proxy时会提示「找不到桌面文件喽」 OK, 废话到此,下边引用这个帖子两种方法.

Socks:

http://emilsedgh.info/blog/index.php?/archives/14-SOCKS-proxy-on-KDE.html
SOCKS proxy on KDE

kdelibs < 4.7:
its not supported. to make it work, you have to install an http server (like polipo) and point kde to it.

kdelibs == 4.7:
Good news is, socks proxy ‘is’ supported. Bad news is, there’s no UI to configure it.
To configure it, add the following line to ~/.kde4/share/config/kioslaverc file: [On my Arch Linux]
socksProxy=socks://HOST:PORT
Then, go to System Settings->Network Settings->Proxy and make sure the ‘Manually specify the proxy settings’ option is marked. (But dont click the ‘Setup’ button)

http://userbase.kde.org/Kontact
Enabling SOCKS support in KMail and KNode

Unlike KDE 3, KDE 4 does not have built-in SOCKS support yet. However, it is still possible and relatively simple to make KMail and KNode use a SOCKS proxy, by using proxychains or other similar tools like tsocks or socksify. Assuming that proxychains is correctly installed and configured, all you need to do is to open a terminal (e.g. Konsole) and type:
proxychains kdeinit4
You don’t even need to restart KMail/KNode! (You need to type the above command every time you start a new KDE session though).

第一种方法中将HOST:PORT换成相应的主机及端口号即可