On Mon, Mar 18, 2024 at 12:20:09AM -0700, Glenn Tenney via Postfix-users wrote:

> >     transport:
> >         u...@domain.name    error:5.1.1 purported to not exist
> >
> >
> 
> Thank you very much. A question please… the above two “solutions” seem to
> accomplish very similar tasks: to reject user@domain.example issuing an
> error to the sender… but…

Yes, quite similar, though not completely identical.

> It would seem that the 2nd solution using transport_maps is simpler to
> implement,

Only if you don't already have any access(5) checks.  Either way, you
add an entry to a table.

The transport(5) approach makes the recipient *undeliverable* even for
locally submitted mail, and even after alias expansion, but either way
only the *verabatim* recipient address is rejected after SMTP "RCPT TO".

> but there may be a variety of reasons to choose one solution
> over the other.

Mostly a matter of taste, the recipient restrictions are the more common
approach, but the transport(5) mapping to "error" is also fine.

> Is there some relatively straightforward criteria to consider which of
> your two “solutions” is better or more efficient?

Neither is noticeably more "efficient", either way a cheap table lookup.

> It’s clear that there are going to be multiple ways to accomplish the
> same task.

Yes, many ways, and overlap with per-address class valid recipient
tables, ... (local_recipient_maps, virtual_mailbox_maps,
relay_recipient_maps).

Which is why just cargo-cult is difficult to specify without the full
picture of your entire setup, but that's too much work to take in unless
you hire a paid consultant.  In your place, I'd have stuck with Sendmail
on FreeBSD, while you're learning to use Postfix on some toy machines,
reading docs more deeply, ...

Another option is a turnkey solution, such as: https://mailinabox.email

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to