summaryrefslogtreecommitdiffstats
path: root/libexec/spamd/spamd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Do not fall back to using nobody if _user is missing, butthib2009-05-201-4/+3
| | | | | | | | | | error out. Add a new user _rwalld for rpc.rwalld, and use that instead of nobody, also unconditionally drop to _rwalld not only if rpc.rwalld was started with euid 0 (as root). ok deraadt@
* PR 6090 - from Olli Hauer <ohauer@gmx.de>beck2009-04-201-4/+4
| | | | | | | | | | | | | | | | 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.
* shut off an annoying gcc warning.reyk2008-07-111-2/+3
| | | | ok beck@
* PR 5621 - spamd doesn't clear the last entry from an empty TRAP list,beck2007-11-031-1/+5
| | | | noticed and patch from Piotr Sikora <piotr@sikora.nu>
* fix helo to error out if no domain is providedbeck2007-04-131-5/+13
| | | | ok millert@
* use new license, ok deraadt@beck2007-03-261-19/+11
|
* Copyright - I should share the blame.beck2007-03-261-1/+2
|
* A couple of spamd improvementsbeck2007-03-261-17/+24
| | | | | | | | | | | | | | 1) Implement the NOOP command, which now seems necessary for certain windows mail wrappers and sender verification schemes. Tested by me and sidcarter@symonds.net, who noticed the problem on his site. ok millert@ 2) Change the behaviour of the maxblack parameter, instead of hanging up immediately on new blacklisted connections when the maxblack parameter is reached, we instead make spamd not stutter at them, so the connection is instead completed quickly. This seems to handle peaks and spikes much better than the old way of doing this. ok deraadt@, with some man page changes by jmc@
* sync usage(); ok deraadtjmc2007-03-071-4/+4
|
* Add -M option to specify a local address that is a lower priority MXbeck2007-03-061-5/+46
| | | | | | address than the primary one. spamd will trap hosts that contact this address first without first contacting the primary. - get it in, deraadt@
* Make the maximum number of connections dependant on kern.maxfiles ratherbeck2007-03-061-3/+31
| | | | | than a hardcoded value. ok reyk@, deraadt@ with knfisms and saner variable names
* remove -r option that didn't work anyway.beck2007-03-051-9/+3
| | | | ok jmc@, reyk@
* revert unintentional MAXCON change back to 800, accidentally did lastbeck2007-03-051-2/+2
| | | | | commit with the U of A value, which may not be safe on all GENERICs with an unmodified kern.maxfiles
* Database synchronizaton for spamd/spamlogdbeck2007-03-041-5/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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@
* spacingderaadt2007-02-271-4/+3
|
* fix -b breakage - make greylisting actually be on by defaultbeck2007-02-271-2/+2
|
* sort options and usage();jmc2007-02-271-6/+9
|
* Flag day for spamd -beck2007-02-271-6/+6
| | | | | | | | | | 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@
* Make spamd include the HELO/EHLO identification string sent bybeck2007-02-231-4/+29
| | | | | | | | | 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@
* continue collecting lint to be sold as a parsley substitute; ok beckderaadt2007-02-231-2/+2
|
* greytrapping improvementsbeck2007-02-231-7/+7
| | | | | | | | | 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
* Make spamd error out for a greylisted session only after the DATAbeck2006-11-271-4/+6
| | | | | | | | | | command not after the RCPT command, as this helps people out when they are faced with retarded sender verification schemes - tested out by a number of people on tech@, and running at u of a for a while. Supposedly this makes verizon sender verification happy. Suggested as a stable candidate by people on tech@, I'm ok with that.
* use setresuid/gid and check for failure, ok bobhenning2006-10-291-8/+6
|
* add an -h option to override the hostname that is reported in thejcs2006-05-151-3/+9
| | | | | | SMTP banner ok beck@
* spamd can show the wrong IP address to clients in a %A message becausebeck2006-03-141-2/+2
| | | | | | | the per-connection copy of the connecting address was being pointed to the on-stack copy. Spotted (and fix suggested) by Michael Durket in pr 5046 ok deraadt@
* some cleanups prompted by lint, no really nasty bugs; ok beckderaadt2005-11-301-17/+16
|
* spacingderaadt2005-11-121-5/+5
|
* Fix handling of empty entries at the end of an address list; avoidsotto2005-08-041-3/+3
| | | | always skipping the last address. ok beck@
* have to ignore SIGPIPE in the child too or a spammer can kill spamd just byfrantzen2005-05-231-1/+2
| | | | closing the connection while we're trying to write to it
* missing getopt choice; from dennisderaadt2005-04-161-2/+2
|
* Make spamd stutter at greylisted connections for a short period before talkingbeck2005-04-141-3/+16
| | | | | | | | full speed. By default do this for 10 seconds. Many spammers disconnect by then. Adds -S option to select the amount of time greylisted connections will be stuttered at. feedback from jmc@, deraadt@, ok deraadt@
* "Greytrapping" for spamd - allow for spamd greylisting to maintainbeck2005-03-111-11/+58
| | | | | | | | 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
* - \r\n fix for QUIT commandbeck2004-11-171-2/+12
| | | | | | | | | - Implement RSET in spamd - some virus scanning products (notably symantec's viruswall) spew a RSET into the smtp stream before every attempted delivery. (noticed by reitenba@fh-brandenburg.de and some others). This ensures such things can successfully talk to a spamd greylister. ok millert@ henning@
* change default to 451 for greylisting, thanks to a number ofbeck2004-10-051-2/+2
| | | | | | | | | | | | | | people on misc, and some observations by Evan harris on the greylisting mailing list that a number of clustered mailers like aol behave better (and retry from the same IP) when they see a 451, but do not when they see a 450 (traditionally used for mailbox lock failure) 450 was the original for spamd, as the default for the tarpit is to encourage quick retries to punish blacklisted smtp servers more. This got carried over to the greylisting implementation, and isnt' really optimal for that case. ok millert@, henning@, todd@
* This should be info, from mike@tric.rubeck2004-09-181-2/+2
| | | | ok henning@
* impliment QUIT, beck okhenning2004-08-171-1/+11
|
* spacingderaadt2004-08-081-3/+3
|
* typo; andrushock@korovino.netderaadt2004-07-041-2/+2
|
* absolutely no need to include machine/endian.h after sys/types.h and sys/types.h after sys/param.hmickey2004-06-291-3/+1
|
* use getaddr/nameinfo for address resolution. beck, henning okitojun2004-06-211-9/+17
|
* fix logging. without -v, you get just the connection level, no mail data.dhartmei2004-04-031-8/+15
| | | | | with -v, you get From/To/Subject at LOG_INFO, and the first ten body lines at LOG_DEBUG. ok beck@
* nextstate() can get passed a read(2) chunk containing multiple lines,dhartmei2004-04-021-17/+25
| | | | | | so separate lines before logging headers/body. doesn't make logging more verbose, just fixes the case where chunks contain multiple lines. ok beck@
* fix problem with counter and logging spotted by danh, where loggingbeck2004-03-171-11/+11
| | | | | | would get messed up when the blacklist limit was hit. tested by danh@ and me ok cedric@
* sort options and escape a minus sign;jmc2004-03-161-2/+2
|
* Add -B option, with maxblack limit to limit the number of blacklistbeck2004-03-151-6/+28
| | | | | | | connections to something less than maxcon when greylisting. This ensures you don't completely run out of connections tarpitting spammers, and not allow real mail through. ok dhartmei@ millert@
* make window size adjustement on sockets only after the DATAbeck2004-03-141-7/+6
| | | | | | | | connection. This ensures that greylisted connections are not delayed by a small windows size, but blacklisted connections still have to send the body through a tiny window, and presumably the body is the vast majority of what is being sent anyway. ok dhartmei@ millert@
* Add signal handler to parent, so that when greylisting we don't need tobeck2004-03-131-16/+22
| | | | | | kill all three processes to make it go away. Adjust daemon() call and logging appropriately. ok henning@, millert@
* paranoia and cleanup, ensure we use free then NULL everywhere.beck2004-03-121-4/+7
| | | | ok millert@ dhartmei@
* fix bug where custom 450 messages are not displayed,beck2004-03-111-6/+6
| | | | | found by yongari@kt-is.co.kr ok dhartmei@, millert@
* fix missing space, also frombeck2004-03-101-2/+2
| | | | | yongari@kt-is.co.kr ok deraadt@