Author: Toralf Lund Date: To: Exim Mailing List Subject: Re: [Exim] How to stop some domains using filter?
Toralf Lund wrote:
> Consider the following section
>
> if $domain does not contain procaptura
> then
> save imap/OldAddr
> noerror mail from $local_part@$domain subject "Failure notice:
> $h_subject" expand file .oldaddr.msg return message
> endif
[ ... ]
>
> This works most of the time, but some messages to old addresses are
> still let through. It may seem like the problem is that the filter test
> will not catch messages that are sent to an *alias* representing my
> address. Questions: [ ... ]
I found out a bit about this. Apparently, I didn't read the spec closely
enough earlier. Sorry.
Anyhow, after reading the docs again, I think the varialiable I really
want to use is $original_domain (I'm not able to test it right now,
though), as it will contain the domain part of the address as it was
written by the sender, while $domain corresponds to the address after
alias expansion etc. I'm still not sure how $domain is set in all cases,
but it seems to me that it gets the value of qualify_domain when the
original local part matches an alias whose value is a simple user name
(i.e. the RHS address of the alias entry has no domain part), i.e. that
it's not just the local part that gets replaced during the expansion
(even though that's all the alias entry mentions.) Is this correct?