On Tue, Jan 06, 2026 at 04:33:48PM +0100, Sidney Cadot wrote:
> Hi Crystal,
> 
> >>  Which of these two explanations is correct?
> > Neither.
> 
> This appears to be incorrect.

No, it is correct, and you are incorrect.

> The match test *is* done,

Read very carefully what I wrote earlier.

I never claimed that the match _test_ was not done.  (See explanation further
below.)

> but it has an
> implicit "for local". This was brought to my attention by some other
> people, and is consistent with a very close reading of the smtpd.conf man
> page.

So test with:

match from any for any action "my_action"
action "my_action" mda "/tmp/test_script"

where /tmp/test_script is the following:

#!/bin/sh
echo foo > /tmp/bar

Now try:

# echo foo | mail local_user_that_exists
# echo foo | mail local_user_that_does_not_exist

.. and see if /tmp/bar is created in each case.

Quoting what you said in a previous email:

On Tue, Jan 06, 2026 at 03:49:23PM +0100, Sidney Cadot wrote:
> * The match test is never done; the message is rejected even before that.
> (However, this scenario seems to contradict the behavior described in the
> man page).

The match test _is_ done.

> * The match test is done, but it fails; and thus the message is rejected.
> (This scenario begs the question how the "from any" test could fail)

The match _test_ obviously _does not fail_, as it is configured to accept
from any to any.

What fails is the action because it is set to 'mda' which is not valid
when the local user does not exist.

Reply via email to