Postfix

帶有 vmail 的 Dovecot 自動回复

  • January 25, 2018

我有帶有 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

vess@trabels.net    vess@trabels.net, ticket@trabels.net

但是我不知道如何使用自動回复篩:

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 ticket@trabels.net.
";

/etc/postfix/virtual某種方式使用將是最好的,例如:

vess@trabels.net    vess@trabels.net, ticket@trabels.net, autorespond

實際上,當我意識到 sieve 命令就像程式語言中的函式時,這很容易,只是沒有括號。

我想出了這個:

require ["fileinto", "vacation"];

if header :contains "X-Spam-Flag" "YES" {
   fileinto "Junk";

}elsif address :is "to" "vess@trabels.net" {
   vacation "I will be out of the office till Monday.";

}

引用自:https://serverfault.com/questions/893511