Age | Commit message (Collapse) | Author |
|
(NXDOMAIN), leading to a bounce. Precede the MX lookup with an attempt to
parse the relay as numeric string.
"reads ok" gilles@
|
|
buf_read (and in ssl_buf_read).
|
|
ok gilles@
|
|
|
|
received, append a space character. This enables other parts of
the daemon to safely index into 4th character of the reply buffer
without the risk of accessing one byte beyond NUL.
ok gilles@
|
|
ok jacekm@
|
|
|
|
bound IP address ("EHLO [1.2.3.4]") as dictated by RFC.
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.
|
|
check for states other than CLIENT_EHLO. Verify response is not
shorter than 3 chars.
From Nils Frohberg
ok gilles@
|
|
|
|
three places: set code to 530, send imsg to notify rejection, kill
lkasession
|
|
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
|
|
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@
|
|
|
|
|
|
|
|
|
|
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.
|
|
smtp protocol expects lines to end with \r\n.
if a client sends a very long line which is unfortunately read up to \r,
evbuffer_readline() will return the line, then will detect another line
when the buffer is filled again and starts with \n, returning again with
an empty line. this is a bug which trigger very rarely and usually shows
up as an empty line in the middle of headers, causing all subsequent
headers to appear as part of the body to most mail user agents.
upstream fixes this with evbuffer_readln() in version 2.0 of libevent, a
mail will be sent to see if they can backport it, meanwhile we fix it by
introducing evbuffer_readln_crlf().
discussed with and ok jacekm@
|
|
|
|
valid map id, then we have no way to know for these structures if they have
a reference to a map, or if the member was not set. make map id start at 1.
|
|
ok gilles@ jacekm@
|
|
ok jacekm@ gilles@
|
|
|
|
The 1yz and 6yz status codes are now removed prior to reporting the status
message in bounce messages, which provides an easy way to distinguish
between local and remote status messages. Initial diff from jacekm@
ok gilles@ jacekm@
|
|
free(lkasession) in lka_expand_rcpt()
- while at it, plug a very very unlikely memory leak which i spotted while
reviewing the logic
|
|
- remove prototypes from deprecated functions
|
|
|
|
the use of makemap to generate a primary domains map
|
|
smtpd is now capable of looking primary domains at runtime in a set, which
means that the following becomes possible:
map "primary" { source db "/etc/mail/primary.db" }
accept for domain map "primary" deliver to mbox
while at it fix a couple bugs in the aliases resolution path which caused
recipients to bounce if a ruleset did not have an "accept for local" rule
"diff reads good" jacekm@, flush queue & make clean
|
|
for multiple aliases maps that can be attached at the rule level. with it,
you can for example define different aliases maps for different domains or
different aliases maps for the same domain depending on the client source:
map "localiases" { source db "/etc/mail/localiases.db" }
map "netaliases" { source db "/etc/mail/netaliases.db" }
accept from 192.168.0.0/16 for local alias "localiases" deliver to mbox
accept from all for local alias "netaliases" deliver to mbox
idea discussed with jacekm@ and various other hackers, diff contains some
bug fixes too which were not part of the original diff. man page follows
very shortly ... make clean & flush queue !
|
|
- have virtual related functions take a map id instead of a map
- shrink a tiny bit ruleset matching
- add missing lka_resolve_path() call in aliases resolution leading to
issues spotted by nicm@
|
|
|
|
|
|
ok jacekm
|
|
from Tim van der Molen <tbvdm@xs4all.nl>
|
|
reported by Emmanuel Vadot and David Hill
|
|
recipients when an alias resolves to more than one.
issue spotted by martijn@bunix.org
|
|
enqueued through smtpctl
|
|
Found by LLVM/Clang Static Analyzer.
ok gilles@
|
|
control process does not try to handle it.
spotted and reported by martijn@bunix.org
|