summaryrefslogtreecommitdiffstats
path: root/libexec/spamd-setup
AgeCommit message (Collapse)AuthorFilesLines
2017-07-07allow fetching lists from https:// URLs toodjm1-2/+2
2017-07-07switch user to _spamd before executing ftp(1) to fetch lists.djm1-6/+34
sprinkle in some closefrom(2); ok deraadt@ beck@
2016-03-31Don't use .Aq for syntax elements that require ASCII "<>".schwarze1-4/+4
Bug reported by Christian Heckendorf <mbie at ulmus dot me>, patch by me. OK jmc@ bentley@
2016-01-04pledge(2) spamd-setup(8)mestre1-5/+8
It needs these annotations, to at least run the operations next to them: stdio: malloc(3) rpath: open(2) inet: connect(2)/socket(2) proc: fork(2) exec: execvp(3) While here remove netinet/in.h since all we need is already in arpa/inet.h and sort the headers alphabetically OK beck@
2015-12-12Remove NULL-checks before free(). ok tb@mmcc1-3/+2
2015-06-03Do not assume that asprintf() clears the pointer on failure, whichmillert1-4/+3
is non-portable. Also add missing asprintf() return value checks. OK deraadt@ guenther@ doug@
2015-01-20Allocate a bit more memory to reduce the change of having tomillert1-9/+13
realloc() which is expensive for large blacklists.
2015-01-19Does not need netinet/ip_ipsp.hderaadt1-2/+1
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt1-2/+4
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-14Replace "errx(1, "malloc failed")" with "err(1, NULL)" to getmillert1-9/+9
standard "Cannot allocate memory" message.
2015-01-13Fix printing of number of whitelist entries in debug mode.millert1-4/+7
2015-01-13Use address-family specific lists of addr/mask entries instead ofmillert1-13/+16
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@
2014-10-09obvious reallocarray() conversionsderaadt1-6/+7
2013-09-15Some missing .Pa macros in FILES sections;schwarze1-5/+3
from Jan Stary <hans at stare dot cz>; discussed with jmc@.
2012-12-04remove some unnecessary sys/param.h inclusionsderaadt1-2/+1
2009-09-09Change the way memory is allocated to reduce memory footprint. Loading theclaudio1-80/+68
large uatraps uses now around 8 times less memory. Other cleanup includes a fast implementation of imask() (stolen from bgpd), killing some unused code and try to estimate the memory needed in add_blacklist() to reduce the realloc() calls. Tested by many (sthen, matthieu, Stephan A. Rickauer) OK beck@, sthen@
2009-06-02Protect errno.ray1-3/+5
OK millert
2009-02-19correct description of spamdb-setup blacklist only mode;jmc1-5/+3
fixes documentation/6083; original diff and pr from Kami Petersen ok sthen
2008-10-03beef up the description of -D a little, and don;t imply thejmc1-2/+5
option somehow terrorises spamd-setup;
2008-10-03-D before -d;jmc2-6/+6
2008-10-03New option -D to daemonize spamd-setup for early bootup use. This avoidsderaadt2-7/+15
spamd-setup hanging if there are various (network?) issues and the system not proceeding to multiuser so that this can be debugged. We do not use & for startup in /etc/rc because this makes the spamd-setup a child of the rc scripts after bootup (that is gross) Problem reported in PR 5864, change discussed with beck, ok millert
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgderaadt1-3/+3
2007-05-31convert to new .Dd format;jmc1-2/+2
2007-03-08update to describe current behaviour;jmc1-21/+29
with some help from millert and beck
2007-02-27spamd.conf lives in /etc/mail now;jmc1-3/+3
2007-02-27fix synopsis and order options;jmc1-4/+4
2007-02-27Flag day for spamd -beck2-14/+14
1) config files move to /etc/mail 2) -g option goes away in spamd-setup and spamd - greylisting is now the default 3) option change to spamd, -b addr becomes -l addr. 4) -b option in spamd-setup and spamd to turn on old blacklisting mode. Man page shortly to be flensed to make this easier to explain ok deraadt@ millert@
2007-02-25Add usage() and error out if given bogus arguments.millert1-1/+17
2007-02-24When greylisting we don't actually need to use the <spamd> pf table.millert2-32/+64
We just do no-rdr for things in <spamd-white> and rdr the rest to spamdb. OK beck@
2007-02-14Fix some realloc() off-by-one errors found by ray@.millert1-13/+7
Also simplify fix_quoted_colons() to avoid realloc entirely since the output buffer is at most 2x the length of the input buffer. Parts adapted from a diff from tdeval@. OK ray@, beck@
2007-02-09Fix off by one in blacklist memory allocation. From tdeval@millert1-2/+2
2006-05-11fix some type definitionsdhill1-10/+13
ok beck
2006-03-26Remove an extraneous prototypekjell1-2/+1
From Andrey Matveev
2006-03-26More KNF. Prodding from ray@kjell1-76/+76
No binary change.
2006-03-26Get this closer to KNF (get rid of block-declared vars)kjell1-30/+19
ok beck@
2006-03-26KNF. No binary change.kjell1-27/+27
2006-01-17Include <sys/param.h> to get MAX macromillert1-2/+2
2005-05-24Remove -ansi as that means expose only C89 interfaces.millert1-2/+2
2005-03-02process the last line of an address list even if it's not terminateddhartmei1-4/+4
by newline. found by Rod Whitworth. ok beck@
2004-09-16clean C for a changederaadt1-19/+14
2004-06-29absolutely no need to include machine/endian.h after sys/types.h and sys/types.h after sys/param.hmickey1-2/+1
2004-04-28fd leaks; beck okderaadt1-2/+4
2004-02-26paranoia; beck okderaadt1-2/+11
2004-01-29spamd-setup(8) does not take a file arg;jmc1-2/+1
from Okan Demirmen (PR 3657); ok deraadt@
2004-01-21clean from jmcderaadt1-2/+3
2004-01-21New spamd configuration method. Many people have trouble with the spamderaadt3-14/+59
RBL sites being slow, so now we will provide the maps ourselves through our www mirrors around the world. We can also now write our own internal translators for maps that are in bad formats, and place them into the www space in the correct format. tested by beck, djm
2004-01-21cleanupderaadt1-15/+19
2003-08-22pf spelling policedavid1-4/+4
ok dhartmei@ jmc@
2003-07-29spacesderaadt1-2/+2
2003-07-06bring protos into scopederaadt1-1/+25