summaryrefslogtreecommitdiffstats
path: root/libexec/spamd/sdl.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make blacklist entries override the whitelist. When running spamdmillert2017-10-181-1/+45
| | | | | | | | 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 a binary search to speed up blacklist lookups. OK phessler@millert2017-10-171-36/+130
|
* Change spamd to use divert-to instead of rdr-to.reyk2015-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | | 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@
* Use address-family specific lists of addr/mask entries instead ofmillert2015-01-131-124/+193
| | | | | | | | 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@
* Avoid a crash (free of bogus pointer) when there is a syntax errormillert2015-01-081-13/+18
| | | | | | 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@
* Userland reallocarray() audit.doug2014-10-111-4/+4
| | | | | | | Avoid potential integer overflow in the size argument of malloc() and realloc() by using reallocarray() to avoid unchecked multiplication. ok deraadt@
* PR 5621 - spamd doesn't clear the last entry from an empty TRAP list,beck2007-11-031-1/+22
| | | | noticed and patch from Piotr Sikora <piotr@sikora.nu>
* use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgderaadt2007-09-021-2/+2
|
* use new license.beck2007-03-261-20/+12
|
* spacingderaadt2007-03-051-2/+2
|
* continue collecting lint to be sold as a parsley substitute; ok beckderaadt2007-02-231-18/+18
|
* Fix handling of empty entries at the end of an address list; avoidsotto2005-08-041-3/+4
| | | | always skipping the last address. ok beck@
* paranoia; beck okderaadt2004-02-261-1/+2
|
* Add -g option for greylisting support for spamd. The greylisting techinquebeck2004-02-261-8/+8
| | | | | | | | | originates from a paper by Evan Harris which can be found at http://projects.puremagic.com/greylisting/. This implementation makes spamd allow for non-blacklisted addresses to be treated as "greylisted". where they are tracked in a db file, and whitelisted by addition to a pf table when the same envelope from and to are retried from the same source IP address. Testing by many, ok deraadt@
* can free(NULL)deraadt2003-09-261-10/+4
|
* knfderaadt2003-09-201-4/+5
|
* pf spelling policedavid2003-08-221-2/+2
| | | | ok dhartmei@ jmc@
* bring protos into scopederaadt2003-07-061-1/+3
|
* Better handling of parse errors and/or allocationcloder2003-03-031-15/+47
| | | | | | | failures. Add two functions, sdl_free() and sdl_clear(), use them where needed. Misc. other cleanup and optimization. OK deraadt@
* knfderaadt2003-03-031-9/+12
|
* always set ptr to NULL after free; from cloderderaadt2003-03-031-1/+4
|
* knfderaadt2003-03-021-7/+9
|
* knfderaadt2003-03-021-3/+3
|
* Spamd changes to add blacklist awareness to spamd, new spamd-setup.plbeck2003-03-021-0/+233
which configures individual blacklists sources and deals with whitelists. Perl still needs some stylistic changes as suggested by bmc which will go in shortly. ok deraadt@