On Fri, Mar 25, 2022 at 11:28:00AM -0400, post...@ptld.com 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 u...@example.com -> u...@example.com to break
> recursion, if i have defined 100 virtual users, ie t...@example.com
> ha...@example.com sa...@example.com etc, does that mean I need to add
> 100 entries (t...@example.com -> t...@example.com, etc) to the
> virtual_alias_maps table if i want to use a @example.com ->
> catch...@example.com?

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