summaryrefslogtreecommitdiff
path: root/libexec/spamd
AgeCommit message (Collapse)Author
2015-12-12Remove NULL-checks before free(). ok tb@mmcc
2015-12-10tighten the pledge for spamd, from Ricardo Mestre <serial@helheim.mooo.com>Bob Beck
this loads the tls certificate files pre-pledge then does the bulk of the tls setup goo pledged.
2015-12-08Initially pledge spamdBob Beck
All the work done by Ricardo Mestre <serial@helheim.mooo.com> - Thanks.
2015-12-05adjust to newer tls_read/_write semantics.Henning Brauer
quite involved, due to tls_read potentially needing to write and tls_write potentially needing to read (in the reneg case); that not fitting the spamd model too well - it needs to keep a little more state. help & ok bluhm & beck
2015-12-02in response to EHLO, don't offer STARTTLS if we already completed theHenning Brauer
STARTTLS dance. ok millert
2015-12-02I misread the standard when adding TLS; clients are supposed to start overHenning Brauer
and issue a new EHLO after STARTTLS. The misunderstaning seems to be common, so we'll still grok MAIL FROM right after the STARTTLS dance, as well as accepting a second EHLO. ok phessler beck millert
2015-12-02fix error messages to say tls_write after tls_write and not tls_read...Henning Brauer
with bluhm
2015-11-29Document that the pfdev check for 63 is /dev/fd/ only contains those nodesTheo de Raadt
2015-09-10read, tls_read, and tls_write return ssize_tBob Beck
jointly with jsing@
2015-09-10fix after libtls api changesBob Beck
ok jsing@
2015-08-12start replacing some \*([GL]t;Jason McIntyre
2015-08-12divert-to a table needs an address family;Jason McIntyre
from steve shockley ok sthen
2015-07-27use file system path (.Pa) semantic markup macros where appropriate.Igor Sobrado
ok jmc@
2015-05-18Change spamd to use divert-to instead of rdr-to.Reyk Floeter
divert-to has many advantages over rdr-to for proxies. For example, it is much easier to use, requires less code, does not depend on /dev/pf, works in-band without the asynchronous lookup (DIOCNATLOOK ioctl), saves us from additional port allocations by the rdr/NAT code, and even avoids potential collisions and race conditions that could theoretically happen with the lookup. Heads up: users will have to update their spamd PF rules from rdr-to to divert-to. spamd now also listens to 127.0.0.1 instead of "any" (0.0.0.0) by default which should be fine with most setups but has to be considered for some special configurations. Based on a diff is almost two years old but got delayed several times ... beck@: "now is the time to get it in" :) Tested by many With help from okan@ OK okan@ beck@ millert@
2015-04-18Convert many atoi() calls to strtonum(), adding range checks and failureTheo de Raadt
handling along the way. Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
2015-04-14wrap a long lineTheo de Raadt
2015-03-12Use poll(2) instead of select(2). A pointer to the struct pollfdTodd C. Miller
is embedded in each struct con so the descriptors can't get out of sync with the pfd[] array. OK deraadt@
2015-02-22Set the TLS ciphers to "compat" mode, restoring the previous behaviour.Joel Sing
2015-02-15Don't use Aq macros when <> is intended; they are not the same thing.Anthony J. Bentley
ok schwarze@
2015-02-12Change TLS_PROTOCOLS_DEFAULT to be TLSv1.2 only. Add a TLS_PROTOCOLS_ALLJoel Sing
that includes all currently supported protocols (TLSv1.0, TLSv1.1 and TLSv1.2). Change all users of libtls to use TLS_PROTOCOLS_ALL so that they maintain existing behaviour. Discussed with tedu@ and reyk@.
2015-02-07put -G and it's args back onto one line in SYNOPSIS, to avoid having mandocJason McIntyre
split it; while here, zap trailing whitespace;
2015-02-07add STARTTLS support, using the shiny libtls.Henning Brauer
Rationale: when you publish DANE records for certificate pinning, you MUST offer TLS on the indicated service. Not offering TLS is verboten since that would re-open the door for a MitM. This is obviously fundamentally incompatible with having spamd in front of your mailservers - spamd kinda is a MitM here, but intentional and utterly valid. DANE is desirable because it allows one to not have to trust the broken SSL CA model, and, depending on the mode chosen, even show the SSL cert mafia the middle finger by not needing them at all. ok reyk jsing bob
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2015-01-13Move debug printf for duplicate af to correct location.Todd C. Miller
2015-01-13Remove bogus getopt.h include.Todd C. Miller
2015-01-13Use address-family specific lists of addr/mask entries instead ofTodd C. Miller
a union that can store either ipv4 or ipv6. The old method used 4x as much memory as was really needed for ipv4. The spamd-setup protocol has changed from: tag;message;a/m;a/m;a/m...\n to :tag;message;af;count;a/m;a/m;a/m...[af;count;a/m;a/m;a/m]\n OK phessler@ "nice" beck@
2015-01-08Avoid a crash (free of bogus pointer) when there is a syntax errorTodd C. Miller
reading the config socket by clearing the entire blacklist struct instead of just the tag string. Also avoid holes in the blacklist array on error since the code can't cope with them. OK beck@
2014-12-30Use a 1MB realloc() increment instead of an 8KB one for the configTodd C. Miller
connection buffer. Significantly speeds up spamd-setup for lage blacklists. Also free the buffer when we are done with it so memory can be returned to the system (as it can grow quite large). OK deraadt@
2014-12-29Minor cleanup:Todd C. Miller
o doreply() just calls build_reply() o remove a few dead stores and useless variables o use the asprintf() return value OK deraadt@
2014-11-23Delete a bunch of unnecessary #includesPhilip Guenther
Use <fcntl.h> instead of <sys/{file,fcntl}.h> ok krw@
2014-11-22/dev/random has created the same effect as /dev/arandom (and /dev/urandom)Theo de Raadt
for quite some time. Mop up the last few, by using /dev/random where we actually want it, or not even mentioning arandom where it is irrelevant.
2014-10-11Fix manpage: -y only takes interface names, and doesnt take ip addresses.Landry Breuil
Fix example while here. ok back@
2014-10-11Userland reallocarray() audit.Doug Hogan
Avoid potential integer overflow in the size argument of malloc() and realloc() by using reallocarray() to avoid unchecked multiplication. ok deraadt@
2014-10-09obvious reallocarray() conversionsTheo de Raadt
2014-09-16less sendmail;Jason McIntyre
2014-09-01Simplify the syslog.conf example: .info means that *and higher*Philip Guenther
ok beck@
2014-03-26strdup() returns NULL if out of memory, we should check it.Gleydson Soares
OK beck@
2013-11-27unsigned char for ctypeTheo de Raadt
ok okan kettenis
2013-11-19add a bunch of missing prototypesTheo de Raadt
ok beck phessler
2013-11-19repair format strings for time_t, and some missing protosTheo de Raadt
ok beck phessler
2013-11-19the time being handled here is strictly unsigned 32 bitTheo de Raadt
ok beck phessler
2013-08-21Remove the use of time_t in the greylist db file and use int64_t insteadTodd C. Miller
with backwards compatibility for records with 32-bit times. OK deraadt@ beck@
2012-12-04rather than a mishmash of headers, this only needs <stdint.h>Theo de Raadt
with guenther
2012-10-02while it's of little harm, it's also been 5.5 years (and 8 releases),Okan Demirmen
remove the db conversion from BTREE to HASH. ok beck@
2012-09-27remove some history details which have been around for long enoughJason McIntyre
to no longer be relevant; ok beck
2012-06-19use warn() instead of perror(), like the rest of the code doesTheo de Raadt
from Liam J. Foy
2012-04-19rate-limit accept(); small tweaks and such along the way from gilles,Theo de Raadt
millert, camield..
2012-04-18merge some whitespace changes before bigger changesTheo de Raadt
2012-04-13Don't assume that the new conffd is a unset in the fd_set, it could be aTheo de Raadt
recyle of a fd which is still set. ok claudio
2011-03-19fix rdr-to example (requires direction); from James TurnerOkan Demirmen
ok jmc@