The Perfect SpamSnake - Ubuntu Jeos 10.10 Maverick Meerkat
|
Submitted by Rocky (Contact Author) (Forums) on Mon, 2010-11-29 17:23. :: Anti-Spam/Virus | Ubuntu | Postfix
The Perfect SpamSnake - Ubuntu Jeos 10.10Author: Rocky Postfix w/Bayesian Filtering and Anti-Backscatter (Relay Recipients via look-ahead), Nginx/Uwsgi, Mysql, Dnsmasq, MailScanner (Spamassassin, ClamAV, Pyzor, Razor, DCC-Client), Baruwa, SPF Checks, FuzzyOcr, Sanesecurity Signatures, Greyfix, KAM, Scamnailer, FireHOL (Iptables Firewall), Relay Recipients Script, Webmin (Optional), Outgoing Disclaimer with alterMIME (Optional) This tutorial shows how to set up an Ubuntu Jeos based server as a spamfilter in Gateway mode. In the end, you will have a SpamSnake Gateway which will relay clean emails to your MTA. You will also be able to view your incoming queue, train your SpamSnake and carry out a few more advanced operations via Baruwa. I cannot offer any guarantees that this will work for you, the same way it’s working for me. I will use the following software: Credit goes to the guys at HowToForge and the developers of MailScanner, Baruwa, Clamav, Nginx/Uwsgi, Mysql, Postfix, Spamassassin, Razor/Pyzor/DCC and Firehol.
BASE INSTALL1. Install minimum vm option
POST INSTALLATION1. Get root PrivilegesEnable the root login by running the following and giving root a password. You can then directly log in as root: sudo passwd root
2. Configure The NetworkBecause the Ubuntu installer has configured our system to get its network settings via DHCP, we have to change that now because a server should have a static IP address. Edit /etc/network/interfaces and adjust it to your needs (in this example setup I will use the IP address 192.168.0.100): vi /etc/network/interfaces # This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
Then restart your network: /etc/init.d/networking restart vi /etc/hosts
and make it look like this: 127.0.0.1 localhost.localdomain localhost 192.168.0.100 server1.example.com server1 # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts Now run: echo server1.example.com > /etc/hostname Afterwards, run: hostname Both should show server1.example.com now.
3. Change The Default Shell/bin/sh is a symlink to /bin/dash, however we need /bin/bash, not /bin/dash. Therefore we do this: dpkg-reconfigure dash Install dash as /bin/sh? <-- No Install a few packages and requirements that are needed later on: apt-get install binutils cpp fetchmail flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl libdb4.6-dev libpcre3 libpopt-dev lynx m4 make ncftp nmap openssl perl perl-modules unzip zip zlib1g-dev autoconf automake1.9 libtool bison autotools-dev g++ build-essential telnet wget gawk
4. Caching Dnsmasqapt-get install dnsmasq vi /etc/dnsmasq.conf and make Dnsmasq listen on localhost: listen-address=127.0.0.1 vi /etc/resolv.conf and append the following to the top of the list: nameserver 127.0.0.1
5. Install Mysqlapt-get install mysql-client mysql-server libdbd-mysql-perl You will be asked to provide a password for the MySQL root user - this password is valid for the user root@localhost as well as root@server1.example.com, so we don't have to specify a MySQL root password manually later on: New password for the MySQL "root" user: <-- yourrootsqlpassword
|



Recent comments
1 day 23 hours ago
2 days 8 hours ago
2 days 11 hours ago
2 days 12 hours ago
2 days 14 hours ago
2 days 15 hours ago
2 days 17 hours ago
2 days 18 hours ago
3 days 10 hours ago
3 days 11 hours ago