> On 7 Jan 2025, at 12:56, Ziqin Wang <[email protected]> wrote:
>
> (Sorry OlivaFN88, I forgot to reply to the list in the first email.)
>
> On 2025/1/7 22:28, OlivaFN88 <[email protected]> wrote:
>
>> Hi everyone,
>>
>> I’m looking for a filter that can meet two specific conditions. The filter
>> should reject emails that have the following conditions:
>>
>> - The ‘rcpt-to’ field matches ‘[email protected]’
>> - The ‘mail-from’ field does not match ‘[email protected]’
>>
>> Something like:
>> filter comunication phase rcpt-to match !rcpt-to "[email protected]" and
>> !mail-from "[email protected]" reject "550 Permission Denied"
>>
>> If this is possible, please let me know. Thanks a bunch!
>
> How about using filter chain?
>
> filter check-rcpt phase rcpt-to match rcpt-to { "[email protected]" } reject
> "550 Permission Denied"
> filter check-from phase rcpt-to match !mail-from { "[email protected]" }
> reject "550 Permission Denied"
> filter check-both chain { check-rcpt, check-from }
>
> --
> Ziqin
>
I dont know if it will to work for the same message.
--
Felipe Oliva