Don's spam filtering solution First read the doc at the top of smtp.lisp (below) to understand how it works. This just describes what you have to do to install and configure it. This is a lot more complicated than I had hoped. There are several pieces working together here: - a mail accepting demon written in lisp - I've only run this in clisp. To get a recent version see http://clisp.sourceforge.net/ - source files server.lisp and smtp.lisp, available from http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/clocc/src/donc/?cvsroot=clocc - a bunch of configuration files - see below - a program for actually delivering the mail I use a recent version of sendmail, available from http://www.sendmail.org/ - cooperation from the program you use to send mail I use emacs for this. The file smtp.el, which is in the same place as the lisp files above, seems to work in xemacs 21.1. It also contains in comments the changes that make it work in xemacs 19.13. I assume that other versions will need other small tweaks. Unfortunately, different versions of sendmail require additional changes. So far sendmail-8.11.0-8 and sendmail-8.11.1 have been made to work. Of course, other mailers will need totally different modifications. If you want to imitate my installation you first need to install clisp and sendmail. Then get the files mentioned above along with this one. Read the lisp files in order to understand what's going on and look for the things to be customized. You can either change them in the source or in a separate startup file as illustrated below. You should compile the lisp files. Then create a script for running it. I use two files for that. Replace all ... with appopriate paths. ==== a shell script executable by root, something like this #! /bin/csh cd ... .../lisp.run -M .../lispinit.mem -i start.mail & ==== the start.mail loaded above, something like this (load ".../server.fas") (load ".../smtp.fas") (in-package :esmtp) (setf *mydomain* "foo.bar.net") ;; adjust (setf *log* "...") (setf *default-deliver* ".../.smtp.default-deliver") (setf *user-translations* ".../.smtp.translations") ;; other adjustments from the .lisp files, such as #+ignore ;; where user configuration files are found (defun user-file (user file) (if (equal user "root") (format nil "/.smtp.~A" file) (format nil "/export/home/~A/.smtp.~A" user file))) (sss:start-servers) (sss:serve) There are a few other system wide configuration files that are named by smtp.lisp and may be modified by the loaded file above: ==== .smtp.translations, described in smtp.lisp, something like (("postmaster" "root") ("don" "donc") ("root" "root")) ==== .smtp.default-deliver, executable by root #! /bin/sh cat $1 | sendmail -i -N never -f $2 $3 The first script must be run as root, since it has to listen on port 25. Of course this means you must NOT let sendmail or some other program listen on port 25. The normal way to run sendmail is something like sendmail -bd -q1h You should kill the process doing that and restart it without the -bd. Probably you want to change your system initialization to run sendmail with the -q argument to deliver queued messages but not the -bd which listens for incoming mail. Start the script above in place of the -bd. - The program you use to send mail has to be altered to cooperate. I use emacs for this. The file smtp.el can be loaded, again with appropriate adjustments, into appropriate versions of emacs. I again use sendmail to send mail from emacs. In this case, though, there are some problems which require adjustments to the sendmail configuration: - I've had to make /var/spool/mqueue world writable - for sendmail-8.11.1 I had to copy /etc/sendmail.cf to .cf2, and in the copy change this line Mlocal, P=/usr/lib/mail.local, F=lsDFMAw5:/|@qfmn9, ... to remove the "S" in the string after "F=" whereas in sendmail-8.11.0-8 I've removed the S from the original .cf These are both related to the fact that I use "unsafe" flags that make sendmail give up its root setuid. I'm not real happy with these but they work. I suggest sending some mail to make sure it works, and then looking at the log (var/log/maillog in linux, /var/log/syslog on sun) to see what sendmail complains about and try to adjust sendmail.cf accordingly. (Unfortunately it's not always easy to figure out what it's complaining about. openmailer: insufficient privileges to change gid is what I got in sendmail-8.11.0-8 until I stopped using the .cf2 with the S flag.