COMPILE
Compile commands:
for Solaris and linux
# gcc -L/usr/local/lib -ldjbdns -lmysqlclient -lresolv -I/usr/local/include -o
SAN SAN.c
for FreeBSD
# gcc -L/usr/local/lib -ldjbdns -lmysqlclient -I/usr/local/include -o SAN SAN.c
The program needs mysqlclient library and djbdns library.
/usr/local/lib/libmysqlclient.so
/usr/local/lib/libdjbdns.so
These files must be in the "/usr/local/lib" directory.
Include files must be in the "/usr/local/include" directory.
mysql client library can be downloaded from:
http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-boost-5.7.16.tar.gz
libdjbdns library can be downloaded from:
http://smarden.org/pape/djb/manpages/djbdns-pd-1.05.tar.gz
OPERATION
This program reads email from standart input.
Example:
#cat email.txt |./SAN
Sender address is passed to the program as an environments variable SENDER
For offline test first set SENDER variable.
In the shell (sh and bash)
# SENDER=name@domain.com
# export SENDER
# cat email.txt |./SAN
In the qmail sytem, this program is executed with .qmail (dot-qmail) file in the
user Maildir.
The content of the .qmail file
################################
./Quarantine/
|./SAN
./Maildir/
###############################