March 2023 - Installing SpamAssassin on Slackware 14.2
Posted 03-22-2023 at 01:51 PM by tix
Updated 03-23-2023 at 01:15 AM by tix (Added section on upgrading perl package)
Updated 03-23-2023 at 01:15 AM by tix (Added section on upgrading perl package)
Tags mail server, spamassassin
#!/bin/bash
# spamassassininstall.sh
# Installation of SpamAssassin on Slackware 14.2 x86_x64 Kernel 4.4.301 Mail Server
# Prepared by: Kiptoo Kibowen, tkibowen@gmail.com
# This document is for educational purposes!
# Tunawakilisha +254! (Representin' the +254)
#
# Propaganda:
# LONG LIVE TUX! LONG LIVE LINUX! LONG LIVE SLACKWARE! LONG LIVE OPEN SOURCE!
#
#
# ========Some Background==========
# Previously Spamassassin was installed on Slackware 14.2 way back in 2021 and it was straight forward installation
# This new SpamAssasin installation was done due to fresh install of Slackware 14.2 after my previous hard disks complained of some SMART thing about hard disks failing :(
# So had to re-install Slackware 14.2 on new hard disks in March 19th, 2023
# It took me three (3) days of hacking to figure out how to install SpamAssassin on Slackware 14.2 given that many perl and Slackware packages had changed or upgraded
#
# ========FYI -> For Your Information =====
# Lines starting with hash (#) are comments
# Run this script as as root user
# In case you are working remotely via SSH
# Change to root user -> su
# Start a new screen ...... yes I said it .... screen .... LOL!
# screen -S <session name>
# In case you get disconnected, simply reconnect, and change to root user and reconnect your screen - yes view your screen! Resume your screen! .... ahahhahhhehehehehhe!! LOL! =
# you can see the pid of the screen by running ps ax|grep -i screen
# screen -r <screen session>
# <screen session> is any name you fancy --> example -> screen -S spamassassin
# Be careful!
# Don't type exit when using screen session as it will kick you out -> for more info on safely leaving your screen on (LOL!) read the man pages for screen
# Read the comments throughout this document as it may point a desperate soul in some meaningful direction ....
# As usual with any hack .... read ..... read .... read .... read .....
#
# ========Some Basic Requirements==========
# Cup of black coffee -- if possible a coffee maker
# A sleeping bag or blanket - may need to sleep next to your Linux server
# You sanity must be questionable - You must have some degree in madness - Fully sane (normal) people have better things to do than hack away at Linux
# Slackware Linux 14.2 64bit (x86_x64) - Hardware in my case was HP box with Intel Core 2 duo 3.16 GHz, 4GB of memory, 500 GB hard disk and high speed ethernet cards (~_~)
# Relatively high speed internet connection ...
# Remember we are doing this for fun (*_*) -> LINUX IS FUN!!!
#
# ========Let's roll!!============
# Wee!! Nani amekula chakula yangu!! (Hey! Who has eaten my food!)
#
# **********************************************************************
# Starting us off as per LQ - https://www.linuxquestions.org/quest...ey_ptr-891317/
#
#using perl installer cpan -> first install regular dependencies required by SpamAssassin
##additional dependencies per post from http://littlesvr.ca/linux-stuff/arti...lack-spam-filt
#TRIAL 1 - tried to install Spam Assassin
#
#
## install failed...
#after many hours - SpamAssassin complained of these two
#
#
#
##After some further .... reading ..... reading ..... reading ....
#Came across this post on updating perl modules using cpan itself without installing other fancy softwares
# https://stackoverflow.com/questions/...atest-versions
##to update all modules
##start the cpan command line shell by issuing the command 'cpan'
##in the cpan shell, type > upgrade /(.*)/
#
# ---------------------- MODIFICATION :::: BEGIN :::: March 23rd, 2023 ----------------------
#After running the upgrade command via the cpan shell, cpan spit out the following errors:
# The most logical thing to do was to update perl instead of forcing installation of the packages listed above then being left with a broken system
# While still inside the cpan shell, ran the following command to update perl
#
#
#During the install you are asked to replace the existing perl or install alongside -> the safer option is to install the new perl alongside the old perl .... LOL!
#
#Upgraded all perl packages again
#
#in the cpan shell, type > upgrade /(.*)/
#
# The packages whining about perl managed to install with exception of the MaxMIND package .... kontinue reading below
#
# ---------------------- MODIFICATION :::: END :::: March 23rd, 2023 ----------------------
# Kontinue ...
#
#TRIAL 2 - finally try installing the spamassassin
#
#
# install failed
#
#AAAAACCCKKKKKKKK!!! (~_~)
# Wapi hio umbwa? (Where is that dog?)
#
## ---> SpamAssassin installation fails citing MaxMind::DB::Reader::XS in case of errors
# When installing SpamAsssassin Tux complained about the package
#
# Previously got the following mesasge when running uprade using the cpan shell --> upgrade /(.*)/
# (optional) MAXMIND/MaxMind-DB-Reader-XS-1.000009.tar.gz: writemakefile NO '/usr/bin/perl5.22.2 Build.PL' returned status 256 (SEE COMMENT ABOVE MODIFICATION :::: March 23rd, 2023 - solved this perl problem)
#
#
#
When trying to install from bash using ---->
#
# MaxMind failed to install
#
#
#Tux complained about libmaxmind of which Tux said I needed to upgrade
#
# AFt8r several .... reading ... reading .... reading .... reading ....
# Came across: https://sotirov-bg.net/slackpack/pack.cgi?id=4677
# Sure enought checked Slackware 14.2 packaged using pkgtool and libmaxmind was not listed.
# So went ahead and downloaded from :::: http://slackpack.ludost.net/packages...86_64-1gds.txz
# Download is for intel architecture and also for slackware 14.2 x86_x64 architecture although there exists for slackware 14.1 which is i586 architecture
# Installed using pkgtool
#
##installed MaxMind
#
##Success!!
#TRIAL 3 - finally try installing the spamassassin
#
#spamassassin craps out with error relating to
#
# Running the cpan install for Net::LibIDN2
#
#
#complains with some more errors relating to idn2. file wich is part of the libidn2 library
#Slackware 14.2 comes packaged with libidn1 which current Net::LibIDN2 complains about compatibility
#
#After reading .... reading ... reading ....
# No worries
# need to download libidn2 library
# which the libidn2 library craps out citing lack of idn2.h header files which are part of the libidn2 package
#
# BUT FIRST!!! using pkgtool -> need to remove original libidn1 version before installing libidn2 to avoid any conflict
# slackware already has libidn (version 1) installed of which you need to remove but also take a backup from
# https://slackware.pkgs.org/14.2/slac...k14.2.txz.html
# --> #
#Alright!! ahahahahahhhehehehehehehhehehehhhiiihhihihihihi!!! ARRRRRrrrrr...... l8tr!!!
# using instructions from https://englanders.us/~jason/howtos/?howto=libidn2
#as regular user - get libidn2-2.0.4 as libidn2-2.0.5 gives errors when running make --> "fatal: not a git repository"
# #decompress the libidn2 archive file first using lzip to uncompress *.lz extension
#
#untar the libidn2 archive
#
#change into directory housing the extracted libidn2 archive
#
#run configure script configure
#
#build using make
#
#make install (as root user)
#
#wooooohoooooooooooo!!! all was success!!!! hahhhahhahahhahaahh! heehhehehehehehhhheheh!! hihhihihihiihihihihihihih!! LOL! ARRRrrrrr...... L8tr!!
#TRIAL 3 try reinstalling spamassassin
#
##WOOOOOOOOOOOOOOOOOOOOOOOOOOOHHHHHHHHHHHHHHHHHHHHHHHHHHHHHOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!! SUCCESS!!!
##after about 2 hours of nail biting and picking thy nose ..... SUCCESS! SpamAssassin is installed in /usr/local/bin
# Tunawakilisha +254! (Representin' the +254!)
# ---- END -----
# spamassassininstall.sh
# Installation of SpamAssassin on Slackware 14.2 x86_x64 Kernel 4.4.301 Mail Server
# Prepared by: Kiptoo Kibowen, tkibowen@gmail.com
# This document is for educational purposes!
# Tunawakilisha +254! (Representin' the +254)
#
# Propaganda:
# LONG LIVE TUX! LONG LIVE LINUX! LONG LIVE SLACKWARE! LONG LIVE OPEN SOURCE!
#
#
# ========Some Background==========
# Previously Spamassassin was installed on Slackware 14.2 way back in 2021 and it was straight forward installation
# This new SpamAssasin installation was done due to fresh install of Slackware 14.2 after my previous hard disks complained of some SMART thing about hard disks failing :(
# So had to re-install Slackware 14.2 on new hard disks in March 19th, 2023
# It took me three (3) days of hacking to figure out how to install SpamAssassin on Slackware 14.2 given that many perl and Slackware packages had changed or upgraded
#
# ========FYI -> For Your Information =====
# Lines starting with hash (#) are comments
# Run this script as as root user
# In case you are working remotely via SSH
# Change to root user -> su
# Start a new screen ...... yes I said it .... screen .... LOL!
# screen -S <session name>
# In case you get disconnected, simply reconnect, and change to root user and reconnect your screen - yes view your screen! Resume your screen! .... ahahhahhhehehehehhe!! LOL! =
# you can see the pid of the screen by running ps ax|grep -i screen
# screen -r <screen session>
# <screen session> is any name you fancy --> example -> screen -S spamassassin
# Be careful!
# Don't type exit when using screen session as it will kick you out -> for more info on safely leaving your screen on (LOL!) read the man pages for screen
# Read the comments throughout this document as it may point a desperate soul in some meaningful direction ....
# As usual with any hack .... read ..... read .... read .... read .....
#
# ========Some Basic Requirements==========
# Cup of black coffee -- if possible a coffee maker
# A sleeping bag or blanket - may need to sleep next to your Linux server
# You sanity must be questionable - You must have some degree in madness - Fully sane (normal) people have better things to do than hack away at Linux
# Slackware Linux 14.2 64bit (x86_x64) - Hardware in my case was HP box with Intel Core 2 duo 3.16 GHz, 4GB of memory, 500 GB hard disk and high speed ethernet cards (~_~)
# Relatively high speed internet connection ...
# Remember we are doing this for fun (*_*) -> LINUX IS FUN!!!
#
# ========Let's roll!!============
# Wee!! Nani amekula chakula yangu!! (Hey! Who has eaten my food!)
#
# **********************************************************************
# Starting us off as per LQ - https://www.linuxquestions.org/quest...ey_ptr-891317/
#
#using perl installer cpan -> first install regular dependencies required by SpamAssassin
Quote:
cpan -fi Digest::SHA1
cpan -fi Digest::HMAC_MD5
cpan -fi Encode::Detect
cpan -fi IP::Country
cpan -fi Net::IP
cpan -fi Net::DNS
cpan -fi NetAddr::IP
cpan -fi Net::Ident
cpan -fi IO::Socket::INET6
cpan -fi IO::Socket::SSL
cpan -fi Mail::SPF
cpan -fi Mail::DKIM
cpan -fi Digest::HMAC_MD5
cpan -fi Encode::Detect
cpan -fi IP::Country
cpan -fi Net::IP
cpan -fi Net::DNS
cpan -fi NetAddr::IP
cpan -fi Net::Ident
cpan -fi IO::Socket::INET6
cpan -fi IO::Socket::SSL
cpan -fi Mail::SPF
cpan -fi Mail::DKIM
Quote:
cpan -fi HTTP::Date
cpan -fi HTML::Parser
cpan -fi Razor2
cpan -fi LWP::UserAgent
cpan -fi HTML::Parser
cpan -fi Razor2
cpan -fi LWP::UserAgent
#
Quote:
cpan -fi Mail::SpamAssassin
## install failed...
#after many hours - SpamAssassin complained of these two
#
Quote:
cpan -fi Math::Int128
Quote:
cpan -fi Net::Works::Network
##After some further .... reading ..... reading ..... reading ....
#Came across this post on updating perl modules using cpan itself without installing other fancy softwares
# https://stackoverflow.com/questions/...atest-versions
##to update all modules
##start the cpan command line shell by issuing the command 'cpan'
##in the cpan shell, type > upgrade /(.*)/
#
# ---------------------- MODIFICATION :::: BEGIN :::: March 23rd, 2023 ----------------------
#After running the upgrade command via the cpan shell, cpan spit out the following errors:
#The most recent version "1.58" of the module "warnings"#
#is part of the perl-5.36.0 distribution. To install that, you need to run
# force install warnings --or--
# install R/RJ/RJBS/perl-5.36.0.tar.gz
# Failed during this command:
# JCRISTY/Image-Magick-7.1.0-0.tar.gz : make NO
# RURBAN/Net-Ping-2.75.tar.gz : make_test NO
# JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz : make_test NO
# SIDNEY/Mail-SpamAssassin-4.0.0.tar.gz : make_test NO
# (optional) THOR/Net-LibIDN2-1.02.tar.gz : writemakefile NO -- No 'Build' created
#
# (optional) MAXMIND/MaxMind-DB-Reader-XS-1.000009.tar.gz: writemakefile NO '/usr/bin/perl5.22.2 Build.PL' returned status 256
# XSAWYERX/perl-5.28.3.tar.gz : make NO isa perl
# RJBS/perl-5.36.0.tar.gz : make NO isa perl
# The most logical thing to do was to update perl instead of forcing installation of the packages listed above then being left with a broken system
# While still inside the cpan shell, ran the following command to update perl
#
Quote:
install R/RJ/RJBS/perl-5.36.0.tar.gz
#During the install you are asked to replace the existing perl or install alongside -> the safer option is to install the new perl alongside the old perl .... LOL!
#
#Upgraded all perl packages again
#
#in the cpan shell, type > upgrade /(.*)/
#
# The packages whining about perl managed to install with exception of the MaxMIND package .... kontinue reading below
#
# ---------------------- MODIFICATION :::: END :::: March 23rd, 2023 ----------------------
# Kontinue ...
#
#TRIAL 2 - finally try installing the spamassassin
#
Quote:
cpan -fi Mail::SpamAssassin
# install failed
#
#AAAAACCCKKKKKKKK!!! (~_~)
# Wapi hio umbwa? (Where is that dog?)
#
## ---> SpamAssassin installation fails citing MaxMind::DB::Reader::XS in case of errors
# When installing SpamAsssassin Tux complained about the package
#
Quote:
MaxMind::DB::Reader::XS
# (optional) MAXMIND/MaxMind-DB-Reader-XS-1.000009.tar.gz: writemakefile NO '/usr/bin/perl5.22.2 Build.PL' returned status 256 (SEE COMMENT ABOVE MODIFICATION :::: March 23rd, 2023 - solved this perl problem)
#
Quote:
XSAWYERX/perl-5.28.3.tar.gz : make NO isa perl
Quote:
RJBS/perl-5.36.0.tar.gz : make NO isa perl
When trying to install from bash using ---->
#
Quote:
cpan -fi MaxMind::DB::Reader::XS
#
#
#Tux complained about libmaxmind of which Tux said I needed to upgrade
#
# AFt8r several .... reading ... reading .... reading .... reading ....
# Came across: https://sotirov-bg.net/slackpack/pack.cgi?id=4677
# Sure enought checked Slackware 14.2 packaged using pkgtool and libmaxmind was not listed.
# So went ahead and downloaded from :::: http://slackpack.ludost.net/packages...86_64-1gds.txz
# Download is for intel architecture and also for slackware 14.2 x86_x64 architecture although there exists for slackware 14.1 which is i586 architecture
# Installed using pkgtool
#
##installed MaxMind
#
Quote:
cpan -fi MaxMind::DB::Reader::XS
#TRIAL 3 - finally try installing the spamassassin
#
Quote:
cpan -fi Mail::SpamAssassin
#
Quote:
Net::LibIDN2
#
Quote:
cpan -fi Net::LibIDN2
#complains with some more errors relating to idn2. file wich is part of the libidn2 library
#Slackware 14.2 comes packaged with libidn1 which current Net::LibIDN2 complains about compatibility
#
#After reading .... reading ... reading ....
# No worries
# need to download libidn2 library
# which the libidn2 library craps out citing lack of idn2.h header files which are part of the libidn2 package
#
# BUT FIRST!!! using pkgtool -> need to remove original libidn1 version before installing libidn2 to avoid any conflict
# slackware already has libidn (version 1) installed of which you need to remove but also take a backup from
# https://slackware.pkgs.org/14.2/slac...k14.2.txz.html
# --> #
#Alright!! ahahahahahhhehehehehehehhehehehhhiiihhihihihihi!!! ARRRRRrrrrr...... l8tr!!!
# using instructions from https://englanders.us/~jason/howtos/?howto=libidn2
#as regular user - get libidn2-2.0.4 as libidn2-2.0.5 gives errors when running make --> "fatal: not a git repository"
# #decompress the libidn2 archive file first using lzip to uncompress *.lz extension
#
Quote:
lzip -d libidn2-2.0.4.tar.lz
#
Quote:
tar -xvf libidn2-2.0.4.tar
#
Quote:
cd libidn2-2.0.4
#
Quote:
./configure --prefix=/usr --infodir=/usr/info --libdir=/usr/lib64 --mandir=/usr/man --disable-static --disable-nls
#
Quote:
make
#
Quote:
make install
Quote:
#try re-installing Net::LibIDN2
# cpan -fi Net::LibIDN2
# cpan -fi Net::LibIDN2
#TRIAL 3 try reinstalling spamassassin
#
Quote:
cpan -fi Mail::SpamAssassin
##after about 2 hours of nail biting and picking thy nose ..... SUCCESS! SpamAssassin is installed in /usr/local/bin
# Tunawakilisha +254! (Representin' the +254!)
# ---- END -----
Total Comments 0