On 15 Jul 2005, at 20:56, Giuliano Gavazzi wrote:
> 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).
>
damn, it is the personal condition in the filter. Obviously it does
not find the current user address in any header, as the email is
addressed to an alias. Shouldn't the personal condition compare the
headers' content with the envelope recipient (that is the RCPT TO)
that is with the $original_local_part (and the original domain, but
how do we get that in a filter)?
If I try a partial solution with:
if personal alias "$original_local_part@$domain"
and log what I get in the filter I have for an email sent to
testalias (alias of testuser):
Exim filter
logfile /var/log/testfilter
logwrite "original $original_local_part" >>> testalias
logwrite "local part $local_part" >>> testuser
then
if ($h_subject: does not contain "SPAM?") then
logwrite "testing $original_local_part@$domain" >>> testing
testalias@mydomain
if personal alias "$original_local_part@$domain" then
logwrite "test success" >>> never gets here,
test fails. Why?
mail
[...]
endif
endif
must I expand "personal" as in filter.txt:
The basic "personal" test is roughly equivalent to the
following: |
|
not error_message
and |
$message_headers does not contain "\nList-"
and |
$header_auto-submitted: does not contain "auto-"
and |
$header_precedence: does not contain "bulk"
and |
$header_precedence: does not contain "list"
and |
$header_precedence: does not contain "junk"
and |
foranyaddress
$header_to: |
( $thisaddress contains "$local_part@$domain" )
and |
not foranyaddress
$header_from: |
(
|
$thisaddress contains "$local_part@domain"
or |
$thisaddress contains "server@"
or |
$thisaddress contains "daemon@"
or |
$thisaddress contains "root@"
or |
$thisaddress contains "listserv@"
or |
$thisaddress contains "majordomo@"
or |
$thisaddress contains "-request@"
or |
$thisaddress matches "^owner-[^@]
+@" |
)
|
replacing $local_part with $original_local_part?
Is this a bug or is it too late..?
g