Age | Commit message (Collapse) | Author |
|
greywatcher()) we know that the only files that it will ever access are
PATH_SPAMD_DB in rw mode, alloweddomains_file in r and that it will need to
execute PATH_PFCTL so we can unveil(2) them with those permissions.
OK deraadt@ millert@ beck@
|
|
in greylisting mode, it is not uncommon for an IP to get whitelisted
before it shows up on a spam blacklist. With this change, spamd
will check its blacklists before adding a WHITE entry to the
<spamd-white> pf table. If the IP matches a blacklist, the WHITE
entry will be removed. OK phessler@
|
|
- Use memset(*b, 0, len) instead of bzero(*b, len)
- Use memcpy(*dst, *src, len) instead of bcopy(*src, *dst, len)
- Use explicit_bzero(3) instead of bzero(3) to clean temporary HMAC
Remarks from deraadt@ (duly noted!!), reviewed and OK by henning@ and tb@
|
|
the program
- Add error message to syslog if privdrop didn't succeed and then exit
- Remove lint comments
OK beck@ after his suggestion and also looks good to jca@
|
|
this loads the tls certificate files pre-pledge then does the bulk of the tls
setup goo pledged.
|
|
All the work done by Ricardo Mestre <serial@helheim.mooo.com> - Thanks.
|
|
|
|
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@
|
|
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@
|
|
Use <fcntl.h> instead of <sys/{file,fcntl}.h>
ok krw@
|
|
|
|
ok okan kettenis
|
|
ok beck phessler
|
|
with backwards compatibility for records with 32-bit times.
OK deraadt@ beck@
|
|
remove the db conversion from BTREE to HASH.
ok beck@
|
|
|
|
Fixes pr/6467. (from boudewijn at indes dot com) - ok beck@
|
|
|
|
|
|
A number of small improvements:
- patch for empty lines and comments in alloweddomains_file
- remove some whitespaces at end of line.
- document comment and empty line handling
- Remove unused parameter 'r' from getopt in spamd.c, it is removed in the 'switch statement'
but not in getopt.
http://www.openbsd.org/cgi-bin/cvsweb/src/libexec/spamd/spamd.c.diff?r1=1.94;r2=1.95;f=h
- replace atoi with strtonum
- make debug output more usefull, display only what will be synced and not a second
message which prints always "sync trapped %s"
- some cosemtic and whitespace fixes.
|
|
ok deraadt@, oga@, otto@
|
|
with strtonum
|
|
|
|
to the database.
ok beck@
|
|
ok beck@, reyk@
|
|
noticed and patch from Piotr Sikora <piotr@sikora.nu>
|
|
traps.
- Change count to size_t to avoid a size_t -> int conversion.
- Since configure_spamd always returns 0, change to void.
- Since configure_spamd now returns void, remove unreachable logging
statement.
OK ckuethe and deraadt, initial diff from fgsch@ and OKed by beck.
|
|
|
|
by checking for them being in the db first.
ok millert@
|
|
mx for the first minute, to avoid problems if hosts legitimately try it
after we are down.
suggested by millert@
|
|
and this hides the evidence. Avoids a potential race when
using -M traps where a retry comes in between deletion and
whitelisting.
ok millert@
|
|
|
|
address than the primary one. spamd will trap hosts that contact this
address first without first contacting the primary.
- get it in, deraadt@
|
|
we save the entry.
ok reyk@
|
|
|
|
|
|
This adds an HMAC protected synchronization protocol for use by spamd and
spamlogd.
- spamd can receive updates from other hosts for GREY, WHITE, and TRAPPED db
entries, and will update the local /var/db/spamd accordingly.
- spamd can send updates when it makes changes to the GREY or TRAPPED
entries in the db to other hosts running spamd. (Note it does not send
WHITE entries because the other spamd will see the GREY changes and have
complete information to make appropritate decisions)
- spamlogd can send updates for WHITE db entries that it performs on the local
db to other hosts running spamd, which will then apply them on remote hosts.
note that while this diff provides synchronization for changes made to the
spamd db by the daemons, it does *not* provide for sychonizing changes
to the spamd db made manually with the spamdb command.
Synchronization protocol and most of the work by reyk@,
with a bunch of the spamd, and spamlogd stuff by me.
testing mostly at the U of A, running happily there under big load.
ok reyk@ jmc@
|
|
the connecting hosts in the tuple key when greylisting. catches
a few more bogus hosts and will let us trap based on HELO later.
Changes spamdb(8) output to include the new field.
ok deraadt@, jmc@
|
|
walk with mutiple conditions in the loop.
ok deraadt@
|
|
|
|
|
|
1) remove requirement for <> around spamtrap addresses
2) add support for /etc/spamd/alloweddomains to specify
suffixes for which any destinations that don't match
get trapped
various knf's by theo, feedback from jmc, millert, deraadt
|
|
and the rebalancing really slags big databases. Make spamd use DB_HASH
instead, and convert if the old type is noticed on startup.
Testing by me, djm, ian, others
ok deraadt@, millert@, djm@
|
|
|
|
operations. ok millert@ ages ago.
|
|
ok millert@
|
|
a list of spamtrap destination addresses in the spamd database. When
a spamtrap address gets an attempted greylist delivery, blacklist the
offending host for a day. Does not affect hosts already whitelisted.
ok deraadt@, jmc@, dhartmei@ to get it in so it can be whacked on
|
|
signal handler could be interrupted by another instance
of itself because it was used for multiple signals and
only one signal was blocked.
ok beck@ henning@
|
|
|
|
with an expire time in the past. From beck@, OK deraadt@
|