better SA-Exim autoinstall for Debian stable
Brian Lavender <[email protected]>
| Newsgroups | gmane.mail.exim.spamassassin |
|---|---|
| Message-ID | <[email protected]> |
I suppose I ought to just create my own package repository, but I thought it was just cool to create a script that would automatically give me SA-Exim from a basic Debian stable install. This one has a lot less splatter (aka less shotgun approach). No comments yet. #!/bin/bash # Fri Jun 18 04:27:23 PDT 2004 # # Automatic script to get SA-Exim running on Debian stable. # Warning. This script uses specific Debian package repositories # that may change. Use at your own risk. # # Brian E. Lavender # [email protected] if [ "$EUID" != "0" ] then echo "This script must be run as root!!" exit fi sources="/etc/apt/sources.list" grep -q unstable $sources if [ $? -ne 0 ] then echo "deb-src http://mirrors.kernel.org/debian/ unstable main" >> $sources fi grep -q ametzler $sources if [ $? -ne 0 ] then cat << __END__ >> $sources ### Andreas Metzler's Exim v4 packages, backported from sid deb http://www.logic.univie.ac.at/~ametzler/debian/exim4manpages/ woody/ deb http://www.logic.univie.ac.at/~ametzler/debian/gnutls/ woody/ __END__ fi apt-get update set -e dpkg --set-selections << __END_SELECTIONS__ fakeroot install debconf-utils install html2text install debhelper install libdigest-hmac-perl install libdigest-md5-perl install libdigest-sha1-perl install libnet-perl install liburi-perl install libmime-base64-perl install libmailtools-perl install libtime-hires-perl install libtimedate-perl install libhtml-parser-perl install libhtml-tagset-perl install libssl-dev install libnet-dns-perl install libtest-simple-perl install exim purge exim4 install exim4-base install exim4-config install exim4-daemon-light install libgnutls10 install libasn1 install libgnutls7 install libgcrypt1 install libgcrypt7 install liblzo1 install libpth14 install libopencdk4 install libopencdk8 install libtasn1-0 install libtasn1-2 install __END_SELECTIONS__ apt-get -y dselect-upgrade while read package do apt-get source $package pushd ${package}-* fakeroot debian/rules binary popd dpkg -i ${package}*.deb done << __END__ libdigest-nilsimsa-perl razor __END__ apt-get source spamassassin pushd spamassassin* fakeroot debian/rules binary popd dpkg -i spamc*.deb dpkg -i spamassassin*.deb apt-get source sa-exim pushd sa-exim-*/debian cat << __END__ > control Source: sa-exim Section: mail Priority: optional Maintainer: Sander Smeenk <[email protected]> Build-Depends: lynx, debhelper (>= 4.1.16) Standards-Version: 3.5.10 Package: sa-exim Architecture: any Depends: exim4-daemon-light (>>4.30-1) | exim4-daemon-heavy (>>4.30-1) | exim4-daemon-custom (>>4.30-1), spamc | spamassassin (<<2.30-2), ${shlibs:Depends}, debconf (>= 1.0.0) Description: Use spamAssassin at SMTP time with the Exim v4 MTA SA-Exim lets you use spamAssassin at SMTP time with the Exim v4 MTA, which enables you to do many things with incoming Emails, including refusing them before they come in, or even teergrubing the sender (i.e. slowing him down, by tying his resources) . Homepage: http://marc.merlins.org/linux/exim/sa.html __END__ popd pushd sa-exim* fakeroot debian/rules binary popd dpkg -i sa-exim*.deb cat << __END__ > /etc/default/spamassassin # /etc/default/spamd.conf # Duncan Findlay # WARNING read README.spamd before using. THERE ARE SECURITY RISKS! # Change to one to enable spamd ENABLED=1 # Options # See man spamd for possible options. The -d option is automatically added. OPTIONS="-c -m 10 -a -H" # Set nice level of spamd #NICE="--nicelevel 15" __END__ /etc/init.d/spamassassin restart perl -pi~ -e 's/^SAEximRunCond: 0/SAEximRunCond: 1/' /etc/exim4/sa-exim.conf echo "Run dpkg-reconfigure exim4-config and use small config files" echo "Then reload exim4 with the following command" echo "/etc/init.d/exim4 reload" -- Brian Lavender http://www.brie.com/brian/