身份证复印件须加签注及其写法 SPF is a stand now!
May 15
作者: 肖建彬 | 可以转载, 转载时务必以超链接形式标明文章原始出处和作者信息及版权声明
网址:http://www.xiaojb.com/archives/mailtech/maildir2mbox.shtml

以前经常做这样的功能,用的时候都是现写,现在用不着了。

#!/bin/sh
# author: xjb@xiaojb.com

USER=xjb
USERDIR=/home/vpopmail/domains/xxx.com/xjb/Maildir
for i in cur new
do
  for j in `find $USERDIR/$i -type f`
  do
    if [ -f $j ]; then
        echo "FROM root" >> $USER
        cat $j >> $USER
        echo >> $USER
    fi
  done
done

最后的echo >> $USER主要是保证From root是一个新行,在原邮件中最后一行没有\n的时候能保证不出问题。

Leave a Reply