Age | Commit message (Collapse) | Author |
|
|
|
ok gilles@
|
|
- replace "users" keyword with "userbase" when providing alternate userbase
- disambiguise expansion nodes when expanding across domains and userbases
- allow use of '=' instead of '=>' when declaring a mapping
ok eric@
|
|
- handle getsockname() error in smtp_connected()
- accept '/' as part of user-part, expand to ':' as done by qmail
- fix wrong check in mda leading to bogus Return-Path header
- fix aliases parsing when there's a white space between key and separator
- some cosmethic cleanup
|
|
some log message updates.
ok gilles@
|
|
- improve logging of the transfer process
trace by me, logging by eric
|
|
* first bricks of ldap and sqlite support (not finished but both working)
* new table API to replace map API, all lookups are done through tables
* improved handling of temporary errors throughout the daemon
* improved scheduler and mta logic: connection reuse, optimizes batches
* improved queue: more tolerant to admin errors, new layout, less disk-IO
* improved memory usage under high load
* SSL certs/keys isolated to lookup process to avoid facing network
* VIRTUAL support improved, fully virtual setups possible now
* runtime tracing of processes through smtpctl trace
* ssl_privsep.c sync-ed with relayd
* ssl.c no longer contains smtpd specific interfaces
* smtpd-specific ssl bits moved to ssl_smtpd.c
* update mail address in copyright
FLUSH YOUR QUEUE. FLUSH YOUR QUEUE. FLUSH YOUR QUEUE. FLUSH YOUR QUEUE.
smtpd.conf(5) simplified, it will require adaptations
ok eric@
|
|
ok gilles@
|
|
* 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@
|
|
to a server crash, and let the smtp session fail if that happens.
spotted by todd@, discussed with eric@ and chl@
commited for gilles@
|
|
ok gilles@ eric@
|
|
|
|
we check that user is a system user first before sending the imsg
|
|
between "no match" and "internal error" (e.g. missing or broken db file).
Adapt alias expansion and ruleset matching code to check for such errors,
in which case the current processing is aborted, and a temporary failure
is reported to the smtp session.
ok gilles@
|
|
ok eric@, chl@
|
|
from a .forward file. Local deliveries for files and filters expanded
from an alias map are run as user _smtpd.
issue reported by tood@
ok gilles@ todd@
|
|
spotted by todd@
ok gilles@
|
|
During the entire expansion process, a username may be larger than
MAXLOGNAME because it may be an alias going through another expansion.
We should use a buffer that's large enough to fit a mailaddr user-part so
we avoid hitting a truncation check leading to a fatal().
ok eric@, ok chl@
|
|
- bump the expansion depth from 5 to 10
- add the current node depth to log_debug()
ok eric@, ok chl@
|
|
ie:
reject from 192.168.1.0/24 for domain "openbsd.org"
accept from 192.168.0.0/16 for domain "openbsd.org" deliver to mbox
it was documented but not working.
ok eric@ & chl@
|
|
"wow!" gilles@
|
|
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@
|
|
It's confusing and not necessary as it's only used for "buffer".
Instead, just add a "buffer" member in the structure and rename
"as_user" to "user".
The delivery_data union becomes an anonymous union in expandnode,
which is the only other place where it's used.
ok gilles@
|
|
|
|
this. Instead, set the username on the expand context, and copy it on the
expand nodes as they are inserted.
ok gilles@
|
|
ok gilles@
|
|
ok gilles@
|
|
Adapt a lot of functions in chain to use const args where required.
ok gilles@
|
|
*_get() functions can be called directly.
ok gilles@
|
|
- change expandtree_* prefix to expand_ for better readability and
because the structure might change at some point
- rename <>_free_nodes() to <>_free()
- remove unused <>_remove_node()
- refcounting has no purpose at all; just remove it as well as the
decrement/increment functions, and replace the latter with <>_insert
- expandnode flags is only used to know if it's been processed or not,
don't make it a flag but a simple field with clear name.
ok gilles@ chl@
|
|
change to a simpler implementation for it while there.
ok gilles@
|
|
- remove useless block in switch.
ok gilles@
|
|
- fix lka* function prototypes in smtpd.h
- make static functions static
- merge lka_session_init() into lka_session()
- make lka_session.c use tree.c to store sessions
ok gilles@
|
|
ok gilles@
|
|
turns out documentation got it wrong. This commit changes formats and doc,
it makes situation saner:
%A = user part of sender address
%D = domain part of sender address
%a = user part of recipient address
%d = domain part of recipient address
%u = unix account of recipient
ok eric@
|
|
priority in the DNS record. For example:
accept for domain "foo.org" relay backup "mx3.foo.org"
will relay mails for "foo.org" using only hosts with higher priority
(i.e. lower value) than "mx3.foo.org", which is supposed to be the
current server.
If the specified backup MX is not found in the DNS record, relaying
works as normal.
ok gilles@
|
|
ok eric@
|
|
queue backend within the queue process.
The scheduler sends envelope ids to the queue process which loads
the envelope and forward the request to the agent responsible for
the delivery. The result is sent by the agent to the queue which
updates the storage before notifying the scheduler.
Bounces are created and enqueued (from the client side) by the
queue process, rather than the scheduler.
ok gilles@
|
|
- replace all calls to lowercase() with calls to xlowercase()
- in the format string expansion, lowercase() all formats
we will have to reassess all calls to xlowercase() even though it has never
triggered as far as I know, we can probably gracefully fail some of them.
right now we're just keeping former behaviour.
this commit fixes issue reported by Hugo Osvaldo Barrera where a %u format
could lead to a delivery failure (ie: GILLES@openbsd.org should be expanded
to gilles, not GILLES ... only for local deliveries).
ok chl@ on the idea, ok eric@ on the diff
|
|
little code cleanup while here.
ok gilles@
|
|
ok gilles@
ok eric@ on previous versions of this patch
|
|
backend scheme. Also rename USER_GETPWNAM to USER_PWD.
ok chl@ gilles@
|
|
- move each delivery method to it's own delivery backend
- simplify smtpd.c accordingly
- rename A_EXT -> A_MDA since that's what we really do
ok eric@
|
|
"obvious ok" gilles@
|
|
ok chl@ & gilles@
|
|
a "relay... as" rule.
mikeb can now send mails.
ok gilles@ mikeb@
|
|
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@
|
|
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
|
|
From Tim van der Molen <tbvdm@xs4all.nl>
|