我正在使用自動回覆路由器,基於網路流傳的常見配方:
路由器:
uservacation:
driver = redirect
allow_filter
domains = domain.com
hide_child_in_errmsg
debug_print = "R: autoreply for $user"
reply_transport = vacation_reply
no_verify
require_files = /home/share/autoreply.txt
file = /home/share/autoreply.txt
user = Debian-exim
group = Debian-exim
unseen
運輸:
vacation_reply:
debug_print = "T: vacation reply for $local_part@domain"
driver = autoreply
file = /home/share/autoreply.txt
file_expand
from = [email protected]
to = $sender_address
subject = "Re: $h_subject"
text = "Automatic reply\n\n"
自動回覆:
# Exim filter
if ($h_subject: does not contain "SPAM?" and personal) then
mail
expand file /home/share/autoreply.txt.txt
to $reply_address
from $local_part\@$domain
subject "Autoreply...[Re: $h_subject:]"
endif
system_aliases
這對大多數用戶來說效果很好,但是一個用戶在 /etc/aliases 中有一個別名,該別名在自動回復之前由路由器處理。
如果電子郵件傳送到別名,則不會觸發自動回覆。我不明白為什麼,因為上面的路由器似乎並不關心 local_part 是否與系統使用者名稱相符。
有任何想法嗎? (順便說一句,我意識到我正在將其中的一些元素加倍,因為我嘗試了不同的方法)。