6c9c63a232
Moved portions of spamdyke's code from spamdyke.c into new .c and .h files to make it a little easier to understand and maintain. Added base64_encode() and base64_decode() to transfer data to/from base64 format. Added md5() to produce an MD5 digest of a data block. Turns out this wasn't necessary for spamdyke, only for test_smtpauth_crammd5. Oops. Renamed the "make openbsd" command to "make bsd" since apparently all *BSD distributions don't need -lresolv. Renamed search_ip_file() to search_tcprules_file() and extended it to support IP ranges, rDNS names and remote info like tcprules does (according to http://cr.yp.to/ucspi-tcp/tcprules.html). This makes the IP black/ whitelist files much more flexible. This will be much handier in the next version (AKA The Great Configuration Overhaul). Modified middleman() and smtp_filter(), added exec_checkpassword() so spamdyke can do SMTP AUTH, either by offering it itself or observing the qmail traffic. LOGIN, PLAIN and CRAM-MD5 are supported. Changed the STRLEN_ macros in spamdyke.h to use a single STRLEN() macro so the preprocessor will count characters instead of doing it by hand. Much safer this way. Removed "-a"'s (max number of recipients per message) dependence on "-d" (local domains file). With SMTP AUTH, the local access file and whitelists, this shouldn't be necessary. Added process_access() to process local access files (e.g. /etc/tcp.smtp) and export environment variables based on the source of the incoming connection. Added relay prevention based on the content of the local access file(s) and the list(s) of local domains. Connections from remote sources that are granted relay permission in the access file(s) are allowed to relay. Users who authenticate with SMTP AUTH are allowed to relay. All others must send to local addresses only. Added a series of test scripts to exercise all of spamdyke's filters and options. This should make it easier to regression test new versions. Changed search_file() and search_tcprules_file() to compare domain names in a case insensitive manner. Changed canonicalize_path() to reduce all file paths to lowercase. This was causing graylisting to be inconsistant. Reported by bcarr@purgatoire.org. |
||
---|---|---|
.. | ||
patches | ||
DESCR | ||
distinfo | ||
hacks.mk | ||
Makefile | ||
PLIST |