Age | Commit message (Collapse) | Author |
|
- log_warn() admin that a map that's needed by an envelope is no longer in
the configuration file
|
|
- rename all occurences of struct map_secret to map_credentials
- do not fatal if the credentials map has disappeared, instead make the
auth fail with a lookup failure. the mail will be temporary failed so
it stays in queue until admin fixes smtpd.conf, removes mail, or lets
it expires
|
|
with help and ideas from eric@
ok eric@ gilles@
|
|
- use correct endianness when dumping/loading port
- use the right flag set when dumping/loading flags
- keep and use the authmap name when needed, rather than an id that
might change when smtpd is restarted
- dump/load the authmap name with the envelope
- remove the rule struct from rq_batch as only the relay info is useful
ok gilles@
|
|
couple of load/dump functions to convert to and from a human readable fmt.
while at it kill struct delivery and merge back its fields to the envelope.
this basically means we shouldn't require users to flush their queues every
time we make a change to struct envelope.
work is not done, but we're at a better state than the binary fsqueue so
we'll improve it in-tree.
has been running on my own box for the last 12 hours or so
ok eric@, chl@
|
|
ok gilles@ chl@
|
|
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.
|
|
discussed with and ok gilles@
|
|
no functionnal change
|
|
struct message ...
|
|
written by eric@. it is still experimental but still better than what we
had earlier so ... we'll improve in tree :)
diff by me with *lots* of help from eric@, tested by todd and I (and a
few people out there)
|
|
|
|
|
|
authenticated relaying. one can create many maps holding credentials and
name them however he/she wants, just like any other map.
teach smtpd how to select a credentials map at the rule-level allowing a
setup to relay through the same MX with different credentials depending
on the source.
smtpd.conf.5 updated to reflect changes with help from jmc@
|
|
is way more optimized than what we had earlier and there's definitely stuff
we want to keep, however it is early optimization that doesn't account for
many features and makes them hard (if not impossible) to write without
ugly workarounds that ruin the purpose of the optimizations.
the backout goes to 30 May's right before the commit and catches up on all
the non-queue related commits that happened since then.
i'll work on reintroducing the ideas from this queue when the basic
features we expect from a MTA are implemented.
suggested on tech@ about a week ago, no objections, several "please make
smtpd move forward" mails from hackers and tech readers.
|
|
attempt to expand the local delivery buffer when relaying mail, it was
kind of ok before but no longer is)
- use the same buffer for local deliveries to files and commands
tested by jmc@ and I
|
|
length of its expand buffer. this commit introduces a new lka_expand()
that has been simplified, that fixes the bug and that is more robust.
callers of lka_expand() can now determine that it has failed and throw
the recipient at session time.
lka_expand() rewrite by oga@, changes around it by me, tested on a few
different setups but no feedback from tech@ so ... let me know if it's
breaking something for you
|
|
%U for sender localpart
%D for sender domainpart
diff sent to tech@ by Gregory Edigarov <greg@bestnet.kharkov.ua>, timeout
by jacekm@, ok by me
|
|
|
|
ok jacekm@
|
|
|
|
|
|
queue rewrite. Proper fix after gilles wakes up.
|
|
|
|
Major goals:
1) Fix bad performance caused by the runner process doing full queue
read in 1s intervals. My Soekris can now happily accept >50 msg/s
while having multi-thousand queue; before, one hundred queue would
bring the system to its knees.
2) Introduce Qmail-like scheduler that doesn't write as much to the
disk so that it needs less code for servicing error conditions,
which in some places can be tricky to get right.
3) Introduce separation between the scheduler and the backend; these
two queue aspects shouldn't be too tied too each other. This means
that eg. storing queue in SQL requires rewrite of just queue_backend.c.
4) Make on-disk queue format architecture independent, and more
easily extensible, to reduce number of flag days in the future.
Minor goals:
ENOSPC no longer prevents delivery attempts, fixed session limiting
for relayed mail, improved batching of "relay via" mails, human-readable
mailq output, "show queue raw" command, clearer logging, sending
of single bounce about multiple recipients, exact delay= computation,
zero delay between deliveries while within session limit (currently
1s delay between re-scheduling is enforced), mta no longer requests
content fd, corrected session limit for bounce submissions, tiny
<100B queue files instead of multi-KB, detect loops before accepting
mail, reduce traffic on imsg channels by killing enormous struct
submit_status.
|
|
expand to two rules each having its own condition rather than one rule
with a tail queue of conditions. this simplifies code a bit and removes a
couple hacks.
basic testing by oga and me
|
|
- 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 ;)
|
|
map_parse_secret() converts a map value into a struct map_secret. lka no
longer needs to do any parsing, it simply calls map_lookup() with kind
K_SECRETS, checks if it returned a !NULL value, and call lka_encode_secret
to safely do the base64 encoding.
|
|
will be used to select the appropriate map parser. make sure every call
to map_lookup() is updated. map_lookup() currently ignores the value.
|
|
channels to parent, mda, mta, lka, smtp, and control. This leaves
just the channel to queue, which forwards imsgs on runner's behalf
and redirects any replies back to it.
OK gilles@
|
|
|
|
|
|
|
|
stdio(3) backends, though for now we only enable db(3). this is the first
commit of a serie to improve maps and everything related.
idea discussed with and diff okay jacekm@
|
|
fatalx() on a lowercase() call in some cases. make sure lka uses a buffer
capable of holding a localpart, and do not attempt getpwnam() if we know
it's going to fail anyway...
issue reported by Ben Lindstrom <mouring@eviladmin.org>
|
|
logging on runtime.
Based on claudio@'s work on ripd, ospfd, ospf6d, dvmrpd, ldpd, bgpd.
With help/ideas/testing from gilles@ jacekm@ todd@
ok jacekm@
|
|
|
|
to get upset by custom soft/hard ulimit settings.
Suggested by todd@
|
|
possibility for fd-starvation fatal when under heavy load.
|
|
logging of successful deliveries until all MXs were tried, plus add logging
of 5yz replies.
tested by todd@, "reads ok" gilles@
|
|
from the temporary imsg buffer.
ok gilles@
|
|
|
|
|
|
- more cosmethic changes to help readability
- fix memory leaks
- if deliverylist is empty, it means something went bad during expansion,
reject recipient
|
|
|
|
expandtree, this makes a lot of code clearer and removes quite a bit of
complexity from various places.
|
|
|
|
three places: set code to 530, send imsg to notify rejection, kill
lkasession
|
|
- 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
|
|
the virtual domains support as it was in my way. this time, make it work as
it should: userpart+foobar@domainpart becomes:
path->user = userpart+foobar
path->domain = domainpart
path->pw_name = userpart
discussed quickly with jacekm@
|