Age | Commit message (Collapse) | Author |
|
bring a shitload of unnecessary information everywhere. this required many
parts of smtpd to be refactored and more specifically envelope expansion.
in the process lots of code got simplified, and the envelope expansion code
has been isolated to lka_session.c with some longstanding bugs fixed.
Diff has been tested by many with no major regression reported.
armani@ spotted a bug in a setup where a domain is listed a both primary
and virtual, I will fix that in-tree as it's becoming painful to maintain
this diff out.
|
|
|
|
|
|
- kill struct alias, struct expandnode is used instead
- introduce map_parse_alias() and map_parse_virtual()
- aliases and virtual code no longer assume db(3) but use the map API which
lets them become backend agnostic AND value-checked. this actually makes
the code simpler by removing all values parsing from aliases.c
- rename K_SECRETS -> K_SECRET, K_ALIASES -> K_ALIAS for consistency the
enum has singular names.
- aliases, virtual and forward now work with an expandtree and deal with
multiple levels of resolving by merging expandtree's
more coming soon ;)
|
|
we don't need to calloc them as they won't be saved in the tree.
|
|
- during expansion, no longer create a new node for each result but try to
lookup for an existing equivalent node and increment its reference count
so that: a) we save on memory, b) we don't need to expand the same users
again and again just because they keep appearing in expansion results.
- while expanding, flag nodes as F_EXPAND_DONE so that we know which nodes
we already processed
- be smarter when expanding, if we have a clue that an iteration has not
brought any new result (because no new nodes were added and all existing
nodes have F_EXPAND_DONE), end expansion and proceed to delivery.
- various small cleanups
discussed with jacekm@ yesterday, rebuild aliases db, make clean
|
|
|
|
no longer have a direct mapping between structures saved in aliases/virtual
db and structures used at runtime during expansion.
side effects ? struct alias is smaller, databases are smaller and it is no
longer necessary to rebuild aliases/virtual databases each time jacekm@ or
I make changes to some obscure structure used indirectely during expansion
rebuild databases, flush queues, make clean
|
|
doesn't take advantage of the new structure yet, but this was a needed
change for upcoming improvements.
- introduce aliasestree_{lookup,insert,remove} to the aliases api
- rename queue_generate_id() to generate_uid() and move it to utils.c as
it is used all over the place and not only in queue
tree idea discussed with jacekm@, if you update rebuild aliases db, make
clean and flush queue
|
|
which is probably the most complex code in smtpd right now. no longer use a
single list to hold aliases to be resolved and resolved aliases, and do not
use struct alias to hold resolved aliases. instead use a delivery list that
is a list of struct path, and populate it with resolved aliases.
idea discussed with jacekm@, this needs some testing to make sure it does
not introduce a regression with aliases. flush your queue and make clean.
|
|
this commit contains mostly missing casts and cosmethic changes, do not
expect to build this anywhere but on OpenBSD, it does not contain any of
the portable glue.
|
|
causing them not to be handled when a user's homedir is set to mode 0700. I
still need to do some cleanup and make sure it works as it should, but this
diff provides better behavior than what we had.
|
|
ok jacekm@
|
|
ok gilles@
|
|
|
|
expanded envelope, orelse they will use the default action and be passed to
MTA no matter if recipient is local or not.
bug reported by Nicholas Marriott <nicholas.marriott@gmail.com>,
fixed by me and okayd by jacekm@, collaborative work ;-)
|
|
cause delivery to happen before expansion is over, causing some of
the recipients to never receive the mail. change how the mfa, lka,
queue and smtp processes communicate to ensure smtp never receives
an acknowledgment before ALL expanded envelopes are on disk. While
at it, lka was doing work which belongs in mfa, fix that also.
this is based on an idea from a talk with jacekm@, change not over
but already better than what we had.
|
|
|
|
number of arguments.
ok gilles@
|
|
ok gilles@
|
|
|
|
- printf() -> log_debug()
- be more verbose in debug mode
|
|
will probably miss this change when working on more important matters,
so it is probably better to sort them now. there is a risk of losing
the tags if a change needs to be reverted too.
written with excellent advice from jmc@
ok gilles@
|
|
which still lacks many features. bringing it in tree will help working on it
more easily.
"at this stage it should go in" henning@, "move ahead" deraadt@
|