我将如何设置 procmail 以便它使用标准消息回复所有电子邮件,提供以下电子邮件:
- 主题中包含单词“AAA”
- 文本中包含“BBB”一词
- 文本中不得出现“CCC”或“DDD”字样
答案1
未经测试;这应该可以帮助您入门:
:0
* ^Subject:.*AAA.* # subject condition
* !^X-Loop: [email protected] # prevent mail loops
{
:0 c B # c: make sure you still receive the mail, B: check body instead of header
* BBB # body conditions
* !CCC
* !DDD
| (formail -r -A"X-Loop: [email protected]" ; echo "This is my reply") | $SENDMAIL -t
}