[2025-01-07 11:28] OlivaFN88 <[email protected]>
> 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”
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 "[email protected]"
!mail-from "[email protected]" 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 "[email protected]" for rcpt-to "[email protected]"
action someaction
match from any for rcpt-to "[email protected]" reject
Philipp
> If this is possible, please let me know. Thanks a bunch!
>
> --
> Felipe Oliva
>