Age | Commit message (Collapse) | Author |
|
Make the imsg protocol network-safe.
it might be network safe, but half the imsg based daemons on my firewalls
dont run anymore.
|
|
Currently the receiver fetches an imsg via imsg_get() and if he expects
an fd, he then calls imsg_get_fd() to fetch the next fd queued on the
imsgbuf from which the imsg came.
This changes hides the fd queueing mechanism to the API user. When closing
an imsg with an fd, the message is flagged so that the receiving end knows
it must dequeue the fd in imsg_get() and return it with the imsg structure.
This way there is no (less) possible screw up from imsg_get_fd() not being
called directly after imsg_get() by the user. The retreived imsg is
self-contained.
ok pyr@, "I like that" henning@
|
|
ok pyr@
|
|
add a flag field, use u_int32_t for pid_t and extend type to 32 bits
for padding.
ok pyr@
|
|
|
|
currently synced daemons' imsg.c, imsg.h and buffer.c
|
|
ok eric@, claudio@
|
|
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@
|
|
defaulting to smtpctl-mode; aja@ ok
|
|
default; from gilles@
|
|
mail.local(8) does it for us in mbox case, maildir doesn't need
this, and in ext. mda case we delegate it to the external program.
committing on gilles@'s behalf
|
|
|
|
ok gilles@, jacekm@
|
|
ok by a desillusionned gilles@
|
|
|
|
will prevent a confusion with sc_config which will be a pointer to the
actual configuration.
|
|
Pointed out by giovanni <qgiovanni@gmail.com>
|
|
configuration reloading without killing active sessions; ok 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
|
|
that would trigger when smtpd.conf does not have an "accept for local" rule
and we attempt to deliver to a domain for which we are a destination.
spotted by jacekm@, fix by me and ok jacekm@
|
|
endpwent is not needed unless setpwent (with stayopen = 1) or getpwent
was used. getpwuid/getpwnam do not use getpwent; i think people must
be assuming this. we are going to improve the man pages for this.
ok gilles
|
|
|
|
sessions; ok jacekm@
|
|
use event_del/event_add instead; ok gilles@
|
|
to the routing daemons by claudio@; ok gilles@
|
|
when connect timesout and we close the fd, reset session fd to -1
in session_destroy(), only attempt to close session fd if != -1
fixes a fatal in session_destroy() which happened because we closed a fd
after a timeout, but the session still assumed the fd to be opened.
|
|
host which requests client certificates:
accept [...] relay via [...] ssl certificate "mycert"
diff from Josh Elsasser <josh@elsasser.org>, tested and okayed by me with
no change but the addition of status 554 to the state machine to deal with
remote host telling us it doesn't like our certificate.
|
|
|
|
|
|
- reorder alphabetically and add mta to the statistics
|
|
decremented below 0 after the recent change that moved stats to shared mmap
memory. session_destroy() which is called from mta and smtp processes didnt
differentiate between them and decremented the counter when we had outgoing
sessions destroyed.
|
|
|
|
|
|
|
|
that the ip address/subnet parsing isn't done in the same way as
in other daemons.
fix by gilles@
|
|
|
|
ok gilles@
|
|
1) each state may have 2 responses sent quickly;
2) more responses are delayed exponentially, up to a defined limit.
Delay count is user visible (smtp.errors.delays).
ok gilles@
|
|
|
|
in session_pickup into unreached code, so remove them; ok gilles@
|
|
paused, configuring, or exiting; ok gilles@
|
|
this code to privsep smtp process; ok gilles@
|
|
code cleaner; ok gilles@
|
|
using newly introduced child struct.
Manage process titles centrally in struct smtpd.
ok gilles@
|
|
process individually whenever stats need to be fetched, keep stats
in MAP_ANON shared memory allocated by parent.
This means control has direct access to stats and can respond very
quickly without troubling any other daemon processes.
ok gilles@
|
|
that has an implicit local source. instead we create static "localhost" map
before the configuration file is parsed, we fill it with every single local
address we can find, and we have rules with implicit local source reference
that special map.
this unbreaks a behavior which I hated and which prevented:
accept for all relay
from accepting relaying if LOCAL session was initiated on any interface but
lo0.
|
|
|
|
ok gilles@
|
|
contains the missing parts + a memleak plug
|