On Sunday, March 17, 2024, Viktor Dukhovni via Postfix-users <
postfix-users@postfix.org> wrote:

> > >     - You can reject SMTP recipients via various restriction checks
> > >       that perform access(5) lookups against tables of your choice.
> >
> > How can I do it not based on the network or domain name but a specific
> > u...@domain.name?
>
> By putting that address in an access(5) table with "REJECT <reason>" as
> the RHS.  Then add:
>
>     main.cf:
>         indexed = ${default_database_type}:${config_directory}/
>         smtpd_recipient_restrictions =
>             permit_mynetworks,
>             reject_unauth_destination,
>             check_recipient_access ${indexed}rcpt-access
>
>     rcpt-access:
>         # Postmap after each change
>         user1@domain.example REJECT 5.1.1 purported to not exist
>         user2@domain.example REJECT 5.7.1 access denied
>         ...
>
…

> There is no error(8) table, that's delivery agent.  There's a transport
> table:
>
>     main.cf:
>         # See "indexed =  ..." above
>         transport_maps = ${indexed}transport
>
>     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…

It would seem that the 2nd solution using transport_maps is simpler to
implement, but there may be a variety of reasons to choose one solution
over the other. Is there some relatively straightforward criteria to
consider which of your two “solutions” is better or more efficient?

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

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

Reply via email to