(Sorry OlivaFN88, I forgot to reply to the list in the first email.)

On 2025/1/7 22:28, OlivaFN88 <felipe.n...@gmail.com> 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 ‘t...@domain.com’
> - The ‘mail-from’ field does not match ‘allo...@domain.com’
> 
> Something like:
> filter comunication phase rcpt-to match !rcpt-to "t...@domain.com" and 
> !mail-from "allo...@domain.com" 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 { "t...@domain.com" } reject 
"550 Permission Denied"
   filter check-from phase rcpt-to match !mail-from { "allo...@domain.com" } 
reject "550 Permission Denied"
   filter check-both chain { check-rcpt, check-from }

-- 
Ziqin


Reply via email to