[2025-01-07 11:28] OlivaFN88 <felipe.n...@gmail.com> > 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”
I guess the "!rcpt-to" is a typo and actualy "rcpt-to" was meant. According to the docs each filter can have multible conditions. So you should be able to write something like: filter comunication phase rcpt-to match rcpt-to "t...@domain.com" !mail-from "allo...@domain.com" reject "550 Permission Denied" But the parser for this is currently not working. I have started to write a patch for this. More general I would use normal mail routing for this. Something like the following would be more readable. match from mail-from "allo...@domain.com" for rcpt-to "t...@domain.com" action someaction match from any for rcpt-to "t...@domain.com" reject Philipp > If this is possible, please let me know. Thanks a bunch! > > -- > Felipe Oliva >