On Fri, Mar 25, 2022 at 11:28:00AM -0400, [email protected] wrote:

> Am I using the wrong tool for creating a catchall to accept mail for
> addresses that are not specifically defined? This setup does not
> accept mail for local linux users, all valid email addresses are
> defined in virtual_mailbox_maps.

No, though you should consider *not* implementing a catchall, these are
generally a bad idea.

> If this is the best way to setup a catchall, I have a followup
> question; Using [email protected] -> [email protected] to break
> recursion, if i have defined 100 virtual users, ie [email protected]
> [email protected] [email protected] etc, does that mean I need to add
> 100 entries ([email protected] -> [email protected], etc) to the
> virtual_alias_maps table if i want to use a @example.com ->
> [email protected]?

Yes, and generating these is easily automated.

> Is there any other way to switch off recursion behavior at a global
> level?

No.

> virtual_alias_recursion_limit = 1 Will this give me the behavior I am
> looking for or will give give me unforeseen consequences?

No, it will cause all mail delivery to non-catch-all users to fail:

            if (count >= var_virt_recur_limit) {
                msg_warn("%s: unreasonable %s map nesting for %s -- "
                         "message not accepted, try again later",
                         state->queue_id, maps->title, addr);
                state->errs |= CLEANUP_STAT_DEFER;
                UPDATE(state->reason, "4.6.0 Alias expansion error");
                UNEXPAND(argv, addr);
                RETURN(argv);
            }  

-- 
    Viktor.

Reply via email to