NAME

notespam - Add a header to e-mail relayed through a spam server


AUTHOR

Jon Lasser <jon@cluestickconsulting.com>


SYNOPSIS

notespam --help

notespam --man

notespam --version

notespam [--verbose] [--spam-header header-text]


OPTIONS

--help
Print a help message and exit. May be abbreviated as -h.

--man
Print the entire manual page for the program and exit. May be abbreviated as -m.

--version
Print the version number of the program, and the license message.

--spam-header
Use header-text as the name of the header with which spam is identified. The default is X-RBL-Check. This option may be abbreviated as -s, and always requires a value.

--verbose
Print debugging information to STDERR. Multiple invocations of this flag will result in more debugging information. (The current maximum useful number of such flags is 2.) May be abbreviated as -v.


DESCRIPTION

notespam takes the text of an e-mail on STDIN and returns the text of the e-mail message (body and headers both) on STDOUT. If the message has not passed through a server marked on one of the DNS blacklists, then the message is unchanged. If the server as been marked on a blacklist, the message is unchanged except for the addition of a header (either X-RBL-Check or the value of the --spam-header option) identifying the message as spam.

The text of the X-RBL-Check or equivalent header will indicate the first relaying host identified as a spam haven and the name of the blacklist service that has so identified said host. The text of the message is included in the source code, and cannot be altered at runtime.

Multiple blacklists may be checked. By default, the files /etc/notespam.blacklist and $HOME/.notespam.blacklist are both checked. No blacklist will be used more than once, no matter how many times it is listed across all blacklist files.

Whitelists contain lists of mail relays that should not be checked against any of the blackhole lists. At this time, only numeric IP addresses may be used: hostnames are not resolved. Whitelists checked by the system reside in /etc/notespam.whitelist and $HOME/.notespam.whitelist.


FILES

/etc/notespam.blacklist
$HOME/.notespam.blacklist
List of DNS blacklists to check against. The file format is one blacklist per line. Blank lines and lines beginning with # are ignored.

/etc/notespam.whitelist
$HOME/.notespam.whitelist
List of mail relays for which DNS blacklists are not checked. The file format is identical to that of the blacklist files. At this time, only numeric IP addresses may be used: hostnames are not resolved. IP addresses may be full dotted quads (AAA.BBB.CCC.DDD), class C blocks (AAA.BBB.CCC.), class B blocks (AAA.BBB.), or class A blocks (AAA.). In the case of address blocks, the trailing dot is optional but recommended for clarity.


PREREQUISITES

The following non-standard Perl modules are required, and may be installed via CPAN:

Mail::Internet


ACKNOWLEDGEMENTS

Several lines of code were borrowed from the public domain script rbl-check.pl, written by Bjarni R. Einarsson <bre@klaki.net>, available at http://bre.klaki.net/programs/spam/rbl-check.pl.txt.