- 论坛徽章:
- 0
|
本帖最后由 justinyun 于 2013-03-25 23:46 编辑
其实我想先自动接收邮件,然后再处理一些符合标题的邮件, 把邮件正文打印出来,
接收邮件可以用 procmail, 让邮件入本地的spool mail, 接下来只要分割邮件就OK了。
分割邮件用如下命令:
cat /var/spool/mail/username | formail -ds sh -c 'cat > msg.$FILENO'
FILENO
While splitting, formail assigns the message number currently
being output to this variable. By presetting FILENO, you can
change the initial message number being used and the width of the
zero-padded output. If FILENO is unset it will default to 000.
If FILENO is non-empty and does not contain a number, FILENO gen-
eration is disabled.
参考: http://stackoverflow.com/questio ... le-file-per-message |
|