Installing spamass-milter on BlueOnyx

yum install sendmail-milter

yum install milter-greylist.x86_64

vi /etc/mail/greylist.conf
/etc/init.d/milter-greylist restart

vi /etc/mail/sendmail.mc
dnl INPUT_MAIL_FILTER(`greylist’,`S=local:/var/run/milter-greylist/milter-greylist.sock’)
define(`confMILTER_MACROS_CONNECT’, `j, {if_addr}’)
define(`confMILTER_MACROS_HELO’, `{verify}, {cert_subject}’)
define(`confMILTER_MACROS_ENVFROM’, `i, {auth_authen}’)
dnl define(`confMILTER_MACROS_ENVRCPT’, `{greylist}’)
dnl INPUT_MAIL_FILTER(`clamav’, `S=local:/var/run/clamav/clamav-milter.sock, F=T, T=S:4m;R:4m’)dnl
dnl INPUT_MAIL_FILTER(`spamassassin’, `S=local:/var/run/spamass-milter/spamass-milter.sock, F=T, T=S:6m;R:6m;E:15m’)dnl
dnl INPUT_MAIL_FILTER(`spamassassin’, `S=local:/var/run/spamass-milter/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m’)dnl
dnl define(`confMILTER_MACROS_CONNECT’,`t, b, j, _, {daemon_name}, {if_name}, {if_addr}’)dnl
dnl define(`confMILTER_MACROS_HELO’,`s, {tls_version}, {cipher}, {cipher_bits}, {cert_subject}, {cert_issuer}’)dnl
make -C /etc/mail
/etc/init.d/sendmail restart

chkconfig milter-greylist –levels 35 on

cd
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/spamass-milter-0.3.2-3.el6.x86_64.rpm
rpm2cpio spamass-milter-0.3.1-30.el6.x86_64.rpm  | cpio -idmv

mc

cp etc/rc.d/init.d/spamass-milter /etc/init.d/
cp etc/sysconfig/spamass-milter /etc/sysconfig/
cp usr/sbin/spamass-milter /usr/sbin/
cp usr/share/* /usr/share/
cp -R usr/share/* /usr/share/
cp var/lib/spamass-milter /var/lib/
cp -R var/lib/spamass-milter /var/lib/
cp -R var/run/spamass-milter /var/run/

/usr/sbin/groupadd -r sa-milt
/usr/sbin/useradd -r -g sa-milt -d /var/lib/spamass-milter -s /sbin/nologin -c “SpamAssassin Milter” sa-milt
/sbin/chkconfig –add spamass-milter
/etc/init.d/spamass-milter restart
more etc/sysconfig/spamass-milter
/etc/init.d/spamass-milter restart

 

 

wget http://download.savannah.gnu.org/releases/spamass-milt/spamass-milter-0.3.2.tar.gz

wget http://download.savannah.gnu.org/releases/spamass-milt/spamass-milter-0.3.2.tar.gz
tar -xzvf spamass-milter-0.3.2.tar.gz
cd spamass-milter-0.3.2
ll
./configure
yum install gcc
./configure
more config.log
yum install gcc-c++
./configure
make
ll
more Makefile
make install
updatedb
locate spamass-milter
mv /usr/local/sbin/spamass-milter /usr/sbin/spamass-milter
mv /usr/local/share/man/man1/spamass-milter.1 /usr/share/man/man/man1/spamass-milter.1.gz
/etc/init.d/spamass-milter restart
vi /etc/mail/sendmail.mc
make -C /etc/mail && /etc/init.d/sendmail restart && tail -f /var/log/maillog
ll /etc/MailScanner/bayes/bayes_*
spamd –help
vi /etc/init.d/spamassassin
tail -f /var/log/maillog
cd ..
ll
cd test/
ll
mc
cd /var/lib/spamass-milter/
ls -al
cd ..
ls -al
chown -R sa-milt spamass-milter
ll
chown -R sa-milt:sa-milt spamass-milter
tail -f /var/log/maillog
vi /etc/mail/sendmail.mc
make -C /etc/mail && /etc/init.d/sendmail restart && tail -f /var/log/maillog
chown -R sa-milt:apache /var/lib/spamass-milter
tail -f /var/log/maillog
grep GTUBE /var/log/maillog
vi /etc/mail/sendmail.mc
make -C /etc/mail && /etc/init.d/sendmail restart && tail -f /var/log/maillog
exit
ll
locate sed

 

Flush sendmail queue

Sendmail is my preferred MTA and i have it installed on every system we use. Often i have the need to flush sendmail queue and let emails flow throught again.

It’s simple to let sendmail flush out all queued messages, use this command:

sendmail -v -q

This BASH line will flush the entire queue with a high verbosity, so it will be quite easy any debugging action…

Sometimes it can happen that a busy system (when the load reaches some high levels) enqueues all messages. This is normally managed by a setting in sendmail.cf file:

# load average at which we just queue messages
#O QueueLA=8

# load average at which we refuse connections
#O RefuseLA=12

I personally discurage the editing of sendmail.cf, since i prefer to modify the sendmail.mc:

vi /etc/mail/sendmail.mc

Add, if they’re not present, the following lines:

define(`confQUEUE_LA', `25')dnl
define(`confREFUSE_LA', `26')dnl

In this case we are setting sendmail to queue (without delivery) messages when the machine’s load in higher than 25, and refuse new connections when the load is over 26…. consider not to leave those values in a production environment!

After doing this you should recompile your configuration with:

make -C /etc/mail
/etc/init.d/sendmail restart

The last command will restart sendmail with it’s new configuration.