--- dspam-3.6.6.orig/config.guess +++ dspam-3.6.6/config.guess @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2004-07-19' +timestamp='2006-02-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,13 +17,15 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. @@ -53,7 +55,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -66,11 +68,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -104,7 +106,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -123,7 +125,7 @@ ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -196,64 +198,23 @@ # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amd64:OpenBSD:*:*) - echo x86_64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - cats:OpenBSD:*:*) - echo arm-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - luna88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit 0 ;; + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -306,37 +267,43 @@ # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; + exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; *:OS400:*:*) echo powerpc-ibm-os400 - exit 0 ;; + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -344,32 +311,32 @@ else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; + exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -378,10 +345,10 @@ esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -393,10 +360,10 @@ echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -407,40 +374,40 @@ # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -464,32 +431,33 @@ exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -505,29 +473,29 @@ else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -535,7 +503,7 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -550,14 +518,18 @@ exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit 0 ;; + exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then @@ -571,28 +543,28 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -654,9 +626,19 @@ esac if [ ${HP_ARCH} = "hppa2.0w" ] then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else @@ -664,11 +646,11 @@ fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -696,152 +678,177 @@ exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; + exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + i*:MSYS_NT-*:*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:[34]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit 0 ;; + exit ;; + x86:Interix*:[345]*) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T:Interix*:[345]*) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit 0 ;; + exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; + exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu - exit 0 ;; + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -858,8 +865,12 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build @@ -877,15 +888,22 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu - exit 0 ;; + exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu - exit 0 ;; + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -899,7 +917,7 @@ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -907,25 +925,28 @@ PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac - exit 0 ;; + exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu - exit 0 ;; + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; + exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu - exit 0 ;; + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -943,15 +964,15 @@ ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; + exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; + exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -968,7 +989,7 @@ LIBC=gnulibc1 # endif #else - #ifdef __INTEL_COMPILER + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun) LIBC=gnu #else LIBC=gnuaout @@ -978,16 +999,23 @@ LIBC=dietlibc #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit 0 ;; + exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... @@ -995,27 +1023,27 @@ # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:syllable:*:*) + exit ;; + i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable - exit 0 ;; + exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -1023,15 +1051,16 @@ else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; + exit ;; M68*:*:R3V[5678]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1123,68 +1152,72 @@ else echo ns32k-sni-sysv fi - exit 0 ;; + exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 - exit 0 ;; + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit 0 ;; + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) - case `uname -p` in - *86) UNAME_PROCESSOR=i686 ;; - powerpc) UNAME_PROCESSOR=powerpc ;; + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1192,22 +1225,25 @@ UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1218,38 +1254,47 @@ UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; + exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms && exit 0 ;; - I*) echo ia64-dec-vms && exit 0 ;; - V*) echo vax-dec-vms && exit 0 ;; - esac + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1281,7 +1326,7 @@ #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); + printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1370,11 +1415,12 @@ } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) @@ -1383,22 +1429,22 @@ case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit 0 ;; + exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; c34*) echo c34-convex-bsd - exit 0 ;; + exit ;; c38*) echo c38-convex-bsd - exit 0 ;; + exit ;; c4*) echo c4-convex-bsd - exit 0 ;; + exit ;; esac fi @@ -1409,7 +1455,9 @@ the operating system you are using. It is advised that you download the most up to date version of the config scripts from - ftp://ftp.gnu.org/pub/gnu/config/ + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run ($0) is already up to date, please send the following data and any information you think might be --- dspam-3.6.6.orig/config.sub +++ dspam-3.6.6/config.sub @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2004-06-24' +timestamp='2006-02-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,14 +21,15 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # @@ -70,7 +71,7 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -83,11 +84,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +100,7 @@ *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -118,8 +119,9 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ - kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -170,6 +172,10 @@ -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -186,6 +192,10 @@ # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -231,13 +241,14 @@ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | mcore \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -246,6 +257,7 @@ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ @@ -254,23 +266,29 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ - | openrisc | or32 \ + | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xstormy16 | xtensa \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; + m32c) + basic_machine=$basic_machine-unknown + ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -278,6 +296,9 @@ ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -298,7 +319,7 @@ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ - | bs2000-* \ + | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ @@ -310,7 +331,7 @@ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -319,6 +340,7 @@ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ @@ -327,27 +349,32 @@ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ + | mt-* \ | msp430-* \ + | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ - | xtensa-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; + m32c-*) + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -457,6 +484,9 @@ crds | unos) basic_machine=m68k-crds ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; @@ -486,6 +516,10 @@ basic_machine=m88k-motorola os=-sysv3 ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx @@ -676,6 +710,9 @@ basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; mvs) basic_machine=i370-ibm os=-mvs @@ -751,9 +788,8 @@ basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff ;; os400) basic_machine=powerpc-ibm @@ -784,6 +820,12 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -840,6 +882,10 @@ basic_machine=i586-unknown os=-pw32 ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -1026,6 +1072,10 @@ basic_machine=hppa1.1-winbond os=-proelf ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; xps | xps100) basic_machine=xps100-honeywell ;; @@ -1075,12 +1125,9 @@ we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; @@ -1154,20 +1201,23 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1185,7 +1235,7 @@ os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) @@ -1294,6 +1344,9 @@ -kaos*) os=-kaos ;; + -zvmoe) + os=-zvmoe + ;; -none) ;; *) @@ -1371,6 +1424,9 @@ *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; @@ -1542,7 +1598,7 @@ esac echo $basic_machine$os -exit 0 +exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) --- dspam-3.6.6.orig/debian/sqlfiles/pgsql-dbadmin +++ dspam-3.6.6/debian/sqlfiles/pgsql-dbadmin @@ -0,0 +1 @@ +CREATE LANGUAGE plpgsql; --- dspam-3.6.6.orig/debian/sqlfiles/mysql +++ dspam-3.6.6/debian/sqlfiles/mysql @@ -0,0 +1,49 @@ +# Tables for mysql +create table dspam_token_data ( + uid smallint unsigned not null, + token bigint unsigned not null, + spam_hits int not null, + innocent_hits int not null, + last_hit date not null +) type=MyISAM PACK_KEYS=1; + +create unique index id_token_data_01 on dspam_token_data(uid,token); + +create table dspam_signature_data ( + uid smallint unsigned not null, + signature char(32) not null, + data blob not null, + length smallint not null, + created_on date not null +) type=MyISAM max_rows=2500000 avg_row_length=8096; + +create unique index id_signature_data_01 on dspam_signature_data(uid,signature);create index id_signature_data_02 on dspam_signature_data(created_on); + +create table dspam_stats ( + uid smallint unsigned primary key, + spam_learned int not null, + innocent_learned int not null, + spam_misclassified int not null, + innocent_misclassified int not null, + spam_corpusfed int not null, + innocent_corpusfed int not null, + spam_classified int not null, + innocent_classified int not null +) type=MyISAM; + +create table dspam_preferences ( + uid smallint unsigned not null, + preference varchar(32) not null, + value varchar(64) not null +) type=MyISAM; + +create unique index id_preferences_01 on dspam_preferences(uid, preference); + +# Create the virtual users table. +create table dspam_virtual_uids ( + uid smallint unsigned primary key AUTO_INCREMENT, + username varchar(128) +) type=MyISAM; + +create unique index id_virtual_uids_01 on dspam_virtual_uids(username); + --- dspam-3.6.6.orig/debian/sqlfiles/pgsql +++ dspam-3.6.6/debian/sqlfiles/pgsql @@ -0,0 +1,65 @@ +CREATE TABLE dspam_token_data ( + uid smallint, + token bigint, + spam_hits int, + innocent_hits int, + last_hit date, + UNIQUE (uid, token) +) WITHOUT OIDS; + +CREATE TABLE dspam_signature_data ( + uid smallint, + signature varchar(128), + data bytea, + length int, + created_on date, + UNIQUE (uid, signature) +) WITHOUT OIDS; + +CREATE TABLE dspam_stats ( + uid smallint PRIMARY KEY, + spam_learned int, + innocent_learned int, + spam_misclassified int, + innocent_misclassified int, + spam_corpusfed int, + innocent_corpusfed int, + spam_classified int, + innocent_classified int +) WITHOUT OIDS; + +CREATE TABLE dspam_preferences ( + uid smallint, + preference varchar(128), + value varchar(128), + UNIQUE (uid, preference) +) WITHOUT OIDS; + +CREATE SEQUENCE dspam_virtual_uids_seq; + +CREATE TABLE dspam_virtual_uids ( + uid smallint DEFAULT nextval('dspam_virtual_uids_seq') PRIMARY KEY, + username varchar(128) +) WITHOUT OIDS; + +CREATE UNIQUE INDEX id_virtual_uids_01 ON dspam_virtual_uids(username); +CREATE UNIQUE INDEX id_virtual_uids_02 ON dspam_virtual_uids(uid); + +create function lookup_tokens(integer,bigint[]) + returns setof dspam_token_data + language plpgsql stable + as ' +declare + v_rec record; +begin + for v_rec in select * from dspam_token_data + where uid=$1 + and token in (select $2[i] + from generate_series(array_lower($2,1), + array_upper($2,1)) s(i)) + loop + return next v_rec; + end loop; + return; +end;'; + --- dspam-3.6.6.orig/debian/control +++ dspam-3.6.6/debian/control @@ -0,0 +1,146 @@ +Source: dspam +Section: mail +Priority: optional +Maintainer: Debian DSPAM Maintainers +Uploaders: Matthijs Mohlmann , Christoph Haas , Kurt B. Kaiser , Jesus Climent , Rudolf Weber , Aurelien Labrosse +Build-Depends: debhelper (>= 4.0), libpq-dev | postgresql-dev, dpatch (>= 2.0.0), libtool, automake1.9, autotools-dev, libmysqlclient15-dev, libdb4.2-dev, libsqlite3-dev, libldap2-dev +Standards-Version: 3.7.2.0 + +Package: dspam +Architecture: any +Depends: procmail | sensible-mda, adduser, ${shlibs:Depends} +Recommends: dspam-doc, clamav-daemon +Description: is a scalable, fast and statistical anti-spam filter + DSPAM is a dedicated statistical filter with minimal resources. It includes + many new algorithms to fight against spam including: + * Concept Identification + * Neural Networking + * Message Inoculation + * Advanced de-obfuscation techniques + * Bayesian Noise Reduction + . + This package includes the dspam daemon. + +Package: dspam-webfrontend +Architecture: all +Depends: libgd-gd2-noxpm-perl | libgd-gd2-perl, libgd-graph3d-perl +Suggests: libapache-mod-perl | libapache-mod-perl2, libapache-mod-auth-curdir | libapache-mod-auth-kerb | libapache-mod-auth-mysql | libapache-mod-auth-pam | libapache-mod-auth-pgsql | libapache-mod-auth-plain | libapache-mod-auth-radius | libapache-mod-auth-shadow | libapache-mod-auth-useragent | libapache2-mod-auth-kerb | libapache2-mod-auth-mysql | libapache2-mod-auth-pam | libapache2-mod-auth-pgsql | libapache2-mod-auth-plain | libapache2-mod-auth-sys-group +Description: DSPAM is a scalable and statistical anti-spam filter + DSPAM is a dedicated statistical filter with minimal resources. It includes + many new algorithms to fight against spam including: + * Concept Identification + * Neural Networking + * Message Inoculation + * Advanced de-obfuscation techniques + * Bayesian Noise Reduction + . + This package includes the webfrontend for dspam. This can be used together + with the several database backends including PostgreSQL, MySQL, Berkerley 4 + and sqlite3. + +Package: libdspam7 +Section: libs +Architecture: any +Depends: ${shlibs:Depends} +Suggests: libdspam7-drv +Description: DSPAM is a scalable and statistical anti-spam filter + DSPAM is a dedicated statistical filter with minimal resources. It includes + many new algorithms to fight against spam including: + * Concept Identification + * Neural Networking + * Message Inoculation + * Advanced de-obfuscation techniques + * Bayesian Noise Reduction + . + This package contains the library where people can link to. + +Package: libdspam7-dev +Architecture: any +Depends: libdspam7 (= ${Source-Version}) +Description: DSPAM is a scalable and statistical anti-spam filter + DSPAM is a dedicated statistical filter with minimal resources. It includes + many new algorithms to fight against spam including: + * Concept Identification + * Neural Networking + * Message Inoculation + * Advanced de-obfuscation techniques + * Bayesian Noise Reduction + . + This package contains the development headers for libdspam. + +Package: libdspam7-drv-pgsql +Architecture: any +Depends: ${shlibs:Depends}, libdspam7 (= ${Source-Version}), dbconfig-common, debconf (>= 0.5) | debconf-2.0, ucf, postgresql-client-8.1 | postgresql-client +Recommends: postgresql-8.1 +Provides: libdspam7-drv +Description: DSPAM is a scalable and statistical anti-spam filter + DSPAM is a dedicated statistical filter with minimal resources. It includes + many new algorithms to fight against spam including: + * Concept Identification + * Neural Networking + * Message Inoculation + * Advanced de-obfuscation techniques + * Bayesian Noise Reduction + . + This package contains the PostgreSQL backend. + +Package: libdspam7-drv-mysql +Architecture: any +Depends: ${shlibs:Depends}, libdspam7 (= ${Source-Version}), dbconfig-common, debconf (>= 0.5) | debconf-2.0, ucf, mysql-client +Recommends: mysql-server +Provides: libdspam7-drv +Description: DSPAM is a scalable and statistical anti-spam filter + DSPAM is a dedicated statistical filter with minimal resources. It includes + many new algorithms to fight against spam including: + * Concept Identification + * Neural Networking + * Message Inoculation + * Advanced de-obfuscation techniques + * Bayesian Noise Reduction + . + This package contains the MySQL backend. + +Package: libdspam7-drv-db4 +Architecture: any +Depends: ${shlibs:Depends}, libdspam7 (= ${Source-Version}) +Provides: libdspam7-drv +Description: DSPAM is a scalable and statistical anti-spam filter + DSPAM is a dedicated statistical filter with minimal resources. It includes + many new algorithms to fight against spam including: + * Concept Identification + * Neural Networking + * Message Inoculation + * Advanced de-obfuscation techniques + * Bayesian Noise Reduction + . + This package contains the Berkerley 4 backend. + +Package: libdspam7-drv-sqlite3 +Architecture: any +Depends: ${shlibs:Depends}, sqlite3, libdspam7 (= ${Source-Version}) +Provides: libdspam7-drv +Description: DSPAM is a scalable and statistical anti-spam filter + DSPAM is a dedicated statistical filter with minimal resources. It includes + many new algorithms to fight against spam including: + * Concept Identification + * Neural Networking + * Message Inoculation + * Advanced de-obfuscation techniques + * Bayesian Noise Reduction + . + This package contains the sqlite3 backend. + +Package: dspam-doc +Section: doc +Architecture: all +Description: Documentation for dspam + DSPAM is a dedicated statistical filter with minimal resources. It includes + many new algorithms to fight against spam including: + * Concept Identification + * Neural Networking + * Message Inoculation + * Advanced de-obfuscation techniques + * Bayesian Noise Reduction + . + This package contains the documentation for dspam. + --- dspam-3.6.6.orig/debian/libdspam7-drv-mysql.cron.daily +++ dspam-3.6.6/debian/libdspam7-drv-mysql.cron.daily @@ -0,0 +1,19 @@ +#!/bin/sh +# +# Clean up the mysql databases + +DSPAMCONF=/etc/dspam/dspam.conf +MYSQLCONF=/etc/dspam/dspam.d/mysql.conf +PURGE=/usr/share/doc/libdspam7-drv-mysql/purge-4.1.sql + +if grep -q "^StorageDriver.*mysql_drv.so" $DSPAMCONF; then + if [ -x /usr/bin/mysql ]; then + MYSQL_USER="`grep "^MySQLUser" $MYSQLCONF | awk '{print $2}'`" + MYSQL_PASS="`grep "^MySQLPass" $MYSQLCONF | awk '{print $2}'`" + MYSQL_DB="`grep "^MySQLDb" $MYSQLCONF | awk '{print $2}'`" + /usr/bin/mysql --user=$MYSQL_USER --password=$MYSQL_PASS $MYSQL_DB < $PURGE + fi +fi + +exit 0 + --- dspam-3.6.6.orig/debian/patches/where-to-find-txt-files.dpatch +++ dspam-3.6.6/debian/patches/where-to-find-txt-files.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## where-to-find-txt-files.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad dspam-3.6.0/src/dspam.c /tmp/dpep.A8tFmH/dspam-3.6.0/src/dspam.c +--- dspam-3.6.0/src/dspam.c 2005-10-04 16:22:58.000000000 +0000 ++++ /tmp/dpep.A8tFmH/dspam-3.6.0/src/dspam.c 2005-11-04 14:06:31.727975360 +0000 +@@ -1447,8 +1447,7 @@ + + time(&now); + +- snprintf(msgfile, sizeof(msgfile), "%s/txt/%s", +- _ds_read_attribute(agent_config, "Home"), filename); ++ snprintf(msgfile, sizeof(msgfile), "/etc/dspam/txt/%s", filename); + f = fopen(msgfile, "r"); + if (!f) { + LOG(LOG_ERR, ERR_IO_FILE_OPEN, filename, strerror(errno)); --- dspam-3.6.6.orig/debian/patches/virus-notifications.dpatch +++ dspam-3.6.6/debian/patches/virus-notifications.dpatch @@ -0,0 +1,33 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## virus-notifications.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad dspam-3.6.6~/src/dspam.c dspam-3.6.6/src/dspam.c +--- dspam-3.6.6~/src/dspam.c 2006-05-13 14:17:30.000000000 +0200 ++++ dspam-3.6.6/src/dspam.c 2006-05-28 15:24:25.000000000 +0200 +@@ -3389,6 +3389,7 @@ + { + if (CTX->totals.innocent_learned + CTX->totals.innocent_classified > 2500) { + if (CTX->result == DSR_ISSPAM && ++ strcmp(CTX->class, LANG_CLASS_VIRUS) != 0 && + _ds_match_attribute(agent_config, "TrackSources", "spam")) { + FILE *file; + char dropfile[MAX_FILENAME_LENGTH]; +@@ -3401,7 +3402,14 @@ + fclose(file); + } + } ++ if (CTX->result == DSR_ISSPAM && ++ strcmp(CTX->class, LANG_CLASS_VIRUS) == 0 && ++ _ds_match_attribute(agent_config, "TrackSources", "virus")) ++ { ++ LOG (LOG_INFO, "infected message from %s", ip); ++ } + if (CTX->result != DSR_ISSPAM && ++ strcmp(CTX->class, LANG_CLASS_VIRUS) != 0 && + _ds_match_attribute(agent_config, "TrackSources", "nonspam")) + { + LOG (LOG_INFO, "innocent message from %s", ip); --- dspam-3.6.6.orig/debian/patches/pos-neg-switched.dpatch +++ dspam-3.6.6/debian/patches/pos-neg-switched.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## pos-neg-switched.dpatch by Matthijs Mohlmann +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Totals of False Positives and False Negatives were swapped. + +@DPATCH@ +diff -urNad dspam-3.6.4~/webui/cgi-bin/admin.cgi dspam-3.6.4/webui/cgi-bin/admin.cgi +--- dspam-3.6.4~/webui/cgi-bin/admin.cgi 2006-02-07 23:02:47.000000000 +0100 ++++ dspam-3.6.4/webui/cgi-bin/admin.cgi 2006-03-15 19:12:40.741455768 +0100 +@@ -324,8 +324,8 @@ + " $mailbox_total_display". + " $sl_total". + " $il_total". +- " $sm_total". + " $fp_total". ++ " $sm_total". + " $sc_total". + " $ic_total". + "  ". --- dspam-3.6.6.orig/debian/patches/background-dspam.dpatch +++ dspam-3.6.6/debian/patches/background-dspam.dpatch @@ -0,0 +1,22 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## background-dspam.dpatch by Matthijs Mohlmann +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad dspam-3.6.2~/src/dspam.c dspam-3.6.2/src/dspam.c +--- dspam-3.6.2~/src/dspam.c 2006-01-02 12:40:52.000000000 +0100 ++++ dspam-3.6.2/src/dspam.c 2006-01-02 12:43:04.566063250 +0100 +@@ -3830,6 +3830,11 @@ + DRIVER_CTX DTX; + char *pidfile; + ++ /* Fork dspam into the background */ ++ if (fork()) { ++ exit(EXIT_SUCCESS); ++ } ++ + __daemon_run = 1; + __num_threads = 0; + __hup = 0; --- dspam-3.6.6.orig/debian/patches/dspam-default.prefs-in_etc.dpatch +++ dspam-3.6.6/debian/patches/dspam-default.prefs-in_etc.dpatch @@ -0,0 +1,55 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## dspam-default.prefs-in_etc.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad dspam-3.6.0/src/pref.c /tmp/dpep.HfRv5v/dspam-3.6.0/src/pref.c +--- dspam-3.6.0/src/pref.c 2005-11-04 13:03:45.693499624 +0000 ++++ /tmp/dpep.HfRv5v/dspam-3.6.0/src/pref.c 2005-11-04 13:03:46.932311296 +0000 +@@ -177,7 +177,7 @@ + PTX[0] = NULL; + + if (user == NULL) { +- snprintf(filename, MAX_FILENAME_LENGTH, "%s/default.prefs", home); ++ snprintf(filename, MAX_FILENAME_LENGTH, "/etc/dspam/default.prefs"); + } else { + _ds_userdir_path (filename, home, user, "prefs"); + } +@@ -307,7 +307,7 @@ + FILE *out_file; + + if (username == NULL) { +- snprintf(filename, MAX_FILENAME_LENGTH, "%s/default.prefs", home); ++ snprintf(filename, MAX_FILENAME_LENGTH, "/etc/dspam/default.prefs"); + } else { + _ds_userdir_path (filename, home, username, "prefs"); + } +@@ -334,7 +334,7 @@ + int nlines; + + if (username == NULL) { +- snprintf(filename, MAX_FILENAME_LENGTH, "%s/default.prefs", home); ++ snprintf(filename, MAX_FILENAME_LENGTH, "/etc/dspam/default.prefs"); + } else { + _ds_userdir_path (filename, home, username, "prefs"); + } +diff -urNad dspam-3.6.0/webui/cgi-bin/admin.cgi /tmp/dpep.HfRv5v/dspam-3.6.0/webui/cgi-bin/admin.cgi +--- dspam-3.6.0/webui/cgi-bin/admin.cgi 2005-11-04 13:03:46.516374528 +0000 ++++ /tmp/dpep.HfRv5v/dspam-3.6.0/webui/cgi-bin/admin.cgi 2005-11-04 13:04:03.186840232 +0000 +@@ -126,14 +126,6 @@ + + if ($FORM{'username'} eq "") { + $FILE = "/etc/dspam/default.prefs"; +- if ($CONFIG{'PREFERENCES_EXTENSION'} != 1 && ! -l "/etc/dspam/default.prefs") { +- $DATA{'ERROR'} = "WARNING: " . +- "These default preferences will not be loaded by DSPAM, but only by ". +- " the CGI interface when a user initially sets up their preferences. ". +- "To have DSPAM override its configuration with these default ". +- "preferences, symlink $CONFIG{'DSPAM_HOME'}/default.prefs to the ". +- "default.prefs file in the CGI directory.

"; +- } + } else { + $FILE = GetPath($FORM{'username'}) . ".prefs"; + } --- dspam-3.6.6.orig/debian/patches/manpage-in-right-section.dpatch +++ dspam-3.6.6/debian/patches/manpage-in-right-section.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## manpage-in-right-section.dpatch by Matthijs Mohlmann +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Put manpage in right section (3 instead of 1) +## DP: Fix manpage errors. + +@DPATCH@ +diff -urNad trunk~/man/dspam_stats.1 trunk/man/dspam_stats.1 +--- trunk~/man/dspam_stats.1 2005-10-13 19:00:38.000000000 +0200 ++++ trunk/man/dspam_stats.1 2005-10-18 23:25:11.697825848 +0200 +@@ -59,7 +59,7 @@ + + .n3 3 + .TP +-.BI \[username]\c ++.BI [username]\c + Specifies the username to query. If no username is provided, all users will be + queried. + +diff -urNad trunk~/man/libdspam.3 trunk/man/libdspam.3 +--- trunk~/man/libdspam.3 2005-10-13 19:00:38.000000000 +0200 ++++ trunk/man/libdspam.3 2005-10-18 23:25:11.697825848 +0200 +@@ -8,7 +8,7 @@ + .\" Copyright (c) 2002-2005 Deep Logic, Inc. + .\" All rights reserved + .\" +-.TH libdspam 1 "Sep 29, 2004" "libdspam" "libdspam" ++.TH libdspam 3 "Sep 29, 2004" "libdspam" "libdspam" + + .SH NAME + libdspam, dspam_init, dspam_create, dspam_addattribute, dspam_attach, dspam_process, dspam_getsource, dspam_detach, dspam_clearattributes, dspam_destroy --- dspam-3.6.6.orig/debian/patches/enable-domain-quarantine.dpatch +++ dspam-3.6.6/debian/patches/enable-domain-quarantine.dpatch @@ -0,0 +1,44 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## enable-domain-quarantine.dpatch by Daniel Kahn Gillmor +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Lets quarantining suffix work properly if the user name is fully qualified + +@DPATCH@ +diff -urNad dspam-3.6.6/src/dspam.c /tmp/dpep.ckmPmt/dspam-3.6.6/src/dspam.c +--- dspam-3.6.6/src/dspam.c 2006-05-24 16:32:56.327971123 -0400 ++++ /tmp/dpep.ckmPmt/dspam-3.6.6/src/dspam.c 2006-05-24 16:39:54.168710328 -0400 +@@ -842,10 +842,20 @@ + if ((_ds_read_attribute(agent_config, "QuarantineMailbox")) && + (result == DSR_ISSPAM)) { + strlcpy(args, ATX->recipient, sizeof(args)); ++ ++ /* strip trailing @domain, if present: */ ++ arg=index(args, '@'); ++ if (arg) *arg = '\0'; ++ + arg=index(args,'+'); + if (arg != NULL) *arg='\0'; + strlcat(args,_ds_read_attribute(agent_config, "QuarantineMailbox"), + sizeof(args)); ++ ++ /* append trailing @domain again, if it was present: */ ++ arg=index(ATX->recipient, '@'); ++ if (arg) strlcat (args, arg, sizeof(args)); ++ + ATX->recipient=args; + } + +diff -urNad dspam-3.6.6/src/dspam.conf.in /tmp/dpep.ckmPmt/dspam-3.6.6/src/dspam.conf.in +--- dspam-3.6.6/src/dspam.conf.in 2006-05-24 16:32:56.051977147 -0400 ++++ /tmp/dpep.ckmPmt/dspam-3.6.6/src/dspam.conf.in 2006-05-24 16:43:36.405674948 -0400 +@@ -94,9 +94,6 @@ + # "user+detail". This is only useful if the LDA can handle "plused users" + # (for example Cyrus IMAP) and when configured for LMTP delivery above + # +-# NOTE: Plused detail presently only works when usernames are provided and +-# not fully qualified email address (@domain). +-# + #EnablePlusedDetail on + + # --- dspam-3.6.6.orig/debian/patches/link-dynamically.dpatch +++ dspam-3.6.6/debian/patches/link-dynamically.dpatch @@ -0,0 +1,107 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## link-dynamically.dpatch by Matthijs Mohlmann +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Link dspam and dspamc dynamically to libdspam. + +@DPATCH@ +diff -urNad dspam-3.6.2~/src/Makefile.am dspam-3.6.2/src/Makefile.am +--- dspam-3.6.2~/src/Makefile.am 2005-10-11 16:05:52.000000000 +0200 ++++ dspam-3.6.2/src/Makefile.am 2005-12-21 14:01:56.739787250 +0100 +@@ -224,7 +224,6 @@ + agent_shared.c agent_shared.h + + dspam_LDADD = libdspam.la +-dspam_LDFLAGS = -static + + dspamc_SOURCES = \ + config.h libdspam.h language.h \ +@@ -235,7 +234,6 @@ + agent_shared.c agent_shared.h + + dspamc_LDADD = -lm buffer.o config_shared.o error.o pref.o nodetree.o util.o $(NETLIBS) +-dspamc_LDFLAGS = -static + + # Failing of chgrp is expected and normal case when someone do + # make install DESTDIR=... +diff -urNad dspam-3.6.2~/src/tools/Makefile.am dspam-3.6.2/src/tools/Makefile.am +--- dspam-3.6.2~/src/tools/Makefile.am 2005-09-24 02:37:44.000000000 +0200 ++++ dspam-3.6.2/src/tools/Makefile.am 2005-12-21 14:04:19.236692750 +0100 +@@ -14,19 +14,19 @@ + bin_SCRIPTS = dspam_corpus dspam_genaliases dspam_logrotate + + dspam_2sql_SOURCES = dspam_2sql.c ../read_config.c ../config_api.c +-dspam_2sql_LDFLAGS = -static ++dspam_2sql_LDFLAGS = + dspam_dump_SOURCES = dspam_dump.c ../read_config.c ../config_api.c +-dspam_dump_LDFLAGS = -static ++dspam_dump_LDFLAGS = + dspam_clean_SOURCES = dspam_clean.c ../read_config.c ../config_api.c +-dspam_clean_LDFLAGS = -static ++dspam_clean_LDFLAGS = + dspam_crc_SOURCES = dspam_crc.c +-dspam_crc_LDFLAGS = -static ++dspam_crc_LDFLAGS = + dspam_stats_SOURCES = dspam_stats.c ../read_config.c ../config_api.c +-dspam_stats_LDFLAGS = -static ++dspam_stats_LDFLAGS = + dspam_merge_SOURCES = dspam_merge.c ../read_config.c ../config_api.c +-dspam_merge_LDFLAGS = -static ++dspam_merge_LDFLAGS = + dspam_admin_SOURCES = dspam_admin.c ../read_config.c ../config_api.c +-dspam_admin_LDFLAGS = -static ++dspam_admin_LDFLAGS = + + LDADD = ../libdspam.la + +diff -urNad dspam-3.6.2~/src/tools.hash_drv/Makefile.am dspam-3.6.2/src/tools.hash_drv/Makefile.am +--- dspam-3.6.2~/src/tools.hash_drv/Makefile.am 2005-10-25 14:32:09.000000000 +0200 ++++ dspam-3.6.2/src/tools.hash_drv/Makefile.am 2005-12-21 14:03:51.042930750 +0100 +@@ -19,7 +19,7 @@ + cssstat_SOURCES = cssstat.c ../read_config.c ../util.c ../diction.c \ + ../nodetree.c ../hash_drv.c ../error.c ../config_shared.c \ + ../pref.c +-cssstat_LDFLAGS = -static ++cssstat_LDFLAGS = + if DYNAMIC_DRIVER + if BUILD_HASH_DRV + cssstat_CPPFLAGS = $(libhash_drv_cppflags) +@@ -30,7 +30,7 @@ + cssclean_SOURCES = cssclean.c ../read_config.c ../util.c ../diction.c \ + ../nodetree.c ../hash_drv.c ../error.c ../config_shared.c \ + ../pref.c +-cssclean_LDFLAGS = -static ++cssclean_LDFLAGS = + if DYNAMIC_DRIVER + if BUILD_HASH_DRV + cssclean_CPPFLAGS = $(libhash_drv_cppflags) +@@ -41,7 +41,7 @@ + cssconvert_SOURCES = cssconvert.c ../read_config.c ../util.c ../diction.c \ + ../nodetree.c ../hash_drv.c ../error.c ../config_shared.c \ + ../pref.c +-cssconvert_LDFLAGS = -static ++cssconvert_LDFLAGS = + if DYNAMIC_DRIVER + if BUILD_HASH_DRV + cssconvert_CPPFLAGS = $(libhash_drv_cppflags) +@@ -52,7 +52,7 @@ + csscompress_SOURCES = csscompress.c ../read_config.c ../util.c ../diction.c \ + ../nodetree.c ../hash_drv.c ../error.c ../config_shared.c \ + ../pref.c +-csscompress_LDFLAGS = -static ++csscompress_LDFLAGS = + if DYNAMIC_DRIVER + if BUILD_HASH_DRV + csscompress_CPPFLAGS = $(libhash_drv_cppflags) +diff -urNad dspam-3.6.2~/src/tools.pgsql_drv/Makefile.am dspam-3.6.2/src/tools.pgsql_drv/Makefile.am +--- dspam-3.6.2~/src/tools.pgsql_drv/Makefile.am 2005-09-24 19:54:11.000000000 +0200 ++++ dspam-3.6.2/src/tools.pgsql_drv/Makefile.am 2005-12-21 14:03:26.305384750 +0100 +@@ -17,7 +17,7 @@ + -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE + + dspam_pg2int8_SOURCES = dspam_pg2int8.c ../read_config.c ../config_api.c +-dspam_pg2int8_LDFLAGS = -static ++dspam_pg2int8_LDFLAGS = + if DYNAMIC_DRIVER + if BUILD_PGSQL_DRV + dspam_pg2int8_CPPFLAGS = $(libpgsql_drv_cppflags) --- dspam-3.6.6.orig/debian/patches/default-server-pidfile.dpatch +++ dspam-3.6.6/debian/patches/default-server-pidfile.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## default-server-pidfile.dpatch by Matthijs Mohlmann +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad dspam-3.6.2~/src/dspam.c dspam-3.6.2/src/dspam.c +--- dspam-3.6.2~/src/dspam.c 2005-10-25 14:32:09.000000000 +0200 ++++ dspam-3.6.2/src/dspam.c 2006-01-02 12:29:03.649509250 +0100 +@@ -3828,7 +3828,7 @@ + #ifdef DAEMON + int daemon_start(AGENT_CTX *ATX) { + DRIVER_CTX DTX; +- char *pidfile; ++ char *pidfile = "/var/run/dspam.pid"; + + __daemon_run = 1; + __num_threads = 0; +@@ -3838,9 +3838,11 @@ + + LOG(LOG_INFO, INFO_DAEMON_START); + +- while(__daemon_run) { ++ if (_ds_read_attribute(agent_config, "ServerPID")) + pidfile = _ds_read_attribute(agent_config, "ServerPID"); + ++ while(__daemon_run) { ++ + DTX.CTX = dspam_create (NULL, NULL, + _ds_read_attribute(agent_config, "Home"), + DSM_TOOLS, 0); --- dspam-3.6.6.orig/debian/patches/dspam-webfrontend-config-debian.dpatch +++ dspam-3.6.6/debian/patches/dspam-webfrontend-config-debian.dpatch @@ -0,0 +1,178 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## dspam-webfrontend-config-debian.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Apply some changes to cgi and configuration file +## DP: to make the scripts usable on a Debian system out-of-the-box + +@DPATCH@ +diff -urNad dspam-3.6.6~/webui/cgi-bin/admin.cgi dspam-3.6.6/webui/cgi-bin/admin.cgi +--- dspam-3.6.6~/webui/cgi-bin/admin.cgi 2006-05-13 14:17:31.000000000 +0200 ++++ dspam-3.6.6/webui/cgi-bin/admin.cgi 2006-05-21 14:34:16.330489760 +0200 +@@ -24,7 +24,7 @@ + require "ctime.pl"; + + # Read configuration parameters common to all CGI scripts +-require "configure.pl"; ++require "/etc/dspam/webfrontend.conf"; + + # + # The current CGI script +@@ -37,7 +37,7 @@ + # + do { + my($admin) = 0; +- open(FILE, "<./admins"); ++ open(FILE, ") { + chomp; + if ($_ eq $ENV{'REMOTE_USER'}) { +@@ -125,8 +125,8 @@ + $USER = $FORM{'username'}; + + if ($FORM{'username'} eq "") { +- $FILE = "./default.prefs"; +- if ($CONFIG{'PREFERENCES_EXTENSION'} != 1 && ! -l "$CONFIG{'DSPAM_HOME'}/default.prefs") { ++ $FILE = "/etc/dspam/default.prefs"; ++ if ($CONFIG{'PREFERENCES_EXTENSION'} != 1 && ! -l "/etc/dspam/default.prefs") { + $DATA{'ERROR'} = "WARNING: " . + "These default preferences will not be loaded by DSPAM, but only by ". + " the CGI interface when a user initially sets up their preferences. ". +@@ -213,7 +213,7 @@ + } + + if (! -e $FILE) { +- %PREFS = GetPrefs($USER, "./default.prefs"); ++ %PREFS = GetPrefs($USER, "/etc/dspam/default.prefs"); + } else { + %PREFS = GetPrefs($USER, $FILE); + } +@@ -671,6 +671,7 @@ + if ($CONFIG{'DOMAIN_SCALE'} == 1) { + $VPOPUSERNAME = (split(/@/, $UN))[0]; + $VPOPDOMAIN = (split(/@/, $UN))[1]; ++ $VPOPDOMAIN = 'local' if !$VPOPDOMAIN; + $USER = "$CONFIG{'DSPAM_HOME'}/data/$VPOPDOMAIN/$VPOPUSERNAME/$VPOPUSERNAME"; + + # Normal scale +@@ -704,7 +705,7 @@ + close(PIPE); + } else { + if (! -e $FILE) { +- $FILE = "./default.prefs"; ++ $FILE = "/etc/dspam/default.prefs"; + } + + if (! -e $FILE) { +diff -urNad dspam-3.6.6~/webui/cgi-bin/admingraph.cgi dspam-3.6.6/webui/cgi-bin/admingraph.cgi +--- dspam-3.6.6~/webui/cgi-bin/admingraph.cgi 2006-05-13 14:17:31.000000000 +0200 ++++ dspam-3.6.6/webui/cgi-bin/admingraph.cgi 2006-05-21 14:34:16.330489760 +0200 +@@ -24,11 +24,11 @@ + use vars qw { %CONFIG %FORM @spam @nonspam @period @data @inoc @sm @fp @wh }; + + # Read configuration parameters common to all CGI scripts +-require "configure.pl"; ++require "/etc/dspam/webfrontend.conf"; + + %FORM = &ReadParse(); + +-GD::Graph::colour::read_rgb("rgb.txt"); ++GD::Graph::colour::read_rgb("/etc/dspam/rgb.txt"); + + do { + my($spam, $nonspam, $sm, $fp, $inoc, $wh, $period) = split(/\_/, $FORM{'data'}); +diff -urNad dspam-3.6.6~/webui/cgi-bin/configure.pl.in dspam-3.6.6/webui/cgi-bin/configure.pl.in +--- dspam-3.6.6~/webui/cgi-bin/configure.pl.in 2006-05-13 14:17:31.000000000 +0200 ++++ dspam-3.6.6/webui/cgi-bin/configure.pl.in 2006-05-21 14:34:16.331489608 +0200 +@@ -29,11 +29,11 @@ + $CONFIG{'DSPAM_STATS'} = $CONFIG{'DSPAM_BIN'} . "/dspam_stats"; + $CONFIG{'DSPAM_ARGS'} = "--deliver=innocent --class=innocent " . + "--source=error --user %CURRENT_USER% -d %u"; +-$CONFIG{'TEMPLATES'} = "./templates"; # Location of HTML templates ++$CONFIG{'TEMPLATES'} = "/usr/share/dspam/upstream-templates/"; # Location of HTML templates + $CONFIG{'ALL_PROCS'} = "ps auxw"; # use ps -deaf for Solaris + $CONFIG{'MAIL_QUEUE'} = "mailq | grep '^[0-9,A-F]' | wc -l"; + +-$CONFIG{'WEB_ROOT'} = ""; # URL location of included htdocs/ files ++$CONFIG{'WEB_ROOT'} = "./"; # URL location of included htdocs/ files + + # Default DSPAM display + #$CONFIG{'DATE_FORMAT'} = "%d.%m.%Y %H:%M"; # Date format in strftime style +@@ -53,14 +53,14 @@ + $ENV{'PATH'} = "$ENV{'PATH'}:$CONFIG{'DSPAM_BIN'}"; + + # Autodetect filesystem layout and preference options +-$CONFIG{'AUTODETECT'} = 1; ++$CONFIG{'AUTODETECT'} = 0; + + # Or, if you're running dspam.cgi as untrusted, it won't be able to auto-detect + # so you will need to specify some features manually: +-#$CONFIG{'AUTODETECT'} = 0; ++$CONFIG{'AUTODETECT'} = 0; + #$CONFIG{'LARGE_SCALE'} = 0; +-#$CONFIG{'DOMAIN_SCALE'} = 0; +-#$CONFIG{'PREFERENCES_EXTENSION'} = 0; ++$CONFIG{'DOMAIN_SCALE'} = 1; ++$CONFIG{'PREFERENCES_EXTENSION'} = 0; + + $CONFIG{'DSPAM_CGI'} = "dspam.cgi"; + +diff -urNad dspam-3.6.6~/webui/cgi-bin/dspam.cgi dspam-3.6.6/webui/cgi-bin/dspam.cgi +--- dspam-3.6.6~/webui/cgi-bin/dspam.cgi 2006-05-13 14:17:31.000000000 +0200 ++++ dspam-3.6.6/webui/cgi-bin/dspam.cgi 2006-05-21 14:34:54.714654480 +0200 +@@ -25,7 +25,7 @@ + require "ctime.pl"; + + # Read configuration parameters common to all CGI scripts +-require "configure.pl"; ++require "/etc/dspam/webfrontend.conf"; + + if($CONFIG{"DATE_FORMAT"}) { + use POSIX qw(strftime); +@@ -67,7 +67,7 @@ + + $CONFIG{'ADMIN'} = 0; + if ($ENV{'REMOTE_USER'} ne "") { +- open(FILE, "<./admins"); ++ open(FILE, ") { + chomp; + if ($_ eq $ENV{'REMOTE_USER'}) { +@@ -1563,6 +1563,7 @@ + my(%PREFS); + + my($FILE) = "$USER.prefs"; ++ my($DEFAULT_PREFS) = "/etc/dspam/default.prefs"; + + if ($CONFIG{'PREFERENCES_EXTENSION'} == 1) { + open(PIPE, "$CONFIG{'DSPAM_BIN'}/dspam_admin agg pref " . quotemeta($CURRENT_USER) . "|"); +@@ -1576,10 +1577,10 @@ + + if (keys(%PREFS) eq "0" || $CONFIG{'PREFERENCES_EXTENSION'} != 1) { + +- if (! -e "./default.prefs") { ++ if (! -e $DEFAULT_PREFS) { + &error("Unable to load default preferences"); + } +- open(FILE, "<./default.prefs"); ++ open(FILE, "<$DEFAULT_PREFS"); + while() { + chomp; + my($directive, $value) = split(/\=/); +diff -urNad dspam-3.6.6~/webui/cgi-bin/graph.cgi dspam-3.6.6/webui/cgi-bin/graph.cgi +--- dspam-3.6.6~/webui/cgi-bin/graph.cgi 2006-05-13 14:17:31.000000000 +0200 ++++ dspam-3.6.6/webui/cgi-bin/graph.cgi 2006-05-21 14:34:16.333489304 +0200 +@@ -25,11 +25,11 @@ + use vars qw { %CONFIG %FORM @spam_day @nonspam_day @period @data }; + + # Read configuration parameters common to all CGI scripts +-require "configure.pl"; ++require "/etc/dspam/webfrontend.conf"; + + %FORM = &ReadParse(); + +-GD::Graph::colour::read_rgb("rgb.txt"); ++GD::Graph::colour::read_rgb("/etc/dspam/rgb.txt"); + + do { + my($spam, $nonspam, $period) = split(/\_/, $FORM{'data'}); --- dspam-3.6.6.orig/debian/patches/improper-quotation-fix.dpatch +++ dspam-3.6.6/debian/patches/improper-quotation-fix.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## improper-quotation-fix.dpatch by Matthijs Mohlmann +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad dspam-3.6.6~/src/pgsql_drv.c dspam-3.6.6/src/pgsql_drv.c +--- dspam-3.6.6~/src/pgsql_drv.c 2006-05-13 14:17:30.000000000 +0200 ++++ dspam-3.6.6/src/pgsql_drv.c 2006-05-28 13:15:54.550604424 +0200 +@@ -2620,7 +2620,7 @@ + if (type == 1) { + snprintf(buffer, bufsz, "%lld", token); + } else { +- snprintf(buffer, bufsz, "'%llu'", token); ++ snprintf(buffer, bufsz, "%llu", token); + } + return buffer; + } --- dspam-3.6.6.orig/debian/patches/00list +++ dspam-3.6.6/debian/patches/00list @@ -0,0 +1,22 @@ +# list patches in order to apply +manpage-in-right-section.dpatch +link-dynamically.dpatch +drivers-in-usr_lib_dspam.dpatch +dspam-webfrontend-config-debian.dpatch +update-dspam.conf.dpatch +dspam-default.prefs-in_etc.dpatch +where-to-find-txt-files.dpatch +add-config-dir.dpatch +ldap-verify-fix.dpatch +autogen-sh.dpatch +default-server-pidfile.dpatch +background-dspam.dpatch +pos-neg-switched.dpatch +fix-nav-performance.dpatch +make-daemon-quiet.dpatch +make-dspam_clean-quiet.dpatch +improper-quotation-fix.dpatch +fix-delivery-segv.dpatch +enable-domain-quarantine.dpatch +virus-notifications.dpatch +clean-warnings.dpatch --- dspam-3.6.6.orig/debian/patches/drivers-in-usr_lib_dspam.dpatch +++ dspam-3.6.6/debian/patches/drivers-in-usr_lib_dspam.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## drivers-in-usr_lib_dspam.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad dspam-3.6.0/src/dspam.conf.in /tmp/dpep.VIMPSX/dspam-3.6.0/src/dspam.conf.in +--- dspam-3.6.0/src/dspam.conf.in 2005-10-10 13:52:21.000000000 +0000 ++++ /tmp/dpep.VIMPSX/dspam-3.6.0/src/dspam.conf.in 2005-10-24 13:56:57.287597648 +0000 +@@ -24,7 +24,7 @@ + # this option. If you do not wish to lose all of your data, you will need to + # migrate it to the new backend before making this change. + # +-StorageDriver @libdir@/@storage_driver@ ++StorageDriver /usr/lib/dspam/libhash_drv.so + + # + # Trusted Delivery Agent: Specifies the local delivery agent DSPAM should call --- dspam-3.6.6.orig/debian/patches/make-daemon-quiet.dpatch +++ dspam-3.6.6/debian/patches/make-daemon-quiet.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## make-daemon-quiet.dpatch by Matthijs Mohlmann +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad dspam-3.6.6~/src/error.c dspam-3.6.6/src/error.c +--- dspam-3.6.6~/src/error.c 2006-05-14 17:54:01.000000000 +0200 ++++ dspam-3.6.6/src/error.c 2006-05-25 13:58:01.197319568 +0200 +@@ -80,8 +80,6 @@ + #endif + + va_start (ap, err); +- vsnprintf (buf, sizeof (buf), err, ap); +- fprintf(stderr, "%ld: [%s] %s\n", (long) getpid(), format_date_r(date), buf); + + #ifdef USE_SYSLOG + openlog ("dspam", LOG_PID | LOG_CONS | LOG_NOWAIT, LOG_MAIL); --- dspam-3.6.6.orig/debian/patches/ldap-verify-fix.dpatch +++ dspam-3.6.6/debian/patches/ldap-verify-fix.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## ldap-verify-fix.dpatch by Matthijs Mohlmann +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad dspam-3.6.2~/src/Makefile.am dspam-3.6.2/src/Makefile.am +--- dspam-3.6.2~/src/Makefile.am 2005-10-11 16:05:52.000000000 +0200 ++++ dspam-3.6.2/src/Makefile.am 2005-12-21 14:07:15.087682750 +0100 +@@ -69,7 +69,7 @@ + # installed for libdspam + include_HEADERS = buffer.h config_shared.h decode.h error.h diction.h \ + libdspam.h libdspam_objects.h nodetree.h tokenizer.h \ +- storage_driver.h heap.h config.h ++ storage_driver.h heap.h config.h ldap_client.h + + # libdspam.a contans objects common for dspam and tools/* binaries + libdspam_la_SOURCES = \ --- dspam-3.6.6.orig/debian/patches/make-dspam_clean-quiet.dpatch +++ dspam-3.6.6/debian/patches/make-dspam_clean-quiet.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## make-dspam_clean-quiet.dpatch by Matthijs Mohlmann +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad dspam-3.6.6~/src/tools/dspam_clean.c dspam-3.6.6/src/tools/dspam_clean.c +--- dspam-3.6.6~/src/tools/dspam_clean.c 2006-05-13 14:17:31.000000000 +0200 ++++ dspam-3.6.6/src/tools/dspam_clean.c 2006-05-25 12:55:47.552919792 +0200 +@@ -122,7 +122,7 @@ + } + + #ifdef DEBUG +- fprintf (stderr, "dspam_clean starting\n"); ++ fprintf (stdout, "dspam_clean starting\n"); + #endif + + if (_ds_read_attribute(agent_config, "PurgeSignatures") && --- dspam-3.6.6.orig/debian/patches/add-config-dir.dpatch +++ dspam-3.6.6/debian/patches/add-config-dir.dpatch @@ -0,0 +1,181 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## add-config-dir.dpatch by Matthijs Mohlmann +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Add config item include that include directories. + +@DPATCH@ +diff -urNad dspam-3.6.6~/src/read_config.c dspam-3.6.6/src/read_config.c +--- dspam-3.6.6~/src/read_config.c 2006-05-29 12:53:07.000000000 -0400 ++++ dspam-3.6.6/src/read_config.c 2006-05-29 12:53:42.690296936 -0400 +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #ifdef HAVE_STRINGS_H + #include + #endif +@@ -41,6 +42,9 @@ + #include "pref.h" + #include "util.h" + ++long dirread(const char *path, config_t *attrib, long num_root); ++long fileread(const char *path, config_t *attrib, long num_root); ++ + static char *next_normal_token(char **p) + { + char *start = *p; +@@ -93,28 +97,73 @@ + return NULL; + } + +-config_t read_config(const char *path) { +- config_t attrib, ptr; ++// Read the files in the directory and pass it to fileread ++// or if it is a file, pass it to fileread. ++long dirread(const char *path, config_t *attrib, long num_root) { ++ DIR *dir_p; ++ char *fulldir; ++ struct dirent *dir_entry_p; ++ int n, m; ++ ++ // Strip "\n" ++ char *ptr = strrchr(path, '\n'); ++ if (ptr) ++ *ptr = '\0'; ++ ++ if ((dir_p = opendir(path))) { ++ while((dir_entry_p = readdir(dir_p))) ++ { ++ // We don't need the . and .. ++ if (strcmp(dir_entry_p->d_name, ".") == 0 || ++ strcmp(dir_entry_p->d_name, "..") == 0) ++ continue; ++ ++ // only use files which end in .conf: ++ if (strncmp(dir_entry_p->d_name + strlen(dir_entry_p->d_name) - 5, ++ ".conf", 5) != 0) { ++ continue; ++ } ++ ++ n = strlen(dir_entry_p->d_name); ++ m = strlen(path); ++ fulldir = (char *)malloc(n+m+2); ++ strcpy(fulldir, (char *)path); ++ strcat(fulldir, "/"); ++ strcat(fulldir, dir_entry_p->d_name); ++ num_root = fileread((const char *)fulldir, attrib, num_root); ++ free(fulldir); ++ } ++ closedir(dir_p); ++ } else { ++ // Could be a file. ++ return fileread((const char *)path, attrib, num_root); ++ } ++ ++ return num_root; ++} ++ ++// Read the file and check if there is an Include directive, if so then pass ++// it to dirread. ++long fileread(const char *path, config_t *attrib, long num_root) { ++ config_t ptr; + FILE *file; +- long attrib_size = 128, num_root = 0; ++ long attrib_size = 128; + char buffer[1024]; + char *a, *c, *v, *bufptr = buffer; + +- attrib = calloc(1, attrib_size*sizeof(attribute_t)); +- if (attrib == NULL) { +- LOG(LOG_CRIT, ERR_MEM_ALLOC); +- return NULL; +- } +- + if (path == NULL) + file = fopen(CONFIG_DEFAULT, "r"); + else + file = fopen(path, "r"); + + if (file == NULL) { +- LOG(LOG_ERR, ERR_IO_FILE_OPEN, CONFIG_DEFAULT, strerror(errno)); +- free(attrib); +- return NULL; ++ if (path == NULL) { ++ LOG(LOG_ERR, ERR_IO_FILE_OPEN, CONFIG_DEFAULT, strerror(errno)); ++ } else { ++ LOG(LOG_ERR, ERR_IO_FILE_OPEN, path, strerror(errno)); ++ } ++ free(*attrib); ++ return 0; + } + + while(fgets(buffer, sizeof(buffer), file)!=NULL) { +@@ -130,30 +179,48 @@ + continue; /* Ignore whitespace-only lines */ + + while ((v = tokenize(NULL, &bufptr)) != NULL) { +- if (_ds_find_attribute(attrib, a)!=NULL) { +- _ds_add_attribute(attrib, a, v); +- } +- else { +- num_root++; +- if (num_root >= attrib_size) { +- attrib_size *=2; +- ptr = realloc(attrib, attrib_size*sizeof(attribute_t)); +- if (ptr) +- attrib = ptr; +- else +- LOG(LOG_CRIT, ERR_MEM_ALLOC); +- } +- _ds_add_attribute(attrib, a, v); ++ // Check for include directive ++ if (strcmp(a, "Include") == 0) { ++ // Give v (value) to dirraed ++ num_root = dirread(v, attrib, num_root); ++ } else { ++ if (_ds_find_attribute((*attrib), a)!=NULL) { ++ _ds_add_attribute((*attrib), a, v); ++ } ++ else { ++ num_root++; ++ if (num_root >= attrib_size) { ++ attrib_size *=2; ++ ptr = realloc((*attrib), attrib_size*sizeof(attribute_t)); ++ if (ptr) ++ *attrib = ptr; ++ else ++ LOG(LOG_CRIT, ERR_MEM_ALLOC); ++ } ++ _ds_add_attribute((*attrib), a, v); ++ } + } + } + } + + fclose(file); + +- ptr = realloc(attrib, ((num_root+1)*sizeof(attribute_t))+1); +- if (ptr) +- return ptr; +- LOG(LOG_CRIT, ERR_MEM_ALLOC); ++ return num_root; ++} ++ ++config_t read_config(const char *path) { ++ config_t attrib; ++ long attrib_size = 128, num_root = 0; ++ ++ attrib = calloc(1, attrib_size*sizeof(attribute_t)); ++ if (attrib == NULL) { ++ LOG(LOG_CRIT, ERR_MEM_ALLOC); ++ return NULL; ++ } ++ ++ if (fileread(path, &attrib, num_root) == 0) ++ return NULL; ++ + return attrib; + } + --- dspam-3.6.6.orig/debian/patches/fix-nav-performance.dpatch +++ dspam-3.6.6/debian/patches/fix-nav-performance.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## fix-nav-performance.dpatch by Matthijs Mohlmann +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad dspam-3.6.4~/webui/cgi-bin/templates/nav_performance.html dspam-3.6.4/webui/cgi-bin/templates/nav_performance.html +--- dspam-3.6.4~/webui/cgi-bin/templates/nav_performance.html 2006-01-18 17:46:22.000000000 +0100 ++++ dspam-3.6.4/webui/cgi-bin/templates/nav_performance.html 2006-03-16 18:41:38.177049920 +0100 +@@ -31,7 +31,7 @@ +

+ If you receive a message in your e-mail application that was not caught by + the filter, please forward it to +-spam-$REMOTE_USER$@yourdomain.com ++spam-$REMOTE_USER$@$LOCAL_DOMAIN$ + so that it can be analyzed and learned as SPAM. This will improve the filter's accuracy in the future. +

+ --- dspam-3.6.6.orig/debian/patches/update-dspam.conf.dpatch +++ dspam-3.6.6/debian/patches/update-dspam.conf.dpatch @@ -0,0 +1,138 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## Updates dspam.conf +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Make some changes to dspam.conf + + +@DPATCH@ +diff -urNad dspam-3.6.6~/src/dspam.conf.in dspam-3.6.6/src/dspam.conf.in +--- dspam-3.6.6~/src/dspam.conf.in 2006-05-19 22:14:13.202423376 +0200 ++++ dspam-3.6.6/src/dspam.conf.in 2006-05-19 22:20:03.904108616 +0200 +@@ -127,6 +127,7 @@ + # able to specify delivery agent privileges or use tools. + # + Trust root ++Trust dspam + Trust mail + Trust mailnull + Trust smmsp +@@ -246,7 +247,7 @@ + # If user or default.prefs are found, the user's preferences will override any + # defaults. + # +-Preference "spamAction=quarantine" ++Preference "spamAction=tag" + Preference "signatureLocation=message" # 'message' or 'headers' + Preference "showFactors=on" + #Preference "spamAction=tag" +@@ -267,92 +268,6 @@ + AllowOverride optIn optOut + AllowOverride whitelistThreshold + +-# --- MySQL --- +- +-# +-# Storage driver settings: Specific to a particular storage driver. Uncomment +-# the configuration specific to your installation, if applicable. +-# +-#MySQLServer /var/lib/mysql/mysql.sock +-#MySQLPort +-#MySQLUser dspam +-#MySQLPass changeme +-#MySQLDb dspam +-#MySQLCompress true +- +-# If you are using replication for clustering, you can also specify a separate +-# server to perform all writes to. +-# +-#MySQLWriteServer /var/lib/mysql/mysql.sock +-#MySQLWritePort +-#MySQLWriteUser dspam +-#MySQLWritePass changeme +-#MySQLWriteDb dspam_write +-#MySQLCompress true +- +-# If your replication isn't close to real-time, your retraining might fail if +-# the signature isn't found. One workaround for this is to use the write +-# database for all signature reads: +-# +-#MySQLReadSignaturesFromWriteDb on +- +-# Use this if you have the 4.1 quote bug (see doc/mysql.txt) +-#MySQLSupressQuote on +- +-# If you're running DSPAM in client/server (daemon) mode, uncomment the +-# setting below to override the default connection cache size (the number +-# of connections the server pools between all clients). The connection cache +-# represents the maximum number of database connections *available* and should +-# be set based on the maximum number of concurrent connections you're likely +-# to have. Each connection may be used by only one thread at a time, so all +-# other threads _will block_ until another connection becomes available. +-# +-#MySQLConnectionCache 10 +- +-# If you're using vpopmail or some other type of virtual setup and wish to +-# change the table dspam uses to perform username/uid lookups, you can over- +-# ride it below +- +-#MySQLVirtualTable dspam_virtual_uids +-#MySQLVirtualUIDField uid +-#MySQLVirtualUsernameField username +- +-# UIDInSignature: MySQL supports the insertion of the user id into the DSPAM +-# signature. This allows you to create one single spam or fp alias +-# (pointing to some arbitrary user), and the uid in the signature will +-# switch to the correct user. Result: you need only one spam alias +- +-#MySQLUIDInSignature on +- +-# --- PostgreSQL --- +- +-#PgSQLServer 127.0.0.1 +-#PgSQLPort 5432 +-#PgSQLUser dspam +-#PgSQLPass changeme +-#PgSQLDb dspam +- +-# If you're running DSPAM in client/server (daemon) mode, uncomment the +-# setting below to override the default connection cache size (the number +-# of connections the server pools between all clients). +-# +-#PgSQLConnectionCache 3 +- +-# UIDInSignature: PgSQL supports the insertion of the user id into the DSPAM +-# signature. This allows you to create one single spam or fp alias +-# (pointing to some arbitrary user), and the uid in the signature will +-# switch to the correct user. Result: you need only one spam alias +- +-#PgSQLUIDInSignature on +- +-# If you're using vpopmail or some other type of virtual setup and wish to +-# change the table dspam uses to perform username/uid lookups, you can over- +-# ride it below +- +-#PgSQLVirtualTable dspam_virtual_uids +-#PgSQLVirtualUIDField uid +-#PgSQLVirtualUsernameField username +- + # --- Oracle --- + + #OraServer "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SID=PROD)))" +@@ -563,7 +478,7 @@ + # users will be filtered unless a .nodspam file is dropped in + # /var/dspam/opt-out/user.nodspam + # +-Opt out ++Opt in + + # + # TrackSources: specify which (if any) source addresses to track and report +@@ -721,4 +636,7 @@ + # + ProcessorBias on + ++# Include a directory with configuration items. ++Include /etc/dspam/dspam.d/ ++ + ## EOF --- dspam-3.6.6.orig/debian/patches/clean-warnings.dpatch +++ dspam-3.6.6/debian/patches/clean-warnings.dpatch @@ -0,0 +1,84 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## clean-warnings.dpatch by Daniel Kahn Gillmor +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Clean up spurious compiler warnings in sqlite3_drv.c and during +## DP: autoconf to allow building with -Werror + +@DPATCH@ +diff -urNad dspam-3.6.6~/m4/mysql_drv.m4 dspam-3.6.6/m4/mysql_drv.m4 +--- dspam-3.6.6~/m4/mysql_drv.m4 2006-05-28 21:45:48.000000000 -0400 ++++ dspam-3.6.6/m4/mysql_drv.m4 2006-05-28 21:45:57.390114192 -0400 +@@ -158,6 +158,7 @@ + ]], + [[ + MYSQL *mysql = mysql_init(NULL); ++ mysql_close(mysql); + ]])], + [ mysql_libs_success=yes ], + [ mysql_libs_success=no ] +diff -urNad dspam-3.6.6~/m4/pgsql_drv.m4 dspam-3.6.6/m4/pgsql_drv.m4 +--- dspam-3.6.6~/m4/pgsql_drv.m4 2006-05-28 21:45:48.000000000 -0400 ++++ dspam-3.6.6/m4/pgsql_drv.m4 2006-05-28 21:45:57.391114040 -0400 +@@ -152,6 +152,7 @@ + ]], + [[ + PGconn *pgsql = PQconnectdb(NULL); ++ PQfinish(pgsql); + ]])], + [ pgsql_libs_success=yes ], + [ pgsql_libs_success=no ] +diff -urNad dspam-3.6.6~/m4/sqlite3_drv.m4 dspam-3.6.6/m4/sqlite3_drv.m4 +--- dspam-3.6.6~/m4/sqlite3_drv.m4 2006-05-28 21:45:48.000000000 -0400 ++++ dspam-3.6.6/m4/sqlite3_drv.m4 2006-05-28 21:47:24.042940960 -0400 +@@ -65,6 +65,7 @@ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #include ++ #include + #ifdef HAVE_UNISTD_H + # include + #endif +@@ -197,7 +198,8 @@ + #include + ]], + [[ +- const char *v = sqlite3_version; ++ const char *v = 0; ++ v = sqlite3_version; + ]])], + [ ds_sqlite_libs_success=yes ], + [ ds_sqlite_libs_success=no ] +diff -urNad dspam-3.6.6~/m4/sqlite_drv.m4 dspam-3.6.6/m4/sqlite_drv.m4 +--- dspam-3.6.6~/m4/sqlite_drv.m4 2006-05-28 21:45:48.000000000 -0400 ++++ dspam-3.6.6/m4/sqlite_drv.m4 2006-05-28 21:46:41.682380744 -0400 +@@ -65,6 +65,7 @@ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #include ++ #include + #ifdef HAVE_UNISTD_H + # include + #endif +@@ -197,7 +198,8 @@ + #include + ]], + [[ +- const char *v = sqlite_version; ++ const char *v = 0; ++ v = sqlite_version; + ]])], + [ ds_sqlite_libs_success=yes ], + [ ds_sqlite_libs_success=no ] +diff -urNad dspam-3.6.6~/src/sqlite3_drv.c dspam-3.6.6/src/sqlite3_drv.c +--- dspam-3.6.6~/src/sqlite3_drv.c 2006-05-28 21:45:57.036168000 -0400 ++++ dspam-3.6.6/src/sqlite3_drv.c 2006-05-28 21:45:57.392113888 -0400 +@@ -135,7 +135,7 @@ + struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; + char query[1024]; + char *err=NULL; +- int result; ++ int result = SQLITE_OK; + + if (s->dbh == NULL) + { --- dspam-3.6.6.orig/debian/patches/fix-delivery-segv.dpatch +++ dspam-3.6.6/debian/patches/fix-delivery-segv.dpatch @@ -0,0 +1,28 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## fix-delivery-segv.dpatch by Daniel Kahn Gillmor +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: fixing a segfault if no DeliveryHost is specified. + +@DPATCH@ +diff -urNad dspam-3.6.6/src/client.c /tmp/dpep.oHqFiC/dspam-3.6.6/src/client.c +--- dspam-3.6.6/src/client.c 2006-05-25 11:19:04.287787079 -0400 ++++ /tmp/dpep.oHqFiC/dspam-3.6.6/src/client.c 2006-05-25 11:19:33.009003264 -0400 +@@ -289,7 +289,7 @@ + if (_ds_read_attribute(agent_config, "DeliveryPort")) + port = atoi(_ds_read_attribute(agent_config, "DeliveryPort")); + +- if (host[0] == '/') ++ if (host && (host[0] == '/')) + domain = 1; + + } else { +@@ -298,7 +298,7 @@ + if (_ds_read_attribute(agent_config, "ClientPort")) + port = atoi(_ds_read_attribute(agent_config, "ClientPort")); + +- if (host[0] == '/') ++ if (host && (host[0] == '/')) + domain = 1; + } + --- dspam-3.6.6.orig/debian/patches/autogen-sh.dpatch +++ dspam-3.6.6/debian/patches/autogen-sh.dpatch @@ -0,0 +1,30 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## autogen-sh.dpatch by Matthijs Mohlmann +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad dspam-3.6.2~/autogen.sh dspam-3.6.2/autogen.sh +--- dspam-3.6.2~/autogen.sh 2005-09-11 03:52:57.000000000 +0200 ++++ dspam-3.6.2/autogen.sh 2005-12-21 16:05:21.272130250 +0100 +@@ -12,8 +12,8 @@ + if test x"${AUTOCONF}" != x -a -f ${AUTOCONF} + then + AUTOCONF=autoconf +- AUTOMAKE=automake +- ACLOCAL=aclocal ++ AUTOMAKE=automake-1.9 ++ ACLOCAL=aclocal-1.9 + if test x"${LIBTOOLIZE}" != x -a -f "${LIBTOOLIZE}" + then + LIBTOOLIZE=libtoolize +@@ -37,7 +37,7 @@ + + GETTEXTIZE_FLAGS=--no-changelog + AUTOPOINT_FLAGS= +-LIBTOOLIZE_FLAGS= ++LIBTOOLIZE_FLAGS="--copy --force" + + # Some OS's require /usr/local/share/aclocal + --- dspam-3.6.6.orig/debian/dspam.manpages +++ dspam-3.6.6/debian/dspam.manpages @@ -0,0 +1,14 @@ +debian/manpages/dspam_admin.1 +debian/manpages/dspam_crc.1 +debian/manpages/dspam_2sql.1 +debian/manpages/dspam_logrotate.1 +debian/manpages/dspamc.1 +debian/manpages/cssclean.1 +debian/manpages/csscompress.1 +debian/manpages/cssstat.1 +man/dspam.1 +man/dspam_clean.1 +man/dspam_train.1 +man/dspam_dump.1 +man/dspam_merge.1 +man/dspam_stats.1 --- dspam-3.6.6.orig/debian/libdspam7-drv-pgsql.postrm +++ dspam-3.6.6/debian/libdspam7-drv-pgsql.postrm @@ -0,0 +1,38 @@ +#!/bin/sh +# +# Post removal + +set -e + +# Load debconf +. /usr/share/debconf/confmodule + +# Load dbconfig +. /usr/share/dbconfig-common/dpkg/postrm.pgsql + +# Run dbconfig +dbc_go libdspam7-drv-pgsql $@ + +case "$1" in + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + purge) + # Remove files registered with ucf. + for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do + rm -f /etc/dspam/dspam.d/pgsql.conf$ext + done + rm -f /etc/dspam/dspam.d/pgsql.conf + ucf --purge /etc/dspam/dspam.d/pgsql.conf + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + --- dspam-3.6.6.orig/debian/libdspam7.dirs +++ dspam-3.6.6/debian/libdspam7.dirs @@ -0,0 +1 @@ +usr/lib --- dspam-3.6.6.orig/debian/libdspam7-drv-mysql.install +++ dspam-3.6.6/debian/libdspam7-drv-mysql.install @@ -0,0 +1,10 @@ +debian/tmp/usr/lib/libmysql_drv.so* usr/lib/dspam +debian/sqlfiles/mysql usr/share/dbconfig-common/data/libdspam7-drv-mysql/install +src/tools.mysql_drv/mysql_objects-4.1.sql usr/share/doc/libdspam7-drv-mysql/ +src/tools.mysql_drv/mysql_objects-space.sql usr/share/doc/libdspam7-drv-mysql/ +src/tools.mysql_drv/mysql_objects-speed.sql usr/share/doc/libdspam7-drv-mysql/ +src/tools.mysql_drv/virtual_user_aliases.sql usr/share/doc/libdspam7-drv-mysql/ +src/tools.mysql_drv/virtual_users.sql usr/share/doc/libdspam7-drv-mysql/ +src/tools.mysql_drv/purge-4.1.sql usr/share/doc/libdspam7-drv-mysql/ +src/tools.mysql_drv/purge.sql usr/share/doc/libdspam7-drv-mysql/ +debian/config/mysql.conf usr/share/doc/libdspam7-drv-mysql/ --- dspam-3.6.6.orig/debian/libdspam7-drv-sqlite3.docs +++ dspam-3.6.6/debian/libdspam7-drv-sqlite3.docs @@ -0,0 +1 @@ +doc/sqlite_drv.txt --- dspam-3.6.6.orig/debian/dspam.postinst +++ dspam-3.6.6/debian/dspam.postinst @@ -0,0 +1,81 @@ +#!/bin/sh + +set -e + +test $DEBIAN_SCRIPT_DEBUG && set -v -x + +create_user() { + # idea stolen from postfix.postinst: make sure our user exists, + # simplest portable way to check is to chown something. + touch /var/spool/dspam/temp + if ! chown dspam /var/spool/dspam/temp 2>/dev/null; then + addgroup --quiet --system dspam + adduser --quiet --system --ingroup dspam --home /var/spool/dspam \ + --no-create-home --disabled-password \ + --gecos 'DSPAM' dspam + fi + rm -f /var/spool/dspam/temp 2>/dev/null + return 0 +} + +set_dspam_perms() { + + #touch /var/log/dspam.debug /var/log/sql.errors /var/log/dspam.messages + #chown dspam.dspam /var/log/dspam.debug /var/log/sql.errors /var/log/dspam.messages + #chmod 660 /var/log/dspam.debug /var/log/sql.errors /var/log/dspam.messages + + ## If you add any other permission/ownership tweaks here, then + ## remember to add a corresponding remove operation to the + ## remove_dspam_perms() function, below + + # Database password info is contained in dspam.conf + if ! dpkg-statoverride --list /etc/dspam/dspam.conf >/dev/null + then + dpkg-statoverride --update --add dspam dspam 0640 /etc/dspam/dspam.conf + fi + + if ! dpkg-statoverride --list /usr/bin/dspam >/dev/null + then + dpkg-statoverride --update --add dspam dspam 2755 /usr/bin/dspam + fi + + if ! dpkg-statoverride --list /var/spool/dspam >/dev/null + then + dpkg-statoverride --update --add dspam dspam 0770 /var/spool/dspam + fi + + if ! dpkg-statoverride --list /var/spool/dspam/data >/dev/null + then + dpkg-statoverride --update --add dspam dspam 0770 /var/spool/dspam/data + fi + + if ! dpkg-statoverride --list /etc/dspam/default.prefs >/dev/null + then + dpkg-statoverride --update --add dspam dspam 0644 /etc/dspam/default.prefs + fi + + return 0 +} + +case "$1" in + configure) + create_user + set_dspam_perms + ;; + + reconfigure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + --- dspam-3.6.6.orig/debian/libdspam7-drv-pgsql.docs +++ dspam-3.6.6/debian/libdspam7-drv-pgsql.docs @@ -0,0 +1 @@ +doc/pgsql_drv.txt --- dspam-3.6.6.orig/debian/libdspam7-drv-db4.install +++ dspam-3.6.6/debian/libdspam7-drv-db4.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/libdb4_drv.so* usr/lib/dspam --- dspam-3.6.6.orig/debian/libdspam7-drv-sqlite3.cron.daily +++ dspam-3.6.6/debian/libdspam7-drv-sqlite3.cron.daily @@ -0,0 +1,13 @@ +#!/bin/sh +# +# Clean the sqlite3 databases + +DSPAMCONF=/etc/dspam/dspam.conf +DSPAMHOME=`cat $DSPAMCONF | grep ^Home | awk '{print $2}'` + +if [ -d "$DSPAMHOME/data" ]; then + find $DSPAMHOME/data -name "*.sdb" -exec sqlite {} < /usr/share/dspam/clean/purge-3.sql \; +fi + +exit 0 + --- dspam-3.6.6.orig/debian/libdspam7-drv-mysql.override +++ dspam-3.6.6/debian/libdspam7-drv-mysql.override @@ -0,0 +1 @@ +libdspam7-drv-mysql: no-debconf-templates --- dspam-3.6.6.orig/debian/dspam-webfrontend.override +++ dspam-3.6.6/debian/dspam-webfrontend.override @@ -0,0 +1 @@ +dspam-webfrontend: script-not-executable ./etc/dspam/webfrontend.conf --- dspam-3.6.6.orig/debian/dspam-documents/exim4/router/250_dspam_spamcheck_director +++ dspam-3.6.6/debian/dspam-documents/exim4/router/250_dspam_spamcheck_director @@ -0,0 +1,10 @@ +# DSPAM +spamcheck_director: + driver = accept + check_local_user + condition = "${if and {\ + {!def:h_X-DSPAM-Result:}\ + }{1}{0}}" + headers_add = "X-DSPAM-Check: by $primary_hostname on $tod_full" + transport = spamcheck + no_verify --- dspam-3.6.6.orig/debian/dspam-documents/exim4/router/350_dspam_aliases +++ dspam-3.6.6/debian/dspam-documents/exim4/router/350_dspam_aliases @@ -0,0 +1,11 @@ +dspam_addspam: + driver = accept + check_local_user + local_part_prefix = spam- + transport = addspam + +dspam_falsepositive: + driver = accept + check_local_user + local_part_prefix = falsepos- + transport = falsepositive --- dspam-3.6.6.orig/debian/dspam-documents/exim4/transport/40_dspam_falsepos +++ dspam-3.6.6/debian/dspam-documents/exim4/transport/40_dspam_falsepos @@ -0,0 +1,12 @@ +falsepositive: + driver = pipe + command = "/usr/local/bin/dspam --user $local_part --mode=teft --class=innocent --source=error" + current_directory = "/var/dspam" + group = mail + home_directory = "/var/dspam" + log_output + message_prefix = "" + message_suffix = "" + return_fail_output + no_return_path_add + user = mail --- dspam-3.6.6.orig/debian/dspam-documents/exim4/transport/40_dspam_addspam +++ dspam-3.6.6/debian/dspam-documents/exim4/transport/40_dspam_addspam @@ -0,0 +1,12 @@ +addspam: + driver = pipe + command = "/usr/local/bin/dspam --user $local_part --mode=teft --class=spam --source=error" + current_directory = "/var/dspam" + group = mail + home_directory = "/var/dspam" + log_output + message_prefix = "" + message_suffix = "" + return_fail_output + no_return_path_add + user = mail --- dspam-3.6.6.orig/debian/dspam-documents/exim4/transport/40_dspam_spamcheck +++ dspam-3.6.6/debian/dspam-documents/exim4/transport/40_dspam_spamcheck @@ -0,0 +1,13 @@ +# DSPAM +spamcheck: + driver = pipe + command = /usr/local/bin/dspam --mode=teft --deliver=innocent,spam --user $local_part -bm %u + current_directory = "/var/dspam" + group = mail + home_directory = "/var/dspam" + log_output + message_prefix = + message_suffix = + return_fail_output + no_return_path_add + user = mail --- dspam-3.6.6.orig/debian/dspam-documents/exim4/dspam.conf +++ dspam-3.6.6/debian/dspam-documents/exim4/dspam.conf @@ -0,0 +1,321 @@ +## $Id: dspam.conf.in,v 1.2 2004/11/12 16:29:19 jonz Exp $ +## dspam.conf -- DSPAM configuration file +## + +# +# DSPAM Home: Specifies the base directory to be used for DSPAM storage +# +Home /var/dspam + +# +# Trusted Delivery Agent: Specifies the local delivery agent DSPAM should call +# when delivering mail as a trusted user. Use %u to specify the user DSPAM is +# processing mail for. It is generally a good idea to allow the MTA to specify +# the pass-through arguments at run-time, but they may also be specified here. +# +# Most operating system defaults: +#TrustedDeliveryAgent "/usr/bin/procmail" # Linux +#TrustedDeliveryAgent "/usr/bin/mail" # Solaris +#TrustedDeliveryAgent "/usr/libexec/mail.local" # FreeBSD +#TrustedDeliveryAgent "/usr/bin/procmail" # Cygwin +# +# Other popular configurations: +#TrustedDeliveryAgent "/usr/cyrus/bin/deliver" # Cyrus +#TrustedDeliveryAgent "/bin/maildrop" # Maildrop +#TrustedDeliveryAgent "/usr/sbin/exim -oMr spam-scanned $u" # Exim +TrustedDeliveryAgent "/usr/sbin/exim4" # Exim +# +#TrustedDeliveryAgent "/usr/bin/procmail" + +# +# Untrusted Delivery Agent: Specifies the local delivery agent and arguments +# DSPAM should use when delivering mail and running in untrusted user mode. +# Because DSPAM will not allow pass-through arguments to be specified to +# untrusted users, all arguments should be specified here. Use %u to specify +# the user DSPAM is processing mail for. This configuration parameter is only +# necessary if you plan on allowing untrusted processing. +# +#UntrustedDeliveryAgent "/usr/bin/procmail -d %u" + +# +# Quarantine Agent: DSPAM's default behavior is to quarantine all mail it +# thinks is spam. If you wish to override this behavior, you may specify +# a quarantine agent which will be called with all messages DSPAM thinks is +# spam. Use %u to specify the user DSPAM is processing mail for. +# +#QuarantineAgent "/usr/bin/procmail -d spam" + +# +# OnFail: What to do if local delivery or quarantine should fail. If set +# to "unlearn", DSPAM will unlearn the message prior to exiting with an +# un successful return code. The default option, "error" will not unlearn +# the message but return the appropriate error code. The unlearn option +# is use-ful on some systems where local delivery failures will cause the +# message to be requeued for delivery, and could result in the message +# being processed multiple times. During a very large failure, however, +# this could cause a significant load increase. +# +OnFail error + +# Trusted Users: Only the users specified below will be allowed to perform +# administrative functions in DSPAM such as setting the active user and +# accessing tools. All other users attempting to run DSPAM will be restricted; +# their uids will be forced to match the active username and they will not be +# able to specify delivery agent privileges or use tools. +# +Trust root +Trust mail +Trust mailnull +Trust smmsp +Trust daemon +#Trust nobody +#Trust majordomo + +# +# Debugging: Enables debugging for some or all users. IMPORTANT: DSPAM must +# be compiled with debug support in order to use this option. DSPAM should +# never be running in production with debug active unless you are +# troubleshooting problems. +# +# DebugOpt: One or more of: process, classify, spam, fp, inoculation, corpus +# process standard message processing +# classify message classification using --classify +# spam error correction of missed spam +# fp error correction of false positives +# inoculation message inoculations (source=inoculation) +# corpus corpusfed messages (source=corpus) +# +#Debug * +#Debug bob bill +# +#DebugOpt process spam fp + +# +# Training Mode: The default training mode to use for all operations, when +# one has not been specified on the commandline or in the user's preferences. +# Acceptable values are: toe, tum, teft, notrain +# +TrainingMode teft + +# +# Features: Specify features to activate by default; can also be specified +# on the commandline. See the documentation for a list of available features. +# If _any_ features are specified on the commandline, these are ignored. +# +#Feature sbph +Feature chained +Feature tb=4 +Feature whitelist +Feature noise + +# +# Algorithms: Specify the statistical algorithms to use, overriding any +# defaults configured in the build. The options are: +# graham Graham-Bayesian ("A Plan for Spam") +# burton Burton-Bayesian (SpamProbe) +# robinson Robinson's Geometric Mean Test (Obsolete) +# chi-square Fisher-Robinson's Chi-Square Algorithm +# +# You may have multiple algorithms active simultaneously, but it is strongly +# recommended that you group Bayesian algorithms with other Bayesian +# algorithms, and any use of Chi-Square remain exclusive. +# +# Don't mess with this unless you know what you're doing +# +#Algorithm chi-square +Algorithm graham burton + +# +# PValue: Specify the technique used for calculating PValues, overriding any +# defaults configured in the build. These options are: +# graham Graham's Technique ("A Plan for Spam") +# robinson Robinson's Technique +# +# Unlike algorithms, you may only have one of these defined. Use of the +# chi-square algorithm automatically changes this to robinson. +# +# Don't mess with this unless you know what you're doing. +# +#PValue robinson +PValue graham + +# +# Preferences: Specify any preferences to set by default, unless otherwise +# overridden by the user (see next section) or a default.prefs file. +# If user or default.prefs are found, none of these preferences are +# loaded. +# +#Preference "spamAction=quarantine" +Preference "signatureLocation=headers" # 'message' or 'headers' +#Preference "showFactors=on" +#Preference "spamAction=tag" +#Preference "spamSubject=SPAM" + +# +# Overrides: Specifies the user preferences which may override configuration +# and commandline defaults. Any other preferences supplied by an untrusted user +# will be ignored. +# +AllowOverride trainingMode +AllowOverride spamAction spamSubject +AllowOverride statisticalSedation +AllowOverride enableBNR +AllowOverride enableWhitelist +AllowOverride signatureLocation +AllowOverride showFactors +AllowOverride optIn optOut +AllowOverride whitelistThreshold + +# +# Storage driver settings: Specific to a particular storage driver. Uncomment +# the configuration specific to your installation, if applicable. +# +#MySQLServer /var/lib/mysql/mysql.sock +#MySQLPort +#MySQLUser dspam +#MySQLPass changeme +#MySQLDb dspam +#MySQLCompress true + +#PgSQLServer 127.0.0.1 +#PgSQLPort 5432 +#PgSQLUser dspam +#PgSQLPass changeme +#PgSQLDb dspam + +#OraServer "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SID=PROD)))" +#OraUser dspam +#OraPass changeme +#OraSchema dspam + +#SQLitePragma "synchronous = OFF" + +# +# Optionally, you can specify storage profiles, and specify the server to +# use on the commandline with --profile. For example: +# +#Profile DECAlpha +#MySQLServer.DECAlpha 10.0.0.1 +#MySQLPort.DECAlpha 3306 +#MySQLUser.DECAlpha dspam +#MySQLPass.DECAlpha changeme +#MySQLDb.DECAlpha dspam +#MySQLCompress.DECAlpha true +# +#Profile Sun420R +#MySQLServer.Sun420R 10.0.0.2 +#MySQLPort.Sun420R 3306 +#MySQLUser.Sun420R dspam +#MySQLPass.Sun420R changeme +#MySQLDb.Sun420R dspam +#MySQLCompress.Sun420R false +# +#DefaultProfile DECAlpha + +# +# Ignored headers: If DSPAM is behind other tools which may add a header to +# incoming emails, it may be beneficial to ignore these headers - especially +# if they are coming from another spam filter. If you are _not_ using one of +# these tools, however, leaving the appropriate headers commented out will +# allow DSPAM to use them as telltale signs of forged email. +# +#IgnoreHeader X-Spam-Status +#IgnoreHeader X-Spam-Scanned +#IgnoreHeader X-Virus-Scanner-Result + +# +# Notifications: Enable the sending of notification emails to users (first +# message, quarantine full, etc.) +# +Notifications on + +# +# Purge configuration: Set dspam_clean purge default options, if not otherwise +# specified on the commandline +# +PurgeSignatures 14 # Stale signatures +PurgeNeutral 30 # Tokens with neutralish probabilities +PurgeUnused 60 # Unused tokens +PurgeHapaxes 15 # Tokens with less than 5 hits (hapaxes) +PurgeHits1S 10 # Tokens with only 1 spam hit +PurgeHits1I 10 # Tokens with only 1 innocent hit + +# +# Purge configuration for SQL-based installations using purge.sql +# +#PurgeSignature off # Specified in purge.sql +#PurgeNeutral 30 +#PurgeUnused off # Specified in purge.sql +#PurgeHapaxes off # Specified in purge.sql +#PurgeHits1S off # Specified in purge.sql +#PurgeHits1I off # Specified in purge.sql + +# +# Local Mail Exchangers: Used for source address tracking, tells DSPAM which +# mail exchangers are local and therefore should be ignored in the Received: +# header when tracking the source of an email. Note: you should use the address +# of the host as appears between brackets [ ] in the Received header. +# +LocalMX 127.0.0.1 + +# +# Logging: Disabling logging for users will make usage graphs unavailable to +# them. Disabling system logging will make admin graphs unavailable. +# +SystemLog on +UserLog on + +# +# TrainPristine: for systems where the original message remains server side +# and can therefore be presented in pristine format for retraining. This option +# will cause DSPAM to cease all writing of signatures and DSPAM headers to the +# message, and deliver the message in as pristine format as possible. This mode +# REQUIRES that the original message in its pristine format (as of delivery) +# be presented for retraining, as in the case of webmail, imap, or other +# applications where the message is actually kept server-side during reading, +# and is preserved. DO NOT use this switch unless the original message can be +# presented for retraining with the ORIGINAL HEADERS and NO MODIFICATIONS. +# +#TrainPristine on + +# +# Opt: in or out; determines DSPAM's default filtering behavior. If this value +# is set to in, users must opt-in to filtering by dropping a .dspam file in +# /var/dspam/opt-in/user.dspam (or if you have homedirs configured, a .dspam +# folder in their home directory). The default is opt-out, which means all +# users will be filtered unless a .nodspam file is dropped in +# /var/dspam/opt-out/user.nodspam +# +Opt out + +# +# TrackSources: specify which (if any) source addresses to track and report +# them to syslog (mail.info). This is useful if you're running a firewall or +# blacklist and would like to use this information. Spam reporting also drops +# SBL blacklist files (see http://www.nuclearelephant.com/projects/sbl/). +# +#TrackSources spam nonspam + +# +# ParseToHeaders: When retraining, it's possible to set up a wildcard such +# as *@spam.yourdomain.com to intercept all missed spam. If you do this, +# you'll need to enable this option so that the username is assigned based +# on the To: address of the message; for example spam-bob will assign the +# username to bob. +# +#ParseToHeaders on + +# +# Broken MTA Options: Some MTAs don't support the proper functionality +# necessary. In these cases you can activate certain features in DSPAM to +# compensate. 'returnCodes' causes DSPAM to return an exit code of 99 if +# the message is spam, 0 if not, or a negative code if an error has occured. +# Specifying 'case' causes DSPAM to force the input usernames to lowercase. +# Spceifying 'lineStripping' causes DSPAM to strip ^M's from messages passed +# in. +# +#Broken returnCodes +#Broken case +#Broken lineStripping + +## EOF --- dspam-3.6.6.orig/debian/dspam-documents/postfix/transport.domain +++ dspam-3.6.6/debian/dspam-documents/postfix/transport.domain @@ -0,0 +1,3 @@ +# Dspam integration (DO NOT FORGET TO CREATE DNS ENTRIES FOR THEM) +addspam.DOMAIN dspam-add:dummy +fp.DOMAIN dspam-fp:dummy --- dspam-3.6.6.orig/debian/dspam-documents/postfix/master.cf +++ dspam-3.6.6/debian/dspam-documents/postfix/master.cf @@ -0,0 +1,68 @@ +# ========================================================================== +# service type private unpriv chroot wakeup maxproc command + args +# (yes) (yes) (yes) (never) (100) +# ========================================================================== +smtp inet n - n - - smtpd + +#submission inet n - - - - smtpd +# -o smtpd_etrn_restrictions=reject +#628 inet n - - - - qmqpd +pickup fifo n - - 60 1 pickup +cleanup unix n - - - 0 cleanup +qmgr fifo n - - 300 1 qmgr +#qmgr fifo n - - 300 1 oqmgr +rewrite unix - - - - - trivial-rewrite +bounce unix - - - - 0 bounce +defer unix - - - - 0 bounce +trace unix - - - - 0 bounce +verify unix - - - - 1 verify +flush unix n - - 1000? 0 flush +proxymap unix - - n - - proxymap +smtp unix - - - - - smtp +relay unix - - - - - smtp +# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 +showq unix n - - - - showq +error unix - - - - - error +local unix - n n - - local +virtual unix - n n - - virtual +lmtp unix - - n - - lmtp +anvil unix - - n - 1 anvil + +cyrus unix - n n - - pipe + flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e -m ${extension} ${user} +# +# Interfaces to non-Postfix software. Be sure to examine the manual +# pages of the non-Postfix software to find out what options it wants. +# +# maildrop. See the Postfix MAILDROP_README file for details. +# +maildrop unix - n n - - pipe + flags=DRhu user=dspam argv=/usr/bin/maildrop -d ${user} +uucp unix - n n - - pipe + flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) +ifmail unix - n n - - pipe + flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) +bsmtp unix - n n - - pipe + flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender $recipient +scalemail-backend unix - n n - 2 pipe + flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension} + +# only used by postfix-tls +#tlsmgr fifo - - n 300 1 tlsmgr +#smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes +#587 inet n - n - - smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes + +# only allow local network to post to these entries +dspam-add unix - n n - - pipe + flags=Rhq user=dspam argv=/usr/bin/dspam --mode=teft --class=spam --source=error -i -f ${sender} -- %u - + -o smtpd_recipient_restrictions=permit_mynetworks,reject + -o mynetworks=192.168.1.0/24 + +# only allow local network to post to these entries +dspam-fp unix - n n - - pipe + flags=Rhq user=dspam argv=/usr/bin/dspam --mode=teft --user ${user} --class=innocent --source=error + -o smtpd_recipient_restrictions=permit_mynetworks,reject + -o mynetworks=192.168.1.0/24 + +dspam unix - n n - - pipe + flags=Rhq user=dspam argv=/usr/bin/dspam --mode=teft --deliver=innocent,spam --feature=ch,no,tb=2 --user --- dspam-3.6.6.orig/debian/dspam-documents/postfix/main.cf +++ dspam-3.6.6/debian/dspam-documents/postfix/main.cf @@ -0,0 +1,51 @@ +queue_directory = /var/spool/postfix +command_directory = /usr/sbin +daemon_directory = /usr/lib/postfix +mail_owner = postfix +default_privs = nobody +myhostname = HOSTNAME +mydomain = DOMAIN +myorigin = ORIGIN +inet_interfaces = localhost, INET_INTERFACE +mydestination = localhost.$mydomain, $mydomain +mail_spool_directory = /var/spool/mail + +mailbox_command = /usr/bin/procmail -a $DOMAIN -d $LOGNAME + + +mailbox_transport = dspam + +fallback_transport = +relay_domains = +mynetworks = 192.168.0.0/24, 127.0.0.0/8 +smtpd_banner = $myhostname ESMTP (--SMTP SERVER--) +local_destination_concurrency_limit = 2 +default_destination_concurrency_limit = 10 +debug_peer_level = 10 + +program_directory = /usr/lib/postfix + +alias_maps = hash:/etc/postfix/aliases +transport_maps = hash:/etc/postfix/transport, hash:/etc/postfix/transport.domain +alias_database = hash:/etc/mail/aliases +sender_canonical_maps = hash:/etc/postfix/canonical + +# filtres +smtpd_sender_restrictions = reject_unknown_sender_domain, permit +smtpd_helo_restrictions = permit_mynetworks, reject_invalid_hostname, permit + +# TLS +#smtpd_use_tls = yes +#smtpd_tls_cert_file = +#smtpd_tls_key_file = + +sendmail_path = /usr/sbin/sendmail +setgid_group = postdrop +manpage_directory = /usr/share/man +newaliases_path = /usr/bin/newaliases +mailq_path = /usr/bin/mailq + +# Dspam +dspam_destination_recipient_limit = 1 +dspam-add_destination_recipient_limit = 1 +spam-fp_destination_recipient_limit = 1 --- dspam-3.6.6.orig/debian/watch +++ dspam-3.6.6/debian/watch @@ -0,0 +1,7 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# Site Directory Pattern Version Script +version=2 +http://dspam.nuclearelephant.com /sources dspam-(.*)\.tar\.gz debian uupdate + --- dspam-3.6.6.orig/debian/libdspam7-drv-mysql.postinst +++ dspam-3.6.6/debian/libdspam7-drv-mysql.postinst @@ -0,0 +1,35 @@ +#!/bin/sh +# +# Post installation for the mysql backend. + +set -e + +# Load debconf +. /usr/share/debconf/confmodule + +# Load dbconfig (mysql part) +. /usr/share/dbconfig-common/dpkg/postinst.mysql + +# Set some variables +dbc_generate_include=template:/etc/dspam/dspam.d/mysql.conf +dbc_generate_include_owner="dspam" +dbc_generate_include_perms="640" +dbc_generate_include_args="-U -o template_infile='/usr/share/doc/libdspam7-drv-mysql/mysql.conf'" + +# Run dbconfig +dbc_go libdspam7-drv-mysql $@ + +case "$1" in + configure) + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + ;; +esac + +#DEBHELPER# + +exit 0 + --- dspam-3.6.6.orig/debian/customize-cgi.txt +++ dspam-3.6.6/debian/customize-cgi.txt @@ -0,0 +1,16 @@ + +Customising the cgi interface +----------------------------- + +The cgi interface uses html templates which are stored +into '/usr/share/dspam/templates'. +If you want to change them, copy '/usr/share/dspam/upstream-templates' +to another place (like '/usr/share/dspam/yoursite-templates') and +change the configuration file '/etc/dspam/webfrontend.conf' : +replace the value of $CONFIG{'TEMPLATES'} ('/usr/share/dspam/upstream-templates') +by your new template directory. +Then you can start to customize you templates. It is recommended to create new css +and images to prevent a package update to replace your modified file by new upstream +ones. + +The pkg-dspam team --- dspam-3.6.6.orig/debian/dspam-webfrontend.postinst +++ dspam-3.6.6/debian/dspam-webfrontend.postinst @@ -0,0 +1,41 @@ +#!/bin/sh + +set -e + +case "$1" in + configure) + for i in /var/www/dspam \ + /var/www/dspam/admin.cgi \ + /var/www/dspam/admingraph.cgi \ + /var/www/dspam/dspam.cgi \ + /var/www/dspam/graph.cgi + do + if ! dpkg-statoverride --list $i >/dev/null + then + dpkg-statoverride --update --add dspam dspam 0755 $i + fi + done + + if ! dpkg-statoverride --list /etc/dspam/webfrontend.conf >/dev/null + then + dpkg-statoverride --update --add dspam dspam 0600 /etc/dspam/webfrontend.conf + fi + + # Give users the chance to change the templates used for the webfrontend + # and give us the chance to update the templates properly. + ln -sf /usr/share/dspam upstream-templates /usr/share/dspam/templates + ;; + + reconfigure|abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + --- dspam-3.6.6.orig/debian/libdspam7-drv-pgsql.override +++ dspam-3.6.6/debian/libdspam7-drv-pgsql.override @@ -0,0 +1,2 @@ +libdspam7-drv-pgsql: no-debconf-templates +libdspam7-drv-pgsql: package-has-a-duplicate-relation depends: libdspam7, libdspam7 (= 3.6.6-2) --- dspam-3.6.6.orig/debian/libdspam7-dev.install +++ dspam-3.6.6/debian/libdspam7-dev.install @@ -0,0 +1,4 @@ +debian/tmp/usr/include/dspam/* usr/include/dspam +debian/tmp/usr/lib/pkgconfig/dspam.pc usr/lib/pkgconfig +debian/tmp/usr/lib/libdspam.so usr/lib +debian/tmp/usr/lib/libdspam.a usr/lib --- dspam-3.6.6.orig/debian/dspam.dirs +++ dspam-3.6.6/debian/dspam.dirs @@ -0,0 +1,5 @@ +usr/bin +var/spool/dspam/data +etc/dspam/dspam.d +var/log/dspam +usr/lib/dspam --- dspam-3.6.6.orig/debian/dspam.init +++ dspam-3.6.6/debian/dspam.init @@ -0,0 +1,139 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: skeleton +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: initscript for dspam +# Description: dspam is a scalable, fast and statistical anti-spam filter +### END INIT INFO +# +# Author: Matthijs Mohlmann . +# +# Based on the init script of pdns-recursor +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DESC="DSPAM Statistical anti-spam filter" +NAME=dspam +DAEMON=/usr/bin/$NAME +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Gracefully exit if the package has been removed. +test -x $DAEMON || exit 0 + +# Read config file if it is present. +if [ -r /etc/default/$NAME ]; then + . /etc/default/$NAME +fi + +OPTIONS="--daemon $OPTIONS" + +# Start the daemon +d_start() { +# Return +# 0 if daemon has been started +# 1 if daemon was already running +# 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $OPTIONS || return 2 +} + +# Stop the daemon +d_stop() { +# Return +# 0 if daemon has been stopped +# 1 if daemon was already stopped +# 2 if daemon could not be stopped +# other if a failure occured + start-stop-daemon --stop --quiet --retry=TERM/5/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + start-stop-daemon --stop --quiet --oknodo --retry=KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + rm -f $PIDFILE + return "$RETVAL" +} + +case "$1" in + start) + if [ "$START" != "yes" ]; then + echo "Not starting $DESC -- disabled." + exit 0 + fi + echo -n "Starting $DESC: $NAME" + d_start + case "$?" in + 0) + echo "." + exit 0 + ;; + 1) + echo " (already running)." + exit 0 + ;; + *) + echo " (failed)." + exit 1 + ;; + esac + ;; + stop) + # Always try to stop the daemon. + echo -n "Stopping $DESC: $NAME" + d_stop + case "$?" in + 0) + echo "." + exit 0 + ;; + 1) + echo " (not running)." + exit 0 + ;; + *) + echo " (failed)." + exit 1 + esac + ;; + restart|force-reload) + if [ "$START" != "yes" ]; then + $0 stop + exit 0 + fi + echo -n "Restarting $DESC: $NAME" + d_stop + case "$?" in + 0|1) + d_start + case "$?" in + 0) + echo "." + exit 0 + ;; + 1) + echo " (failed -- old process still running)." + exit 1 + ;; + *) + echo " (failed to start)." + exit 1 + ;; + esac + ;; + *) + echo " (failed to stop)." + exit 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 + --- dspam-3.6.6.orig/debian/libdspam7-drv-pgsql.postinst +++ dspam-3.6.6/debian/libdspam7-drv-pgsql.postinst @@ -0,0 +1,35 @@ +#!/bin/sh +# +# Post installation for the PostgreSQL backend. + +set -e + +# Load debconf +. /usr/share/debconf/confmodule + +# Set some variables +dbc_generate_include=template:/etc/dspam/dspam.d/pgsql.conf +dbc_generate_include_owner="dspam" +dbc_generate_include_perms="640" +dbc_generate_include_args="-U -o template_infile='/usr/share/doc/libdspam7-drv-pgsql/pgsql.conf'" + +# Load dbconfig (pgsql part) +. /usr/share/dbconfig-common/dpkg/postinst.pgsql + +# Run dbconfig +dbc_go libdspam7-drv-pgsql $@ + +case "$1" in + configure) + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + ;; +esac + +#DEBHELPER# + +exit 0 + --- dspam-3.6.6.orig/debian/libdspam7-drv-mysql.dirs +++ dspam-3.6.6/debian/libdspam7-drv-mysql.dirs @@ -0,0 +1,4 @@ +etc/dspam/dspam.d +usr/share/dbconfig-common/data/libdspam7-drv-mysql/install +usr/share/lintian/overrides/ +usr/lib/dspam --- dspam-3.6.6.orig/debian/dspam-webfrontend.dirs +++ dspam-3.6.6/debian/dspam-webfrontend.dirs @@ -0,0 +1,6 @@ +etc/dspam/ +usr/share/doc/dspam/ +usr/share/dspam/templates/ +var/spool/dspam/ +var/www/dspam/ +usr/share/lintian/overrides/ --- dspam-3.6.6.orig/debian/dspam.postrm +++ dspam-3.6.6/debian/dspam.postrm @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +remove_user() { + deluser --system dspam +} + +remove_dspam_perms() { + for i in \ + /etc/dspam/dspam.conf \ + /usr/bin/dspam \ + /var/spool/dspam \ + /var/spool/dspam/data \ + /etc/dspam/default.prefs \ + ; do + dpkg-statoverride --quiet --remove $i || true + done +} + +case "$1" in + purge) + remove_user + remove_dspam_perms + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +#DEBHELPER# + +exit 0 + --- dspam-3.6.6.orig/debian/compat +++ dspam-3.6.6/debian/compat @@ -0,0 +1 @@ +4 --- dspam-3.6.6.orig/debian/libdspam7-drv-mysql.config +++ dspam-3.6.6/debian/libdspam7-drv-mysql.config @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Configure mysql database. + +set -e + +# Load debconf +. /usr/share/debconf/confmodule + +# The questions that are asked are pretty important. +export DEBIAN_PRIORITY=low + +# Load dbconfig +. /usr/share/dbconfig-common/dpkg/config.mysql + +# Run dbconfig +dbc_go libdspam7-drv-mysql $@ + +exit 0 + --- dspam-3.6.6.orig/debian/libdspam7-drv-db4.dirs +++ dspam-3.6.6/debian/libdspam7-drv-db4.dirs @@ -0,0 +1 @@ +usr/lib/dspam --- dspam-3.6.6.orig/debian/libdspam7-drv-pgsql.prerm +++ dspam-3.6.6/debian/libdspam7-drv-pgsql.prerm @@ -0,0 +1,19 @@ +#!/bin/sh +# +# Pre removal + +set -e + +# Load debconf +. /usr/share/debconf/confmodule + +# Load dbconfig +. /usr/share/dbconfig-common/dpkg/prerm.pgsql + +# Run dbconfig +dbc_go libdspam7-drv-pgsql $@ + +#DEBHELPER# + +exit 0 + --- dspam-3.6.6.orig/debian/dspam.docs +++ dspam-3.6.6/debian/dspam.docs @@ -0,0 +1,3 @@ +README +UPGRADING +RELEASE.NOTES --- dspam-3.6.6.orig/debian/rules +++ dspam-3.6.6/debian/rules @@ -0,0 +1,175 @@ +#!/usr/bin/make -f +# +# This rules file is coming from dh_make and is modified by the +# Debian DSPAM maintainers team. + +# Uncomment this to turn on verbose mode. +# deprecated export DH_COMPAT=5 +#export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +CFLAGS = -Wall -g +STORAGE = "libdb4_drv,mysql_drv,pgsql_drv,sqlite3_drv,hash_drv" +CONFIGURE = --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr \ + --includedir=/usr/include \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --with-logdir=/var/log/dspam/ \ + --localstatedir=/var \ + --libexecdir=/usr/lib/dspam \ + --srcdir=.. \ + --with-dspam-home=/var/spool/dspam \ + --sysconfdir=/etc/dspam \ + --enable-domain-scale \ + --enable-signature-headers \ + --with-delivery-agent=/usr/bin/procmail \ + --enable-daemon \ + --with-mysql-includes=/usr/include/mysql \ + --with-pgsql-includes=`pg_config --includedir` \ + --with-storage-driver=${STORAGE} \ + --enable-ldap \ + --enable-debug + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +ifeq (,$(findstring disable_virtual_users,$(DEB_BUILD_OPTIONS))) + CONFIGURE += --enable-virtual-users +endif +ifeq (,$(findstring disable_preferences_extension,$(DEB_BUILD_OPTIONS))) + CONFIGURE += --enable-preferences-extension +endif +ifneq (,$(findstring verbose_debug,$(DEB_BUILD_OPTIONS))) + CONFIGURE += --verbose-debug +endif +ifeq (,$(findstring disable_clamav,$(DEB_BUILD_OPTIONS))) + CONFIGURE += --enable-clamav +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + mkdir build--tmp + ./autogen.sh + (cd build--tmp && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ../configure $(CONFIGURE)) + touch configure-stamp + +# Build target. +build: patch build-stamp +build-stamp: configure + (cd build--tmp && $(MAKE)) + chmod 644 webui/cgi-bin/templates/* + chmod 644 webui/cgi-bin/admins + chmod 644 webui/cgi-bin/default.prefs + chmod 644 webui/cgi-bin/rgb.txt + chmod 644 webui/htdocs/base.css + chmod 644 webui/htdocs/dspam-logo-small.gif + chmod 644 src/tools.sqlite_drv/purge-3.sql + touch build-stamp + +clean: clean-patched unpatch +clean-patched: + dh_testdir + dh_testroot + rm -rf debian/dspam-webfrontend + rm -rf build--tmp + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + + dh_clean + +install: build + dh_testdir + dh_testroot + + dh_clean -k + dh_installdirs + (cd build--tmp && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp) + dh_install --list-missing + + # Install override for conffiles into /usr/share + cp debian/dspam-webfrontend.override $(CURDIR)/debian/dspam-webfrontend/usr/share/lintian/overrides/dspam-webfrontend + cp debian/libdspam7-drv-mysql.override $(CURDIR)/debian/libdspam7-drv-mysql/usr/share/lintian/overrides/libdspam7-drv-mysql + cp debian/libdspam7-drv-pgsql.override $(CURDIR)/debian/libdspam7-drv-pgsql/usr/share/lintian/overrides/libdspam7-drv-pgsql + + # Install configure.pl as /etc/dspam/webfrontend.conf + install -d -g root -m 755 -o root $(CURDIR)/debian/dspam-webfrontend/etc/dspam + cp build--tmp/webui/cgi-bin/configure.pl $(CURDIR)/debian/dspam-webfrontend/etc/dspam/webfrontend.conf + + # Install PostgreSQL data file + cp debian/sqlfiles/pgsql-dbadmin $(CURDIR)/debian/libdspam7-drv-pgsql/usr/share/dbconfig-common/data/libdspam7-drv-pgsql/install-dbadmin/pgsql + +binary-indep: build install + dh_testdir -i + dh_testroot -i + dh_installchangelogs -i CHANGELOG + dh_installdocs -i + # removing svn-related directory from dspam-doc package + #find debian/dspam-doc -type d -name '.svn' -exec rm -rf {} \; || true + dh_compress -i -A + dh_link -i + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture dependant packages using the common target. +binary-arch: build install + dh_testdir -a + dh_testroot -a + dh_installchangelogs -a CHANGELOG + dh_install -a + dh_installdocs -a + dh_installcron -a + dh_installlogrotate -a + dh_installman -a + dh_installinit -a -- start 21 2 3 4 5 . stop 21 0 1 6 . + dh_installdebconf -a + dh_makeshlibs -a -Nlibdspam7-drv-pgsql -Nlibdspam7-drv-mysql -Nlibdspam7-drv-db4 -Nlibdspam7-drv-sqlite3 -Ndspam + dh_link -a + dh_strip -a + dh_compress -a + dh_fixperms -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +patch: patch-stamp +patch-stamp: + dpatch apply-all + touch patch-stamp + +unpatch: + dpatch deapply-all + rm -rf patch-stamp debian/patched + +binary: binary-arch binary-indep +.PHONY: build clean binary-indep binary-arch binary install configure --- dspam-3.6.6.orig/debian/dspam-webfrontend.install +++ dspam-3.6.6/debian/dspam-webfrontend.install @@ -0,0 +1,11 @@ +webui/cgi-bin/admin.cgi var/www/dspam/ +webui/cgi-bin/admingraph.cgi var/www/dspam/ +webui/cgi-bin/graph.cgi var/www/dspam/ +webui/cgi-bin/dspam.cgi var/www/dspam/ +webui/cgi-bin/templates/*.html usr/share/dspam/upstream-templates/ +webui/htdocs/base.css var/www/dspam/ +webui/htdocs/dspam-logo-small.gif var/www/dspam/ +webui/cgi-bin/admins etc/dspam/ +webui/cgi-bin/rgb.txt etc/dspam/ +debian/dspam-apache.conf etc/dspam +debian/dspam-apache2.conf etc/dspam --- dspam-3.6.6.orig/debian/dspam.default +++ dspam-3.6.6/debian/dspam.default @@ -0,0 +1,8 @@ +# Variables for dspam. +# +# Do not start dspam. +START=no + +# Options for dspam. +#OPTIONS="--debug" + --- dspam-3.6.6.orig/debian/changelog +++ dspam-3.6.6/debian/changelog @@ -0,0 +1,115 @@ +dspam (3.6.6-2) unstable; urgency=low + + * Update add-config-dir patch: patch from Daniel Kahn Gillmor + - it passes arguments as config_t** instead of config_t* around. + - read only *.conf files instead of all files. (Closes: #369414) + * Add a patch that adds a virus notification to the log. Patch from + Julien Valrof (Closes: #369434) + * Dspam segfaults when DeliveryHost is unset, added patch from + Daniel Kahn Gillmor to fix this. (Closes: #369421) + * The QuarantaineMailbox option does not work properly if the user is domain + qualified. Added patch from Daniel Kahn Gillmor. (Closes: #369432) + * Clean up minor warnings in dspam. Patch from Daniel Kahn Gillmor + (Closes: #369426) + + -- Debian DSPAM Maintainers Mon, 29 May 2006 22:31:36 +0200 + +dspam (3.6.6-1) unstable; urgency=low + + * New upstream release. (Closes: #361249) + * Include dspam_train and the manpage into the dspam package + (Closes: #366464) + * Added --list-missing to dh_install, to see if there are files that are not + placed in an install directory. + * Removed obsolete patch configure-ac, upstream fixed the typo. + * Updated patch dspam-webfrontend-config-debian. (default config for debian) + * Updated patch update-dspam.conf (default config for debian) + * Updated Standards-Version to 3.7.2.0 + * Make dspam_clean a bit more quiet. (Closes: #368822) + * Fix improper quotation in the pgsql backend. (Closes: #369179) + + -- Debian DSPAM Maintainers Sun, 28 May 2006 13:16:41 +0200 + +dspam (3.6.4-4) unstable; urgency=low + + * Remove previous fix for #359944 this introduced two grave bugs. + (Closes: #364005, #361384) + * Change dependency on libgd-gd2-perl with the -noxpm package, so that + no not needed packages get installed (Closes: #365666). + + -- Debian DSPAM Maintainers Tue, 1 May 2006 12:43:00 +0200 + +dspam (3.6.4-3) unstable; urgency=low + + * Small changes in daily crontab. (Closes: #356874) + * Recommend clamav-daemon, instead of clamav. (Closes: #356899) + * Don't do apache configuration for dspam-webfrontend. (Closes: #356835) + * Swap totals in the User Statistics web frontend. (Closes: #357094) + * Added cron.daily purge script for mysql. (Closes: #357100) + * Modified dspam crontab to also purge entries from a db4 database. + * Added patch to remove hardcoded 'yourdomain.com'. Thanks to + Martijn Pieters. (Closes: #357273) + * Don't try to configure the mysql / postgresql backend on an unattended + install. (Closes: #359944) + * Change procmail dependency to sensible-mda. (Closes: #358681) + * Removed manpage libdspam from the dspam package (Closes: #360923) + + -- Debian DSPAM Maintainers Wed, 5 Apr 2006 18:33:43 +0200 + +dspam (3.6.4-2) unstable; urgency=low + + * Updated dependency of libmysqlclient to 15-dev (Closes: #354218). + * Copy paste fault in configure.ac which causes sqlite3 backend not linked + with -lsqlite3 (Closes: #355095) + + -- Debian DSPAM Maintainers Sat, 11 Mar 2006 14:22:47 +0100 + +dspam (3.6.4-1) experimental; urgency=low + + * New upstream release. + * Fix path to purge-3.sql in libdspam7-drv-sqlite3 (Closes: #347168) + * Move hash backend into dspam. This solves a lot of problems around + installing several other backends. + * Suggests libdspam7-drv instead of depending on it. (Closes: #349591) + * Improved the cron.daily for the hash backend (It now checks if dspam is + running with the hash backend) + * Improved add-config-dir patch to prevent a segfault. (Closes: #347852) + * Add a free() call to fix a memleak. + * Move dspam init script from 20 to 21. It doesn't handle reconnects of the + several databases. (Closes: #353977) + * Removed patch dspam-extpref-plain. Upstream has fixed it. + * Updated patch manpage-in-right-section. + * Applied patch to README.Debian from Jamie L. Penman-Smithson + (Closes: #352105) + + -- Debian DSPAM Maintainers Sat, 18 Feb 2006 21:55:58 +0100 + +dspam (3.6.2-2) experimental; urgency=low + + * Add patch to fix ldap_verify bug + * Add autogen.sh patch to conform Steve Langasek 's mail to + debian-devel-announce@.. + * Updated link-dynamically patch to link all tools dynamically to libdspam7 + * Updated debian/rules to call ./autogen.sh + * Fixed path in mysql.conf (mysqld/mysqld.sock instead of mysql/mysqld.sock) + * MySQL and PostgreSQL sql files needs to be a file not a directory with + files + * Daemon is in usr/bin (Closes: #345588) + * When starting as daemon and no pidfile was given the pidfile isn't + created. Added a patch that fixes this problem + * Added a patch to background dspam when issued with --daemon + * Updated init script to give a TERM on stop instead of a HUP which is + actually a reload of the configuration file. + * Updated the permission problems in /etc/dspam/dspam.d + * Updated the dspam.conf and Trust user dspam. (Otherwise it isn't possible + to train messages in the web interface) + * Make dspam easier to backport to Sarge + * Added dependency libgd-graph3d-perl to dspam-webfrontend (Closes: #346032) + + -- Debian DSPAM Maintainers Thu, 5 Jan 2006 01:26:33 +0100 + +dspam (3.6.2-1) experimental; urgency=low + + * Initial release. (Closes: #195948) + + -- Debian DSPAM Maintainers Wed, 30 Nov 2005 09:31:06 +0100 --- dspam-3.6.6.orig/debian/libdspam7.install +++ dspam-3.6.6/debian/libdspam7.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/libdspam.so.* usr/lib --- dspam-3.6.6.orig/debian/libdspam7-dev.manpages +++ dspam-3.6.6/debian/libdspam7-dev.manpages @@ -0,0 +1,9 @@ +debian/tmp/usr/share/man/man3/libdspam.3 +debian/manpages/dspam_addattribute.3 +debian/manpages/dspam_attach.3 +debian/manpages/dspam_create.3 +debian/manpages/dspam_destroy.3 +debian/manpages/dspam_detach.3 +debian/manpages/dspam_getsource.3 +debian/manpages/dspam_init.3 +debian/manpages/dspam_process.3 --- dspam-3.6.6.orig/debian/dspam-apache2.conf +++ dspam-3.6.6/debian/dspam-apache2.conf @@ -0,0 +1,25 @@ +# +# This is a sample config that +# should be encapsulated into +# a VirtualHost section. + + SuexecUserGroup dspam dspam + Addhandler cgi-script .cgi + Options +ExecCGI -Indexes + + Alias /dspam /var/www/dspam/ + + Addhandler cgi-script .cgi + Options +ExecCGI -Indexes + DirectoryIndex dspam.cgi + +# Note: you have to add www-data to the 'shadow' +# group to make this work. You whould +# better change for another authentication bakend +AuthPAM_Enabled on + + AuthType Basic + AllowOverride None + AuthName "DSPAM Control Center" + Require valid-user + --- dspam-3.6.6.orig/debian/libdspam7-drv-pgsql.manpages +++ dspam-3.6.6/debian/libdspam7-drv-pgsql.manpages @@ -0,0 +1 @@ +debian/manpages/dspam_pg2int8.1 --- dspam-3.6.6.orig/debian/manpages/dspam_logrotate.1 +++ dspam-3.6.6/debian/manpages/dspam_logrotate.1 @@ -0,0 +1,36 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.TH "dspam_logrotate" "1" "May 18, 2005" "Aurelien Labrosse " "" +.SH "NAME" +dspam_logrotate \- Helper for Dspam log files rotation +.SH "SYNOPSIS" +.B dspam_logrotate +Rotate Dspam log files. +.SH "DESCRIPTION" +.B dspam_logrotate + + +.SH "OPTIONS" +\-v : verbose mode +\-a [age] : rotate files older than age +.SH "SEE ALSO" + +.SH "AUTHOR" +dspam_logrotate was written by Jonathan Zdziarski . +.PP +This manual page was written by Aurelien Labrosse , +for the Debian project (but may be used by others). --- dspam-3.6.6.orig/debian/manpages/cssstat.1 +++ dspam-3.6.6/debian/manpages/cssstat.1 @@ -0,0 +1,38 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.TH "CSSSTAT" "1" "november 4, 2005" "" "" +.SH "NAME" +cssstat \- Print hash file statistics +.SH "SYNOPSIS" +.B cssstat [database file] +.br + + +.SH "DESCRIPTION" +.B cssstat +Print statistics for the given hashed database file. +.SH "OPTIONS" +.TP +.B [database file] +File that contains tokens database. +.SH "SEE ALSO" + +.SH "AUTHOR" +cssstat was written by Jonathan Zdziarski . +.PP +This manual page was written by Aurelien Labrosse , +for the Debian project (but may be used by others). --- dspam-3.6.6.orig/debian/manpages/dspam_getsource.3 +++ dspam-3.6.6/debian/manpages/dspam_getsource.3 @@ -0,0 +1 @@ +.so man3/libdspam.3 --- dspam-3.6.6.orig/debian/manpages/dspam_create.3 +++ dspam-3.6.6/debian/manpages/dspam_create.3 @@ -0,0 +1 @@ +.so man3/libdspam.3 --- dspam-3.6.6.orig/debian/manpages/dspam_init.3 +++ dspam-3.6.6/debian/manpages/dspam_init.3 @@ -0,0 +1 @@ +.so man3/libdspam.3 --- dspam-3.6.6.orig/debian/manpages/dspam_attach.3 +++ dspam-3.6.6/debian/manpages/dspam_attach.3 @@ -0,0 +1 @@ +.so man3/libdspam.3 --- dspam-3.6.6.orig/debian/manpages/dspam_crc.1 +++ dspam-3.6.6/debian/manpages/dspam_crc.1 @@ -0,0 +1,38 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.TH "DSPAM_CRC" "1" "december 6, 2004" "" "" +.SH "NAME" +dspam_crc \- calculate the dspam CRC of arbitrary token +.SH "SYNOPSIS" +.B dspam_crc [token] +.br + + +.SH "DESCRIPTION" +.B dspam_crc +is used for arbitrary data dspam CRC calculation. +.SH "OPTIONS" +.TP +.B [Token] +Data that will be CRC\-ized +.SH "SEE ALSO" + +.SH "AUTHOR" +dspam_crc was written by Jonathan Zdziarski . +.PP +This manual page was written by Aurelien Labrosse , +for the Debian project (but may be used by others). --- dspam-3.6.6.orig/debian/manpages/cssclean.1 +++ dspam-3.6.6/debian/manpages/cssclean.1 @@ -0,0 +1,38 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.TH "CSSCLEAN" "1" "november 4, 2005" "" "" +.SH "NAME" +cssclean \- rebuild a hash database, omitting hapaxes +.SH "SYNOPSIS" +.B cssclean [database file] +.br + + +.SH "DESCRIPTION" +.B cssclean +rebuild a hash database, omitting hapaxes +.SH "OPTIONS" +.TP +.B [database file] +File that contains tokens database. +.SH "SEE ALSO" + +.SH "AUTHOR" +cssclean was written by Jonathan Zdziarski . +.PP +This manual page was written by Aurelien Labrosse , +for the Debian project (but may be used by others). --- dspam-3.6.6.orig/debian/manpages/dspam_genaliases.1 +++ dspam-3.6.6/debian/manpages/dspam_genaliases.1 @@ -0,0 +1,45 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.TH "dspam_genaliases" "1" "december 6, 2004" "" "" +.SH "NAME" +dspam_genaliases \- generate mail aliases for Dspam learning module +.SH "SYNOPSIS" +.B dspam_genaliases +Generate a mail alias line for each system user, for Dspam learning module. +.SH "DESCRIPTION" +.B dspam_genaliases + +Generated alias lines are to be used for the learning functionnality of dspam. +Users have to forward nont\-detected spam to spam\-[username]@yourdomain, +and then the spam will be processed by dspam engine, and tokens will be recorded +into user's tokens reference. + +Sample for Postfix: + +dspam_genaliases > /etc/aliases +.br +postmap /etc/aliases +.br +/etc/init.d/postfix reload +.SH "OPTIONS" + +.SH "SEE ALSO" +.SH "AUTHOR" +dspam_genaliases was written by Jonathan Zdziarski . +.PP +This manual page was written by Aurelien Labrosse , +for the Debian project (but may be used by others). --- dspam-3.6.6.orig/debian/manpages/dspam_addattribute.3 +++ dspam-3.6.6/debian/manpages/dspam_addattribute.3 @@ -0,0 +1 @@ +.so man3/libdspam.3 --- dspam-3.6.6.orig/debian/manpages/dspam_process.3 +++ dspam-3.6.6/debian/manpages/dspam_process.3 @@ -0,0 +1 @@ +.so man3/libdspam.3 --- dspam-3.6.6.orig/debian/manpages/csscompress.1 +++ dspam-3.6.6/debian/manpages/csscompress.1 @@ -0,0 +1,39 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.TH "CSSCOMPRESS" "1" "november 4, 2005" "" "" +.SH "NAME" +csscompress \- Compress a hash database's extents + +.SH "SYNOPSIS" +.B csscompress [database file] +.br + + +.SH "DESCRIPTION" +.B csscompress +Compress a hash database's extents +.SH "OPTIONS" +.TP +.B [database file] +File that contains the database to compress. +.SH "SEE ALSO" + +.SH "AUTHOR" +csscompress was written by Jonathan Zdziarski . +.PP +This manual page was written by Aurelien Labrosse , +for the Debian project (but may be used by others). --- dspam-3.6.6.orig/debian/manpages/dspam_2sql.1 +++ dspam-3.6.6/debian/manpages/dspam_2sql.1 @@ -0,0 +1,16 @@ +.TH "DSPAM_2SQL" "1" "december 6, 2004" "" "" +.SH "NAME" +dspam_2sql +.SH "SYNOPSIS" +.B dspam_2sql +.br +Dump dspam tokens in sql format on stdout. +.SH "DESCRIPTION" +dspam_2sql + +Dump dspam tokens in sql format on stdout. +.SH "AUTHOR" +dspam_2sql was written by Jonathan Zdziarski . +.PP +This manual page was written by Aurelien Labrosse , +for the Debian project (but may be used by others). --- dspam-3.6.6.orig/debian/manpages/dspamc.1 +++ dspam-3.6.6/debian/manpages/dspamc.1 @@ -0,0 +1,309 @@ +.\" $Id: dspam.1,v 1.5 2005/03/15 12:59:08 jonz Exp $ +.\" -*- nroff -*- +.\" +.\" dspam3.2 +.\" +.\" Authors: Jonathan A. Zdziarski +.\" +.\" Copyright (c) 2004 Network Dweebs Corporation +.\" All rights reserved +.\" +.\" +.TH "DSPAMC" "1" "Sep 29, 2004" "Jonathan A. Zdziarski " "DSPAM" +.SH "NAME" +dspamc \- DSPAM Anti\-Spam Agent (client) + +.SH "SYNOPSIS" +.na +.B dspamc +[\c +.BI \-\-mode=[teft|toe|tum|notrain|unlearn]\fR\c +] +[\c +.BI \-\-user\ user1 +user2\ ...\ userN\fR\c +] +[\c +.BI \-\-feature\c +=[ch,no,wh,tb=N,sb]\fR\c +] +[\c +.B \-\-class\c +=[spam|innocent]\fR\c +] +[\c +.B \-\-source\c +=[error|corpus|inoculation] \c +] +[\c +.B \-\-profile\c +=[PROFILE] \c +] +.B \-\-deliver\c +=[spam,innocent] \c +] +[\c +.B \-\-help \c +] +[\c +.B \-\-process \c +] +[\c +.B \-\-classify \c +] +[\c +.B \-\-signature\c +=[signature] \c +] +[\c +.BI \-\-stdout \c +] +[\c +.BI \-\-debug \c +] +[\c +.BI \-\-daemon \c +] +[\c +.BI \-\-client \c +] +[\c +.BI \-\-rcpt\-to \c +] +[\c +.BI \-\-mail\-from \c +] +[\c +.I \ delivery\_arguments \fR\c +] + +.ad +.SH "DESCRIPTION " +.LP +.B The DSPAM agent +provides a direct interface to mail servers for command\-line +spam filtering. The agent can masquerade as the mail server's local delivery +agent and will process any email passed to it. The agent will then call whatever +delivery agent was specified at compile time or quarantine/tag/drop messages +identified as spam. The DSPAM agent can function locally or as a proxy. It +is also responsible for processing classification errors so that DSPAM can +learn from its mistakes. +This version (dspamc) uses a connection to a dspam server rather than re\-create contexts on each execution. + +.SH "OPTIONS" +.LP +.ne 3 +.TP +.BI \-\-user\ user1 \ user2\ ...\ userN\fR\c +Specifies the destination users of the incoming message. In most cases this is +the local user on the system, however some implementations may call for virtual +usernames, specific to DSPAM, to be assigned. The agent processes an +incoming message once for each user specified. If the message is to be +delivered, the $u (or %u) parameters of the argument string will be interpolated +for the current user being processed. + +.n3 3 +.TP +.BI \-\-mode= [toe|tum|teft|notrain]\c +Configures the training mode to be used for this process, overriding any +defaults in dspam.conf: + +.B teft +: Train\-Everything. Trains on all messages processed. This is a very thorough training approach and should be considered the standard training approach for most users. TEFT may, however, prove too volatile on installations with extremely high per\-user traffic, or prove not very scalable on systems with extremely large user\-bases. In the event that TEFT is proving ineffective, one of the other modes is recommended. + +.B toe +: Train\-on\-Error. Trains only on a classification error, once the user's metadata has matured to 2500 innocent messages. This training mode is much less resource intensive, as only occasional metadata writes are necessary. It is also far less volatile than the TEFT mode of training. One drawback, however, is that TOE only learns when DSPAM has made a mistake \- which means the data is sometimes too static, and unable to "ease into" a different type of behavior. + +.B tum +: Train\-until\-Mature. This training mode is a hybrid between the other two training modes and provides a great balance between volatility and static metadata. TuM will train on a per\-token basis only tokens which have had fewer than 25 "hits" on them, unless an error is being retrained in which case all tokens are trained. This training mode provides a solid core of stable tokens to keep accuracy consistent, but also allows for dynamic adaptation to any new types of email behavior a user might be experiencing. + +.B notrain +: No training. Do not train the user's data, and do not keep totals. This should only be used in cases where you want to process mail for a particular user (based on a group, for example), but don't want the user to accumulate any learning data. + +.B unlearn +: Unlearn original training. Use this if you wish to unlearn a previously learned message. Be sure to specify \-\-source=error and \-\-class to whatever the original classification the message was learned under. If not using TrainPristine, this will require the original signature from training. + +.ne 3 +.TP +.BI \-\-feature= [chained,noise,tb=N,whitelist] \c +Specifies the features that should be activated for this filter instance. The following features may be used individually or combined using a comma as a delimiter: + +.B chained +: Chained Tokens (also known as biGrams). Chained Tokens combines adjacent tokens, presently with a window size of 2, to form token "chains". Chained tokens uses additional storage resources, but greatly improves accuracy. Recommended as a default feature. + +.B noise +: Bayesian Noise Reduction (BNR). Bayesian Noise Reduction kicks in at 2500 innocent messages and provides an advanced progressive noise logic to reduce Bayesian Noise (wordlist attacks) in spams. See http://bnr.nuclearelephant.com for more information. + +.B tb\=N +: Sets the training loop buffering level. Training loop buffering is the amount of statistical sedation performed to water down statistics and avoid false positives during the user's training loop. The training buffer sets the buffer sensitivity, and should be a number between 0 (no buffering whatsoever) to 10 (heavy buffering). The default is 5, half of what previous versions of DSPAM used. To avoid dulling down statistics at all during the training loop, set this to 0. + +.B whitelist +: Automatic whitelisting. DSPAM will keep track of the entire "From:" line for each message received per user, and automatically whitelist messages from senders with more than 20 innocent messages and zero spams. Once the user reports a spam from the sender, automatic whitelisting will automatically be deactivated for that sender. Since DSPAM uses the entire "From:" line, and not just the sender's email address, automatic whitelisting is a very safe approach to improving accuracy especially during initial training. + +.B sbph +: Sparse Binary Polynomial Hashing. Bill Yerazunis' tokenizer method from CRM114. Tokenizer method only \- works with existing combination algorithms. + +.ne 3 +.TP +.BI \-\-class= [spam|innocent] \c +Identifies the disposition (if any) of the message being presented. This flag +should be used when a misclassification has occured, when the user is +corpus\-feeding a message, or when an inoculation is being presented. This +flag should not be used for standard processing. This flag must be used in +conjunction with the \-\-source flag. Omitting this flag causes DSPAM to +determine the disposition of the message on its own (the standard operating +mode). + +.ne 3 +.TP +.BI \-\-source= [error|corpus|inoculation] \c +Where +.B \-\-class +is used, the source of the classification must also be provided. The source +tells dspam how to learn the message being presented: + + +.B error +: The message being presented was a message previously misclassified by DSPAM. When 'error' is provided as a source, DSPAM requires that the DSPAM signature be present in the message, and will use the signature to recall the original training metadata. If the signature is not present, the message will be rejected. In this source mode, DSPAM will also decrement each token's previous classification's count as well as the user totals. + +You should use error only when DSPAM has made an error in classifying the message, and should present the modified version of the message with the DSPAM signature when doing so. + +.B corpus +: The message being presented is from a mail corpus, and should be trained as a new message, rather than re\-trained based on a signature. The message's full headers and body will be analyzed and the correct classification will be incremented, without its opposite being decremented. + +You should use corpus only when feeding messages in from corpus. + +.B inoculation +: The message being presented is in pristine form, and should be trained as an inoculation. Inoculations are a more intense mode of training designed to cause DSPAM to train the user's metadata repeatedly on previoulsy unknown tokens, in an attepmt to vaccinate the user from future messages similar to the one being presented. You should use inoculation only on honeypots and the like. + +.ne 3 +.TP +.BI \-\-profile= [PROFILE]\c +Specify a storage profile from dspam.conf. The storage profile selected will be used for all database connectivity. See dspam.conf for more information. + +.ne 3 +.TP +.BI \-\-deliver= [innocent,spam]\c +Tells +.B DSPAM +to deliver the message if its result falls within the criteria specified. For example, \-\-deliver=innocent will cause DSPAM to only deliver the message if its classification has been determined as innocent. Providing \-\-deliver=innocent,spam will cause DSPAM to deliver the message regardless of its classification. This flag provides a significant amount of flexibility for nonstandard implementations. + +.ne 3 +.TP +.B \-\-stdout \c +If the message is indeed deemed "deliverable" by the +.B \-\-deliver +flag, this flag will cause DSPAM to deliver the message to stdout, rather than the configured delivery agent. + +.ne 3 +.TP +.B \-\-process \c +Tells +.B DSPAM +to process the message. This is the default behavior, and the flag is implied unless +.B \-\-classify +is used. + +.ne 3 +.TP +.BI \-\-classify\c +Tells +.B DSPAM +to only classify the message, and not perform any writes to the user's +data or attempt to deliver/quarantine the message. The results of a +classification are printed to stdout in the following format: + +X\-DSPAM\-Result: User; result="Spam"; probability=1.0000; confidence=0.80 + +.B NOTE +: The output of the classification is specific to a user's own data, and +does not include the output of any groups they might be affiliated with, +so it is entirely possible that the message would be caught as spam by a +group the user belongs to, and appear as innocent in the output of a +classification. To get the classification for the +.B group +, use the group name as the user instead of an individual. + +.ne 3 +.TP +.BI \-\-signature =[signature] +If only the signature is available for training, and not the entire message, +the \-\-signature flag may be used to feed the signature into DSPAM and forego +the reading of stdin. DSPAM will process the signature with whatever +commandline classification was specified. NOTE: This should only be used +with +.B \-\-source=error + +.ne 3 +.TP +.BI \-\-debug\c +If +.B DSPAM +was compiled with +.B \-\-enable\-debug +then using \-\-debug will turn on debugging messages to /tmp/dspam.debug. + +.ne 3 +.TP +.BI \-\-daemon\c +If +.B DSPAM +was compiled with +.B \-\-enable\-daemon +then using \-\-daemon will cause DSPAM to enter daemon mode, where it will listen +for DSPAM clients to connect and actively service requests. + +.ne 3 +.TP +.BI \-\-client\c +If +.B DSPAM +was compiled with +.B \-\-enable\-daemon +then using \-\-client will cause DSPAM to act as a client and attempt to connect to the DSPAM server specified in the client's configuration within dspam.conf. If client behavior is desired, this option +.B must +be specified, otherwise the agent simply operate as self\-contained and processes the message on its own, eliminating any benefit of using the daemon. + +.ne 3 +.TP +.BI \-\-rcpt\-to\c +If +.B DSPAM +will be configured to deliver via LMTP or SMTP, this flag may be used to define the RCPT TOs which will be used for the delivery of each user specified with \-\-user. If no recipients are provided, the RCPT TOs will match the username. +NOTE: The recipient list should always be balanced with the user list, or empty. Specifying an unbalanced number of recipients to users will result in undefined behavior. + +.ne 3 +.TP +.BI \-\-mail\-from\c +If +.B DSPAM +will be cofigured to deliver via LMTP or SMTP, this flag will set the MAIL FROM sent on delivery of the message. The default MAIL FROM depends on how the message was originally relayed to DSPAM. If it was relayed via the commandline, an empty MAIL FROM will be used. If it was relayed via LMTP, the original MAIL FROM will be used. + +.SH "EXIT VALUE" +.LP +.ne 3 +.PD 0 +.TP +.B 0 +Operation was successful. +.ne 3 +.TP +.B other +Operation resulted in an error. If the error involved an error in calling the +delivery agent, the exit value of the delivery agent will be returned. +.PD + +.SH "AUTHORS" +.LP + +Jonathan A. Zdziarski + +For more information, see http://dspam.nuclearelephant.com. + +.SH "SEE ALSO" +.BR dspam_stats (1), +.BR dspam_corpus (1), +.BR dspam_clean (1), +.BR dspam_dump (1), +.BR dspam_merge (1) + --- dspam-3.6.6.orig/debian/manpages/dspam_admin.1 +++ dspam-3.6.6/debian/manpages/dspam_admin.1 @@ -0,0 +1,47 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.TH "DSPAM_ADMIN" "1" "december 6, 2004" "" "" +.SH "NAME" +dspam_admin \- Alter dspam users preferences +.SH "SYNOPSIS" +.B dspam_admin +.RI [function] [arguments] [\-\-profile=PROFILE] +.br +.SH "DESCRIPTION" +.B dspam_admin +is used to change some user's preferences. + + +.SH "OPTIONS" +Add a Preference: +dspam_admin add preference [user] [attr] [value] + +Set a Preference: +dspam_admin change preference [user] [attr] [value] + +Delete a Preference: +dspam_admin delete preference [user] [attr] + +List Preferences: +dspam_admin list preferences [user] +.SH "SEE ALSO" +.br +.SH "AUTHOR" +dspam_admin was written by Jonathan Zdziarski . +.PP +This manual page was written by Aurelien Labrosse , +for the Debian project (but may be used by others). --- dspam-3.6.6.orig/debian/manpages/dspam_detach.3 +++ dspam-3.6.6/debian/manpages/dspam_detach.3 @@ -0,0 +1 @@ +.so man3/libdspam.3 --- dspam-3.6.6.orig/debian/manpages/dspam_destroy.3 +++ dspam-3.6.6/debian/manpages/dspam_destroy.3 @@ -0,0 +1 @@ +.so man3/libdspam.3 --- dspam-3.6.6.orig/debian/manpages/dspam_pg2int8.1 +++ dspam-3.6.6/debian/manpages/dspam_pg2int8.1 @@ -0,0 +1,38 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.TH "DSPAM_PG2INT8" "1" "november 4, 2005" "" "" +.SH "NAME" +dspam_pg2int8 \- Creates SQL file to migrate from NUMERIC to BIGINT type and vice-versa in PostgreSQL +.SH "SYNOPSIS" +.B dspam_pg2int8 [output filename] +.br + + +.SH "DESCRIPTION" +.B dspam_pg2int8 +Creates SQL file to migrate from NUMERIC to BIGINT type and vice-versa in PostgreSQL +.SH "OPTIONS" +.TP +.B [output filename] +File where to store the result of dspam_pg2int8. +.SH "SEE ALSO" + +.SH "AUTHOR" +dspam_pg2int8 was written by Jonathan Zdziarski . +.PP +This manual page was written by Aurelien Labrosse , +for the Debian project (but may be used by others). --- dspam-3.6.6.orig/debian/libdspam7-drv-sqlite3.install +++ dspam-3.6.6/debian/libdspam7-drv-sqlite3.install @@ -0,0 +1,2 @@ +debian/tmp/usr/lib/libsqlite3_drv.so* usr/lib/dspam +src/tools.sqlite_drv/purge-3.sql usr/share/dspam/clean --- dspam-3.6.6.orig/debian/libdspam7-drv-sqlite3.dirs +++ dspam-3.6.6/debian/libdspam7-drv-sqlite3.dirs @@ -0,0 +1,2 @@ +usr/lib/dspam +usr/share/dspam/clean --- dspam-3.6.6.orig/debian/dspam-doc.docs +++ dspam-3.6.6/debian/dspam-doc.docs @@ -0,0 +1,11 @@ +doc/markov.txt +doc/pop3filter.txt +doc/sendmail.txt +doc/courier.txt +doc/osx.txt +doc/postfix.txt +doc/exim.txt +doc/ora_drv.txt +doc/qmail.txt +debian/dspam-documents/exim4/ +debian/dspam-documents/postfix/ --- dspam-3.6.6.orig/debian/libdspam7-dev.dirs +++ dspam-3.6.6/debian/libdspam7-dev.dirs @@ -0,0 +1,3 @@ +usr/include/dspam +usr/lib/pkgconfig +usr/lib/dspam --- dspam-3.6.6.orig/debian/libdspam7-drv-pgsql.dirs +++ dspam-3.6.6/debian/libdspam7-drv-pgsql.dirs @@ -0,0 +1,5 @@ +etc/dspam/dspam.d +usr/share/dbconfig-common/data/libdspam7-drv-pgsql/install +usr/share/dbconfig-common/data/libdspam7-drv-pgsql/install-dbadmin +usr/share/lintian/overrides/ +usr/lib/dspam --- dspam-3.6.6.orig/debian/libdspam7-drv-mysql.postrm +++ dspam-3.6.6/debian/libdspam7-drv-mysql.postrm @@ -0,0 +1,38 @@ +#!/bin/sh +# +# Post removal + +set -e + +# Load debconf +. /usr/share/debconf/confmodule + +# Load dbconfig +. /usr/share/dbconfig-common/dpkg/postrm.mysql + +# Run dbconfig +dbc_go libdspam7-drv-mysql $@ + +case "$1" in + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + purge) + # Remove files registered with ucf. + for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do + rm -f /etc/dspam/dspam.d/mysql.conf$ext + done + rm -f /etc/dspam/dspam.d/mysql.conf + ucf --purge /etc/dspam/dspam.d/mysql.conf + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + --- dspam-3.6.6.orig/debian/config/mysql.conf +++ dspam-3.6.6/debian/config/mysql.conf @@ -0,0 +1,60 @@ +# --- MySQL --- + +# +# Storage driver settings: Specific to a particular storage driver. Uncomment +# the configuration specific to your installation, if applicable. +# +MySQLServer /var/run/mysqld/mysqld.sock +#MySQLPort 3306 +MySQLUser _DBC_DBUSER_ +MySQLPass _DBC_DBPASS_ +MySQLDb _DBC_DBNAME_ +#MySQLCompress false + +# If you are using replication for clustering, you can also specify a separate +# server to perform all writes to. +# +#MySQLWriteServer /var/lib/mysql/mysql.sock +#MySQLWritePort +#MySQLWriteUser dspam +#MySQLWritePass changeme +#MySQLWriteDb dspam_write +#MySQLCompress true + +# If your replication isn't close to real-time, your retraining might fail if +# the signature isn't found. One workaround for this is to use the write +# database for all signature reads: +# +#MySQLReadSignaturesFromWriteDb on + +# Use this if you have the 4.1 quote bug (see doc/mysql.txt) +# mysql-server-4.1 version => 4.1.15-1 doesn't have this bug. +# This bug doesn't apply to debian mysql server, it is already fixed in the +# mysql packages. +#MySQLSupressQuote on + +# If you're running DSPAM in client/server (daemon) mode, uncomment the +# setting below to override the default connection cache size (the number +# of connections the server pools between all clients). The connection cache +# represents the maximum number of database connections *available* and should +# be set based on the maximum number of concurrent connections you're likely +# to have. Each connection may be used by only one thread at a time, so all +# other threads _will block_ until another connection becomes available. +# +#MySQLConnectionCache 10 + +# If you're using vpopmail or some other type of virtual setup and wish to +# change the table dspam uses to perform username/uid lookups, you can over- +# ride it below + +#MySQLVirtualTable dspam_virtual_uids +#MySQLVirtualUIDField uid +#MySQLVirtualUsernameField username + +# UIDInSignature: MySQL supports the insertion of the user id into the DSPAM +# signature. This allows you to create one single spam or fp alias +# (pointing to some arbitrary user), and the uid in the signature will +# switch to the correct user. Result: you need only one spam alias + +#MySQLUIDInSignature on + --- dspam-3.6.6.orig/debian/config/pgsql.conf +++ dspam-3.6.6/debian/config/pgsql.conf @@ -0,0 +1,29 @@ +# --- PostgreSQL --- + +PgSQLServer 127.0.0.1 +#PgSQLPort 5432 +PgSQLUser _DBC_DBUSER_ +PgSQLPass _DBC_DBPASS_ +PgSQLDb _DBC_DBNAME_ + +# If you're running DSPAM in client/server (daemon) mode, uncomment the +# setting below to override the default connection cache size (the number +# of connections the server pools between all clients). +# +#PgSQLConnectionCache 3 + +# UIDInSignature: PgSQL supports the insertion of the user id into the DSPAM +# signature. This allows you to create one single spam or fp alias +# (pointing to some arbitrary user), and the uid in the signature will +# switch to the correct user. Result: you need only one spam alias + +#PgSQLUIDInSignature on + +# If you're using vpopmail or some other type of virtual setup and wish to +# change the table dspam uses to perform username/uid lookups, you can over- +# ride it below + +#PgSQLVirtualTable dspam_virtual_uids +#PgSQLVirtualUIDField uid +#PgSQLVirtualUsernameField username + --- dspam-3.6.6.orig/debian/dspam.install +++ dspam-3.6.6/debian/dspam.install @@ -0,0 +1,18 @@ +debian/tmp/etc/dspam/* etc/dspam/ +webui/cgi-bin/default.prefs etc/dspam/ +debian/tmp/usr/bin/dspam_2sql usr/bin/ +debian/tmp/usr/bin/dspamc usr/bin/ +debian/tmp/usr/bin/dspam_train usr/bin/ +debian/tmp/usr/bin/dspam_dump usr/bin/ +debian/tmp/usr/bin/dspam_logrotate usr/bin/ +debian/tmp/usr/bin/dspam usr/bin/ +debian/tmp/usr/bin/dspam_admin usr/bin/ +debian/tmp/usr/bin/dspam_clean usr/bin/ +debian/tmp/usr/bin/dspam_crc usr/bin/ +debian/tmp/usr/bin/dspam_merge usr/bin/ +debian/tmp/usr/bin/dspam_stats usr/bin/ +debian/tmp/usr/lib/libhash_drv.so* usr/lib/dspam +debian/tmp/usr/bin/cssclean usr/bin +debian/tmp/usr/bin/cssstat usr/bin +debian/tmp/usr/bin/csscompress usr/bin +debian/tmp/usr/bin/cssconvert usr/bin --- dspam-3.6.6.orig/debian/libdspam7-drv-mysql.prerm +++ dspam-3.6.6/debian/libdspam7-drv-mysql.prerm @@ -0,0 +1,19 @@ +#!/bin/sh +# +# Pre removal + +set -e + +# Load debconf +. /usr/share/debconf/confmodule + +# Load dbconfig +. /usr/share/dbconfig-common/dpkg/prerm.mysql + +# Run dbconfig +dbc_go libdspam7-drv-mysql $@ + +#DEBHELPER# + +exit 0 + --- dspam-3.6.6.orig/debian/dspam-webfrontend.postrm +++ dspam-3.6.6/debian/dspam-webfrontend.postrm @@ -0,0 +1,46 @@ +#!/bin/sh + +set -e + +remove_dspam_perms() { + for i in \ + /var/www/dspam \ + /var/www/dspam/admin.cgi \ + /var/www/dspam/admingraph.cgi \ + /var/www/dspam/dspam.cgi \ + /var/www/dspam/graph.cgi + do + dpkg-statoverride --quiet --remove $i || true + done + dpkg-statoverride --quiet --remove /etc/dspam/webfrontend.conf +} + +case "$1" in + remove) + remove_dspam_perms + + if [ -f /usr/sbin/apache2ctl ]; then + rm -f /etc/apache2/conf.d/dspam-apache2.conf + invoke-rc.d apache2 reload + fi + if [ -f /usr/sbin/apache ]; then + rm -f /etc/apache/conf.d/dspam-apache.conf +# Should we really reload apache ? + invoke-rc.d apache reload + fi + ;; + + purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + + +#DEBHELPER# + +exit 0 + --- dspam-3.6.6.orig/debian/libdspam7-drv-pgsql.config +++ dspam-3.6.6/debian/libdspam7-drv-pgsql.config @@ -0,0 +1,23 @@ +#!/bin/sh +# +# Configure PostgreSQL database. + +set -e + +# Load debconf +. /usr/share/debconf/confmodule + +# The questions that are asked are pretty important. +export DEBIAN_PRIORITY=low + +# Request user otherwise installation will fail. +dbc_dbuser="dspam" + +# Load dbconfig +. /usr/share/dbconfig-common/dpkg/config.pgsql + +# Run dbconfig +dbc_go libdspam7-drv-pgsql $@ + +exit 0 + --- dspam-3.6.6.orig/debian/dspam.logrotate +++ dspam-3.6.6/debian/dspam.logrotate @@ -0,0 +1,6 @@ +/var/log/dspam/dspam.debug { + monthly + missingok + rotate 7 + compress +} --- dspam-3.6.6.orig/debian/libdspam7-drv-pgsql.install +++ dspam-3.6.6/debian/libdspam7-drv-pgsql.install @@ -0,0 +1,7 @@ +debian/tmp/usr/lib/libpgsql_drv.so* usr/lib/dspam +debian/sqlfiles/pgsql usr/share/dbconfig-common/data/libdspam7-drv-pgsql/install +src/tools.pgsql_drv/pgsql_objects.sql usr/share/doc/libdspam7-drv-pgsql/ +src/tools.pgsql_drv/virtual_users.sql usr/share/doc/libdspam7-drv-pgsql/ +src/tools.pgsql_drv/purge.sql usr/share/doc/libdspam7-drv-pgsql/ +debian/tmp/usr/bin/dspam_pg2int8 usr/bin/ +debian/config/pgsql.conf usr/share/doc/libdspam7-drv-pgsql/ --- dspam-3.6.6.orig/debian/dspam.cron.daily +++ dspam-3.6.6/debian/dspam.cron.daily @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Clean up the hash / db4 databases + +DSPAMCONF=/etc/dspam/dspam.conf + +if egrep -q "^StorageDriver.*(hash|db4)_drv.so" $DSPAMCONF; then + if [ -x /usr/bin/dspam_clean ]; then + /usr/bin/dspam_clean -s -p >/dev/null + fi +fi + +exit 0 + --- dspam-3.6.6.orig/debian/copyright +++ dspam-3.6.6/debian/copyright @@ -0,0 +1,12 @@ +This package was debianized by pkg-dspam Team Thu, 13 Oct 2005 11:53:46 +0000. + +See http://alioth.debian.org/projects/pkg-dspam + +It was downloaded from http://dspam.nuclearelephant.com/ + +Copyright Holder: Jonathan A. Zdziarski + +This package is licensed under the GPL-2. + +On Debian systems, the complete text of the GNU General Public License +can be found in /usr/share/common-licenses/GPL-2 --- dspam-3.6.6.orig/debian/libdspam7-drv-mysql.docs +++ dspam-3.6.6/debian/libdspam7-drv-mysql.docs @@ -0,0 +1 @@ +doc/mysql_drv.txt --- dspam-3.6.6.orig/debian/dspam-apache.conf +++ dspam-3.6.6/debian/dspam-apache.conf @@ -0,0 +1,27 @@ +# This is a sample config that +# should be encapsulated into +# a VirtualHost section. + + + User dspam + Group dspam + # SSLRequireSSL + servername localhost + Alias /dspam /var/www/dspam/ + + Options +ExecCGI -Indexes + Addhandler cgi-script .cgi + DirectoryIndex dspam.cgi + +# Note: you have to add www-data to the 'shadow' +# group to make this work. You whould +# better change for another authentication bakend +AuthPAM_Enabled on + + AuthType Basic + AllowOverride None + AuthName "DSPAM Control Center" + Require valid-user + + + --- dspam-3.6.6.orig/debian/README.Debian +++ dspam-3.6.6/debian/README.Debian @@ -0,0 +1,32 @@ +dspam for Debian +---------------- + +Please see http://pkg-dspam.alioth.debian.org/. + +The original dspam package allows a versatile set of options, however most +are set at configure time (that is, before the package is actually +compiled and built). The Debian package includes a mechanism that allows +you to set several options and rebuild the package quickly. + +If you are not familiar with building Debian packages from source, please read: +http://www.debian.org/doc/manuals/reference/ch-system.en.html#s-sourcebuild + +In order to change the options that dspam is built with you need to change the +DEB_BUILD_OPTIONS environment variable. For example, in bash: + +$ export DEB_BUILD_OPTIONS="disable_virtual_users debug" + +The possible values for DEB_BUILD_OPTIONS are listed below. + + [ standard ] + noopt - disable optimizations + nostrip - disable binary stripping + + [ dspam specific ] + disable_virtual_users - disable storing the users in a database + disable_preferences_extension - disable storing the users' preferences in a database + disable_clamav - disable ClamAV antivirus support + verbose_debug - enable extensive debug (EXTREMELY DISCOURAGED for production systems) + debug - enable debug (currently enabled by default) + + -- Debian DSPAM Maintainers Maintainer: , Thu, 13 Oct 2005 11:53:46 +0000 --- dspam-3.6.6.orig/htdocs/style.css +++ dspam-3.6.6/htdocs/style.css @@ -0,0 +1,33 @@ +body { + font-family: sans-serif; + margin-left: 10%; + margin-right: 10%; + text: black; + background: white; +} + +h2,h3,h4,h5,h6 { + margin-left: -3% +} + +pre { + color: green; + font-weight: bold; + white-space: pre; + font-family: "Courier New", monospace; +} + +em { + font-style: italic; + font-weight: bold +} + +strong { + text-transform: uppercase; + font-weight: bold +} + +.navbar { + text-align: center +} + --- dspam-3.6.6.orig/htdocs/index.html +++ dspam-3.6.6/htdocs/index.html @@ -0,0 +1,68 @@ + + + + + DSPAM for Debian + + + + + + + +

pkg-dspam

Debianizing the DSPAM Email Spam Filter

+ +

Introduction

+ +

+ DSPAM is a scalable, statistical spam filter. Quoting Federico Sevilla III, who submitted the original RFP: +

+ +
+ "DSPAM (as in De-Spam) is an open-source project to create a new kind of anti-spam mechanism, and is currently effective as both a server-side agent for UNIX email servers and a developer's library for mail clients, other anti-spam tools, and similar projects requiring drop-in spam filtering. +

+ The DSPAM agent masquerades as the email server's local delivery agent and filters/learns spams using an advanced Bayesian statistical approach (based on Baye's theorem of combined probabilities) which provides an administratively maintenance-free, easy-learning Anti-Spam service custom tailored to each individual user's behavior. Advanced because on top of standard Bayesian filtering is also incorporated the use of Chained Tokens, de-obfuscation, and other enhancements. DSPAM works great with Sendmail and Exim, and should work well with any other MTA that supports an external local delivery agent (postfix, qmail, etc.)" +
+
+ +

False negatives are rejected by the user by using the mail client to forward them to the user's "spam" mailbox. False positives can be reviewed using a web browser ( screenshot ), and these actions are used by DSPAM to train itself.

+ +

There has been quite a bit of interest lately in packaging this application for Debian. Discussion to date has been carried out on #195948. The work accomplished so far has been assembled from the patches sent to #195948, tagged to reflect the submissions, and added to the Alioth pkg-dspam CVS (obsoleted).

+ +

Development team

+

Introduction

+ We have now a maintainer team for dspam and we would like to introduce ourselves: + + + We are discussing our changes at pkg-dspam-misc, if you want to participate in the discussions please join the mailinglist. If you have questions about dspam or that have to do with the packaging of dspam in debian, please ask them there. + + We are moved to subversion and you can find the project here. Most of the changes from the cvs repository are merged with svn and the cvs repository is now obsolete. + +

Initial Contributors

+
    +
  • The first diff was contributed by Roger Keays on 15 June 2004. It is tagged as KEAYS. +
  • The second diff was contributed by Tommi Virtanen on 20 August 2004. Virtanen is a Debian Developer. He updated and polished the Keays diff and is apparently using the resulting .deb in production. He used exim and db4. The CVS tag is r3_0_0_virtanen. +
  • The third diff was the culmination of work done by Tim Small between 12 Oct and 30 Nov 2004. Small switched to mysql and worked on configuration issues (postinst and postrm). The CVS tag is
    r3_2_3-2_small. +
  • The third diff is from Jesus Climent, 16 December 2004. He was able to take advantage of the upstream change at release 3.2 from configuration at build time to run time configuration. Climent broke up the package to support mysql, postgresql, sqlite, and db4 by moving from a CDBS implementation to one based on a makefile. Climent also eliminated the .../cgi/*.cgi.in files which were not accepted upstream and removed the postinst/postrm files (They are in .../debian/Attic). The CVS tag is
    r3_2_3-3_climent. +
+ +

File bugs ?

+ You are sure you found a bug ? Well, mostly it's a feature but if you consider it as a bug... +
+
+ Please file the bugs to the BTS using the tool reportbug and be as verbose as possible. Please see Filing bugs +

Documentation

+ Good documentation can be found at: DSPAM + +