Age | Commit message (Collapse) | Author |
|
* Log more events (especially client session) and use a better scheme
for that: each messages is prefixed with a token to easily identify
its class:
- info/warn/debug: general server messages
- smtp-in: smtp client connections
- relay: status update for relayed messages
- delivery: status update for local deliveries
* Implement "smtpctl monitor" to display updates of selected internal
counters.
* When reloading the on-disk queue at startup do not commit a message
if no envelope was submitted for that message.
* Remove unused stuff in the config parser.
ok gilles@
|
|
does not matter.
spotted by chl@
ok gilles@ chl@
|
|
- move mfa_session() prototype to smtpd.h
- make mfa session use a tree
- make static functions static
- merge mfa_session_init() into mfa_session()
ok chl@
|
|
use xcalloc() helper
remove newly unused variable
ok gilles@ eric@
|
|
The goal is to eventually have only the lka see the rules.
ok gilles@ chl@
|
|
and put it out of profiling, so it's not accounted.
While there, for PROC_PARENT:
- set smtpd_process for PROC_PARENT
- use setproctitle() like other processes
ok gilles@
|
|
- network events (CONNECT/CLOSE)
- commands (QUIT/RSET)
ok gilles@ eric@
|
|
with help and ideas from eric@
ok eric@ gilles@
|
|
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@
|
|
use STDERR_FILENO instead of hard coded value
ok gilles@
|
|
decisions *while* the message is being received by the client.
|
|
currently only HELO/EHLO, MAIL, RCPT are supported, however ... I have
voluntarily disabled filters at smtpd.conf level so people don't play with
it until the API has stabilized a bit
discussed with several people in private, no one opposed the feature
|
|
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 ...
|
|
smtpd now has an evpid associated to each delivery message, the evpid is an
u_int64_t where the upper 32 bits are the msgid, and the 32 bits are the
envelope unique identifier for that message. this results in lots of space
saved in both disk-based and ram-based queues, but also simplifies a lot of
code.
change has been stressed on my desktop, and has ran on my MX for the entire
afternoon without a regression.
|
|
|
|
|
|
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@
|
|
some rules to have a longer expiry delay than the default:
accept for [...] relay expire 8d # will stay 8 days in queue
I added the man page bits so I don't forget but I need to reword it a bit
|
|
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.
|
|
ok jacekm@
|
|
|
|
|
|
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.
|
|
|
|
|
|
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@
|
|
caused an envelope to be saved with action A_INVALID when it matches
either A_RELAY or A_RELAYVIA.
reported by various people
|
|
aliases/virtual domains resolution code.
- fix a logic bug which caused virtual domains not to be correctly
handled after one iteration of the aliases resolution code.
- introduce a few helper functions to help clean up and simplify the
lka code.
- simplify the IS_EXT/IS_MAILBOX/IS_RELAY macros so they manipulate a
struct path * instead of the mess of dereferences we were passing them.
|
|
send it the ruleset configuration, and mfa no longer needs to interpret
it and load it in memory. kill kill kill. as an added bonus: removes 88
lines of code :-)
|
|
make lka the only caller of ruleset_match(), mfa request match through imsg
which will shrink its code and help me implement virtual domains properly.
idea discussed with jacekm@
|
|
and aliases resolution on the sender before envelope is written in queue:
- mfa_test_mail() no longer calls ruleset_match()
- lka_verify_mail() no longer resolves sender and set rule action
- lka_resolve_mail() becomes dead code so just kill it
ok jacekm@
|
|
|
|
Stop pushing event handling in the imsg framework.
Instead, provide a small glue layer on top of both imsg and libevent.
This finally clearly separates event handling and imsg construction.
Sidetrack bonus: remove the mega-ugly hack of having a dummy imsg_event_add
stub in smtpctl.
ok jaceckm@
|
|
ok gilles@, jacekm@
|
|
and rules when config.c provides us with purge_config(), PURGE_MAPS and
PURGE_RULES. kills lots of lines with no functionnal change. ok jacekm@
|
|
the two or three "almost" identical versions of ruleset matching loops from
lka and mfa by having one unified function in ruleset.c; ok jacekm@
while at it, bring maildir support back to life; trivial one-liner by me
|
|
to the routing daemons by claudio@; ok gilles@
|
|
using newly introduced child struct.
Manage process titles centrally in struct smtpd.
ok gilles@
|
|
|
|
contains the missing parts + a memleak plug
|
|
of the tailq, this is how it must be done.
|
|
the configuration file again and replace current configuration with new one
in all processes. what we don't support yet is graceful restart, clients in
sessions at the moment of the reload will have a temp failure thrown at 'em
which is ok RFC-wise but which we will try to improve anyway.
tested with various setups, "diff reads good" jacekm@
|
|
|
|
ok gilles@, jacekm@
|
|
first action of an enum and we allocated a struct using calloc, but we did
not properly initialize the action for authenticated users.
while at it, change the name of path action flags so that we know at first
sight that they are path related.
this diff fixes the immediate issue but still needs work.
ok jacekm@, "we'll work out a long term solution"
|