我有带 postfix 和 dovecot 的服务器。电子邮件通过 dovecot 发送。/etc/postfix/master.cf
如下所示:
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/bin/spamc -e /usr/libexec/dovecot/dovecot-lda -f ${sender} -d ${user}@${nexthop}
我的地址无效。
如果有人在那里写电子邮件,我希望在那里发送自动回复并将电子邮件转发给其他人。
我确实转发了/etc/postfix/virtual
:
[email protected] [email protected], [email protected]
但是我不知道如何使用自动回复筛选器:
require ["fileinto", "vacation"];
vacation
# Reply at most once a day to a same sender
:days 1
:subject "Out of office reply"
# List of additional recipient addresses which are included in the auto replying.
# If a mail's recipient is not the envelope recipient and it's not on this list,
# no vacation reply is sent for it.
:addresses []
"
Hello,
I will be out of the office till Monday, 29 January with no access to the e-mail.
Please write to [email protected].
";
使用/etc/postfix/virtual
某种方式将是最好的,例如:
[email protected] [email protected], [email protected], autorespond
答案1
实际上,当我意识到筛选命令就像编程语言中的函数一样,只是没有括号时,一切都变得非常容易。
我想出了这个:
require ["fileinto", "vacation"];
if header :contains "X-Spam-Flag" "YES" {
fileinto "Junk";
}elsif address :is "to" "[email protected]" {
vacation "I will be out of the office till Monday.";
}