spampd - Spam Proxy Daemon
Latest Version: 2.30 (31-Oct-05)
News (30-Aug-2012): SpamPD source is now on GitHub! http://github.com/mpaperno/spampd
BUG ALERT (22-Mar-06): On some systems, typically ones with newer versions of some Perl components, the latest released version (2.30) of spampd has a logging bug where the only thing written to the log is "%s" instead of actual messages. If this happens on your system, for now please use spampd version 2.20, available here.
spampd is a program used within an e-mail delivery system to scan messages for possible Unsolicited Commercial E-mail (UCE, aka spam) content. It uses an excellent program called SpamAssassin (SA) to do the actual message scanning. spampd acts as a transparent SMTP/LMTP proxy between two mail servers, and during the transaction it passes the mail through SA. If SA decides the mail could be spam, then spampd will ask SA to add some headers and a report to the message indicating it's spam and why. spampd is written in Perl and should theoretically run on any platform supported by Perl and SpamAssassin.
spampd version 2.20 and above is compatible with all SpamAssassin versions, including 3.
Latest changes are documented in the change log.
Here's an un-solicited comment someone sent recently regarding spampd performance:
Just to let you know: We have the SA/spampd combo up an running in a high volume environment. With 3 KAT-B Server (4x 2,5 GHz Xeon MP with Hyperthreading, 3 GB RAM) we handle 15.000 to 20.000 Mails/h (Hour!) with room to spare. We had some performance issues with the Bayes databases but now everything runns smoothly.
Version 2 Architecture
Version 2 of spampd is a major rewrite of the underlying methods. spampd no longer acts as a relay server but more as a "transparent" proxy server. That is, it never actually takes responsibility for the mail at any point. Instead, the origination and destination mail servers speak directly to each other. If a failure occurs within spampd (or SpamAssassin) during a transaction, then the mail servers will disconnect and the sending server is still responsible for retrying the message for as long as it is configured to do so. Responsibility for mail delivery always lies with the 2 mail servers, which would be "real" MTAs and not a 500 line Perl script :-) This removes a major problem with version 1 of spampd, and makes this a recommended upgrade.
While this is a much safer technique than previously employed, it does remove a possible feature which some users of spampd have implemented (sorry guys). That is redirecting spam to a spamtrap address instead of letting the message through to the original recipient. This is due to the fact that the recipient information is passed on to the destination server before the message data is scanned for spam. On the other hand it presents the possibility of rejecting spam at the S/LMTP level without having to generate bounce notices and such (see my TO DO notes in the docs for more on this).
spampd now fully supports the LMTP protocol (due to the nature of it's new transparency). Logging has been improved and is now more compatible with spamd. New parameters added: --children, --local-only, --childtimeout, --satimeout, --dose, --log-rules-hit, --add-sc-header, and --hostname. Three parameters are now deprecated: --dead-letters, --heloname, and --stop-at-threshold.
More details and further changes are documented in the change log.
spampd was initially designed as a content filter mechanism for use with the Postfix MTA. However, it has no inherent dependencies on Postfix or any other MTA. spampd has only been tested on our setup here at World Design Group, which is Red Hat Linux 7.x on standard i386-based hardware. Some more specific setup information is provided in the included documentation. Please note that although the spampd/SA combination has been tested with automatically-generated loads (and found to perform quite adequately for our needs), there are no real-world performance statistics available that we know about. USE AT YOUR OWN RISK!
spampd is written and maintained by Maxim Paperno. You can contact me at MPaperno@WorldDesign.com.
spampd contains code written by Bennett Todd (Copyright (C) 2001 Morgan Stanley Dean Witter) and is used in accordance with the GNU General Public License. The code is in the form of two Perl modules which have been included in the program. Also his smtpproxy example program served as inspiration for this version of spampd.
spampd version 1 was based on code by Dave Carrigan named assassind. Trace amounts of his code or documentation may still remain. Thanks to him for the original inspiration and code.
Various people have contributed patches, bug reports, and ideas, all of whom I would like to thank. I have tried to include credits in code comments, documentation, and in the change log, as appropriate.
Copyright, License, & Disclaimer
spampd is Copyright © 2002 by World Design Group, Inc. and Maxim Paperno
Portions are Copyright © 2001 Morgan Stanley Dean Witter as mentioned above in the CREDITS section.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The GNU GPL can be found at http://www.fsf.org/copyleft/gpl.html
Latest Version: 2.30 (31-Oct-05)
- spampd-2.30.tar.gz archive contains all of the following files
- spampd program
- spampd DOCUMENTATION as HTML (this is also in the code in POD format)
- Change log
- Sample Red Hat-style startup script (suitable for installation in /etc/rc.d/init.d)
- spampd-2.20.tar.gz -- previous version for systems with the "%s" logging issue
- Sven Mueller maintains a Debian package at http://packages.debian.org/spampd
- FreeBSD port maintained by Christian Schade/Linh Pham at http://www.freshports.org/mail/spampd/
(Send more links to post here to MPaperno@WorldDesign.com)
If you aren't familiar with SpamAssassin, then you should definitely start there (or end up there) first. There is a very helpful users discussion list for SA (see their site). For Postfix setup, be sure to read the FILTER_README document that is included with the distribution. spampd is meant to be used as an "advanced content filtering" method (some examples are included with the spampd documentation). Postfix also has a helpful users discussion list. Make sure you do your homework before you ask other people to help you!
If you really have a spampd-specific question, you can email me (the author) at MPaperno@WorldDesign.com. Also I'd like to know if you find the program helpful and what you would/did change about it.
News about updates to spampd are now posted to the spampd-announce mailing list. To join send a blank email to <firstname.lastname@example.org>. You will be asked to confirm. To leave, send a blank email to <email@example.com> or better yet follow the instructions in each list message. You can expect only a few messages per year on this list.