Recently in Linux Application Category
msmtp本身是支持多个msmtp的。这些smtp的可以通过mutt的set from='xxx'来选取。因此,mutt能否使用多个smtp的问题就等价于是mutt能否根据不同情况改变from的值。事实上,mutt的send hook整好可以用来解决这个问题。请看我的mutt配置文件
set sendmail="/usr/bin/msmtp"
set use_from=yes
set realname="Jianing Yang"
set envelope_from=yes
set from=mycompany@email.com
send-hook '~f detrox@gmail.com' 'set from=detrox@gmail.com'
send-hook '~t detrox@gmail.com' 'set from=detrox@gmail.com'
send-hook '~t [^@]+@jianingy.com' 'set from=detrox@gmail.com'
通过上面的配置,mutt在发送邮件时会根据如下条件改变from地址:
1.邮件来自detrox@gmail.com
2.邮件是发往detrox@gmail.com
3.邮件是发往@jianingy.com域的
xargs有个开关-P,意思是同时启动多少个子进程。借助xargs的这个特性可以加速grep文件的速度。例如,
grep -r "libm.so.2" *
可以改写为
find . -type f | xargs -n 1 -P 20 grep "libm.so.2"
这样就会有20个进程同时查找了。
依据 http://lists.schmorp.de/pipermail/rxvt-unicode/2007q4/000514.html 的说法。rxvt-unicode的字间距比其他terminal要大出很多,是因为计算公式有错误。使用如下patch即可消除这个问题。
diff -NBupr rxvt-unicode-9.02/src/rxvtfont.C rxvt-unicode-9.02-fixed/src/rxvtfont.C
--- rxvt-unicode-9.02/src/rxvtfont.C 2008-01-26 23:07:30.000000000 +0800
+++ rxvt-unicode-9.02-fixed/src/rxvtfont.C 2008-05-11 21:47:56.000000000 +0800
@@ -1198,9 +1198,14 @@ rxvt_font_xft::load (const rxvt_fontprop
g.width -= g.x;
int wcw = WCWIDTH (ch);
+/*
+ * see: http://lists.schmorp.de/pipermail/rxvt-unicode/2007q4/000514.html
if (wcw > 0) g.width = (g.width + wcw - 1) / wcw;
-
if (width < g.width ) width = g.width;
+*/
+ if (wcw > 1) g.xOff = g.xOff / wcw;
+ if (width < g.xOff) width = g.xOff;
+
if (height < g.height ) height = g.height;
if (glheight < g.height - g.y) glheight = g.height - g.y;
}
Fusion-Icon是一个Compiz Fusion的TrayIcon。支持Theme Select, WM Reload等功能,使用起来十分方便。
在Ubuntu 7.10下的安装方法:
git clone git://anongit.opencompositing.org/users/crdlb/fusion-icon
cd fusion-icon
sudo make interface=gtk install
然后在gnome的session里加入/usr/bin/fusion-icon, 如果使用ubuntu来启动compiz的话,就要在启动fusion-icon的时候加入参数-n,即 /usr/bin/fusion-icon -n
google了很久才发现,其实在bitlbee里输入set charset utf-8就能让bitlbee以utf8方式发送信息。其他windows上msn,yahoo,gtalk的朋友就能正确看到从bitlbee发出的中文信息了。
详见:http://matchung.net/read.php/39.htm

Recent Comments
jianingy on 用正则表达式Look-Ahead做带逃逸的变量替换: 这个lc是啥意思?
cnhackTNT on 用正则表达式Look-Ahead做带逃逸的变量替换: 晕,被过滤掉了,再试
cnhackTNT on 用正则表达式Look-Ahead做带逃逸的变量替换: s/(? 这样可以
R.Q. on 个性化SSH登录: 酱紫哦,了了 ---