CVSROOT:        /cvs
Module name:    src
Changes by:     e...@cvs.openbsd.org    2012/09/27 12:57:25

Modified files:
        usr.sbin/smtpd : expand.c lka_session.c smtpd.h 

Log message:
clarify the alias expansion code.

The session manages a list of nodes to process. A node has a link to the
parent node from which it has been expanded, and a link to the rule that
led to its creation. Depending on its type and the associated rule, each
node is either "expanded" to create new nodes or "submitted" to create a
final envelope.  Nodes which have already been seen, either processed or
not, are discarded to avoid loops.

The expansion process is bootstrapped by creating an EXPAND_ADDRESS node
from the original dest, with no rule and no parent.  It is done when all
nodes have been expanded or if an error occurs before.  The expand depth
is limited 5 levels.  The whole expansion fails if the limit is reached.

While there, make sure that only one .forward file is queried at a time,
and only append the subfolder tag in the maildir case.

Fixe issues with some virtual map setups where the dest would get mixed
up, and make the whole expansion process generally easier to follow.

ok chl@ gilles@

Reply via email to