Hello, when asked to implement a vacation autoresponder (no comments
please, and it's for one user only, for a short period, and he does
not receive spam anymore) I have used the recipe that has been
discussed here some time ago (and corrected some small mistakes),
whose author I forget.
I have problems though making this work for aliases. In other words,
aliases do not trigger the autoresponder even though the filter is
run (checked with /exim -d+all -N -bt testalias@domain).
The router and transport are:
# vacation message
uservacation:
driver = redirect
allow_filter
hide_child_in_errmsg
ignore_eacces
ignore_enotdir
reply_transport = vacation_reply
no_verify
check_local_user
check_owner = false
user = smmsp
group = mail
require_files = $home/vacation/.vacation.txt
file = /usr/exim/confs/filters/_vacation
unseen
vacation_reply:
driver = autoreply
the filter:
# Exim filter
if ($h_subject: does not contain "SPAM?" and personal) then
mail
expand file $home/.vacation/vacation.txt
once $home/.vacation/vacation.db
log $home/.vacation/vacation.log
once_repeat 7d
to $reply_address
from $local_part\@$domain
subject "Autoreply: [Re: $h_subject:]"
endif
The debug output for testalias@domain:
20:49:41 27172 ---0 Rst 0x18104f8 ** filter.c 2392 49200
20:49:41 27172 Sub-condition is false: personal
20:49:41 27172 Condition is false: $h_subject: does not contain SPAM?
and personal
20:49:41 27172 Filtering did not set up a significant delivery.
20:49:41 27172 Normal delivery will occur.
20:49:41 27172 Filter: end of processing
20:49:41 27171 rda_interpret: subprocess yield=1 error=NULL
20:49:41 27171 uservacation router declined for testuser@???
that does not differ from testuser@domain result:
20:51:03 27186 ---0 Rst 0x1810190 ** filter.c 2392 49200
20:51:03 27186 Sub-condition is false: personal
20:51:03 27186 Condition is false: $h_subject: does not contain SPAM?
and personal
20:51:03 27186 Filtering did not set up a significant delivery.
20:51:03 27186 Normal delivery will occur.
20:51:03 27186 Filter: end of processing
20:51:03 27185 rda_interpret: subprocess yield=1 error=NULL
20:51:03 27185 uservacation router declined for testuser@???
why would the filter fail for the alias? Is it perhaps because
$local_part is not a local user in the case of the alias? Or perhaps
$home is not set in the filter?
Ideas? Thanks!
Giuliano