dspam-3.10.2+dfsg/0000755000175000017500000000000011745313526013165 5ustar julienjuliendspam-3.10.2+dfsg/install-sh0000755000175000017500000003253711437240436015200 0ustar julienjulien#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: dspam-3.10.2+dfsg/configure.ac0000644000175000017500000006332511745313330015455 0ustar julienjuliendnl $Id: configure.ac,v 1.86 2011/06/28 00:13:48 sbajic Exp $ dnl dnl autoconf (GNU Autoconf) 2.59 dnl ltmain.sh (GNU libtool) 1.5.6 dnl automake (GNU automake) 1.9.2 dnl AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (C) 2002-2012 DSPAM Project]) AC_INIT([dspam],[3.10.2],[dspam-devel@lists.sourceforge.net]) AC_CONFIG_SRCDIR(./src) AM_INIT_AUTOMAKE([1.7 foreign]) AC_CANONICAL_HOST #--------------------------------------------------------- # C language relative AC_LANG(C) AC_PROG_CC #AC_PROG_CPP AC_PROG_LIBTOOL AC_PROG_MAKE_SET AC_C_INLINE AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["$ac_configure_args"], [Configure Arguments]) # Check for various flavors of varargs macros AC_MSG_CHECKING([for ISO C99 varargs macros in C]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[ int a(int, int, int); # define call_a(...) a(1,__VA_ARGS__) ]], [[ call_a(2,3); ]]) ], dnl AC_LANG_PROGRAM() end [ # action if-found AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_ISO_VARARGS], 1, [Define if you have ISO C99 vararg macros]) ], [ # action if-not-found AC_MSG_RESULT([no]) ]) #--------------------------------------------------------- # Libc features # AC_CHECK_HEADERS(string.h) AC_CHECK_HEADERS(math.h) AC_CHECK_HEADERS(sys/time.h) AC_HEADER_TIME AC_CHECK_FUNCS(strlcpy) AC_CHECK_FUNCS(strsep) AC_CHECK_FUNCS(strtok_r) AC_CHECK_FUNCS(getpwnam_r) AC_CHECK_FUNCS(getpwuid_r) AC_CHECK_FUNCS([memcpy memset]) AC_CHECK_FUNCS(localtime_r) DS_CHECK_FUNC_INET_NTOA_R AC_CHECK_FUNCS(strcasestr) LIBS= # Daemon support # AC_ARG_ENABLE(daemon, [AS_HELP_STRING(--enable-daemon, Enable support for DSPAM to run in --daemon mode )]) AC_MSG_CHECKING([whether to enable daemon mode]) case x"$enable_daemon" in xyes) # daemon output enabled explicity ;; xno) # daemon output disabled explicity ;; x) # daemon output disabled by default enable_daemon=no ;; *) AC_MSG_ERROR([unexpected value $enable_daemon for --{enable,disable}-daemon configure option]) ;; esac if test x"$enable_daemon" != xyes then enable_daemon=no else enable_daemon=yes # overkill, but convenient AC_DEFINE(DAEMON, 1, [Defined if daemon support is enabled]) fi AC_MSG_RESULT([$enable_daemon]) # # Determine how to compile with pthreads support # if test x"$enable_daemon" = xyes then DS_PTHREADS(PT_CPPFLAGS, PT_LDFLAGS, PT_LIBS, [success=yes], [success=no]) if test x"$success" != xyes then AC_MSG_FAILURE([unable to determine how to compile with pthreads]) fi fi CPPFLAGS="$CPPFLAGS $PT_CPPFLAGS" LDFLAGS="$LDFLAGS $PT_LDFLAGS" LIBS="$LIBS $PT_LIBS" # # Network related libraries on Solaris is another game... # Needed for dspam_ngstat and mysql driver. # AC_CHECK_HEADERS([sys/types.h sys/socket.h netinet/in.h arpa/inet.h]) DS_NETLIBS(NETLIBS, [success=yes], [success=no]) if test x"$success" != xyes then AC_MSG_FAILURE([required libraries are not found or not usable]) fi AC_SUBST(NETLIBS) # # Dynamic linker libraries (usually -ldl) # DS_DLLIBS(DLLIBS, [success=yes], [success=no]) if test x"$success" != xyes then AC_MSG_FAILURE([required libraries are not found or not usable]) fi AC_SUBST(DLLIBS) #--------------------------------------------------------- # DSPAM features # # # SPLIT_CONFIG -- enable split configuration file support # DS_SPLIT_CONFIG() # # EXT_LOOKUP -- enable external user lookup # DS_EXT_LOOKUP() # # DSPAM_HOME -- directory where pre-user dictionaries, signatures, # etc. should be stored. # # This variable is AC_SUBST'ed, not AC_DEFINE'd because used not only # for C-code, but for Makefile rules also. # ### dspam_home='$(prefix)/var/dspam' dspam_home='$(prefix)/var/dspam' AC_ARG_WITH(dspam_home, [AS_HELP_STRING(--with-dspam-home=DIR, [Specify directory where per-user dictionaries, signatures, etc. should be stored.] @<:@default: /var/dspam@:>@ )], [ dspam_home="$withval" ]) AC_SUBST(dspam_home) AC_MSG_CHECKING([for dspam_home]) AC_MSG_RESULT([$dspam_home]) if test -d /var/dspam then AC_MSG_WARN([the default location for dspam_home has changed. please be sure to update your configuration or filesystem to reflect this.]) fi # DSPAM_HOME ownership AC_ARG_WITH(dspam_home_mode, [AS_HELP_STRING(--with-dspam-home-mode=MODE, Set access mode for DSPAM_HOME[,] default 770 )], [ dspam_home_mode="$withval" ], [ dspam_home_mode='770' ] ) AC_ARG_WITH(dspam_home_owner, [AS_HELP_STRING(--with-dspam-home-owner=OWNER, Set owner for DSPAM_HOME[,] default root )], [ dspam_home_owner="$withval" ], [ dspam_home_owner='root' ] ) AC_ARG_WITH(dspam_home_group, [AS_HELP_STRING(--with-dspam-home-group=GROUP, Set group for DSPAM_HOME[,] default mail )], [ dspam_home_group="$withval" ], [ dspam_home_group='mail' ] ) AC_SUBST(dspam_home_mode) AC_SUBST(dspam_home_owner) AC_SUBST(dspam_home_group) AC_ARG_WITH(logfile, [AS_HELP_STRING(--with-logfile=LOGFILE, Set flat logfile pathname for logging )], [ AC_DEFINE_UNQUOTED(LOGFILE, ["$withval"], [Logfile]) ], [ logfile='' ] ) # dspam binary ownership case x"$host" in *-freebsd*) default_dspam_mode=4510;; *) default_dspam_mode=2510;; esac case "$host" in *-linux*) LDFLAGS="$LDFLAGS -rdynamic";; *-freebsd*) LDFLAGS="$LDFLAGS -rdynamic";; esac AC_ARG_WITH(dspam_mode, [AS_HELP_STRING(--with-dspam-mode=MODE, Set access mode for dspam binary[,] default 2510 )], [ dspam_mode="$withval" ], [ dspam_mode="$default_dspam_mode" ] ) AC_ARG_WITH(dspam_owner, [AS_HELP_STRING(--with-dspam-owner=OWNER, Set owner for dspam binary[,] default root )], [ dspam_owner="$withval" ], [ dspam_owner='root' ] ) AC_ARG_WITH(dspam_group, [AS_HELP_STRING(--with-dspam-group=GROUP, Set group for dspam binary[,] default mail )], [ dspam_group="$withval" ], [ dspam_group='mail' ] ) AC_SUBST(dspam_mode) AC_SUBST(dspam_owner) AC_SUBST(dspam_group) # # Local delivery Agent # AC_MSG_CHECKING([which delivery agent to activate in dspam.conf]) default_delivery_agent="/usr/bin/procmail" case "$host" in *-linux*) default_delivery_agent="/usr/bin/procmail";; *-freebsd*) default_delivery_agent="/usr/libexec/mail.local";; *-solaris2*) default_delivery_agent="/usr/bin/mail";; *-cygwin*) default_delivery_agent="/usr/bin/procmail";; esac AC_ARG_WITH(delivery_agent, [AS_HELP_STRING(--with-delivery-agent=BINARY @<:@ARGS@:>@, Override the default delivery agent. This sets only the default[,] which may be changed in dspam.conf. )], [ delivery_agent="$withval" ], [ delivery_agent="$default_delivery_agent" ] ) AC_MSG_RESULT([$delivery_agent]) AC_SUBST(delivery_agent) # # Trusted User Security # AC_ARG_ENABLE(trusted_user_security, [AS_HELP_STRING(--disable-trusted-user-security,Disable trusted user security (enabled by default))]) AC_MSG_CHECKING([whether to enable trusted user security]) case x"$enable_trusted_user_security" in xyes) # trusted user security enabled explicity ;; xno) # trusted user security disabled explicity enable_trusted_user_security=no ;; x) # trusted user security enabled by default enable_trusted_user_security=yes ;; *) AC_MSG_ERROR([unexpected value $enable_trusted_user_security for --{enable,disable}-trusted-user-security configure option]) ;; esac if test x"$enable_trusted_user_security" != xyes then enable_trusted_user_security=no else enable_trusted_user_security=yes # overkill, but convenient AC_DEFINE(TRUSTED_USER_SECURITY, 1, [Defined if trusted user security are enabled]) fi AC_MSG_RESULT([$enable_trusted_user_security]) # # Clam/AV Support # AC_ARG_ENABLE(clamav, [AS_HELP_STRING(--enable-clamav, Enable Clam/AV support for DSPAM. )]) AC_MSG_CHECKING([whether to enable clamav]) case x"$enable_clamav" in xyes) # clamav output enabled explicity ;; xno) # clamav output disabled explicity ;; x) # clamav output disabled by default enable_clamav=no ;; *) AC_MSG_ERROR([unexpected value $enable_clamav for --{enable,disable}-clamav configure option]) ;; esac if test x"$enable_clamav" != xyes then enable_clamav=no else enable_clamav=yes # overkill, but convenient AC_DEFINE(CLAMAV, 1, [Defined if clamav is enabled]) fi AC_MSG_RESULT([$enable_clamav]) # # Debug support # AC_ARG_ENABLE(debug, [AS_HELP_STRING(--enable-debug, Enable debugging support for DSPAM. Don't enable this unless something needs testing! )]) AC_MSG_CHECKING([whether to enable debug output]) case x"$enable_debug" in xyes) # debug output enabled explicity ;; xno) # debug output disabled explicity ;; x) # debug output disabled by default enable_debug=no ;; *) AC_MSG_ERROR([unexpected value $enable_debug for --{enable,disable}-debug configure option]) ;; esac if test x"$enable_debug" != xyes then enable_debug=no else enable_debug=yes # overkill, but convenient AC_DEFINE(DEBUG, 1, [Defined if debug output is enabled]) fi AC_MSG_RESULT([$enable_debug]) # # Enable syslog # AC_ARG_ENABLE(syslog, [AS_HELP_STRING(--enable-syslog, Enable (or disable) syslog support )]) AC_MSG_CHECKING([whether to enable syslog output]) case x"$enable_syslog" in xyes) # enabled explicity ;; xno) # disabled explicity ;; x) # enabled by default enable_syslog=yes ;; *) AC_MSG_ERROR([unexpected value $enable_syslog for --{enable,disable}-syslog configure option]) ;; esac if test x"$enable_syslog" != xyes then enable_syslog=no else enable_syslog=yes # overkill, but convenient AC_DEFINE(USE_SYSLOG, 1, [Defined if syslog is enabled]) fi AC_MSG_RESULT([$enable_syslog]) # # BNR Debug # AC_ARG_ENABLE(bnr-debug, [AS_HELP_STRING(--enable-bnr-debug, Activates debugging output for Bayesian Noise Reduction )]) AC_MSG_CHECKING([whether to enable debug output for BNR]) case x"$enable_bnr_debug" in xyes) # enabled explicity ;; xno) # disabled explicity ;; x) # disabled by default enable_bnr_debug=no ;; *) AC_MSG_ERROR([unexpected value $enable_bnr_debug for --{enable,disable}-bnr-debug configure option]) ;; esac if test x"$enable_bnr_debug" != xyes then enable_bnr_debug=no else enable_bnr_debug=yes # overkill, but convenient AC_DEFINE(LIBBNR_DEBUG, 1, [Defined if BNR Debug is enabled]) fi AC_MSG_RESULT([$enable_bnr_debug]) # # Homedir support # AC_ARG_ENABLE(homedir, [AS_HELP_STRING(--enable-homedir, Enable home directory filesystem storage. )]) AC_MSG_CHECKING([whether to enable home directory support]) case x"$enable_homedir" in xyes) # homedir enabled explicity ;; xno) # homedir disabled explicity ;; x) # homedir disabled by default enable_homedir=no ;; *) AC_MSG_ERROR([unexpected value $enable_homedir for --{enable,disable}-homedir configure option]) ;; esac if test x"$enable_homedir" != xyes then enable_homedir=no else enable_homedir=yes # overkill, but convenient AC_DEFINE(HOMEDIR, 1, [Defined if home directory support is enabled]) fi AC_MSG_RESULT([$enable_homedir]) # # MySQL4 Initialization # AC_ARG_ENABLE(mysql4-initialization, [AS_HELP_STRING(--disable-mysql4-initialization, Performs Initialization and Cleanup of MySQL client libraries v4.1+. )]) AC_MSG_CHECKING([whether to enable MySQL client initialization]) case x"$enable_mysql4_initialization" in xyes) # enabled explicity enable_mysql4_initialization=yes ;; xno) # disabled explicity enable_mysql4_initialization=no ;; x) # disabled by default enable_mysql4_initialization=yes ;; *) AC_MSG_ERROR([unexpected value $enable_mysql4_initialization for --{enable,disable}-mysql4-initialization configure option]) ;; esac if test x"$enable_mysql4_initialization" != xyes then enable_mysql4_initialization=no else enable_mysql4_initialization=yes # overkill, but convenient AC_DEFINE(MYSQL4_INITIALIZATION, 1, [Defined if mysql4-initialization is enabled]) fi AC_MSG_RESULT([$enable_mysql4_initialization]) # # Preferences Extension # For storage drivers with preferences extension, the driver's extension is # used instead of the built-in file-based function # AC_ARG_ENABLE(preferences-extension, [AS_HELP_STRING(--enable-preferences-extension, Enable if storage driver supports preferences extension )]) AC_MSG_CHECKING([whether to enable preferences-extension]) case x"$enable_preferences_extension" in xyes) # enabled explicity ;; xno) # disabled explicity ;; x) # disabled by default enable_preferences_extension=no ;; *) AC_MSG_ERROR([unexpected value $enable_preferences_extension for --{enable,disable}-preferences-extension configure option]) ;; esac if test x"$enable_preferences_extension" != xyes then enable_preferences_extension=no else enable_preferences_extension=yes # overkill, but convenient AC_DEFINE(PREFERENCES_EXTENSION, 1, [Defined if storage driver supports preferences extension]) fi AC_MSG_RESULT([$enable_preferences_extension]) # # Verbose debug output # AC_ARG_ENABLE(verbose-debug, [AS_HELP_STRING(--enable-verbose-debug, Cause DSPAM produce verbose debug output and write them into LOGDIR/dspam.debug file. Implies '--enable-debug'. Never enable this for production builds! )]) AC_MSG_CHECKING([whether to enable verbose debug output]) case x"$enable_verbose_debug" in xyes) # debug output enabled explicity ;; xno) # debug output disabled explicity ;; x) # debug output disabled by default enable_verbose_debug=no ;; *) AC_MSG_ERROR([unexpected value $enable_verbose_debug for --{enable,disable}-verbose-debug configure option]) ;; esac if test x"$enable_verbose_debug" != xyes then enable_verbose_debug=no else enable_verbose_debug=yes # overkill, but convenient AC_DEFINE(DEBUG, 1, [Defined if debug output is enabled]) AC_DEFINE(VERBOSE, 1, [Defined if verbose debug output is enabled]) fi AC_MSG_RESULT([$enable_verbose_debug]) # # Long Usernames # AC_ARG_ENABLE(long-usernames, [AS_HELP_STRING(--enable-long-usernames, Cause DSPAM to support long usernames. The default is to use the same length on usernames as the operating system. )]) AC_MSG_CHECKING([whether to enable long usernames]) case x"$enable_long_usernames" in xyes) # debug output enabled explicity ;; xno) # debug output disabled explicity ;; x) # debug output disabled by default enable_long_usernames=no ;; *) AC_MSG_ERROR([unexpected value $enable_long_usernames for --{enable,disable}-long-usernames configure option]) ;; esac if test x"$enable_long_usernames" != xyes then enable_long_usernames=no else enable_long_usernames=yes # overkill, but convenient AC_DEFINE(LONG_USERNAMES, 1, [Defined if long usernames is enabled]) fi AC_MSG_RESULT([$enable_long_usernames]) # # Large scale implementation # AC_ARG_ENABLE(large-scale, [AS_HELP_STRING(--enable-large-scale,Manage file structure for a large scale implementation)]) AC_MSG_CHECKING([whether to enable large scale implementation]) case x"$enable_large_scale" in xyes) # large-scale enabled explicitly ;; xno) # large-scale disabled explicitly ;; x) # large-scale disabled by default enable_large_scale=no ;; *) AC_MSG_ERROR([unexpected value $enable_large_scale for --{enable,disable}-large-scale configure option]) ;; esac if test x"$enable_large_scale" != xyes then enable_large_scale=no else enable_large_scale=yes # overkill, but convenient AC_DEFINE(LARGESCALE, 1, [Defined if large_scale is enabled]) fi AC_MSG_RESULT([$enable_large_scale]) # # Domain Scale Filesystem # AC_ARG_ENABLE(domain-scale, [AS_HELP_STRING(--enable-domain-scale,Manage file structure to support a domain implementation)]) AC_MSG_CHECKING([whether to enable domain structure implementation]) case x"$enable_domain_scale" in xyes) # domain-scale enabled explicitly ;; xno) # domain-scale disabled explicitly ;; x) # domain-scale disabled by default enable_domain_scale=no ;; *) AC_MSG_ERROR([unexpected value $enable_domain_scale for --{enable,disable}-domain-scale configure option]) ;; esac if test x"$enable_domain_scale" != xyes then enable_domain_scale=no else enable_domain_scale=yes # overkill, but convenient AC_DEFINE(DOMAINSCALE, 1, [Defined if domain_scale is enabled]) fi AC_MSG_RESULT([$enable_domain_scale]) if test x"$enable_domain_scale$enable_large_scale" = xyesyes then AC_MSG_ERROR([you may not have domain-scale and large-scale implemented simultaneously]) elif test x"$enable_domain_scale$enable_homedir" = xyesyes then AC_MSG_ERROR([you may not have domain-scale and homedir implemented simultaneously]) elif test x"$enable_large_scale$enable_homedir" = xyesyes then AC_MSG_ERROR([you may not have large-scale and homedir implemented simultaneously]) fi # # Log Directory # logdir="$dspam_home/log" AC_ARG_WITH(logdir, [AS_HELP_STRING(--with-logdir=DIR, Specify directory where logfiles are to be written. @<:@default: $dspam_home/log@:>@ )], [ logdir="$withval" ]) AC_SUBST(logdir) AC_MSG_CHECKING([for logdir]) AC_MSG_RESULT([$logdir]) #--------------------------------------------------------- # storage driver selection storagedrv=hash_drv storage_drv_subdirs="" active_driver="" static_driver=yes AC_ARG_WITH(storage-driver, [AS_HELP_STRING(--with-storage-driver=LIST,Specify storage drivers to enable. @<:@default: hash_drv@:>@)], [ storagedrv="$withval" ]) AC_MSG_CHECKING([which storage drivers to build]) AC_MSG_RESULT([$storagedrv]) #--------------------------------------------------------- # Libraries for storage drivers # ac_save_IFS=$IFS; IFS=, for drv in $storagedrv; do IFS=$ac_save_IFS if test x"$active_driver" = x then active_driver=$drv AC_SUBST(active_driver) else static_driver=no fi if test x"$drv" = xhash_drv then hash_drv=yes storage_drv_subdirs="$storage_drv_subdirs tools.hash_drv" fi if test x"$drv" = xmysql_drv then DS_MYSQL(MYSQL_CPPFLAGS, MYSQL_LDFLAGS, MYSQL_LIBS, [success=yes], [success=no]) if test x"$success" != xyes then AC_MSG_ERROR([Required version of libmysqlclient not found]) fi libmysql_drv_cppflags="$MYSQL_CPPFLAGS $CPPFLAGS" libmysql_drv_libs="$MYSQL_LIBS $LIBS" libmysql_drv_ldflags="$MYSQL_LDFLAGS $LDFLAGS" AC_SUBST(libmysql_drv_cppflags) AC_SUBST(libmysql_drv_libs) AC_SUBST(libmysql_drv_ldflags) mysql_drv=yes storage_drv_subdirs="$storage_drv_subdirs tools.mysql_drv" fi if test x"$drv" = xpgsql_drv then DS_PGSQL(PGSQL_CPPFLAGS, PGSQL_LDFLAGS, PGSQL_LIBS, [success=yes], [success=no]) if test x"$success" != xyes then AC_MSG_ERROR([Required version of libpq not found]) fi libpgsql_drv_cppflags="$PGSQL_CPPFLAGS $CPPFLAGS" libpgsql_drv_libs="$PGSQL_LIBS $LIBS" libpgsql_drv_ldflags="$PGSQL_LDFLAGS $LDFLAGS" AC_SUBST(libpgsql_drv_cppflags) AC_SUBST(libpgsql_drv_libs) AC_SUBST(libpgsql_drv_ldflags) pgsql_drv=yes storage_drv_subdirs="$storage_drv_subdirs tools.pgsql_drv" fi if test x"$drv" = xsqlite_drv then DS_SQLITE(SQLITE_CPPFLAGS, SQLITE_LDFLAGS, SQLITE_LIBS, [sqlite_version_major], [], [], [success=yes], [success=no]) if test x"$success" != xyes then AC_MSG_ERROR([Required version of libsqlite not found]) fi if test x"$sqlite_version_major" != x2 then AC_MSG_ERROR([Version mismatch: sqlite_drv requires libsqlite version 2]) fi libsqlite_drv_cppflags="$SQLITE_CPPFLAGS $CPPFLAGS" libsqlite_drv_libs="$SQLITE_LIBS $LIBS" libsqlite_drv_ldflags="$SQLITE_LDFLAGS $LDFLAGS" AC_SUBST(libsqlite_drv_cppflags) AC_SUBST(libsqlite_drv_libs) AC_SUBST(libsqlite_drv_ldflags) sqlite_drv=yes storage_drv_subdirs="$storage_drv_subdirs tools.sqlite_drv" fi if test x"$drv" = xsqlite3_drv then DS_SQLITE3(SQLITE3_CPPFLAGS, SQLITE3_LDFLAGS, SQLITE3_LIBS, [sqlite_version_major], [], [], [success=yes], [success=no]) if test x"$success" != xyes then AC_MSG_ERROR([Required version of libsqlite not found]) fi if test x"$sqlite_version_major" != x3 then AC_MSG_ERROR([Version mismatch: sqlite3_drv requires libsqlite version 3]) fi libsqlite3_drv_cppflags="$SQLITE3_CPPFLAGS $CPPFLAGS" libsqlite3_drv_libs="$SQLITE3_LIBS $LIBS" libsqlite3_drv_ldflags="$SQLITE3_LDFLAGS $LDFLAGS" AC_SUBST(libsqlite3_drv_cppflags) AC_SUBST(libsqlite3_drv_libs) AC_SUBST(libsqlite3_drv_ldflags) sqlite3_drv=yes storage_drv_subdirs="$storage_drv_subdirs tools.sqlite_drv" fi done AM_CONDITIONAL([BUILD_DB4_DRV], [ test x"$db4_drv" = xyes ]) AM_CONDITIONAL([BUILD_DB3_DRV], [ test x"$db3_drv" = xyes ]) AM_CONDITIONAL([BUILD_HASH_DRV], [ test x"$hash_drv" = xyes ]) AM_CONDITIONAL([BUILD_SQLITE_DRV], [ test x"$sqlite_drv" = xyes ]) AM_CONDITIONAL([BUILD_SQLITE3_DRV], [ test x"$sqlite3_drv" = xyes ]) AM_CONDITIONAL([BUILD_MYSQL_DRV], [ test x"$mysql_drv" = xyes ]) AM_CONDITIONAL([BUILD_PGSQL_DRV], [ test x"$pgsql_drv" = xyes ]) AM_CONDITIONAL([STATIC_DRIVER], [ test x"$static_driver" = xyes ]) AM_CONDITIONAL([DYNAMIC_DRIVER], [ test x"$static_driver" = xno ]) AM_CONDITIONAL([BUILD_EXT_LOOKUP], [ test x"$enable_external_lookup" = xyes ]) AC_MSG_CHECKING([whether we are building a single, static storage driver]) if test x"$static_driver" = xyes then AC_DEFINE([STATIC_DRIVER], 1, [Define if using a single, statically linked storage driver]) AC_MSG_RESULT([yes]) CPPFLAGS="$CPPFLAGS $libmysql_drv_cppflags $libpgsql_drv_cppflags $libsqlite_drv_cppflags $libsqlite3_drv_cppflags $libhash_drv_cppflags" LIBS="$LIBS $libmysql_drv_libs $libpgsql_drv_libs $libsqlite_drv_libs $libsqlite3_drv_libs $libhash_drv_libs" LDFLAGS="$LDFLAGS $libmysql_drv_ldflags $libpgsql_drv_ldflags $libsqlite_drv_ldflags $libsqlite3_drv_ldflags $libhash_drv_ldflags" else AC_MSG_RESULT([no]) fi AC_SUBST(storage_drv_subdirs) if test x"$storage_drv_subdirs" = x then AC_MSG_ERROR([no valid storage drivers specified]) fi if test x"$enable_daemon" = xyes && test x"$mysql_drv" != xyes && test x"$pgsql_drv" != xyes && test x"$hash_drv" != xyes then AC_MSG_ERROR([daemon mode requires one of the following storage drivers: mysql_drv pgsql_drv hash_drv]) fi #--------------------------------------------------------- # Libraries (other) # #--------------------------------------------------------- # Documentation generation tools # ### AC_CHECK_PROG([HAVE_DOXYGEN], [doxygen], [yes], [no]) ### AC_CHECK_PROG([HAVE_DOT], [dot], [yes], [no]) ### AM_CONDITIONAL([HAVE_DOXYGEN], [ test x"$HAVE_DOXYGEN" = xyes ]) #---------------------------------------------------------- # final cut # GCC_BUILD_OPTIONS AC_CONFIG_HEADERS(src/auto-config.h) AH_TOP([ #ifndef __auto_config_h #define __auto_config_h ]) AH_BOTTOM([ #endif /* !__auto_config_h */ ]) AC_CONFIG_FILES([Makefile src/tools/Makefile webui/Makefile m4/Makefile]) AC_CONFIG_FILES([src/tools.mysql_drv/Makefile]) AC_CONFIG_FILES([txt/Makefile src/tools.pgsql_drv/Makefile ]) AC_CONFIG_FILES([src/Makefile webui/cgi-bin/templates/Makefile]) AC_CONFIG_FILES([webui/cgi-bin/templates/cs/Makefile]) AC_CONFIG_FILES([webui/cgi-bin/templates/de/Makefile]) AC_CONFIG_FILES([webui/cgi-bin/templates/es-es/Makefile]) AC_CONFIG_FILES([webui/cgi-bin/templates/fr/Makefile]) AC_CONFIG_FILES([webui/cgi-bin/templates/he/Makefile]) AC_CONFIG_FILES([webui/cgi-bin/templates/pt-br/Makefile]) AC_CONFIG_FILES([webui/cgi-bin/templates/ro/Makefile]) AC_CONFIG_FILES([webui/cgi-bin/templates/ru/Makefile]) AC_CONFIG_FILES([src/tools.sqlite_drv/Makefile man/Makefile]) AC_CONFIG_FILES([src/dspam.pc src/dspam-uninstalled.pc]) AC_CONFIG_FILES([doc/Makefile src/tools.hash_drv/Makefile]) AC_CONFIG_FILES([webui/cgi-bin/Makefile webui/htdocs/Makefile]) AC_CONFIG_FILES([contrib/Makefile]) AC_OUTPUT dspam-3.10.2+dfsg/configure0000755000175000017500000176236311745313455015117 0ustar julienjulien#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for dspam 3.10.2. # # Report bugs to . # # Copyright (C) 2002-2012 DSPAM Project # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: dspam-devel@lists.sourceforge.net about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dspam' PACKAGE_TARNAME='dspam' PACKAGE_VERSION='3.10.2' PACKAGE_STRING='dspam 3.10.2' PACKAGE_BUGREPORT='dspam-devel@lists.sourceforge.net' PACKAGE_URL='' ac_unique_file="./src" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS storage_drv_subdirs BUILD_EXT_LOOKUP_FALSE BUILD_EXT_LOOKUP_TRUE DYNAMIC_DRIVER_FALSE DYNAMIC_DRIVER_TRUE STATIC_DRIVER_FALSE STATIC_DRIVER_TRUE BUILD_PGSQL_DRV_FALSE BUILD_PGSQL_DRV_TRUE BUILD_MYSQL_DRV_FALSE BUILD_MYSQL_DRV_TRUE BUILD_SQLITE3_DRV_FALSE BUILD_SQLITE3_DRV_TRUE BUILD_SQLITE_DRV_FALSE BUILD_SQLITE_DRV_TRUE BUILD_HASH_DRV_FALSE BUILD_HASH_DRV_TRUE BUILD_DB3_DRV_FALSE BUILD_DB3_DRV_TRUE BUILD_DB4_DRV_FALSE BUILD_DB4_DRV_TRUE libsqlite3_drv_ldflags libsqlite3_drv_libs libsqlite3_drv_cppflags libsqlite_drv_ldflags libsqlite_drv_libs libsqlite_drv_cppflags libpgsql_drv_ldflags libpgsql_drv_libs libpgsql_drv_cppflags pgsql_pg_config libmysql_drv_ldflags libmysql_drv_libs libmysql_drv_cppflags active_driver logdir delivery_agent dspam_group dspam_owner dspam_mode dspam_home_group dspam_home_owner dspam_home_mode dspam_home external_lookup_libs DLLIBS NETLIBS CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_daemon enable_split_configuration enable_external_lookup with_dspam_home with_dspam_home_mode with_dspam_home_owner with_dspam_home_group with_logfile with_dspam_mode with_dspam_owner with_dspam_group with_delivery_agent enable_trusted_user_security enable_clamav enable_debug enable_syslog enable_bnr_debug enable_homedir enable_mysql4_initialization enable_preferences_extension enable_verbose_debug enable_long_usernames enable_large_scale enable_domain_scale with_logdir with_storage_driver enable_virtual_users with_mysql_includes with_mysql_libraries with_pgsql_includes with_pgsql_libraries with_sqlite_includes with_sqlite_libraries enable_warnings enable_profiling ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures dspam 3.10.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/dspam] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of dspam 3.10.2:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-daemon Enable support for DSPAM to run in --daemon mode --enable-split-configuration Enable split configuration file support --enable-external-lookup Enable external lookup support --disable-trusted-user-security Disable trusted user security (enabled by default) --enable-clamav Enable Clam/AV support for DSPAM. --enable-debug Enable debugging support for DSPAM. Don't enable this unless something needs testing! --enable-syslog Enable (or disable) syslog support --enable-bnr-debug Activates debugging output for Bayesian Noise Reduction --enable-homedir Enable home directory filesystem storage. --disable-mysql4-initialization Performs Initialization and Cleanup of MySQL client libraries v4.1+. --enable-preferences-extension Enable if storage driver supports preferences extension --enable-verbose-debug Cause DSPAM produce verbose debug output and write them into LOGDIR/dspam.debug file. Implies '--enable-debug'. Never enable this for production builds! --enable-long-usernames Cause DSPAM to support long usernames. The default is to use the same length on usernames as the operating system. --enable-large-scale Manage file structure for a large scale implementation --enable-domain-scale Manage file structure to support a domain implementation --enable-virtual-users Cause mysql_drv to generate virtual uids for each user --enable-virtual-users Cause pgsql_drv to generate virtual uids for each user --enable-warnings[={no|[{yes|error}][,proto]}] Disable (no) or enable (yes) more warnings or enable and treat warnings as errors (error). Simple --enable-warnings is the same as --enable-warnings=yes. You can add ',proto' to 'yes' or 'error' option for turning on additional '-Wstrict-prototypes' flag. Have effect for GCC compilers only. --disable-warnings Same as --enable-warnings=no [default] --enable-profiling Disable (no) or enable (yes) performance profiling. Generate extra code to write profile information suitable for the analysis program gprof. Has effect for GCC compilers only. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-dspam-home=DIR Specify directory where per-user dictionaries, signatures, etc. should be stored. [default: /var/dspam] --with-dspam-home-mode=MODE Set access mode for DSPAM_HOME, default 770 --with-dspam-home-owner=OWNER Set owner for DSPAM_HOME, default root --with-dspam-home-group=GROUP Set group for DSPAM_HOME, default mail --with-logfile=LOGFILE Set flat logfile pathname for logging --with-dspam-mode=MODE Set access mode for dspam binary, default 2510 --with-dspam-owner=OWNER Set owner for dspam binary, default root --with-dspam-group=GROUP Set group for dspam binary, default mail --with-delivery-agent=BINARY [ARGS] Override the default delivery agent. This sets only the default, which may be changed in dspam.conf. --with-logdir=DIR Specify directory where logfiles are to be written. [default: $dspam_home/log] --with-storage-driver=LIST Specify storage drivers to enable. [default: hash_drv] --with-mysql-includes=DIR Where to find Mysql headers --with-mysql-libraries=DIR Where to find MySQL --with-pgsql-includes=DIR Where to find PostgreSQL headers --with-pgsql-libraries=DIR Where to find PostgreSQL libraries --with-sqlite-includes=DIR Where to find SQLite headers --with-sqlite-libraries=DIR Where to find SQLite libraries Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF dspam configure 3.10.2 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Copyright (C) 2002-2012 DSPAM Project _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------------------ ## ## Report this to dspam-devel@lists.sourceforge.net ## ## ------------------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by dspam $as_me 3.10.2, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='dspam' VERSION='3.10.2' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac #--------------------------------------------------------- # C language relative ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi #AC_PROG_CPP case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4' macro_revision='1.3293' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' lt_prog_compiler_pic='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi # Handle Gentoo/FreeBSD as it was Linux case $host_vendor in gentoo) version_type=linux ;; *) version_type=freebsd-$objformat ;; esac case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; linux) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' need_lib_prefix=no need_version=no ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac cat >>confdefs.h <<_ACEOF #define CONFIGURE_ARGS "$ac_configure_args" _ACEOF # Check for various flavors of varargs macros { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 varargs macros in C" >&5 $as_echo_n "checking for ISO C99 varargs macros in C... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int a(int, int, int); # define call_a(...) a(1,__VA_ARGS__) int main () { call_a(2,3); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # action if-found { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_ISO_VARARGS 1" >>confdefs.h else # action if-not-found { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext #--------------------------------------------------------- # Libc features # for ac_header in string.h do : ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRING_H 1 _ACEOF fi done for ac_header in math.h do : ac_fn_c_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default" if test "x$ac_cv_header_math_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MATH_H 1 _ACEOF fi done for ac_header in sys/time.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIME_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi for ac_func in strlcpy do : ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" if test "x$ac_cv_func_strlcpy" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRLCPY 1 _ACEOF fi done for ac_func in strsep do : ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep" if test "x$ac_cv_func_strsep" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRSEP 1 _ACEOF fi done for ac_func in strtok_r do : ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" if test "x$ac_cv_func_strtok_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRTOK_R 1 _ACEOF fi done for ac_func in getpwnam_r do : ac_fn_c_check_func "$LINENO" "getpwnam_r" "ac_cv_func_getpwnam_r" if test "x$ac_cv_func_getpwnam_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPWNAM_R 1 _ACEOF fi done for ac_func in getpwuid_r do : ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r" if test "x$ac_cv_func_getpwuid_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPWUID_R 1 _ACEOF fi done for ac_func in memcpy memset do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in localtime_r do : ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r" if test "x$ac_cv_func_localtime_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALTIME_R 1 _ACEOF fi done ds_includes_arpa_inet="\ /* includes start */ #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif #ifdef HAVE_NETINET_IN_H # include #endif #ifdef HAVE_ARPA_INET_H # include #endif /* includes end */" for ac_header in sys/types.h sys/socket.h netinet/in.h arpa/inet.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ds_includes_arpa_inet " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # test_prototyped_inet_ntoa_r="unknown" test_compiles_inet_ntoa_r="unknown" test_number_of_arguments_inet_ntoa_r="unknown" # for ac_func in inet_ntoa_r do : ac_fn_c_check_func "$LINENO" "inet_ntoa_r" "ac_cv_func_inet_ntoa_r" if test "x$ac_cv_func_inet_ntoa_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INET_NTOA_R 1 _ACEOF fi done # if test "$ac_cv_func_inet_ntoa_r" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r is prototyped" >&5 $as_echo_n "checking if inet_ntoa_r is prototyped... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ds_includes_arpa_inet _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "inet_ntoa_r" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test_prototyped_inet_ntoa_r="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } test_prototyped_inet_ntoa_r="no" fi rm -f conftest* fi # if test "$test_prototyped_inet_ntoa_r" = "yes"; then if test "$test_number_of_arguments_inet_ntoa_r" = "unknown"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r takes 2 args." >&5 $as_echo_n "checking if inet_ntoa_r takes 2 args.... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ds_includes_arpa_inet int main () { struct in_addr addr; if(0 != inet_ntoa_r(addr, 0)) return 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test_compiles_inet_ntoa_r="yes" test_number_of_arguments_inet_ntoa_r="2" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } test_compiles_inet_ntoa_r="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "$test_number_of_arguments_inet_ntoa_r" = "unknown"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r takes 3 args." >&5 $as_echo_n "checking if inet_ntoa_r takes 3 args.... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ds_includes_arpa_inet int main () { struct in_addr addr; if(0 != inet_ntoa_r(addr, 0, 0)) return 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test_compiles_inet_ntoa_r="yes" test_number_of_arguments_inet_ntoa_r="3" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } test_compiles_inet_ntoa_r="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r is compilable" >&5 $as_echo_n "checking if inet_ntoa_r is compilable... " >&6; } if test "$test_compiles_inet_ntoa_r" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi # { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r might be used" >&5 $as_echo_n "checking if inet_ntoa_r might be used... " >&6; } if test "$test_prototyped_inet_ntoa_r" = "yes" && test "$test_compiles_inet_ntoa_r" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<_ACEOF #define HAVE_INET_NTOA_R 1 _ACEOF # if test "$test_number_of_arguments_inet_ntoa_r" -eq "2"; then $as_echo "#define HAVE_INET_NTOA_R_2 1" >>confdefs.h elif test "$test_number_of_arguments_inet_ntoa_r" -eq "3"; then $as_echo "#define HAVE_INET_NTOA_R_3 1" >>confdefs.h fi # ac_cv_func_inet_ntoa_r="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_func_inet_ntoa_r="no" fi for ac_func in strcasestr do : ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" if test "x$ac_cv_func_strcasestr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRCASESTR 1 _ACEOF fi done LIBS= # Daemon support # # Check whether --enable-daemon was given. if test "${enable_daemon+set}" = set; then : enableval=$enable_daemon; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable daemon mode" >&5 $as_echo_n "checking whether to enable daemon mode... " >&6; } case x"$enable_daemon" in xyes) # daemon output enabled explicity ;; xno) # daemon output disabled explicity ;; x) # daemon output disabled by default enable_daemon=no ;; *) as_fn_error $? "unexpected value $enable_daemon for --{enable,disable}-daemon configure option" "$LINENO" 5 ;; esac if test x"$enable_daemon" != xyes then enable_daemon=no else enable_daemon=yes # overkill, but convenient $as_echo "#define DAEMON 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_daemon" >&5 $as_echo "$enable_daemon" >&6; } # # Determine how to compile with pthreads support # if test x"$enable_daemon" = xyes then ds_pthreads_save_CPPFLAGS="$CPPFLAGS" ds_pthreads_save_LDFLAGS="$LDFLAGS" ds_pthreads_save_LIBS="$LIBS" ds_pthreads_CPPFLAGS="" ds_pthreads_LDFLAGS="" ds_pthreads_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking how you like your pthreads" >&5 $as_echo_n "checking how you like your pthreads... " >&6; } pthreads_success="no" LIBS="$ds_pthreads_save_LIBS -pthread" if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main() { pthread_mutex_t m; pthread_mutex_init(&m, NULL); pthread_exit(0); exit(EXIT_FAILURE); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : pthreads_success="yes" ds_pthreads_LIBS="-pthread" { $as_echo "$as_me:${as_lineno-$LINENO}: result: -pthread" >&5 $as_echo "-pthread" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test x"$pthreads_success" = xno then LIBS="$ds_pthreads_save_LIBS -lpthread" if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main() { pthread_mutex_t m; pthread_mutex_init(&m, NULL); pthread_exit(0); exit(EXIT_FAILURE); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : pthreads_success="yes" ds_pthreads_LIBS="-lpthread" { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lpthread" >&5 $as_echo "-lpthread" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi if test x"$pthreads_success" = xno then LIBS="$ds_pthreads_save_LIBS -lpthread -mt" if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main() { pthread_mutex_t m; pthread_mutex_init(&m, NULL); pthread_exit(0); exit(EXIT_FAILURE); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : pthreads_success="yes" ds_pthreads_LIBS="-lpthread -mt" { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lpthread -mt" >&5 $as_echo "-lpthread -mt" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi if test x"$pthreads_success" = xno then { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } as_fn_error $? "Unable to determine how to compile with pthreads" "$LINENO" 5 fi CPPFLAGS="$ds_pthreads_save_CPPFLAGS" LDFLAGS="$ds_pthreads_save_LDFLAGS" LIBS="$ds_pthreads_save_LIBS" if test x"$pthreads_success" = xyes then PT_CPPFLAGS="$ds_pthreads_CPPFLAGS" PT_LDFLAGS="$ds_pthreads_LDFLAGS" PT_LIBS="$ds_pthreads_LIBS" success=yes : else success=no : fi if test x"$success" != xyes then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "unable to determine how to compile with pthreads See \`config.log' for more details" "$LINENO" 5; } fi fi CPPFLAGS="$CPPFLAGS $PT_CPPFLAGS" LDFLAGS="$LDFLAGS $PT_LDFLAGS" LIBS="$LIBS $PT_LIBS" # # Network related libraries on Solaris is another game... # Needed for dspam_ngstat and mysql driver. # for ac_header in sys/types.h sys/socket.h netinet/in.h arpa/inet.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ds_netlibs_save_LIBS="$LIBS" LIBS='' ds_netlibs_success=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntoa" >&5 $as_echo_n "checking for library containing inet_ntoa... " >&6; } if ${ac_cv_search_inet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntoa (); int main () { return inet_ntoa (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_inet_ntoa=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_inet_ntoa+:} false; then : break fi done if ${ac_cv_search_inet_ntoa+:} false; then : else ac_cv_search_inet_ntoa=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntoa" >&5 $as_echo "$ac_cv_search_inet_ntoa" >&6; } ac_res=$ac_cv_search_inet_ntoa if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ds_netlibs_success=yes else ds_netlibs_success=no fi if test x"$ds_netlibs_success" = xyes then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_socket+:} false; then : break fi done if ${ac_cv_search_socket+:} false; then : else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ds_netlibs_success=yes else ds_netlibs_success=no fi fi ds_netlibs_netlibs="$LIBS" LIBS="$ds_netlibs_save_LIBS" if test x"$ds_netlibs_success" = xyes then NETLIBS="$ds_netlibs_netlibs" success=yes else success=no fi if test x"$success" != xyes then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "required libraries are not found or not usable See \`config.log' for more details" "$LINENO" 5; } fi # # Dynamic linker libraries (usually -ldl) # ds_dllibs_save_LIBS="$LIBS" LIBS='' ds_dllibs_success=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ds_dllibs_success=yes else ds_dllibs_success=no fi ds_dllibs_dllibs="$LIBS" LIBS="$ds_dllibs_save_LIBS" if test x"$ds_dllibs_success" = xyes then DLLIBS="$ds_dllibs_dllibs" success=yes else success=no fi if test x"$success" != xyes then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "required libraries are not found or not usable See \`config.log' for more details" "$LINENO" 5; } fi #--------------------------------------------------------- # DSPAM features # # # SPLIT_CONFIG -- enable split configuration file support # # Check whether --enable-split-configuration was given. if test "${enable_split_configuration+set}" = set; then : enableval=$enable_split_configuration; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable split configuration file support" >&5 $as_echo_n "checking whether to enable split configuration file support... " >&6; } case x"$enable_split_configuration" in xyes) # split configuration file enabled explicity ;; xno) # split configuration file disabled explicity ;; x) # split configuration file disabled by default enable_split_configuration=no ;; *) as_fn_error $? "unexpected value $enable_split_configuration for --{enable,disable}-split-configuration configure option" "$LINENO" 5 ;; esac if test x"$enable_split_configuration" != xyes then enable_split_configuration=no else enable_split_configuration=yes # overkill, but convenient $as_echo "#define SPLIT_CONFIG 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_split_configuration" >&5 $as_echo "$enable_split_configuration" >&6; } # # EXT_LOOKUP -- enable external user lookup # # Check whether --enable-external-lookup was given. if test "${enable_external_lookup+set}" = set; then : enableval=$enable_external_lookup; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable external lookup support" >&5 $as_echo_n "checking whether to enable external lookup support... " >&6; } case x"$enable_external_lookup" in xyes) # external lookup enabled explicity ;; xno) # external lookup disabled explicity ;; x) # external lookup disabled by default enable_external_lookup=no ;; *) as_fn_error $? "unexpected value $enable_external_lookup for --{enable,disable}-external-lookup configure option" "$LINENO" 5 ;; esac if test x"$enable_external_lookup" != xyes then enable_external_lookup=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_external_lookup" >&5 $as_echo "$enable_external_lookup" >&6; } else enable_external_lookup=yes # overkill, but convenient { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_external_lookup" >&5 $as_echo "$enable_external_lookup" >&6; } $as_echo "#define EXT_LOOKUP 1" >>confdefs.h # Check for LDAP and LDAP version for ac_header in lber.h ldap.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test x"$ac_cv_header_ldap_h" = "xyes" -a x"$ac_cv_header_lber_h" = "xyes" then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ber_alloc in -llber" >&5 $as_echo_n "checking for ber_alloc in -llber... " >&6; } if ${ac_cv_lib_lber_ber_alloc+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llber $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ber_alloc (); int main () { return ber_alloc (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lber_ber_alloc=yes else ac_cv_lib_lber_ber_alloc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lber_ber_alloc" >&5 $as_echo "$ac_cv_lib_lber_ber_alloc" >&6; } if test "x$ac_cv_lib_lber_ber_alloc" = xyes; then : $as_echo "#define HAVE_LIBLBER 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -lldap" >&5 $as_echo_n "checking for ldap_init in -lldap... " >&6; } if ${ac_cv_lib_ldap_ldap_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ldap_init (); int main () { return ldap_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ldap_ldap_init=yes else ac_cv_lib_ldap_ldap_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_init" >&5 $as_echo "$ac_cv_lib_ldap_ldap_init" >&6; } if test "x$ac_cv_lib_ldap_ldap_init" = xyes; then : $as_echo "#define HAVE_LIBLDAP 1" >>confdefs.h fi fi if test x"$ac_cv_lib_lber_ber_alloc" = "xyes" -a x"$ac_cv_lib_ldap_ldap_init" = "xyes" then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenLDAP version >= 2.2.0" >&5 $as_echo_n "checking for OpenLDAP version >= 2.2.0... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { LDAPAPIInfo info; #ifdef LDAP_API_INFO_VERSION info.ldapai_info_version = LDAP_API_INFO_VERSION; #else info.ldapai_info_version = 1; #endif if(ldap_get_option(NULL, LDAP_OPT_API_INFO, &info) != LDAP_SUCCESS) return 1; if(info.ldapai_vendor_version != LDAP_VENDOR_VERSION || LDAP_VENDOR_VERSION < 20204) return 1; return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_ldap_version=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_ldap_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable LDAP support in external lookup" >&5 $as_echo_n "checking whether to enable LDAP support in external lookup... " >&6; } if test x"$have_ldap_version" != "xyes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } external_lookup_libs="-lldap -llber" $as_echo "#define USE_LDAP 1" >>confdefs.h fi fi # # DSPAM_HOME -- directory where pre-user dictionaries, signatures, # etc. should be stored. # # This variable is AC_SUBST'ed, not AC_DEFINE'd because used not only # for C-code, but for Makefile rules also. # ### dspam_home='$(prefix)/var/dspam' dspam_home='$(prefix)/var/dspam' # Check whether --with-dspam_home was given. if test "${with_dspam_home+set}" = set; then : withval=$with_dspam_home; dspam_home="$withval" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dspam_home" >&5 $as_echo_n "checking for dspam_home... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dspam_home" >&5 $as_echo "$dspam_home" >&6; } if test -d /var/dspam then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the default location for dspam_home has changed. please be sure to update your configuration or filesystem to reflect this." >&5 $as_echo "$as_me: WARNING: the default location for dspam_home has changed. please be sure to update your configuration or filesystem to reflect this." >&2;} fi # DSPAM_HOME ownership # Check whether --with-dspam_home_mode was given. if test "${with_dspam_home_mode+set}" = set; then : withval=$with_dspam_home_mode; dspam_home_mode="$withval" else dspam_home_mode='770' fi # Check whether --with-dspam_home_owner was given. if test "${with_dspam_home_owner+set}" = set; then : withval=$with_dspam_home_owner; dspam_home_owner="$withval" else dspam_home_owner='root' fi # Check whether --with-dspam_home_group was given. if test "${with_dspam_home_group+set}" = set; then : withval=$with_dspam_home_group; dspam_home_group="$withval" else dspam_home_group='mail' fi # Check whether --with-logfile was given. if test "${with_logfile+set}" = set; then : withval=$with_logfile; cat >>confdefs.h <<_ACEOF #define LOGFILE "$withval" _ACEOF else logfile='' fi # dspam binary ownership case x"$host" in *-freebsd*) default_dspam_mode=4510;; *) default_dspam_mode=2510;; esac case "$host" in *-linux*) LDFLAGS="$LDFLAGS -rdynamic";; *-freebsd*) LDFLAGS="$LDFLAGS -rdynamic";; esac # Check whether --with-dspam_mode was given. if test "${with_dspam_mode+set}" = set; then : withval=$with_dspam_mode; dspam_mode="$withval" else dspam_mode="$default_dspam_mode" fi # Check whether --with-dspam_owner was given. if test "${with_dspam_owner+set}" = set; then : withval=$with_dspam_owner; dspam_owner="$withval" else dspam_owner='root' fi # Check whether --with-dspam_group was given. if test "${with_dspam_group+set}" = set; then : withval=$with_dspam_group; dspam_group="$withval" else dspam_group='mail' fi # # Local delivery Agent # { $as_echo "$as_me:${as_lineno-$LINENO}: checking which delivery agent to activate in dspam.conf" >&5 $as_echo_n "checking which delivery agent to activate in dspam.conf... " >&6; } default_delivery_agent="/usr/bin/procmail" case "$host" in *-linux*) default_delivery_agent="/usr/bin/procmail";; *-freebsd*) default_delivery_agent="/usr/libexec/mail.local";; *-solaris2*) default_delivery_agent="/usr/bin/mail";; *-cygwin*) default_delivery_agent="/usr/bin/procmail";; esac # Check whether --with-delivery_agent was given. if test "${with_delivery_agent+set}" = set; then : withval=$with_delivery_agent; delivery_agent="$withval" else delivery_agent="$default_delivery_agent" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $delivery_agent" >&5 $as_echo "$delivery_agent" >&6; } # # Trusted User Security # # Check whether --enable-trusted_user_security was given. if test "${enable_trusted_user_security+set}" = set; then : enableval=$enable_trusted_user_security; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable trusted user security" >&5 $as_echo_n "checking whether to enable trusted user security... " >&6; } case x"$enable_trusted_user_security" in xyes) # trusted user security enabled explicity ;; xno) # trusted user security disabled explicity enable_trusted_user_security=no ;; x) # trusted user security enabled by default enable_trusted_user_security=yes ;; *) as_fn_error $? "unexpected value $enable_trusted_user_security for --{enable,disable}-trusted-user-security configure option" "$LINENO" 5 ;; esac if test x"$enable_trusted_user_security" != xyes then enable_trusted_user_security=no else enable_trusted_user_security=yes # overkill, but convenient $as_echo "#define TRUSTED_USER_SECURITY 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_trusted_user_security" >&5 $as_echo "$enable_trusted_user_security" >&6; } # # Clam/AV Support # # Check whether --enable-clamav was given. if test "${enable_clamav+set}" = set; then : enableval=$enable_clamav; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable clamav" >&5 $as_echo_n "checking whether to enable clamav... " >&6; } case x"$enable_clamav" in xyes) # clamav output enabled explicity ;; xno) # clamav output disabled explicity ;; x) # clamav output disabled by default enable_clamav=no ;; *) as_fn_error $? "unexpected value $enable_clamav for --{enable,disable}-clamav configure option" "$LINENO" 5 ;; esac if test x"$enable_clamav" != xyes then enable_clamav=no else enable_clamav=yes # overkill, but convenient $as_echo "#define CLAMAV 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_clamav" >&5 $as_echo "$enable_clamav" >&6; } # # Debug support # # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debug output" >&5 $as_echo_n "checking whether to enable debug output... " >&6; } case x"$enable_debug" in xyes) # debug output enabled explicity ;; xno) # debug output disabled explicity ;; x) # debug output disabled by default enable_debug=no ;; *) as_fn_error $? "unexpected value $enable_debug for --{enable,disable}-debug configure option" "$LINENO" 5 ;; esac if test x"$enable_debug" != xyes then enable_debug=no else enable_debug=yes # overkill, but convenient $as_echo "#define DEBUG 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_debug" >&5 $as_echo "$enable_debug" >&6; } # # Enable syslog # # Check whether --enable-syslog was given. if test "${enable_syslog+set}" = set; then : enableval=$enable_syslog; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable syslog output" >&5 $as_echo_n "checking whether to enable syslog output... " >&6; } case x"$enable_syslog" in xyes) # enabled explicity ;; xno) # disabled explicity ;; x) # enabled by default enable_syslog=yes ;; *) as_fn_error $? "unexpected value $enable_syslog for --{enable,disable}-syslog configure option" "$LINENO" 5 ;; esac if test x"$enable_syslog" != xyes then enable_syslog=no else enable_syslog=yes # overkill, but convenient $as_echo "#define USE_SYSLOG 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_syslog" >&5 $as_echo "$enable_syslog" >&6; } # # BNR Debug # # Check whether --enable-bnr-debug was given. if test "${enable_bnr_debug+set}" = set; then : enableval=$enable_bnr_debug; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debug output for BNR" >&5 $as_echo_n "checking whether to enable debug output for BNR... " >&6; } case x"$enable_bnr_debug" in xyes) # enabled explicity ;; xno) # disabled explicity ;; x) # disabled by default enable_bnr_debug=no ;; *) as_fn_error $? "unexpected value $enable_bnr_debug for --{enable,disable}-bnr-debug configure option" "$LINENO" 5 ;; esac if test x"$enable_bnr_debug" != xyes then enable_bnr_debug=no else enable_bnr_debug=yes # overkill, but convenient $as_echo "#define LIBBNR_DEBUG 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_bnr_debug" >&5 $as_echo "$enable_bnr_debug" >&6; } # # Homedir support # # Check whether --enable-homedir was given. if test "${enable_homedir+set}" = set; then : enableval=$enable_homedir; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable home directory support" >&5 $as_echo_n "checking whether to enable home directory support... " >&6; } case x"$enable_homedir" in xyes) # homedir enabled explicity ;; xno) # homedir disabled explicity ;; x) # homedir disabled by default enable_homedir=no ;; *) as_fn_error $? "unexpected value $enable_homedir for --{enable,disable}-homedir configure option" "$LINENO" 5 ;; esac if test x"$enable_homedir" != xyes then enable_homedir=no else enable_homedir=yes # overkill, but convenient $as_echo "#define HOMEDIR 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_homedir" >&5 $as_echo "$enable_homedir" >&6; } # # MySQL4 Initialization # # Check whether --enable-mysql4-initialization was given. if test "${enable_mysql4_initialization+set}" = set; then : enableval=$enable_mysql4_initialization; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable MySQL client initialization" >&5 $as_echo_n "checking whether to enable MySQL client initialization... " >&6; } case x"$enable_mysql4_initialization" in xyes) # enabled explicity enable_mysql4_initialization=yes ;; xno) # disabled explicity enable_mysql4_initialization=no ;; x) # disabled by default enable_mysql4_initialization=yes ;; *) as_fn_error $? "unexpected value $enable_mysql4_initialization for --{enable,disable}-mysql4-initialization configure option" "$LINENO" 5 ;; esac if test x"$enable_mysql4_initialization" != xyes then enable_mysql4_initialization=no else enable_mysql4_initialization=yes # overkill, but convenient $as_echo "#define MYSQL4_INITIALIZATION 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_mysql4_initialization" >&5 $as_echo "$enable_mysql4_initialization" >&6; } # # Preferences Extension # For storage drivers with preferences extension, the driver's extension is # used instead of the built-in file-based function # # Check whether --enable-preferences-extension was given. if test "${enable_preferences_extension+set}" = set; then : enableval=$enable_preferences_extension; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable preferences-extension" >&5 $as_echo_n "checking whether to enable preferences-extension... " >&6; } case x"$enable_preferences_extension" in xyes) # enabled explicity ;; xno) # disabled explicity ;; x) # disabled by default enable_preferences_extension=no ;; *) as_fn_error $? "unexpected value $enable_preferences_extension for --{enable,disable}-preferences-extension configure option" "$LINENO" 5 ;; esac if test x"$enable_preferences_extension" != xyes then enable_preferences_extension=no else enable_preferences_extension=yes # overkill, but convenient $as_echo "#define PREFERENCES_EXTENSION 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_preferences_extension" >&5 $as_echo "$enable_preferences_extension" >&6; } # # Verbose debug output # # Check whether --enable-verbose-debug was given. if test "${enable_verbose_debug+set}" = set; then : enableval=$enable_verbose_debug; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable verbose debug output" >&5 $as_echo_n "checking whether to enable verbose debug output... " >&6; } case x"$enable_verbose_debug" in xyes) # debug output enabled explicity ;; xno) # debug output disabled explicity ;; x) # debug output disabled by default enable_verbose_debug=no ;; *) as_fn_error $? "unexpected value $enable_verbose_debug for --{enable,disable}-verbose-debug configure option" "$LINENO" 5 ;; esac if test x"$enable_verbose_debug" != xyes then enable_verbose_debug=no else enable_verbose_debug=yes # overkill, but convenient $as_echo "#define DEBUG 1" >>confdefs.h $as_echo "#define VERBOSE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_verbose_debug" >&5 $as_echo "$enable_verbose_debug" >&6; } # # Long Usernames # # Check whether --enable-long-usernames was given. if test "${enable_long_usernames+set}" = set; then : enableval=$enable_long_usernames; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable long usernames" >&5 $as_echo_n "checking whether to enable long usernames... " >&6; } case x"$enable_long_usernames" in xyes) # debug output enabled explicity ;; xno) # debug output disabled explicity ;; x) # debug output disabled by default enable_long_usernames=no ;; *) as_fn_error $? "unexpected value $enable_long_usernames for --{enable,disable}-long-usernames configure option" "$LINENO" 5 ;; esac if test x"$enable_long_usernames" != xyes then enable_long_usernames=no else enable_long_usernames=yes # overkill, but convenient $as_echo "#define LONG_USERNAMES 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_long_usernames" >&5 $as_echo "$enable_long_usernames" >&6; } # # Large scale implementation # # Check whether --enable-large-scale was given. if test "${enable_large_scale+set}" = set; then : enableval=$enable_large_scale; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large scale implementation" >&5 $as_echo_n "checking whether to enable large scale implementation... " >&6; } case x"$enable_large_scale" in xyes) # large-scale enabled explicitly ;; xno) # large-scale disabled explicitly ;; x) # large-scale disabled by default enable_large_scale=no ;; *) as_fn_error $? "unexpected value $enable_large_scale for --{enable,disable}-large-scale configure option" "$LINENO" 5 ;; esac if test x"$enable_large_scale" != xyes then enable_large_scale=no else enable_large_scale=yes # overkill, but convenient $as_echo "#define LARGESCALE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_large_scale" >&5 $as_echo "$enable_large_scale" >&6; } # # Domain Scale Filesystem # # Check whether --enable-domain-scale was given. if test "${enable_domain_scale+set}" = set; then : enableval=$enable_domain_scale; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable domain structure implementation" >&5 $as_echo_n "checking whether to enable domain structure implementation... " >&6; } case x"$enable_domain_scale" in xyes) # domain-scale enabled explicitly ;; xno) # domain-scale disabled explicitly ;; x) # domain-scale disabled by default enable_domain_scale=no ;; *) as_fn_error $? "unexpected value $enable_domain_scale for --{enable,disable}-domain-scale configure option" "$LINENO" 5 ;; esac if test x"$enable_domain_scale" != xyes then enable_domain_scale=no else enable_domain_scale=yes # overkill, but convenient $as_echo "#define DOMAINSCALE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_domain_scale" >&5 $as_echo "$enable_domain_scale" >&6; } if test x"$enable_domain_scale$enable_large_scale" = xyesyes then as_fn_error $? "you may not have domain-scale and large-scale implemented simultaneously" "$LINENO" 5 elif test x"$enable_domain_scale$enable_homedir" = xyesyes then as_fn_error $? "you may not have domain-scale and homedir implemented simultaneously" "$LINENO" 5 elif test x"$enable_large_scale$enable_homedir" = xyesyes then as_fn_error $? "you may not have large-scale and homedir implemented simultaneously" "$LINENO" 5 fi # # Log Directory # logdir="$dspam_home/log" # Check whether --with-logdir was given. if test "${with_logdir+set}" = set; then : withval=$with_logdir; logdir="$withval" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for logdir" >&5 $as_echo_n "checking for logdir... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $logdir" >&5 $as_echo "$logdir" >&6; } #--------------------------------------------------------- # storage driver selection storagedrv=hash_drv storage_drv_subdirs="" active_driver="" static_driver=yes # Check whether --with-storage-driver was given. if test "${with_storage_driver+set}" = set; then : withval=$with_storage_driver; storagedrv="$withval" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking which storage drivers to build" >&5 $as_echo_n "checking which storage drivers to build... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $storagedrv" >&5 $as_echo "$storagedrv" >&6; } #--------------------------------------------------------- # Libraries for storage drivers # ac_save_IFS=$IFS; IFS=, for drv in $storagedrv; do IFS=$ac_save_IFS if test x"$active_driver" = x then active_driver=$drv else static_driver=no fi if test x"$drv" = xhash_drv then hash_drv=yes storage_drv_subdirs="$storage_drv_subdirs tools.hash_drv" fi if test x"$drv" = xmysql_drv then mysql_save_CPPFLAGS="$CPPFLAGS" mysql_save_LDFLAGS="$LDFLAGS" mysql_save_LIBS="$LIBS" mysql_CPPFLAGS='' mysql_LIBS='' mysql_success=yes mysql_headers_save_CPPFLAGS="$CPPFLAGS" mysql_headers_CPPFLAGS='' mysql_headers_success=yes # # virtual users # # Check whether --enable-virtual-users was given. if test "${enable_virtual_users+set}" = set; then : enableval=$enable_virtual_users; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable virtual users" >&5 $as_echo_n "checking whether to enable virtual users... " >&6; } case x"$enable_virtual_users" in xyes) # enabled explicity ;; xno) # disabled explicity ;; x) # disabled by default enable_virtual_users=no ;; *) as_fn_error $? "unexpected value $enable_virtual_users for --{enable,disable}-virtual-users configure option" "$LINENO" 5 ;; esac if test x"$enable_virtual_users" != xyes then enable_virtual_users=no else enable_virtual_users=yes # overkill, but convenient $as_echo "#define VIRTUAL_USERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_virtual_users" >&5 $as_echo "$enable_virtual_users" >&6; } # Check whether --with-mysql-includes was given. if test "${with_mysql_includes+set}" = set; then : withval=$with_mysql_includes; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find MySQL headers" >&5 $as_echo_n "checking where to find MySQL headers... " >&6; } if test x"$with_mysql_includes" = x then { $as_echo "$as_me:${as_lineno-$LINENO}: result: compiler default paths" >&5 $as_echo "compiler default paths" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mysql_includes" >&5 $as_echo "$with_mysql_includes" >&6; } if test -d "$with_mysql_includes" then : else as_fn_error $? "required include path for mysql headers $with_mysql_includes is not a directory" "$LINENO" 5 fi mysql_headers_CPPFLAGS="-I$with_mysql_includes" CPPFLAGS="$mysql_headers_CPPFLAGS $CPPFLAGS" fi for ac_header in mysql.h mysqld_error.h errmsg.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else mysql_headers_success=no fi done if test x"$mysql_headers_success" = xyes then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #if defined(PROTOCOL_VERSION) && defined(ER_LOCK_DEADLOCK) && defined(ER_LOCK_WAIT_TIMEOUT) && defined(ER_LOCK_OR_ACTIVE_TRANSACTION) && defined(CR_ERROR_FIRST) /* Success */ #else #error Unsupported version of MySQL #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Unsupported version of MySQL (no PROTOCOL_VERSION or ER_LOCK_DEADLOCK or ER_LOCK_WAIT_TIMEOUT or ER_LOCK_OR_ACTIVE_TRANSACTION or CR_ERROR_FIRST defined) See \`config.log' for more details" "$LINENO" 5; } mysql_headers_success=no fi rm -f conftest.err conftest.i conftest.$ac_ext fi CPPFLAGS="$mysql_headers_save_CPPFLAGS" if test x"$mysql_headers_success" = xyes then mysql_CPPFLAGS="$mysql_headers_CPPFLAGS" : else mysql_success=no fi if test x"$mysql_success" = xyes then CPPFLAGS="$mysql_CPPFLAGS $CPPFLAGS" mysql_libs_save_LDFLAGS="$LDFLAGS" mysql_libs_save_LIBS="$LIBS" mysql_libs_LDFLAGS='' mysql_libs_LIBS='' mysql_libs_success=no mysql_libs_netlibs='' success=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gzopen" >&5 $as_echo_n "checking for library containing gzopen... " >&6; } if ${ac_cv_search_gzopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gzopen (); int main () { return gzopen (); ; return 0; } _ACEOF for ac_lib in '' z; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_gzopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_gzopen+:} false; then : break fi done if ${ac_cv_search_gzopen+:} false; then : else ac_cv_search_gzopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gzopen" >&5 $as_echo "$ac_cv_search_gzopen" >&6; } ac_res=$ac_cv_search_gzopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" success=yes else success=no fi if test x"$success" = xno then as_fn_error $? "zlib required for mysql_drv" "$LINENO" 5 fi # Check whether --with-mysql-libraries was given. if test "${with_mysql_libraries+set}" = set; then : withval=$with_mysql_libraries; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find MySQL libraries" >&5 $as_echo_n "checking where to find MySQL libraries... " >&6; } if test x"$with_mysql_libraries" = x then { $as_echo "$as_me:${as_lineno-$LINENO}: result: compiler default paths" >&5 $as_echo "compiler default paths" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mysql_libraries" >&5 $as_echo "$with_mysql_libraries" >&6; } if test -d "$with_mysql_libraries" then : else as_fn_error $? "required path for mysql libraries ($with_mysql_libraries) is not a directory" "$LINENO" 5 fi mysql_libs_LDFLAGS="-L$with_mysql_libraries" fi ds_netlibs_save_LIBS="$LIBS" LIBS='' ds_netlibs_success=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntoa" >&5 $as_echo_n "checking for library containing inet_ntoa... " >&6; } if ${ac_cv_search_inet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntoa (); int main () { return inet_ntoa (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_inet_ntoa=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_inet_ntoa+:} false; then : break fi done if ${ac_cv_search_inet_ntoa+:} false; then : else ac_cv_search_inet_ntoa=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntoa" >&5 $as_echo "$ac_cv_search_inet_ntoa" >&6; } ac_res=$ac_cv_search_inet_ntoa if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ds_netlibs_success=yes else ds_netlibs_success=no fi if test x"$ds_netlibs_success" = xyes then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_socket+:} false; then : break fi done if ${ac_cv_search_socket+:} false; then : else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ds_netlibs_success=yes else ds_netlibs_success=no fi fi ds_netlibs_netlibs="$LIBS" LIBS="$ds_netlibs_save_LIBS" if test x"$ds_netlibs_success" = xyes then mysql_libs_netlibs="$ds_netlibs_netlibs" mysql_libs_success=yes else mysql_libs_success=no fi if test x"$mysql_libs_success" = xyes then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5 $as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; } mysql_libs_LIBS="-lmysqlclient $mysql_libs_netlibs" LIBS="$mysql_libs_LIBS $mysql_libs_save_LIBS" LDFLAGS="$mysql_libs_LDFLAGS $mysql_libs_save_LDFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { MYSQL *mysql = mysql_init(NULL); mysql_close(mysql); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : mysql_libs_success=yes else mysql_libs_success=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mysql_libs_success" >&5 $as_echo "$mysql_libs_success" >&6; } if test x"$mysql_libs_success" = xyes then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MySQL client version >= 5.0.0" >&5 $as_echo_n "checking for MySQL client version >= 5.0.0... " >&6; } if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { int is_ok = 0; const char *info = mysql_get_client_info(); char *i = strdup(info); char *m = strtok(i, "."); if (m) if (atoi(m) >= 5) is_ok = 1; free (i); return is_ok ? 0 : 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } mysql_libs_success=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi LIBS="$mysql_libs_save_LIBS" LDFLAGS="$mysql_libs_save_LDFLAGS" if test x"$mysql_libs_success" = xyes then mysql_LDFLAGS="$mysql_libs_LDFLAGS" mysql_LIBS="$mysql_libs_LIBS" : else mysql_success=no fi fi CPPFLAGS="$mysql_save_CPPFLAGS" LDFLAGS="$mysql_save_LDFLAGS" LIBS="$mysql_save_LIBS" if test x"$mysql_success" = xyes then MYSQL_CPPFLAGS="$mysql_CPPFLAGS" MYSQL_LDFLAGS="$mysql_LDFLAGS" MYSQL_LIBS="$mysql_LIBS" success=yes else success=no fi if test x"$success" != xyes then as_fn_error $? "Required version of libmysqlclient not found" "$LINENO" 5 fi libmysql_drv_cppflags="$MYSQL_CPPFLAGS $CPPFLAGS" libmysql_drv_libs="$MYSQL_LIBS $LIBS" libmysql_drv_ldflags="$MYSQL_LDFLAGS $LDFLAGS" mysql_drv=yes storage_drv_subdirs="$storage_drv_subdirs tools.mysql_drv" fi if test x"$drv" = xpgsql_drv then pgsql_save_CPPFLAGS="$CPPFLAGS" pgsql_save_LDFLAGS="$LDFLAGS" pgsql_save_LIBS="$LIBS" pgsql_CPPFLAGS='' pgsql_LIBS='' pgsql_success=yes pgsql_headers_save_CPPFLAGS="$CPPFLAGS" pgsql_headers_CPPFLAGS='' pgsql_headers_success=yes # # virtual users # # Check whether --enable-virtual-users was given. if test "${enable_virtual_users+set}" = set; then : enableval=$enable_virtual_users; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable virtual users" >&5 $as_echo_n "checking whether to enable virtual users... " >&6; } case x"$enable_virtual_users" in xyes) # enabled explicity ;; xno) # disabled explicity ;; x) # disabled by default enable_virtual_users=no ;; *) as_fn_error $? "unexpected value $enable_virtual_users for --{enable,disable}-virtual-users configure option" "$LINENO" 5 ;; esac if test x"$enable_virtual_users" != xyes then enable_virtual_users=no else enable_virtual_users=yes # overkill, but convenient $as_echo "#define VIRTUAL_USERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_virtual_users" >&5 $as_echo "$enable_virtual_users" >&6; } # Check whether --with-pgsql-includes was given. if test "${with_pgsql_includes+set}" = set; then : withval=$with_pgsql_includes; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find PostgreSQL headers" >&5 $as_echo_n "checking where to find PostgreSQL headers... " >&6; } if test x"$with_pgsql_includes" = x then { $as_echo "$as_me:${as_lineno-$LINENO}: result: compiler default paths" >&5 $as_echo "compiler default paths" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pgsql_includes" >&5 $as_echo "$with_pgsql_includes" >&6; } if test -d "$with_pgsql_includes" then : else as_fn_error $? "required include path for libpq headers $with_pgsql_includes is not a directory" "$LINENO" 5 fi pgsql_headers_CPPFLAGS="-I$with_pgsql_includes" CPPFLAGS="$pgsql_headers_CPPFLAGS $CPPFLAGS" fi ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default" if test "x$ac_cv_header_libpq_fe_h" = xyes; then : else pgsql_headers_success=no fi if test x"$pgsql_headers_success" = xyes then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef LIBPQ_FE_H /* Success */ #else #error Unsupported version of PgSQL #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Unsupported version of PostgreSQL (no LIBPQ_FE_H defined) See \`config.log' for more details" "$LINENO" 5; } pgsql_headers_success=no fi rm -f conftest.err conftest.i conftest.$ac_ext fi CPPFLAGS="$pgsql_headers_save_CPPFLAGS" if test x"$pgsql_headers_success" = xyes then pgsql_CPPFLAGS="$pgsql_headers_CPPFLAGS" : else pgsql_success=no fi if test x"$pgsql_success" = xyes then CPPFLAGS="$pgsql_CPPFLAGS $CPPFLAGS" pgsql_libs_save_LDFLAGS="$LDFLAGS" pgsql_libs_save_LIBS="$LIBS" pgsql_libs_LDFLAGS='' pgsql_libs_LIBS='' pgsql_libs_success=no pgsql_freemem_success=no pgsql_libs_netlibs='' pgsql_version_success=no pgsql_version_major='' pgsql_version_minor='' pgsql_version_micro='' pgsql_version_number='' pgsql_version_req_major=8 pgsql_version_req_minor=1 pgsql_version_req_micro=0 pgsql_version_req_number='' # Check whether --with-pgsql-libraries was given. if test "${with_pgsql_libraries+set}" = set; then : withval=$with_pgsql_libraries; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find PostgreSQL libraries" >&5 $as_echo_n "checking where to find PostgreSQL libraries... " >&6; } if test x"$with_pgsql_libraries" = x then { $as_echo "$as_me:${as_lineno-$LINENO}: result: compiler default paths" >&5 $as_echo "compiler default paths" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pgsql_libraries" >&5 $as_echo "$with_pgsql_libraries" >&6; } if test -d "$with_pgsql_libraries" then : else as_fn_error $? "required path for libpq libraries ($with_pgsql_libraries) is not a directory" "$LINENO" 5 fi pgsql_libs_LDFLAGS="-L$with_pgsql_libraries" fi ds_netlibs_save_LIBS="$LIBS" LIBS='' ds_netlibs_success=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntoa" >&5 $as_echo_n "checking for library containing inet_ntoa... " >&6; } if ${ac_cv_search_inet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntoa (); int main () { return inet_ntoa (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_inet_ntoa=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_inet_ntoa+:} false; then : break fi done if ${ac_cv_search_inet_ntoa+:} false; then : else ac_cv_search_inet_ntoa=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntoa" >&5 $as_echo "$ac_cv_search_inet_ntoa" >&6; } ac_res=$ac_cv_search_inet_ntoa if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ds_netlibs_success=yes else ds_netlibs_success=no fi if test x"$ds_netlibs_success" = xyes then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_socket+:} false; then : break fi done if ${ac_cv_search_socket+:} false; then : else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ds_netlibs_success=yes else ds_netlibs_success=no fi fi ds_netlibs_netlibs="$LIBS" LIBS="$ds_netlibs_save_LIBS" if test x"$ds_netlibs_success" = xyes then pgsql_libs_netlibs="$ds_netlibs_netlibs" pgsql_libs_success=yes else pgsql_libs_success=no fi if test x"$pgsql_libs_success" = xyes then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQconnectdb in libpq" >&5 $as_echo_n "checking for PQconnectdb in libpq... " >&6; } pgsql_libs_LIBS="-lpq $pgsql_libs_netlibs" LIBS="$pgsql_libs_LIBS $pgsql_libs_save_LIBS" LDFLAGS="$pgsql_libs_LDFLAGS $pgsql_libs_save_LDFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { PGconn *pgsql = PQconnectdb(NULL); PQfinish(pgsql); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : pgsql_libs_success=yes else pgsql_libs_success=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgsql_libs_success" >&5 $as_echo "$pgsql_libs_success" >&6; } fi if test x"$pgsql_libs_success" = xyes then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if this version of Postgres supports PQfreemem" >&5 $as_echo_n "checking if this version of Postgres supports PQfreemem... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { PQfreemem(NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : pgsql_freemem_success=yes else pgsql_freemem_success=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgsql_freemem_success" >&5 $as_echo "$pgsql_freemem_success" >&6; } fi if test x"$pgsql_freemem_success" = xyes then $as_echo "#define HAVE_PQFREEMEM 1" >>confdefs.h fi if test x"$pgsql_libs_success" = xyes then # Extract the first word of "pg_config", so it can be a program name with args. set dummy pg_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_pgsql_pg_config+:} false; then : $as_echo_n "(cached) " >&6 else case $pgsql_pg_config in [\\/]* | ?:[\\/]*) ac_cv_path_pgsql_pg_config="$pgsql_pg_config" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_pgsql_pg_config="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi pgsql_pg_config=$ac_cv_path_pgsql_pg_config if test -n "$pgsql_pg_config"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgsql_pg_config" >&5 $as_echo "$pgsql_pg_config" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test ! -x "$pgsql_pg_config" then pgsql_pg_config="no" as_fn_error $? "$pgsql_pg_config does not exist or it is not an exectuable file" "$LINENO" 5 fi if test x"$pgsql_pg_config" != xno then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PostgreSQL client version >= $pgsql_version_req_major.$pgsql_version_req_minor.$pgsql_version_req_micro" >&5 $as_echo_n "checking for PostgreSQL client version >= $pgsql_version_req_major.$pgsql_version_req_minor.$pgsql_version_req_micro... " >&6; } pgsql_version_req_number=`expr $pgsql_version_req_major \* 1000000 \ \+ $pgsql_version_req_minor \* 1000 \ \+ $pgsql_version_req_micro` pgsql_version=`$pgsql_pg_config --version | sed -e 's:^PostgreSQL ::'` pgsql_version_major=`expr $pgsql_version : '\([0-9]*\)'` pgsql_version_minor=`expr $pgsql_version : '[0-9]*\.\([0-9]*\)'` pgsql_version_micro=`expr $pgsql_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'` if test "x$pgsql_version_micro" = x then pgsql_version_micro='0' fi pgsql_version_number=`expr $pgsql_version_major \* 1000000 \ \+ $pgsql_version_minor \* 1000 \ \+ $pgsql_version_micro` pgsql_version_success=`expr $pgsql_version_number \>\= $pgsql_version_req_number` if test x"$pgsql_version_success" = x1 then pgsql_version_success='yes' { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else pgsql_version_success='no' { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test x"$pgsql_version_success" = xno then pgsql_libs_success=no fi LIBS="$pgsql_libs_save_LIBS" LDFLAGS="$pgsql_libs_save_LDFLAGS" if test x"$pgsql_libs_success" = xyes then pgsql_LDFLAGS="$pgsql_libs_LDFLAGS" pgsql_LIBS="$pgsql_libs_LIBS" : else pgsql_success=no fi fi CPPFLAGS="$pgsql_save_CPPFLAGS" LDFLAGS="$pgsql_save_LDFLAGS" LIBS="$pgsql_save_LIBS" if test x"$pgsql_success" = xyes then PGSQL_CPPFLAGS="$pgsql_CPPFLAGS" PGSQL_LDFLAGS="$pgsql_LDFLAGS" PGSQL_LIBS="$pgsql_LIBS" success=yes else success=no fi if test x"$success" != xyes then as_fn_error $? "Required version of libpq not found" "$LINENO" 5 fi libpgsql_drv_cppflags="$PGSQL_CPPFLAGS $CPPFLAGS" libpgsql_drv_libs="$PGSQL_LIBS $LIBS" libpgsql_drv_ldflags="$PGSQL_LDFLAGS $LDFLAGS" pgsql_drv=yes storage_drv_subdirs="$storage_drv_subdirs tools.pgsql_drv" fi if test x"$drv" = xsqlite_drv then ds_sqlite_save_CPPFLAGS="$CPPFLAGS" ds_sqlite_save_LIBS="$LIBS" ds_sqlite_save_LDFLAGS="$LDFLAGS" ds_sqlite_CPPFLAGS='' ds_sqlite_LIBS='' ds_sqlite_LDFLAGS='' ds_sqlite_success=yes ds_sqlite_version_major='' ds_sqlite_version_minor='' ds_sqlite_version_patchlevel='' ds_sqlite_headers_save_CPPFLAGS="$CPPFLAGS" ds_sqlite_headers_CPPFLAGS='' ds_sqlite_headers_success=yes ds_sqlite_headers_version_major='' ds_sqlite_headers_version_minor='' ds_sqlite_headers_version_patchlevel='' # unistd.h and errno.h are needed for header version check below. for ac_header in unistd.h errno.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Check whether --with-sqlite-includes was given. if test "${with_sqlite_includes+set}" = set; then : withval=$with_sqlite_includes; fi if test x"$with_sqlite_includes" != x then if test -d "$with_sqlite_includes" then : else as_fn_error $? "required include path for sqlite headers ($with_sqlite_includes) is not a directory" "$LINENO" 5 fi ds_sqlite_headers_CPPFLAGS="-I$with_sqlite_includes" CPPFLAGS="$ds_sqlite_headers_CPPFLAGS $CPPFLAGS" fi ac_fn_c_check_header_mongrel "$LINENO" "sqlite.h" "ac_cv_header_sqlite_h" "$ac_includes_default" if test "x$ac_cv_header_sqlite_h" = xyes; then : else ds_sqlite_headers_success=no fi if test x"$ds_sqlite_headers_success" = xyes then # Determine SQLite hearder version ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking SQLite header version" >&5 $as_echo_n "checking SQLite header version... " >&6; } if test "$cross_compiling" = yes; then : # cross-compilation as_fn_error $? "cross-compilation is unsupported, sorry" "$LINENO" 5 ds_sqlite_headers_success=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #ifdef HAVE_UNISTD_H # include #endif #ifdef HAVE_ERRNO_H # include #endif #define OUTFILE "conftest.libsqlitever" int main(void) { FILE* fd; int rc; rc = unlink(OUTFILE); /* avoid symlink attack */ if (rc < 0 && errno != ENOENT) { fprintf(stderr, "error unlinking '%s'", OUTFILE); exit(1); } fd = fopen(OUTFILE, "w"); if (!fd) { /* Don't try to investigate errno for portability reasons */ fprintf(stderr, "error opening '%s' for writing", OUTFILE); exit(1); } rc = fprintf(fd, "%s", SQLITE_VERSION); if (rc < 0) { fprintf(stderr, "error writing to the '%s'", OUTFILE); exit(1); } exit(0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ds_sqlite_headers_verstr=`cat conftest.libsqlitever` ds_sqlite_headers_version_major=`cat conftest.libsqlitever | $AWK -F. '{print $1}'` ds_sqlite_headers_version_minor=`cat conftest.libsqlitever | $AWK -F. '{print $2}'` ds_sqlite_headers_version_patchlevel=`cat conftest.libsqlitever | $AWK -F. '{print $3}'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ds_sqlite_headers_version_major.$ds_sqlite_headers_version_minor.$ds_sqlite_headers_version_patchlevel" >&5 $as_echo "$ds_sqlite_headers_version_major.$ds_sqlite_headers_version_minor.$ds_sqlite_headers_version_patchlevel" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: failure (unsupported version?)" >&5 $as_echo "failure (unsupported version?)" >&6; } ds_sqlite_headers_success=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi CPPFLAGS="$ds_sqlite_headers_save_CPPFLAGS" if test x"$ds_sqlite_headers_success" = xyes then ds_sqlite_CPPFLAGS="$ds_sqlite_headers_CPPFLAGS" ds_sqlite_version_major="$ds_sqlite_headers_version_major" ds_sqlite_version_minor="$ds_sqlite_headers_version_minor" ds_sqlite_version_patchlevel="$ds_sqlite_headers_version_patchlevel" : : else ds_sqlite_success=no : fi if test x"$ds_sqlite_success" = xyes then CPPFLAGS="$ds_sqlite_CPPFLAGS $CPPFLAGS" ds_sqlite_libs_save_LIBS="$LIBS" ds_sqlite_libs_save_LDFLAGS="$LDFLAGS" ds_sqlite_libs_LIBS='' ds_sqlite_libs_LDFLAGS='' ds_sqlite_libs_success=no ds_sqlite_libs_ver_major="${ds_sqlite_version_major}" ds_sqlite_libs_ver_minor="${ds_sqlite_version_minor}" if test x"$ds_sqlite_libs_ver_major" = x then as_fn_error $? "DS_SQLITE_LIBS: non-optional argument _ds_sqlite_libs_version_major_in is omited" "$LINENO" 5; fi if test x"$ds_sqlite_libs_ver_minor" = x then as_fn_error $? "DS_SQLITE_LIBS: non-optional argument _ds_sqlite_libs_version_minor_in is omited" "$LINENO" 5; fi # Check whether --with-sqlite-libraries was given. if test "${with_sqlite_libraries+set}" = set; then : withval=$with_sqlite_libraries; fi if test x"$with_sqlite_libraries" != x then if test -d "$with_sqlite_libraries" then : else as_fn_error $? "required path for sqlite libraries ($with_sqlite_libraries) is not a directory" "$LINENO" 5 fi ds_sqlite_libs_LDFLAGS="-L$with_sqlite_libraries" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link SQLite libraries" >&5 $as_echo_n "checking how to link SQLite libraries... " >&6; } for ds_sqlite_libs_tmp_sqlite in \ "-lsqlite" do LDFLAGS="$ds_sqlite_libs_LDFLAGS $ds_sqlite_libs_save_LDFLAGS" for ds_sqlite_libs_tmp_libpth in '' do ds_sqlite_libs_LIBS="$ds_sqlite_libs_tmp_sqlite $ds_sqlite_libs_tmp_libpth" LIBS="$ds_sqlite_libs_LIBS $ds_sqlite_libs_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { const char *v = 0; v = sqlite_version; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ds_sqlite_libs_success=yes else ds_sqlite_libs_success=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test x"$ds_sqlite_libs_success" != xyes then continue fi if test "$cross_compiling" = yes; then : ds_sqlite_libs_success=yes # Assume success for cross-compiling else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { const char *x = sqlite_version; char *y; char header_version[16]; int major, minor, patchlevel; int hmajor, hminor, hpatchlevel; int is_match; strcpy(header_version, x); y = strtok(header_version, "."); major = atoi(y); y = strtok(NULL, "."); minor = atoi(y); y = strtok(NULL, "."); patchlevel = atoi(y); strcpy(header_version, SQLITE_VERSION); y = strtok(header_version, "."); hmajor = atoi(y); y = strtok(NULL, "."); hminor = atoi(y); y = strtok(NULL, "."); hpatchlevel = atoi(y); fprintf(stderr, "sqlite version from header: %d.%d.%d\n", hmajor, hminor, hpatchlevel ); fprintf(stderr, "sqlite version from library: %d.%d.%d\n", major, minor, patchlevel ); if (major == hmajor && minor == hminor && patchlevel == hpatchlevel ) { is_match = 1; } else { is_match = 0; } return is_match ? 0 : 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ds_sqlite_libs_success=yes else ds_sqlite_libs_success=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test x"$ds_sqlite_libs_success" = xyes then break 2 fi done done if test x"$ds_sqlite_libs_success" = xyes then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ds_sqlite_libs_LIBS" >&5 $as_echo "$ds_sqlite_libs_LIBS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: failure" >&5 $as_echo "failure" >&6; } fi LIBS="$ds_sqlite_libs_save_LIBS" LDFLAGS="$ds_sqlite_libs_save_LDFLAGS" if test x"$ds_sqlite_libs_success" = xyes then ds_sqlite_LDFLAGS="$ds_sqlite_libs_LDFLAGS" ds_sqlite_LIBS="$ds_sqlite_libs_LIBS" :; : else ds_sqlite_success=no : fi fi CPPFLAGS="$ds_sqlite_save_CPPFLAGS" LIBS="$ds_sqlite_save_LIBS" LDFLAGS="$ds_sqlite_save_LDFLAGS" if test x"$ds_sqlite_success" = xyes then SQLITE_CPPFLAGS="$ds_sqlite_CPPFLAGS" SQLITE_LDFLAGS="$ds_sqlite_LDFLAGS" SQLITE_LIBS="$ds_sqlite_LIBS" sqlite_version_major="$ds_sqlite_version_major" : : success=yes : else success=no : fi if test x"$success" != xyes then as_fn_error $? "Required version of libsqlite not found" "$LINENO" 5 fi if test x"$sqlite_version_major" != x2 then as_fn_error $? "Version mismatch: sqlite_drv requires libsqlite version 2" "$LINENO" 5 fi libsqlite_drv_cppflags="$SQLITE_CPPFLAGS $CPPFLAGS" libsqlite_drv_libs="$SQLITE_LIBS $LIBS" libsqlite_drv_ldflags="$SQLITE_LDFLAGS $LDFLAGS" sqlite_drv=yes storage_drv_subdirs="$storage_drv_subdirs tools.sqlite_drv" fi if test x"$drv" = xsqlite3_drv then ds_sqlite_save_CPPFLAGS="$CPPFLAGS" ds_sqlite_save_LIBS="$LIBS" ds_sqlite_save_LDFLAGS="$LDFLAGS" ds_sqlite_CPPFLAGS='' ds_sqlite_LIBS='' ds_sqlite_LDFLAGS='' ds_sqlite_success=yes ds_sqlite_version_major='' ds_sqlite_version_minor='' ds_sqlite_version_patchlevel='' ds_sqlite_headers_save_CPPFLAGS="$CPPFLAGS" ds_sqlite_headers_CPPFLAGS='' ds_sqlite_headers_success=yes ds_sqlite_headers_version_major='' ds_sqlite_headers_version_minor='' ds_sqlite_headers_version_patchlevel='' # unistd.h and errno.h are needed for header version check below. for ac_header in unistd.h errno.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Check whether --with-sqlite-includes was given. if test "${with_sqlite_includes+set}" = set; then : withval=$with_sqlite_includes; fi if test x"$with_sqlite_includes" != x then if test -d "$with_sqlite_includes" then : else as_fn_error $? "required include path for sqlite headers ($with_sqlite_includes) is not a directory" "$LINENO" 5 fi ds_sqlite_headers_CPPFLAGS="-I$with_sqlite_includes" CPPFLAGS="$ds_sqlite_headers_CPPFLAGS $CPPFLAGS" fi ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default" if test "x$ac_cv_header_sqlite3_h" = xyes; then : else ds_sqlite_headers_success=no fi if test x"$ds_sqlite_headers_success" = xyes then # Determine SQLite hearder version ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking SQLite header version" >&5 $as_echo_n "checking SQLite header version... " >&6; } if test "$cross_compiling" = yes; then : # cross-compilation as_fn_error $? "cross-compilation is unsupported, sorry" "$LINENO" 5 ds_sqlite_headers_success=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #ifdef HAVE_UNISTD_H # include #endif #ifdef HAVE_ERRNO_H # include #endif #define OUTFILE "conftest.libsqlitever" int main(void) { FILE* fd; int rc; rc = unlink(OUTFILE); /* avoid symlink attack */ if (rc < 0 && errno != ENOENT) { fprintf(stderr, "error unlinking '%s'", OUTFILE); exit(1); } fd = fopen(OUTFILE, "w"); if (!fd) { /* Don't try to investigate errno for portability reasons */ fprintf(stderr, "error opening '%s' for writing", OUTFILE); exit(1); } rc = fprintf(fd, "%s", SQLITE_VERSION); if (rc < 0) { fprintf(stderr, "error writing to the '%s'", OUTFILE); exit(1); } exit(0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ds_sqlite_headers_verstr=`cat conftest.libsqlitever` ds_sqlite_headers_version_major=`cat conftest.libsqlitever | $AWK -F. '{print $1}'` ds_sqlite_headers_version_minor=`cat conftest.libsqlitever | $AWK -F. '{print $2}'` ds_sqlite_headers_version_patchlevel=`cat conftest.libsqlitever | $AWK -F. '{print $3}'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ds_sqlite_headers_version_major.$ds_sqlite_headers_version_minor.$ds_sqlite_headers_version_patchlevel" >&5 $as_echo "$ds_sqlite_headers_version_major.$ds_sqlite_headers_version_minor.$ds_sqlite_headers_version_patchlevel" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: failure (unsupported version?)" >&5 $as_echo "failure (unsupported version?)" >&6; } ds_sqlite_headers_success=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi CPPFLAGS="$ds_sqlite_headers_save_CPPFLAGS" if test x"$ds_sqlite_headers_success" = xyes then ds_sqlite_CPPFLAGS="$ds_sqlite_headers_CPPFLAGS" ds_sqlite_version_major="$ds_sqlite_headers_version_major" ds_sqlite_version_minor="$ds_sqlite_headers_version_minor" ds_sqlite_version_patchlevel="$ds_sqlite_headers_version_patchlevel" : : else ds_sqlite_success=no : fi if test x"$ds_sqlite_success" = xyes then CPPFLAGS="$ds_sqlite_CPPFLAGS $CPPFLAGS" ds_sqlite_libs_save_LIBS="$LIBS" ds_sqlite_libs_save_LDFLAGS="$LDFLAGS" ds_sqlite_libs_LIBS='' ds_sqlite_libs_LDFLAGS='' ds_sqlite_libs_success=no ds_sqlite_libs_ver_major="${ds_sqlite_version_major}" ds_sqlite_libs_ver_minor="${ds_sqlite_version_minor}" if test x"$ds_sqlite_libs_ver_major" = x then as_fn_error $? "DS_SQLITE3_LIBS: non-optional argument _ds_sqlite_libs_version_major_in is omited" "$LINENO" 5; fi if test x"$ds_sqlite_libs_ver_minor" = x then as_fn_error $? "DS_SQLITE3_LIBS: non-optional argument _ds_sqlite_libs_version_minor_in is omited" "$LINENO" 5; fi # Check whether --with-sqlite-libraries was given. if test "${with_sqlite_libraries+set}" = set; then : withval=$with_sqlite_libraries; fi if test x"$with_sqlite_libraries" != x then if test -d "$with_sqlite_libraries" then : else as_fn_error $? "required path for sqlite libraries ($with_sqlite_libraries) is not a directory" "$LINENO" 5 fi ds_sqlite_libs_LDFLAGS="-L$with_sqlite_libraries" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link SQLite libraries" >&5 $as_echo_n "checking how to link SQLite libraries... " >&6; } for ds_sqlite_libs_tmp_sqlite in \ "-lsqlite3" do LDFLAGS="$ds_sqlite_libs_LDFLAGS $ds_sqlite_libs_save_LDFLAGS" for ds_sqlite_libs_tmp_libpth in '' do ds_sqlite_libs_LIBS="$ds_sqlite_libs_tmp_sqlite $ds_sqlite_libs_tmp_libpth" LIBS="$ds_sqlite_libs_LIBS $ds_sqlite_libs_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { const char *v = 0; v = sqlite3_version; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ds_sqlite_libs_success=yes else ds_sqlite_libs_success=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test x"$ds_sqlite_libs_success" != xyes then continue fi if test "$cross_compiling" = yes; then : ds_sqlite_libs_success=yes # Assume success for cross-compiling else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { const char *x = sqlite3_version; char *y; char header_version[16]; int major, minor, patchlevel; int hmajor, hminor, hpatchlevel; int is_match; strcpy(header_version, x); y = strtok(header_version, "."); major = atoi(y); y = strtok(NULL, "."); minor = atoi(y); y = strtok(NULL, "."); patchlevel = atoi(y); strcpy(header_version, SQLITE_VERSION); y = strtok(header_version, "."); hmajor = atoi(y); y = strtok(NULL, "."); hminor = atoi(y); y = strtok(NULL, "."); hpatchlevel = atoi(y); fprintf(stderr, "sqlite version from header: %d.%d.%d\n", hmajor, hminor, hpatchlevel ); fprintf(stderr, "sqlite version from library: %d.%d.%d\n", major, minor, patchlevel ); if (major == hmajor && minor == hminor && patchlevel == hpatchlevel ) { is_match = 1; } else { is_match = 0; } return is_match ? 0 : 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ds_sqlite_libs_success=yes else ds_sqlite_libs_success=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test x"$ds_sqlite_libs_success" = xyes then break 2 fi done done if test x"$ds_sqlite_libs_success" = xyes then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ds_sqlite_libs_LIBS" >&5 $as_echo "$ds_sqlite_libs_LIBS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: failure" >&5 $as_echo "failure" >&6; } fi LIBS="$ds_sqlite_libs_save_LIBS" LDFLAGS="$ds_sqlite_libs_save_LDFLAGS" if test x"$ds_sqlite_libs_success" = xyes then ds_sqlite_LDFLAGS="$ds_sqlite_libs_LDFLAGS" ds_sqlite_LIBS="$ds_sqlite_libs_LIBS" :; : else ds_sqlite_success=no : fi fi CPPFLAGS="$ds_sqlite_save_CPPFLAGS" LIBS="$ds_sqlite_save_LIBS" LDFLAGS="$ds_sqlite_save_LDFLAGS" if test x"$ds_sqlite_success" = xyes then SQLITE3_CPPFLAGS="$ds_sqlite_CPPFLAGS" SQLITE3_LDFLAGS="$ds_sqlite_LDFLAGS" SQLITE3_LIBS="$ds_sqlite_LIBS" sqlite_version_major="$ds_sqlite_version_major" : : success=yes : else success=no : fi if test x"$success" != xyes then as_fn_error $? "Required version of libsqlite not found" "$LINENO" 5 fi if test x"$sqlite_version_major" != x3 then as_fn_error $? "Version mismatch: sqlite3_drv requires libsqlite version 3" "$LINENO" 5 fi libsqlite3_drv_cppflags="$SQLITE3_CPPFLAGS $CPPFLAGS" libsqlite3_drv_libs="$SQLITE3_LIBS $LIBS" libsqlite3_drv_ldflags="$SQLITE3_LDFLAGS $LDFLAGS" sqlite3_drv=yes storage_drv_subdirs="$storage_drv_subdirs tools.sqlite_drv" fi done if test x"$db4_drv" = xyes ; then BUILD_DB4_DRV_TRUE= BUILD_DB4_DRV_FALSE='#' else BUILD_DB4_DRV_TRUE='#' BUILD_DB4_DRV_FALSE= fi if test x"$db3_drv" = xyes ; then BUILD_DB3_DRV_TRUE= BUILD_DB3_DRV_FALSE='#' else BUILD_DB3_DRV_TRUE='#' BUILD_DB3_DRV_FALSE= fi if test x"$hash_drv" = xyes ; then BUILD_HASH_DRV_TRUE= BUILD_HASH_DRV_FALSE='#' else BUILD_HASH_DRV_TRUE='#' BUILD_HASH_DRV_FALSE= fi if test x"$sqlite_drv" = xyes ; then BUILD_SQLITE_DRV_TRUE= BUILD_SQLITE_DRV_FALSE='#' else BUILD_SQLITE_DRV_TRUE='#' BUILD_SQLITE_DRV_FALSE= fi if test x"$sqlite3_drv" = xyes ; then BUILD_SQLITE3_DRV_TRUE= BUILD_SQLITE3_DRV_FALSE='#' else BUILD_SQLITE3_DRV_TRUE='#' BUILD_SQLITE3_DRV_FALSE= fi if test x"$mysql_drv" = xyes ; then BUILD_MYSQL_DRV_TRUE= BUILD_MYSQL_DRV_FALSE='#' else BUILD_MYSQL_DRV_TRUE='#' BUILD_MYSQL_DRV_FALSE= fi if test x"$pgsql_drv" = xyes ; then BUILD_PGSQL_DRV_TRUE= BUILD_PGSQL_DRV_FALSE='#' else BUILD_PGSQL_DRV_TRUE='#' BUILD_PGSQL_DRV_FALSE= fi if test x"$static_driver" = xyes ; then STATIC_DRIVER_TRUE= STATIC_DRIVER_FALSE='#' else STATIC_DRIVER_TRUE='#' STATIC_DRIVER_FALSE= fi if test x"$static_driver" = xno ; then DYNAMIC_DRIVER_TRUE= DYNAMIC_DRIVER_FALSE='#' else DYNAMIC_DRIVER_TRUE='#' DYNAMIC_DRIVER_FALSE= fi if test x"$enable_external_lookup" = xyes ; then BUILD_EXT_LOOKUP_TRUE= BUILD_EXT_LOOKUP_FALSE='#' else BUILD_EXT_LOOKUP_TRUE='#' BUILD_EXT_LOOKUP_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are building a single, static storage driver" >&5 $as_echo_n "checking whether we are building a single, static storage driver... " >&6; } if test x"$static_driver" = xyes then $as_echo "#define STATIC_DRIVER 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CPPFLAGS="$CPPFLAGS $libmysql_drv_cppflags $libpgsql_drv_cppflags $libsqlite_drv_cppflags $libsqlite3_drv_cppflags $libhash_drv_cppflags" LIBS="$LIBS $libmysql_drv_libs $libpgsql_drv_libs $libsqlite_drv_libs $libsqlite3_drv_libs $libhash_drv_libs" LDFLAGS="$LDFLAGS $libmysql_drv_ldflags $libpgsql_drv_ldflags $libsqlite_drv_ldflags $libsqlite3_drv_ldflags $libhash_drv_ldflags" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x"$storage_drv_subdirs" = x then as_fn_error $? "no valid storage drivers specified" "$LINENO" 5 fi if test x"$enable_daemon" = xyes && test x"$mysql_drv" != xyes && test x"$pgsql_drv" != xyes && test x"$hash_drv" != xyes then as_fn_error $? "daemon mode requires one of the following storage drivers: mysql_drv pgsql_drv hash_drv" "$LINENO" 5 fi #--------------------------------------------------------- # Libraries (other) # #--------------------------------------------------------- # Documentation generation tools # ### AC_CHECK_PROG([HAVE_DOXYGEN], [doxygen], [yes], [no]) ### AC_CHECK_PROG([HAVE_DOT], [dot], [yes], [no]) ### AM_CONDITIONAL([HAVE_DOXYGEN], [ test x"$HAVE_DOXYGEN" = xyes ]) #---------------------------------------------------------- # final cut # if test x$GCC = xyes then # # Enable Compiler Warnings # # Check whether --enable-warnings was given. if test "${enable_warnings+set}" = set; then : enableval=$enable_warnings; fi gcc_param=",$enable_warnings," gcc_enable_warnings=`echo $gcc_param|grep ',no,' >/dev/null 2>&1 && echo no || echo yes` gcc_enable_error=`echo $gcc_param|grep ',error,' >/dev/null 2>&1 && echo yes || echo no` gcc_enable_strict_proto=`echo $gcc_param|grep ',proto,' >/dev/null 2>&1 && echo yes || echo no` warn_flags='-Wall -Wmissing-prototypes -Wmissing-declarations' if test x$gcc_enable_strict_proto != xno then warn_flags="$warn_flags -Wstrict-prototypes" fi if test x$gcc_enable_error != xno then warn_flags="$warn_flags -Werror" fi if test x$gcc_enable_warnings != xno then CFLAGS="$CFLAGS $warn_flags" CXXFLAGS="$CXXFLAGS $warn_flags" fi # # Enable Profiling Support # # Check whether --enable-profiling was given. if test "${enable_profiling+set}" = set; then : enableval=$enable_profiling; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable profiling output" >&5 $as_echo_n "checking whether to enable profiling output... " >&6; } case x"$enable_profiling" in xyes) # profiling output enabled explicity ;; xno) # profiling output disabled explicity ;; x) # profiling output disabled by default enable_profiling=no ;; *) as_fn_error $? "unexpected value $enable_profiling for --{enable,disable}-profiling configure option" "$LINENO" 5 ;; esac if test x"$enable_profiling" != xyes then enable_profiling=no else enable_profiling=yes # overkill, but convenient CFLAGS="$CFLAGS -pg" CXXFLAGS="$CXXFLAGS -pg" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5 $as_echo "$enable_profiling" >&6; } # GCC fi ac_config_headers="$ac_config_headers src/auto-config.h" ac_config_files="$ac_config_files Makefile src/tools/Makefile webui/Makefile m4/Makefile" ac_config_files="$ac_config_files src/tools.mysql_drv/Makefile" ac_config_files="$ac_config_files txt/Makefile src/tools.pgsql_drv/Makefile" ac_config_files="$ac_config_files src/Makefile webui/cgi-bin/templates/Makefile" ac_config_files="$ac_config_files webui/cgi-bin/templates/cs/Makefile" ac_config_files="$ac_config_files webui/cgi-bin/templates/de/Makefile" ac_config_files="$ac_config_files webui/cgi-bin/templates/es-es/Makefile" ac_config_files="$ac_config_files webui/cgi-bin/templates/fr/Makefile" ac_config_files="$ac_config_files webui/cgi-bin/templates/he/Makefile" ac_config_files="$ac_config_files webui/cgi-bin/templates/pt-br/Makefile" ac_config_files="$ac_config_files webui/cgi-bin/templates/ro/Makefile" ac_config_files="$ac_config_files webui/cgi-bin/templates/ru/Makefile" ac_config_files="$ac_config_files src/tools.sqlite_drv/Makefile man/Makefile" ac_config_files="$ac_config_files src/dspam.pc src/dspam-uninstalled.pc" ac_config_files="$ac_config_files doc/Makefile src/tools.hash_drv/Makefile" ac_config_files="$ac_config_files webui/cgi-bin/Makefile webui/htdocs/Makefile" ac_config_files="$ac_config_files contrib/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DB4_DRV_TRUE}" && test -z "${BUILD_DB4_DRV_FALSE}"; then as_fn_error $? "conditional \"BUILD_DB4_DRV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DB3_DRV_TRUE}" && test -z "${BUILD_DB3_DRV_FALSE}"; then as_fn_error $? "conditional \"BUILD_DB3_DRV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_HASH_DRV_TRUE}" && test -z "${BUILD_HASH_DRV_FALSE}"; then as_fn_error $? "conditional \"BUILD_HASH_DRV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_SQLITE_DRV_TRUE}" && test -z "${BUILD_SQLITE_DRV_FALSE}"; then as_fn_error $? "conditional \"BUILD_SQLITE_DRV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_SQLITE3_DRV_TRUE}" && test -z "${BUILD_SQLITE3_DRV_FALSE}"; then as_fn_error $? "conditional \"BUILD_SQLITE3_DRV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_MYSQL_DRV_TRUE}" && test -z "${BUILD_MYSQL_DRV_FALSE}"; then as_fn_error $? "conditional \"BUILD_MYSQL_DRV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_PGSQL_DRV_TRUE}" && test -z "${BUILD_PGSQL_DRV_FALSE}"; then as_fn_error $? "conditional \"BUILD_PGSQL_DRV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${STATIC_DRIVER_TRUE}" && test -z "${STATIC_DRIVER_FALSE}"; then as_fn_error $? "conditional \"STATIC_DRIVER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DYNAMIC_DRIVER_TRUE}" && test -z "${DYNAMIC_DRIVER_FALSE}"; then as_fn_error $? "conditional \"DYNAMIC_DRIVER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EXT_LOOKUP_TRUE}" && test -z "${BUILD_EXT_LOOKUP_FALSE}"; then as_fn_error $? "conditional \"BUILD_EXT_LOOKUP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by dspam $as_me 3.10.2, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ dspam config.status 3.10.2 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "src/auto-config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/auto-config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/tools/Makefile") CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;; "webui/Makefile") CONFIG_FILES="$CONFIG_FILES webui/Makefile" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "src/tools.mysql_drv/Makefile") CONFIG_FILES="$CONFIG_FILES src/tools.mysql_drv/Makefile" ;; "txt/Makefile") CONFIG_FILES="$CONFIG_FILES txt/Makefile" ;; "src/tools.pgsql_drv/Makefile") CONFIG_FILES="$CONFIG_FILES src/tools.pgsql_drv/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "webui/cgi-bin/templates/Makefile") CONFIG_FILES="$CONFIG_FILES webui/cgi-bin/templates/Makefile" ;; "webui/cgi-bin/templates/cs/Makefile") CONFIG_FILES="$CONFIG_FILES webui/cgi-bin/templates/cs/Makefile" ;; "webui/cgi-bin/templates/de/Makefile") CONFIG_FILES="$CONFIG_FILES webui/cgi-bin/templates/de/Makefile" ;; "webui/cgi-bin/templates/es-es/Makefile") CONFIG_FILES="$CONFIG_FILES webui/cgi-bin/templates/es-es/Makefile" ;; "webui/cgi-bin/templates/fr/Makefile") CONFIG_FILES="$CONFIG_FILES webui/cgi-bin/templates/fr/Makefile" ;; "webui/cgi-bin/templates/he/Makefile") CONFIG_FILES="$CONFIG_FILES webui/cgi-bin/templates/he/Makefile" ;; "webui/cgi-bin/templates/pt-br/Makefile") CONFIG_FILES="$CONFIG_FILES webui/cgi-bin/templates/pt-br/Makefile" ;; "webui/cgi-bin/templates/ro/Makefile") CONFIG_FILES="$CONFIG_FILES webui/cgi-bin/templates/ro/Makefile" ;; "webui/cgi-bin/templates/ru/Makefile") CONFIG_FILES="$CONFIG_FILES webui/cgi-bin/templates/ru/Makefile" ;; "src/tools.sqlite_drv/Makefile") CONFIG_FILES="$CONFIG_FILES src/tools.sqlite_drv/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "src/dspam.pc") CONFIG_FILES="$CONFIG_FILES src/dspam.pc" ;; "src/dspam-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES src/dspam-uninstalled.pc" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "src/tools.hash_drv/Makefile") CONFIG_FILES="$CONFIG_FILES src/tools.hash_drv/Makefile" ;; "webui/cgi-bin/Makefile") CONFIG_FILES="$CONFIG_FILES webui/cgi-bin/Makefile" ;; "webui/htdocs/Makefile") CONFIG_FILES="$CONFIG_FILES webui/htdocs/Makefile" ;; "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi dspam-3.10.2+dfsg/contrib/0000755000175000017500000000000011766556151014633 5ustar julienjuliendspam-3.10.2+dfsg/contrib/dspam_maintenance/0000755000175000017500000000000011622570546020274 5ustar julienjuliendspam-3.10.2+dfsg/contrib/dspam_maintenance/dspam_maintenance.sh0000755000175000017500000011643711622570546024315 0ustar julienjulien#!/bin/bash # # $Id: dspam_maintenance.sh,v 1.22 2011/07/02 12:54:17 sbajic Exp $ # # Copyright 2007-2010 Stevan Bajic # Distributed under the terms of the GNU Affero General Public License v3 # # Purpose: Remove old signatures and unimportant tokens from the DSPAM # database. Purge old log entries in user and system logs. # # Note : I originally wrote that script for Gentoo Linux in 2007 and it # is since then distributed with the Gentoo DSPAM ebuild. This # edition here is slightly changed to be more flexible. I have # not tested that script on other distros except on Gentoo Linux # and on a older CentOS distro. Other members from the DSPAM # mailing list have tested the script on Debian. Should you find # any issues with this script then please post a message on the # DSPAM user mailing list. # # Note : This script can be called from the command line or run from # within cron. Either add a line in your crontab or add this # script in your cron.{hourly,daily,weekly,monthly}. Running # this script every hour might not be the best idea but it's # your decision if you want to do so. ### DSPAM_CONFIGDIR="" INCLUDE_DIRS="" DSPAM_HOMEDIR="" DSPAM_PURGE_SCRIPT_DIR="" DSPAM_BIN_DIR="" MYSQL_BIN_DIR="/usr/bin" PGSQL_BIN_DIR="/usr/bin" SQLITE_BIN_DIR="/usr/bin" SQLITE3_BIN_DIR="/usr/bin" # # Parse optional command line parameters # for foo in $@ do case "${foo}" in --profile=*) PROFILE="${foo#--profile=}";; --logdays=*) LOGROTATE_AGE="${foo#--logdays=}";; --signatures=*) SIGNATURE_AGE="${foo#--signatures=}";; --neutral=*) NEUTRAL_AGE="${foo#--neutral=}";; --unused=*) UNUSED_AGE="${foo#--unused=}";; --hapaxes=*) HAPAXES_AGE="${foo#--hapaxes=}";; --hits1s=*) HITS1S_AGE="${foo#--hits1s=}";; --hits1i=*) HITS1I_AGE="${foo#--hits1i=}";; --purgescriptdir=*) DSPAM_PURGE_SCRIPT_DIR="${foo#--purgescriptdir=}";; --without-sql-purge) USE_SQL_PURGE="false";; --with-sql-optimization) USE_SQL_OPTIMIZATION="true";; --with-sql-autoupdate) USE_SQL_AUTOUPDATE="true";; --with-all-drivers) PURGE_ALL_DRIVERS="true";; --verbose) VERBOSE="true";; --help | -help | --h | -h) echo "Usage: $0" echo echo " [--profile=[PROFILE]]" echo " Specify a storage profile from dspam.conf. The storage profile" echo " selected will be used for all database connectivity. See" echo " dspam.conf for more information." echo echo " [--logdays=no_of_days]" echo " All log entries older than 'no_of_days' days will be removed." echo " Note: Default is 31 days. (for more info: man dspam_logrotate)" echo echo " [--signatures=no_of_days]" echo " All signatures older than 'no_of_days' days will be removed." echo " Note: Default value is set by the 'PurgeSignatures' option in" echo " dspam.conf, if this option is not set, the default value is 14" echo " days. This option is only used for the Hash driver." echo " For more info: man dspam_clean" echo echo " [--neutral=no_of_days]" echo " Remove tokens whose probability is between 0.35 and 0.65." echo " Note: Default value is set by the 'PurgeNeutral' option in dspam.conf," echo " if this option is not set, the default value is 90 days." echo " For more info: man dspam_clean" echo echo " [--unused=no_of_days]" echo " Remove tokens which have not been used for a long period of time." echo " Note: Default value is set by the 'PurgeUnused' option in dspam.conf," echo " if this option is not set, the default value is 90 days." echo " For more info: man dspam_clean" echo echo " [--hapaxes=no_of_days]" echo " Remove tokens with a total hit count below 5." echo " Note: Default value is set by the 'PurgeHapaxes' option in dspam.conf," echo " if this option is not set, the default value is 30 days." echo " For more info: man dspam_clean" echo echo " [--hits1s=no_of_days]" echo " Remove tokens with a single SPAM hit." echo " Note: Default value is set by the 'PurgeHits1S' option in dspam.conf," echo " if this option is not set, the default value is 15 days." echo " For more info: man dspam_clean" echo echo " [--hits1i=no_of_days]" echo " Remove tokens with a single INNOCENT hit." echo " Note: Default value is set by the 'PurgeHits1I' option in dspam.conf," echo " if this option is not set, the default value is 15 days." echo " For more info: man dspam_clean" echo echo " [--without-sql-purge]" echo " Do not use SQL based purging. Only run dspam_clean." echo " Note: Default is off (aka: use SQL based purging)." echo echo " [--with-sql-optimization]" echo " Run VACUUM (for PostgreSQL/SQLite) and/or OPTIMIZE (for MySQL)." echo " Note: Default is off (aka: do not use optimizations)." echo echo " [--with-sql-autoupdate]" echo " Run SQL based purging with purge day values passed to this script." echo " Note: Default is off (aka: do not attempt to modify SQL instructions)." echo echo " [--purgescriptdir=[DIRECTORY]" echo " Space separated list of directories where to search for SQL files" echo " used for the SQL based purging." echo echo " [--with-all-drivers]" echo " Process all installed storage drivers (not just the active driver)." echo " Note: Default is true (aka: process all installed drivers)." echo echo " [--verbose]" echo " Verbose output while running maintenance script." echo exit 1 ;; *) echo "Unrecognized parameter '${foo}'. Use parameter --help for more info." exit 1 ;; esac done # # Function to run dspam_clean # run_dspam_clean() { [ "${VERBOSE}" = "true" ] && echo "Running dspam_clean ..." local PURGE_ALL="${1}" local ADD_PARAMETER="" read_dspam_params DefaultProfile if [ -n "${PROFILE}" -a -n "${DefaultProfile}" -a "${PROFILE/*.}" != "${DefaultProfile}" ] then ADD_PARAMETER="--profile=${PROFILE/*.}" fi if [ -z "${SIGNATURE_AGE}" -o -z "${NEUTRAL_AGE}" -o -z "${UNUSED_AGE}" -o -z "${HAPAXES_AGE}" -o -z "${HITS1S_AGE}" -o -z "${HITS1I_AGE}" ] then [ "${VERBOSE}" = "true" ] && echo " * with default parameters" ${DSPAM_BIN_DIR}/dspam_clean ${ADD_PARAMETER} else if [ "${PURGE_ALL}" = "YES" ] then [ "${VERBOSE}" = "true" ] && echo " * with full purging" ${DSPAM_BIN_DIR}/dspam_clean ${ADD_PARAMETER} -s${SIGNATURE_AGE} -p${NEUTRAL_AGE} -u${UNUSED_AGE},${HAPAXES_AGE},${HITS1S_AGE},${HITS1I_AGE} >/dev/null 2>&1 else [ "${VERBOSE}" = "true" ] && echo " * with neutral token purging only" ${DSPAM_BIN_DIR}/dspam_clean ${ADD_PARAMETER} -p${NEUTRAL_AGE} >/dev/null 2>&1 fi fi return ${?} } # # Function to check if we have all needed tools # check_for_tool() { local myrc=0 [ -z "${1}" ] && return 2 for foo in ${@} do if ! which ${foo} >/dev/null 2>&1 then echo "Command ${foo} not found!" myrc=1 break fi done return ${myrc} } # # Function to read dspam.conf parameters # read_dspam_params() { local PARAMETER VALUE for PARAMETER in $@ ; do VALUE=$(awk "BEGIN { IGNORECASE=1; } \$1==\"${PARAMETER}\" { print \$2; exit; }" "${DSPAM_CONFIGDIR}/dspam.conf" ${INCLUDE_DIRS[@]} 2>/dev/null) [ ${?} = 0 ] || return 1 eval ${PARAMETER/.*}=\'${VALUE}\' done return 0 } # # Function to clean DSPAM MySQL data # clean_mysql_drv() { # # MySQL # [ "${VERBOSE}" = "true" ] && echo "Running MySQL storage driver data cleanup" if [ "${USE_SQL_PURGE}" = "true" ] && \ read_dspam_params MySQLServer${PROFILE} MySQLPort${PROFILE} MySQLUser${PROFILE} MySQLPass${PROFILE} MySQLDb${PROFILE} MySQLCompress${PROFILE} && \ [ -n "${MySQLServer}" -a -n "${MySQLUser}" -a -n "${MySQLDb}" ] then for foo in ${MYSQL_BIN_DIR} /usr/bin /usr/local/bin /usr/sbin /usr/local/sbin do if [ -e "${foo}/mysql_config" -o -e "${foo}/mysql" ] then MYSQL_BIN_DIR=${foo} break fi done if [ -e "${MYSQL_BIN_DIR}/mysql_config" ] then DSPAM_MySQL_VER=$(${MYSQL_BIN_DIR}/mysql_config --version | sed -n 's:^[^0-9]*\([0-9.]*\).*:\1:p') elif [ -e "${MYSQL_BIN_DIR}/mysql" ] then DSPAM_MySQL_VER=$(${MYSQL_BIN_DIR}/mysql --version | sed -n 's:^.*[\t ]Distrib[^0-9]*\([0-9.]*\).*:\1:p') fi if [ -z "${DSPAM_MySQL_VER}" ] then [ "${VERBOSE}" = "true" ] && echo " Can not run MySQL purge script:" [ "${VERBOSE}" = "true" ] && echo " ${MYSQL_BIN_DIR}/mysql_config or ${MYSQL_BIN_DIR}/mysql does not exist" return 1 fi DSPAM_MySQL_PURGE_SQL= DSPAM_MySQL_PURGE_SQL_FILES= DSPAM_MySQL_MAJOR=$(echo "${DSPAM_MySQL_VER}" | cut -d. -f1) DSPAM_MySQL_MINOR=$(echo "${DSPAM_MySQL_VER}" | cut -d. -f2) DSPAM_MySQL_MICRO=$(echo "${DSPAM_MySQL_VER}" | cut -d. -f3) DSPAM_MySQL_INT=$(($DSPAM_MySQL_MAJOR * 65536 + $DSPAM_MySQL_MINOR * 256 + $DSPAM_MySQL_MICRO)) if [ "${DSPAM_MySQL_INT}" -ge "262400" ] then # For MySQL >= 4.1 use the new purge script # For the 4.1-optimized version see: # http://securitydot.net/txt/id/32/type/articles/ # Version >= 3.9.0 of DSPAM do already include a better purge script. DSPAM_MySQL_PURGE_SQL_FILES="mysql_purge-4.1 mysql_purge-4.1-optimized" else DSPAM_MySQL_PURGE_SQL_FILES="mysql_purge" fi # # We first search for the purge scripts in the directory the user has # told us to look for (command line option: --purgescriptdir # Then we look in DSPAM configuration directory under ./config/ and then # in the DSPAM configuration directory it self. # for foo in ${DSPAM_PURGE_SCRIPT_DIR} ${DSPAM_CONFIGDIR}/config ${DSPAM_CONFIGDIR} /usr/share/doc/libdspam7-drv-mysql/sql /usr/share/dspam/sql /usr/local/share/examples/dspam/mysql /usr/share/examples/dspam/mysql do for bar in ${DSPAM_MySQL_PURGE_SQL_FILES} do if [ -z "${DSPAM_MySQL_PURGE_SQL}" -a -f "${foo}/${bar}.sql" ] then DSPAM_MySQL_PURGE_SQL="${foo}/${bar}.sql" if (grep -iq "to_days" "${DSPAM_MySQL_PURGE_SQL}") then break else DSPAM_MySQL_PURGE_SQL="" fi fi if [ -z "${DSPAM_MySQL_PURGE_SQL}" -a -f "${foo}/${bar/_//}.sql" ] then DSPAM_MySQL_PURGE_SQL="${foo}/${bar/_//}.sql" if (grep -iq "to_days" "${DSPAM_MySQL_PURGE_SQL}") then break else DSPAM_MySQL_PURGE_SQL="" fi fi if [ -z "${DSPAM_MySQL_PURGE_SQL}" -a -f "${foo}/${bar/*_/}.sql" ] then DSPAM_MySQL_PURGE_SQL="${foo}/${bar/*_/}.sql" if (grep -iq "to_days" "${DSPAM_MySQL_PURGE_SQL}") then break else DSPAM_MySQL_PURGE_SQL="" fi fi done if [ -n "${DSPAM_MySQL_PURGE_SQL}" ] && (grep -iq "to_days" "${DSPAM_MySQL_PURGE_SQL}") then break else DSPAM_MySQL_PURGE_SQL="" fi done if [ -z "${DSPAM_MySQL_PURGE_SQL}" ] then [ "${VERBOSE}" = "true" ] && echo " Can not run MySQL purge script:" [ "${VERBOSE}" = "true" ] && echo " None of the ${DSPAM_MySQL_PURGE_SQL_FILES} SQL script(s) found" return 1 fi if [ ! -r "${DSPAM_MySQL_PURGE_SQL}" ] then [ "${VERBOSE}" = "true" ] && echo " Can not read MySQL purge script:" [ "${VERBOSE}" = "true" ] && echo " ${DSPAM_MySQL_PURGE_SQL}" return 1 fi if [ ! -e "${MYSQL_BIN_DIR}/mysql" ] then [ "${VERBOSE}" = "true" ] && echo " Can not run MySQL purge script:" [ "${VERBOSE}" = "true" ] && echo " ${MYSQL_BIN_DIR}/mysql does not exist" return 1 fi # Construct mysql command line echo "[client]">"${DSPAM_CRON_TMPFILE}" MySQLQuotePass="" if [ "${MySQLPass}" != "${MySQLPass/[#\\\"\$]/}" ] then if [ "${DSPAM_MySQL_INT}" -lt "262160" ] then if [ "${VERBOSE}" = "true" ] then echo " You will most likely have an authentication issue/failure with the" echo " currently used MySQL DSPAM password and your current MySQL version." fi else MySQLQuotePass="'" fi fi echo -n "password=${MySQLQuotePass}">>"${DSPAM_CRON_TMPFILE}" awk "BEGIN { IGNORECASE=1; ORS=\"\"; } \$1==\"MySQLPass${PROFILE}\" { gsub(\"^\\\"|\\\"$\", \"\", \$2); print \$2 >>\"${DSPAM_CRON_TMPFILE}\"; exit; }" "${DSPAM_CONFIGDIR}/dspam.conf" ${INCLUDE_DIRS[@]} 2>/dev/null echo "${MySQLQuotePass}">>"${DSPAM_CRON_TMPFILE}" DSPAM_MySQL_CMD="${MYSQL_BIN_DIR}/mysql" DSPAM_MySQL_CMD="${DSPAM_MySQL_CMD} --defaults-file=${DSPAM_CRON_TMPFILE}" DSPAM_MySQL_CMD="${DSPAM_MySQL_CMD} --silent" DSPAM_MySQL_CMD="${DSPAM_MySQL_CMD} --user=${MySQLUser}" [ -S "${MySQLServer}" ] && DSPAM_MySQL_CMD="${DSPAM_MySQL_CMD} --socket=${MySQLServer}" || DSPAM_MySQL_CMD="${DSPAM_MySQL_CMD} --host=${MySQLServer}" [ -n "${MySQLPort}" ] && DSPAM_MySQL_CMD="${DSPAM_MySQL_CMD} --port=${MySQLPort}" [ "${MySQLCompress}" = "true" ] && DSPAM_MySQL_CMD="${DSPAM_MySQL_CMD} --compress" # Use updated purge script to reflect purge days passed to this script if [ "${USE_SQL_AUTOUPDATE}" = "true" ] then sed \ -e "s:^\(SET[\t ]\{1,\}\@PurgeSignatures[\t ]*=[\t ]*\)[0-9]\{1,\}\(.*\)$:\1${SIGNATURE_AGE}\2:g" \ -e "s:^\(SET[\t ]\{1,\}\@PurgeUnused[\t ]*=[\t ]*\)[0-9]\{1,\}\(.*\)$:\1${UNUSED_AGE}\2:g" \ -e "s:^\(SET[\t ]\{1,\}\@PurgeHapaxes[\t ]*=[\t ]*\)[0-9]\{1,\}\(.*\)$:\1${HAPAXES_AGE}\2:g" \ -e "s:^\(SET[\t ]\{1,\}\@PurgeHits1S[\t ]*=[\t ]*\)[0-9]\{1,\}\(.*\)$:\1${HITS1S_AGE}\2:g" \ -e "s:^\(SET[\t ]\{1,\}\@PurgeHits1I[\t ]*=[\t ]*\)[0-9]\{1,\}\(.*\)$:\1${HITS1I_AGE}\2:g" \ "${DSPAM_MySQL_PURGE_SQL}">"${DSPAM_SQL_TMPFILE}" [ -r "${DSPAM_SQL_TMPFILE}" ] && DSPAM_MySQL_PURGE_SQL="${DSPAM_SQL_TMPFILE}" fi # Run the MySQL purge script ${DSPAM_MySQL_CMD} ${MySQLDb} < ${DSPAM_MySQL_PURGE_SQL} >/dev/null _RC=${?} if [ ${_RC} != 0 ] then echo "MySQL purge script returned error code ${_RC}" elif [ "${USE_SQL_OPTIMIZATION}" = "true" ] then for foo in dspam_preferences dspam_signature_data dspam_stats dspam_token_data dspam_virtual_uids do ${DSPAM_MySQL_CMD} --batch -e "OPTIMIZE TABLE ${foo};" ${MySQLDb} >/dev/null 2>&1 # ${DSPAM_MySQL_CMD} --batch -e "ANALYZE TABLE ${foo};" ${MySQLDb} >/dev/null 2>&1 done fi echo "">"${DSPAM_CRON_TMPFILE}" echo "">"${DSPAM_SQL_TMPFILE}" return 0 fi } # # Function to clean DSPAM PostgreSQL data # clean_pgsql_drv() { # # PostgreSQL # [ "${VERBOSE}" = "true" ] && echo "Running PostgreSQL storage driver data cleanup" if [ "${USE_SQL_PURGE}" = "true" ] && \ read_dspam_params PgSQLServer${PROFILE} PgSQLPort${PROFILE} PgSQLUser${PROFILE} PgSQLDb${PROFILE} && \ [ -n "${PgSQLServer}" -a -n "${PgSQLUser}" -a -n "${PgSQLDb}" ] then for foo in ${PGSQL_BIN_DIR} /usr/bin /usr/local/bin /usr/sbin /usr/local/sbin do if [ -e "${foo}/psql" ] then PGSQL_BIN_DIR=${foo} break fi done DSPAM_PgSQL_PURGE_SQL= DSPAM_PgSQL_PURGE_SQL_FILES="pgsql_pe-purge pgsql_purge-pe pgsql_purge" # # We first search for the purge scripts in the directory the user has # told us to look for (command line option: --purgescriptdir # Then we look in DSPAM configuration directory under ./config/ and then # in the DSPAM configuration directory it self. # for foo in ${DSPAM_PURGE_SCRIPT_DIR} ${DSPAM_CONFIGDIR}/config ${DSPAM_CONFIGDIR} /usr/share/doc/libdspam7-drv-pgsql/sql /usr/share/dspam/sql /usr/local/share/examples/dspam/pgsql /usr/share/examples/dspam/pgsql do for bar in ${DSPAM_PgSQL_PURGE_SQL_FILES} do if [ -z "${DSPAM_PgSQL_PURGE_SQL}" -a -f "${foo}/${bar}.sql" ] then DSPAM_PgSQL_PURGE_SQL="${foo}/${bar}.sql" if (grep -iq "VACUUM ANALYSE" "${DSPAM_PgSQL_PURGE_SQL}") then break else DSPAM_PgSQL_PURGE_SQL="" fi fi if [ -z "${DSPAM_PgSQL_PURGE_SQL}" -a -f "${foo}/${bar/_//}.sql" ] then DSPAM_PgSQL_PURGE_SQL="${foo}/${bar/_//}.sql" if (grep -iq "VACUUM ANALYSE" "${DSPAM_PgSQL_PURGE_SQL}") then break else DSPAM_PgSQL_PURGE_SQL="" fi fi if [ -z "${DSPAM_PgSQL_PURGE_SQL}" -a -f "${foo}/${bar/*_/}.sql" ] then DSPAM_PgSQL_PURGE_SQL="${foo}/${bar/*_/}.sql" if (grep -iq "VACUUM ANALYSE" "${DSPAM_PgSQL_PURGE_SQL}") then break else DSPAM_PgSQL_PURGE_SQL="" fi fi done if [ -n "${DSPAM_PgSQL_PURGE_SQL}" ] && (grep -q "VACUUM ANALYSE" "${DSPAM_PgSQL_PURGE_SQL}") then break else DSPAM_PgSQL_PURGE_SQL="" fi done if [ -z "${DSPAM_PgSQL_PURGE_SQL}" ] then [ "${VERBOSE}" = "true" ] && echo " Can not run PostgreSQL purge script:" [ "${VERBOSE}" = "true" ] && echo " None of the ${DSPAM_PgSQL_PURGE_SQL_FILES} SQL script(s) found" return 1 fi if [ ! -r "${DSPAM_PgSQL_PURGE_SQL}" ] then [ "${VERBOSE}" = "true" ] && echo " Can not read PostgreSQL purge script:" [ "${VERBOSE}" = "true" ] && echo " ${DSPAM_PgSQL_PURGE_SQL}" return 1 fi if [ ! -e "${PGSQL_BIN_DIR}/psql" ] then [ "${VERBOSE}" = "true" ] && echo " Can not run PostgreSQL purge script:" [ "${VERBOSE}" = "true" ] && echo " ${PGSQL_BIN_DIR}/psql does not exist" return 1 fi # Construct psql command line echo -n "*:*:${PgSQLDb}:${PgSQLUser}:">"${DSPAM_CRON_TMPFILE}" awk "BEGIN { IGNORECASE=1; } \$1==\"PgSQLPass${PROFILE}\" { gsub(\"^\\\"|\\\"$\", \"\", \$2); print \$2 >>\"${DSPAM_CRON_TMPFILE}\"; exit; }" "${DSPAM_CONFIGDIR}/dspam.conf" ${INCLUDE_DIRS[@]} 2>/dev/null DSPAM_PgSQL_CMD="${PGSQL_BIN_DIR}/psql -q -U ${PgSQLUser} -h ${PgSQLServer} -d ${PgSQLDb}" [ -n "${PgSQLPort}" ] && DSPAM_PgSQL_CMD="${DSPAM_PgSQL_CMD} -p ${PgSQLPort}" # Use updated purge script to reflect purge days passed to this script if [ "${USE_SQL_AUTOUPDATE}" = "true" ] then if [ "${HITS1S_AGE}" -gt "${HITS1I_AGE}" ] then HITS1MAX=${HITS1S_AGE} else HITS1MAX=${HITS1I_AGE} fi sed \ -e "/^DELETE FROM dspam_signature_data/,/COMMIT/{s:^\([\t ]*WHERE[\t ]\{1,\}created_on[\t ]\{1,\}<[\t ]\{1,\}CURRENT_DATE[\t ]\{1,\}\-[\t ]\{1,\}\)14\(.*\)$:\1${SIGNATURE_AGE}\2:g}" \ -e "/^DELETE FROM dspam_token_data/,/COMMIT/{s:^\([\t ]*AND[\t ]\{1,\}last_hit[\t ]\{1,\}<[\t ]\{1,\}CURRENT_DATE[\t ]\{1,\}\-[\t ]\{1,\}\)[36]0\(.*\)$:\1${HAPAXES_AGE}\2:g}" \ -e "/^DELETE FROM dspam_token_data/,/COMMIT/{s:^\([\t ]*AND[\t ]\{1,\}last_hit[\t ]\{1,\}<[\t ]\{1,\}CURRENT_DATE[\t ]\{1,\}\-[\t ]\{1,\}\)15\(.*\)$:\1${HITS1MAX}\2:g}" \ -e "/^DELETE FROM dspam_token_data/,/COMMIT/{s:^\([\t ]*\(AND\|WHERE\)[\t ]\{1,\}last_hit[\t ]\{1,\}<[\t ]\{1,\}CURRENT_DATE[\t ]\{1,\}\-[\t ]\{1,\}\)90\(.*\)$:\1${UNUSED_AGE}\3:g}" \ "${DSPAM_PgSQL_PURGE_SQL}">"${DSPAM_SQL_TMPFILE}" [ -r "${DSPAM_SQL_TMPFILE}" ] && DSPAM_PgSQL_PURGE_SQL="${DSPAM_SQL_TMPFILE}" fi # Run the PostgreSQL purge script PGPASSFILE="${DSPAM_CRON_TMPFILE}" ${DSPAM_PgSQL_CMD} -f "${DSPAM_PgSQL_PURGE_SQL}" >/dev/null _RC=${?} if [ ${_RC} != 0 ] then [ "${VERBOSE}" = "true" ] && echo "PostgreSQL purge script returned error code ${_RC}" fi echo "">"${DSPAM_CRON_TMPFILE}" echo "">"${DSPAM_SQL_TMPFILE}" return 0 fi } # # Function to clean DSPAM Hash data # clean_hash_drv() { # # Hash # local myrc=0 [ "${VERBOSE}" = "true" ] && echo "Running Hash storage driver data cleanup" if [ -d "${DSPAM_HOMEDIR}/data" ] then if [ -e ${DSPAM_BIN_DIR}/cssclean ] then if ! check_for_tool find then [ "${VERBOSE}" = "true" ] && echo " Can not run cleanup without 'find' binary" myrc=1 else find ${DSPAM_HOMEDIR}/data/ -maxdepth 4 -mindepth 1 -type f -name "*.css" | while read name do ${DSPAM_BIN_DIR}/cssclean "${name}" 1>/dev/null 2>&1 done fi else [ "${VERBOSE}" = "true" ] && echo " DSPAM cssclean binary not found!" fi if ! check_for_tool find then [ "${VERBOSE}" = "true" ] && echo " Can not purge old signatures without 'find' binary" myrc=1 else find ${DSPAM_HOMEDIR}/data/ -maxdepth 4 -mindepth 1 -type d -name "*.sig" | while read name do find "${name}" -maxdepth 1 -mindepth 1 -type f -mtime +${SIGNATURE_AGE} -name "*.sig" -exec rm "{}" ";" done fi else myrc=1 fi return ${myrc} } # # Function to clean DSPAM SQLite3 data # clean_sqlite3_drv() { # # SQLite3 # [ "${VERBOSE}" = "true" ] && echo "Running SQLite v3 storage driver data cleanup" if [ "${USE_SQL_PURGE}" = "true" ] then for foo in ${SQLITE3_BIN_DIR} /usr/bin /usr/local/bin /usr/sbin /usr/local/sbin do if [ -e "${foo}/sqlite3" ] then SQLITE3_BIN_DIR=${foo} break fi done DSPAM_SQLite3_PURGE_SQL="" DSPAM_SQLite3_PURGE_SQL_FILES="sqlite3_purge sqlite3_purge-3" # # We first search for the purge scripts in the directory the user has # told us to look for (command line option: --purgescriptdir # Then we look in DSPAM configuration directory under ./config/ and then # in the DSPAM configuration directory it self. # for foo in ${DSPAM_PURGE_SCRIPT_DIR} ${DSPAM_CONFIGDIR}/config ${DSPAM_CONFIGDIR} /usr/share/doc/libdspam7-drv-sqlite3/sql /usr/share/dspam/sql /usr/share/dspam/clean /usr/local/share/examples/dspam/sqlite /usr/share/examples/dspam/sqlite do for bar in ${DSPAM_SQLite3_PURGE_SQL_FILES} do if [ -z "${DSPAM_SQLite3_PURGE_SQL}" -a -f "${foo}/${bar}.sql" ] then DSPAM_SQLite3_PURGE_SQL="${foo}/${bar}.sql" if (grep -iq "julianday.*now" "${DSPAM_SQLite3_PURGE_SQL}") then break else DSPAM_SQLite3_PURGE_SQL="" fi fi if [ -z "${DSPAM_SQLite3_PURGE_SQL}" -a -f "${foo}/${bar/_//}.sql" ] then DSPAM_SQLite3_PURGE_SQL="${foo}/${bar/_//}.sql" if (grep -iq "julianday.*now" "${DSPAM_SQLite3_PURGE_SQL}") then break else DSPAM_SQLite3_PURGE_SQL="" fi fi if [ -z "${DSPAM_SQLite3_PURGE_SQL}" -a -f "${foo}/${bar/*_/}.sql" ] then DSPAM_SQLite3_PURGE_SQL="${foo}/${bar/*_/}.sql" if (grep -iq "julianday.*now" "${DSPAM_SQLite3_PURGE_SQL}") then break else DSPAM_SQLite3_PURGE_SQL="" fi fi done if [ -n "${DSPAM_SQLite3_PURGE_SQL}" ] && (grep -iq "julianday.*now" "${DSPAM_SQLite3_PURGE_SQL}") then break else DSPAM_SQLite3_PURGE_SQL="" fi done if [ -z "${DSPAM_SQLite3_PURGE_SQL}" ] then [ "${VERBOSE}" = "true" ] && echo " Can not run SQLite3 purge script:" [ "${VERBOSE}" = "true" ] && echo " None of the ${DSPAM_SQLite3_PURGE_SQL_FILES} SQL script(s) found" return 1 fi if [ ! -r "${DSPAM_SQLite3_PURGE_SQL}" ] then [ "${VERBOSE}" = "true" ] && echo " Can not read SQLite3 purge script:" [ "${VERBOSE}" = "true" ] && echo " ${DSPAM_SQLite3_PURGE_SQL}" return 1 fi if [ ! -e "${SQLITE3_BIN_DIR}/sqlite3" ] then [ "${VERBOSE}" = "true" ] && echo " Can not run SQLite3 purge script:" [ "${VERBOSE}" = "true" ] && echo " ${SQLITE3_BIN_DIR}/sqlite3 does not exist" return 1 fi # Use updated purge script to reflect purge days passed to this script if [ "${USE_SQL_AUTOUPDATE}" = "true" ] then if [ "${HITS1S_AGE}" -gt "${HITS1I_AGE}" ] then HITS1MAX=${HITS1S_AGE} else HITS1MAX=${HITS1I_AGE} fi sed \ -e "s:^\([\t ]*and[\t ]\{1,\}(julianday('now')\-\)[36]0\()[\t ]\{1,\}>[\t ]\{1,\}julianday(last_hit).*\)$:\1${HAPAXES_AGE}\2:g" \ -e "s:^\([\t ]*and[\t ]\{1,\}(julianday('now')\-\)15\()[\t ]\{1,\}>[\t ]\{1,\}julianday(last_hit).*\)$:\1${HITS1MAX}\2:g" \ -e "s:^\([\t ]*and[\t ]\{1,\}(julianday('now')\-\)90\()[\t ]\{1,\}>[\t ]\{1,\}julianday(last_hit).*\)$:\1${UNUSED_AGE}\2:g" \ -e "s:^\([\t ]*and[\t ]\{1,\}(julianday('now')\-\)14\()[\t ]\{1,\}>[\t ]\{1,\}julianday(created_on).*\)$:\1${SIGNATURE_AGE}\2:g" \ "${DSPAM_SQLite3_PURGE_SQL}">"${DSPAM_SQL_TMPFILE}" [ -r "${DSPAM_SQL_TMPFILE}" ] && DSPAM_SQLite3_PURGE_SQL="${DSPAM_SQL_TMPFILE}" fi # Run the SQLite3 purge script and vacuum find "${DSPAM_HOMEDIR}" -name "*.sdb" -print | while read name do ${SQLITE3_BIN_DIR}/sqlite3 "${name}" < "${DSPAM_SQLite3_PURGE_SQL}" >/dev/null if [ "${USE_SQL_OPTIMIZATION}" = "true" ] then # Enable the next line if you don't vacuum in the purge script echo "vacuum;" | ${SQLITE3_BIN_DIR}/sqlite3 "${name}" >/dev/null fi done 1>/dev/null 2>&1 echo "">"${DSPAM_SQL_TMPFILE}" return 0 fi } # # Function to clean DSPAM SQLite < 3.0 data # clean_sqlite_drv() { # # SQLite # [ "${VERBOSE}" = "true" ] && echo "Running SQLite v2 storage driver data cleanup" if [ "${USE_SQL_PURGE}" = "true" ] then for foo in ${SQLITE_BIN_DIR} /usr/bin /usr/local/bin /usr/sbin /usr/local/sbin do if [ -e "${foo}/sqlite" ] then SQLITE_BIN_DIR=${foo} break fi done DSPAM_SQLite_PURGE_SQL="" DSPAM_SQLite_PURGE_SQL_FILES="sqlite2_purge sqlite2_purge-2" # # We first search for the purge scripts in the directory the user has # told us to look for (command line option: --purgescriptdir # Then we look in DSPAM configuration directory under ./config/ and then # in the DSPAM configuration directory it self. # for foo in ${DSPAM_PURGE_SCRIPT_DIR} ${DSPAM_CONFIGDIR}/config ${DSPAM_CONFIGDIR} /usr/share/doc/libdspam7-drv-sqlite/sql /usr/share/dspam/sql /usr/share/dspam/clean /usr/local/share/examples/dspam/sqlite /usr/share/examples/dspam/sqlite do for bar in ${DSPAM_SQLite_PURGE_SQL_FILES} do if [ -z "${DSPAM_SQLite_PURGE_SQL}" -a -f "${foo}/${bar}.sql" ] then DSPAM_SQLite_PURGE_SQL="${foo}/${bar}.sql" if (grep -iq "date.*now.*date" "${DSPAM_SQLite_PURGE_SQL}") then break else DSPAM_SQLite_PURGE_SQL="" fi fi if [ -z "${DSPAM_SQLite_PURGE_SQL}" -a -f "${foo}/${bar/_//}.sql" ] then DSPAM_SQLite_PURGE_SQL="${foo}/${bar/_//}.sql" if (grep -iq "date.*now.*date" "${DSPAM_SQLite_PURGE_SQL}") then break else DSPAM_SQLite_PURGE_SQL="" fi fi if [ -z "${DSPAM_SQLite_PURGE_SQL}" -a -f "${foo}/${bar/*_/}.sql" ] then DSPAM_SQLite_PURGE_SQL="${foo}/${bar/*_/}.sql" if (grep -iq "date.*now.*date" "${DSPAM_SQLite_PURGE_SQL}") then break else DSPAM_SQLite_PURGE_SQL="" fi fi done if [ -n "${DSPAM_SQLite_PURGE_SQL}" ] && (grep -iq "date.*now.*date" "${DSPAM_SQLite_PURGE_SQL}") then break else DSPAM_SQLite_PURGE_SQL="" fi done if [ -z "${DSPAM_SQLite_PURGE_SQL}" ] then [ "${VERBOSE}" = "true" ] && echo " Can not run SQLite purge script:" [ "${VERBOSE}" = "true" ] && echo " None of the ${DSPAM_SQLite_PURGE_SQL_FILES} SQL script(s) found" return 1 fi if [ ! -r "${DSPAM_SQLite_PURGE_SQL}" ] then [ "${VERBOSE}" = "true" ] && echo " Can not read SQLite purge script:" [ "${VERBOSE}" = "true" ] && echo " ${DSPAM_SQLite_PURGE_SQL}" return 1 fi if [ ! -e "${SQLITE_BIN_DIR}/sqlite" ] then [ "${VERBOSE}" = "true" ] && echo " Can not run SQLite purge script:" [ "${VERBOSE}" = "true" ] && echo " ${SQLITE_BIN_DIR}/sqlite does not exist" return 1 fi # Use updated purge script to reflect purge days passed to this script if [ "${USE_SQL_AUTOUPDATE}" = "true" ] then if [ "${HITS1S_AGE}" -gt "${HITS1I_AGE}" ] then HITS1MAX=${HITS1S_AGE} else HITS1MAX=${HITS1I_AGE} fi sed \ -e "s:^\([\t ]*and[\t ]\{1,\}date('now')\-date(last_hit)[\t ]\{1,\}>[\t ]\{1,\}\)[36]0\(.*\)$:\1${HAPAXES_AGE}\2:g" \ -e "s:^\([\t ]*and[\t ]\{1,\}date('now')\-date(last_hit)[\t ]\{1,\}>[\t ]\{1,\}\)15\(.*\)$:\1${HITS1MAX}\2:g" \ -e "s:^\([\t ]*and[\t ]\{1,\}date('now')\-date(last_hit)[\t ]\{1,\}>[\t ]\{1,\}\)90\(.*\)$:\1${UNUSED_AGE}\2:g" \ -e "s:^\([\t ]*and[\t ]\{1,\}date('now')\-date(created_on)[\t ]\{1,\}>[\t ]\{1,\}\)14\(.*\)$:\1${SIGNATURE_AGE}\2:g" \ "${DSPAM_SQLite_PURGE_SQL}">"${DSPAM_SQL_TMPFILE}" [ -r "${DSPAM_SQL_TMPFILE}" ] && DSPAM_SQLite_PURGE_SQL="${DSPAM_SQL_TMPFILE}" fi # Run the SQLite purge script and vacuum find "${DSPAM_HOMEDIR}" -name "*.sdb" -print | while read name do ${SQLITE_BIN_DIR}/sqlite "${name}" < "${DSPAM_SQLite_PURGE_SQL}" >/dev/null if [ "${USE_SQL_OPTIMIZATION}" = "true" ] then # Enable the next line if you don't vacuum in the purge script echo "vacuum;" | ${SQLITE_BIN_DIR}/sqlite "${name}" >/dev/null fi done 1>/dev/null 2>&1 echo "">"${DSPAM_SQL_TMPFILE}" return 0 fi } # # Use a lock file to prevent multiple runs at the same time # DSPAM_CRON_LOCKFILE="/var/run/$(basename $0 .sh).pid" # # File used to save temporary data # DSPAM_CRON_TMPFILE="/tmp/.ds_$$_$RANDOM" DSPAM_SQL_TMPFILE="/tmp/.ds_$$_$RANDOM" # # Kill process if lockfile is older or equal 12 hours # if [ -f ${DSPAM_CRON_LOCKFILE} ]; then DSPAM_REMOVE_CRON_LOCKFILE="YES" for foo in $(cat ${DSPAM_CRON_LOCKFILE} 2>/dev/null); do if [ -L "/proc/${foo}/exe" -a "$(readlink -f /proc/${foo}/exe)" = "$(readlink -f /proc/$$/exe)" ]; then DSPAM_REMOVE_CRON_LOCKFILE="NO" fi done if [ "${DSPAM_REMOVE_CRON_LOCKFILE}" = "YES" ]; then rm -f ${DSPAM_CRON_LOCKFILE} >/dev/null 2>&1 elif [ $(($(date +%s)-$(stat --printf="%X" ${DSPAM_CRON_LOCKFILE}))) -ge $((12*60*60)) ]; then for foo in $(cat ${DSPAM_CRON_LOCKFILE} 2>/dev/null); do if [ -L "/proc/${foo}/exe" -a "$(readlink -f /proc/${foo}/exe)" = "$(readlink -f /proc/$$/exe)" ]; then kill -s KILL ${foo} >/dev/null 2>&1 fi done DSPAM_REMOVE_CRON_LOCKFILE="YES" for foo in $(cat ${DSPAM_CRON_LOCKFILE} 2>/dev/null); do if [ -L "/proc/${foo}/exe" -a "$(readlink -f /proc/${foo}/exe)" = "$(readlink -f /proc/$$/exe)" ]; then DSPAM_REMOVE_CRON_LOCKFILE="NO" fi done if [ "${DSPAM_REMOVE_CRON_LOCKFILE}" = "YES" ]; then rm -f ${DSPAM_CRON_LOCKFILE} >/dev/null 2>&1 fi fi fi # # Acquire lock file and start processing # if ( set -o noclobber; echo "$$" > "${DSPAM_CRON_LOCKFILE}") 2> /dev/null; then trap 'rm -f "${DSPAM_CRON_LOCKFILE}" "${DSPAM_CRON_TMPFILE}"; exit ${?}' INT TERM EXIT # # Create the temporary file # UMASK_OLD="$(umask)" umask 077 [ -e "${DSPAM_CRON_TMPFILE}" ] && rm -f "${DSPAM_CRON_TMPFILE}" >/dev/null 2>&1 [ -e "${DSPAM_SQL_TMPFILE}" ] && rm -f "${DSPAM_SQL_TMPFILE}" >/dev/null 2>&1 touch "${DSPAM_CRON_TMPFILE}" touch "${DSPAM_SQL_TMPFILE}" umask "${UMASK_OLD}" # # Check for needed tools # if ! check_for_tool awk cut sed sort tr grep then # We don't have the tools needed to continue. [ "${VERBOSE}" = "true" ] && echo "This script needs awk, cut, sed, sort, tr and grep to work." exit 2 fi # # Try to read most of the configuration options from DSPAM # DSPAM_CONFIG_PARAMETERS=($(dspam --version 2>&1 | sed -n "s:^Configuration parameters\:[\t ]*\(.*\)$:\1:g;s:' '\-\-:\n--:g;s:^'::g;s:' '[a-zA-Z].*::gp")) if [ -z "${DSPAM_CONFIG_PARAMETERS}" -o "${#DSPAM_CONFIG_PARAMETERS[@]}" -lt 3 ] then DSPAM_CONFIG_PARAMETERS=($(dspam --version 2>&1 | sed -n "s:^Configuration parameters\:[\t ]*\(.*\)$:\1:gp" | tr -s "' '" "'\n'" | sed -n "s:^'\(\-\-.*\)'[\t ]*$:\1:gp")) fi if [ -z "${DSPAM_CONFIG_PARAMETERS}" -o "${#DSPAM_CONFIG_PARAMETERS[@]}" -lt 3 ] then # Not good! dspam --version does not print out configuration parameters. # Try getting the information by parsing the strings in the DSPAM binary. if check_for_tool strings then DSPAM_CONFIG_PARAMETERS=($(strings $(whereis dspam | awk '{print $2}') 2>&1 | sed -n "/'\-\-[^']*'[\t ]*'\-\-[^']*'/p" 2>/dev/null | sed -n "s:' '\-\-:\n--:g;s:^[\t ]*'::g;s:' '[a-zA-Z].*::gp")) if [ -z "${DSPAM_CONFIG_PARAMETERS}" -o "${#DSPAM_CONFIG_PARAMETERS[@]}" -lt 3 ] then DSPAM_CONFIG_PARAMETERS=($(strings $(whereis dspam | awk '{print $2}') 2>&1 | sed -n "/'\-\-[^']*'[\t ]*'\-\-[^']*'/p" 2>/dev/null | tr -s "' '" "'\n'" | sed -n "s:^'\(\-\-.*\)'[\t ]*$:\1:gp")) fi fi fi if [ -n "${DSPAM_CONFIG_PARAMETERS}" ] then for foo in ${DSPAM_CONFIG_PARAMETERS[@]} do case "${foo}" in --sysconfdir=*) if [ -z "${DSPAM_CONFIGDIR}" -o ! -d "${DSPAM_CONFIGDIR}" ] then if [ -f "${foo#--sysconfdir=}/dspam.conf" ] then DSPAM_CONFIGDIR="${foo#--sysconfdir=}" fi fi ;; --with-dspam-home=*) if [ -z "${DSPAM_HOMEDIR}" -o ! -d "${DSPAM_HOMEDIR}" ] then if [ -d "${foo#--with-dspam-home=}/data" ] then DSPAM_HOMEDIR="${foo#--with-dspam-home=}" fi fi ;; --prefix=*) if [ -z "${DSPAM_BIN_DIR}" -o ! -d "${DSPAM_BIN_DIR}" -o ! -e "${DSPAM_BIN_DIR}/dspam" ] then if [ -e "${foo#--prefix=}/bin/dspam" ] then DSPAM_BIN_DIR="${foo#--prefix=}"/bin fi fi ;; --with-storage-driver=*) STORAGE_DRIVERS="${foo#--with-storage-driver=}" #STORAGE_DRIVERS=($(echo ${STORAGE_DRIVERS} | sed "s:,:\n:g" | sort -u)) STORAGE_DRIVERS=($(echo ${STORAGE_DRIVERS} | tr -s "," "\n" | sort -u)) ;; esac done [ "${VERBOSE}" = "true" -a -n "${STORAGE_DRIVERS}" ] && echo "Enabled drivers are: ${STORAGE_DRIVERS[@]}" else [ "${VERBOSE}" = "true" ] && echo "Warning: dspam --version does not print configuration parameters!" fi # # Try to get DSPAM bin directory # if [ -z "${DSPAM_BIN_DIR}" ] then for foo in /usr/bin /usr/local/bin /usr/sbin /usr/local/sbin /opt/dspam /opt/dspam/bin do if [ -e "${foo}/dspam" -a -e "${foo}/dspam_clean" ] then DSPAM_BIN_DIR=${foo} break fi done if [ -n "${DSPAM_BIN_DIR}" -a ! -e "${DSPAM_BIN_DIR}/dspam" ] then [ "${VERBOSE}" = "true" ] && echo "DSPAM binary in directory ${DSPAM_BIN_DIR} not found!" exit 2 elif [ -n "${DSPAM_BIN_DIR}" -a ! -e "${DSPAM_BIN_DIR}/dspam_clean" ] then [ "${VERBOSE}" = "true" ] && echo "DSPAM clean binary in directory ${DSPAM_BIN_DIR} not found!" exit 2 else [ "${VERBOSE}" = "true" ] && echo "DSPAM binary directory not found!" exit 2 fi else for foo in ${DSPAM_BIN_DIR} do if [ -d "${foo}" -a -e "${foo}/dspam" ] then DSPAM_BIN_DIR=${foo} break fi done fi if [ -z "${DSPAM_BIN_DIR}" -o ! -e "${DSPAM_BIN_DIR}/dspam" -o ! -e "${DSPAM_BIN_DIR}/dspam_clean" ] then [ "${VERBOSE}" = "true" ] && echo "Binary for dspam and/or dspam_clean not found! Can not continue without it." exit 2 fi # # Try to get DSPAM config directory # if [ -z "${DSPAM_CONFIGDIR}" ] then for foo in /etc/mail/dspam /etc/dspam /etc /usr/local/etc/mail/dspam /usr/local/etc/dspam /usr/local/etc do if [ -f "${foo}/dspam.conf" ] then DSPAM_CONFIGDIR=${foo} break fi done fi if [ -z "${DSPAM_CONFIGDIR}" -o ! -f "${DSPAM_CONFIGDIR}/dspam.conf" ] then [ "${VERBOSE}" = "true" ] && echo "dspam.conf not found! Can not continue without it." exit 2 fi INCLUDE_DIRS=$(awk "BEGIN { IGNORECASE=1; } \$1==\"Include\" { print \$2 \"/*.conf\"; }" "${DSPAM_CONFIGDIR}/dspam.conf" 2>/dev/null) # # Parameters # if [ -z "${PROFILE}" ] then if read_dspam_params DefaultProfile && [ -n "${DefaultProfile}" ] then PROFILE=.${DefaultProfile} fi else PROFILE=.${PROFILE} fi [ -z "${LOGROTATE_AGE}" ] && LOGROTATE_AGE=31 # System and user log [ -z "${USE_SQL_PURGE}" ] && USE_SQL_PURGE="true" # Run SQL purge scripts [ -z "${USE_SQL_OPTIMIZATION}" ] && USE_SQL_OPTIMIZATION="false" # Do not run vacuum or optimize [ -z "${USE_SQL_AUTOUPDATE}" ] && USE_SQL_AUTOUPDATE="false" # Do not automatically modify purge days in SQL clause [ -z "${PURGE_ALL_DRIVERS}" ] && PURGE_ALL_DRIVERS="false" # Only purge active driver [ -z "${VERBOSE}" ] && VERBOSE="false" # No additional output if [ -z "${SIGNATURE_AGE}" ] then if read_dspam_params PurgeSignatures && [ -n "${PurgeSignatures}" -a "${PurgeSignatures}" != "off" ] then SIGNATURE_AGE=${PurgeSignatures} else SIGNATURE_AGE=14 # Stale signatures fi fi if [ -z "${NEUTRAL_AGE}" ] then if read_dspam_params PurgeNeutral && [ -n "${PurgeNeutral}" -a "${PurgeNeutral}" != "off" ] then NEUTRAL_AGE=${PurgeNeutral} else NEUTRAL_AGE=90 # Tokens with neutralish probabilities fi fi if [ -z "${UNUSED_AGE}" ] then if read_dspam_params PurgeUnused && [ -n "${PurgeUnused}" -a "${PurgeUnused}" != "off" ] then UNUSED_AGE=${PurgeUnused} else UNUSED_AGE=90 # Unused tokens fi fi if [ -z "${HAPAXES_AGE}" ] then if read_dspam_params PurgeHapaxes && [ -n "${PurgeHapaxes}" -a "${PurgeHapaxes}" != "off" ] then HAPAXES_AGE=${PurgeHapaxes} else HAPAXES_AGE=30 # Tokens with less than 5 hits (hapaxes) fi fi if [ -z "${HITS1S_AGE}" ] then if read_dspam_params PurgeHits1S && [ -n "${PurgeHits1S}" -a "${PurgeHits1S}" != "off" ] then HITS1S_AGE=${PurgeHits1S} else HITS1S_AGE=15 # Tokens with only 1 spam hit fi fi if [ -z "${HITS1I_AGE}" ] then if read_dspam_params PurgeHits1I && [ -n "${PurgeHits1I}" -a "${PurgeHits1I}" != "off" ] then HITS1I_AGE=${PurgeHits1I} else HITS1I_AGE=15 # Tokens with only 1 innocent hit fi fi # # Try to get DSPAM data home directory # if read_dspam_params Home && [ -d "${Home}" ] then DSPAM_HOMEDIR=${Home} else # Something is wrong in dspam.conf! Check if /var/spool/dspam exists instead. if [ -z "${DSPAM_HOMEDIR}" -a -d /var/spool/dspam ] then DSPAM_HOMEDIR="/var/spool/dspam" fi fi if [ ! -d "${DSPAM_HOMEDIR}" -o -z "${DSPAM_HOMEDIR}" ] then [ "${VERBOSE}" = "true" ] && echo "Home directory not found! Please fix your dspam.conf." exit 2 fi # # System and user log purging # if [ ! -e "${DSPAM_BIN_DIR}/dspam_logrotate" ] then [ "${VERBOSE}" = "true" ] && echo "dspam_logrotate not found! Not purging system and user logs." else [ "${VERBOSE}" = "true" ] && echo "Running dspam_logrotate in the background" ${DSPAM_BIN_DIR}/dspam_logrotate -a ${LOGROTATE_AGE} -d "${DSPAM_HOMEDIR}" >/dev/null & fi # # Don't purge signatures with dspam_clean if we purged them with SQL # RUN_FULL_DSPAM_CLEAN="NO" # # Currently active storage driver # ACTIVE_DRIVER="" if [ ${#STORAGE_DRIVERS[@]} -eq 1 ] then ACTIVE_DRIVER="${STORAGE_DRIVERS[0]}" else read_dspam_params StorageDriver if [ -n "${StorageDriver}" ] then for foo in hash_drv mysql_drv pgsql_drv sqlite3_drv sqlite_drv do if ( echo "${StorageDriver}" | grep -q "${foo}" ) then ACTIVE_DRIVER="${foo}" break fi done fi fi [ "${VERBOSE}" = "true" -a -n "${ACTIVE_DRIVER}" ] && echo "Active driver is: ${ACTIVE_DRIVER}" # # Which drivers to process/purge # if [ "${PURGE_ALL_DRIVERS}" = "false" -a -n "${ACTIVE_DRIVER}" ] then DRIVERS_TO_PROCESS=${ACTIVE_DRIVER} elif [ ${#STORAGE_DRIVERS[@]} -gt 0 ] then DRIVERS_TO_PROCESS=${STORAGE_DRIVERS[@]} else [ "${VERBOSE}" = "true" ] && echo "Warning: Could not get a list of supported storage drivers!" [ "${VERBOSE}" = "true" ] && echo "Warning: Could not determine the currently active storage driver!" DRIVERS_TO_PROCESS="" RUN_FULL_DSPAM_CLEAN="YES" fi # # Process selected storage drivers # for foo in ${DRIVERS_TO_PROCESS} do case "${foo}" in hash_drv) clean_hash_drv ;; mysql_drv) clean_mysql_drv ;; pgsql_drv) clean_pgsql_drv ;; sqlite3_drv) clean_sqlite3_drv ;; sqlite_drv) clean_sqlite_drv ;; *) RUN_FULL_DSPAM_CLEAN="YES" echo "Unknown storage ${foo} driver" ;; esac done # # Run the dspam_clean command # # NOTE: The hash driver does not work with dspam_clean. So under no # circumstances do run dspam_clean if the hash driver is the # ONLY or the currently used driver! if [ -n "${ACTIVE_DRIVER}" ] then if [ "${ACTIVE_DRIVER}" = "hash_drv" ] then [ "${VERBOSE}" = "true" ] && echo "Hash storage driver detected (not running dspam_clean)" else [ "${USE_SQL_PURGE}" = "false" ] && RUN_FULL_DSPAM_CLEAN="YES" run_dspam_clean ${RUN_FULL_DSPAM_CLEAN} fi else # Storage driver probably statically linked. Not running dspam_clean # because of potential risk that the storage driver used is the Hash # driver. [ "${VERBOSE}" = "true" ] && echo "Could not detect current storage driver (not running dspam_clean)" fi # # Release lock and delete temp file # rm -f "${DSPAM_CRON_LOCKFILE}" rm -f "${DSPAM_CRON_TMPFILE}" rm -f "${DSPAM_SQL_TMPFILE}" trap - INT TERM EXIT fi dspam-3.10.2+dfsg/contrib/dspam_maintenance/dspam_maintenance.10000644000175000017500000001172311622570546024030 0ustar julienjulien.\" $Id: dspam_maintenance.1,v 1.0 2010/04/26 22:28:31 sbajic Exp $ .\" -*- nroff -*- .\" .\" dspam_maintenance .\" .\" Authors: Julien Valroff .\" Stevan Bajic .\" .\" Copyright (c) 2010 Julien Valroff for the .\" for the Debian project (but may be used by others). .\" .TH dspam_maintenance 1 "Apr 26, 2010" "dspam_maintenance" "User Commands" .SH NAME .B dspam_maintenance \c \- remove old signatures and unimportant tokens from the DSPAM storage backend .SH SYNOPSIS .na .B dspam_maintenance [\c .B \--profile\c =PROFILE\c ] [\c .B \--logdays\c =no_of_days\c ] [\c .B \--signatures\c =no_of_days\c ] [\c .B \--neutral\c =no_of_days\c ] [\c .B \--unused\c =no_of_days\c ] [\c .B \--hapaxes\c =no_of_days\c ] [\c .B \--hits1s\c =no_of_days\c ] [\c .B \--hits1i\c =no_of_days\c ] [\c .B \--without-sql-purge\c ] [\c .B \--with-sql-automatization\c ] [\c .B \--with-sql-autoupdate\c ] [\c .B \--purgescriptdir\ =directory\c ] [\c .B \--with-all-drivers\c ] [\c .B \--verbose\c ] .ad .SH DESCRIPTION .LP .B dspam_maintenance is used to remove old signatures/tokens and unimportant tokens from the DSPAM storage backend and purge old log entries in user and system logs. This script can be called from the command line or run from within cron. Either add a line in your crontab or add this script in your cron.{hourly,daily,weekly,monthly}. Running this script every hour might not be the best idea but it's your decision if you want to do so. .SH OPTIONS .LP .ne 3 .TP .BI \-\-profile= PROFILE\c .IP Specify a storage profile from dspam.conf. The storage profile selected will be used for all database connectivity. .IP .B NOTE: \c See .B dspam.conf \c for more information. .ne 3 .TP .BI \-\-logdays= no_of_days\c .IP All log entries older than .B no_of_days \c days will be removed. .IP .B NOTE: \c Default is .B 31 \c days. (for more info: .B man dspam_logrotate\c ) .ne 3 .TP .BI \-\-signatures= no_of_days\c .IP All signatures older than .B no_of_days\c days will be removed. .IP .B NOTE: \c Default value is set by the .B PurgeSignatures \c option in dspam.conf, if this option is not set, the default value is .B 14 \c days. This option is only used for the Hash driver. .ne 3 .TP .BI \-\-neutral= no_of_days\c .IP Deletes all tokens from the target users database whose probability is between 0.35 and 0.65 (fairly neutral, useless data). .IP .B NOTE: \c Default value is set by the .B PurgeNeutral \c option in dspam.conf, if this option is not set, the default value is .B 90 \c days. .ne 3 .TP .BI \-\-unused= no_of_days\c .IP Remove stale tokens which have not been used for a long period of time. .IP .B NOTE: \c Default value is set by the .B PurgeUnused \c option in dspam.conf, if this option is not set, the default value is .B 90 \c days. .ne 3 .TP .BI \-\-hapaxes= no_of_days\c .IP Remove tokens with a total hit count below 5 (which will be assigned a hapaxial value by DSPAM). .IP .B NOTE: \c Default value is set by the .B PurgeHapaxes \c option in dspam.conf, if this option is not set, the default value is .B 30 \c days. .ne 3 .TP .BI \-\-hits1s= no_of_days\c .IP Remove tokens with a single SPAM hit. .IP .B NOTE: \c Default value is set by the .B PurgeHits1S \c option in dspam.conf, if this option is not set, the default value is .B 15 \c days. .ne 3 .TP .BI \-\-hits1i= no_of_days\c .IP Remove tokens with a single INNOCENT hit. .IP .B NOTE: \c Default value is set by the .B PurgeHits1I \c option in dspam.conf, if this option is not set, the default value is .B 15 \c days. .ne 3 .TP .BI \-\-without\-sql\-purge\c .IP Do not use SQL based purging. Only run dspam_clean. .IP .B NOTE: \c Default is .B off \c (aka: use SQL based purging). .ne 3 .TP .BI \-\-with\-sql\-optimization .IP Run VACUUM (for PostgreSQL/SQLite) and/or OPTIMIZE (for MySQL). .IP .B NOTE: \c Default is .B off \c (aka: do not use optimizations). .ne 3 .TP .BI \-\-with\-sql\-autoupdate .IP Run SQL based purging with purge day values passed to dspam_maintenance. .IP .B NOTE: \c Default is .B off \c (aka: do not attempt to modify SQL instructions). .ne 3 .TP .BI \-\-purgescriptdir= directory .IP Space separated list of directories where to search for SQL files used for the SQL based purging. .ne 3 .TP .BI \-\-with\-all\-drivers .IP Process all installed storage drivers (not just the active driver). .IP .B NOTE: \c Default is .B true \c (aka: process all installed drivers). .ne 3 .TP .BI \-\-verbose .IP Verbose output while running maintenance script. .SH EXIT VALUE .LP .ne 3 .PD 0 .TP .B 0 Operation was successful. .ne 3 .TP .B other Operation resulted in an error. Run the script with .B \-\-verbose \c to get more information about error. .PD .SH COPYRIGHT Copyright \(co 2002\-2010 DSPAM Project .br All rights reserved. .br For more information, see http://dspam.sourceforge.net. .SH SEE ALSO .BR dspam (1), .BR dspam_admin (1), .BR dspam_clean (1), .BR dspam_crc (1), .BR dspam_dump (1), .BR dspam_logrotate (1), .BR dspam_merge (1), .BR dspam_stats (1), .BR dspam_train (1) dspam-3.10.2+dfsg/contrib/dspam_maintenance/README0000644000175000017500000000017411622570546021156 0ustar julienjulien$Id: README,v 1.01 2010/06/07 13:23:44 sbajic Exp $ Please read the comments found on top of the file dspam_maintenance.sh dspam-3.10.2+dfsg/contrib/plugins/0000755000175000017500000000000011622570546016307 5ustar julienjuliendspam-3.10.2+dfsg/contrib/plugins/dspam-thunderbird-extension.xpi0000644000175000017500000013740311622570546024467 0ustar julienjulienPK ø¼<<chrome/UT C bKØbKux èèPKhª9É)9f”š˜É´äÒóiR¼õƒa×:ìÇéþD[ek©’ŽÕÝ›*kU-W÷†óâ¹È,>PKõ¼<<•Þñ½¸ install.rdfUT > bK> bKux èè…T]o›0}n~…G_6©Æ„„6‰(U¥´ê¤Fªú±wƒ ñ 6²M“nÚŸ15Ûx ñ=çÜs¯ï%¼Ú9x£R1Á/©ë9WÑd>®o‰puélµ.Wív;w7s…ÌÐt¹\"ÏG¾%I¡zçï!W§ÎÔ%®h1ââËsl|Ï›#ZÔìSǤ \S•HVjcàXTúÒ©$_µ¬ãJã<‡æ,¥JV)ü!xÆ2£\—eÎlô–)@÷šòº.`Zó«ÅhŒšgÇôŒ³¢*æxoßUU–BjJºî(@5Ì+mÓ²,=o+N¨Œ™$5§M6¬1ê ÔRŒD?gAà¥Þ Ò`áÃ9ñ¸ÄÞ΃ñ–1IIrþ+D zÄ6î¿5#ßõ,dp4†âý:m ‡£Î'ú`Ô"ÿRðá"n¥àܘ&n¨Æk¬q_}WeœLç0âÎ}o ˜Ð ðìbA¼ØŸÇã*k&Lj*qaCöol¯'òÜ…¾ «©dPÍúéáznúÉH…ƒÛ²äCõµDð—Çû(ÙJQP3ÓÖR¯Œ7¯0™€ô*¨ 3hnÆÒ¦–ÙK%’b-dtWelLË(“ÂB»Èää¤ ëAI›Ô,®Q‹p÷UnŒ>ÝÖKœÑú°ÝG+âªÔåT[-ÉbTæUf–éC; »ì¯ÆK&›Å»âUÏ•2{¿½ÁÜHÈ/Ý@„pòjBê <™f*»„÷"Á9Uf±þs™%Í˜Òæ’GÕ²œ[´c“^˲VM7¾c錗¥lŒE]³m3ºÃ²ž‚ÈŽ‚ÅØ¿#@n뉚D9|yj m`ròUjøðü_¡p}3Fý{‹»Fã ÇOBd¾ýÑä7PKhª9<:óÚž/ß license.txtUT Ô ^Kø bKux èèU‘KkÂ@…÷ó+®Z·v(¥R_hª¸œ$7É-ÉL˜¹i´¿¾#±µ]ßÃw÷@γ5s¬¶KÌ¢™RiMÈ­2âaKHÍ%7í¾Ï>(ˆ ÂÊ~qÓhlû¬áKÎÉxÂa¤B"®ÂÉí4y|ÂÅöhõÆ ú ¾;Ð9§NÀ&$h»†µÉ K u…ÜN7‚ÍD±òî2†ýUA T-ÒÍãx†¨£FÖUq(+µ·¥ ×R{qœõBzSûÇ áþ B-m0IöXì'È´g?UÇEúºyOqLv»dž°yA²>ám±~ž‚Bƒ¥sçȇQøÚŽŠ{¢¿fª´£¹ï(ç2LÚhSõº"Tö“œaSÁqU‡ßhS á–EKØÚß“«Ÿ”úPKø¼<·Þ­{N½ºU_½?o®sÅšm®Ñ"bŽÑûÑ×RøÇaþ›“àŸ#;[g[gzUHàE(]i;8Ciwh@S`€ÿuRøkåÝÿ ‰®‰j€ (ÿdáÿóîDçhlúïÖ^`ÿ¿¬¥(mÙ.0 ôÜ(ãt],jµ[. ¡ÔÈn¹óJóàäéçͺÊÇ=7¶ÇH¤}|<œ4vl©ù3ÞƒOXâkø‘‚éêrý¾ ÖœkdsùHä=”*nÄüs®ƒ0—+ˆ ¬M´HõSõ_ÐúZZ3Lkf_ÅËC ®˜Ü²ÉvÏû ’¢8ažÞ讋…Æó',,+í`RK¯RjTNÌht/±% L/T£h&§¦óÊ/øœ·CájÉ®¹6†Ë[ÙÆïâ£^oo!w®eÆðlÚ!ÒÖE=~…eÕ’·?·¸|úèˆë8ò±Ñ½ˆuÙžf1*¨Lw„¿S®øñ­Ì÷DZ4Q(/%7|Fì†ùÅÉǰöë~6Y Náå—hšÑÊ0›3ËÒÏ  ?'ÄÈnHL†Ñ}×LŠï08Q劎`Ïo¥‚shgñ‚ƒér{6³»ê9É|ç}Tw’ÇeÀ÷gŒZ3YD9 dÂ÷ºù5»õƒ#mp €hPÔò''[3G:wëÿÊšUvìÖ|éüB.Â,’tõVŠS†©T#çKú 3ÅPÔõúšq£Hµ¶l4ñôììø¸9ø¶3fòH¤TC{¦ú”¦¡çð˜{áµh¾KI¤$=FŽk÷2üzÅ>Nû-7"ã.i­¡­/ç!×óžô±AmX|¬ÅÔƒ/_c;ê@eºÒ ûKH’ž+ǽh£ú‰m£Ê™Â1ÑkO˜Ö}›ENlãï•XÞTª ™¡LCú£OÊ ¦V:® ô4”zËNUýþpŒP3„²ŒÑ÷ÜØ7˜ø*>Hü!cô+þw°Ú}v5€uŽèÃÛBÝ/àþaÅO¾Û?g›Ë´ý©/là #ò'cìžåºvïp±ßM¼ßÙWaÁDTö&pàlŒ°Ð°ŠQ;iADé–5·/”嵋8ÚÂì—!!ñ™HÑ(-ƒWï|é±nE{ö\8OàÉ<ŸGHujj?µžKh3D¤ˆ(«¹+»~PÄ¥Ø$–‰‹­’¸TñdÍŽ™ëýkªIé>¥äBN7qÙ^f$@X¤]†Bk¾¸”¥k¼7„;Tº½»¹½ÀdpG©¬¦×µàìbóþÕ«DQUËÀx þÉ«ìì-ìlè,þ+—šÒvÚ`CàËê:* 2ÊlðtÙ²@b¯6Ýg‰¸ÐfÊ€BAéÈÇ—üÚé„ö—Oh:”;÷äi‘¸¼nµ£É?c&ˆœ2t$F‚˜Qíg>ã!ŽLÒ®#E¦‰ÂèJçšfE=d–^ 5±ô%£|;϶5Ç&+ÁFpÛòœB”¢YùÖ*éüYƈ)ãƒR›Ñů;4šDY††!,#»t=Ðtnß!;èLå"~–åm<\“©‘”VIÔ6‘æ˜ý0³Ô>´À©î°Ÿ¸Ü H /ïOo^Ö4Œrjõ"Ö6>Ò'@Q“**¨=ë(?Ùi$hÕÕ-qæ}–ÇǾ-žjVÏX¢;ÿªŸ†öžµô—Ks¼ d²8‹0;ŒErñ-¼Ë‚!Õ½ò>¹7©{B'_ ~2‰w8JԉƤ­ Ó;>k¶Ô–†eXm.5i¢hAú QJp™õÑ»¦M<9æY¡˜ší« ¸r¯©ðèÉYo˜òå/›¢3 ö:ÝšŠUÔ(˜ @«2%&èR™ýj†=Uóø*ÊÎ/©KŒø¾ËŠûlhRz– üa•9ÿ¦Æ“\Q«ÙÇeò:ÄØfp_ÜWRiÏ©Y¿{È(­¢ÀWÀ”e;ñá,†À%ë\IP qn¾‘š{\®!¿-ªì°¡²ÚÍ2X•ŠÕi’ê3¸©Í"äÅð–£”œ€ÏW£¡àBI¿®=NT¤DIêÔƒ¤°' Áë¹tËY7l1ËVJí'¬ ÷õísŸû—c{ŸPXEörjþA0ÎŽVÇΫr!’š’jíœ{]õU¡2k–ñéT€(Ç/_4 *û4^h™fÞ÷å¹,÷5f˜; ~Š’°–'¯x·XZÀMè Œw´Ô¡QÿBO|!ª [vžeä¡).IÌ»{Ã[àä‡\´J–aÊR=öÄò✰ÍËAÂæLä]*¨E§Ç 'fG;\r>J2¼±Í«µ¶y–ÅÓÍ-£±¿)ù bûNõÓKÛ( Èl⛥}˜8}o‹rò=+Õc ljÁ¢ª¹£¸Ån‰£>~¼ÎÈ|š5æñž§ÈMâ85Ðõ(À»'µ šþ:c-X¡5º¢62 Ái =ßj/ ªiºú3èíà€{¥ÔêmÐ1¿-úQfÒŒ‹Ëâ›îBs#%ufÀ®uÈàW7s3ÝG3²²un…ùø(Ü•€ïm JÿZÝ (/`Õý¡O6Ä„êzè[¦6Q•<ð-L9Ja¿Ó§½”Κ¼v†'`ÍîO:+ð襭¦k(AïØ1WíÎŪ¿l‰ÆWùÙ¼%5ô‚TZÁ·ÕʹήC<þy‡ëœÁб _ŽôÀìtµ¸šýøi'd9¥; Gø¼W¡’Ÿ»å¿«mR:— ytÖÛ e.an#L‚þü^i ÁªÌb5“h1ݬ-íV5ÐV¯HAiľüÜ’ÀñÖÿý¢mAM½€µ »Otßø¸í0«T›”ß‘v¶mdž+ŽHŸ²â¨5ÙÆiN±•` †á§•ˆ îQmÚ úfKããÀqAnšA²à›5!“ê>òÕÄ«ÆÅv á™Áï[H}‹Th È™ÔªÔú"-Mp’Ýütíò¨¸0縒}…Ë¥Áö§£â3w§kðÕË×MËnvŽÇL#z-Ÿ¿h¾Ór¡¬YÒféZ}+y~Ôij×-ÖWèçCXê©Ônj3p5¥ºýŠ/~×ì“ìC¯Ø&ò2ã¾4‡“ŸŸêÞmìû‡¦+Âùu!¼/Nºv`¤DmBôr¸`˜~§÷™âÓÂ,ƒS—cÊTfËÞu(ª>=òµáL—Ý4íæ$¥Ås<{#*‡eq Tgÿ,V˜MBŠ3¤ÝlܶèL‘Òà¦ýƒzϦBÈìÛ¶è´D¢ûÝØ}§M/jtf‘+áFñ;"„3Äjeð¥3ïSøñE«Wå`ðLõÅ­´¹Wh‡ì=;ä…VÌÍ)Aé´›¦µGž*ãùsBgí­´ð¨Ã³[ï%Šqkªìâ]âAee0˜….‚:ç¶ûÎèEÌÝŽ?õ¥Çènù¡%l?5(ô@;§µr#Ns“Éèþ_)nÐQ¢ûo9€€ðO”oìdo`óßþ•ºÝ_Âÿ¦ù‚šÆ‡ÂtYrÆÏrQÇZ‰étŸÚwšE¥Î¡¥e²ˆOÖaõÛ¹E:¢ˆØhš¤°ÌèðzÝLpóNGE’Žsªð ˜Åp|FZT˜ÍÀº#½;vþLž”J-ÏfFJÐ`•z?Üwô&œ•XcÒ}s—3>ÓõŒC~¯xÎÙÿìup2š—ƒ©(§29(*WXg4{óúÌ=Îësø¹Éɨ?˜È²Ç…¿`%R¡\¥ ×ï~ˆbÀ„ÒM¹ôz RÒ 3²´ÿ(È%­ëUn@Mû0PŸaÞ£æ8`;Kƒ¦`ÐÞ#šZ®€T3Ÿq“ƒËa*Õ)‹¬±¹ú8ËßF©*‰&¸“ß„ðüøQC9¿hÝk;I¤^Y£Á•ÈQ®ÇGœ ~nløEEÄŠ¬ÅqêË…3¤nTFàAÉàÅŽØ(×íËÿÝ R©¶ÖÍw„ÌÙê%1¢*üÛÜ ü`­0Çôâr‡ÜçìÙk ÕÏ)SHó@̧õô¤¦ÞáÝhÚ<À+`zO¢£Þ^¹êB„0߇؊Gqx†%ÿ Ú&ÅW[#{ïßQ]¼ëq¹+£ZQk05:;«KÒþ¨EzîÂJdÙ¥Ó6 ú}|5ÆpcAVI1¢,û˜æèÂܦG†¸™xYŬ8å^Ó ¢˜éÞIÕXÒñpóâ,a±™J È÷kñ¨Go2§·wÓ&õæ–ί?qN:„¹îŽà£H%Do׃•¦ÿ@ÓNú1Îl‰ÚºíÙmèø]å4çºÈRˆEÒ}l±¶ÎátJ€Y˜Ù•Õ‡cÐ^y¼}2÷Nám}äz#!´{6ð>nÁ‚;š àǸQ\YvÃp‰ç¢ÅÙZkò·º²¢ªÙaócÀtTëXa%EKG·}œÊ–)Ì™}œÇA› š>%¿…n¦»GE㤾¬®ß'6¶”Ê\]mJ>Se§òBê£Ð*ù›ÚZyþƒ9“Ï›Áã»ûëþãÀéëîQXãBÐÙœ?æ©$–úÔXÐÓk“R$þ¥¢Ã8c=ô¸sÌU¶Œ¡ÁEÍ‘nŽM*½B•J·ýéµ­¯9 h7º~s ³Šr)–½<¹g‡êç¿S‰Þù« Y½IóŸ{”F¶;<ï»˪մ¨š[kÞ¤rá¹Ã4¾ÕmÕï%°ZÅC>´ÇT…¡†e¨¬%Ó«sÜÎÒi¥M"ÜALÑ=™ß”æâ@1Ä¥om»JYUCñ¸ÇUǢïI½< ¥k‘ê´*YÌ ši¨£ õ£¿Ë§g;šøŸìxR[áu^œjCwNØ0âw£èƒoHo3¥wuì<×tè<ÙÍ×É:¬RzÚÁŒ¯6tS‚R{ƒngjN¿éÖz“ÎùÏ‘¾èfq½È;ä½Ýl|³X~Àÿ•(ͨ ÿ~ZûÛÿ‰œíì¬ þÛÝÚY¸@±—ìÂŒîj[Ø%â¶; P±YW 3„ó3P——/’›æVѧþþ€†$¾þ§y–+>|uK‘çðBï¾°mt)w6ÓÝ1Ò£ÑÞr/S%ò&‚¶ÈµtlîŽßýúY¢9®5›7ÀÍcLZ·D `z©¢äža9¥÷,ġêuéeÈ8ˆe´‘#\u¥8•º'SŸ.iÇÀÿ:]Õ¯ü¿….Ï¿N÷ºÿÍt¯´ìþ²®”Ü@*\y‰ËÀ6‰k(E+6 ^‹¡;ÃìüÚ¾PäÆßWl1ÉFÃ÷Ú3JÎ+QêPçÎÖ]¬ø6h®÷O¼}XEºDÙ6óÕÍ5SfúŠQ >g9†@’z¿áyH= ¤6H_bçQ@‡™Å.âWzßâÂm~%ÈéaœŠòˆ-¾Ï€Z\ã¾QÀ»Ã»:¨¤¥DAB1–.‰å›Ò-Ä!-ô`‹7Ÿ¡zÝ̰ÓÛåñÕÓåÖ4ãøPâfwgV·»ìïD%¸vׄØ.j&<½1ðO¿ÝJt;ÓZÓ›QôÁÄI[Ï¢ÄÊ9tÐ…#ºùþõ nKÀÖå“|Øat%*ÿ´¢L+GâY­ŠLÏúeL!;6l~D?æé úC¦¶°‘`ª˜ÂT•^Ð8.0H>å‰v­}ı0ÑN‰$±”/”&( 0_ŠÄÝ©'u±¨™î¹5 Á)üw!0)T–LO“÷1µ´ˆ7)+ƒèˆ _¬yž‰Sk×eù9ÖMCý ÞäÉK“RaÈøo¹Í“NÚÓL£¦íÍ->?Y]ýÏ Ú`ß$c´Z%í Î$ 6âÃt ZŽì«M„6\ K]°d0׸Åùö~i?/‘±:Wl”…®[fÊY„)AäO¢…N¤ *[ÙÁ_wd‚Cá›ë 2'¦˜f„Km}¯ô¥¶ºÚõI¢¦É?j„g$“0õsH‰µ»¼0껥çj ÷pMÃG‹|Üătá¥íîÐpðéFˆã$Ãi íÆgCnkÂ{Þ$*ËÔ˜b‡ÑÓ~¦ãdtJ«o¤Å”âHqr'þY'Ò'ņgñ >Ü竟ª}æ[ ˜Í}‡$^ .X6ú=†1®®àÀe…Np£åGPX‹E{¶ ÓŠ—Ôf„@É徯, 5ãK­’8K?s´„ùUÞn"U1¿+»LÄKP*«„X‡oÈre¬0G…Ž" âP¸Ö= …$ Š¥F€’ž2 ÝñÔÏMý¶‘IbÒëÎÕu `ùmíäxÃ’f´S 'ë¯CÁÈì!\ÎRBEÝèqb™¼ÒOï\¿wô¿/*;$(d [ZÚ•«¸Þ)Õ7fæÍÚ™Ìéß@™Ÿz´¤ã®Á¼Å~÷ýÊŠTv @µˆéa}^ HÔ¿æ|‚Û&ä¼mhGF_\âôŽ“ƒîc-e´@ÎNÒa[GtËD|i,+Ÿo+ƒuH‚tQ<Ö³iº$Ìêàžo ‘Ωm1§ËJmK·ÓÙŽï8ÚBj¦µ\ÂÄUÈà–Ê:–˜~ÒI7Ý¢Um½—X–ÿˆf s•œö ;¸F9ö 6^´‘›^2‰%Ü`ŸÉÆèÿ…„$qŠ×šDÔ–)›Åñ˜Pû°\l\>¹^—–Þ,õ…•>ࣅ¢ÛŒi:3|ái÷%­½ÙDÉt«˜ÑŒnì cÕ<Ý<*¾;ÜJd#3b×òÒÌô€SdÉÉàÎÄ`Z)VÇ e½VE30pµÚ…;“!Uö£ÀN†˜qßžŽ)¹ >EÀvÚ«•‰}®1ÐmŸÄHúm”(б¯^§1V àZr»²aon™tÅJ”U_„¶ÌÑ)úœô`v"?Óz;ñ¦¬~0µ±âÞÞ­¥¼ Ò÷ MQŸHèœÖ+7 C=ÇÎ`{ˆMÖ÷ŽÄEÈúRäJ§5“îs±|„V;½r­ÊÏÅE]w/¦JdBe]/ÅJ‡3„½Úš|‡Â6^P §Ãq&”´rº«†…dÈÃkZN½±fÓh^ÚÑu ÀÜèžèÝáÚ¨]SÌæe•ÙcŒ£{ð,«j·Ào_Î}Å5xmiŒñ¨Œ»=K$?¯bv(-´ N$s"ê#ÊÆmD&ªTy„ƒ‰T¤Á`{Ý¿‘ù[ØV?ÚC¯Ú R™,–Bz «M*R[ûK=1»‰lz˜ÇÝ“ÖÍnе»°ÌVÖá 铸½&f©OD‡ŒI-â?5®Š$˳çÆë”yÛ ~1¦FH¬}‚Ô¶Ñõ(‡7õ€ôûZw ve^Sâ§»d­JýÃ;U¹|r±|Ô9²·ÉSÖš´½xÊãÈĸüŸ!ÕɬƒWô•ï9âí‰/­«~zÜêF_BÖ‡0é£ï©¶E£v‰‹ ¶ñ¶Ù=d¢Ó‘+k‹ÎcGo”îÓ]|ÄŰxVD\½(CÐR-͸}" óúó]ëÕÇêLù wÜÕ’YÙB¤%¡<ç»;W<_vce‘ƒWèþY›_l(ËçAþ0ƒ2b”5jƒþzvÙàiDNë§UYÅ–Ñ2«Ûú ¼G£ð“"s(óçÃ¥¤›HÃ{/I®äì­c ¬Öü“ð ­ Ë·ÛC¾.þFk¬WkõAKËævS,·ç²Coê“çµ5ñ³#ú›†:'^æh #KBÙý˜+¼ì¡fO\•2“öA¨•öÖ«¹zž³7Ká"Çß{d6BexXäÙ|͉ò GgE®ùCÉ0¦»ä/'?³F‹?›…é*^ —Ì‘¸¡˜ "$K72òŠüŒ-üvQM¨¹ìùõ˜é·äÉïžøþ¯¢øß\ÁÚÎÈÀÚä¿Õìþs°ÿÇ€± ­ˆèÿ@ú#Eº…ù[­ãþG3ÿV®Û;ÚÙ›8:[˜ü—e{NrŸíLè/T! ã#°õ*á…&‰zŠy 0]ƒ¨¸ U~±ñÅB\C'ÛE¢íaü—ø§ob!ÖÐÑ¡é³MC6í1ƒMí®+’x~üŸ_œáöõ…QX#{ˆJµlc£ð½ä§Ö@ ´øúiͪtU¿¥¢9¤OOø4~[’°­ŒwLB´bi¡Ô¯Ðí~/Þ$Iqâmlk<#¢X(Àqòþ¸Œ¬Jbhi¾dÆj]ÔÉþ¢9_¦Ð4Â'ôði€èücU¼Ë‹„M¾ÖùRœÐx™ô#‰¦Xë+Ò¼jH¶ÑñÒ{vœÞŸ×3Ñ_Á)2IÞR!Õå,ÁýY°¨ªFþŠ*³âÝ8a–°²Ý:­#29ô„ä×Þ·uw°Ðº"nÔ}y}úà™ž.«Ÿú±5€MÓùtû^²ÙŠèU‰µTYˆUñ™ã™¡ãJ˜eÊ©ÐÕ-–x½…³4X¸Áf=Z‹Ô9µq"àÕQ7›L;9@Õ€GI­ãü¹5Õ•{a= ûtõÑíúõ#L"KMø^I3 é—y…vøõãäÞfÑ– gú_¸~ßöœ'oÔTØe÷dùA ¶ôCDX^Ä+û&ÒÄ4:¢çmŽ"ãB•h°ˆ„?žyP–åPwãš×­Ç¶ãáÉœ5°“|¯G¿þÐ0°zÚ0ÊIÐuµ=Þ;j«pÕ2WÈ:ƒ—©ÅÂð„ W9Ö¢ñÞ‰,šÙ,On9/S@ ˜ÅýPÄð·—Óž8 ¥Y0—•)Ñ•o¼¿·£Y{Õ%h[±¢CÛ©?£<¶çŒ0q̈©®Í5³µHAµqB¶¸G®Ý-`ë~¸ˆuýØ~¬bn½(F§9Û ÅÔŽh`àp >U©=÷ÅÏ®ãÿ¿¢H[ZUåÿEªûõý¯P¡È3ó?¡È˜ÿM‘€÷p"N/À0§„š,Y ®«³Q¦sõ,$–/Ä&à«Pfc}u_'â ‰Ýþ+W–oß=üæê›çÜPØqOÒìã©8YC‹¤{µ]¥żÈè‚©ÌÂM€–\7Û¢&¬¡ðÒ’+R†°wP½1àA¶O-¨hufÓ"þ½­}©+û£Q¸ÎÍA¯ÆÈ™(Ó< òàâŽkŸ×íõ$™Ò+Æ|­Ù~ñ±uKôŒ²œvHùË øÉžr¶dNüULƒ²ià76áS.x"Ÿ?`Ncêû?ø… ÍêçBjÿæÿR³"DñÞ©å2i•GBדáÏ/Å÷§®Aû·±äëƒØ²LÆ–<1™<±ÔÎz[ÁciFÍ”7=*…2ñò„‡¼_2tñ›( kz•faÏåÜ{à8j(pJêWêâÍ3 =Û(s3!èg4~—Õ~̲…‘1R¤u*!2Q¤„n”˜€LpeTê:›¿Ï fµk]÷ wÌìØ;6hr$õ›¥o‘AëAjaî&g#¡uÅÓboÜÿ‡ÔºÜ~©{m•üàA•lBó 1¶iD²üOŽsQ&5{æm]ZÝ4ºÛЍÔBŠg2ÉT*éFU²”¨H%¯1ù “Yw'»a³ fˆÇUY\æ¹”uvböub%-¯pÅ>¾–ß7…o SÇ↤ű–Õ¢giÅïþkšáÚf)ÃüX'ǰc"uT hfØ*PªòÈ&¤å|uþH™·Ñíã0H 6¿ó‘vÀ[üIAe¾%³\ïdjƒ¼¢é 94©åŠj-E‚œ‘B;‚à—©w0¥úm ^«?žP‡"Ò¤=EBNNÍ~<µ.¶ö`Þ«’ʼnËy¢ÆI×}–¿j bÖ<‰Û'­‹~ûþɰÿ•ž’[6r¢Ñ^LöAȪÙPEb÷®Ž:®LªB¡Ðíh¾‘ëvbR†n)¾< ÊxS¯h@nþh%ØeÉþjû7oûOm²v©­ë¦Ö}ˆ¹ð™D±+=7«Å@Í9‚† îÊÒïß™-.íRÙjWtqšnÌ™‡Z‘v{™žGV" ¾’ÔÂð1»¾çfäëa5„7kúĉ-£~-:ô*vMÌ£M¼80O䜬í×לùV›˜iÁ )(Q¡Ôár‰>‹Xü°€5Ê® Vp̼+üª‡]Ózÿqö5K`Ú“à5ªÝaÔ›› H»ƒŽv":ŸÊÁðÒ<^v”ˆq¦ HH tsGÔKB/BêÒŸKÀFtutEB«Ü2ÔE¾ß÷Žbƒ:U÷®0 Š07>DªIQ ü»L(ý³pÚ®¨S‹!Û'¡¢Ï?iGwã[/öïjëþ+µýs|ÿojKùÏ»$E0v%ô%»ß8Æ€Eèw:¦J%*n°zÏ`mŒ(’xËB¿5'T'À>H;ÆŒÃ9¤ ™WVqóýÏÍCã×ÇùÓÔ¹¯ÇOŒƒŽ âÄ8„ƹºQlE½°V†“ MG’—§j¾?`wS@ë\§ššÁ=GˆšÍ%‡à¸Æ¤½?‹huïüpáU2öQ.ÈŒîxNˆáFX¿UÒâðè­ÂÄ´OJHqA¢t‹ýõ´´ñOå1;%XjcJËŒt;†/ÀiT—æÊÁ¬D͘©"狪ŠòÙu.Çìº ÓŽêL½¼~HþŽëÍ·Q¼I²C<ƒÁIZË”¦ } jÿ¯Š)ŸøÈ™}Euý„üûgku R<ŠÄ團ö²×¢Õã=y «ÎåN«mÖ¡ Ùeü}Ãg„çÑB-w‚”©(„9VÙñxKžX²y›á€ËsiýaVA“±ºÂnU¨ópé¦ï/&ß½åôËÀã>§‡1Ç3dRx¬-Ñ?…͉ÕCŸ]Áãf‰øqk».ŠVù^ÅÔÓ¿~ÏšÆð§R¢Æ^f 8Ò]—¢­±É\9ß3Çã܌—ä}®Ò÷{iØž/ð°ù)2S£»k±wëö-x€YäUïTÛßtl@g]¢?5ÀfâYJlN[Ý‘yoiœ9Ð( Ýш#.±7Ô©³ú=ú±œøÒÖûýß+1пÞídeaû?¨ÀDæ5p þ6Œÿýõÿ´Övfv´Î&îÎtfÿ%u'¼ñ/Bô>ðNîaq:&÷ØàˆNcˆ3F„ÆWºZKU`haŸ­öcŽëgX +Fχã†Âjü&Œ‹œw¦ a¥"½b›iü|ø¾zXøxzïúªØÐÖ>X÷Wߥ½¥‡ Ùw_¿‹ŸT>öƒ{úš{ñ’c³¬Rõeä2‘&ÃæàäšÃÆÍÕš\h3¢Üˆšù€•˜pŒu/Ìš,'G^m_ú¾•<Õ¼ŒÉDB59jæââ÷ý|=Éóû¥¦¦öëW÷[CW×çÝÁHI i»ö÷Þ@ØËÍ= ÍäÌL¯×‹­©éñR¥½n—û÷ç[£Ù 99>¿/ß÷é\ÑÜÜ\<>Ÿû­¾±±±»»»¾~~YYYeåÅóÕFNNŽ --­¬¬,QÂéx µPAüÌIZZÚƒ{W```v6YRFfffb¢ãél08Üàà`pX8ØûÛ›"E²l›†–66vÅï‚‚»^vÿb±}€A¶ŸX¿,uP䤌!®´//9:núŸÏ 9EÆ45%Í_ºŠõ‘~’U5ÕÞ%=‚‹îOš .1©ËY6W¸+²»¸ö « Ôk!•0ÛÐ7ìÎ Œgɺ-*!®!ü¾÷ÆÀ·—oÌzäQsìKdô¦'¦°ZxÓ£•4'ee|üZÞÝÝ›X«Ý}Ì1O6­«}¬1çù{¼°ÕjåÕn‚‘rËj=ÃêS|~Ef›3Îaǚʸ¨áB#çñã©¢ÍÂ)'…5}¯îÄ9cenš!}oy KM´¥M™¥¾òÂÔ´ò»IåRǤ2îà:R\üg,­^n¨~>ºKZD©…µ?{õE¶¸F—S¦FWaf—¦†Ã—›pl•Ñã97Övç¹ ¶«vö:Üü”(Ý=Š ’ÉŒ”öfb¿Üû¹?F7èYϨ½Üø¾AnP¾×”:,%>ÓaSú ?Ý,»d'à¼qWŸÉ^º “‡2;ÝÄ>¢´|¿Š°…ˆÂ~¬™,÷i‚¹C©³Áíòy¼bS‹×»Ë ññ>ìE?œñÃOâ¾IeZáoú«M›2I[}Lchl'!²¹"Ë­¥«ŠŽRX0@¯‡2{Ú7°Ï‹/¡ãª’Î{{²ZVEm«"´r‰õY•w$ʘÈ/¤yd®²#á‚åȨxDÕ Kh{Þ¶ð&˜îÇœ¡ñ‰à£kTƒ©^–_Ö3MP©Çw qZ–0äˆpUæÈ£««“53°~¹ÌñÿÍ)¯='K«ZQlc Y¹,ýöTE Â!µ¾ñŠ–Â&jÔ'J•h¿a)ë¿!¬¼Ë}Ûù¬"Æ9nvu^š.4…vŠP_&öo˹ì.Ò5Á%•^¯úI[°E­½gànÄê„#¿íl’â@®ý–>Ñ.¯×îŸßãXíql9¿ µPU‚Ë Ò‹˜Õ—@ÉÁ…ÉíTÝʵš-#xå× }Ø =Ò¼Æ9Rú¹d¿_x•Î ?"R°™#²¹ê€o‹:ÛŸNN’»ÊýìwqRöÐʉٛ™Yå7o”ö¨³LCzó}é8lÌ=yœñŸXhãÛtÍ`š²É X^¿¦>T¹y¯]í[Ý>BV^ßîyÅòô"ûµ…4 TЦÐÕìrØTRóµM«UňTÚ‘s-ŠüG`ƒ©ýðh ßÂG™$Óº•ÜÚS}{þ$[⊦ývè{¹î‚©‘ûÕߌƒqìcE]p\žw~F=Xm§W\ c«Ø1Uá¹øúHÃâñÐO{Oò¼Þôê‡ûsï² ê®Æ1æŒ:*¬VÒ_äò, ·¼$äêÕB¦ÑÌ‚/]ˆA¹Ù<¿ÿ6`[¼×.âì‹Ñ!õ°5 hô!f´­Ýˆ˜NÿoÅœ&’ñô…Ɔpž ¨Äº‚»ê!¸Ë‰·5ð&õlÛ‹pÃޛ׉8ÉŽÇ¥½H{Á'|„—Û€g àycÒ2Ôöýñô—ÄÑnu³4®$!h æ ¾^’ËïÕ,=—4ݪyë½Ì Xd¹Š)E}„W›YËþ´œ¤A†³ª9Eð®ÊšÞeƦ—_!ÈwL™ì+µ_là˜çïA¨z f°[ä­n †ËÄ,Ü¿7—¹¹¨d>¶$WÛ¸›Ä¢ï¬ÖÙˆƒ%ÌÜÊÒ)<7$ÞØ®bÒêGÌÿÖb{²0l'½=íÚ_¼çééûÃá8lî&ù\ÂÚŒdÜØ¥v ï÷42EqéýPþ€C—¾J8ûÕYÇuËìÚVb‰TP¬¾ŠÐAΞp‘ÅÒ¼œYë|jù½¾¶Qñ{Ñ`m ¸GéÔä ܧf‹°/‹Þ§ÖÒsË•ÑÃÅ;ëçÑ7oò÷êò~Qú”ÃKÊŒ2é®D9\txa+<¶ôÂ6B3@e×$ùʾŠ#Iæ÷Xì뤾d%®t’×Ö¤skV‘p½XjdÎ2«ø%C_ô¨c338°ƒæ=CÌh‚”!<‰©øýèCoˆÚfãaó²í϶º/l¼(nwݪH`Í1)«>¶8Ĩ‡®¶?òµuü®.¡¹ä\5Ä<,/|óôÜ9da±zl[ µ9¥w2½”þlU©‡¹Ø·¸yäÌ¿…´ÜW@OY\* ‡Æ­¢8ªÌOåÐXÀ„»Û±moÿPd‡è—ä!R™6Yà• ^» ž7‹Æ{Þ{ÅÄ•eq|°E¬{âÇE1Ì'ìÔö 88Ë9C˜t@~uª ù+9BŽoµYÜ/к&σKßU¼fqõÉXÿµ> ‹Ò ~;C/߈º"@K$Pë<£ka¶5‘’­C3Fg{bÄgGÈwV‚"¯EŽ[wõÙw%ÿëö?jKO•#‹ÎÂ>i^XÁ£vL—ÒÁ¼¤³b¹G9Döäfø"A[”ñܤZPí£ÂÍ1ðœ&^ȤÎi¼˜Ž¥³»Y³¦¡K%höÄ´ä0™ã ´&ùÄàã± É-X'3Ç$®×ˆF^§8 ±ŠÅeËMçÎ h‚dOIÙ’ûèI¯W±CC‘óy@§Kù³r}`{±ƒµø‹l¨óa‘/3YµÔ#Ë­‚±4ì(¯»8ÊiY“NâŽý±ðÙ˜úæ˜f!óvQNÈicȺ–xN4¹Ã›÷œM&ÆC Ðm%úr&à:ßQ“ö ",Ë:€)ÛÀø ŽVÿ:¨Æ`0©D°¨>c˜²Ô^¶0"8X™”ø(a4Œ1‘¦p—a)8Œ7†Bq¶Vþño“!‘Y0 %u Z*R¡9”ltä>QCIFIxˆBTp%,Äq4²èx{(QD~”ÃÕh¨0¨6ͰH#¬È«<ÇùTt^‚âltaÚÇDa$·†t©}ÓÈ=†¡ßx3mäþÑEs„N<ïcóW*CÖ’‘‰ `µÑ ém (,ZOX Û‡ïü&ê Q XîÛ°YÁ(ìöÚõÝÙ†©ÑhiI娺PI›ó ²š…åaÁ"RTÌ…î%Š›’+ïØ*òG¨ný@<þ»ãÓý¹ÚšºšD¡ÂXRÆ;àþY”' ú A7Aà¾^š*‡‘Q$Bpn‘?5ŸÎÒ±P¨VÙ¤H×ÊäÚU#°FºOô=+ߢûÈ"G˜*›N¼¢BOþ&H¶êð¯Î‰?¿%”oJöKìÑþÄÑž=¸ˆH`€FCTIrhñŠ5á4!ˆÂfiáìxX`UÃô›´³ÎÌÇo"e b¡RkÇcÿ„TuE" ¢iº-[KžphÜUk;ø¢dz¯MÂÞˆlDß'@Vjý¦îïñ³XЄP|о“’’ó“ KJB„Ãàö\;ÿš ¡¥%$ŒëlJ–²#åþM}zue: õþAûzÇ"8ÑðzBƒµÙã“øw~#M­­È0`ˆBú™Çš>Ëä¡#ÏWÙ|>™ïïžÓÙœþ€Ãá¬6ÝŸÌä1óðLß^^WUE›zóág–¢ —Ô¢KA$'&&"9¶ã¼ÜìcÅ8>«âñzЍ©¡o´Ø§H1rp¨Ã¨èêNω3ÂIs½/§(‰âccYXD„†‚Ñév..¢|}}EÇÅ-lmÅ` ¾¿¿càâ’¦HÙh— Ì7Ð8ëˆ7KóòñM‚Ì™'}¼ü§ß7++«v‡sDi)Ùóåš°–ößggjnnµR“0fÜÂc°vwªÿ‘@œœÚ‘‘•u°\­5xàпÇð÷1740téÒûöæé3HXYQ 0Øwn¹óà‰‰‰q¸ßd–$ïïœx¿_r¼K?¢nKÍŸ±DˆªÓˆ ïÙ§ÿ>|BøßÅ×+kÄ êñùP×Ö><žÊz|~.¤HÏÉýNÕ#”$Aüô埚šjÛºV IDJ›9è;r$,Ùtf(NÎæñHLII1¼5lÔò©—bòêözAŠ[kw"‡ 3’æeÏM,Î -µ8í˜NË‹éÙ–…omÞwæ2„ ”(Q ì³™¬¼aa×¼—ƒß³Ç`ää¬@CC‹¤eO‹Ÿ2­§¹ˆœÎÁÓítº‰éûòåwqq±BŸºy®kh\8;ÌëZÐ2TQSSVU q_×£ ÖËJïZXk4²úúÔÉ!'l¾3V²y›é•¬Ë=¼ ¤.ÙÖ!ÊŠ²¦kh=þ—Žu}ýÐ0¶Ö¿w¾ÓVïÉ'JtÍéïÞÃþ™’¢r"5BúÿŠ¢d¯ñÜ ÿhÿ Š:ÙX[ÿÿ€¢ÃÿBQ ½wµÿ3aX1Œö;fþ'˜YÿÌ”¹JÝ‘Gù‹™ü/Ó9[˜ý¥ T4uDý`CJá‹ø‹èCåMñ–Õµ,gÊzš‹äŸÐÞ‰–M)R¬õ6 (O%6XFYbš 2‚ÒæF%k[9gÀ&AgÒ„²ïû’¶LI^×íNÇÙ7'º¯½²U•Zež^^ÀÕô­¿S¨Õö;èrOLp“•$(ï|òœ¹dÉ’ ìÝ>køyx²Ñþ>󥡡!;HBKtœ¼UÁðˇýv²ìлúH41äš[ ‹ þÛa@))©[ü™‡[xJ¶ðמ™«VN‡}1ãû€ªò*†äš¦µu Œ? 4Á'CÂ}ÕZ­cÙd$7½´¢2ó«´¬,bÈðo¾|D¨UTT`2—7ü”…mv²?Î,\n5†%$ íA8ŠnC±T$!EÔÕ8œ^\9;£ø÷õ Nç~…'ç66&)pˆ üa€-.µ °€"‘[ßÛ~åàµëHÓóñºÁ'ÔG»Sr‚nll4ÏYqI®8LÎi8q$Ïhj³ßSæâzVŒÇ?|ªé&¹Ê¡€ää;x3ã+h|h~‹„P888àˆøŠøÐÆn“—‡—ª°^"„'Q’Z®Õ‹[$9™Î!FJ+›+ ™ãâ6a÷È}±þ‹ƒ{ö¯ø>u bøyæ,‘öï·o¿XØÙ{Ó“’WZ®îKZ44ÖPs×ýþÍÏÏÿ™#Ò¹êl*¹Õ¿aü Çáî&Þ~&&G¿‡œ¤;æ{E‡Dq1éº*,”÷”<ôµž©Ú=ŸÎë,2-9y Äû3Ê%õ3ÉêÕ£¯¯mÿ.ó›á)“䯨uæ˜qzÿصZ›“YòÖU§bfa~>@FZZXÍ£ÉÁ£ eóNÚP>€É[î m¸’Äâê*FªÉßnªMÁÑÑ ®3nëèTÛ±’Aˆ7ÍùÅÅ% E•¤æØæß©ðàå¡Ô«Ó8¾Þe‹Øµ%ż¦ñu&{K#¨ªªV‡yÁ·ÚÚmèj)(Ä«îZd†&#LË.¤§§Kèu¹;ˆX¯Öí544¨ñÎ@“"A²ÈNœû …Wj¯ Ç`«¨ªÆTŒ#Í<,.ÓjýTkëÍtÐá}h@å ”¿¤EŽÁÀÊŠšØÌÚL„Óà´"‡Çãýg*‹ÝáG·ëUÚ{‡üÀ#›Ë%²ÙjEISSŠG µè‚«Ôb~{{zsÇÇÇÇûg$ÕdÏ/×ð¶ÿ‡Û5z*K«BW9¦ÆÙÑÉI1Ô"ßâáx€aµÅsÇìðÜ¥Ê(pÇtAbo¾§2'2Òf€ÆV…*H@J’ëŠÅ9#'éZø#ãíH oæ{:rS»Ÿ0¨ €~t*FAQ1 ¨BrqrFn½¯&4”9FÌÂz3!PáÔ§ƒR`Å®Û#^>w°ÅF{dÈE§é³ë3¨ç¦Ö‘¹†Šž¾¬¢‚Ñ M‚rÎåiÐËå «&NÛÌÑ2±ÿä–žE›‚žÞΉ¹&C‚ä[çãÁÛ%=44t¬L3¸ VÎ]±ˆEþ?‚ñÿÑËêÒ1MÚþíˆÿA/ûï¤2Ô4mhì‘™IN'SÎ feXTd yå…Ò‹vJ›)]:åT"&ÄóqVZŠþ±ÄGYÉÂÓ&Êd7%&öù&‚`È´A“DR¡Ú——‡·/¾™_¿O40pÏÉ(jË€™??™™÷M… ú|i'Ç—@‘ù;d½>?·¾—_• jưcùÌ”SSKI#¨|lÏw“3¹_ÌœoW#òFF7y¼^ºÊÂhèiÆ&&ZQ1 ¥¥¦Çl®N¸¢rì,~Ft®.)bb¾¹é^×Ù[Ú^@ °ŒZ^ZÈÊÈC¦!E£sKS¬Rh¨„1°í¿{4µô:]6–i+°Q±“–É«%Õ‰ã’èuZX¸ÈÞ?ân’vÈøå½ñ¼øŸOïŠðlä_®®—+«§Ò2±éÙ–ÙÕòjé¸Ui+yž&|?ßL줵²Û­\ë„Å¢‰ˆIÚ¹ºX“ØïÑGiofùºØ#D99à$+Y¬¦ÒRú6šÍ A™­¯¯W©ßml¶ÃÙmGgóé áá¡áà$ÐüEé·ƒ8Ü,v;)¹í:W›ýDÒzee~Û­ŽµÍMç½þ7f3*ˆýÝ4VA‰ºB"Þø®C÷í³ûDN4æ÷[Ñ/¬Ô&ŒWJ¶ûûŒ°‰ìâæ»<¾?ûŸš1_å­ }Æ­uËØÁaŽA+4PFð÷om\+³º WïAßÒDÐü¿žÈhÁ–3mÌ .CÖoXX@k†6uŒ… #++S*ŸÅ60iÚÞ¥¾© §çðþ‡Ïÿ7õbãä|{ºX‰ˆˆ˜Éã÷{<û›eÿEp£¿v»Ûëo²{±R+..®×ãý¶?µ··G.Ÿ  ËëýzÛäv³‹qzsssqqq~>oÎ’““ƒ‹‹»R££\¹DKK›F§ciþzöKOMM<ÑXVVö/¶™˜˜xxxXXœ%‘KKIÅâó모8_®Ö÷÷÷ÿ: ÊáÉÉÉñññᡱ™™™©éõf;31±Ñßñœý¥Y­V[YIIf˲¨ÈHÍ&ó„´´´ÎÎο¼ÕÝÝýwÓÂ’¿@HHAaÞÌÉû_Rb€ $H‘*Q àçßù„~|Uæ¸Mú1Ò—$` Wi6avo™`1¶øÀ›¾%l6Yy¼ei.³ÅAy¿Ñ)YÆ|¥á²7d­öª~ÕËÓÙ¼e}sœ,0ô»ÝÏ<Љ¢[ÒxâW§m¢é‘Uµ0,ϵÛk|¢õ{©èµJ[Ö½˜|_EÕA5ºP9þê°úêúftóÍ¡+›ÜyûâMi¬|9WÒÞZ?ñ8-×™¬Í±ÉœÿòKl*$ 6Ø{'}úûñ\l(Þ†[‡e—޽Kbƒ AÃîY®´p¨»Öë€C¤GÇy-ÃÝ·4Õ^=ÔïyÝé2t0¦BuQßoÂQܤÏB6TùZo%{ý(Ä ª–¼»Aa¯fÚØ×©¸3§ZQHKt©ŠÓкù܆‹6ãB±%qÕ‹œ¹×MÊÚ #û ä@àó© å)‘V s`«™‚AÀærpÅxUÉ—|€Ö¡{çUIêkî-ÉØÁàBº±±£Û@QÈÝävÙã×sù}””ì)ƒÜu”V¸ùÿm2½µ½m[°íÎË%°Éûtyuv_å<{ÈÎÜX¾m”žõ˃bQª_›g'ûÜÕúÚÞÏ‘ ³0KöÕAOt}iÈ“¨KžÖñL5úÄžVXM©]+ˆ¡=|…v¹OO‹ðѪÖù ¹™:¨¡ k`$zë+C©0ÖåøÏ+a<ÂN¼çU´±á*1G©+´†+¸“Âû‚Gf¾°°|Þ ÞKßëÕ ¶×'ØíµgjKÕÅΆn2*Å/x޼ÑpÎLî,σ©¥Cx/Ü\ixd¢ó?]jâŸèXäq‚Èa‹j…F×)VܺÂN2<¿¥áQB½Šƒ½bUÊŒîc­G+ÚK,ŸCÚN†ÿ4­ŠÌý®”Á 9ñ_t´SÒqÚ_Þ­µN: õ\%)˜_ݹˆ9 °øã°¾ƒªÐk/៴"ñÞéB4È7hvë¼#·z€ûýRœµÈæåÀ¾`ýxi’àž—WJ¢§Èbr½“VŽ5ÐË;ïÕÝÈ…iD›È¢åógÓc[dðžåÆmy¥æ`Bù„ß¼=(CwŽƒàþ• ª(èûÆ–ë)ÿºÇe<ï·K!Í è{¬ÙJ¿‰‚¾†±÷Ô>‚Þ͉röÉÄ¥ ¯Š†Ç7YËŸR)›$Yr:ò†ÓÝÕž òÒµŒ¦;þv/ÐyvJÏXöciÜOã-lš ¤N§ÑMQ”9©1¥¤ÍqX–-^W@w]²[åÀÒ1Ðò3f.“Cô “ìÏIA~™ª|/ž¡N¬†hÍ”¬ÊñÊ„ö÷¡Lœ‰jQ‚J8{ø2wYIç ÌRËk7É5 øq]ᶈѩzó|˜™nÓÌ|´£¡é}Xô-&Ö1ãªß%>I~=¦Ycdå-HG¶þŠ4æ«Bu›’ãѲÂ9jóë5`"#)ì¥v¬'·Û“ñ’¶î:)u´ÀŸs)§Ê¦¾óL½9wþÀ‘O!RíbÙJ ÕÝÐéI eâq¿Ñ M_™ÐA`á4+uhŸ^pcÈ®‚`î¿‘¿/­¬»T÷*»pý¯ÍáAêÀTÞ&ªI…¸¢>~ågó'޽ÍÓ¯½~Ü^K`NÝ@X·ãÀd˜çi”Ok(œuyóËï¡ry>®ÌW䪸ÄHJf.¦Õ®*õߺsº°Q씕O7(IU”°`ª1=NI¶*JÅ?RzM€pdå¢k“›v¡3¡{Œ3¬íeÏm&l28uóÌ:èü͈)„¿VÞ¦”°6}q  ™ôâlÑÚh~Ù?OÐå9©ü""ÉþÊT>êâÆSÊÂQ»Ê©EÅ¥ÕCÖ)A©_zLÅ ¥±r÷T žh†JzðªnyF˜öÝ|Œx9x÷Ê>¶þ)…˼b}P}-×5_‚oœ}U¸ã?­9ÜŸ:ùUmð+å†ÖŠ4åT[OØáéÒRŸ(ìì×uî<¤GCÛuó䃟¿à¬m^’ãhûOî}Ô€í‘-¥à‘ü…$2KZ´Áæ5 ´è;¨˜W!÷iŠ€­ŠágÞ(Ò²ZPmÑø£É ì’Í“!©è>ïjªÑú®4¼êBCa«g:ºß~׉6³J-Ë×oMc[]3s¦CÚð³¢âŸÛμbWNú6®mHÂŒwäËÓÂýõC hö{Á™§—Ñj ¯Ó\¢_*ë I¼zËHð,­Œë™n9~õcƩػeâÜðÊ[½õ;¤}Pñ°R¦pæ·w4%«ÖOn£K®§{A"{*^vîÖNβøÍqg'`Vr¢Î6b¶ÑˆçsÒñVå½ÚV¥ À¸»k´ÀáÐ⩦b…)›+mÛ}Ö­G›q@ÿDWa×#ù×ÀÂKO*íy²©fÚi$í¢¢³çN oËu·qîŽ*-2CŸêþš0'³H˜ø4j–ϧÿcn!ç°(6A¾Ðœ¿‡I³ÞžJÕ[u½÷ÇLÀäxŒŸGz0@·av_Åe9Â2³ãwó»Ë'6ÀWéY‡BJ°v†ëÆaíï÷¶Ý70¯°ô# AYe¹9 ƒëñg+h5s `¼ÒÍËQ;²×ö»ïYrË@èhJª{_mj'~éPmüv¹«Òåñ'ª$´š4ÙqäïZ=ÝFÅ4/×ÙÖ÷mÏÚuÖ}ׇ±Qî‚iɧû©†J•ž‚-£)…½«™ý<@ Ų "¯u @Zž\r[ßç¸_WÑÆK)×D³·™PÛD¢ÈjºzaÆþ¡h¢¡ôþWØÔ™×½†³ü:^ì"ƒêÔ1;ñ€‰wtÇ-þËs…_Ã÷DÉ‹E¨Ž;à6®ËM.?ð l¶ õ2ÅeipHN»>¬EM-±G¦8ÝûÖ°µê‘ø™ ™vó6GiïO& Øê>(¤[=”_å±Ê"ÝÒ»«DdLßdšv9wú£˜¦Ž·/òó« ö‚~ŽR È&.^êˆ>;ì !4ȸ5PlV$ ˜é– 5”¬cãÅoUkÚ(ÍÆ•v§áüõß+{Aº“¹+Ó€»”&£—KªÛÚÈDÒ{„@»Õ†¶æ„œ™¶ô9tòA a£Žn Qag qãGy¨’Ѩғ"ð³VÙÆ:Y­éy§àÀ2¦ÆÒ 43ã…pƒ˜Çþä Å’]˜üNž"ÙïtÇ¥QÉ%5 EÙÔ  &ÀËÃJl̺åvžÂƒh'ZÐ4c5çnë‚€›+%V!Ö­gûâ:MÖoI|lF†#íÖ ÐNf‚z8)맘¾W)@' o¤âƒ“¨[|ƒõo¥" ”V½DúÊT©sZ ’Zž"¾”úlcøá¸^´÷>DÉÏ`i@vÖ‚C¹¢4 §N’ÁêXj¡¥´˜Ub¤j²ö:ónOuP³BÚ‡ù½;"t™ikÜñŽŸ:H$’^‹„áÖªš.~ÚÍU¬áuªêX® ™XEç)ã¨[@ûþéј`ÊÉúTXßkªÕ¾ó>3DRg=k™‹bIœDà, Ô@>¥Lä™÷hÐÍ!møÖè1J‰.’M¿<~D’8ÆÑF·>Ù±rh_Ê5m.W›ð´š`L¬`î‚„C 7´ñù‹¦„T ¶ºd—÷#dARŠd½P¨Oé0Â2Áéš:>Ü|À iíq[&= ÷’ñWž˜?>À«œŠ„v$ aÙmBïX›ÌG;í¡¤!ûÒ¬ ¨w˜ÈDl·búæ² ­ N~/I‚æÛÆ·­yÅáVâ,«æ²)äV#ä¼Ô)tM}‡³z$D{™h%„õÍ~§T‚2¾däb¾Ø@r2PG­&¼"šÞœàÎRy}ýî¼^å4õ¢‚¦>ç°#GpæhïØ&"'Š þ”LeÞïz5uI¡WË®=%Å…pzpo¡üm’sÂ`¡ÇY+ …ó]£I+ÕiªÕ@&VÔà÷KÄjœñl ÊÓˇkòjú ’—®Ö o]2û ÅÆïuíI@ÉD4JôB×"™Õ4¬ž­w— Éžý“ •† (‚÷âE^`6ųáÉx€R0ÇézUŠ™ÕrŒ÷€ë6Dítåž¾Œ!z¿ìK†¿\%›C€Üë¿ÁÿU>py5øGÃüWùàß¶­þÿ¦Â‚Bû—þûŸ( #ÿ®ÂÊü› ÛmÂd8™θþ«BÒFÔ¢™¬¥ØF]½´ÄØÆ:âW0i‚2k éœÒBrf©$ºŽÊ-± ²B¶ †D8hˆð€Q¶‡ÝöU?Ãr­ùyaÖ‹¼­£S¢×ÍØOöæ°ÖOë ñnæçÁ'j±s>ˆÒ°?* Âo¨TL~’£în €H ÇççÄÔT1EEĈˆŽŽí½·瞪·Ôýd•VlµD !Ñ ¿Xáøâû¦šj‚†‰‡gêîžÞÕÅÓÐØˆ‰ƒCÂË‹;2´¬›x\î­ÝóÕ¼cßpFI¥€`2F®EðYg®µz#𵵵䴴èSWÃŒˆé…eÍð6†É‰9øõ_nXòŸ¡ƒñqcï‚´Úmñ>Ï ‰‰BÊÊÈAAAÁ@R}³»¼[+”•2ÓVêÍf莧¤{fì(M¼¿:Ñ*Õjo÷ Ímlþ±÷¢@\jWä/iî™y÷‡Ã¨•ŒÃ¹<·¾ÒÒê¥ÑÝë÷ïB ©®ôF%Õ”ÏOïß••gEEEA eò/ JH" 0À#—€ ³,1˜XXX§77'§sE*jjN×›íLyÜntCCCÆ&&ûƒdääg——ÆÆÆÁê4hô=É÷×ÀBÅÉw±ú_ïO¯Þ|Ï×[÷Gœ®—sæ(q#Â&&&Ÿ…ú NNÌ¡›fe@„ ãÖölÁùùùþ‹‹*5:b²²°‹ËˉYYÒ>>¼¡öOçªp8„xq'õ¬J4ý,²4@ììi.Ë{omö{@¾½y\bââgÛÙ™õüì:Ë+­¦†ŽŠŠšœšš˜˜x? ç$1!´r“O…‰‰‰‚†6¿¼üídkkK¤H11)ÉÂÖÖôïœôFK¤ÓÚ<È´pà°°±×º½Øÿšù{Sd]÷ 5Sšª®õKbv¶Œ†f½ÞðÍËÁ“çœ .%©Ûõ&!ÌüÎŽ¼ž~fiBáïÏÏ>¶–´Bûs9 NNNë˜ •TßÈÆ¢ ÓÈŠV`eZ))) }sóðéi9¡…M剆Y\Ù…¿§‰wú+P]//hÉznþµé¨î­.®göÎH( &Sõ&šœï =BG½ŠÆå*ý].¾¼8lv[„¼÷E¼’È´_wwa“dË@£Á$iIöæ™øÓŸCû ôöÖ«m¹ZFÊîݺÅÉî<¹î}yÅ¡»$±Ä;wkY’ÎdS ë$°´6£ý/íÚ÷ÛãfG9•µý‡E–E–+†ï‰xlŠœ1P™C[®ØÂ0Ø4}Ùå­F (4‚n-ûµ0J¤× ¾Yng„\¿'ƃCós6;*›ŸÎùRÂÛu‡Ûö¦ÓÊ‘±üÃÓ¿5š²¨õ–äïÀš0eßÈÁI3¬°^-.®.—$š¼›Vlîôs¾¥ŸqÍ7£a÷ɇ€ek7..¼è9ûOË…ð)Q6ô5mc§„î´¬®EÅÐþ{'nž_!Gæ5Ù#ä¿ÐtƒÆé]ÿóÿå˜x˜8ýwbÃÕ¦™‚²WÑÍ]Jϼ„ŠŠÀ,B0„š0¢… …( JB!’(¥!d7É£BŒ¿3‰„B • JRU8m‡ èõ¯—í™í³ëv»ëlΤŒ.-æ +¥ãŸœ™Ïçt,+ n&â?jm·o'“““n7Ûõ«===µz½‰)³´Õ´/¢B…Äqäää˜Ée‰ˆ‰­¯­%H£Óëvy>¯¬´vJÄ‚Ñ<ºÅ:}owwwÏäòz=Çtv~Œ1“ƒæÈ•)P888|ÿ /0bJʳ³…²¿èqçà…Ïë)B‚ttt41>n)åÿ÷†€@ª”óýk™¢9C#£°°0zŽÁ=û¿xôr½ÅÍÅõ»ªªËªìÑÂ*¿¼œ‚–¶º°°_B­²¦çúõîÑÀ’ÉÊÇõz““ƒC]Y¹Ñré7ƒHÖÔôßcjj«Îa  Ì@Ñ ÕvëüúzZ6„X>#3óýP/&€€ž>nâHJ 'ö„ýù"%4,'g{w÷Öú:'ëØOdë’ÓÃð%öJss3"ñcdR÷”¦Åª†Þ»"yXâ&±øÜÕv7÷Ø!¤¼ÚË‚-j‰ÔÜÜ}@EFÅíT__"#blM,T¥Ún3ëNµžŽ–‰µ¥uËJUyEímhsµ‹”gÃ’oå1ÔŸùAsr“ß iii^ZÿÌu¶Z§2Öf—‪‹ °P0I‡t© 雿+só:~}Êm5y5Rû½ÍµÝÛü¬v‘A üòêZk[ëîÏãbnQá+¿¢ñ“éjZZ—Ypí¸*+ª”©Êñj52»œôt•ä$­¹9E EuuŒ,{Uë­%«bšªIÕ:::9YYVvv¿Ï×»V;fffhèÖ;½~yYYYèñññj£u§Ç§²¸ªÍp(R6‹=&.ndpXd„Izâi3Eî¢,’ƒÔ¸ÞD¤­ÃÔ‡éP?šäoÈJ¸cí´/>øj™„,ä)ÊMè)’V¡ž¦‘÷æ€o˜Ô*4æ!]—Ò&R› EË5 Î`½"©®u4m{q µ&ÕL†£zÑÑhžw}4Ï-ꟗ² ½`Éy@9+­ WµuÞu,£Š„ÛdˆÎŠ»¶t &b`â:·RGŸ®.àµJóv†ËÃÍvö¼ÙQ8eZ¨½¨¡i¨Íbb¬ÜœtÏò¸·go.œ+|ˆ`õ´^E£É ©ïEVv¸ š}û°úŒ½yª_›_K÷1>~b+†f ãÁ<µÜE’Á5Ý3êÀ#¾f¶ñß:‚Cê®vÏ`Ž-躜»·y!mÛší'æÜƒb·§¥pF°ÎüB!ÃäE(!œÉ—ÍN]ÆããUz ®ö<8?ué´MRÛu¹2JSÑñÙÕ[{}Â!>õ9“"&@AµÜ;Î_æªl7ذҵÄÎþÑ7B¾Æ´üzÁK@ÚÉQ¡$ÁÕa Tú¥ÿºÙîjlÁR˃u½; \‹á4£æ~}v‡-¤x65£Ä9'|ba·GÒŠ#@Ý _•użVžÖJ ™9ËUL§$h?Ä)ç<»ûÅ\*ÁT·åøü[%û"—Èøå[ÓG ×%ÃMG¤›êŽb"Ý& D·ª5Ùs¾mÛx¢™çõu,!_tò¾ò{6 ,L_ÔùDôèHàË>;Ðü»Œ ‡m/¤-»L×F÷f¨EØ‹aöGñ ŽC×Ë †ôØ “ã{E ½ˆ íÒ¯UgÈÇm¦4I&Ëöf« Á™t@8®›õFßÅ—ƒ’§0OYøêñhv/y¥ø×fR¹Ù欧Ô?̹Þ£½Gºð+ë!NÖª^8‚ªœˆb%€Lò)Jý¢vµ$lÅsþÛþoÐcLl|$çWOEA$›.‹¹@Ãó‘à„¥ AÅ ÈŽÆ>ÁCöo‚x“å_éµ *瀪Ú%WpmÉÃaÒV‚ñã‹÷Utìö7PžFD%t‚Îýw” °hÙî±®ßx1‹~¨àAN$Án‰»4þQá)ÖŒñ4º÷±ù^»ëµW^®<¼À5.cºŒ|òv Ô†œw÷¦°}ËÌ„à1º£¾‰æ¸/ì(ä»UúHÚh¢àÕH Ä*N+µ‚{ý8Cài˜R££Øc6 ؾ×Òmd6ù©(×t»„ɘ‡öÊÐ#Z3«ã, œuÄ‹¬“˜NþnF­‚Ên$$Wmâ´%E'Mò@¿4ôdPú'© wݹ›cª†âõÛzSXd£{V‡Z¦3+úgèLÚ(8©aÙm f 3ªw+Û`.Ü8_“Pð:4!v¬ì«Eäûleãz¦|8ŸƒªÁ¼&ñ†É+Oj6*ëÄ™mü¬‰ƒQ©e>Gù¢{(¼L”^º|+S“1S€î b©Ç$}$/üòC@µýX"®e†ù,Dó#7øD¯yaS€Ih(ÃluPÿÈ[Ó¶tJCm ÊFÖÅPòÝÏWUû¾:TŒ,·"v’“Êé€o¸nÁ‰¬ÿJÅÄRdHÑæ`‘ÛÏèCØ{ul "0Bwævb5ZË@RË`¯óŸðAçF Eº]§WÝL¯&?ÁøÓCºn&a#væ‚ò‘ð&¼ßJg£ÃÞng|¸ærè`º1 ˆà V¤tD$àvÚogï4œt€â¶gèf›rÄ”¯üIà€»íö2ÔΉ÷ ¤å¿HÒjÎK·ic쯩U·Ú£™þ³~ä¿[èÉܤÉfïb„r™Hðút„.V@@QÝ‚À§C¬½Dã_›˜“Vm2ñÒRŒéJÖÏ!èŸÐ[¸{z š•jÈN7€ º^Ý] ‚ÔZµ5xoÝåÖ%KU‘´¤å0©hÖÀ¥rI¿ê ü<Ý?õ+nž¡'$DlGf™CÒGexI3ñ3~xA®/+XáZKo;ôÇ‘†¶¯}¦°øg¨—øþ3ÆZ¥™9ȾaÍ gfÖ4O÷5GYsú¼|ò<¨kD÷õvöU¥ìµX…Í?DÎáP4]À@¬¡úê<âõµ7r—k&a‡° Ž+åÃÚ€„Ôv˜ Yú±;¡šv­5‡—>~ý]îöÊZ%û"MÎçnÙ-„Ýcƒ¡ÛÆ>Ñ%‡rÈê´"á—æY¬u‘|éÙâЗª›O&<™RÉ–mk‚æþz^`Fµ-ó•læ"¼‹ßCªÝÍ/*v¹-…ŠÐëË<(rÙËâ|Ú¸*>¹ÎTî9ÛO©ý1 ZG¸Ø÷î‰àÀ±DÊf…½KÕG-mº¥zá_4æ WYìax-å½úƒT­c´òDà´È|B§fºùHX`ZÉ>PpƒU¿ÃN¯Hèc©}ÊÝŽ÷i{·g¼é|T”Õ6éS¯Ì?óöcYÀ('õY^~2½áBôf¾Zp¶|™å­MybwP2Ÿ<ö=hÚ?9Ù·Ï+«"&«…yà/ÑÈ=¤T™¼‹­Ýà6Á¬~n«ûy3£gsÉàØ(å_j^Oç Æ«À÷F¦2tº)T¬ÐtW»¢üÔðòØû[uŸÓûÊჟÙ2v;{~€Xó®ésSDo§K÷žÛèÒЇùÉ›‡#¾êâ9c‰rÌ Sïêãb7jku~BoN¡Cßåè­Q ¶ûöåÿ!Sÿƒº*›Æ5¿OËòÊÉï jü ғຠ§º¯¿dÈ*äaØê‘VH~0ZNE7Ÿä-º@6¸J‚!7„-!P˜üоÈòLƒ{Y¢«Ácc²««è°±{UîîÒv²¦.ç£W?.ñ›×¤-Χ^״Ј ®—Â…é‘ìKþ& @Ÿ53¯n†/¼v? š.X.Py#(¢Ç°÷ ð\²o¹9aY³Ïô‚߃Y  FfÐÃR€‹’Ún3‘ËX=¥ îýD)×Qv»*uª*ý¢¤ ½ß¾âpUÚþXÛ´qV¢ÿ™«PéÔ,‘ý _BôÈÊC&Ž%"|r òŒ&üy *QOÃT”­mhÇN"cùÕÇ¥.ß©ŸlÙÿ²(w%K”)È2WNÐX¦ È'< `€¤o+¸Ä÷ò@c‘O‚:\2#:€™ÈdVÍluÒÅ™"ãÄ¡Ë-ÅéI˜š$%ôýÔMTî•ý Acì•„îýj^-8Á@pP}0Vàì¾ ³Šáy˲·!¼—)"e]v·IV3,v§ÆæY‚ý8Іù­ßýoJN6`-¦ÁWÀeØZmsù‹ðp 9º™ OÓŸO,Lú³ÑÿÔŸ0ø (*í”<#½Ë+74íw§q&‹¶“#g6 ÀXøŽß¡¯(E¾üc|ýÈW?*ÉÇtƒ<ª8tÝÈ)%•Щ ™Üoîàöé ‹ERuÄ ¿ÎA—_™P¨ üaÒ}b%¡ 6I†2ÈŽ¡53€ƒøû«-mµK€MÆ®ŽK$Ü#llIỎs²4–Ù%D23/a<~A£~Aa]™ÂA€AÚèhM鑉+ü0ž±ð’¢ÕŸÓ…·¸gíò…½Ãq~ÚXÀÃ}‰Ò5Y¶¿[@íx Sᦉõ¡Ý”ÎVZ±šç™©tWÒ|Ð Ê™¾F¨§k8¹A¡Ú¢®ÍèzØjÿ(Ñ!…/„‰|D—y qƒ$ 2pEâ XÔòÐ^uaSK«Àßå¨(l•¸ù!zõ»¨ÝC„¦Dâ}>Ÿ@HhþÏÐ6&|!ŒùOê>=¹²‚ð÷ÐöJ EEV“ —E IZ¬¯œÆAn1Òó²^Ü‘Ñ=©´&w€$–T€/á‘o<#õã‡Á© Ñkœ®^äáò„' FÆLJ-Xøj–u§½|ˆ!_ÑfŠž V—MÝü<²Ü¡?„~í1”÷™9îï^¥wPÔ!û/(Ž ãêŒMðÍHÜ Ô_ª†æ ’G$e‘±t?_ ½1’Vq2q(ŽHMU4tž¸Ðã'ãg-ºšpŽyæÌžc¨§Í‘ÞxHTÁ„bØÜ—÷ŒBáj¾-¸ËQšªƒQÆðzg±P%@»”`÷5’gwt! ‹tyݪÈ5"5³„‚ó*R[thÑ9×ÁéôCÈsß9ÙâJwÛVu”(U,Ìó;ÌMu•Å ¡ìdž´PgÒ,ÉnÂê+%eä»&éX˜h"ƒÈØKØIó5ˆ1ðÜp¾E }žõžÖPÀgCap¬¼’µy¢Œbb™JÏúØ/›¾k%‡Z³V9†Ž;Ÿ§,§ÎpAÔ|ƒZqŒ¸ÞÙp»¼F/ŽBɲžKÁ:øSŠu\(‰vŸýTi_6XAüýæ ¸dJIš!€%ê{’²Å4+©ñ5Ð×·=û˜Û*-ObCç‡Hô~¦š›ñN éhWɱ1ë§ÓÏÖeV$tA°9ߺ‡æ‚rQ*]¤*M¾ü¶O%÷ûûU2’ÎvÓ-À´u‰ºÜÕiåÛ¨q×uÜì^̉ðK ñ)¿ êwˆÄè,(gé³çt~¸6è^ÉŽûfPË1Í0d(JÝ.ÈÔ´Ò©DAÈO†ÓVDшÄÚ Up¹ã¼ð²©?²ÆŒµ5w¸U¯ÉºúŽ™X¼ Ÿê:ý “¸%Ô4¹`QÂX=£[iÚg@… §””IÔô8ánðŸÃÚÖ¥[òeŸlq­í-VÓàÄ`ŽOP¡ƈ7xúÌMêÏ8Fç8Wƒ“ Hò°„{©QÒ·xê©^M˜«H®Óéyy')ËüÍsFe*kl8Õ¦C'ÆÁɞΠßT/{ZâÚ ”ã"më³M*ã—ÔãÛyÞœÁk)°:Š­­õgÀL*­_ù¶àq+“Q†TЪD¯íø®ZαkÒG…ü‡‚r·@±ÕͶ*n=™-y·F*nË•MÅ2ë:ÖS ™C!>´Â‰XýH°ìdP™‚奉­’¼e‚®J/Yö´‰gC Ìhô€“ªÉlÆ`åŨBÌ ¦ÑˆÍ@ÿ×¶#¦; +VëE˜Xçýþ@×^ÎöeÌ@ Ë«#ÏxÊ ÅÓc®CÒ˜ ”}ì!h‹ÆÔ¿!,¯ ÿ‚ˆów¥™VÓ ¤ÝʺþJD_Ç™¢ÉKU©¥CNqJ!jP0C·ÁcòÙ»ÁðK¸;zLba9~¶ka~ CldCIÁ«ƒÀÅçÄJ Ðæ[ÕÊö8|q7€´¾x¨`;Þ’¶ùì9Áþü:r‡J~HÒA÷¶mÔKϹ‡4œ…A“;+ý¡Àçuטº7°=å•íuJÊñ妜:Œž_>ýìöà ðú¹•{7¥ÀÎ,#ô?í¨“Ùƒ+å—£ h¸ýŠ Eue ™¼(¡Pòrv?E¯½$ñW)ôw>ç{l‰KÆ{\ÂÎô“á°=üýüVîÆŽ*8#5DFÍ|™z:Ñ=— û†èWPÍa¨8Eü©Pì% J-‹|\R¾|¬V]s›…ñNàoHñù^^ÖuÂ|l½¡¿š"wó‘€.ÍòŸ‚É9ãíýgÛ@ò¹Ø…abŠC:7ÊuáÏõͳÞ¢[ö È@°SW£iO® }݉ó‡ü%y¶ÍD7éÑ#‡¦þÄâ4,Кw§Ævölò›+Jÿ¡{ê?=gøL-º0ƒöÕí(s„ ÎQž:µUҎ״·Qbɉ§Ð·ñ­ 9y÷v§‰ºa²òl© Ù&3Cy$?ÏWIc©œ\ImRK4Ùk˜yøƒ2éXŒ¶ò`΀Âðqò+˯ƒ…'Õ kŸbñ1¬Dv–fJ0DX,èúȱÇ;¿øº¡ùÞ<õÿzä‰b°7Ù#°2hóØ»BrÛ«@ÝXÊmúƒÿ[``I¥€évÜ5}fd¾¤ò'ùµº|ߊ[mmP`o@xÊŸâ§@%·Ñ%»:qǰØåFáv(øš³™Vœp.¤±$ÐUÕhUc@¶á»»½Ô ¥Ê®ã•S«õÔùZ"j\êÀŸ5¥„ó®›\gÿX•ÍŽa9 Qn½üz¼‘ÁÎÇQa©–ê' "ŠËâœë³¼åÆÃË_hè.á¾Åpðƒb BuF•¢u_7–çÍ=ºUÈêvËû4|rö»ìø‚¢Ùnöv¯®U¯w - zÛ—ñ…Cݹ|Ó¨¬,] ›]®nE…3”ÒíùèR‡¸~Ð¥Z¸Û‹uY¡QvIêõ<ÿåé«nànǘ¦g›'RRRhõ°Ä³òY—Z›åÖcŽŽqf{îö¨ÛÊ i]ãÈXáöÌÄîûêzÈFΉ_/.Žž‚<?«‡D.Yª‡Ãâz‰»ÀS¾/däBKů Ù>pß<@OLíÖŽ~7Ü,:{j‘¿¹í²Õ´~ü{³l iýeË¥^…Ë(ø£:o\øú—߯Ö¬Úßïl/»µÉ¾¢”çùZ™£ZÌv×ÀÉûÓÓÌïÆãqXúÔ,j´e6-Ÿµ\¼F'-ãvkå´ ;f/•·:i˄֥i»¸_ê¨Ç5§*å£ùZÉ}+¼ LºN¾3ó|&k¿Ï¾Ð,¡Á'_ΧeðómG‚ø³8AX™Ñÿ“ÓþæäN Ã}_v¸sñ°6!‘¡Aïh@'¯œ>²;ôÌ)]gÈ?’&hëâîO–O6šõ`ú…,¹—bóðDEÚ”Â,”qñ[“/„­+ «ðÑvöò‘ñ~–V'Y†Ø¼µùªÇSj[%Ö-¢¨'#`ÕÆ°†©‹v=ãS¿èÒs)í¨^AA"»L®D?òS±ÓóFåIHºÿÜŒ»Îl²öa?ïL<#`EfIq•¥Ô¹|©­é>UZ?ìÞ­ó?£‘EFÇÞøÿ˜¾ÇwÇg"‘:|ÝHj5† #•òþŒcªV¦Œ`¥}S[<à`*ψت#0:¢’õèâϧµ±Ó9íõN‰)i» ÜŒ.9ˆ¯°¢ñ¡7bmž[¨WÄ.«ɇZÓ¨Á„_¦M@Ëå…Œ‰»'ÓC7e¤•¹Æ¨sH´÷u½ŒÓl儷Ј*?[76‡¤©àЃ=§BMz`©Øm~§Ö–WÛ0#l[²WÆýy¬p;â.ôOѺ¡ç;q„…¬7¿Ôt„OõP¦ò%a©æX4 ³ “ã‚U/+àûú^G YQ–û¥æ1ÉU­ß—WO`ÿàJv,+0xj_a§“ §³Ñê–<ÉØ W)tÉ…¤4u.æ˜ÌE|Åð Mc^âêHß«YQkM³Ÿþh¼Ü\¹¦&!.‹b8£|ÓY3þ»ø×’ã.:môƨ q¢º+ÒYzŸ·¡CY.î·z…ýBk. /ÆÙ`³«RíCAí*μÖœMOxn‚­z«^D8J¾}†ÌjÅï1b^=~.¶ì%3òS¦üÖšQoŠž•Asð|N’Ýû¤m%X„;T¿Œììß yôÞmÊÇïãd ¶â @õy“‚µˆ!¡ã€ôDÙž-?ùÂH°¨€9ÜÕñÓZÀH螉sZ…ò{ÕY`Ù_øØ~²0d„™ö‘«€Wžæ½u6ý`~¹¾ÛEfþqü› `ÊHD!5fð ÔÎ[÷Ç/äK*vAjEÄݯ& 2\O=ø0`™O7LȤ ‡¯ÓÞûËOå°?M¨¤"ÑȘçõN€LÉ?>6‹8†4Ó`U„in/giÃæ<ß¶9ø< шÄè0%ø®Ñ‰É†ÎKœÔqm‹x'9–ÍO±ko›RíJuÛªÈúÓ7…˰†ù’‰Öåc›…zÈ“n9£ï}‚ÌÂ@·¯ƒ„‹¼¼½š,ÐúM˜*ýËŒñèü–¼®—èàj~Þ‘q6åÑb¡2MN³ÂÍ‘ö™1çºOô ƒï©íýÄDò̽%¶ŽÜCßçN6ðõñgs/Ôùüè¶ì±ÁS‰%ê©%’S3º–b…ìÓÅpÓ ã)ç®`ÙõŠ 4.¶ÑÓšK1²àæöG*97©É±ÆÙv«1†êól™5ËÒdGîÇ»=/XÎá|ªá‰˜=•ØAŸks,&Ç–<¬±Ipå•Ú ’êµÏ8°b 'íDß+`jÄfò𸠻&ú° õ.ò}4ñŽXÝoGßÇI…u;hEõÀøxböƒ÷ä¥.Ëz⋵‹+Q°ç"@èwí¤õ»áüþª>x†=‰³.ëoHÚîÜá8üÀ¸îþ¸]zÙÓæeq~ãõ !ü”Ï— ä¢848ËŽšgu7kËPEN­»ºiB—¤I  Œ¤dF€¢c[ApEWóÍŸ­.€IG3Ê›„ÑvýøÖÄsAÿYÐá¸ìy=qÃæ³k3t`¡îµê]~óÙ§ÊCâ§m}G©YÐ ÀpàÀ‰”*ÞD—èrbº> ·˜ÕßÑA4“î*±íø8ÓÍB,µ9Êq£[7 Š09š\Ì8ÂiªŠz A/¶Ÿˆ Ê#_D\7v‡…=GÕ2P»uPŸ½‹JGÑG‘…® ÙÕ Úú“öÄ-N†¹ýÎ:ãÇfŠž(š^Yjpç­Ë7Ò"TÌ:cÂeB3…k€Ûd|¼öI0»þa` làÔ¦”c”ËØO`K ±úÆVãÞH¡ÝûL,çU˜^E~ùCìãy÷" öª§ÏªqŸ5C\‹¤xÄÅ=<™#Ö¾¿{d–0þò:51~®7Ó³µ@ðJk”ðq¼_à÷—r¾e¶·XR¦"2ÓÛ ¹”Y‚dÓx…ß…‚ÌÏW>*~¬©!ÞõÃ&tðÍ\7öW„Š&ä„¶0`{Ÿøß>ˆÊ‹\%}EJ{…S/ØÊß²ÐÚVPæ«ÆCòÍè)…‡W 1Aõœ´OM¤ØÕ)WÕ㉞’ør‰fÈ¡*hU´xæ“I²~ãaöµÒºêè|­Æ;·™Bst¦wö ÒSת¼­hŠoXΉ[^^²ŠýÒÉäÀHú|fšác ´›¦ð8Ó¥QñáÁ`v‰íðÎM"g:­žÆV!‰ImoÌZc‰@õKËp-I³lÏ«r¼µÊ‰êíòÿÊV-¤È;F¼æ¯Ã±GÑd€Í?óë±Ñ45¹&…®è·°‡ä;Ûß¼U~¶zßàÉØj¶Ÿ?¢Ù^É·¼»UËÉDnéK]îlÇà¥^™yZ„¦ïí=IÐÏÈ+˜åøåfÍ5Or. £þ>wxzD´“iÝgöž§æ.ðÛ Þfi-ÿß }àÍ-9ï⛡…¡nça’7µsÄ7î7¨)=éð¶-üz÷Ñm[+4Í9žþ³Ù•oo…Û…Ý<\UÛ5¬RåÌQqõK"~»¶Ù¦]¼¿:›w„ãŽP´/¢¥›4Ó…ËÕ€Ám¬¨ˆD±èC¥Æ??2͇JPÒ D£Ø3‘¦¬ ;zI¦b’ £rQ)Cd+–3¹ÌYU]ô€}øÝ©#XǺ\.ÜD|–˜•ªwìá|‘ƒ†&À¶§üc¨š˜Æ*­Î£ Oxpg´’Þ5¼.ϰ;0ÃAëÜ÷7w ¼8.Ñ~Í'?Ó¬gp’WÝ´ëóZƒÔX1¨åˆ(PÒÁ#Œ‡®N«ºv ý<¥8h¾Nî[BˆE Ͳ/ë-yÁ–6›1Àši®ÒÃD`­ê„í÷Ük"?KáæëÞ4ÉØ‘-Ítl$DÄEYÖ²‹)žÊ·¿±›œˆ}LÕÁ9ß JŸ ”À- mŒõ g¹w?uN}ï0¹qò•ýÈ¢Ðco~w»¥P»™Ãü”¿˜•)R¨ßÜöé Rv)Á ²jkºÕOinõÄž‹ÍB‚—» eXé‰ÏJзPÇèqsžÒÞ¡ˆ!ŒQ¹°®Cd;;µuKnfÓ ™£Çömy¬ÝØ×Äê8m(žüÔ8]Ï÷»_àÄHð“¨mHÖw²ÅwÃõºÜVLÞ¡tvŠoE8Šnq9Ÿ••??W»e‚Sö 7ÀYqPëvO 5µoÈx¶ç—÷Ô6'V8Ó»jÎÕ*Ó-™ÿJzÛ:Û .c:Í7' É–e½ ßÚËňHAL ü³Úö)qU{m2#ºV,"n¨F8Lº*+:7×G®=!ÕN:Âÿ”ÏI IŠL×YߦW5s›´:ÛZ‚Ÿ)ªw,<ÎÇùç¦fì²gôã{¥À&äb$éýð*ÁŸ¢‰%ñ $Ï ¦wádV½0^£`Kˆ©æïÐøØvÖÏçÂáñ­jo*j5Ï›ïêQ³q÷Å OsÊWNRÑc;|ŸXÚH=9Ž$î(gÔ¢ËÓE4ˬ:x‚)~‹~Ü8$Õ‚ª–Y fù/•O—(¸ºv8‚L`–E°‹ª+î³ ?qb³òÜÁ /ô/Hâ(1@ÕXõGɲÈü“df]OæE‘›1‘‹gIzR4ÔT‚Üó¨iT£¿TyŠÚêÚ~„q®GÑTÍ…¤f[„„ssH4‘SñÌæª;FîñIŽ—Bëï‹-Òcu™]CÇ+Lš‹^¬ËíOô›CðUÏÍPŸÜü‡ Ó ¡ƒ¯¿@C*‹'wËÔo>8YñŽ7g¤~‚(z`Êïa)0Œ ‚õÃïIWý6 ×Q5C¡ö»¨²]NńċS¹K4ƒdÊÛToUôoˆÕLY9TìP¶sÒ"¿€)‘”`õÀmzlð^Ë&…€8Y Gôج@€ßÄÃíåÃÒcG0å`»9‡ÔHwû-‚½*‰¡«ŸÓeXÒ¹“'¦“Vª&öh®pŽÜá6ØñgØ|ž9'§÷¡÷H8>YíðÛ›W©1@¹lP9= #SÙþ<÷ýô´<>¼÷:éi'§ø[/¦­Ì‹ —m¢*tVŽb!ëa·_å~ ¬ÜØGmqMîçŽî7ÆÓÙâÍ;‘‡­nµ[ ò³1sÉÊtœ`C[Ž¥®<í[&dàþn"yVÅžS¢QŒbO騃ˆoíÙ28¬k;Œ²ZdY=›XYòSþþµÅ(æ§?ÇcòE@àf®äE)¿ˆ‡Œ—9g÷ôÅßÉÈn~x)ÒÅ~ƒÆOÊxw¢g—ÔБž·^ÿa@1DÐѽ¨ùf¨½ð¦c¼]BoÔÐc¥Oúy‘up÷uëùzÐYnŠù›½ÄCo¦ÄE;´yùiãO«È°»òòel%_‡ÄkêzëŸÌ<àU]Wº€Æó>ô)/µ¸¢¢·èÜEíKß›¦x!­øÂ*–;³=7 fF1ɓ⛾(À/ò§±{ÂÅ*ôö Vâëjø05»iµ­Ÿh5MáŽGóFóÅ*å’=R;r7Z¦¢ï½¦ïi”wæ5ÃÁv\f•}§&ÔáÔç/Ñ„»riTC%Òvá÷5 ðxxÏ2øùY]»:4¦DîìZ_Ë7Ú#€ &Û*ÛÎK@HwŽÝ¾p—EÈ®£FV=Õ ýƒ¦f8Òø‹«ÿE¦¨×„gÕ ë¥pÙ+>Œá•aW‹Ì«–™^W蜷ÿ›lo]÷Wá¸ðžû€JK¦}ußàÒUŒO ®N‡8™ûâÿî¦cûšjÛGz)¤.¶µ·ž|T1Àß'Çã]]öcílñc¦Þ€…BíÝìC8ÍßS6×ÿâóÿ…ÅNA›SÐæ´9mNA›SÐæ´9mNA›SÐæ´9mNA›SÐæ´9mNA›SÐæ¿ Ú8Ó(çhhþgý pÇ×û‘»çŒãó Îâ6às&³ÿ>nÃu‘ë³Ð¦·9÷è_\¾¦›uÇõ¸yumbêÿ¼¢²I)DH¿Ræá%Ád«—EP#}tÝöÐn44 -úŠí²¿ 2ÊÏÈÕ¿ uëÈ}åFƒ[÷•Ö5(ÅÍo™vwð,žž¹ÚmØ4/‹wÉœ†S=>{ÌÜ>Bñ«$‚š‚ÖXÕz9oþžGkiÀw¾³€ô©)¡ø#"RvÒ0÷­—Œ:^Ýßš`0î5îºÈ)Ùh%qµ$[[÷iW# Ò€@…RöVydÚ†§01ð†´Ä•yZñFKà Ÿ2d‚˜´6Oæ)V×ú&¾A¥9ëm˜½¿Üõ"õž«#T¶Z};â<òéÀV‡­äŽS©=ËK(=×Ï·ýœ.ŠHy.&EÅ»Òß²cÏ/­«ñòÓY2Nâ 2^Ü2þ7ÖþÖo.Ê>:V“è]l\攫DHžnjeÁ`¤™Q£¼¼¼>úÚÏë±99â³ÐHƒKº{ï=TùÕYé»Ñ²Zj¾F •Üø61£M±¨/V<²6X4"Ê^on('-ݲj_âSÝäZ÷çå‹Î-×äŽÝ¯Æ‰¢/kÕ¾AÜ` '²˜Õsdk·(#°WÅž¬Ô`¯òÓiöŽ:j‰i³ë\sfh{»°0ñ§×öjRË”ù#þ’WkiªRœÌ¸>?]xÃA$§„ê´Ë·$X„)/Ñ„¾ û u¦ÿ>Tü‰¢³ {‡Ò’KÍ„ĵFê¿›:/ÂòÃQ<„ñÅñžÏM~áê•óåL}µp‡¶àÔ–AC®Ý»®§ šÇÌ.øÁj°ÂQcLï\†6ƒf­ê‰Õ$R‘þ0åÌüûrU•Ÿ^o,U4ꪺ È2J‹Ïš¿W´LÝv7óD%Ò“k½[ÍúÊFÊu¶Iןî¯-¹`d¾]îYõS¥Ø&ÜrswÏ­^1»àûq#³¥ê ™2Zó,RJ<¢îˆ;ªÃ޶—Fy›óIc>Q7n°L2û·…â(‡z4'“$`ð)%ÉNÌóRþÕÎ;iÕ¸âmkñ'Âñ< muçÞ¤Âà±<ª†GKU~˜xØêÎ@ç¶Ïþªt^ÒnSDMÎ äyìµ»솸—þU8^¢¢/‚'êæ´y±uª4µ”÷û£7üÿüEˆ+Vœ—ìº h¸í.©~™G(ÙRÂá8R‹¿ÿ3ìeƒ 9S¶eI»…Q{,mÄŸÄq__ê&Ñ­lUFà,r? Þ#ë6á Nò9°Œ1ÜuÁ¿z}Ÿœ¤E[FÍ>óhf[U[^ìF'X¢ Ë­»¹Áç1LZ I–¤w–UòÂëê ÜA ÏxJKQÄÏäÙ@¼ -Œ#fÆ.x§mlÈH‚²tÅv<=)> ®ž}2€æ–œ ™j™Éã›4cnÌý[n`M,0“MëÇà`[å›±h?þËñ ¥%»Z¿Lª#å’ ‚FÔsÖü^\ZÆ‹”Õ•òú²v.|ÐÞÁ6"m¿îà œ‚C7Úo-e•¤ÿPD6Õ¯ª{®,­õ÷’Hkk¨~6º3š|)½¬tÊa|f’)m[êù—õ—ѽÊ1o˜GÆaŠé~¥&ì:jë!Ò—\åWØ£3ðbþ3-¡ä,%/ÂIC4›ìIâ¾”‚aw˜ˆL—$B¨]: @¿b7 e­¿,pÞX/tUý M¿²-SÕàæäƒ‚Þí‘c€M»ƒ% Ζ¬?3Ï·›î_œàÿ÷ìNûP%uýdë:- ë¿î-Îî¾'oIïÇÿï»d #÷6¾ËS‡ì‘e«“ÉïVÝroò©Ÿ’×ü2#«dúò Ì‹ÍÖІãB+YΣÿ@ÕDògÎÇ‚¤“IÍó÷ÇSrS^Â7†$½ÖQy ÅHŒ«(.aÄ %=YcöP¾Ö_^÷…£·sÏ€–0ï&wñݵríÉiyMw`Æ´sþ½eT\˶¶wwhÜ îî ¸k t àîNðàÁ‚»k€Æ5¸»‚~ÉÝ÷žìsNÎýÆøºÇ=êÏS³Þ9«WÙZóbÁ»Ößzw9yt€Õ¬íÓ.«q-…b6qÚ;´Oâö’Ôd=þ}EÆÜ ÍTˆùn¤ÛÇÅûªfÜJoª3Â8Dä,w6½aµe—újZ‡¼³f!Ü—ó̱nHXâÑš’¤öœ’.—_ý,ÝÓdk#ÒÇ¢6ößÞ3Çôß7gk»WfÿîVŒ“ä,8é ì-W•݈¢Lµ³‹;°´“’¾ ÛçMÅžs § H£XHþ<~‚eez4w4Aºr#|è¾r´ssÕ"R~yöÕË(®­ì‡—Ú&/Ë~Dn=¯ Z˜”¾‚Ï«¶9(„ú±ç¬Ø¢ÆÜèçve;¨Ó?Å3ÏêÔŠ¹€Mœ­,êÑñàá h1JÎG-Ì.m;ù;#€«{tÄwŽz†Zð¶èyÙæ›¼|щo3F÷ÌÙâI¦ÒtrrÙÖu‘9¬œýá¸Õ&Ÿêš1B?Ó× ªî)‡¶¬P™Ë´íxõv[¼Ãìï¾½ÊáÒ•“’–˜ ÂïÚ“3´è;Ñ'"â'ðâà¼×dœ]þT­>s;(©|mpe£3{¨QfXÞfLL' —Û~µœÃAk^ä`t\äá­ŽZ Gšž›,ž4qi"Ó½’ßHš9IçgæÃΪL'z$éÝ0GûB4u ìÞOhÀɤñÍ §6½Ø#¹M-Ç90R'Ô8 ãò†Ž>6mÐz.pì%êå°J~þ·ÊõZG:6¶èy3ZÓýTMÒgýI»õ­ïrC$vs%ÙNGO&µãDuúJQŸ‹ Š\U.5L¥>áS ³ë“4Ѿ©ÚÐC]èë]ï|C¡æÉPªÃ+œÈqWXž ªD±î#ÊÒ˜2_ÈÙ!ÂoØÉãE*«Š^Édæ;û]ʺ2JHL|pqÃ;=ö·Ý?Š®b´ .>#ÑùüYadãbI%‡‹¿žC{tÿ@Â2½ u“x¯Â½Å®xŸkŸ6z5¥n}KžÚÒñe'ý-ýîìä.…ºÌQ–C ß‹ìÑë-ä… vx“ñ¼Ûgi*dØÔÏÆ­NÑ)sÛtññíÉ’œ<ò‹ÔiÆqªËžiäœIj8„V[ËÇgc^>ÝÓ¦k2ýþh¸Ïæ˜7¸À`0‹ARˆ¢Ç|2‹ù¹ÔÊвÅö[ã×­•Þ²&ÃIu¨ª× ;GÕb­ 9ki„-POý‡Âë‚›-j àq ’Î\¢ZÐЬ7mûñ*–S(y•¸_–ª×Ùœ¯å ndD3Ø€@‰ ¬„Çm¾ÜCDtiš†OF…2D\Ðê „ì[=¸½³l3í³®Ÿ;ø“«ïˆÆêÅ¥'úð븳8þ(Ƚ¦f§G-ãªßÐÌBðb“_¾þÖ$Rh|‹µÑd]_PêOQ ^_]HOOŸM6frìCâÕXçÛ4ØBd± ‡ ¦Í¶º3¬vË—Löõ x?#ñ±âÔuã²1N–rÁ ¨jód‡ ª†Ë{¸t –’nyÍïæ~‰¿«Oç%ç|.É^Ã}ÍÅÉ®å`‘$<nýpª·g*%“+#:áj*-Zn9‘Š-‘ÃË’P2RƳà Õl}+OVL¯shpóC9ù•¸'ŒÄ·iâ˜éðIp$×N>⫯o5ëIwiHâ³¼@Ä‘ä£Á ã¶šýî]´¡²FaÚ`JhÅÌéZÒ¸#í¤kF½õ¹³&ec %•¾Œ_îÓ‘u·oHƒGkÔ7x¶úÎNÐîíF·Ôæ~¯ŽKYý€\?'šÓÒ„·qëd)Hµ<„#ȲÝÚ²ÕÒ¦nRzâË‚‚RΑ!øq,ÒÆ,Lôsy©£ñìó"ý±ÅÕËÀqme­¶CËr0ñ)—UýFÌ›ž‘ò/ÍLË7ࢾO\ÈFgö%f“–5Ä ×›úQ¢¬òƒŒ²Î>£ܲ¤¢½íŠd+¤ ÙÃ>µÈo´¸Rnw˜9Ql¸÷“KøµœÕ')ühObåJ½¼Ò0ž´šÛúÖÙË5óÍÈÒ•dËröˆgm÷7ø§Ö¶61­Ôc›…`¡4¢»H¯ÔíçÔÀ-±uËœkŒdR×ñ´ÞÕP8çVfØøbYK'_ª½{ŠFy亭Æ"f”ë'rÆ&ɰ£m‘ºF>Èî:<3Å*C'„^šÌñI_ÊJ{¥Mi:wX½…U4ê1vÛÐêç­õÈ/£mÈú6;>Þ*¥å@³‹z®3¿&çj¤'A_,Y³\1ÃX^6òPtÆÉ !¡K\€zy¥Ú`¾ëµÛ«kÖÓ$ù8­uᓜƒBäbRè·k:›µPÈ_„±ižùÞLˆœ†vÕ §|Ùjž ™ª8{ª¶Ï^ä]±Ä0Ê ôÍñõ‰ŠšÒ(ª‘ GätC…œâs‚Š…ƒ õóÌaŠO †™«Øù‘‡Èq÷]™ÏWŽÑàw½gÓÚýu©btÃÖªælÁ¤œ´%“òÝÁe“OPÌp0d‡Ý/§ijL—™ã4´£fÞjs¾ì,T_'édÞCç² j‹fm혙ôØÎ ‚šl팷O]JC-%Ç‹fÔZŸ5!MjÈppºFEF%ÎÌ32á'´èž#1cñ›Ôn6.ä}’pÜÍØ:‰acc£½bÚ’b¼»:›˜¶ªCÛ?`ÚþºÐçîÉÎlDö°fË1ûÑiÓ§£Ø ìøx§ªõ›>âeŠ…=Ò£÷à_l”ȇ•éÝk›7?Ï“O\a\˜[âB÷A0=÷¥ßê ÷*T CWšû•ãq^]ú‚6K„uVŒç(*^ú®Më\¨ÀLÿ­Ù§nÛ°ì±tÙô£Á>ÞÚ9]v8CÓºû‹Q»T¶–¥´`OÏ»ŽÏn6%Øö #SƒútLówÃ-½'„¡³W§ 0ÁFÑCòÞÀÏ~M¯_ )2㩎N1žË§œ¢1>… Ðý€Ø =5A^!…W_fdNTKÛµŒþP•„õü¶;©ï›Ò×OÓ á»—™"`Wå#y.ã"€ÛáGoøÐóÚ5©ÓÙX¦yð&Lä‘-<­K ~û‡;Þu3¦gIq#…„ÊÚÓ ê7GÂS]l’;”‹4[võʱ7Ã7“ôOdŠ &YžAÁˆÎÓí9hZÝ­¥µÎ}FÌPïUš·çÓª2~:?“éÔ‹úLHz‡·òH>ªãý‚Imzµ¤•ƒA÷÷÷pƒn­jjG˜Jƒ_ëóÐÀ}òb }~áy($|Òöv%É2k|à«ð½ü{„Ë‘\VËjU-P냂Ðk¾&M£µ9/)»œ—ÏGçØ\OA^–£Š+AÚg°GÏ”©[£C`³Ëô†Œó{Ï'ýsð3Ò†ô u³µo}¬se¯qÁÎ#¯ÓDϱãö=µÜª„¶Nm«ÛõÄmÛÚC…—‘9¨áà¼L¢#Qùè4bë–ªx4”Ú ª¶”{Ý¿~d%‰ÓùtØ×|hýüáë{9ùÔè"¡)^øÖÞÃ>ÊT[„ö¿ XMb ?îɦ¢Þƒ+îâËL•n€ÿñ5\wÓLPäüH‰(IîËÉÈÉv> è dÞã`Î9´Œ¤©e–JRZ™¡îŠßç+Gòñ] µHâA¢. ®µuÍ„kdó¤j¢5æymõ ÛC¼Þ幺Ýtoðî[ÉO — ZÈo"æ©Ô]™÷æÑÚÈÕ“x<$ ÇÈâ„—ß!+Üoº|uA‰ô‰¾r M×¶Ã}AO”ö2 ÇÄiÍ-{Þ{D¼ ˆRpWÙ„®"š÷¤õ‹œðjãv=߬| §¤|K„ 7§¢õ´îõ¢ŒnòkHa˜,dÏXСñï#·\ZÂò=#˜`£ê~®Xò3 •:¾*ÌÜØ~iþL*:¦ÎÎÀe¹HçüfK€ˆÖDk_eÆÛÉ--°‚M®5?“«£`0:’±cŠhžœœ<‡è{€Üš*|¸èêõâÝúÀÀ@¾ÒhÙ‚:&‘ÛÞ ž«J™…î½0(IœÙ¶é<›ÌzÏ5ŠÎ]Åa™³+æ›Ë’ÉË$¯‡²^{P˜›]'g3¤YÌ¡Æá3þÑfMüþy™‡(¿OX‚&²8®%ÿ y~mO÷tnqÏC*vË‹’{[ü1 ùVDYƒqˆ\¬T¥Ôh)£ûmåsF˜?øÅ‹ø@bæÝ·©«Ke©ž±¤ÚF>;ÇeXìQQ¾ÄåÚýÎ&ôvìŒl×Z€üWAü}-[aõèóhU\•W’dM(]»‘Š¡«þ—¥|Ø™‡D~kÎàÈ•>ÓV† ï,¸›¸%¼«ñà÷(T,^ƒj÷[¨v÷Gj“'nò‡ƒ‰;Œ¤#3{Ô̰ÒÖ‚Äß,YšÆ™yo§+_ùAcöc]­À®Žº¦=]Ë1ᡱ›vÙ‘cw‚1uWÿ$)‡8ÿ:(h+>^GlÎ\å(BúF€€àSEÅúâΙD—e“y*ÏÆ"º—ž}­Â'-e¨ùsL9ÌMÆjøîDÈ­×熞–"q¬K$á_š¶ptçû8ñŸ¥rfzßÏÊFg­$ïÞ:牿ù<1¡ù^vK2+À±!°“ús©Ò-iQ-SÏÑ“âoÊ1ÔjmCåÅ}‚$rÛ.ˆ¹Ú×1xIƒbì‘f¾##ˆø°×h씼 p¶ž¶¨½ïdS¨ŸÇ<Ÿ;¦ eããÃ0㉂¼QAn°åÆrÙ/Qýþ塜Ðn\Mñ‚ÝÄýaû°èæXúâ‹…¥$JÕÁUZÚlÛœ#btÛ~Úü¤:¯C験”Ýób¸ç?– ìâkd ÎöÞi‰ŠÉ\FÙŠŽº6W„âXaKDO8³»š¿FDuëèÝò(31c¦ïÜ2d¾&È?ãf°“a¯¡ÀÉQïÛ1húœ£È«~‹%Ü.è~¢rÀZß+P)…ì4¾4æ7ò|×B,,ð)´I³^ôj¶P eæÄ^Ô£¥mö $\&}AîUö¨žë\x0K³`ve ßÝ™†.2b E3 Aègú>ù£ùBìeŽ 85 pZLÓrZ/”ÃÛÑ&{‚»vðúó™™K\×þ¸[ÎÙù®/{Z³ûø-<™~EÑørEÇÊiyª¿†ÿaÉöŽ\8'ÖŠÈ?ÀóBA»æÊç¦67•££!Ë|%³ŸzC—ôc 6)±N“¥§V„¢bç›*cˆn ¯<«Y^8¸XE ´„’“á¡1µ py¯ÊÄz%*4 y:EÑ*ǽžìWk´»~–dœ‡æu®Æi³á8o….‡DÖƒìzÙØ¡Xïn×´ìñ¥‰õ›æþÙÆ[°>6?Ž’IÊwÌd‡”6b™iƒ¶K¤Œž¸Ïà8q^áá+—Œ€à¢{gÒ~?«™YeƒgÕ<3ãŽ!ýn %ØÒBعÉ+/»=ÛŽhV/7^:]GêÜÌ•ÿÔžõÎ_ØzǼôäKe±¸s°äV°¶ŒMS"•¸„„7L ÏW³•ˆÊ}yR‚Ï‹zÄGí!ÊYÇ!tk¡½FÞ4êaöÓиÍD¦¦1{{yó“<º*¤,¶í™§Ë:"¦áÃê(¡æÉäYn*[ÀD>NMÌÑ÷s^ j”tKªZ>„ ”MÕš2³å¯> †MO>>4ùLÜÞÖq÷ô¶5ÀÐU5„=ÃÎ"bòã­ß?=þ¦pÀFé@ëwQYH?V7Md:¨Ár,¼˜po`·âA³ž0}’†‹ŸÌ—6xÃ4¢üNI‹ÙNr™ÐªÅÙ_zj+='뼜„ìK0A^yÝ¥²a &“YO½¦: â¸NhøSáë²¼jÑ”T ]UÿµØž±+¢Ë²ºë¤©Ú‡›bt?Õ)Bå*ä+ÒŸ7WM`‹Q¡€ïׯ2[üÿÊŒM„ù–U÷î?Øêƒ øŸ­¾¸A+lì {Em `äð[AH\ãhÉèã;mP/R»û·§.hU”ûÐbØR~³ˆ˜Š .¸=«³C.8÷ÊöÊÒ*ú`¹=œ¨§ø®£F©k¦-,¡lÎ,8SŸåƹd£¯ɱl*«œ¶óð2÷èL4ò¼¬DÄ®@°ô|þ@\Ûܼà~}þ™iEKÐë6‰>ç-²ŠÜškLQ]¨_#}ͧÈ+Ô·G“àL’˜ôéCýšŠ –ú40W.ÙzX £tdq•Y ÛVû­•f݃§Sx‘_õb¤Ç§ŒÍ®õ-or7Þ io~øcÑÊEËj¦@ƒÕ³ÁÖƒÊú< #º‹oÅ ;âËEj.‡?!Gºâ£ÅY޾œÏTTåJ*¿ï–ùLMiÐTó}¼gæuY0¶%79Nñ?ÕÑ×w©P¯£dW¯žëâ“A‡fdaáÀGfí¡ ´óXéÕ ›&ÜzŸ†L‰N ZZ^^]] L=»8ðɦ»wLFßtõº`vè°áÍö¬|C¥ßä€à¸‘J$¾ë÷‡Cƒ0ïb3ÆÆ"…?šŒp4PK žóP|…laaaiiI6Pµ8Te¹¿û ^+³Œ"O’>}}häA{ß¿6áû¡3o¹Òû€i7{w3÷}(¬Ï‚h#g«‚hÂôiî  ©¤oÏXžM kÁ•"Bw©(`ËHª”cgÄ©kHe!…f‹Z<ûÀÁ WÙt=÷ÆñèÆ]V-7ÎT'è\ð^¾ÚþP!$ŽRLcØ"ÜŽoz¶<(´Üâå?Ò§-þDZé@ ÛNzùkqlllkkk0˜´ˆ4Nö«óqª÷‹ÛæÖÖÔôTWoï ×ä×ËK¯ÛYu¸™¥¥%Û‡¸ªSVêi6#›N©3,I–, (¨÷ôí¦®(gÚÐJè'D:}x’1Þ!ád7ß`ª b¥ EE½à,ï‘!¼¿Â‰2Aõ˜Ç”Ëż_Áo²q)ñ›Qà4Hi®-¹¸™ç‘€#xâºT¼¨M ºÚ»K7±wŒ«+î„us±lw©²;²ú”øžüIœ~¼K£—#.u€&jÄß©F¡ªÜhž‰¦;qã¿~ÙŽOêRÁÉdµµÏ²ÌŠfþž® £?ÔqÏÀ¬ÔÓd.š2þ(­ZH§oò˜1![˜cÝFE싇[Ó4ì’mýçÜ+P¡”˜«M*ÔJÐMÕÅ@³!y«MP%kâמº¦«Ø7NàË‹¬8¨peKLG#‰¸0‰o¢\C‹Ð×2B(‰÷EÔ"—]5¡N¶× fß™+¯:˜Ù/ŒW^_?ø&>‘ë·q‚3âÀÛú§ïÔVH•zɶÁ–Aó$î„5\“~ÝV½‰5å4øÂÚéM„‹{±@‹ëÙÕÏÑù¶Ö Õ²©ÆÕ$‰Šd,Ùë Þe »ÒÀ„ ‘ÖÉbÞ`å§‘•.ð‘Ÿ-¯cI€,*û¸YZç€)'ª^Q®65Mï(†ûSJß‹Ò ®ÞoÙŽzA“¤È2-¿à¦’#§;ܧ]›O ö¥Rh—V `ÕX¥"ާ’n$¬oÓ§#³³sÀ ßg0¢´F……"Ö‡vRfwß…Ö€Û®0&w~1‡ØqT*“_‘õ1É‡ìØ»'àl%9|;džö9ØÄªÂ§Ü͘Ħ¨ ¾á °£ØŽ–QE@Ç&¯"¡ö>’Ûêaol fzå{”å! I þœ ~øÀÿwjBÀOäľÿþÏ u˜?ó§üAûÓ½1N1ZMî-|t/öÿЋ€\_ñh? ú=rÛ N}8H Àù‰,ù'ù ÈÞde²cvq´ü]´¶ŠFþã`Uˆ Àü ýúO´µÃ+k+{æ×ö¿ËEí²“m}4Œÿ]й±Èrÿþß§Ò›=™Ì~,Í=^X?QS0ÿ¤:X[[šÿG2høº¿_y”Wð¯à¬¿ËðoÁ¿1¸ŸB¬–°´~al ú7ökÊO°‹?a¦ &I©ßZjLÈc´Ç RxôñO þù‡³lì¬m@v¯@¿í4;Û*QÒG¦)ä÷—«È!ùKÿ—ÎNA¼Zóˆ^CpÂãý²¦¦ÿï‚Pþƒ ²bÒPûmÁµ(=!;í ‚þ«àÏÿŠü¿ .Æ8{ûkÁ]¨ÿRÅÿEðÍý|Šïh”¿ ¾GóËü¦àPM‚ÿBð ú°m˜”Õÿ¼–ðo÷ÊͽhTôQHÁ{4—áo¾õWä/Ïü×U|WD–çͯWcüKÿ©à'-0DÇ!‰|DþMðn¦_¶àÿg¦ÿ:Âa~<‡ðÇåwãBr\ˆ„D£O>‰ÿl®ïúÿ¢~Xq¹8ü±þñ{]‘éÊçü±Ï|¿~¦‹ˆ~\Ä5ÿ9;ñïÑi¾‰¾x ï×Ïô@é¿ÑX!þ=e~|g ÖOtL…¿)óŸˆòs–æÁ]†€•³ù7íþ)èx7Ó¿{ôÏä¢ÿ¹*?¿ówú f¿§ÍÏüüˆÏûµñ¿xüç÷Zòóùï;èI1àW§ÁûóÙè[ÀX øW'¥O Ÿ7B~Ägtü=xþcQ~^ýÿÐýOôÿMÿ³ÕÂãþ6¿úgL˜ï›6ŠÇ/ÎãØ4ô{é¿PK ø¼<<íAchrome/UTC bKux èèPKhª9 bKux èèPKhª9<:óÚž/ß ¤.license.txtUTÔ ^Kux èèPKø¼<$=vɱ[±ÂÆ‚õÊU«V*1¢<ëÊlWCVÕR`>ýò…Æ 4›¬½Ò:’•+VRÆÁÈ¡™°·hY–lY³C“žÝ¼Y³+mƒµPK—kmÜL›ëðÀaàíà 3^Žå˰Ȯr-!W퉛3QtS-Y1^ pÙ¢%K¬ëA¯kýJV·píÿFÄu<¨È8·¤È[°² Äõ‚vÕzÃêb-–o†¹b‚P-B!Ím& @+|!! ˜àP‚À"̈F†ñ®ä¢B€n‘ $ãèEäŒØB 3p8äÐ…´‚½ )¾€¾QˆÂ›È„&v˜‚LdŽ“xÄ;ÿ@à|Àý@¢?8Š| rˆ„$¼`NˆÂ)÷'t˜‰MX"á˜ÕÝve1d±ü`÷¶#Tø*@€†&Ô"X¼ 7°rÜÆ»xÁÈ ó€Çv!ìT@Ç;¾@&DC c=¢!Ÿ&ŒÃÚ3ð–€`È€£À(<‘ ûTâ•• JA JD(Àà±zœàPĉZNâúXb'–é‰}à•Ï Ô Œ^(@ À‚î€>èùÓ@ozá†QT/þè+f!KøÃ–À„?¨2†åâ_àUú¡ÿÏtÀ¯œx'?çéPBŸó¤#`‹p¨ƒ ‚q¡áT@pfŸ6êHPâuø#!‰I˜Tˆ`Dò JÐ0•¤fU«ÈHx¡‹&Ä (D‘ÊO4¦­Š'—‡2ByøÃGóð×:Ô! 0á frBeÍk˜ñ [ôT{0]ƱG¼½ñF'¨ò6T ½°€ .A3¬#¬ø„ 6«Ñ3ÿà TaÁ(»± ­~©àÇÒ1€Ü2íqE-†€†PÍkŸ4|á+¥" Ò:0‚‡UĨˆShb™@ ú˼ê€]– €OË Ù t¶¨ CUØÁ„´ALÀ; @¬áb­:øÁ Lð€ú J(¤Þjó  ?VÑOPåÍÏC”+„æà °t÷r/4 )ˆì`Ø:l×°vx‡:0 Sxá öÀ>T¼b¸ÁÁ¸…­æ[ßû‚6BÈU2á6á] AYIp@ÔpšQ q´áeý5*ÜÛÚh ÿÃÁ]…F ‹8¹üC(DÑ NàªO ðÃî‘ Oxâ ðÛW;pÀÆ;Å(Fá?° È}ª’q±dÌ6ùun’5¤ |‚èX@à“@t³PŒ&˜}3›µª0hXÎt¶sD”[ /|‚Í\±¸°Q\B À=FA¼Ã ’À\@yЧ BQi`ºÀϧ€Ÿ~:œ3KF;TL›tÀ‚¬À«½¬ëbì üÈÄ)Ú«k »Îžó‡C<ìZã œðDM¥«.øX>w€ðBùä19šb¡ÿÐÄ&¼ˆPœ;é^7“b_PǬ7·†žQNpUø.0¬Åºfoàƒ*©ØA¬×lð/ôú× ¯3Ã!¢Ü È À„t;A‚+¨ÀЇ(€é‚§*ê10ÐÃx¥Fš‰3¸ãåÐPw§3Ks'»­7F0 uT…3¨Åj |$˜æð9ÖÃo¦·ÙéöÂïÜV(€ì°D@óÊ wDa •˜©>Bñ‰O€•¦`AÚÁ†S\Ù8LÁ<3A8¯XHƺÛM_tÁ6gæŠX¦c§ø0Ÿo˜CT‘mÒ[w<Dßµÿ›}ç¨ "=ø¼„ügN˜.×Ä ½LNØ¿¡û¤³‡Q`²ü0OTn0U+ÆÐ |¶² ‚P % ‡0A€_Ë` Tqè} CeùF;€}0 ÑépUàx_¶fK y_ ò aÕаyáy€xU›`W Ð°Dh • P–p ûp^õ·)€D+f;ð+ ¸n¹x ñ°F´àTÑ  €Pl° AWj €©VÜpNDv»U Ü` 2H‡ÈÕ=0 »Py52À*Ø^˜KÐtnÿbpiyÅ1g+dX°i@}€Ãp ¶P C n ‚` :  ®@ 2 bag,àŒ´< O 0¡ œp æû šØ€ Ë”r š Œò° È=` µgàuŽ˜˜Vn€kµF wuqЂ ¦Ð,P>`ÐÖÐKAL Þ Âà´@eåȰ O0 A€ó1 á  ÈPÔ0Ñà ¬€ Í0«`½p &° H »À é ¼ðŒ9# ¸`t¶2à*¨(™W_pTØ'9PÁ°n®&&sÿ0ÒP“H ¶"@& `®0ù(€^° jU(Ñ® Àa%Ñ(ñ”n1°p Èg)°ñ’b)]›PhP(PÌ ñEưP ¼  ¡ Ç0¼`Ùp OUï@TÑ 0}ñ ·ð 2þï0–¹Qœ°g ™ Ëm O0:° ËÀÅpÕ° ÁH` ìpÎༀ Nç° ±pwTñ¿Ð&€Ì@ÈÐ s@:·Ð@? Êà q0 ×Ð « ŠWML` `ÝPK@´À M€ÁÙ YÿW»àýÀ:o‘¹žey–¦À³¢&ñ -’ `Ó@.è`O bp ÐðÛÀ é Æ°e´¹˜·É Aß <° 8 Kðë ÐàÏ`äÌ`ÖÀÏÓà9° Œ!Ý˰ r0&`Ç 0×ðIÑ ³°CÀ1 ˆ(› ù`{õ@.`ï 8×>Nú¤NêTðïðYàvœÐ†A}!B° kÔ G°MÀFäP%ÉPÄ` ë` Ù€ MðµÀ j° 70›±P™€›²° k è 5° á°b¼ÿ`º°ð l LÐÜ` xyj` î ØP»c ÊðLÐ `5ð¦Ó€¬ µ0 m/ ;°l@7j ä âgê K°ÝÀ KPÆJÆz¬ÚâOã kÐ<€ôàI019$®à à *Ýàjp ày Dð±9Ý0Ùp«0á t€ aú½À ³ <Ø¢ãð^0 PH±êÐʰµ07ÆàÓ  Oà ÁpèÔ Å@ç0 ÝP Ôð ¬ê ±p I`‰bÕÖ°²IP s)”b)â ÎpÏÿà F³:›³Ï`³" L2 “‘"IÀÞ0 ¯@¸ð µp  ½ ¸ þa±`¦S ³Ð EÙØ  Ü0¹·ê ¸²ð =еþñ k@A=и± d¼p7µ° ¬P ðC y ­ ‘·³` ¼@ Ç  D@Ë  Ê Çp Æ` p0$źÄ0º¤; ¤Kº¡[@CÆp È °k Å0A?Y ô@¤7iû'=ˆÜ!b¯ œg=  ® ´€ À À ¿÷Ê Ø» Ú» º°Þû½¸”¾â‹ ß뽺 ½€½½Að ¾Ðq ²€#ȉ,p ° ÷{ Ø€ B0;a°@á!·p µP @ ³0 ÕQc¡<Á, “a³@ |À X Ôqnõ×Á° °P”œ%!¶¯€eq=Ã)Q4 4l›¢‘•)œ/ÙÃ@¬; dspam-3.10.2+dfsg/contrib/plugins/thunderbird/chrome/skin/dspam.css0000644000175000017500000000211011622570546024652 0ustar julienjulien.dspamButtons { -moz-image-region: rect(0px 24px 24px 0px); } .dspamButtons:hover { -moz-image-region: rect(24px 24px 48px 0px); } .dspamButtons[disabled] { -moz-image-region: rect(48px 24px 72px 0px); } toolbar[iconsize="small"] .dspamButtons { -moz-image-region: rect(0px 16px 16px 0px); } toolbar[iconsize="small"] .dspamButtons:hover { -moz-image-region: rect(16px 16px 32px 0px); } toolbar[iconsize="small"] .dspamButtons[disabled] { -moz-image-region: rect(32px 16px 48px 0px); } /* Report Spam */ #bReportSpam{ list-style-image: url("chrome://dspam/skin/reportspam-large.png"); } toolbar[iconsize="small"] #bReportSpam{ list-style-image: url("chrome://dspam/skin/reportspam-small.png"); } /* Report Ham */ #bReportHam{ list-style-image: url("chrome://dspam/skin/reportham-large.png"); } toolbar[iconsize="small"] #bReportHam{ list-style-image: url("chrome://dspam/skin/reportham-small.png"); } #options_img { list-style-image: url("chrome://dspam/skin/dspam-logo.gif"); width: 150px; height: 44px; background-position: bottom right; background-repeat: no-repeat; } dspam-3.10.2+dfsg/contrib/plugins/thunderbird/chrome/skin/dspam-logo-eyes-transp-small.png0000644000175000017500000000277511622570546031203 0ustar julienjulien‰PNG  IHDR jMábKGDÿÿÿ ½§“ pHYs  šœtIME×  % tEXtCommentCreated with The GIMPïd%naIDATHÇí–AlTÇÇ3ïíîÛõzwm°±½8€%H±1` U#•S{¨zhEKHU¥¹ôÔöŠz jz¨ÄµÊ%RÚzˆÔKÔ¤œ¢H B-µ]£l°Âîzýlvß›™7ÓÞ´R¥J½ä/Þh¤yßþÿo¾oà+üŸ!:“_½|îa¸qcòøä¥B>õÌ_Hþ—Þüë›2ÜX?xãÆÍïŸÿíùóÛLÍLÉ .¼S,¿¥”"Š¢¸¹¶ö>‚k»‡‡ë&Ñ—÷í1ÃÕÝ­‹»x¥X,ä*å RJœs¬5›¬‡ëœ|îäþZ£6´¸t“ŒŸ™\ZºUrÁ7qì͹*‚ë?:óÂs“ÇŽo¤^}íÕS3ÿ˜þËéçŸGi…pÏh6›4 6670Æ çð<!R ÜÖIœu$I‚µ–L&CÆÏP(ØÙ·“r©L¬b¢8â•ß½ÂÙ_ž}}ìàØK£££Î¸¾°ð¡¡*ázˆI FkV–o;!=yÊ¥2B¹³Ê¦ï18\æg¿øŒj°ÂÑÝ+nOpŸ“ï¸r¼ÂOάØÑ¯Eôìfùîçh­1ÆÇ1ív;ýW’$lnn¢´êO t²×Z‹1æ‰;\.—Ø·g˜k«ëüþõ*]=}üôçØ¿¤ìÙs‰ÜâƒÉ‡+%¼\ŽýûG0Æ ”"I¶—”X)p ¤È-™´Ö©ôT*e&åùŒI˜};J\üç³vú­}íõÑÈôsùí0£”åÖò'<3\¥ZdqñÖV~l‡VšÄ&,°Î…‰ßP©T˜8z˜«ÌaŒ!“ÉÍfiµ4~£•i÷ŽŠ?½Ñ+n.=%•R,\ÿˆB!Ͼ}{žZ›à¬óRõz}þËRU*eŽçÊìıÂ9‡ÖúQ¢¶#Vï~F½Þ`#Ü \Ù7hµZÄqÌÜÜ¥R‰ágv?A S´R Ê¥’QJ¥§¯TÊLLajj­ B”RÛì‘R>Q :£ƒ¹¹k>|g««Ÿ¦ë¾ïáyÞ#}ý}ëår™ññ1._žF)õo›Ë—såipÎ1?¿À¡ñ1´1ÜûüÙlÏóljAµZBÐÓÓñãLO_ùÁÿ8çX¸vþ]ý U‡(vñ}¿–*01qì‰É‰—{z{¸ôÞ¥§^ÅÇ!¥L%ìô†ÇÑZ?Ib~ñÇR280@6›½ºí=pî×çîÏLÍììîî&ŸÏA> —Í9‚ O.—Ãó=¤Hé¥ÍÈ9‹’‡­ÑaL‚6šv«MEl pHYs  šœtIME× +BµZvtEXtCommentCreated with The GIMPïd%nÎIDAThÞÝšyU噯g¿[7ÍÞt‰©©ŠµbRY˜Š2aLeƒqȤb‚D±ÄBˆi4ÉLˆ„ȳ !%Q“‰µ°bUH2HD:HCcÓ}nßsîÙÏüÑœÏÛF™XfRsªN]¸Ý}–ç{ßç}ž÷ý¤8ŽcþŸÉ+I’$¾ó<]×q]Ã0Ä÷Q Æþqøö/P|CÏ"«)¢(&ˆB F’CBBb¿¬„DÄ€²NÉ„aŒ¡ÉTë&F¦YÕ1Œ4ÕR™ ¹,qèãÇ’$zÈä¡eYÆ÷ý·ôòžçÑh4ð}Ÿ¾¾>Nž<ÉÐеZ øñÌ{ÞóR©²,1Ь#Ë:Q ™È%bU¦á8¤Ò:nÃ!­éÅHÊëEq‹3y°7:’Ÿ'`ÆqL†xžGÔëuòù<ÝÝÝ”Ëe<Ïcxx˜«®ºŠ|yóæ‘J¥0M“‰'âû>º®#=ùôîøŸ¯û{0~üÔó¼òÊŸ8ÝÓ¦g˜4qz:E*¥“Íf!òPUIŽðBo$´d •8’ÈD*¨ ‘Ñð=TUEFdI¢QQp¡•½˜Õ‚˲¨ÕjX–ʼn'8sæ ­­­Ôj5V¬XÁêÕ«™3går™––lÛfÒ¤IضM.—âT÷w|i ½=g¹tö%<øíïðÝïüˆ3gJd3­è©¹\+“'ME“UŒ”ЦIÄÊù\”U$4âXBޏ‡šÑ‰ »ábèˆâÈ c?/t„a(þ6Š"¥R‰B¡@¥RE†apÇw°fÍdYæÔ©S¬^½šmÛ¶ÑÑÑmÛ¤Ói&L˜€ P/œã?¿ñ(‹½Ÿí'ù×—àÓÁÎwp¢÷u"Š ‡H%—Í‘Îçódùõ÷—{Ã0DQlÛ¦R© ˲ ¼$m¢(bòäÉlÞ¼™ë¯¿˲8räk×®¥«« Ã0( ¤Ói¢(Âqœ =K¡pŽ'öðþnn +þå¼÷æ³ê¶»øïßÃÐÓx®DL€iÕ0-PUEQð<—$ZßlEßꡪª Ôl6‹eYâ¾ ïz׻شiïxÇ;(‹üîw¿cçÎôôôŒâ§0 ‚€ 45C®u"q,qðw‡¹ï?¾GÅ6™:#Í£}›ÏÜt=¡Û@!B×Õóy®ë™LJÜäí<Ã0 ¥¥˲0 MÓˆãUUYºt)Û·o§½½˲øå/ÉÞ½{ˆÉ3&ëº.žçDDq¨Bœ Põ¯¼|Š®ãààKÙ²¥“‰m-¬Y}+W_q%÷¬»’º®†áH¹4 \×Ŷt]'‚¿ŠV¨×ëhšv~! “ÉðùÏžåË—cõz}ûö¹\Žžž‚ •Æ÷}¢h¤”kš6D©TÅ–*¤Õ†M6×Jß™!VÜt'wÝu;ÿtÝû¹þúS'§¸}ÝÎ+E IàºîHee}:Aðë_ÿš|>O.—£T*EÇŽãìÙ³¼8Žñ<Û¶ ÃUU ‚`ˆ ¥€0ôñ,ƒáÁ-Yƒ0t%«/¼pˆ' ܳa5¹\Ž/|á tt\ÊŽíߥ\®¢iÆ_¥jȲŒªª|éK_âSŸú™L†B¡ÀÁƒ±,K¨FÛ¶éííåܹsT«UÁg ÉA@&“! ÑÔPŒa"/mùX~Ë«SÂt|ü`D0Åôô±ú¶/ó‡ÃÝüÓ’²mÛ.½ôR|ßEUGKßäÔ4íϾ»Ð)˲Pމàjþù„ ضm7Ýt²,óꫯò /à8š¦aYù|žÓ§OsæÌz{{Åù¾$IçÉÝÆ÷}QBåñK†ø¾ëº8ŽƒëºBÑ™¦É×¾ö5öîÝK:檫®bÛ¶m,^¼˜ DVMÓH¥RxÞˆOŒÎ› &]×ÍbéÊ+¯äñÇgÁ‚4 Ž;ÆÑ£GEØ—J%úûûéïïg``€R©„çy¦3Æú`$5Æ>ÈùyBt$u:YY]×y衇èêêâÖ[oeÞ¼ytvv2uêTvïÞ¢(¢Vû¾O.—Ã4ÍQ„õFùïyžPŒ™L†F£ÁÒ¥KY»v-“&M"ŸÏsôèQúûGxLUU¨V«ôõõQ((—Ë4 ¡;š}J3É¿Õñ M²ªI­M.X-I’xþùç9|ø0[¶laΜ9|å+_áÊ+¯dãÆ"/UUÅ4MÒé4F㢠U’²,ãº.ëÖ­cÙ²eär9ºººøýïã8†A¥RÁu]*•ŠpœårÛ¶EŒå­±>g܈[ªÂ0ô}ŸF£A6›ehhÓ4Y¾|97ndÁ‚,Y²„yóæ±jÕ*z{{òÂØfÉŒ3¸çž{X¸p!Aðì³Ïòâ‹/ÒÖÖ†$I¨ªJEôôôpêÔ),˲,¡’^Ã…\í(û?+u‚QáyŽã`Y…BEQ`¶m³zõjJ¥Š¢0oÞ<ž|òIÞ÷¾÷ “¤ëúE{ €w¿ûÝ<üðÃ\sÍ5˜¦É‘#Gxæ™gp‡b±HµZ%ŸÏóÛßþ–žžÂ0¤Z­bš¦àª E@3ÉwãFÄx&«”(±äf ­\¹’Y³fQ(˜6mš`÷­[·òƒüÇq.*=‚ àæ›oæÓŸþ4—^z)ýýýض͵×^K­Vã©§ž¢T*‰D’Âårù‚‘ÕünÍ4/¸úFñÂI’¤Q¤Ç1‹/泟ý,’$ñ³Ÿý ×u¹ùæ›™;w.«W¯fÞ¼ylܸ‘b±ø¦qï½÷ò‘|MÓèîîæç?ÿ9’$qË-·°téRzzzøéOÊàà ÉI´éº.8­ù…ßè}D&4£—èð$<]ߌ\r±¤zùå—³~ýz2™ ?þ8qã8;vìàW¿úº®sà 7ðÈ#0{öla’Þ¢ŒÈôË.»Œ]»vññœ8Žéêêâ¹çžÏòÄO I_üâéèè>#éS&Õ¦9-Ò¯³¥(Šà!¨Æ–’féû¾(ɧ¢(¸®Ë%—\Bgg'Ó¦Mcß¾}”J% Ã`Ê”)8ŽÃ7¿ùMvíÚ…$I\}õÕüä'?á½ï}¯`tMÓÃk®¹†­[·rõÕWcÛ6ÇŽ£»»MÓ0 ƒb±Èo~óvìØA{{;=ôS§NÏÙ,ÂþbÅ:©f²lކý ÃL&Ú5k˜?>GŽáرc¤Ói‘¯ù|I’ؽ{7·ß~;Åb‘éÓ§óðÃsÛm· ­ñÉO~’;v0{ölÇáàÁƒtwwÓh40 CÈá³gÏòØc±sçNfΜɮ]»Ð4 MÓĪkšö—7|’´hûä¥Ã0ß'$§ižç±jÕ*-ZDww7 µµÓ4‰¢ˆB¡€¦iôõõÇ1‡fåÊ•lذٳgsÇw0gÎ*• 7Þx#ŽãÐ××Ç¡C‡p]W¤M±XäôéÓ”J%Â0dpp 60uêT>øÁò­o}‹•+WŠôúKG""Á”4,|ß|! ç-¶çyÜxã,[¶Œr¹Ìþýû™0aår™jµJww7ù|žþþ~¡½½½¬\¹’àû>ŸøÄ'X¾|9CCC‹E^zé%¢(B×uLÓäµ×^ãµ×^תT*ÄqL½^gÍš5tuuñÑ~”Ï}îs‚ßlð¦@4Š,Ë¢˜™LFuíµ×²bÅ â8fß¾}hšF¹\FQ …¢ÎŸ={–F£AKK‹0;[¶lá™gžÁ¶mdYƶm8 ÄÙ¹sçèííåäÉ“œ9s†R©D½^§^¯ NÈçó¬]»–sçÎÑÙÙɇ>ô!Õo)5Æ#ËfÞ°m€¹sç²nÝ:ÚÛÛÙ½{7®ë¢i¦iR©T8sæ •J…b±H:&Žc,ËÂ÷}dYfÖ¬Y(ŠÂþýû1M“)S¦pòäI&NœH£Ñ ÑhÐßßO±XdppB¡€išÈ²,¸Ë0 |ßçСCÜwß}lÚ´‰û￟^~ùå·N– šÉl É»¤LNš4‰/ùË̘1ƒ={ö044$ˆ¬V«qêÔ)lÛ>?YAÇqˆãXô ’tëîîæÈ‘# qúôiº»»éëëãÔ©S ÇÓ°dÅU…§Ÿ~š­[·2cÆ ¾ño0yòä·„Q –©Q¯×Éd2˜¦I&“!¼víZfÏžÍáÇéïï` ˆ•+ Â9&z¢ÙÕ¦R)êõ:Š¢ ª*Ùl–ááalÛ¦T*‰tr]—F£!R!‰Nß÷I§Ób\W.—Ù¾};—]vûØÇؼy3+V¬Õ{h%&œ•4qZeyI†Àsð\ ×u‰¢ˆÖÖVÁ·Þz+‹-Â4MŽ=*š ¦i2<<,lor£fùšØq×u‰ã˜R©„ã8˜¦)JŸëºÔëuLÓÄó<ázÇS»¦i2uêTŠÅ"ÙlÇqøú׿δiÓX¼x1wß}7_ýêW…`J,A]c u”×ðëaQ«EétZÌ ?üásà 7àû>O=õ®ë"I¦iÒßßÏàà µZZ­&n2ÖâA <çyX–%¼A"‰š;Rͪ7¹ž®ë‹ER©”P†ù|žû￟™3grË-·ðꫯòÄOˆrŸDf"àÆ›½Ê–ëR­ S®D¼óïdÕªU¤R)öïßmÛ‚¬ŠÅ"ù|žr¹,losÏ´%]/˲¨V«T«Uêõ:¶m‹4h¶ýãEDs—)YmI’xå•WX·nµZÎÎN-Z4®ñº`3Àn„ÔëuÂàõ´µµÑÙÙI6›åùçŸgppPˆ¦ÁÁA†‡‡1M“Z­&ªÊ…¼þx­ÀñαÎp¼r©TJ¨išÄqLkk+/¾ø"›7oFÓ4|ðAf̘!:lÉŽí‘ŽŠˆªéb5F<6oÞÌ”)S›'BDz,†††M$tßHÐ\hsHówIJ]H$í8¯OÕêõ:étš;wò£ýˆiÓ¦ñ½ï}od+#ƒ¨DÖu£qQ®4ðõüýï¾ûnæÎKµZåÙgŸ¥¥¥… / †††¨×ë£TçÅìiHÊòX_Óìn“ÕïÉï[–…¢(çg*žHÍ ؾ};{÷îåòË/gÓ¦M"e›ôX0T§î ²ð™åŸáºë®£^¯óÈ#ˆaH¹\¦¯¯ÞÞ^‘ÏÍùz1¹8ö÷Æ6VÇëŒí*5Ï/=ÏÕ¥N6ƒƒƒÜ{ï½Ìš5‹eË–ÑÕÕÅöíÛÇÝ¥3 I²‰+®ZÀ]wÝE±Xäž{îáøñã´··ÓÛÛ+„Òx›:ƾÐÅîvy³ŽÒõ/ÄIIŠæóyî¼óN¾ÿýïsçwrüøqž{î9Ñ¿ð¼‘Ý’’ª( üãéììD×u6mÚÄüùóGMÒeYï%\2c"·ß~;¶mó裲gÏ!¯ƒàõáîØ•¯2¼ÝCà‹A ”äž={X¿~=Žã°~ýzfΜ‰iš"’9òÉOÝpïÔ)Óéè˜Å¿Ì·¶< PmžqŒÄ…˜ýÿòH8™˜…aȉ'H¥RÌŸ?ŸL&CGG‡^çr92™ÌÈf2Óré9Õ‹¡æÈæ :::PU•t:MKK‹Ç‰ØºP-¾XóvOÊÙ®( F×uÉd2Â$Q3eÊ&NœH[[êÐp•³…A1,‘e™b±H{{;a2<$=vɱ[±ÂÆ‚õÊU«V*1¢<ëÊlWCVÕR`>ýò…Æ 4›¬½Ò:’•+VRÆÁÈ¡™°·hY–lY³C“žÝ¼Y³+mƒµPK—kmÜL›ëðÀaàíà 3^Žå˰Ȯr-!W퉛3QtS-Y1^ pÙ¢%K¬ëA¯kýJV·píÿFÄu<¨È8·¤È[°² Äõ‚vÕzÃêb-–o†¹b‚P-B!Ím& @+|!! ˜àP‚À"̈F†ñ®ä¢B€n‘ $ãèEäŒØB 3p8äÐ…´‚½ )¾€¾QˆÂ›È„&v˜‚LdŽ“xÄ;ÿ@à|Àý@¢?8Š| rˆ„$¼`NˆÂ)÷'t˜‰MX"á˜ÕÝve1d±ü`÷¶#Tø*@€†&Ô"X¼ 7°rÜÆ»xÁÈ ó€Çv!ìT@Ç;¾@&DC c=¢!Ÿ&ŒÃÚ3ð–€`È€£À(<‘ ûTâ•• JA JD(Àà±zœàPĉZNâúXb'–é‰}à•Ï Ô Œ^(@ À‚î€>èùÓ@ozá†QT/þè+f!KøÃ–À„?¨2†åâ_àUú¡ÿÏtÀ¯œx'?çéPBŸó¤#`‹p¨ƒ ‚q¡áT@pfŸ6êHPâuø#!‰I˜Tˆ`Dò JÐ0•¤fU«ÈHx¡‹&Ä (D‘ÊO4¦­Š'—‡2ByøÃGóð×:Ô! 0á frBeÍk˜ñ [ôT{0]ƱG¼½ñF'¨ò6T ½°€ .A3¬#¬ø„ 6«Ñ3ÿà TaÁ(»± ­~©àÇÒ1€Ü2íqE-†€†PÍkŸ4|á+¥" Ò:0‚‡UĨˆShb™@ ú˼ê€]– €OË Ù t¶¨ CUØÁ„´ALÀ; @¬áb­:øÁ Lð€ú J(¤Þjó  ?VÑOPåÍÏC”+„æà °t÷r/4 )ˆì`Ø:l×°vx‡:0 Sxá öÀ>T¼b¸ÁÁ¸…­æ[ßû‚6BÈU2á6á] AYIp@ÔpšQ q´áeý5*ÜÛÚh ÿÃÁ]…F ‹8¹üC(DÑ NàªO ðÃî‘ Oxâ ðÛW;pÀÆ;Å(Fá?° È}ª’q±dÌ6ùun’5¤ |‚èX@à“@t³PŒ&˜}3›µª0hXÎt¶sD”[ /|‚Í\±¸°Q\B À=FA¼Ã ’À\@yЧ BQi`ºÀϧ€Ÿ~:œ3KF;TL›tÀ‚¬À«½¬ëbì üÈÄ)Ú«k »Îžó‡C<ìZã œðDM¥«.øX>w€ðBùä19šb¡ÿÐÄ&¼ˆPœ;é^7“b_PǬ7·†žQNpUø.0¬Åºfoàƒ*©ØA¬×lð/ôú× ¯3Ã!¢Ü È À„t;A‚+¨ÀЇ(€é‚§*ê10ÐÃx¥Fš‰3¸ãåÐPw§3Ks'»­7F0 uT…3¨Åj |$˜æð9ÖÃo¦·ÙéöÂïÜV(€ì°D@óÊ wDa •˜©>Bñ‰O€•¦`AÚÁ†S\Ù8LÁ<3A8¯XHƺÛM_tÁ6gæŠX¦c§ø0Ÿo˜CT‘mÒ[w<Dßµÿ›}ç¨ "=ø¼„ügN˜.×Ä ½LNØ¿¡û¤³‡Q`²ü0OTn0U+ÆÐ |¶² ‚P % ‡0A€_Ë` Tqè} CeùF;€}0 ÑépUàx_¶fK y_ ò aÕаyáy€xU›`W Ð°Dh • P–p ûp^õ·)€D+f;ð+ ¸n¹x ñ°F´àTÑ  €Pl° AWj €©VÜpNDv»U Ü` 2H‡ÈÕ=0 »Py52À*Ø^˜KÐtnÿbpiyÅ1g+dX°i@}€Ãp ¶P C n ‚` :  ®@ 2 bag,àŒ´< O 0¡ œp æû šØ€ Ë”r š Œò° È=` µgàuŽ˜˜Vn€kµF wuqЂ ¦Ð,P>`ÐÖÐKAL Þ Âà´@eåȰ O0 A€ó1 á  ÈPÔ0Ñà ¬€ Í0«`½p &° H »À é ¼ðŒ9# ¸`t¶2à*¨(™W_pTØ'9PÁ°n®&&sÿ0ÒP“H ¶"@& `®0ù(€^° jU(Ñ® Àa%Ñ(ñ”n1°p Èg)°ñ’b)]›PhP(PÌ ñEưP ¼  ¡ Ç0¼`Ùp OUï@TÑ 0}ñ ·ð 2þï0–¹Qœ°g ™ Ëm O0:° ËÀÅpÕ° ÁH` ìpÎༀ Nç° ±pwTñ¿Ð&€Ì@ÈÐ s@:·Ð@? Êà q0 ×Ð « ŠWML` `ÝPK@´À M€ÁÙ YÿW»àýÀ:o‘¹žey–¦À³¢&ñ -’ `Ó@.è`O bp ÐðÛÀ é Æ°e´¹˜·É Aß <° 8 Kðë ÐàÏ`äÌ`ÖÀÏÓà9° Œ!Ý˰ r0&`Ç 0×ðIÑ ³°CÀ1 ˆ(› ù`{õ@.`ï 8×>Nú¤NêTðïðYàvœÐ†A}!B° kÔ G°MÀFäP%ÉPÄ` ë` Ù€ MðµÀ j° 70›±P™€›²° k è 5° á°b¼ÿ`º°ð l LÐÜ` xyj` î ØP»c ÊðLÐ `5ð¦Ó€¬ µ0 m/ ;°l@7j ä âgê K°ÝÀ KPÆJÆz¬ÚâOã kÐ<€ôàI019$®à à *Ýàjp ày Dð±9Ý0Ùp«0á t€ aú½À ³ <Ø¢ãð^0 PH±êÐʰµ07ÆàÓ  Oà ÁpèÔ Å@ç0 ÝP Ôð ¬ê ±p I`‰bÕÖ°²IP s)”b)â ÎpÏÿà F³:›³Ï`³" L2 “‘"IÀÞ0 ¯@¸ð µp  ½ ¸ þa±`¦S ³Ð EÙØ  Ü0¹·ê ¸²ð =еþñ k@A=и± d¼p7µ° ¬P ðC y ­ ‘·³` ¼@ Ç  D@Ë  Ê Çp Æ` p0$źÄ0º¤; ¤Kº¡[@CÆp È °k Å0A?Y ô@¤7iû'=ˆÜ!b¯ œg=  ® ´€ À À ¿÷Ê Ø» Ú» º°Þû½¸”¾â‹ ß뽺 ½€½½Að ¾Ðq ²€#ȉ,p ° ÷{ Ø€ B0;a°@á!·p µP @ ³0 ÕQc¡<Á, “a³@ |À X Ôqnõ×Á° °P”œ%!¶¯€eq=Ã)Q4 4l›¢‘•)œ/ÙÃ@¬; dspam-3.10.2+dfsg/contrib/plugins/thunderbird/chrome/skin/reportham-small.png0000644000175000017500000000247311622570546026665 0ustar julienjulien‰PNG  IHDR0_úW pHYs  šœtIME× 5câºÏtEXtCommentCreated with The GIMPïd%n±IDATHÇí–ßOWÇ?÷Îݺ»¦P*,°"ÂÅR¡ˆÔÔŨ´j­¡¯4éS_ZÔ'ü |’ô¡j´•J5±mPõ¥mc›FZPLAKhc¥iٙݙéeƒéK!MúâIn2“{î¹sæœïç^ø¿M¬«[§z{{­/·ª•+Wâº.žçe”RH)ñ}Ÿt:M&“!pwü®?<<œuuuÕÅÅÅo !jŸØAˆìóâ¹L&ã†ñ±ŠF®ãniii©?ðÆJJJð}Ïóð<)e6ˆçyø¾ÏíÛ·9qâÉdò¬¨¬0”®´¶WÚÀ²,„YçÅCÁ­[·eÇŽ˜¦©«šê¦§§‰ÅbÄãqúûû‰W­¡©©3¨²ÿã§É‡Ü»7ÆôÏÓìݳ‡‘‘"árEÞ 4©¡”"‰°¯£Çqèëëctt€ÁÁAΞýˆ”¢³³“P8D À0 ¤¦i @i !NÚáÞø8=o¿Ë—_Ç{ï!`ñRs ³³³hšD×u”®è”²çsÄ'™´¸páS::öQäõ®½$í( 99ãùa>¡³óµùŠPããã8ŽÃý‰û\¹FOOJ©lÙB!!RJÖ¯_Ô$çÎ# ‘N§Ñ¢…Ñ:;e7yž÷lWWápø}°PFŸh4Š@púôiðùV477¿˜““³×¶íò¥¶qYYÙžÚÀƒÒÒÒÀÑ#Gõ]í»´¥ð`ìÇ1Μ9ãˆxe|eeåV!ÅsKäºÒ¿QEÅE/Ó¼©iSáRy`[ö*¹zõê°išj9<G™¨I`š&±XŒîînúûûùbè2IÛÉîšÉd˜¸?Éå+W¸sg”Ýí»Q𢠠™——‡®ôeñ ôL)µù—Ń`eÛ6žï-‹RHÔØØ–e-‹–m¡ååçt·È͸æRy …|,êëëß),(¬IZÉÜ¥¶q<Ÿ±X,tüøñœDm"¸”ÅŽãø—>»”|JUUU­‡{·noÛ^[PPUá‚iš†” ËMÓ˜˜˜H_¼xqDlذჲ²²W=Ï % 4MËê~ABˆ¬"\×åÆTUU©ÊÊÊÏóÔÖ-[I$llܘÆâ S©çÏŸ'‰055’µ5µ" ²s×N<|ÀÍ›7qÿ^¼øK|ß'ãyœ:uеk×RZZJ8F£ë:¦iÒÞÞÎÜÜ}}}|ÿÖeáy=bðÂç;vŒÍ›[©^S®trssQ†i ió÷Ã0ضmßgäêu¾ j‚ßfÓHáÒ¾«ŠŠr à  b T*•@JI:í04t™œ“îCû™ùåWÏþΊÜ\Â!ƒ¡¡/ÈÍPQQ©IÔÌÌ NÚÁ²,††.Fil܈‚Pèy·)@×u½yˆOžÄ¶m\ÇÅu]´ü¼üƒ¾ï¯r3®*//§©©1{H)ÑuõÄ{uõ®\grj’¹?çþ /4\(//os3®™H$þ]ûù0|u˜†††É§Z„¿ŽNxQ£4OIEND®B`‚dspam-3.10.2+dfsg/contrib/plugins/thunderbird/chrome/skin/dspam-logo-eyes-small.gif0000644000175000017500000000674511622570546027660 0ustar julienjulienGIF89a çŽ|{òòòììì ÑÑÑ÷÷÷0, ………ÁÂÁÅÅÅðððÕÉÊÊÊqnH‰‰‰ZZZ ¼¼¼äääæææwwwÈ»–ŒLA=000tysÏÏÏâââéééiiilqlàààppp@@@‘‘‘yyy€€€•••ÞÞÞ666’‘MÔÔÔ(((¯¯¯·¬¬¬¬ÖÖÖPPPdic```ÚÚÚ}}}   ¶¶¶MMMÜÜÜ...?>nUªªªššš³³³D;8¹º¹eeeˆ†3]]]>>>ØØØ···†w˜˜˜¢¢¢¤¤¤$%$SMB†Š†²²²ÌÌ̤™‹‰mIII§¨§Ž’¦¦¦°°°wa$mmmL6–––ÈÈÈUUU–™•yxUPL7'%¢¥¡999€…b[Xrwp^b]¬¤\^ZVEEE§¥‰gkfinh³­,ŒŒŒå×™™¿Á¿ƒƒƒˆˆafa)Z^YKEA¶¸µFIFJMJª­ª¦©¥UYU—›–ORO¿³NHD>@=RUQÿÿÿÍÁ332otn787:ž¡BCB‘•‘w|v­±­ÆÈÆ»»»[SN²´±;<;/ztrƒ‡‚®¤ˆˆˆÝиº¸¼¿¼ÂÃÂqli@63ÒÓÑÔÖÔttt­­­]Afe`´·´.1#".0-ááá+++##"ÉÉÉ´¶³©©©“ŽLOK;/-þþþêêê¿¿¿ïïïûûûõõõýýýøøøúúúüüüùùùîîîôôô¾¾¾ëëë,.+&'&ßßߌ‹¬¯«£¦£ÛÛÛÎÏÎÊËÉ‚ƒ‚º»¹¦§¥¾À¾¸°±±±”˜“§«§˜”’Ÿ›6444 B¡ž›ÝÝÝÍÍÍjhcÇÉǨ ¸¯7:7GA>¡¡¡¶·µ·º·ÐÐÐÙÙÙ" ËËËÆÀz¬ª¨ÓÓÓ––’××׆‚!ÿ NETSCAPE2.0!þCreated with The GIMP!ùÿ, þ H° Áƒ*\økرa¿"üõ«X±ˆŽ~èÔgBaË = ‚|sqJ“DÆÀz‹‰mYV>qY3&H4Y>OE/k_H ²£– þþþýýýúúúøøøöööõõõòòòñññðððïïïîîîìììêêêçççåååâââßßßÝÝÝÜÜÜÚÚÚ×××ÔÔÔÓÓÓÑÑÑÏÏÏÎÎÎÌÌÌËËËÆÆÆ¿¿¿¼¼¼»»»¹¹¹¶¶¶³³³®®®ªªª§§§¡¡¡žžž™™™•••ˆˆˆ€€€wwwqqqiiifff[[[UUUKKKDDD@@@333+++""" ÿÿÿ!ù[,¶\ÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¯#LN¿ÁÀOU ÇÈUÅ5,#¹Ð¦( SUרØÜÝÞÜC5'Ñä¢#ßèéèI=Ïåð(êÞÛôÜíãñû™+W>xHÐC·'L”$Y¸P >+øI´Ä@ƒ÷ž$Ò£cG!Ü”ô`1±¤$ .Þ@` 0aÒ0(’¤É›Pª¼Çdd!ÛÚÙÄI‘NŒôz€Ð¢P ]©´P‹ >£j 0•gÖAMŸnÚ5éWAWž‹³¬ºª„ÿ®ekÒm:¸ƒÒŠ¥Û6%Ò·kå.å[Ò.:¼h±&,Ñð7Ä\3¾é¸È,¨]<9^en—kÞÛ™ßg¡gÞ\zâéÔ?GÏm} D\¿÷`Ǖ͙v-Û`S®Ô –·ïhÀ™2@ÊaÁç¸}Àlüx®ä\¯póp¡^Lzqð blÖ†@„QÅŠ˜+N”{õ"H”ØÏ„ˆÿí­° óÙG"Œ`B ï±°B &øg ‚#ðÇ ÿåw‚€)ÌÂ}!(Èà ÖW v,d€8¡„@x„F!Îy¤XB C Ñ 00ÑÎ )Œ`¢ " ÄÿE4YIÀ‚ >$á‹äÀB ‚ =¡À8ÁÄFØÐ‚ "`'BB8à¤Iá <øè„™¸Àæ4q€O` +Œ` '(n³€G Ã0¹ C 38ƒãYÒ '5Ö\3Ũ 8 m 2ÂN<ÑÀ«QXƒ@Í5Ç ƒ ]  >ŒùD¬¡V1êL¼¤è %ìéjQÓJ0AL¨ @ƒ B°ë5W C ËŠ‚¢ DŸF"‚ r¹éR"ðÀ„S0ü~EW, )ˆ ˆ øVpÀÿ>«p ”E/”Âÿ GØú0¿ùËð; \ ÅèËpDë”H !@)E¼Í;°`°¹qy€ÀÈðޝ&$ðš½2UÝ}/ØŠÛ:ñ‹ ¼0;o¿Ý`ôD+|ÂJà P:EÎ;³ pÚÛÁ÷Ç\ÁõvÛAC £`·‚(„ I@AðPñ¼îA³=+À€.œBvGþMBÀ`°><1ÅN+yàÀÞ¶µð´æš?ÁCo›$ Ô9ž0Ń>Å¡@ TAºE £mD |§Eæßx ¼:Y±w#01óÜdQäßHo¡8RdXø“1ЦŒûúÆ„ƒ”´ÌÿeCÔáòn…<‰u „ ¢Ã¡ÏûÆŽp„ox’;B˜€Èn0Á78¥#‘' I¾/Œ–TÍÒäwC8Á葦©„#a¶4 KùÇ*ÖC€sÀ[€`„ÑÑ1 9G°^º±'5¦ ‹éÅæˆɼ_°Ž„Ë>è @ÐÈ`–%:¸¹Çoª,û¤¿^dÁVÖcˆ(¸e#°ËLzžò$f(R%ˆcÆ/Ÿ»ñ Ž€6€1à C¸ $ŸTis¡¦ôf7R‰ÇØ@šÓÔžDpj4»œàczO\’  é$ï‰ÒÞíe0ÿÐN?¯@>ï½€MÉÙ!NÿˆKž‚€,˜AxЃ$(0 s#*ºÎ޾“©!…ê'¤úEd¢†Œ{¹X´Ú¼¼ŒJ A¢FÖÆ±Ò¡)PÏRƒ! ª±TOjBvºó0xuê ´ ¡9¾Ú°}¨;;?ÉnÇ.«cÝ$¼‹hðûGbœ)gû€lD)t`(fÐ@öõ¼ z°Þþ¢ŒH0 J`›Ë©œÚÖÂí „ À€¶žè, ä_6 È0m)?üÛlBp¼$QþR{2àIù€2@ÇÇÍS€Hþ„ ÇÐJ5Qž÷; G Т2f¢H`k/ /„9n4%hYЂ%G3p]rV.PÀÿ/ˆ&B0#HMI`=ð~`2?8MuR0 ]ÔTM×d)H…KX9 è¬sI`8Y/PàA0C>À2•(½’OcP;@;@†AÐ8ðUR"i5†A S/07@Pµ6p*Ÿ³2Pˆ†˜Û‚(à4†XE"Œèˆ‰~’4d6'PP-g¢„P¨pŠ Á©˜áÀ;²Ö/Mè$b$~ãçÇ´ô ¶ø,€¼è%ìña/@ŒR!'Ð&€!¶ %ðŒÑˆò ‚ј5 ØÿÚ(!ÖA+à‹7¤.„ô±(³ø’t޲ÐO€Kð9D–€VÀ R Ž@K@Tp M ,p7„gñÿR “—@… 1p±ÐVð K€ÉV`%p T’ ‰9*€ ©MÀ‘‘Ð’—Z@?€’°À“)MP“K@P† P€)ðR D 1T°%IR ”i“[©“/Ùxñ8Q™•[I‘?ðI ay“I)”‚°T9‘I•"©”LiH0PPQé•`y—JI •-)ÿ–Tp•˜€P€T p©EP@39ð‘K*0“x©•A©Š)“©”T9•\Á蓃 Z°™)Iš?`š#‰—V°šPКv©’¿)XÀ›Y•—Y”HÀ‘´É”+ù¨I•“¹   ›¹‘¿‰Zð—–°Q©–àù1”‚𔄠VpžB Ù’’9X1 ”ËYžòé’°Ù=ˆ¡R )ñ)󹓔T€Ÿœî”ë)ž ª™IÝH Rõ)Ëóyž×Y’ªžÁI KЃž[‰–)žªT@Xp +)-ÿšÞð*ÿˆ-‰“d¹ŸÞ ›M ˜‰£Ý—Q‰–,j£ *M:žß࢚YV0¡+¹£=z5*ž*9D@Z0¦%: :`ž-ªZ¥„p¥o Ù¥7Š¢X©™P h©¦ƒð‘¯ “x•m —tª¡^Š z*|ê™PÊ‘ày¨„ZgÊ“Š wŠ €™‚Ð׉•¨I‘:‰ ªY’1`Yœ§éŽj”›ê¤< ’p*9ªIªêš,@èÐx¡Z Š™­zš"¹¤³ZHàšŠj©^jªåY¦'9¨+ «jI©À««z¦še: ; £V î\y­TX™ Jgú¥ND€æz•gj®M”:P®TÀ§n“>ˆÁ1ªú®ñZ¨,z¯¯Oª¬àI® ®‡p¬¾ú¥óŠõ’R`®ÒÚ¥MT0¡™ o Ì•U`o†ð–™ œyžÛ£XŠá³ r²XÔi ˜êIWlåÁMW9®£°…\Èœ"R}0íÂ’`´ôÐ…PK¤hŠ€ŠAÅŠ®øŠáPµÑÀ<ë³d[¶e ´°¶±0KË´nû¶M{£§¶t[·v{·x›·z»·|Û·x;dspam-3.10.2+dfsg/contrib/plugins/thunderbird/chrome/skin/dspam-logo-eyes.gif0000644000175000017500000007304111622570546026543 0ustar julienjulienGIF89a€\÷|{òòòììì ÑÑÑ÷÷÷0, ………ÁÂÁÅÅÅðððÕÉÊÊÊqnH‰‰‰ZZZ ¼¼¼äääæææwwwÈ»–ŒLA=000tysÏÏÏâââéééiiilqlàààppp@@@‘‘‘yyy€€€•••ÞÞÞ666’‘MÔÔÔ(((¯¯¯·¬¬¬¬ÖÖÖPPPdic```ÚÚÚ}}}   ¶¶¶MMMÜÜÜ...?>nUªªªššš³³³D;8¹º¹eeeˆ†3]]]>>>ØØØ···†w˜˜˜¢¢¢¤¤¤$%$SMB†Š†²²²ÌÌ̤™‹‰mIII§¨§Ž’¦¦¦°°°wa$mmmL6–––ÈÈÈUUU–™•yxUPL7'%¢¥¡999€…b[Xrwp^b]¬¤\^ZVEEE§¥‰gkfinh³­,ŒŒŒå×™™¿Á¿ƒƒƒˆˆafa)Z^YKEA¶¸µFIFJMJª­ª¦©¥UYU—›–ORO¿³NHD>@=RUQÿÿÿÍÁ332otn787:ž¡BCB‘•‘w|v­±­ÆÈÆ»»»[SN²´±;<;/ztrƒ‡‚®¤ˆˆˆÝиº¸¼¿¼ÂÃÂqli@63ÒÓÑÔÖÔttt­­­]Afe`´·´.1#".0-ááá+++##"ÉÉÉ´¶³©©©“ŽLOK;/-þþþêêê¿¿¿ïïïûûûõõõýýýøøøúúúüüüùùùîîîôôô¾¾¾ëëë,.+&'&ßßߌ‹¬¯«£¦£ÛÛÛÎÏÎÊËÉ‚ƒ‚º»¹¦§¥¾À¾¸°±±±”˜“§«§˜”’Ÿ›6444 B¡ž›ÝÝÝÍÍÍjhcÇÉǨ ¸¯7:7GA>¡¡¡¶·µ·º·ÐÐÐÙÙÙ" ËËËÆÀz¬ª¨ÓÓÓ––’××׆‚!ÿ NETSCAPE2.0'!ù€,€\ÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª4ø«åÊ—![ÊœIóÌ›kÛ‰ ÙÎb4q’¬IÔæÂ™Å [:ìØ1¦Ã|•)t£ÎŸXƒ&œ¹,±cÉŒ3@Ö€ØdO£úÔZõ!ͤJ¡B•:së¯b.ù1ƒ ±e ^FŒ¬1´K{N­Ûv ÎžKÁŠkĬd‰#”©t€†J½> "µc€iÓÊ„-L¬ðÙ´QYôgܦa)ÿ8Uš:u@^ª™å/¥É ¤ê³ªS¥C‘úŒËÄa :4zuÂ…Íÿv:WqÖ¢è‰bíy»©dÝ» ¦Ì´ª[¹êHJ´'€ë§SWÌ0É6Á7ãIj$2ƒ–RÊ ³Tg]vÛuÇxeMvX2 :%¢\$Ê%"X zXVk€ ¶}4LvI$pvôB -oìŒ2«c €.Ô2ǰ̩\£‡)¥ Á’d½øñ†ˆPSŠ6(€`áu¢6ßÞm¸ x­µéfao¾¹&o¡9_}1fwÝö˜B " DÇ´D……Lh]3Âø7$2E:6 1ÄÐÎ%½ â"ßl“À@„pE•´ð B#~D@zòÊÛØÿ`Ù´^‡]vÀ4³Ýi§)ãkjó+,}¾ò£ŒÙu`ë h£)† 2 øÑH%<”* H` &|Pt Œ£ÃeäqI0"s@rŽhÆ+ $°ÇAAÂs¨‘4µœÃ!€øa‡ä"N×¼"H&ÛP±ƒeÒªñÆÖÙêñ²O°ƒ6ëdBJ=×\#N.˜ñÁ €ôR‰$ÚŠ@0Ħp@"K<£A*ê”{®É@j”#- cÌ2´3$‚‡<ô\ÒÇ5õè 3ÌH +'˜:T"p P@!I'Wô v|ðÃäÝp.|óÿýp€.¸}ç"…Þ—Ø]Ç܄҉Ð@Ó$67BC|4D0_ƒM %A‹. RH E#Ì2Ƥ»ô]í Ç ”?‘Àí!N”t#AØb/ö.81Âô¬Ædè0Uf»#àb¶ð˜ŒX³Ñ(#jÁæ‘¡ÀF·´1‡JT{HHxÂ퀀Mào¸‚„p…[ü|ϸÆ1®qcO`P¨Äâñ‡ôAÒÿ¾‚¶u mƒ<ã"àÁ©%!…-(a» e•j€t@¹HA-hÁò9<{xœ$RªYééVÒÁ4ä€.Ä#•0‚ZðÔAzP»ØÁ.v¨Sµ(<>|avPÃù’N÷Çã^7;NM P<ÁÄüˆFvNFƒêèƒ3" (=x·’ôZ9(Ôâò˜¿<$Ì@õ.tAu84t±#´­mµˆ@æWÏúÔ·þôЈ/žAD¢í]8CÑ‚éUïéÙ‚êW^Ä3lGLQut`Pjx³Á†Zìç<-Z@yËGÀÖ°Fÿ °Aþò›ßph,<ß4Èá"0B5ðŒ%”` æÏ¿þ±±ü“¿ˆ ÏÀôuÀ¨  ]€r°YZ§z°'|©Ç ã§%ð fö l€áö€b*&}Ê0÷»`@yßg ¼ÐÈ,  4Xƒ6HƒƒÀ¾À~ ˆl‘0µ°k07X„FHƒP BŒöì rpÏPýW¼…ZØ3h„X ZP i¦ ÙbÑ÷ .P+p Z‡‚àÇ ä4H:I(„x˜‡zØf<èynG—’P¢¤‡ˆ˜‡¢T µÀ€ÿ p PȃwóGº ƒU¸‰U8ƒJ˜ˆx(Jf. k6Ê@ Ls ÿ4Úðàç‚÷׉3˜„Ÿ(J¸˜‹º(JÏ`‹ð‡<ˆñà fƒà K°‹¢D¼ Ïa—p€ÀèyP§&„Õp‰Hˆ‰¤£„ʨŒoЫF÷JªX þP ðáGüƒvx‹áXkQPu<øa“ày° ›P0‡0„p3 oà ‹ hð“ÐÕøQÐ`¨—耉 Žõ˜‹p0Àj®¶ Ž Žî™`ïxA#ƒó(„!’•° ëÿ÷]ðL UpaŒ€¾à ©ìLpÀè °XÙ‘TY• ’59JÒðCÐþJ(©’À 0Y€0(“¶ˆEYY-ðì× Uà“Uà _pUàyžŒ{ÙKÙžÀ”x”ž u` ¹VI•Û¸lÙ–‡€0có) gÍ0 ey–ñ¨–wø˜m©Œƒà _p—/ð¡ §ù;Ù ¡À:¹“LP­àyyù¡š/P§ùr@ Š™„‹Y•I“£ÙàA Ò ˜Y ÷¶™{`–˜–µè˜£Y°° `Šÿ0ž/ð›§yãé§é©yæùãŸQ`Óx Б¤c‡‹yœ¢™•½€[Мܥs)yo´V“uøÈ¹ºÞy²€ ~ ï åižð “0 ¢Šðž!jw d°‡¨ »€„Ýx•üÙŸ59}ðSÜ5xŽ k´Ö p€i9“º‹çàf ¸Ø — žvyšað Àà>0¥S¿9 ðè °‰GBðÖÐ…ú9£ :š• O{xƒw @Š–t˜kZ¤p°Jš‹Ï* ›_0 ŠÀ£0 ÿà^°¨‹ê¡§É'JÖÐWx‹€v€ 1ꘊX¤ZÐ Rà.À ©€sê£ Pã7¤ *ª¸( ~ ¨×…ˆç@EÀ/0¥Ú ­š£ =ù¥ç~ïˆ X›êK0ŸH£   .  ª@§³Öª30‡1I¤²* fÀ‰Ù˜Û¸„ Rª¨#ú0¬£ðw`,»° ²€ÎŠ€ð…Ó*«¹x×êCÐ|Ïç­®Øù‘{:š´`°p Î0„i•4Mº¡Ð §¬ÂÊè`)pz—Ç‚F…üW~ñp¡ÿ‰°º(  €0а(¶ ®˜Z‡k)«Ð€±f°±ŠIƒ2Ø´Nk îàæù¨wp :Py,›z/+‡A³p‹°Î°³=û)´ `0H´ôè µp ±JëšÈ‰›ˆ©ð `žž° а#;Â}°×9€Ï0³QpE8«‹ÐÀðJ°D% =Z§ ðo«§¢Z oP·wË´,À‰˜ÚÌŠ…Pm€_ 7 <À}†{¸ø²³X‡,0³: ‘›‹P@¹?˜›bú­  yÊ Ô’s —@ ‹‰yk…©Ë¬¼` F° L¨›ÿ`4s»†Ë}Þg¯ ·0’¼¢4¼•›fˆ¼ÒÉTöp ›ºº —€oÐÚh½×›ºø€ÛÛ½—G ¼G¾åË6\û‚㺖ëg¨‘+¿Å[¿š{¿›ÉfЉÎë Fp ¾p =5„øÙ´z›½XȽ»pyP 9·Ë}ˆ{¾Öð™3‰EëÐSL¼ô{†¬™³ wè ¼`ÂfзJ„™ÈÂzk…Ú˽ý:Ã6,|•wy'¸¸j ªË8ñ`¹F Äkf¿p6–þ % §Ï«ŒØ¦Â*¼ÂN»Ç{{ÀÜÛ½ˆzýê¯à7‹]x•kJ~ÿoÀ 8kfp̹ÆEÜŠþÐ/J±Û¹và o·Z½ÞXƒh:Åy{…Zø†oȽ.xl‹q‹‹Š,n‹°s;8”œ’¬Pþ£w³m¹‘€ fÄŒŸ6è‘;ÅU˜½Zx–¯š§Ù ªÏKvvO¢:¼@€ ôËfš«†/6I P´Ãü¨€Â‡È±˘ìÚ˜Uiº}<´´ØÖœ•ºðB0ºÐÍlðÍጼä P÷ ) mù 쬵€‹x8Ïì Š=œÊ,“5(ϡ蠺P´lfJ ”‹ J°ËdD #hiÀXY“ÏPÌfʹÿhÑs¬‹yHÑÓZ¶Í3†Ûé Ä{Òâ,}‡— …pE7‹,àÏ—@Óðղʑ~°Ô¹(Ô•{ÒDÌs‡··pX­ý,f,Õh=Õc­ гÌs €xßàm‰ÍBà¢iÝ×EJÕ‹ Öm™p š°]]x˜… ðYI‘è†~=ÙÛÉv„ЖŒPØp¼ã,k+À7½¾Bp Ö@٪ݖ–mtY9RðKÌ ¶Ÿ]§+0 ŽŽÕPW—Ú«ýÛ!iÙ‹05™ðKÁÐ|°o¶’þ ¬‹Õ0gðØÜØ],PÀ!ÿ WÓËܼ܊÷`• ŒÕàu †˜Ýð½‹TmðP~°•Í™ª<ºŠÓ7p°‹k*Öß®‹1 Ž06çœÝeY†‡xë 8  ™Œžá¼ ®ŒfÐï†sÊs˜%ÚY` fÀ¼ÞâZpàõ‹,@`Øù oÄO²†ÐÔÙ×ô §æâ-Þ‹ð¾¸X ÌpНÆOê¸ Ê á—O€ BNäDÞ‹o€äZÀR SÀ|D•ŠPîb>þ`‘PY` ß8çtNç¼à užçs.ÒðÛÏàZ0°j¶°‚‚ÿg;PÁ 3Àç5Y sŽkT# Ù8 9š®7z£xÃéœþé —ê¦ê@-š>Ð8„ gwõHu ã3 Å›Úp sѧãOK ·¢‰… „ )3@ n7í@pÀaØÎ |°ívÜ[¿å[¹% ´µ[¸î¶…ÜpÛÎ íÅa×~ê‘à€@ܼÞÓ0 ÌÉ …Žbd ’;€P0„à©    µ%[¶µ[ÇU5 ZŸVjuWM0WtÕñ?Wv¥ñh…ñ]/„R€RÀðl ‡¼ÿÊ'BeðEÄPoPî4Pƒ‘ðâ@ XÀ áàXB†õY ÅW W%8€ÕQOR#… õ\_L0pL`ÏNa?öÇTL¸pö#…S5õQ¿BPõS†ó0 @@ p@ t ŽÁ.f¤ ê`6Àù Á0A°N eR[oLÌÄÏ„K{4I!HšÀD‚äDšïH˜/šB¶¤Gž”Mà”LdNSCp f`ëà(0ͰBò]’â4•20 Ù°Ðù Ÿ/I”HÄ9t;¦ ÌÏücðüÏo ¶Ð ÖýTýÚ¿ýëÿ°ýÞO×oý ýÐßü ` ·³œÃùotA ` TPIûª³÷Ȱ.HB)îÒ(î­( -ߘ1 *D8ÆVƒ|TÖi£¸Á^Œ©ø­àÈ1F !C&!yϤI)U®dyÒ$I‘þbt\Á/F{´­£’Ïg 'X‘d Í„0lX1GQýúUlØ1cÄ(ë@ŠlIfÚÔ¸ÑãÈ{)³eÛ¡Î- Ñ@Ì1kôîåÛ×ï_À8Ø¥ …ÛÙRÞK"ò#È$6v ˜5¡Ã€¥Œ CöKjTªV±j6 «`†ßF“[7/_ ±cw Mÿ°f¹ìæÝ»·2àÁ…÷]<÷íÚ]eóL÷®^ —•X¦™s1ÏŸ©þBvÕ˜eJ7«=»öíf¿• c/lÁ‚ñåϧ¾Ìþ2bùõïçßßÿýðè‹ï½ö”á­älKo½øˆ1Æ)d°ËN;ªºÃÊb `öÜоý qDcJ4ñÁdRLæ[tñEc|QÅdN,qD óÓPÀE4æ˜ë¶û ´íб°ÆõÃÑD[æI(ŸDfÊ‹±òJ ·ÓrK.»äK+©ì.JS4GÍJt*H!‡$24#É2JΪ´ÒË.ÝÔsO>ûÔO8©¤Ê)³œpO/¯ÔOFuôÑFÍóQ.!µôRL3ýSKM;õôSP5 !ù€,€\ÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª4ø«åÊ—![ÊœIóÌ›kÛ‰ ÙÎb4q’¬IÔæÂ™Å [:ìØ1¦Ã|•)t£ÎŸXƒ&œ¹,±cÉŒ3@Ö€ØdO£úÔZõ!ͤJ¡B•:së¯b.ù1ƒ ±e ^FŒ¬1´K{N­Ûv ÎžKÁŠkĬd‰#”©t€†J½> "µc€iÓÊ„-L¬ðÙ´QYôgܦa)ÿ8Uš:u@^ª™å/¥É ¤ê³ªS¥C‘úŒËÄa :4zuÂ…Íÿv:WqÖ¢è‰bíy»©dÝ» ¦Ì´ª[¹êHJ´'€ë§SWÌ0É6Á7ãIj$2ƒ–RÊ ³Tg]vÛuÇxeMvX2 :%¢\$Ê%"X zXVk€ ¶}4LvI$pvôB -oìŒ2«c €.Ô2ǰ̩\£‡)¥ Á’d½øñ†ˆPSŠ6(€`áu¢6ßÞm¸ x­µéfao¾¹&o¡9_}1fwÝö˜B " DÇ´D……Lh]3Âø7$2E:6 1ÄÐÎ%½ â"ßl“À@„pE•´ð B#~D@zòÊÛØÿ`Ù´^‡]vÀ4³Ýi§)ãkjó+,}¾ò£ŒÙu`ë h£)† 2 øÑH%<”* H` &|Pt Œ£ÃeäqI0"s@rŽhÆ+ $°ÇAAÂs¨‘4µœÃ!€øa‡ä"N×¼"H&ÛP±ƒeÒªñÆÖÙêñ²O°ƒ6ëdBJ=×\#N.˜ñÁ €ôR‰$ÚŠ@0Ħp@"K<£A*ê”{®É@j”#- cÌ2´3$‚‡<ô\ÒÇ5õè 3ÌH +'˜:T"p P@!I'Wô v|ðÃäÝp.|óÿýp€.¸}ç"…Þ—Ø]Ç܄҉Ð@Ó$67BC|4D0_ƒM %A‹. RH E#Ì2Ƥ»ô]í Ç ”?‘Àí!N”t#AØb/ö.81Âô¬Ædè0Uf»#àb¶ð˜ŒX³Ñ(#jÁæ‘¡ÀF·´1‡JT{HHxÂ퀀Mào¸‚„p…[ü|ϸÆ1®qcO`P¨Äâñ‡ôAÒÿ¾‚¶u mƒ<ã"àÁ©%!…-(a» e•j€t@¹HA-hÁò9<{xœ$RªYééVÒÁ4ä€.Ä#•0‚ZðÔAzP»ØÁ.v¨Sµ(<>|avPÃù’N÷Çã^7;NM P<ÁÄüˆFvNFƒêèƒ3" (=x·’ôZ9(Ôâò˜¿<$Ì@õ.tAu84t±#´­mµˆ@æWÏúÔ·þôЈ/žAD¢í]8CÑ‚éUïéÙ‚êW^Ä3lGLQut`Pjx³Á†Zìç<-Z@yËGÀÖ°Fÿ °Aþò›ßph,<ß4Èá"0B5ðŒ%”` æÏ¿þ±±ü“¿ˆ ÏÀôuÀ¨  ]€r°YZ§z°'|©Ç ã§%ð fö l€áö€b*&}Ê0÷»`@yßg ¼ÐÈ,  4Xƒ6HƒƒÀ¾À~ ˆl‘0µ°k07X„FHƒP BŒöì rpÏPýW¼…ZØ3h„X ZP i¦ ÙbÑ÷ .P+p Z‡‚àÇ ä4H:I(„x˜‡zØf<èynG—’P¢¤‡ˆ˜‡¢T µÀ€ÿ p PȃwóGº ƒU¸‰U8ƒJ˜ˆx(Jf. k6Ê@ Ls ÿ4Úðàç‚÷׉3˜„Ÿ(J¸˜‹º(JÏ`‹ð‡<ˆñà fƒà K°‹¢D¼ Ïa—p€ÀèyP§&„Õp‰Hˆ‰¤£„ʨŒoЫF÷JªX þP ðáGüƒvx‹áXkQPuì—‹“ày° ›P0‡0„p3 oà ‹ hð“aP†Úx‰ÞH˜È‘àX¹ø'¬æjËàêè. vðŽ÷428B’ Y ›°~_ÿÐõÈ~€¾à ©û˜‹è °XÉ‘J¹”ù‘49JÒðCÐþJ'™’À 0Y€0“¶ˆEOY-ðC‰‹ž ‹žŒk©“;Ù±PÖ‘ÛÈ”J¹Û(–cy S010o€’pÖ ³°•]`y‡z9–Ê8¾ð_P“)J9Ù•é˜r@ u™„v¹”x9“ŽÙàA Ò ƒY ÷f˜{À•ø•µ˜—ŽY°° `ŠÐ› )™»˜™ZЛŠf0—I:vh—¡Ù˜OÙ x°§É]:‡’÷Fk¯I/Y‡ß(𵩋ðÿ€›7 Øà*ðŠð’)œOùŸw d°‡¨ »€„ÝØ”Ï 49}ðSÜ5xŽ k´Ö p€_)“ṋ瀛f ¸Ø —À›žÐža@“í9 ðè °‰GBðÖÐ…ÍùŸà阕 O{xƒwÙ  ê•t8›/¡p°š‹Ï*À’9 ŠÀá8 Š0 ’ÉóIÖÐWx‹€v€ ý™—Š¡ZÐ Rà.À ©€7ª  ðšã÷ ß)¦¸( BJ¤×…ˆç@EÀ/À 0 º˜‚ ¥L #zá÷ŽØ€…pÿ°¥~°óø‰žð òàPj8:km:s“*§²°`<@—x¹K€¤àð~j™Zð‚š£ðw`,»° ²€Š€ð…’*§¹x–êCÐ|Ï×©Ú ª²é‘?꘴`°p Î0„É”4j!j™­P« €v§wy,hYÈ%à‡À˜Èª‹² 8ÍŠb ­ŸŠ¥u–r ØjÛZ—4(ƒ Û°F*à>О_à£p— •·®©ç®r4Kñ‰P­Èê úʯ˜b«vƒKáY — ÿ°Þ¨‰œ¸‰X €ë ›ð) ;²#Ü'À›ø òWt¯º l ? @T 9ª³>*¦µð6‹³ Ëœˆ¥ý·¨X€ÐhðBp2ÀÜw´H+î:‹uÈòª" µ¹Uû9µ)†žÚ‘Уß9© I³±p ´À­˜¨³V¨¶‹Ê Ö`»À„° v@3x{´Üç}Fð¦1K3Q ‚+J„kµ9`†‰ËšLe—°‰až»p hð- —‹¹j‹ȹž{y´À{¥kºlÓ±/(ªaɺpE*µ³k¸¶»µ¸k˜üÿ`ø¸ái—à —ÐSC¸œ »³š‹…» —’ƒ·Ü—´¨k Š)“Xĺñ=¥½…[»gè½…9 1òx‡áÉ çk-p§D˜‰í»³V¸¹Û«ô{¿ÂWy—w‚L –`ºŒ3fRk¼f· gYé P> ¹Êˆ $ª껾ìÛ°<̳ÈÛ¹ž ¨×«¾ ~³Ø…Mù¢àñð¼p¯F`'`š,lÀ­è}°ŸÔZ›K`¾ðPp§–ë5È¢¬³W¨…oø†ë‚±I½¶(³¸¸ÄBð²ÈJ³#€APÅ(ÉŠåY0zö:–K ¨`L¼Ëÿiƒé­\…š«…]ù¦=:›` ¹`ñ`ñ$¦„ ¸P»l¶µjøbâKÈo€ é{ˆÜÚ­w¹ªx¹”gëÃK‹ÝxÉO©  3  žÌ ,ʉ[Êuz´9–ÏÐÊP ¸ˆ‡´¼ª H͹È1Yƒ³Šá© uPÇfž´Pµ¸ |LFÄ0‚6Œà”4ù †laœ‹×Lú˜‡Õ,©&ûÍš<`X›ÎP¸è<ÊÒwxÙPW„ϸÈ¿| õ»-§, à ‹mµè\À¡½#=–)Ó0  àÑ…‡Y(Ðoð”‰nøÓT]›,`@cÉF-ˆKʲÖ °l€Ï¬+—` U½ÖcyÕF÷”ƒ ¿Ä + Ö9ºÓðÄáX upujÍÖ€ ’W½ƒ@“‰ð¿ ÍG ðf*éz½ºX 3po€ ÙõÈuÐŒ’€p5è¬ÝÇ­x†P ÊX ~P`ˆšÛ»XÑvõèQyšiŠ «8}C»¸©rÙ²]ܺ(ϑРáø#`s¨Ù]–exˆ·Ïp ÉhÜÚÍ‹‘ÜÊÿhMðn8w<‡YcF0Íp`»Ýî­ÈmÛ¹ÈGò†@ü$kÉL Z}]€@‘pjïíÞ½ø°‹‹µÞ0À §øjü¤ŽË  Ó} ñR0à^à½ø ®Œ ò0ÌGT©á.æs à† uv ̱ €4^ã5Î Î`ã:Nã㻾 Ê­3 «f + x!Ýq¶ z0=N“Õ@ã¸F5²`ƒ3°åz£7€7]Þå`p a~æb®Ô²å3ÐC’pvXP 0>Ó`¸   ÷À:}ûý4°Ip pИXÿ ’@š2æfp‘®$7–éÜÀœža7À °õ[¾•[¢@[»…[¢n[À 7ÀéÜÐ^†éh ~„ Ðɬ= Ó`šÌ`ä(†@Æ )±C C~ æ  Rðì P[²e[»u\5P¢•íi¥VwÕsEWÞþíseWÛŽVÙ~íÐõB x ÍÎpðÀ p | T6À_D õáN5( o ”€¬.€)dXŸZ|î@pU€8€Qõ!5R¸ÀP?ÐñÅÇòì$ò$LÅ„ (?R8uQ/ñ+ñOñˆÿ`8 C ”@ÇàìbFÊ 6`ü  Cë¤P&ÅñÆÄL\ðL¸´G“B€¤ L$HN´õŽ”õ  !dKzäIÙNÉTòá490·`f°þ€Ð $ß%)NS)@³ +° /Ìö’Tõ€ÔHœsA·c Ðø?ù¶` Ðùpù˜Oš¿ùœ¿œÿùT€ù—ß“ùޝ¦p;{À9]ÿF¤¶@r¯:< ë‚$”â.0(p+PÚú ù”ŸT°ÚÐü`ý©À+PýÕ1àÚ¯ýIÿÐý÷ðýß?ôâ?þäoàÿýÝ¿ýþÖ¿ü Ño@2¡?ú•oùÌ_+š ` Ù°bŽ:úõ«Ø°cƈPÖÙ’ÄXÁ/U*~üVŒŒáÏ_’{6ld˶CÝK(¢  bÖ,&ìäÙÓçO A'p¸Y3Š—;²©¼—Ĥ¿QOÚØbÖ„06 Ù¯… >Œ8QØ‹CA…m¦M=)ÌÛÁ®]`ÀšíÐ×ïß¿Ê&\ðá½yïZ¤Û“hMœ;)dU`W¯ÅÀ†mø Dc–8ÛìnÝ»y›V&̵° ̦]ÛòÑ2ÜˈíæÝÛ÷oà¹GÛžûµ2¿Íã]Ýz61c‘iÞ̹á爈 °à5lâ¸{ _ÞØyôÑ“­OvÌý{øñåÏÏ>YúóåµïæNü9ycŽÉ¬³°Äê¬ìî+7ýÐcï½a"”0Bd*œ® 3¤®3;ôðC5ÄÐÂÏ&to=ôôã꼃$°@ÇBÐD'ôêB AüF{ôñGu”ÑB%¬pÃêz1C!tòI(£|RÈ£ôPJ,³ÔrË 9äòK0Óˀ!ù€,€\ÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª4ø«åÊ—![ÊœIóÌ›kÛ‰ ÙÎb4q’¬IÔæÂ™Å [:ìØ1¦Ã|•)t£ÎŸXƒ&œ¹,±cÉŒ3@Ö€ØdO£úÔZõ!ͤJ¡B•:së¯b.ù1ƒ ±e ^FŒ¬1´K{N­Ûv ÎžKÁŠkĬd‰#”©t€†J½> "µc€iÓÊ„-L¬ðÙ´QYôgܦa)ÿ8Uš:u@^ª™å/¥É ¤ê³ªS¥C‘úŒËÄa :4zuÂ…Íÿv:WqÖ¢è‰bíy»©dÝ» ¦Ì´ª[¹êHJ´'€ë§SWÌ0É6Á7ãIj$2ƒ–RÊ ³Tg]vÛuÇxeMvX2 :%¢\$Ê%"X zXVk€ ¶}4LvI$pvôB -oìŒ2«c €.Ô2ǰ̩\£‡)¥ Á’d½øñ†ˆPSŠ6(€`áu¢6ßÞm¸ x­µéfao¾¹&o¡9_}1fwÝö˜B " DÇ´D……Lh]3Âø7$2E:6 1ÄÐÎ%½ â"ßl“À@„pE•´ð B#~D@zòÊÛØÿ`Ù´^‡]vÀ4³Ýi§)ãkjó+,}¾ò£ŒÙu`ë h£)† 2 øÑH%<”* H` &|Pt Œ£ÃeäqI0"s@rŽhÆ+ $°ÇAAÂs¨‘4µœÃ!€øa‡ä"N×¼"H&ÛP±ƒeÒªñÆÖÙêñ²O°ƒ6ëdBJ=×\#N.˜ñÁ €ôR‰$ÚŠ@0Ħp@"K<£A*ê”{®É@j”#- cÌ2´3$‚‡<ô\ÒÇ5õè 3ÌH +'˜:T"p P@!I'Wô v|ðÃäÝp.|óÿýp€.¸}ç"…Þ—Ø]Ç܄҉Ð@Ó$67BC|4D0_ƒM %A‹. RH E#Ì2Ƥ»ô]í Ç ”?‘Àí!N”t#AØb/ö.81Âô¬Ædè0Uf»#àb¶ð˜ŒX³Ñ(#jÁæ‘¡ÀF·´1‡JT{HHxÂ퀀Mào¸‚„p…[ü|ϸÆ1®qcO`P¨Äâñ‡ôAÒÿ¾‚¶u mƒ<ã"àÁ©%!…-(a» e•j€t@¹HA-hÁò9<{xœ$RªYééVÒÁ4ä€.Ä#•0‚ZðÔAzP»ØÁ.v¨Sµ(<>|avPÃù’N÷Çã^7;NM P<ÁÄüˆFvNFƒêèƒ3" (=x·’ôZ9(Ôâò˜¿<$Ì@õ.tAu84t±#´­mµˆ@æWÏúÔ·þôЈ/žAD¢í]8CÑ‚éUïéÙ‚êW^Ä3lGLQut`Pjx³Á†Zìç<-Z@yËGÀÖ°Fÿ °Aþò›ßph,<ß4Èá"0B5ðŒ%”` æÏ¿þ±±ü“¿ˆ ÏÀôuÀ¨  ]€r°YZ§z°'|©Ç ã§%ð fö l€áö€b*&}Ê0÷»`@yßg ¼ÐÈ,  4Xƒ6HƒƒÀ¾À~ ˆl‘0µ°k07X„FHƒP BŒöì rpÏPýW¼…ZØ3h„X ZP i¦ ÙbÑ÷ .P+p Z‡‚àÇ ä4H:I(„x˜‡zØf<èynG—’P¢¤‡ˆ˜‡¢T µÀ€ÿ p PȃwóGº ƒU¸‰U8ƒJ˜ˆx(Jf. k6Ê@ Ls ÿ4Úðàç‚÷׉3˜„Ÿ(J¸˜‹º(JÏ`‹ð‡<ˆñà fƒà K°‹¢D¼ Ïa—p€ÀèyP§&„Õp‰Hˆ‰¤£„ʨŒoЫF÷JªX þP ðáGüƒvx‹áXkQPuì—‹“ày° ›P0‡0„p3 oà ‹ hð“aP†Úx‰ÞH˜È‘àX¹ø'¬æjËàêè. vðŽ÷428B’ Y ›°~_ÿÐõÈ~€¾à ©û˜‹è °XÉ‘J¹”ù‘49JÒðCÐþJ'™’À 0Y€0“¶ˆEOY-ðC‰‹ž ‹žŒk©“;Ù±PÖ‘ÛÈ”J¹Û(–cy S010o€’pÖ ³°•]`y‡z9–Ê8¾ð_P“)J9Ù•é˜r@ u™„v¹”x9“ŽÙàA Ò ƒY ÷f˜{À•ø•µ˜—ŽY°° `c)™»˜™¹f0—I:vh—¡Ù˜OÙ x°§É]:‡’÷Fk¯I/Y‡ß(𵩋ð€›7 Øÿà* ‹Àù”À©d°‡¨ »€„ÝØ”ËÉœ49}ðSÜ5xŽ k´Ö p€_)“ݹ‹ç€›f ¸Ø —À›Ý雸ˆ‘›xQ o` ]˜œõÉŽY Rðá°7xÇQ  ^I‡³ ¢šg À ¹ø €PžŠ‹êi ýw…G°`Ø0Ÿy©ˆ;Ú Rà.À ©€(   ðšãW Û¹£¸( 3Z£×…ˆç@Ep zá÷ŽØ€…p ¤~°óø‰öÙð òàPP):kS:s“Š¥²°`<@—x¹K£µiÿ,»° ²€iŠ€ð…nŠ¥¹xrêCÐ|Ï—§Öɧ²é‘0꘴`°p Î0„É”4—𛺈v§wy,hYÈ%à‡À˜šª‹² 8ŸŠb ª{ú£u–X ªj­Z—4(ƒÚº­F:ª’™™— •—«©Ç«r4Kñ‰pªšê Ȫ¬˜bΪvƒÑJÝY — p­Þ¨‰œ¸‰? €áúž° а#;Â}(©±9€Ï¬QpEŪ‹ÐÀðJ°D% ÿ©¢ ðúú¢;Z o°›­,À‰?ÚgÿŠ…Pm€_ 7 <À};±È«³X‡,¬: ›‹P²?$›bÔ©§  .ºo ’þ —@ ®Š‰k…5{¦¼` F° L¨›`43´Ë}ÞgUº¯0’д¢ô´!›fHµ¬ÉTöp ›È²Ý¹ —€oÐÚ(¶c[³ø€g›¶—G ¼·qË6çú‚~–wg`£ë·Q¸&;¸†ÉfЉZÛFp ¾p =5„Ç©­[¶Xˆ¶»pyP 9CË};·Ö ˜2‰EwÐS¥ µ€{†©[˜³ wؼ »fÐ]J„™ˆ»ÿk…f‹¶ú»Â+|•wy'x±`y¤Ë8ñ`бFà¼k&¸p–•þ %ð¢[«ŒØP¡P»¶{»ÛzÀ;¹h›¶ˆz ©à7‹]Ø” J~oÀ Åjfp¦y¿ÑÛŠþÐñiªµ¹và o]¶ÞXƒú½{…Zø†oˆ¶.›Ÿk‹üŠ‹,ùª©þ:8 Œ’¬Pþ£G¬c¹‘€ fÀ¼{œ6Ø‘°ú½UX¶ZØ•Uꢳy¤[KvvO;ú´@€ €Ëf&«†/6I  ­Oü¨@»‡èª¯z—‡Š—K)³ ­´Øbü”ºðBÿ0ºÆl°ÆmLµp P÷ )@›cù x¬µ€‹xøÇ‡ ŠŸÜ™V“5èǡغP@lfÝI ‹ JpÄdD #hiÀNI“ÏÅfÀ¹(Êÿ«‹yÊn ¯ª\Æ3†µé P;Ën,}‡— …pEÃŒ‹, È—Ì|ÛÍXÊ‘~p͹èÌ!;ËÐËs‡··p䬉,òëÍôüÍï¬  ¬¨Ës €xßàcIÆBŸõœÐ ΋àÎc™ü š°é\x˜… ðOI‘è† ýѵÉv„0–ŒÑ0µo,k+ÀÃ|·Bp ÖÿÒ6=–"mtO9RðKÌP¯+­¢+0 ŽÕPWWÓ7½Ô )Ò‹04™ðKÁÐ|°o¦’þ ¤«‹Õ0gðØÀÔd],PÀ WÓ ŠÕHÜŠ÷`• ŒÕàu †XÖ|½‹àlðP~•§ù¤þ¹ŠÓ7p°‹k*bÝ×­‹½ Ž06‡šÝeY†‡xë Ä  ™Œ‘]Ú¼ ”­ŒfÐï†sÓÉs˜åÒY`ž f€µ¦ÛZ0Ù‹,@ Ñù oÄO²FÉÔPÒ×ô §¦Û¹Ý‹°·¸X « ÌpНÆOê¸ ÊÿàÙ—O€ Î ÝÐÝ‹o@ÝZÀR SÀ|D•ŠÜíb>þ`‘PY`Ì×øßà¼à ^àÿíÊ|›ÈPÙZ0°j¶°‚‚œg;PÁ 3€à4Y ÿkT# Ù89&®7z£xƒâ(¾â —Àâ2Þâ@-&>Ð8„ gwõHu ã3 Q›Úp sÑgÜOK ·‰… „ )3 ,n7Àå@pÀadÎ |pævÜ[¿å[¹% ´µ[¸Õæ¶…ÜpgÎ íÅac>ã‘à€@h|×Ó0 ¦ÿÉ Žbd ’;€P0„à5   š µ%[¶µ[ÇU5 Z¤žVjuWM0Wt•êª>WveêhEê¢]/„R€R€él ‡¼Ê'BeðEÄPoÜí4Pƒ‘ðâ@ XÀ áàXB†õY ÅW¬W%8€ÕQOR#… õè^L0pLìÎNíþîÇTL¸0ï#…SõíݾBÜÞíߎ†ó0 @@ p@ t ŽÁ.f¤ ê`6Àù Á0A°N eRçnLÌÄÏ„K{4I!HšÀD‚äD&ïH$/šB¶¤Gž”Mà”LðÿNSCp f`ëà(0ͰBò]’â4•20 Ù°Ðù +/I HÄ9t;¦ Xõc°õ[o ¶Ð b?öTPöföëpöjOc/ö àõ\Ÿõ ` ·³œƒòotA ` TPIÐóªsðȰ.HB)îÒ€÷°  ù°õr¯\ÿõù@ë  ˜¿öPœŸ ü° ú1þPú¥Ÿ¨ª¯úßú®ÿú6°úªú¦ï1ú+À©Àùö°$Ãönöaù°Ip1À( „IÅOwц¯ ÊÂ( IpûºïùŸ/ú§ÿŸ Ù°ê0þ(€Ñè1`!!Óþîÿþó0 é (0þ; IþÆ è/‰(fMè0@XƆ!ûåÈ¢Å_¿Š ;fŒXa:P˜ÀD4êÔ¡ˆ ˆY&ÌœIÁ¦Í9sÖÌç A… UVÔèQ¤C•úä©säMš%g½„)s…†Ê,‹8±XÅ‹Ž2þBÆÑ˜e 4Ó‰S'ÏfD• £+lÁ‚yõîݺÌï2b&\Øðß´|óÞ­«,h³¦;ãÎÍKÌX2¯ÃbÌX¶£b‰,¨kW±ßÁT¯6ÖÚõåd±“£]Ûö‰mܹoËNöºõjÐE+®¬Úر̚7Õè¹÷jÁÀ]Ë®=ÌúuëÈ´#+ÖÝ{wæáÅ'?ö{÷íe±ÓŽíxÄÖ˜“+ß,Ö|1õÖicÏÎÝ{yñêp@ @ðÓŽ¿ë´ûj,Éû¯<+´ðB -D0@ 9ÌðCCq9æF4ñDS1 !ù€,€\ÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª4ø«åÊ—![ÊœIóÌ›kÛ‰ ÙÎb4q’¬IÔæÂ™Å [:ìØ1¦Ã|•)t£ÎŸXƒ&œ¹,±cÉŒ3@Ö€ØdO£úÔZõ!ͤJ¡B•:së¯b.ù1ƒ ±e ^FŒ¬1´K{N­Ûv ÎžKÁŠkĬd‰#”©t€†J½> "µc€iÓÊ„-L¬ðÙ´QYôgܦa)ÿ8Uš:u@^ª™å/¥É ¤ê³ªS¥C‘úŒËÄa :4zuÂ…Íÿv:WqÖ¢è‰bíy»©dÝ» ¦Ì´ª[¹êHJ´'€ë§SWÌ0É6Á7ãIj$2ƒ–RÊ ³Tg]vÛuÇxeMvX2 :%¢\$Ê%"X zXVk€ ¶}4LvI$pvôB -oìŒ2«c €.Ô2ǰ̩\£‡)¥ Á’d½øñ†ˆPSŠ6(€`áu¢6ßÞm¸ x­µéfao¾¹&o¡9_}1fwÝö˜B " DÇ´D……Lh]3Âø7$2E:6 1ÄÐÎ%½ â"ßl“À@„pE•´ð B#~D@zòÊÛØÿ`Ù´^‡]vÀ4³Ýi§)ãkjó+,}¾ò£ŒÙu`ë h£)† 2 øÑH%<”* H` &|Pt Œ£ÃeäqI0"s@rŽhÆ+ $°ÇAAÂs¨‘4µœÃ!€øa‡ä"N×¼"H&ÛP±ƒeÒªñÆÖÙêñ²O°ƒ6ëdBJ=×\#N.˜ñÁ €ôR‰$ÚŠ@0Ħp@"K<£A*ê”{®É@j”#- cÌ2´3$‚‡<ô\ÒÇ5õè 3ÌH +'˜:T"p P@!I'Wô v|ðÃäÝp.|óÿýp€.¸}ç"…Þ—Ø]Ç܄҉Ð@Ó$67BC|4D0_ƒM %A‹. RH E#Ì2Ƥ»ô]í Ç ”?‘Àí!N”t#AØb/ö.81Âô¬Ædè0Uf»#àb¶ð˜ŒX³Ñ(#jÁæ‘¡ÀF·´1‡JT{HHxÂ퀀Mào¸‚„p…[ü|ϸÆ1®qcO`P¨Äâñ‡ôAÒÿ¾‚¶u mƒ<ã"àÁ©%!…-(a» e•j€t@¹HA-hÁò9<{xœ$RªYééVÒÁ4ä€.Ä#•0‚ZðÔAzP»ØÁ.v¨Sµ(<>|avPÃù’N÷Çã^7;NM P<ÁÄüˆFvNFƒêèƒ3" (=x·’ôZ9(Ôâò˜¿<$Ì@õ.tAu84t±#´­mµˆ@æWÏúÔ·þôЈ/žAD¢í]8CÑ‚éUïéÙ‚êW^Ä3lGLQut`Pjx³Á†Zìç<-Z@yËGÀÖ°Fÿ °Aþò›ßph,<ß4Èá"0B5ðŒ%”` æÏ¿þ±±ü“¿ˆ ÏÀôuÀ¨  ]€r°YZ§z°'|©Ç ã§%ð fö l€áö€b*&}Ê0÷»`@yßg ¼ÐÈ,  4Xƒ6HƒƒÀ¾À~ ˆl‘0µ°k07X„FHƒP BŒöì rpÏPýW¼…ZØ3h„X ZP i¦ ÙbÑ÷ .P+p Z‡‚àÇ ä4H:I(„x˜‡zØf<èynG—’P¢¤‡ˆ˜‡¢T µÀ€ÿ p PȃwóGº ƒU¸‰U8ƒJ˜ˆx(Jf. k6Ê@ Ls ÿ4Úðàç‚÷׉3˜„Ÿ(J¸˜‹º(JÏ`‹ð‡<ˆñà fƒà K°‹¢D¼ Ïa—p€ÀèyP§&„Õp‰Hˆ‰¤£„ʨŒoЫF÷JªX þP ðáGüƒvx‹áXkQPuì—‹“ày° ›P0‡0„p3 oà ‹ hð“aP†Úx‰ÞH˜È‘àX¹ø'¬æjËàêè. vðŽ÷428B’ Y ›°~_ÿÐõÈ~€¾à ©û˜‹è °XÉ‘J¹”ù‘49JÒðCÐþJ'™’À 0Y€0“¶ˆEOY-ðC‰‹ž ‹žŒk©“;Ù±PÖ‘ÛÈ”J¹Û(–cy S010o€’pÖ ³°•]`y‡z9–Ê8¾ð_P“)J9Ù•é˜r@ u™„v¹”x9“ŽÙàA Ò ƒY ÷f˜{À•ø•µ˜—ŽY°° `ŠÐ› )™»˜™ZЛŠf0—I:vh—¡Ù˜OÙ x°§É]:‡’÷Fk¯I/Y‡ß(𵩋ðÿ€›7 Øà*ðŠð’)œOùŸw d°‡¨ »€„ÝØ”Ï 49}ðSÜ5xŽ k´Ö p€_)“ṋ瀛f ¸Ø —À›žÐža@“í9 ðè °‰GBðÖÐ…ÍùŸà阕 O{xƒwÙ  ê•t8›/¡p°š‹Ï*À’9 ŠÀá8 Š0 ’ÉóIÖÐWx‹€v€ ý™—Š¡ZÐ Rà.À ©€7ª  ðšã÷ ß)¦¸( BJ¤×…ˆç@EÀ/À 0 º˜‚ ¥L #zá÷ŽØ€…pÿ°¥~°óø‰žð òàPj8:km:s“*§²°`<@—x¹K€¤àð~j™Zð‚š£ðw`,»° ²€Š€ð…’*§¹x–êCÐ|Ï×©Ú ª²é‘?꘴`°p Î0„É”4j!j™­P« €v§wy,hYÈ%à‡À˜Èª‹² 8ÍŠb ­ŸŠ¥u–r ØjÛZ—4(ƒ Û°F*à>О_à£p— •·®©ç®r4Kñ‰P­Èê úʯ˜b«vƒKáY — ÿ°Þ¨‰œ¸‰X €ë ›ð) ;²#Ü'À›ø òWt¯º l ? @T 9ª³>*¦µð6‹³ Ëœˆ¥ý·¨X€ÐhðBp2ÀÜw´H+î:‹uÈòª" µ¹Uû9µ)†žÚ‘Уß9© I³±p ´À­˜¨³V¨¶‹Ê Ö`»À„° v@3x{´Üç}Fð¦1K3Q ‚+J„kµ9`†‰ËšLe—°‰až»p hð- —‹¹j‹ȹž{y´À{¥kºlÓ±/(ªaɺpE*µ³k¸¶»µ¸k˜üÿ`ø¸ái—à —ÐSC¸œ »³š‹…» —’ƒ·Ü—´¨k Š)“Xĺñ=¥½…[»gè½…9 1òx‡áÉ çk-p§D˜‰í»³V¸¹Û«ô{¿ÂWy—w‚L –`ºŒ3fRk¼f· gYé P> ¹Êˆ $ª껾ìÛ°<̳ÈÛ¹ž ¨×«¾ ~³Ø…Mù¢àñð¼p¯F`'`š,lÀ­è}°ŸÔZ›K`¾ðPp§–ë5È¢¬³W¨…oø†ë‚±I½¶(³¸¸ÄBð²ÈJ³#€APÅ(ÉŠåY0zö:–K ¨`L¼Ëÿiƒé­\…š«…]ù¦=:›` ¹`ñ`ñ$¦„ ¸P»l¶µjøbâKÈo€ é{ˆÜÚ­w¹ªx¹”gëÃK‹ÝxÉO©  3  žÌ ,ʉ[Êuz´9–ÏÐÊP ¸ˆ‡´¼ª H͹È1Yƒ³Šá© uPÇfž´Pµ¸ |LFÄ0‚6Œà”4ù †laœ‹×Lú˜‡Õ,©&ûÍš<`X›ÎP¸è<ÊÒwxÙPW„ϸÈ¿| õ»-§, à ‹mµè\À¡½#=–)Ó0  àÑ…‡Y(Ðoð”‰nøÓT]›,`@cÉF-ˆKʲÖ °l€Ï¬+—` U½ÖcyÕF÷”ƒ ¿Ä + Ö9ºÓðÄáX upujÍÖ€ ’W½ƒ@“‰ð¿ ÍG ðf*éz½ºX 3po€ ÙõÈuÐŒ’€p5è¬ÝÇ­x†P ÊX ~P`ˆšÛ»XÑvõèQyšiŠ «8}C»¸©rÙ²]ܺ(ϑРáø#`s¨Ù]–exˆ·Ïp ÉhÜÚÍ‹‘ÜÊÿhMðn8w<‡YcF0Íp`»Ýî­ÈmÛ¹ÈGò†@ü$kÉL Z}]€@‘pjïíÞ½ø°‹‹µÞ0À §øjü¤ŽË  Ó} ñR0à^à½ø ®Œ ò0ÌGT©á.æs à† uv ̱ €4^ã5Î Î`ã:Nã㻾 Ê­3 «f + x!Ýq¶ z0=N“Õ@ã¸F5²`ƒ3°åz£7€7]Þå`p a~æb®Ô²å3ÐC’pvXP 0>Ó`¸   ÷À:}ûý4°Ip pИXÿ ’@š2æfp‘®$7–éÜÀœža7À °õ[¾•[¢@[»…[¢n[À 7ÀéÜÐ^†éh ~„ Ðɬ= Ó`šÌ`ä(†@Æ )±C C~ æ  Rðì P[²e[»u\5P¢•íi¥VwÕsEWÞþíseWÛŽVÙ~íÐõB x ÍÎpðÀ p | T6À_D õáN5( o ”€¬.€)dXŸZ|î@pU€8€Qõ!5R¸ÀP?ÐñÅÇòì$ò$LÅ„ (?R8uQ/ñ+ñOñˆÿ`8 C ”@ÇàìbFÊ 6`ü  Cë¤P&ÅñÆÄL\ðL¸´G“B€¤ L$HN´õŽ”õ  !dKzäIÙNÉTòá490·`f°þ€Ð $ß%)NS)@³ +° /Ìö’Tõ€ÔHœsA·c Ðø?ù¶` Ðùpù˜Oš¿ùœ¿œÿùT€ù—ß“ùޝ¦p;{À9]ÿF¤¶@r¯:< ë‚$”â.0(p+PÚú ù”ŸT°ÚÐü`ý©À+PýÕ1àÚ¯ýIÿÐý÷ðýß?ôâ?þäoàÿýÝ¿ýþÖ¿ü Ño@2¡?ú•oùÌ_+š ` Ù°bŽ:úõ«Ø°cƈPÖÙ’ÄXÁ/U*~üVŒŒáÏ_’{6ld˶CÝK(¢  bÖ,&ìäÙÓçO A'p¸Y3Š—;²©¼—Ĥ¿QOÚØbÖ„06 Ù¯… >Œ8QØ‹CA…m¦M=)ÌÛÁ®]`ÀšíÐ×ïß¿Ê&\ðá½yïZ¤Û“hMœ;)dU`W¯ÅÀ†mø Dc–8ÛìnÝ»y›V&̵° ̦]ÛòÑ2ÜˈíæÝÛ÷oà¹GÛžûµ2¿Íã]Ýz61c‘iÞ̹á爈 °à5lâ¸{ _ÞØyôÑ“­OvÌý{øñåÏÏ>YúóåµïæNü9ycŽÉ¬³°Äê¬ìî+7ýÐcï½a"”0Bd*œ® 3¤®3;ôðC5ÄÐÂÏ&to=ôôã꼃$°@ÇBÐD'ôêB AüF{ôñGu”ÑB%¬pÃêz1C!tòI(£|RÈ£ôPJ,³ÔrË 9äòK0Óˀ!ù€,€\ÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª4ø«åÊ—![ÊœIóÌ›kÛ‰ ÙÎb4q’¬IÔæÂ™Å [:ìØ1¦Ã|•)t£ÎŸXƒ&œ¹,±cÉŒ3@Ö€ØdO£úÔZõ!ͤJ¡B•:së¯b.ù1ƒ ±e ^FŒ¬1´K{N­Ûv ÎžKÁŠkĬd‰#”©t€†J½> "µc€iÓÊ„-L¬ðÙ´QYôgܦa)ÿ8Uš:u@^ª™å/¥É ¤ê³ªS¥C‘úŒËÄa :4zuÂ…Íÿv:WqÖ¢è‰bíy»©dÝ» ¦Ì´ª[¹êHJ´'€ë§SWÌ0É6Á7ãIj$2ƒ–RÊ ³Tg]vÛuÇxeMvX2 :%¢\$Ê%"X zXVk€ ¶}4LvI$pvôB -oìŒ2«c €.Ô2ǰ̩\£‡)¥ Á’d½øñ†ˆPSŠ6(€`áu¢6ßÞm¸ x­µéfao¾¹&o¡9_}1fwÝö˜B " DÇ´D……Lh]3Âø7$2E:6 1ÄÐÎ%½ â"ßl“À@„pE•´ð B#~D@zòÊÛØÿ`Ù´^‡]vÀ4³Ýi§)ãkjó+,}¾ò£ŒÙu`ë h£)† 2 øÑH%<”* H` &|Pt Œ£ÃeäqI0"s@rŽhÆ+ $°ÇAAÂs¨‘4µœÃ!€øa‡ä"N×¼"H&ÛP±ƒeÒªñÆÖÙêñ²O°ƒ6ëdBJ=×\#N.˜ñÁ €ôR‰$ÚŠ@0Ħp@"K<£A*ê”{®É@j”#- cÌ2´3$‚‡<ô\ÒÇ5õè 3ÌH +'˜:T"p P@!I'Wô v|ðÃäÝp.|óÿýp€.¸}ç"…Þ—Ø]Ç܄҉Ð@Ó$67BC|4D0_ƒM %A‹. RH E#Ì2Ƥ»ô]í Ç ”?‘Àí!N”t#AØb/ö.81Âô¬Ædè0Uf»#àb¶ð˜ŒX³Ñ(#jÁæ‘¡ÀF·´1‡JT{HHxÂ퀀Mào¸‚„p…[ü|ϸÆ1®qcO`P¨Äâñ‡ôAÒÿ¾‚¶u mƒ<ã"àÁ©%!…-(a» e•j€t@¹HA-hÁò9<{xœ$RªYééVÒÁ4ä€.Ä#•0‚ZðÔAzP»ØÁ.v¨Sµ(<>|avPÃù’N÷Çã^7;NM P<ÁÄüˆFvNFƒêèƒ3" (=x·’ôZ9(Ôâò˜¿<$Ì@õ.tAu84t±#´­mµˆ@æWÏúÔ·þôЈ/žAD¢í]8CÑ‚éUïéÙ‚êW^Ä3lGLQut`Pjx³Á†Zìç<-Z@yËGÀÖ°Fÿ °Aþò›ßph,<ß4Èá"0B5ðŒ%”` æÏ¿þ±±ü“¿ˆ ÏÀôuÀ¨  ]€r°YZ§z°'|©Ç ã§%ð fö l€áö€b*&}Ê0÷»`@yßg ¼ÐÈ,  4Xƒ6HƒƒÀ¾À~ ˆl‘0µ°k07X„FHƒP BŒöì rpÏPýW¼…ZØ3h„X ZP i¦ ÙbÑ÷ .P+p Z‡‚àÇ ä4H:I(„x˜‡zØf<èynG—’P¢¤‡ˆ˜‡¢T µÀ€ÿ p PȃwóGº ƒU¸‰U8ƒJ˜ˆx(Jf. k6Ê@ Ls ÿ4Úðàç‚÷׉3˜„Ÿ(J¸˜‹º(JÏ`‹ð‡<ˆñà fƒà K°‹¢D¼ Ïa—p€ÀèyP§&„Õp‰Hˆ‰¤£„ʨŒoЫF÷JªX þP ðáGüƒvx‹áXkQPu<øa“ày° ›P0‡0„p3 oà ‹ hð“ÐÕøQÐ`¨—耉 Žõ˜‹p0Àj®¶ Ž Žî™`ïxA#ƒó(„!’•° ëÿ÷]ðL UpaŒ€¾à ©ìLpÀè °XÙ‘TY• ’59JÒðCÐþJ(©’À 0Y€0(“¶ˆEYY-ðì× Uà“Uà _pUàyžŒ{ÙKÙžÀ”x”ž u` ¹VI•Û¸lÙ–‡€0có) gÍ0 ey–ñ¨–wø˜m©Œƒà _p—/ð¡ §ù;Ù ¡À:¹“LP­àyyù¡š/P§ùr@ Š™„‹Y•I“£ÙàA Ò ˜Y ÷¶™{`–˜–µè˜£Y°° `Šÿ0ž/ð›§yãé§é©yæùãŸQ`Óx Б¤c‡‹yœ¢™•½€[Мܥs)yo´V“uøÈ¹ºÞy²€ ~ ï åižð “0 ¢Šðž!jw d°‡¨ »€„Ýx•üÙŸ59}ðSÜ5xŽ k´Ö p€i9“º‹çàf ¸Ø — žvyšað Àà>0¥S¿9 ðè °‰GBðÖÐ…ú9£ :š• O{xƒw @Š–t˜kZ¤p°Jš‹Ï* ›_0 ŠÀ£0 ÿà^°¨‹ê¡§É'JÖÐWx‹€v€ 1ꘊX¤ZÐ Rà.À ©€sê£ Pã7¤ *ª¸( ~ ¨×…ˆç@EÀ/0¥Ú ­š£ =ù¥ç~ïˆ X›êK0ŸH£   .  ª@§³Öª30‡1I¤²* fÀ‰Ù˜Û¸„ Rª¨#ú0¬£ðw`,»° ²€ÎŠ€ð…Ó*«¹x×êCÐ|Ïç­®Øù‘{:š´`°p Î0„i•4Mº¡Ð §¬ÂÊè`)pz—Ç‚F…üW~ñp¡ÿ‰°º(  €0а(¶ ®˜Z‡k)«Ð€±f°±ŠIƒ2Ø´Nk îàæù¨wp :Py,›z/+‡A³p‹°Î°³=û)´ `0H´ôè µp ±JëšÈ‰›ˆ©ð `žž° а#;Â}°×9€Ï0³QpE8«‹ÐÀðJ°D% =Z§ ðo«§¢Z oP·wË´,À‰˜ÚÌŠ…Pm€_ 7 <À}†{¸ø²³X‡,0³: ‘›‹P@¹?˜›bú­  yÊ Ô’s —@ ‹‰yk…©Ë¬¼` F° L¨›ÿ`4s»†Ë}Þg¯ ·0’¼¢4¼•›fˆ¼ÒÉTöp ›ºº —€oÐÚh½×›ºø€ÛÛ½—G ¼G¾åË6\û‚㺖ëg¨‘+¿Å[¿š{¿›ÉfЉÎë Fp ¾p =5„øÙ´z›½XȽ»pyP 9·Ë}ˆ{¾Öð™3‰EëÐSL¼ô{†¬™³ wè ¼`ÂfзJ„™ÈÂzk…Ú˽ý:Ã6,|•wy'¸¸j ªË8ñ`¹F Äkf¿p6–þ % §Ï«ŒØ¦Â*¼ÂN»Ç{{ÀÜÛ½ˆzýê¯à7‹]x•kJ~ÿoÀ 8kfp̹ÆEÜŠþÐ/J±Û¹và o·Z½ÞXƒh:Åy{…Zø†oȽ.xl‹q‹‹Š,n‹°s;8”œ’¬Pþ£w³m¹‘€ fÄŒŸ6è‘;ÅU˜½Zx–¯š§Ù ªÏKvvO¢:¼@€ ôËfš«†/6I P´Ãü¨€Â‡È±˘ìÚ˜Uiº}<´´ØÖœ•ºðB0ºÐÍlðÍጼä P÷ ) mù 쬵€‹x8Ïì Š=œÊ,“5(ϡ蠺P´lfJ ”‹ J°ËdD #hiÀXY“ÏPÌfʹÿhÑs¬‹yHÑÓZ¶Í3†Ûé Ä{Òâ,}‡— …pE7‹,àÏ—@Óðղʑ~°Ô¹(Ô•{ÒDÌs‡··pX­ý,f,Õh=Õc­ гÌs €xßàm‰ÍBà¢iÝ×EJÕ‹ Öm™p š°]]x˜… ðYI‘è†~=ÙÛÉv„ЖŒPØp¼ã,k+À7½¾Bp Ö@٪ݖ–mtY9RðKÌ ¶Ÿ]§+0 ŽŽÕPW—Ú«ýÛ!iÙ‹05™ðKÁÐ|°o¶’þ ¬‹Õ0gðØÜØ],PÀ!ÿ WÓËܼ܊÷`• ŒÕàu †˜Ýð½‹TmðP~°•Í™ª<ºŠÓ7p°‹k*Öß®‹1 Ž06çœÝeY†‡xë 8  ™Œžá¼ ®ŒfÐï†sÊs˜%ÚY` fÀ¼ÞâZpàõ‹,@`Øù oÄO²†ÐÔÙ×ô §æâ-Þ‹ð¾¸X ÌpНÆOê¸ Ê á—O€ BNäDÞ‹o€äZÀR SÀ|D•ŠPîb>þ`‘PY` ß8çtNç¼à užçs.ÒðÛÏàZ0°j¶°‚‚ÿg;PÁ 3Àç5Y sŽkT# Ù8 9š®7z£xÃéœþé —ê¦ê@-š>Ð8„ gwõHu ã3 Å›Úp sѧãOK ·¢‰… „ )3@ n7í@pÀaØÎ |°ívÜ[¿å[¹% ´µ[¸î¶…ÜpÛÎ íÅa×~ê‘à€@ܼÞÓ0 ÌÉ …Žbd ’;€P0„à©    µ%[¶µ[ÇU5 ZŸVjuWM0WtÕñ?Wv¥ñh…ñ]/„R€RÀðl ‡¼ÿÊ'BeðEÄPoPî4Pƒ‘ðâ@ XÀ áàXB†õY ÅW W%8€ÕQOR#… õ\_L0pL`ÏNa?öÇTL¸pö#…S5õQ¿BPõS†ó0 @@ p@ t ŽÁ.f¤ ê`6Àù Á0A°N eR[oLÌÄÏ„K{4I!HšÀD‚äDšïH˜/šB¶¤Gž”Mà”LdNSCp f`ëà(0ͰBò]’â4•20 Ù°Ðù Ÿ/I”HÄ9t;¦ ÌÏücðüÏo ¶Ð ÖýTýÚ¿ýëÿ°ýÞO×oý ýÐßü ` ·³œÃùotA ` TPIûª³÷Ȱ.HB)îÒ(î­( -ߘ1 *D8ÆVƒ|TÖi£¸Á^Œ©ø­àÈ1F !C&!yϤI)U®dyÒ$I‘þbt\Á/F{´­£’Ïg 'X‘d Í„0lX1GQýúUlØ1cÄ(ë@ŠlIfÚÔ¸ÑãÈ{)³eÛ¡Î- Ñ@Ì1kôîåÛ×ï_À8Ø¥ …ÛÙRÞK"ò#È$6v ˜5¡Ã€¥Œ CöKjTªV±j6 «`†ßF“[7/_ ±cw Mÿ°f¹ìæÝ»·2àÁ…÷]<÷íÚ]eóL÷®^ —•X¦™s1ÏŸ©þBvÕ˜eJ7«=»öíf¿• c/lÁ‚ñåϧ¾Ìþ2bùõïçßßÿýðè‹ï½ö”á­älKo½øˆ1Æ)d°ËN;ªºÃÊb `öÜоý qDcJ4ñÁdRLæ[tñEc|QÅdN,qD óÓPÀE4æ˜ë¶û ´íб°ÆõÃÑD[æI(ŸDfÊ‹±òJ ·ÓrK.»äK+©ì.JS4GÍJt*H!‡$24#É2JΪ´ÒË.ÝÔsO>ûÔO8©¤Ê)³œpO/¯ÔOFuôÑFÍóQ.!µôRL3ýSKM;õôSP5 !þ*whirlgif 3.04 (c) dino@danbbs.dk 5 images;dspam-3.10.2+dfsg/contrib/plugins/thunderbird/chrome/skin/reportspam-small.png0000644000175000017500000000201611622570546027051 0ustar julienjulien‰PNG  IHDR0_úW pHYs  šœtIME× ˆ0ZýtEXtCommentCreated with The GIMPïd%n„IDATHÇí”ËnG†¿êª¾Ûà Œíq<a‘D‘ðÊrXeÇ À{øIx²#ëAE‚Ø N¸xÆàØÌx¦3—îê®ê®,Lœ°È6,|v%Õ9úÎÿýð‘%´Ölïlpíók4›M¤”xž‡âì£sŽº®±Ör||Ìh|—_|…÷± ° l}`ÿµ»»Û{úôé-ßW<~ü˜0£ˆ( QJáy’ª®(Š‚²,)´¦vŽù|ˆïÔß’¦)¦,)Š‚ºª¨ÝÿÈUß÷1Æ0YHP/^¾àÉoOØ{¹‡Öš8 iÇ•šÑØà\lû¤ãÌXæ…¦Ðk½5*›gL&Æã1ÆŠ0`¡‘Ä9ßn„ìö›¤3E:3N±Ör¡u4MQRJ¬±cÀÕÕU&³9¿þ.8xÛaq!bð—e:IY\\x·;T¶"Ë2T³ÙÄ9G,//3 0Æ"„ Ër|ßÇZ‹Öå+:‹ ‡# „@­¯¯³³³Ã<›óö퀢(þu™äy~ö.tÁp8¢}±M’$\ºt uã›ýɃhÄ1a†!Ò“ïÔu]S–%Ù|Ni kkklll ʲÜ̲lëèøWŸ®"¥D)…âÌÎÿXÙƒµ–0 i4w8¯O „Özs{g{ëé<Îóà<>)œ{Û;Û›ˆó/*MÓÍW¯î ‡‡‡ÄQLGDQ„¯ž”TUE¡ Š¢@kM¦3*[±ºúÙmuïû{L'S¤”dY†ô<þK³sîL‰”AU×¼>ÀsŠóÞË=Þ¼~ƒÖšÈWB`¥$Ë5àˆ£_Ò£¬jt®iµ[$I‚‡ôû}ž?{NY–(¥è­,±ñõŒÅ†@*6‚GOÚžœçc —/_æêÕ«x®vT¶ÂZ Àòr+<ý‘– ÆkñìõÐl61Æàœ£ª*òžôˆ£˜ ‚Ïá½7@çš<ÏIºÝîísáoüoËï{<IEND®B`‚dspam-3.10.2+dfsg/contrib/plugins/thunderbird/chrome/skin/contents.rdf0000644000175000017500000000103111622570546025367 0ustar julienjulien dspam-3.10.2+dfsg/contrib/plugins/thunderbird/chrome/skin/reportspam-large.png0000644000175000017500000000254311622570546027040 0ustar julienjulien‰PNG  IHDRHìù5bKGDÿÿÿ ½§“ pHYs  šœtIME×  €¦ª‡tEXtCommentCreated with The GIMPïd%nÇIDATXÃí–MLTWÇ÷½aŒ•2bÌ”…ˆ1ÚˆV©Im Eiµ&¶¤mX@¦¥q#ml‰V„>%‘S5¶%ÑRÓ”š¦I]Tð#T[œADˆ…yÃcœyoÞíÂ0Ö¯hꢛ÷Onrs’{ïÉÿœÜó[ÿ·Ädàšüãü¤t 8RÆ€,ª –D?$å½½Ó4 ôöö’––FQQ‰‰‰8º®\áùçt¾¬ù–‰`”T·W’BE•S•©r÷~ùP†–e‡fxx˜¼¼<²³³$==ÇÅÖ^’æ¨|\¼ýµßp²é$Š*PeÉ'[ –eát:Ù±cÙÙÙ”——SUU…ÛíÆ1˜¢§µmb”’±(ýwOü†aÄÉúA-\¸}ûö‘’’BSSƒƒƒ„ÃaJ 8ÁÐà=Ý×)«8Àš—×±gÏ.æÍK¾Ïo)e|ý»«W¯æðáÃ!hmm¥¥¥…P(„¦iŒ£€IhzšñÀ8c·&8t¨ž±± jk÷³xq:ªª¢(J¼˜³RU•üü|ª««éë룣£ƒÓ§Oã÷û‘R‰D0 ÇìÃ0Ð4™™èïïçèÑ£TWWsîܹû2Ÿ;w.ÅÅÅdeeqâÄ &''éììddd„X,/¾”òîB¤”ñŽHHH`ýúõø|>öîÝËòåË9vìÑhÇCeeeü¢`0Hss3†aÜg§!Êlp6 „   €ÔÔT®]»FMM ™™™ÔÖÖ’››K}}=†apõêU8@aa!ç±5R,ËÂ4M,Ë 77—uëÖáóù¸pá~¿Ÿºº:FGG©ªª¢»»›öövΞ=KWW”––’’’òÈsHËB×ï ( ÒÖÖFOOÝÝÝD£Q’““innfdd„`0È¥K—¸yó&[Ù½{7D£QŠ—.½× +2—U^l÷’œœLYY—/_Æï÷ãõzÑu)%wîÜ! ÒßßO__𦑢ªüüÁ6¶—ï!pê ]Ñ(999l™T–~г£ƒèŠ•(·S -JJJ`hhˆÎÎNB¡PÜS˲ÐuMÓÐu˲x/í^{{ I±;?Ù΋½Ý¼:ö7»Š H2fX´,þƒ_!r_ß(³Ö¬e`à:>Ÿ7n‰DúÔ¥Š—Vñyñ‡Ìq&ÖÈH„$—“phšÎüÅâ²/plظž[cSx½^¤”x<žxÁŸ¤†à$Ž#ßñÙ»›It& ÍÓÚ$ -mÈÂ÷q¹\8òÞÊghhˆÍ›ÞÀ4M4M#>õ#ÉÍ'1‚S8\N¤ib„f˜ÖuV-Y‚ ^¯7îC(Š{ÿ4 o gž‹9‰NÂzË0q© 3Ó3œ76ñ_'Õ‘ùîºwÞÜP2×ådFóõù?o+SEY+ÝIª‚®‡S~ŠÄÌg‡¿,[::¼u“,Ÿï¾5;˜ê>ÕÿÊZùcÆbùÌó¶Ölw::ŒïNpüjÓˆÍE6Ù\ds‘ÍE6Ù\ds‘ÍE6¶ØØbc‹-6¶ØØbc‹-Ò?PLø”w8…IEND®B`‚dspam-3.10.2+dfsg/contrib/plugins/thunderbird/chrome/skin/reportham-large.png0000644000175000017500000000236411622570546026646 0ustar julienjulien‰PNG  IHDRHìù5bKGDÿÿÿ ½§“ pHYs  šœtIME× FCtEXtCommentCreated with The GIMPïd%nXIDATXÃí–MhTWÇ÷¾÷œ‰“!™É‡)#C&ƒ™q2ÃXƒ6ø¢QŠ;…ÐE‹Ä*&‹ \4&ˆU¡ Ì覛l’…ËZp“E­Jk³HÐ@‚1iœiѼùx·‹1©©R‹‹–wàÀ»ðî9÷þϽçþ„RŠ÷i’÷lÿýúrfNýðã4JéH] T( ÐÀ¡i`)„xU«uBÏçI§ÓÌÌÌàóùèêêÂét"§¦§¹žCwº¨ª,Gj‚\V’7ó˜ùù&9ó%¦¹Šiš˜¦I6›-z.—C×u9uê‘H„»wï2??Ïêê*úÏ?Íдën p¡ÿ ŽuÃ*(,K!¥x«J)¤”d³Y’É$÷îÝãÊ•+ÌÎÎâõzÑŸ¥—9r¸OE ‰o¾åÉüq>é}ÊåË—Éd2tttP[[ËÇI§ÓÈôïÏðרÕTÇWC}üúËׯÍòò›4B}£þ“““ôôô ”¢¥¥…C‡áv»Éd2,--!!»´”Jo%;ª+èíífÇŽ úû/ðøñ<…B˲øë…, ܾ}›‰Çã´·· B`šæZ}Ö'†Çãaûöíœ>}šúúzΜ9ÃÀÀØ´òçÏŸ3<<̃èì줬¬Œææf|>𦥝J”’’’r¹÷ïß'rõêU=zDWWÛ¶m#•J188X T^^ÎÑ£G1 cK9åúÖ•REcii‰††.^¼ÈÔÔýýýŒÓÝÝa„B!úúú%•JmY#¥Ò²,t]GʵK=>>ÎÄÄÑh”ýû÷ 9þ<555\ºt‰¦¦&öìÙC[[»wïfhhˆk×®‘Éd¶ "; } else if (strncasecmp(html + i, "= 32) html2[j++] = x; i += 4; } else if (html[i+6] && html[i+6] == ';' && isdigit(html[i+2]) && isdigit(html[i+3]) && isdigit(html[i+4]) && isdigit(html[i+5])) { n[0] = html[i+2]; n[1] = html[i+3]; n[2] = html[i+4]; n[3] = html[i+5]; n[4] = 0; x = atoi(n); if (x <= 255 && x >= 32) html2[j++] = x; i += 6; } else { const char *w = &(html[i]); while (*w != ';' && *w != ' ' && *w != '\t' && *w != '\0') {i++;w++;} } visible = 0; continue; } else if (html[i] == '&') { int x = 0, y = 0; for (y = 0; y < num_chars; y++) { x = strlen(charset[y].entity); if (strncasecmp(html+i,charset[y].entity,x)==0) { if (charset[y].id <= 255) html2[j++] = charset[y].id; i += x-1; visible = 0; continue; } } } if (j < len && visible) html2[j++] = html[i]; if (j >= len) i = j = len; } html2[j] = '\0'; return (char *)html2; } dspam-3.10.2+dfsg/src/nodetree.h0000644000175000017500000000470611741351001015723 0ustar julienjulien/* $Id: nodetree.h,v 1.10 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #include #include #ifdef HAVE_UNISTD_H # include #endif #ifndef _NODETREE_H #define _NODETREE_H /* Nodetree: An ordered dynamic data collection structure * * Nodetree is designed to provide an ordered collective dynamic data * structure for arrays of unknown size, where it is impractical to * overallocate space. Nodetree allows the user to allocate memory for * new items as needed, and provides simple management and iteration * functionality. It is a linked list on steroids. * * Nodetree types: * * NT_CHAR Character Nodetree * Treats the passed pointer as a const char * and creates * new storage space for each string * * NT_PTR Pointer Nodetree * Does not perform string conversion, instead just stores * the pointer's location in the nodetree. Prior to adding * an item, the user should malloc storage for the new * structure and pass the pointer to the nodetree functions. * * NT_INDEX Pointer Index * Same as Pointer Nodetree, only does not free() the ptr * objects upon deletion */ #define NT_CHAR 0x00 #define NT_PTR 0x01 #define NT_INDEX 0x02 struct nt_node { void *ptr; struct nt_node *next; }; struct nt { struct nt_node *first; struct nt_node *insert; /* Next insertion point */ int items; int nodetype; }; struct nt_c { struct nt_node *iter_index; }; struct nt_node * nt_add (struct nt *nt, void *data); struct nt_node * c_nt_first (struct nt *nt, struct nt_c *c); struct nt_node * c_nt_next (struct nt *nt, struct nt_c *c); struct nt * nt_create (int node_type); void nt_destroy (struct nt *nt); struct nt_node * nt_node_create (void *data); #endif /* _NODETREE_H */ dspam-3.10.2+dfsg/src/sqlite3_drv.c0000644000175000017500000011624011741351001016345 0ustar julienjulien/* $Id: sqlite3_drv.c,v 1.187 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #ifndef _WIN32 # include # include #endif #ifdef HAVE_UNISTD_H # include #endif #include #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "storage_driver.h" #include "sqlite3_drv.h" #include "libdspam.h" #include "config.h" #include "error.h" #include "language.h" #include "util.h" #include "config_shared.h" #ifdef _WIN32 # include # include "dir_win32.h" #endif int dspam_init_driver (DRIVER_CTX *DTX) { return 0; } int dspam_shutdown_driver (DRIVER_CTX *DTX) { return 0; } int _sqlite_drv_get_spamtotals (DSPAM_CTX * CTX) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[1024]; char *err=NULL, **row; int nrow, ncolumn; int rc; if (s->dbh == NULL) { LOGDEBUG ("_sqlite_drv_get_spamtotals: invalid database handle (NULL)"); return EINVAL; } memset(&s->control_totals, 0, sizeof(struct _ds_spam_totals)); memset(&CTX->totals, 0, sizeof(struct _ds_spam_totals)); snprintf (query, sizeof (query), "SELECT spam_learned,innocent_learned," "spam_misclassified,innocent_misclassified," "spam_corpusfed,innocent_corpusfed," "spam_classified,innocent_classified" " FROM dspam_stats"); if ((sqlite3_get_table(s->dbh, query, &row, &nrow, &ncolumn, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } if (nrow>0 && row != NULL) { CTX->totals.spam_learned = strtoul (row[ncolumn], NULL, 0); if (CTX->totals.spam_learned == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_sqlite_drv_get_spamtotals: failed converting %s to CTX->totals.spam_learned", row[ncolumn]); rc = EFAILURE; goto FAIL; } CTX->totals.innocent_learned = strtoul (row[ncolumn+1], NULL, 0); if (CTX->totals.innocent_learned == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_sqlite_drv_get_spamtotals: failed converting %s to CTX->totals.innocent_learned", row[ncolumn+1]); rc = EFAILURE; goto FAIL; } CTX->totals.spam_misclassified = strtoul (row[ncolumn+2], NULL, 0); if (CTX->totals.spam_misclassified == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_sqlite_drv_get_spamtotals: failed converting %s to CTX->totals.spam_misclassified", row[ncolumn+2]); rc = EFAILURE; goto FAIL; } CTX->totals.innocent_misclassified = strtoul (row[ncolumn+3], NULL, 0); if (CTX->totals.innocent_misclassified == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_sqlite_drv_get_spamtotals: failed converting %s to CTX->totals.innocent_misclassified", row[ncolumn+3]); rc = EFAILURE; goto FAIL; } CTX->totals.spam_corpusfed = strtoul (row[ncolumn+4], NULL, 0); if (CTX->totals.spam_corpusfed == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_sqlite_drv_get_spamtotals: failed converting %s to CTX->totals.spam_corpusfed", row[ncolumn+4]); rc = EFAILURE; goto FAIL; } CTX->totals.innocent_corpusfed = strtoul (row[ncolumn+5], NULL, 0); if (CTX->totals.innocent_corpusfed == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_sqlite_drv_get_spamtotals: failed converting %s to CTX->totals.innocent_corpusfed", row[ncolumn+5]); rc = EFAILURE; goto FAIL; } if (row[ncolumn+6] != NULL && row[ncolumn+7] != NULL) { CTX->totals.spam_classified = strtoul (row[ncolumn+6], NULL, 0); if (CTX->totals.spam_classified == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_sqlite_drv_get_spamtotals: failed converting %s to CTX->totals.spam_classified", row[ncolumn+6]); rc = EFAILURE; goto FAIL; } CTX->totals.innocent_classified = strtoul (row[ncolumn+7], NULL, 0); if (CTX->totals.innocent_classified == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_sqlite_drv_get_spamtotals: failed converting %s to CTX->totals.innocent_classified", row[ncolumn+7]); rc = EFAILURE; goto FAIL; } } else { CTX->totals.spam_classified = 0; CTX->totals.innocent_classified = 0; } rc = 0; } else { rc = EFAILURE; } FAIL: sqlite3_free_table(row); if ( !rc ) memcpy(&s->control_totals, &CTX->totals, sizeof(struct _ds_spam_totals)); return rc; } int _sqlite_drv_set_spamtotals (DSPAM_CTX * CTX) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[1024]; char *err=NULL; int result = SQLITE_OK; if (s->dbh == NULL) { LOGDEBUG ("_sqlite_drv_set_spamtotals: invalid database handle (NULL)"); return EINVAL; } if (CTX->operating_mode == DSM_CLASSIFY) { _sqlite_drv_get_spamtotals (CTX); /* undo changes to in memory totals */ return 0; } /* dspam_stat_id insures only one stats record */ if (s->control_totals.innocent_learned == 0) { snprintf (query, sizeof (query), "INSERT INTO dspam_stats (dspam_stat_id,spam_learned," "innocent_learned,spam_misclassified,innocent_misclassified," "spam_corpusfed,innocent_corpusfed," "spam_classified,innocent_classified)" " VALUES (%d,%lu,%lu,%lu,%lu,%lu,%lu,%lu,%lu)", 0, CTX->totals.spam_learned, CTX->totals.innocent_learned, CTX->totals.spam_misclassified, CTX->totals.innocent_misclassified, CTX->totals.spam_corpusfed, CTX->totals.innocent_corpusfed, CTX->totals.spam_classified, CTX->totals.innocent_classified); result = sqlite3_exec(s->dbh, query, NULL, NULL, NULL); } if (s->control_totals.innocent_learned != 0 || result != SQLITE_OK) { snprintf (query, sizeof (query), "UPDATE dspam_stats SET spam_learned=spam_learned%s%d," "innocent_learned=innocent_learned%s%d," "spam_misclassified=spam_misclassified%s%d," "innocent_misclassified=innocent_misclassified%s%d," "spam_corpusfed=spam_corpusfed%s%d," "innocent_corpusfed=innocent_corpusfed%s%d," "spam_classified=spam_classified%s%d," "innocent_classified=innocent_classified%s%d", (CTX->totals.spam_learned > s->control_totals.spam_learned) ? "+" : "-", abs (CTX->totals.spam_learned - s->control_totals.spam_learned), (CTX->totals.innocent_learned > s->control_totals.innocent_learned) ? "+" : "-", abs (CTX->totals.innocent_learned - s->control_totals.innocent_learned), (CTX->totals.spam_misclassified > s->control_totals.spam_misclassified) ? "+" : "-", abs (CTX->totals.spam_misclassified - s->control_totals.spam_misclassified), (CTX->totals.innocent_misclassified > s->control_totals.innocent_misclassified) ? "+" : "-", abs (CTX->totals.innocent_misclassified - s->control_totals.innocent_misclassified), (CTX->totals.spam_corpusfed > s->control_totals.spam_corpusfed) ? "+" : "-", abs (CTX->totals.spam_corpusfed - s->control_totals.spam_corpusfed), (CTX->totals.innocent_corpusfed > s->control_totals.innocent_corpusfed) ? "+" : "-", abs (CTX->totals.innocent_corpusfed - s->control_totals.innocent_corpusfed), (CTX->totals.spam_classified > s->control_totals.spam_classified) ? "+" : "-", abs (CTX->totals.spam_classified - s->control_totals.spam_classified), (CTX->totals.innocent_classified > s->control_totals.innocent_classified) ? "+" : "-", abs (CTX->totals.innocent_classified - s->control_totals.innocent_classified)); if ((sqlite3_exec(s->dbh, query, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } } return 0; } int _ds_getall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; buffer *query; ds_term_t ds_term; ds_cursor_t ds_c; char scratch[1024]; char queryhead[1024]; struct _ds_spam_stat stat; unsigned long long token = 0; char *err=NULL, **row=NULL; int nrow, ncolumn, i; if (diction->items < 1) return 0; if (s->dbh == NULL) { LOGDEBUG ("_ds_getall_spamrecords: invalid database handle (NULL)"); return EINVAL; } stat.spam_hits = 0; stat.innocent_hits = 0; stat.probability = 0.00000; query = buffer_create (NULL); if (query == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } snprintf (queryhead, sizeof (queryhead), "SELECT token,spam_hits,innocent_hits" " FROM dspam_token_data WHERE token IN ("); ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while (ds_term) { scratch[0] = 0; buffer_copy(query, queryhead); while (ds_term) { snprintf (scratch, sizeof (scratch), "'%" LLU_FMT_SPEC "'", ds_term->key); buffer_cat (query, scratch); ds_term->s.innocent_hits = 0; ds_term->s.spam_hits = 0; ds_term->s.probability = 0.00000; ds_term->s.status = 0; if((query->used + 1024) > 1000000) { LOGDEBUG("_ds_getall_spamrecords: Splitting query at %ld characters", query->used); break; } ds_term = ds_diction_next(ds_c); if (ds_term) buffer_cat (query, ","); } buffer_cat (query, ")"); #ifdef VERBOSE LOGDEBUG ("SQLite query length: %ld\n", query->used); _sqlite_drv_query_error (strdup("VERBOSE DEBUG (INFO ONLY - NOT AN ERROR)"), query->data); #endif if ((sqlite3_get_table(s->dbh, query->data, &row, &nrow, &ncolumn, &err)) !=SQLITE_OK) { _sqlite_drv_query_error (err, query->data); LOGDEBUG ("_ds_getall_spamrecords: unable to run query: %s", query->data); buffer_destroy(query); ds_diction_close(ds_c); return EFAILURE; } if (nrow < 1) { sqlite3_free_table(row); buffer_destroy(query); ds_diction_close(ds_c); return 0; } if (row == NULL) { buffer_destroy(query); ds_diction_close(ds_c); return 0; } for(i=1;i<=nrow;i++) { token = strtoull (row[(i*ncolumn)], NULL, 0); stat.spam_hits = strtoul (row[1+(i*ncolumn)], NULL, 0); if (stat.spam_hits == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_getall_spamrecords: failed converting %s to stat.spam_hits", row[1+(i*ncolumn)]); sqlite3_free_table(row); return EFAILURE; } stat.innocent_hits = strtoul (row[2+(i*ncolumn)], NULL, 0); if (stat.innocent_hits == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_getall_spamrecords: failed converting %s to stat.innocent_hits", row[2+(i*ncolumn)]); sqlite3_free_table(row); return EFAILURE; } stat.status = 0; stat.status |= TST_DISK; if (stat.spam_hits < 0) stat.spam_hits = 0; if (stat.innocent_hits < 0) stat.innocent_hits = 0; ds_diction_addstat(diction, token, &stat); } if (row != NULL) sqlite3_free_table(row); row = NULL; ds_term = ds_diction_next(ds_c); } ds_diction_close(ds_c); buffer_destroy (query); if (row != NULL) sqlite3_free_table(row); row = NULL; /* Control token */ stat.spam_hits = 10; stat.innocent_hits = 10; stat.status = 0; ds_diction_touch(diction, CONTROL_TOKEN, "$$CONTROL$$", 0); ds_diction_addstat(diction, CONTROL_TOKEN, &stat); s->control_token = CONTROL_TOKEN; s->control_ih = 10; s->control_sh = 10; return 0; } int _ds_setall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; struct _ds_spam_stat control, stat; ds_term_t ds_term; ds_cursor_t ds_c; char queryhead[1024]; buffer *query; char scratch[1024]; char *err=NULL; int update_any = 0; if (diction->items < 1) return 0; if (s->dbh == NULL) { LOGDEBUG ("_ds_setall_spamrecords: invalid database handle (NULL)"); return EINVAL; } if (CTX->operating_mode == DSM_CLASSIFY && (CTX->training_mode != DST_TOE || (diction->whitelist_token == 0 && (!(CTX->flags & DSF_NOISE))))) return 0; query = buffer_create (NULL); if (query == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } ds_diction_getstat(diction, s->control_token, &control); snprintf (queryhead, sizeof (queryhead), "UPDATE dspam_token_data SET last_hit=date('now')," "spam_hits=max(0,spam_hits%s%d)," "innocent_hits=max(0,innocent_hits%s%d)" " WHERE token IN (", (control.spam_hits > s->control_sh) ? "+" : "-", abs (control.spam_hits - s->control_sh), (control.innocent_hits > s->control_ih) ? "+" : "-", abs (control.innocent_hits - s->control_ih)); buffer_copy (query, queryhead); /* * Add each token in the diction to either an update or an insert queue */ ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while(ds_term) { int use_comma = 0; if (ds_term->key == s->control_token) { ds_term = ds_diction_next(ds_c); continue; } /* Don't write lexical tokens if we're in TOE mode classifying */ if (CTX->training_mode == DST_TOE && CTX->operating_mode == DSM_CLASSIFY && ds_term->key != diction->whitelist_token && (!ds_term->name || strncmp(ds_term->name, "bnr.", 4))) { ds_term = ds_diction_next(ds_c); continue; } ds_diction_getstat(diction, ds_term->key, &stat); /* Changed tokens are marked as "dirty" by libdspam */ if (!(stat.status & TST_DIRTY)) { ds_term = ds_diction_next(ds_c); continue; } else { stat.status &= ~TST_DIRTY; } /* This token wasn't originally loaded from disk, so try an insert */ if (!(stat.status & TST_DISK)) { char ins[1024]; snprintf(ins, sizeof (ins), "INSERT INTO dspam_token_data (token,spam_hits," "innocent_hits,last_hit) VALUES ('%" LLU_FMT_SPEC "',%d,%d," "date('now'))", ds_term->key, stat.spam_hits > 0 ? 1 : 0, stat.innocent_hits > 0 ? 1 : 0); if ((sqlite3_exec(s->dbh, ins, NULL, NULL, NULL)) != SQLITE_OK) stat.status |= TST_DISK; } if (stat.status & TST_DISK) { snprintf (scratch, sizeof (scratch), "'%" LLU_FMT_SPEC "'", ds_term->key); buffer_cat (query, scratch); update_any = 1; use_comma = 1; } ds_term->s.status |= TST_DISK; ds_term = ds_diction_next(ds_c); if((query->used + 1024) > 1000000) { LOGDEBUG("_ds_setall_spamrecords: Splitting update query at %ld characters", query->used); buffer_cat (query, ")"); if (update_any) { if ((sqlite3_exec(s->dbh, query->data, NULL, NULL, &err)) != SQLITE_OK) { _sqlite_drv_query_error (err, query->data); LOGDEBUG ("_ds_setall_spamrecords: unable to run query: %s", query->data); ds_diction_close(ds_c); buffer_destroy(query); return EFAILURE; } } buffer_copy (query, queryhead); } else if (ds_term && use_comma) buffer_cat (query, ","); } ds_diction_close(ds_c); /* Just incase */ if (query->used && query->data[strlen (query->data) - 1] == ',') { query->used--; query->data[strlen (query->data) - 1] = 0; } buffer_cat (query, ")"); LOGDEBUG("Control: [%ld %ld] [%lu %lu] Delta: [%lu %lu]", s->control_sh, s->control_ih, control.spam_hits, control.innocent_hits, control.spam_hits - s->control_sh, control.innocent_hits - s->control_ih); if (update_any) { if ((sqlite3_exec(s->dbh, query->data, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query->data); LOGDEBUG ("_ds_setall_spamrecords: unable to run query: %s", query->data); buffer_destroy(query); return EFAILURE; } } buffer_destroy (query); return 0; } int _ds_get_spamrecord (DSPAM_CTX * CTX, unsigned long long token, struct _ds_spam_stat *stat) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[1024]; char *err=NULL, **row; int nrow, ncolumn; if (s->dbh == NULL) { LOGDEBUG ("_ds_get_spamrecord: invalid database handle (NULL)"); return EINVAL; } snprintf (query, sizeof (query), "SELECT spam_hits,innocent_hits FROM dspam_token_data" " WHERE token='%" LLU_FMT_SPEC "'", token); stat->probability = 0.00000; stat->spam_hits = 0; stat->innocent_hits = 0; stat->status &= ~TST_DISK; if ((sqlite3_get_table(s->dbh, query, &row, &nrow, &ncolumn, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); LOGDEBUG ("_ds_get_spamrecord: unable to run query: %s", query); return EFAILURE; } if (nrow < 1) sqlite3_free_table(row); if (nrow < 1 || row == NULL) return 0; stat->spam_hits = strtoul (row[0], NULL, 0); if (stat->spam_hits == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_spamrecord: failed converting %s to stat->spam_hits", row[0]); sqlite3_free_table(row); return EFAILURE; } stat->innocent_hits = strtoul (row[1], NULL, 0); if (stat->innocent_hits == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_spamrecord: failed converting %s to stat->innocent_hits", row[1]); sqlite3_free_table(row); return EFAILURE; } stat->status |= TST_DISK; sqlite3_free_table(row); return 0; } int _ds_set_spamrecord (DSPAM_CTX * CTX, unsigned long long token, struct _ds_spam_stat *stat) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[1024]; char *err=NULL; int result = 0; if (s->dbh == NULL) { LOGDEBUG ("_ds_set_spamrecord: invalid database handle (NULL)"); return EINVAL; } if (CTX->operating_mode == DSM_CLASSIFY) return 0; /* It's either not on disk or the caller isn't using stat.disk */ if (!(stat->status & TST_DISK)) { snprintf (query, sizeof (query), "INSERT INTO dspam_token_data (token,spam_hits,innocent_hits,last_hit)" " VALUES ('%" LLU_FMT_SPEC "',%lu,%lu,date('now'))", token, stat->spam_hits > 0 ? stat->spam_hits : 0, stat->innocent_hits > 0 ? stat->innocent_hits : 0); result = sqlite3_exec(s->dbh, query, NULL, NULL, NULL); } if ((stat->status & TST_DISK) || result) { /* insert failed; try updating instead */ snprintf (query, sizeof (query), "UPDATE dspam_token_data" " SET spam_hits=%lu," "innocent_hits=%lu" " WHERE token='%" LLU_FMT_SPEC "'", stat->spam_hits > 0 ? stat->spam_hits : 0, stat->innocent_hits > 0 ? stat->innocent_hits : 0, token); if ((sqlite3_exec(s->dbh, query, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); LOGDEBUG ("_ds_set_spamrecord: unable to run query: %s", query); return EFAILURE; } } return 0; } int _ds_init_storage (DSPAM_CTX * CTX, void *dbh) { struct _sqlite_drv_storage *s; FILE *file; char buff[1024]; char filename[MAX_FILENAME_LENGTH]; char *err=NULL; struct stat st; int noexist; buff[0] = 0; if (CTX == NULL) return EINVAL; if (CTX->flags & DSF_MERGED) { LOG(LOG_ERR, ERR_DRV_NO_MERGED); return EINVAL; } /* don't init if we're already initted */ if (CTX->storage != NULL) { LOGDEBUG ("_ds_init_storage: storage already initialized"); return EINVAL; } s = calloc (1, sizeof (struct _sqlite_drv_storage)); if (s == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } s->dbh = NULL; s->control_token = 0; s->iter_token = NULL; s->iter_sig = NULL; s->control_token = 0; s->control_sh = 0; s->control_ih = 0; s->dbh_attached = (dbh) ? 1 : 0; if (CTX->group == NULL || CTX->group[0] == 0) _ds_userdir_path (filename, CTX->home, CTX->username, "sdb"); else _ds_userdir_path (filename, CTX->home, CTX->group, "sdb"); _ds_prepare_path_for (filename); noexist = stat(filename, &st); if (dbh) s->dbh = dbh; else if ((sqlite3_open(filename, &s->dbh))!=SQLITE_OK) s->dbh = NULL; if (s->dbh == NULL) { free(s); LOGDEBUG ("_ds_init_storage: unable to initialize database: %s", filename); return EFAILURE; } /* Commit timeout of 20 minutes */ sqlite3_busy_timeout(s->dbh, 1000 * 60 * 20); /* Create database objects */ if (noexist) { LOGDEBUG ("_ds_init_storage: Creating object structure in database: %s", filename); buff[0] = 0; snprintf (buff, sizeof (buff), "CREATE TABLE dspam_token_data (token CHAR(20) PRIMARY KEY," "spam_hits INT,innocent_hits INT,last_hit DATE)"); if ((sqlite3_exec(s->dbh, buff, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, buff); free(s); return EFAILURE; } buff[0] = 0; snprintf (buff, sizeof (buff), "CREATE INDEX id_token_data_02 ON dspam_token_data" "(innocent_hits)"); if ((sqlite3_exec(s->dbh, buff, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, buff); free(s); return EFAILURE; } buff[0] = 0; snprintf (buff, sizeof (buff), "CREATE TABLE dspam_signature_data (" "signature CHAR(128) PRIMARY KEY,data BLOB,created_on DATE)"); if ((sqlite3_exec(s->dbh, buff, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, buff); free(s); return EFAILURE; } buff[0] = 0; snprintf (buff, sizeof (buff), "CREATE TABLE dspam_stats (dspam_stat_id INT 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)"); if ((sqlite3_exec(s->dbh, buff, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, buff); free(s); return EFAILURE; } buff[0] = 0; } if (_ds_read_attribute(CTX->config->attributes, "SQLitePragma")) { char pragma[1024]; attribute_t t = _ds_find_attribute(CTX->config->attributes, "SQLitePragma"); while(t != NULL) { snprintf(pragma, sizeof(pragma), "PRAGMA %s", t->value); if ((sqlite3_exec(s->dbh, pragma, NULL, NULL, &err))!=SQLITE_OK) { LOG(LOG_WARNING, "sqlite.pragma function error: %s: %s", err, pragma); _sqlite_drv_query_error (err, pragma); } t = t->next; } } else { snprintf(filename, MAX_FILENAME_LENGTH, "%s/sqlite.pragma", CTX->home); file = fopen(filename, "r"); if (file != NULL) { while((fgets(buff, sizeof(buff), file))!=NULL) { chomp(buff); if ((sqlite3_exec(s->dbh, buff, NULL, NULL, &err))!=SQLITE_OK) { LOG(LOG_WARNING, "sqlite.pragma function error: %s: %s", err, buff); _sqlite_drv_query_error (err, buff); } } fclose(file); } } CTX->storage = s; s->dir_handles = nt_create (NT_INDEX); s->control_token = 0; s->control_sh = 0; s->control_ih = 0; /* get spam totals on successful init */ if (CTX->username != NULL) { if (_sqlite_drv_get_spamtotals (CTX)) { LOGDEBUG ("_ds_init_storage: unable to load totals. Using zero values."); } } else { memset (&CTX->totals, 0, sizeof (struct _ds_spam_totals)); memset (&s->control_totals, 0, sizeof (struct _ds_spam_totals)); } return 0; } int _ds_shutdown_storage (DSPAM_CTX * CTX) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; struct nt_node *node_nt; struct nt_c c_nt; if (s->dbh == NULL) { LOGDEBUG ("_ds_shutdown_storage: invalid database handle (NULL)"); return EINVAL; } node_nt = c_nt_first (s->dir_handles, &c_nt); while (node_nt != NULL) { DIR *dir; dir = (DIR *) node_nt->ptr; closedir (dir); node_nt = c_nt_next (s->dir_handles, &c_nt); } nt_destroy (s->dir_handles); /* Store spam totals on shutdown */ if (CTX->username != NULL && CTX->operating_mode != DSM_CLASSIFY) { _sqlite_drv_set_spamtotals (CTX); } if (!s->dbh_attached) sqlite3_close(s->dbh); s->dbh = NULL; free(s); CTX->storage = NULL; return 0; } int _ds_create_signature_id (DSPAM_CTX * CTX, char *buf, size_t len) { char session[64]; char digit[6]; int pid, j; pid = getpid (); snprintf (session, sizeof (session), "%8lx%d", (long) time (NULL), pid); for (j = 0; j < 2; j++) { snprintf (digit, 6, "%d", rand ()); strlcat (session, digit, 64); } strlcpy (buf, session, len); return 0; } int _ds_get_signature (DSPAM_CTX * CTX, struct _ds_spam_signature *SIG, const char *signature) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[128]; char *err=NULL; const char *query_tail; sqlite3_stmt *stmt; if (s->dbh == NULL) { LOGDEBUG ("_ds_get_signature: invalid database handle (NULL)"); return EINVAL; } snprintf (query, sizeof (query), "SELECT data FROM dspam_signature_data WHERE signature=\"%s\"", signature); if ((sqlite3_prepare(s->dbh, query, -1, &stmt, &query_tail)) !=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } if ((sqlite3_step(stmt))!=SQLITE_ROW) { sqlite3_finalize(stmt); return EFAILURE; } SIG->length = sqlite3_column_bytes(stmt, 0); SIG->data = malloc(SIG->length); if (SIG->data == NULL) { sqlite3_finalize(stmt); LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } memcpy(SIG->data, sqlite3_column_blob(stmt, 0), SIG->length); if ((sqlite3_finalize(stmt)!=SQLITE_OK)) LOGDEBUG("_ds_get_signature: sqlite3_finalize() failed: %s", strerror(errno)); return 0; } int _ds_set_signature (DSPAM_CTX * CTX, struct _ds_spam_signature *SIG, const char *signature) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char scratch[1024]; char *err=NULL; const char *query_tail=NULL; sqlite3_stmt *stmt; if (s->dbh == NULL) { LOGDEBUG ("_ds_set_signature: invalid database handle (NULL)"); return EINVAL; } snprintf (scratch, sizeof (scratch), "INSERT INTO dspam_signature_data (signature,created_on,data)" " VALUES (\"%s\",date('now'),?)", signature); if ((sqlite3_prepare(s->dbh, scratch, -1, &stmt, &query_tail))!=SQLITE_OK) { _sqlite_drv_query_error ("_ds_set_signature: sqlite3_prepare() failed", scratch); return EFAILURE; } sqlite3_bind_blob(stmt, 1, SIG->data, SIG->length, SQLITE_STATIC); if ((sqlite3_step(stmt))!=SQLITE_DONE) { _sqlite_drv_query_error (err, scratch); return EFAILURE; } sqlite3_finalize(stmt); return 0; } int _ds_delete_signature (DSPAM_CTX * CTX, const char *signature) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[128]; char *err=NULL; if (s->dbh == NULL) { LOGDEBUG ("_ds_delete_signature: invalid database handle (NULL)"); return EINVAL; } snprintf (query, sizeof (query), "DELETE FROM dspam_signature_data WHERE signature=\"%s\"", signature); if ((sqlite3_exec(s->dbh, query, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } return 0; } int _ds_verify_signature (DSPAM_CTX * CTX, const char *signature) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[128]; char *err=NULL, **row; int nrow, ncolumn; if (s->dbh == NULL) { LOGDEBUG ("_ds_verify_signature: invalid database handle (NULL)"); return EINVAL; } snprintf (query, sizeof (query), "SELECT signature FROM dspam_signature_data WHERE signature=\"%s\"", signature); if ((sqlite3_get_table(s->dbh, query, &row, &nrow, &ncolumn, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } sqlite3_free_table(row); if (nrow<1) { return -1; } return 0; } char * _ds_get_nextuser (DSPAM_CTX * CTX) { static char user[MAX_FILENAME_LENGTH]; static char path[MAX_FILENAME_LENGTH]; struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; struct nt_node *node_nt, *prev; struct nt_c c_nt; char *x = NULL, *y; DIR *dir = NULL; struct dirent *entry; if (s->dir_handles->items == 0) { char filename[MAX_FILENAME_LENGTH]; snprintf(filename, MAX_FILENAME_LENGTH, "%s/data", CTX->home); dir = opendir (filename); if (dir == NULL) { LOG (LOG_WARNING, "_ds_get_nextuser: unable to open directory '%s' for reading: %s", CTX->home, strerror (errno)); return NULL; } nt_add (s->dir_handles, (void *) dir); strlcpy (path, filename, sizeof (path)); } else { node_nt = c_nt_first (s->dir_handles, &c_nt); while (node_nt != NULL) { if (node_nt->next == NULL) dir = (DIR *) node_nt->ptr; node_nt = c_nt_next (s->dir_handles, &c_nt); } } if (dir != NULL) { while ((entry = readdir (dir)) != NULL) { struct stat st; char filename[MAX_FILENAME_LENGTH]; snprintf (filename, sizeof (filename), "%s/%s", path, entry->d_name); if (!strcmp (entry->d_name, ".") || !strcmp (entry->d_name, "..")) continue; if (stat (filename, &st)) { continue; } /* push a new directory */ if (st.st_mode & S_IFDIR) { DIR *ndir; ndir = opendir (filename); if (ndir == NULL) continue; strlcat (path, "/", sizeof (path)); strlcat (path, entry->d_name, sizeof (path)); nt_add (s->dir_handles, (void *) ndir); return _ds_get_nextuser (CTX); } else if (!strncmp (entry->d_name + strlen (entry->d_name) - 4, ".sdb", 4)) { strlcpy (user, entry->d_name, sizeof (user)); user[strlen (user) - 4] = 0; return user; } } } /* pop current directory */ y = strchr (path, '/'); while (y != NULL) { x = y; y = strchr (x + 1, '/'); } if (x) x[0] = 0; /* pop directory handle from list */ node_nt = c_nt_first (s->dir_handles, &c_nt); prev = NULL; while (node_nt != NULL) { if (node_nt->next == NULL) { dir = (DIR *) node_nt->ptr; closedir (dir); if (prev != NULL) { prev->next = NULL; s->dir_handles->insert = NULL; } else s->dir_handles->first = NULL; free (node_nt); s->dir_handles->items--; break; } prev = node_nt; node_nt = c_nt_next (s->dir_handles, &c_nt); } if (s->dir_handles->items > 0) return _ds_get_nextuser (CTX); /* done */ user[0] = 0; return NULL; } struct _ds_storage_record * _ds_get_nexttoken (DSPAM_CTX * CTX) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; struct _ds_storage_record *st; char query[128]; char *err=NULL; const char *query_tail=NULL; int x; if (s->dbh == NULL) { LOGDEBUG ("_ds_get_nexttoken: invalid database handle (NULL)"); return NULL; } st = calloc (1, sizeof (struct _ds_storage_record)); if (st == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return NULL; } if (s->iter_token == NULL) { snprintf (query, sizeof (query), "SELECT token,spam_hits,innocent_hits,strftime('%%s'," "last_hit) FROM dspam_token_data"); if ((sqlite3_prepare(s->dbh, query, -1, &s->iter_token, &query_tail)) !=SQLITE_OK) { _sqlite_drv_query_error (err, query); free(st); return NULL; } } if ((x = sqlite3_step(s->iter_token)) !=SQLITE_ROW) { if (x != SQLITE_DONE) { _sqlite_drv_query_error (err, query); s->iter_token = NULL; free(st); return NULL; } sqlite3_finalize((struct sqlite3_stmt *) s->iter_token); s->iter_token = NULL; free(st); return NULL; } st->token = strtoull ((const char *) sqlite3_column_text(s->iter_token, 0), NULL, 0); st->spam_hits = strtoul ((const char *) sqlite3_column_text(s->iter_token, 1), NULL, 0); if (st->spam_hits == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_nexttoken: failed converting %s to st->spam_hits", (const char *) sqlite3_column_text(s->iter_token, 1)); s->iter_token = NULL; free(st); return NULL; } st->innocent_hits = strtoul ((const char *) sqlite3_column_text(s->iter_token, 2), NULL, 0); if (st->innocent_hits == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_nexttoken: failed converting %s to st->innocent_hits", (const char *) sqlite3_column_text(s->iter_token, 2)); s->iter_token = NULL; free(st); return NULL; } st->last_hit = (time_t) strtol ((const char *) sqlite3_column_text(s->iter_token, 3), NULL, 0); return st; } struct _ds_storage_signature * _ds_get_nextsignature (DSPAM_CTX * CTX) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; struct _ds_storage_signature *st; unsigned long length; char query[128]; char *mem; char *err=NULL; const char *query_tail=NULL; int x; if (s->dbh == NULL) { LOGDEBUG ("_ds_get_nextsignature: invalid database handle (NULL)"); return NULL; } st = calloc (1, sizeof (struct _ds_storage_signature)); if (st == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return NULL; } if (s->iter_sig == NULL) { snprintf (query, sizeof (query), "SELECT data,signature,strftime('%%s',created_on)" " FROM dspam_signature_data"); if ((sqlite3_prepare(s->dbh, query, -1, &s->iter_sig, &query_tail)) !=SQLITE_OK) { _sqlite_drv_query_error (err, query); free(st); return NULL; } } if ((x = sqlite3_step(s->iter_sig)) !=SQLITE_ROW) { if (x != SQLITE_DONE) { _sqlite_drv_query_error (err, query); s->iter_sig = NULL; free(st); return NULL; } sqlite3_finalize((struct sqlite3_stmt *) s->iter_sig); s->iter_sig = NULL; free(st); return NULL; } length = sqlite3_column_bytes(s->iter_sig, 0); mem = malloc (length); if (mem == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); sqlite3_finalize(s->iter_sig); s->iter_sig = NULL; free(st); return NULL; } memcpy(mem, sqlite3_column_blob(s->iter_sig, 0), length); st->data = mem; strlcpy(st->signature, (const char *) sqlite3_column_text(s->iter_sig, 1), sizeof(st->signature)); st->length = length; st->created_on = (time_t) strtol( (const char *) sqlite3_column_text(s->iter_sig, 2), NULL, 0); return st; } void _sqlite_drv_query_error (const char *error, const char *query) { FILE *file; time_t tm = time (NULL); char ct[128]; char fn[MAX_FILENAME_LENGTH]; LOG (LOG_WARNING, "query error: %s: see sql.errors for more details", error); snprintf (fn, sizeof (fn), "%s/sql.errors", LOGDIR); snprintf (ct, sizeof (ct), "%s", ctime (&tm)); chomp (ct); file = fopen (fn, "a"); if (file == NULL) { LOG(LOG_ERR, ERR_IO_FILE_WRITE, fn, strerror (errno)); } else { fprintf (file, "[%s] %d: %s: %s\n", ct, (int) getpid (), error, query); fclose (file); } free((char *)error); return; } int _ds_del_spamrecord (DSPAM_CTX * CTX, unsigned long long token) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[128]; char *err=NULL; if (s->dbh == NULL) { LOGDEBUG ("_ds_del_spamrecord: invalid database handle (NULL)"); return EINVAL; } snprintf (query, sizeof (query), "DELETE FROM dspam_token_data WHERE token='%" LLU_FMT_SPEC "'", token); if ((sqlite3_exec(s->dbh, query, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } return 0; } int _ds_delall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; ds_term_t ds_term; ds_cursor_t ds_c; buffer *query; char *err=NULL; char scratch[1024]; char queryhead[1024]; int writes = 0; if (diction->items < 1) return 0; if (s->dbh == NULL) { LOGDEBUG ("_ds_delall_spamrecords: invalid database handle (NULL)"); return EINVAL; } query = buffer_create (NULL); if (query == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } snprintf (queryhead, sizeof(queryhead), "DELETE FROM dspam_token_data" " WHERE token IN ("); buffer_cat (query, queryhead); ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while (ds_term) { snprintf (scratch, sizeof (scratch), "'%" LLU_FMT_SPEC "'", ds_term->key); buffer_cat (query, scratch); ds_term = ds_diction_next(ds_c); if (writes > 2500 || ds_term == NULL) { buffer_cat (query, ")"); if ((sqlite3_exec(s->dbh, query->data, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query->data); buffer_destroy(query); return EFAILURE; } buffer_copy(query, queryhead); writes = 0; } else { writes++; if (ds_term) buffer_cat (query, ","); } } ds_diction_close(ds_c); if (writes) { buffer_cat (query, ")"); if ((sqlite3_exec(s->dbh, query->data, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query->data); buffer_destroy(query); return EFAILURE; } } buffer_destroy (query); return 0; } void *_ds_connect (DSPAM_CTX *CTX) { return NULL; } /* Preference Stubs for Flat-File */ agent_pref_t _ds_pref_load(config_t config, const char *user, const char *home, void *dbh) { return _ds_ff_pref_load(config, user, home, dbh); } int _ds_pref_set(config_t config, const char *user, const char *home, const char *attrib, const char *value, void *dbh) { return _ds_ff_pref_set(config, user, home, attrib, value, dbh); } int _ds_pref_del(config_t config, const char *user, const char *home, const char *attrib, void *dbh) { return _ds_ff_pref_del(config, user, home, attrib, dbh); } dspam-3.10.2+dfsg/src/tools.sqlite_drv/0000755000175000017500000000000011745313542017265 5ustar julienjuliendspam-3.10.2+dfsg/src/tools.sqlite_drv/purge-2.sql0000644000175000017500000000064611622570546021300 0ustar julienjulien-- $Id: purge-2.sql,v 1.0 2009/12/22 12:25:59 sbajic Exp $ delete from dspam_token_data where (innocent_hits*2) + spam_hits < 5 and date('now')-date(last_hit) > 30; delete from dspam_token_data where innocent_hits + spam_hits = 1 and date('now')-date(last_hit) > 15; delete from dspam_token_data where date('now')-date(last_hit) > 90; delete from dspam_signature_data where date('now')-date(created_on) > 14; dspam-3.10.2+dfsg/src/tools.sqlite_drv/Makefile.am0000644000175000017500000000020111622570546021315 0ustar julienjulien# $Id: Makefile.am,v 1.3 2005/07/14 13:24:02 jonz Exp $ # tools.sqlite_drv/Makefile.am # EXTRA_DIST = purge-2.sql purge-3.sql dspam-3.10.2+dfsg/src/tools.sqlite_drv/Makefile.in0000644000175000017500000002546611745313452021347 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.3 2005/07/14 13:24:02 jonz Exp $ # tools.sqlite_drv/Makefile.am # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/tools.sqlite_drv DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = purge-2.sql purge-3.sql all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tools.sqlite_drv/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/tools.sqlite_drv/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/src/tools.sqlite_drv/purge-3.sql0000644000175000017500000000073611622570546021301 0ustar julienjulien-- $Id: purge-3.sql,v 1.1 2010/04/21 11:31:00 sbajic Exp $ delete from dspam_token_data where (innocent_hits*2) + spam_hits < 5 and (julianday('now')-30) > julianday(last_hit); delete from dspam_token_data where innocent_hits + spam_hits = 1 and (julianday('now')-15) > julianday(last_hit); delete from dspam_token_data where (julianday('now')-90) > julianday(last_hit); delete from dspam_signature_data where (julianday('now')-14) > julianday(created_on); vacuum; dspam-3.10.2+dfsg/src/auto-config.h.in0000644000175000017500000001227111745313537016752 0ustar julienjulien/* src/auto-config.h.in. Generated from configure.ac by autoheader. */ #ifndef __auto_config_h #define __auto_config_h /* Defined if clamav is enabled */ #undef CLAMAV /* Configure Arguments */ #undef CONFIGURE_ARGS /* Defined if daemon support is enabled */ #undef DAEMON /* Defined if debug output is enabled */ #undef DEBUG /* Defined if domain_scale is enabled */ #undef DOMAINSCALE /* Defined if external lookup is enabled */ #undef EXT_LOOKUP /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRMSG_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the `getpwnam_r' function. */ #undef HAVE_GETPWNAM_R /* Define to 1 if you have the `getpwuid_r' function. */ #undef HAVE_GETPWUID_R /* Define to 1 if you have the inet_ntoa_r function. */ #undef HAVE_INET_NTOA_R /* inet_ntoa_r() takes 2 args */ #undef HAVE_INET_NTOA_R_2 /* inet_ntoa_r() takes 3 args */ #undef HAVE_INET_NTOA_R_3 /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if you have ISO C99 vararg macros */ #undef HAVE_ISO_VARARGS /* Define to 1 if you have the header file. */ #undef HAVE_LBER_H /* Define to 1 if you have the header file. */ #undef HAVE_LDAP_H /* Define if you have liblber */ #undef HAVE_LIBLBER /* Define if you have libldap */ #undef HAVE_LIBLDAP /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_MYSQLD_ERROR_H /* Define to 1 if you have the header file. */ #undef HAVE_MYSQL_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Defined if PQfreemem is supported */ #undef HAVE_PQFREEMEM /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasestr' function. */ #undef HAVE_STRCASESTR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the `strsep' function. */ #undef HAVE_STRSEP /* Define to 1 if you have the `strtok_r' function. */ #undef HAVE_STRTOK_R /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Defined if home directory support is enabled */ #undef HOMEDIR /* Defined if large_scale is enabled */ #undef LARGESCALE /* Defined if BNR Debug is enabled */ #undef LIBBNR_DEBUG /* Logfile */ #undef LOGFILE /* Defined if long usernames is enabled */ #undef LONG_USERNAMES /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Defined if mysql4-initialization is enabled */ #undef MYSQL4_INITIALIZATION /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Defined if storage driver supports preferences extension */ #undef PREFERENCES_EXTENSION /* Defined if split configuration is enabled */ #undef SPLIT_CONFIG /* Define if using a single, statically linked storage driver */ #undef STATIC_DRIVER /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Defined if trusted user security are enabled */ #undef TRUSTED_USER_SECURITY /* Defined if LDAP is found */ #undef USE_LDAP /* Defined if syslog is enabled */ #undef USE_SYSLOG /* Defined if verbose debug output is enabled */ #undef VERBOSE /* Version number of package */ #undef VERSION /* Defined if homedir dotfiles is enabled */ #undef VIRTUAL_USERS /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif #endif /* !__auto_config_h */ dspam-3.10.2+dfsg/src/diction.h0000644000175000017500000000425611741351001015547 0ustar julienjulien/* $Id: diction.h,v 1.10 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef _DICTION_H # define _DICTION_H #include "nodetree.h" #include "libdspam_objects.h" typedef struct _ds_diction { unsigned long size; unsigned long items; struct _ds_term **tbl; unsigned long long whitelist_token; struct nt *order; struct nt *chained_order; } *ds_diction_t; typedef struct _ds_term { unsigned long long key; struct _ds_term *next; int frequency; struct _ds_spam_stat s; char *name; char type; } *ds_term_t; typedef struct _ds_diction_c { struct _ds_diction *diction; unsigned long iter_index; ds_term_t iter_next; } *ds_cursor_t; typedef unsigned long long ds_key_t; ds_diction_t ds_diction_create(unsigned long size); void ds_diction_destroy(ds_diction_t diction); ds_term_t ds_diction_term_create(ds_key_t key, const char *name); ds_term_t ds_diction_find(ds_diction_t diction, ds_key_t key); ds_term_t ds_diction_touch(ds_diction_t diction, ds_key_t key, const char *name, int flags); void ds_diction_delete(ds_diction_t diction, ds_key_t key); int ds_diction_setstat(ds_diction_t diction, ds_key_t key, ds_spam_stat_t s); int ds_diction_addstat(ds_diction_t diction, ds_key_t key, ds_spam_stat_t s); int ds_diction_getstat(ds_diction_t diction, ds_key_t key, ds_spam_stat_t s); ds_cursor_t ds_diction_cursor(ds_diction_t diction); ds_term_t ds_diction_next(ds_cursor_t cur); void ds_diction_close(ds_cursor_t cur); #define DSD_CHAINED 0x01 #define DSD_CONTEXT 0x02 #endif /* _DICTION_H */ dspam-3.10.2+dfsg/src/list.h0000644000175000017500000000320311741351001015060 0ustar julienjulien/* $Id: list.h,v 1.10 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #include #include #ifdef HAVE_UNISTD_H # include #endif #ifndef _LIST_H #define _LIST_H struct bnr_list_node { void *ptr; /* Token name or pointer */ float value; /* Token value (probability) */ int eliminated; /* Token eliminated == 1 */ struct bnr_list_node *next; }; struct bnr_list { struct bnr_list_node *first; struct bnr_list_node *insert; /* Next insertion point */ int items; int nodetype; }; struct bnr_list_c { struct bnr_list_node *iter_index; }; struct bnr_list_node *bnr_list_insert( struct bnr_list *list, void *data, float v); struct bnr_list_node *c_bnr_list_first( struct bnr_list *list, struct bnr_list_c *c); struct bnr_list_node *c_bnr_list_next( struct bnr_list *list, struct bnr_list_c *c); struct bnr_list * bnr_list_create (int node_type); void bnr_list_destroy(struct bnr_list *list); #endif /* _LIST_H */ dspam-3.10.2+dfsg/src/base64.c0000644000175000017500000001041411741351001015166 0ustar julienjulien/* $Id: base64.c,v 1.99 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* * base64.c - base64 encoding/decoding routines * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "error.h" #include "base64.h" char * base64decode (const char *buf) { #ifdef VERBOSE LOGDEBUG ("decoding Base64 encoded buffer"); #endif unsigned char alphabet[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static char first_time = 1,inalphabet[256], decoder[256]; int bits, c, char_count; int pos = 0, dpos = 0; char *decoded; decoded = malloc ((strlen (buf) * 2) + 2); if (decoded == NULL) return NULL; decoded[0] = 0; if(first_time) { int i; for (i = (sizeof alphabet) - 1; i >= 0; i--) { inalphabet[alphabet[i]] = 1; decoder[alphabet[i]] = i; } first_time = 0; } char_count = 0; bits = 0; while (buf[pos] != 0) { c = buf[pos]; if (c == '=') break; if (c > 255 || !inalphabet[c]) { pos++; continue; } bits += decoder[c]; char_count++; if (char_count == 4) { decoded[dpos] = (bits >> 16); decoded[dpos + 1] = ((bits >> 8) & 0xff); decoded[dpos + 2] = (bits & 0xff); decoded[dpos + 3] = 0; dpos += 3; bits = 0; char_count = 0; } else { bits <<= 6; } pos++; } c = buf[pos]; if (c == 0) { if (char_count) { LOGDEBUG ("base64 encoding incomplete: at least %d bits truncated", ((4 - char_count) * 6)); } } else { /* c == '=' */ switch (char_count) { case 1: LOGDEBUG ("base64 encoding incomplete: at least 2 bits missing"); break; case 2: decoded[dpos] = (bits >> 10); decoded[dpos + 1] = 0; break; case 3: decoded[dpos] = (bits >> 16); decoded[dpos + 1] = ((bits >> 8) & 0xff); decoded[dpos + 2] = 0; break; } } if (strlen(decoded) > 0 && decoded[strlen(decoded)-1] != '\n') strcat(decoded, "\n"); return decoded; } char * base64encode (const char *buf) { #ifdef VERBOSE LOGDEBUG ("encoding buffer to Base64"); #endif unsigned char alphabet[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; int cols, bits, c, char_count; char *out; long rpos = 0, wpos = 0; out = malloc (strlen (buf) * 2); if (out == NULL) return NULL; out[0] = 0; char_count = 0; bits = 0; cols = 0; c = buf[rpos]; while (c != 0) { bits += c; char_count++; if (char_count == 3) { out[wpos] = (alphabet[bits >> 18]); out[wpos + 1] = (alphabet[(bits >> 12) & 0x3f]); out[wpos + 2] = (alphabet[(bits >> 6) & 0x3f]); out[wpos + 3] = (alphabet[bits & 0x3f]); wpos += 4; cols += 4; if (cols == 72) { out[wpos] = '\n'; wpos++; cols = 0; } out[wpos] = 0; bits = 0; char_count = 0; } else { bits <<= 8; } rpos++; c = buf[rpos]; } if (char_count != 0) { bits <<= 16 - (8 * char_count); out[wpos] = (alphabet[bits >> 18]); out[wpos + 1] = (alphabet[(bits >> 12) & 0x3f]); wpos += 2; if (char_count == 1) { out[wpos] = '='; out[wpos + 1] = '='; } else { out[wpos] = (alphabet[(bits >> 6) & 0x3f]); out[wpos + 1] = '='; } wpos += 2; if (cols > 0) { out[wpos] = '\n'; wpos++; } out[wpos] = 0; } if (out[strlen (out) - 1] != '\n') strcat (out, "\n"); return out; } dspam-3.10.2+dfsg/src/example.c0000644000175000017500000002334511741351001015544 0ustar julienjulien/* $Id: example.c,v 1.11 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* * example.c - example of libdspam implementation * * DESCRIPTION * * * compile with: * gcc -o example example.c -ldspam -L.libs -I. -DHAVE_CONFIG_H \ * -DCONFIG_DEFAULT=/usr/local/etc/dspam.conf */ #include #include #include #include #define USERNAME "testuser" int main (int argc, char **argv) { char dspam_home[] = "/var/dspam"; /* Our dspam data home */ char buffer[1024]; char *message = malloc (1); long len = 1; DSPAM_CTX *CTX; /* DSPAM Context */ struct _ds_spam_signature SIG; /* Example signature */ /* Performs any driver-specific startup functions (such as initializing internal lock tables). Call this only once when your application starts */ dspam_init_driver (NULL); /* read in the message from stdin */ message[0] = 0; while (fgets (buffer, sizeof (buffer), stdin) != NULL) { len += strlen (buffer); message = realloc (message, len); if (message == NULL) { fprintf (stderr, "out of memory!"); exit (EXIT_FAILURE); } strcat (message, buffer); } /* MESSAGE PROCESSING */ /* initialize dspam Operating Modes: DSM_PROCESS: Process message DSM_CLASSIFY: Classify message only (do not write changes) Flags: DSF_SIGNATURE Signature Mode (Use a signature) DSF_NOISE Use Bayesian Noise Reduction DSF_WHITELIST Use Automatic Whitelisting Tokenizers: DSZ_WORD Use WORD tokenizer DSZ_CHAIN Use CHAIN tokenizer DSZ_SBPH Use SBPH tokenizer DSZ_OSB Use OSB tokenizer Training Modes: DST_TEFT Train Everything DST_TOE Train-on-Error DST_TUM Train-until-Mature Classifications: Used to tell libdspam the message has already been classified, and should be processed in such a way that the result will match the classification. DSR_ISSPAM Message is spam (learn as spam) DSR_ISINNOCENT Message is innocent (learn as innocent) DSR_NONE No predetermined classification (classify message) Sources: Used to tell libdspam the source of the specified classification (if any). DSS_ERROR Misclassification by libdspam DSS_CORPUS Corpusfed message DSS_INOCULATION Message inoculation DSS_NONE No classification source (use only with DSR_NONE) NOTE: When using DSS_ERROR, a DSPAM signature should be provided, OR the original message in PRISTINE form (without any DSPAM headers and with the original message's headers). */ /* --------------------------- EXAMPLE 1 ----------------------------*/ /* STANDARD INBOUND PROCESSING */ /* In this example, DSF_SIGNATURE is specified to request that libdspam generate a signature, which can be stored internally for future retraining. This is useful if the original message in pristine form won't be available server-side should the user want to reclassify the message. */ /* Initialize the DSPAM context */ CTX = dspam_init (USERNAME, NULL, dspam_home, DSM_PROCESS, DSF_SIGNATURE | DSF_NOISE); if (CTX == NULL) { fprintf (stderr, "ERROR: dspam_init failed!\n"); exit (EXIT_FAILURE); } /* Use graham and robinson algorithms, graham's p-values */ CTX->algorithms = DSA_GRAHAM | DSA_BURTON | DSP_GRAHAM; /* Use CHAIN tokenizer */ CTX->tokenizer = DSZ_CHAIN; /* Call DSPAM's processor with the message text */ if (dspam_process (CTX, message) != 0) { fprintf (stderr, "ERROR: dspam_process failed"); exit (EXIT_FAILURE); } /* Print processing results */ printf ("Probability: %2.4f Confidence: %2.4f, Result: %s\n", CTX->probability, CTX->confidence, (CTX->result == DSR_ISSPAM) ? "Spam" : "Innocent"); /* Manage signature */ if (CTX->signature == NULL) { printf ("No signature provided\n"); } else { /* Copy to a safe place */ SIG.data = malloc (CTX->signature->length); if (SIG.data != NULL) memcpy (SIG.data, CTX->signature->data, CTX->signature->length); } SIG.length = CTX->signature->length; /* Destroy the context */ dspam_destroy(CTX); /* --------------------------- EXAMPLE 2 ----------------------------*/ /* SPAM REPORTING (AS MISCLASSIFICATION) */ /* We call everything just like before, with these exceptions: - We set the classification to DSR_ISSPAM - We set the source to DSS_ERROR This example will use the original message in pristine form instead of a signature. See the next example (false positives) for an example using a signature. */ /* Initialize the DSPAM context */ CTX = dspam_init (USERNAME, NULL, dspam_home, DSM_PROCESS, 0); if (CTX == NULL) { fprintf (stderr, "ERROR: dspam_init failed!\n"); exit (EXIT_FAILURE); } /* Set up the context for error correction as spam */ CTX->classification = DSR_ISSPAM; CTX->source = DSS_ERROR; /* Use graham and robinson algorithms, graham's p-values */ CTX->algorithms = DSA_GRAHAM | DSA_BURTON | DSP_GRAHAM; /* Use CHAIN tokenizer */ CTX->tokenizer = DSZ_CHAIN; /* Call DSPAM */ if (dspam_process(CTX, message) != 0) { fprintf (stderr, "ERROR: dspam_process failed\n"); exit (EXIT_FAILURE); } /* Destroy the context */ dspam_destroy (CTX); printf("Spam retrained successfully.\n"); /* --------------------------- EXAMPLE 3 ----------------------------*/ /* FALSE POSITIVE REPORTING */ /* Here we submit the message's signature for retraining as a false positive. We make the following changes from our original example: - We set the classification to DSR_ISINNOCENT - We set the source to DSS_ERROR - We attach the binary signature to the context, and pass in a NULL text */ /* Initialize DSPAM context */ CTX = dspam_init (USERNAME, NULL, dspam_home, DSM_PROCESS, DSF_SIGNATURE); if (CTX == NULL) { fprintf (stderr, "ERROR: dspam_init failed!\n"); exit (EXIT_FAILURE); } /* Set up the context for error correction as innocent */ CTX->classification = DSR_ISINNOCENT; CTX->source = DSS_ERROR; /* Use graham and robinson algorithms, graham's p-values */ CTX->algorithms = DSA_GRAHAM | DSA_BURTON | DSP_GRAHAM; /* Use CHAIN tokenizer */ CTX->tokenizer = DSZ_CHAIN; /* Attach the signature to the context */ CTX->signature = &SIG; /* Call DSPAM */ if (dspam_process(CTX, NULL) != 0) { fprintf (stderr, "ERROR: dspam_process failed\n"); exit (EXIT_FAILURE); } /* Destroy the context */ dspam_destroy(CTX); printf("False positive retrained successfully.\n"); /* --------------------------- EXAMPLE 4 ----------------------------*/ /* USE OF CREATE AND ATTACH WITH ATTRIBUTES API */ /* If we want to provide libdspam with a set of storage driver attributes so that it doesn't have to go looking for a [driver].data file to get SQL-server information from, we can use the create/attach mode of preparing a context, rather than calling dspam_init() */ /* Create the DSPAM context; called just like dspam_init() */ CTX = dspam_create (USERNAME, NULL, dspam_home, DSM_PROCESS, DSF_SIGNATURE); if (CTX == NULL) { fprintf (stderr, "ERROR: dspam_create failed!\n"); exit (EXIT_FAILURE); } /* Now we have a context but it is not attached to the storage driver. The next step is to set up our set of attributes to tell the driver how to connect. In this example, we'll assume we're using a MySQL backend. */ dspam_addattribute(CTX, "MySQLServer", "127.0.0.1"); dspam_addattribute(CTX, "MySQLPort", "3306"); dspam_addattribute(CTX, "MySQLUser", "example"); dspam_addattribute(CTX, "MySQLPass", "1234"); dspam_addattribute(CTX, "MySQLDb", "dspam"); /* Use graham and robinson algorithms, graham's p-values */ CTX->algorithms = DSA_GRAHAM | DSA_BURTON | DSP_GRAHAM; /* Use CHAIN tokenizer */ CTX->tokenizer = DSZ_CHAIN; /* Here, we can also pass in any other attributes used by libdspam (see dspam.conf). We can also do this after the attach, since they are not used until we process a message. */ dspam_addattribute(CTX, "IgnoreHeader", "X-Virus-Scanner-Result"); /* Now a call to dspam_attach() will connect our context to the storage driver interface and establish a connection. Alternatively, if you have an open database handle you may pass it in as the second parameter and avoid opening a new database connection */ if (dspam_attach(CTX, NULL)) { fprintf (stderr, "ERROR: dspam_attach failed!\n"); exit(EXIT_FAILURE); } /* Then proceed like normal and when we're done, destroy the context like we normally do */ dspam_destroy(CTX); printf("Create/attach performed successfully.\n"); /* Performs any driver-specific shutdown functions */ dspam_shutdown_driver (NULL); exit (EXIT_SUCCESS); } dspam-3.10.2+dfsg/src/pgsql_drv.h0000644000175000017500000000553411741351001016117 0ustar julienjulien/* $Id: pgsql_drv.h,v 1.17 2011/09/30 20:52:20 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef _PGSQL_DRV_H # define _PGSQL_DRV_H #ifdef HAVE_CONFIG_H #include #endif #include struct _pgsql_drv_storage { PGconn *dbh; /* database connection */ int pg_token_type; /* type of token */ struct _ds_spam_totals control_totals; /* totals at storage init */ struct _ds_spam_totals merged_totals; /* totals for merged group */ /* control token data; used to measure deltas from getall to setall * enabling us to code a sql query based on increments/decrements * instead of query-coded data */ unsigned long long control_token; /* control token crc */ long control_sh; /* control token spam hits at getall */ long control_ih; /* control token innocent hits at getall */ PGresult *iter_user; /* get_nextuser iteration result */ PGresult *iter_token; /* get_nexttoken iteration result */ PGresult *iter_sig; /* get_nextsignature iteration result */ char u_getnextuser[MAX_FILENAME_LENGTH]; struct passwd p_getpwuid; struct passwd p_getpwnam; int dbh_attached; }; /* Driver-specific functions */ int _pgsql_drv_get_spamtotals (DSPAM_CTX * CTX); int _pgsql_drv_set_spamtotals (DSPAM_CTX * CTX); void _pgsql_drv_query_error (const char *error, const char *query); int _pgsql_drv_token_type (struct _pgsql_drv_storage *s, PGresult *result, int column); char *_pgsql_drv_token_write (int type, unsigned long long token, char *buffer, size_t bufsz); unsigned long long _pgsql_drv_token_read(int type, char *str); PGconn *_pgsql_drv_connect (DSPAM_CTX *CTX); struct passwd *_pgsql_drv_getpwnam (DSPAM_CTX * CTX, const char *name); struct passwd *_pgsql_drv_getpwuid (DSPAM_CTX * CTX, uid_t uid); DSPAM_CTX *_pgsql_drv_init_tools( const char *home, config_t config, void *dbh, int mode); #ifdef VIRTUAL_USERS struct passwd *_pgsql_drv_setpwnam (DSPAM_CTX * CTX, const char *name); #endif #ifdef EXT_LOOKUP int verified_user; #endif #ifdef PREFERENCES_EXTENSION int _pgsql_drv_set_attributes(DSPAM_CTX *CTX, config_t config); #endif #endif /* _PGSQL_DRV_H */ dspam-3.10.2+dfsg/src/dspam-uninstalled.pc.in0000644000175000017500000000037511622570546020337 0ustar julienjulienName: DSPAM Uninstalled Description: DSPAM Anti-Spam Library, Not Installed Version: @VERSION@ Libs: -L${libdir} -ldspam Cflags: -I${includedir}/dspam Libs: ${pc_top_builddir}/${pcfiledir}/libdspam.la Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ dspam-3.10.2+dfsg/src/buffer.h0000644000175000017500000000231611741351001015362 0ustar julienjulien/* $Id: buffer.h,v 1.9 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef _BUFFER_H #define _BUFFER_H typedef struct { long size; long used; char *data; } buffer; buffer *buffer_create (const char *); buffer *buffer_ncreate (const char *, long plen); void buffer_destroy (buffer *); int buffer_copy (buffer *, const char *); int buffer_ncopy (buffer *, const char *, long plen); int buffer_cat (buffer *, const char *); int buffer_ncat (buffer *, const char *, long plen); int buffer_clear (buffer *); #endif /* _BUFFER_H */ dspam-3.10.2+dfsg/src/libdspam.c0000644000175000017500000022164111741351001015703 0ustar julienjulien/* $Id: libdspam.c,v 1.205 2011/07/13 00:51:46 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* * libdspam.c - DSPAM core analytical engine * * DESCRIPTION * libdspam is at the core of the decision making process and is called * by the agent to perform all tasks related to message classification. * The libdspam API functions are documented in libdspam(1). */ #ifndef STATIC_DRIVER void *_drv_handle; #endif #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "config.h" #include "libdspam_objects.h" #include "libdspam.h" #include "nodetree.h" #include "config.h" #include "base64.h" #include "bnr.h" #include "util.h" #include "storage_driver.h" #include "buffer.h" #include "heap.h" #include "error.h" #include "decode.h" #include "language.h" #define CHI_S 0.1 /* Chi-Sq Strength */ #define CHI_X 0.5000 /* Chi-Sq Assumed Probability */ #define C1 16 /* Markov C1 */ #define C2 1 /* Markov C2 */ #ifdef DEBUG int DO_DEBUG = 0; #endif /* * dspam_init() * * DESCRIPTION * The dspam_init() function creates and initializes a new classification * context and attaches the context to whatever backend storage facility * was configured. The user and group arguments provided are used to read * and write information stored for the user and group specified. The home * argument is used to configure libdspam's storage around the base direc- * tory specified. The mode specifies the operating mode to initialize the * classification context with and may be one of: * * DSM_PROCESS Process the message and return a result * DSM_CLASSIFY Classify message only, no learning * DSM_TOOLS No processing, attach to storage only * * The flags provided further tune the classification context for a spe- * cific function. Multiple flags may be OR'd together. * * DSF_SIGNATURE A binary signature is requested/provided * DSF_NOISE Apply Bayesian Noise Reduction logic * DSF_WHITELIST Use automatic whitelisting logic * DSF_MERGED Merge group metadata with user's in memory * * RETURN VALUES * Upon successful completion, dspam_init() will return a pointer to a new * classification context structure containing a copy of the configuration * passed into dspam_init(), a connected storage driver handle, and a set * of preliminary user control data read from storage. */ DSPAM_CTX * dspam_init ( const char *username, const char *group, const char *home, int operating_mode, u_int32_t flags) { DSPAM_CTX *CTX = dspam_create(username, group, home, operating_mode, flags); if (CTX == NULL) return NULL; if (!dspam_attach(CTX, NULL)) return CTX; dspam_destroy(CTX); return NULL; } /* dspam_create() * * DESCRIPTION * The dspam_create() function performs in exactly the same manner as the * dspam_init() function, but does not attach to storage. Instead, the * caller must also call dspam_attach() after setting any storage- spe- * cific attributes using dspam_addattribute(). This is useful for cases * where the implementor would prefer to configure storage internally * rather than having libdspam read a configuration from a file. * * RETURN VALUES * Upon successful completion, dspam_create() will return a pointer to a new * classification context structure containing a copy of the configuration * passed into dspam_create(). At this point, dspam_attach() must be called * for further processing. */ DSPAM_CTX * dspam_create ( const char *username, const char *group, const char *home, int operating_mode, u_int32_t flags) { DSPAM_CTX *CTX; CTX = calloc (1, sizeof (DSPAM_CTX)); if (CTX == NULL) { LOG(LOG_WARNING, "dspam_create: unable to allocate space for classification context"); return NULL; } CTX->config = calloc(1, sizeof(struct _ds_config)); if (CTX->config == NULL) { LOG(LOG_WARNING, "dspam_create: unable to allocate space for classification context configuration"); LOG(LOG_CRIT, ERR_MEM_ALLOC); goto bail; } CTX->config->size = 128; CTX->config->attributes = calloc(1, sizeof(attribute_t)*(CTX->config->size)); if (CTX->config->attributes == NULL) { LOG(LOG_WARNING, "dspam_create: unable to allocate space for classification context attributes"); LOG(LOG_CRIT, ERR_MEM_ALLOC); goto bail; } if (home != NULL && home[0] != 0) CTX->home = strdup (home); else { #ifdef DSPAM_HOME CTX->home = strdup(DSPAM_HOME); #else CTX->home = NULL; #endif } if (username != NULL && username[0] != 0) CTX->username = strdup (username); else CTX->username = NULL; if (group != NULL && group[0] != 0) CTX->group = strdup (group); else CTX->group = NULL; CTX->probability = DSP_UNCALCULATED; CTX->operating_mode = operating_mode; CTX->flags = flags; CTX->message = NULL; CTX->confidence = 0; CTX->training_mode = DST_TEFT; CTX->wh_threshold = 10; CTX->training_buffer = 0; CTX->classification = DSR_NONE; CTX->source = DSS_NONE; CTX->_sig_provided = 0; CTX->factors = NULL; CTX->algorithms = 0; CTX->tokenizer = DSZ_WORD; return CTX; bail: if (CTX != NULL) { if (CTX->config != NULL) { if (CTX->config->attributes != NULL) _ds_destroy_config(CTX->config->attributes); free(CTX->config); } if (CTX->username != NULL) free(CTX->username); if (CTX->group != NULL) free(CTX->group); if (CTX->home != NULL) free(CTX->home); free(CTX); } return NULL; } /* * dspam_clearattributes() * * DESCRIPTION * The dspam_clearattributes() function is called to clear any attributes * previously set using dspam_addattribute() within the classification * context. It is necessary to call this function prior to replacing any * attributes already written. * * RETURN VALUES * returns 0 on success, standard errors on failure * */ int dspam_clearattributes (DSPAM_CTX * CTX) { if (CTX->config) { _ds_destroy_config(CTX->config->attributes); free(CTX->config); } else { return EFAILURE; } CTX->config = calloc(1, sizeof(struct _ds_config)); if (CTX->config == NULL) goto bail; CTX->config->size = 128; CTX->config->attributes = calloc(1, sizeof(attribute_t)*(CTX->config->size)); if (CTX->config->attributes == NULL) goto bail; return 0; bail: if (CTX->config != NULL) { free(CTX->config); CTX->config = NULL; } LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } /* * dspam_addattribute() * * DESCRIPTION * The dspam_addattribute() function is called to set attributes within * the classification context. Some storage drivers support the use of * passing specific attributes such as server connect information. The * driver-independent attributes supported by DSPAM include: * * IgnoreHeader Specify a specific header to ignore * LocalMX Specify a local mail exchanger to assist in * correct results from dspam_getsource(). * * Only driver-dependent attributes need be set prior to a call to * dspam_attach(). Driver-independent attributes may be set both before * and after storage has been attached. * * RETURN VALUES * returns 0 on success, standard errors on failure */ int dspam_addattribute (DSPAM_CTX * CTX, const char *key, const char *value) { int i, j = 0; if (_ds_find_attribute(CTX->config->attributes, key)) return _ds_add_attribute(CTX->config->attributes, key, value); for(i=0;CTX->config->attributes[i];i++) j++; if (j >= CTX->config->size) { config_t ptr; CTX->config->size *= 2; ptr = realloc(CTX->config->attributes, 1+(sizeof(attribute_t)*CTX->config->size)); if (ptr) { CTX->config->attributes = ptr; } else { LOG(LOG_CRIT, ERR_MEM_ALLOC); return EFAILURE; } } return _ds_add_attribute(CTX->config->attributes, key, value); } /* * dspam_attach() * * DESCRIPTION * The dspam_attach() function attaches the storage interface to the clas- * sification context and alternatively established an initial connection * with storage if dbh is NULL. Some storage drivers support only a NULL * value for dbh, while others (such as mysql_drv, pgsql_drv, and * sqlite_drv) allow an open database handle to be attached. This function * should only be called after an initial call to dspam_create() and * should never be called if using dspam_init(), as storage is automati- * cally attached by a call to dspam_init(). * * RETURN VALUES * returns 0 on success, standard errors on failure */ int dspam_attach (DSPAM_CTX *CTX, void *dbh) { if (!_ds_init_storage (CTX, dbh)) return 0; return EFAILURE; } /* * dspam_detach() * * DESCRIPTION * The dspam_detach() function can be called when a detachment from stor- * age is desired, but the context is still needed. The storage driver is * closed, leaving the classification context in place. Once the context * is no longer needed, another call to dspam_destroy() should be made. If * you are closing storage and destroying the context at the same time, it * is not necessary to call this function. Instead you may call * dspam_destroy() directly. * * RETURN VALUES * returns 0 on success, standard errors on failure */ int dspam_detach (DSPAM_CTX * CTX) { if (CTX->storage != NULL) { /* Sanity check totals before our shutdown call writes them */ if (CTX->totals.spam_learned < 0) CTX->totals.spam_learned = 0; if (CTX->totals.innocent_learned < 0) CTX->totals.innocent_learned = 0; if (CTX->totals.spam_misclassified < 0) CTX->totals.spam_misclassified = 0; if (CTX->totals.innocent_misclassified < 0) CTX->totals.innocent_misclassified = 0; if (CTX->totals.spam_classified < 0) CTX->totals.spam_classified = 0; if (CTX->totals.innocent_classified < 0) CTX->totals.innocent_classified = 0; _ds_shutdown_storage (CTX); free(CTX->storage); CTX->storage = NULL; } return 0; } /* * dspam_destroy() * * The dspam_destroy() function should be called when the context is no * longer needed. If a connection was established to storage internally, * the connection is closed and all data is flushed and written. If a han- * dle was attached, the handle will remain open. */ void dspam_destroy (DSPAM_CTX * CTX) { if (CTX->storage != NULL) dspam_detach(CTX); _ds_factor_destroy(CTX->factors); if (CTX->config && CTX->config->attributes) _ds_destroy_config (CTX->config->attributes); free (CTX->config); free (CTX->username); free (CTX->group); free (CTX->home); if (! CTX->_sig_provided && CTX->signature != NULL) { if (CTX->signature->data != NULL) free (CTX->signature->data); free (CTX->signature); } if (CTX->message) _ds_destroy_message(CTX->message); free (CTX); return; } /* * dspam_process() * * DESCRIPTION * The dspam_process() function performs analysis of the message passed * into it and will return zero on successful completion. If successful, * CTX->result will be set to one of three classification results: * * DSR_ISSPAM Message was classified as spam * DSR_ISINNOCENT Message was classified as nonspam * * RETURN VALUES * returns 0 on success * * EINVAL An invalid call or invalid parameter used. * EUNKNOWN Unexpected error, such as malloc() failure * EFILE Error opening or writing to a file or file handle * ELOCK Locking failure * EFAILURE The operation itself has failed */ int dspam_process (DSPAM_CTX * CTX, const char *message) { #ifdef DEBUG struct timeval tp1, tp2; struct timezone tzp; #endif buffer *header, *body; int spam_result = 0, is_toe = 0, is_undertrain = 0, retcode = 0; #ifdef DEBUG gettimeofday(&tp1, &tzp); #endif if (CTX->signature != NULL) CTX->_sig_provided = 1; /* Sanity check context behavior */ if (CTX->operating_mode == DSM_CLASSIFY && CTX->classification != DSR_NONE) { LOG(LOG_WARNING, "DSM_CLASSIFY can't be used with a classification"); return EINVAL; } if (CTX->algorithms == 0) { LOG(LOG_WARNING, "No algorithms configured. Use CTX->algorithms and DSA_"); return EINVAL; } if (CTX->classification != DSR_NONE && CTX->source == DSS_NONE) { LOG(LOG_WARNING, "A classification requires a source be specified"); return EINVAL; } if (CTX->classification == DSR_NONE && CTX->source != DSS_NONE) { LOG(LOG_WARNING, "A source requires a classification be specified"); return EINVAL; } /* Set TOE mode pretrain option if we haven't seen many messages yet */ if (CTX->training_mode == DST_TOE && (CTX->totals.innocent_learned <= 100 || CTX->totals.spam_learned <= 100) && (!(CTX->algorithms & DSP_MARKOV))) { is_undertrain = 1; CTX->training_mode = DST_TEFT; } /* Classify only for TOE / NOTRAIN mode setting if data is mature enough */ if ( CTX->operating_mode == DSM_PROCESS && CTX->classification == DSR_NONE && (CTX->training_mode == DST_TOE || CTX->training_mode == DST_NOTRAIN)) { CTX->operating_mode = DSM_CLASSIFY; is_toe = 1; } /* A signature has been presented for training; process it */ /* Non-SPBH Signature */ if (CTX->operating_mode == DSM_PROCESS && CTX->classification != DSR_NONE && CTX->flags & DSF_SIGNATURE && (CTX->tokenizer != DSZ_SBPH)) { retcode = _ds_process_signature (CTX); goto restore_mode; } header = buffer_create (NULL); body = buffer_create (NULL); if (header == NULL || body == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); buffer_destroy (header); buffer_destroy (body); retcode = EUNKNOWN; goto restore_mode; } /* Parse the message if it hasn't already been by the client app */ if (!CTX->message && message) CTX->message = _ds_actualize_message (message); /* Analyze and filter (unless it's a signature based classification) */ if (! (CTX->flags & DSF_SIGNATURE && CTX->operating_mode == DSM_CLASSIFY && CTX->signature != NULL)) { _ds_degenerate_message(CTX, header, body); } /*** Perform statistical operations and get a classification result ***/ /* Initialize */ CTX->result = DSR_NONE; /* If SBPH reclassification, recall and operate on saved SBPH text */ if ( CTX->tokenizer == DSZ_SBPH && CTX->operating_mode != DSM_CLASSIFY && CTX->classification != DSR_NONE && CTX->flags & DSF_SIGNATURE) { char *y, *h, *b; char *ptrptr = NULL; y = strdup((const char *) CTX->signature->data); h = strtok_r(y, "\001", &ptrptr); b = strtok_r(NULL, "\001", &ptrptr); spam_result = _ds_operate (CTX, h, b); free(y); /* Otherwise, operate on the input message */ } else { spam_result = _ds_operate (CTX, header->data, body->data); } /* Clean up */ buffer_destroy (header); buffer_destroy (body); /* _ds_operate() was unable to process message. Restore operating and training mode. */ if (spam_result != DSR_ISSPAM && spam_result != DSR_ISINNOCENT) { LOG(LOG_WARNING, "received invalid result (!DSR_ISSPAM && !DSR_ISINNOCENT)" ": %d", spam_result); retcode = EFAILURE; goto restore_mode; } /* Force decision if a classification was specified */ if (CTX->classification != DSR_NONE) { if (CTX->classification == DSR_ISINNOCENT) spam_result = DSR_ISINNOCENT; else if (CTX->classification == DSR_ISSPAM) spam_result = DSR_ISSPAM; } /* Apply results to context */ CTX->result = spam_result; if (CTX->class[0] == 0) { if (spam_result == DSR_ISSPAM) strcpy(CTX->class, LANG_CLASS_SPAM); else if (spam_result == DSR_ISINNOCENT) strcpy(CTX->class, LANG_CLASS_INNOCENT); } /* Restore operating mode and/or training mode */ restore_mode: if (is_toe) CTX->operating_mode = DSM_PROCESS; if (is_undertrain) CTX->training_mode = DST_TOE; #ifdef DEBUG if (DO_DEBUG) { if (CTX->source == DSS_NONE) { gettimeofday(&tp2, &tzp); LOGDEBUG("total processing time: %01.5fs", (double) (tp2.tv_sec + (tp2.tv_usec / 1000000.0)) - (double) (tp1.tv_sec + (tp1.tv_usec / 1000000.0))); } } #endif return retcode; } /* * dspam_getsource() * * DESCRIPTION * * The dspam_getsource() function extracts the source sender from the mes- * sage passed in during a call to dspam_process() and writes not more * than size bytes to buf. * * RETURN VALUES * returns 0 on success, standard errors on failure */ int dspam_getsource ( DSPAM_CTX * CTX, char *buf, size_t size) { ds_message_part_t current_block; ds_header_t current_heading = NULL; struct nt_node *node_nt; struct nt_c c; char qmailmode = 0; if (CTX->message == NULL) return EINVAL; node_nt = c_nt_first (CTX->message->components, &c); if (node_nt == NULL) return EINVAL; current_block = (ds_message_part_t) node_nt->ptr; node_nt = c_nt_first (current_block->headers, &c); while (node_nt != NULL) { current_heading = (ds_header_t) node_nt->ptr; if (!strcmp (current_heading->heading, "Received")) { char *data, *ptr, *tok; // detect and skip "Received: (qmail..." lines if (!strncmp(current_heading->data, "(qmail", 6)) { qmailmode = 1; node_nt = c_nt_next (current_block->headers, &c); continue; } data = strdup (current_heading->data); ptr = strstr (data, "from"); if (ptr != NULL) { if (strchr(data, '[')) // found a non-qmail header { qmailmode = 0; } // qmail puts the sending IP inside the last "()" pair of the line if (qmailmode) { tok = strrchr(data, ')'); if (tok != NULL) { *tok = 0; tok = strrchr(data, '('); if (tok != NULL) tok++; } } else { char *ptrptr = NULL; tok = strtok_r (ptr, "[", &ptrptr); if (tok != NULL) { tok = strtok_r (NULL, "]", &ptrptr); } } if (tok != NULL) { int whitelisted = 0; if (!strncmp (tok, "127.",4) || // ignore localhost !strncmp (tok, "10.", 3) || // ignore RFC 1918 private addresses !strncmp (tok, "172.16.", 7) || !strncmp (tok, "192.168.", 8) || !strncmp (tok, "169.254.", 8)) // ignore local-link whitelisted = 1; if (_ds_match_attribute(CTX->config->attributes, "LocalMX", tok)) whitelisted = 1; if (!whitelisted) { strlcpy (buf, tok, size); free (data); return 0; } } } free (data); } node_nt = c_nt_next (current_block->headers, &c); } return EFAILURE; } /* * _ds_operate() - operate on the message * * DESCRIPTION * calculate the statistical probability the email is spam * update tokens in dictionary according to result/mode * * INPUT ARGUMENTS * DSPAM_CTX *CTX pointer to context * char *header pointer to message header * char *body pointer to message body * * RETURN VALUES * standard errors on failure * * DSR_ISSPAM message is spam * DSR_ISINNOCENT message is innocent */ int _ds_operate (DSPAM_CTX * CTX, char *headers, char *body) { int errcode = 0; /* Create our diction (lexical data in message) and patterns */ ds_diction_t diction = ds_diction_create(24593ul); ds_diction_t bnr_patterns = NULL; ds_term_t ds_term; ds_cursor_t ds_c; ds_heap_t heap_sort = NULL; /* Heap sort for top N tokens */ #ifdef LIBBNR_DEBUG ds_heap_t heap_nobnr = NULL; #endif unsigned long long whitelist_token = 0; int do_whitelist = 0; int result; unsigned int heap_sort_items = 0; if (CTX->algorithms & DSA_BURTON) heap_sort = ds_heap_create(BURTON_WINDOW_SIZE, HP_DELTA); else if (CTX->algorithms & DSA_ROBINSON) heap_sort = ds_heap_create(25, HP_DELTA); else heap_sort = ds_heap_create(15, HP_DELTA); /* Allocate SBPH signature (stored as message text) */ if ( CTX->tokenizer == DSZ_SBPH && CTX->flags & DSF_SIGNATURE && ( ( CTX->operating_mode != DSM_CLASSIFY && CTX->classification == DSR_NONE) || ! (CTX->_sig_provided)) && CTX->source != DSS_CORPUS) { if (CTX->signature) { if (CTX->signature->data) free(CTX->signature->data); free(CTX->signature); CTX->signature = NULL; } CTX->signature = calloc (1, sizeof (struct _ds_spam_signature)); if (CTX->signature == NULL) { LOG (LOG_CRIT, "memory allocation error"); errcode = EUNKNOWN; goto bail; } CTX->signature->length = strlen(headers)+strlen(body)+2; CTX->signature->data = malloc(CTX->signature->length); if (CTX->signature->data == NULL) { LOG (LOG_CRIT, "memory allocation error"); free (CTX->signature); CTX->signature = NULL; errcode = EUNKNOWN; goto bail; } strcpy(CTX->signature->data, headers); strcat(CTX->signature->data, "\001"); strcat(CTX->signature->data, body); } if (!diction) { LOG (LOG_CRIT, ERR_MEM_ALLOC); errcode = EUNKNOWN; goto bail; } #ifdef LIBBNR_DEBUG heap_nobnr = ds_heap_create (heap_sort->size, HP_DELTA); if (heap_nobnr == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); errcode = EUNKNOWN; goto bail; } #endif CTX->result = (CTX->classification == DSR_ISSPAM) ? DSR_ISSPAM : DSR_ISINNOCENT; /* If we are classifying based on a signature, preprogram the tree */ if (CTX->flags & DSF_SIGNATURE && CTX->operating_mode == DSM_CLASSIFY && CTX->_sig_provided) { int num_tokens = CTX->signature->length / sizeof (struct _ds_signature_token); struct _ds_signature_token t; int i; for (i = 0; i < num_tokens; i++) { char x[128]; memcpy (&t, (char *) CTX->signature->data + (i * sizeof (struct _ds_signature_token)), sizeof (struct _ds_signature_token)); snprintf (x, sizeof (x), "E: %" LLU_FMT_SPEC, t.token); ds_term = ds_diction_touch(diction, t.token, x, 0); if (ds_term) ds_term->frequency = t.frequency; } } /* Otherwise, tokenize the message and propagate the tree */ else { if (_ds_tokenize(CTX, headers, body, diction)) { LOG(LOG_CRIT, "tokenizer failed"); } whitelist_token = diction->whitelist_token; } /* Load all token statistics */ if (_ds_getall_spamrecords (CTX, diction)) { LOGDEBUG ("_ds_getall_spamrecords() failed"); errcode = EUNKNOWN; goto bail; } /* Apply Bayesian Noise Reduction */ if (CTX->flags & DSF_NOISE) { ds_diction_t p = _ds_apply_bnr(CTX, diction); if (p) ds_diction_destroy(p); } if (CTX->flags & DSF_WHITELIST) { LOGDEBUG("Whitelist threshold: %d", CTX->wh_threshold); } /* Create a heap sort based on the token's delta from .5 */ ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while(ds_term) { if (ds_term->key == CONTROL_TOKEN) { ds_term = ds_diction_next(ds_c); continue; } if (ds_term->s.probability == 0.00000 || CTX->classification != DSR_NONE) _ds_calc_stat (CTX, ds_term, &ds_term->s, DTT_DEFAULT, NULL); if (CTX->flags & DSF_WHITELIST) { if (ds_term->key == whitelist_token && ds_term->s.spam_hits <= (ds_term->s.innocent_hits / 15) && ds_term->s.innocent_hits > CTX->wh_threshold && CTX->classification == DSR_NONE) { do_whitelist = 1; } } if (ds_term->frequency > 0 && ds_term->type == 'D') { ds_heap_insert (heap_sort, ds_term->s.probability, ds_term->key, ds_term->frequency, _ds_compute_complexity(ds_term->name)); } #ifdef LIBBNR_DEBUG if (ds_term->type == 'D') { ds_heap_insert (heap_nobnr, ds_term->s.probability, ds_term->key, ds_term->frequency, _ds_compute_complexity(ds_term->name)); } #endif #ifdef VERBOSE LOGDEBUG ("Token: %s [%f] SH %ld IH %ld", ds_term->name, ds_term->s.probability, ds_term->s.spam_hits, ds_term->s.innocent_hits); #endif ds_term = ds_diction_next(ds_c); } ds_diction_close(ds_c); /* Keep track of items in heap_sort. We need that info later on when freeing the signature */ heap_sort_items = heap_sort->items; /* Take the 15 most interesting tokens and generate a score */ if (heap_sort->items == 0) { LOGDEBUG ("no tokens found in message"); errcode = EINVAL; goto bail; } /* Initialize Non-SBPH signature, if requested */ if ( CTX->tokenizer != DSZ_SBPH && CTX->flags & DSF_SIGNATURE && (CTX->operating_mode != DSM_CLASSIFY || ! CTX->_sig_provided)) { if (CTX->signature) { if (CTX->signature->data) free(CTX->signature->data); free(CTX->signature); CTX->signature = NULL; } CTX->signature = calloc (1, sizeof (struct _ds_spam_signature)); if (CTX->signature == NULL) { LOG (LOG_CRIT, "memory allocation error"); errcode = EUNKNOWN; goto bail; } CTX->signature->length = sizeof (struct _ds_signature_token) * diction->items; CTX->signature->data = malloc (CTX->signature->length); if (CTX->signature->data == NULL) { LOG (LOG_CRIT, "memory allocation error"); free (CTX->signature); CTX->signature = NULL; errcode = EUNKNOWN; goto bail; } } #ifdef LIBBNR_DEBUG { int x = CTX->result; int nobnr_result = 0; if (CTX->flags & DSF_NOISE) { nobnr_result = _ds_calc_result(CTX, heap_nobnr, diction); if (CTX->factors) { _ds_factor_destroy(CTX->factors); CTX->factors = NULL; } CTX->result = x; CTX->probability = DSP_UNCALCULATED; } #endif result = _ds_calc_result(CTX, heap_sort, diction); #ifdef LIBBNR_DEBUG if (CTX->flags & DSF_NOISE) { if (nobnr_result == result) { LOGDEBUG("BNR Decision Concurs"); } else { LOGDEBUG("BNR Decision Conflicts: %d (BNR) / %d (No BNR)", result, nobnr_result); } } } #endif if (CTX->flags & DSF_WHITELIST && do_whitelist) { LOGDEBUG("auto-whitelisting this message"); CTX->result = DSR_ISINNOCENT; strcpy(CTX->class, LANG_CLASS_WHITELISTED); } /* Update Totals */ /* SPAM */ if (CTX->result == DSR_ISSPAM && CTX->operating_mode != DSM_CLASSIFY) { if (!(CTX->flags & DSF_UNLEARN)) { CTX->totals.spam_learned++; CTX->learned = 1; } if (CTX->classification == DSR_ISSPAM) { if (CTX->flags & DSF_UNLEARN) { CTX->totals.spam_learned -= (CTX->totals.spam_learned > 0) ? 1 : 0; } else if (CTX->source == DSS_CORPUS || CTX->source == DSS_INOCULATION) { CTX->totals.spam_corpusfed++; } else if (SPAM_MISS(CTX)) { CTX->totals.spam_misclassified++; if (CTX->training_mode != DST_TOE && CTX->training_mode != DST_NOTRAIN) { CTX->totals.innocent_learned -= (CTX->totals.innocent_learned > 0) ? 1 : 0; } } } /* INNOCENT */ } else if ((CTX->result == DSR_ISINNOCENT) && CTX->operating_mode != DSM_CLASSIFY) { if (!(CTX->flags & DSF_UNLEARN)) { CTX->totals.innocent_learned++; CTX->learned = 1; } if (CTX->source == DSS_CORPUS || CTX->source == DSS_INOCULATION) { CTX->totals.innocent_corpusfed++; } else if (FALSE_POSITIVE(CTX)) { if (CTX->flags & DSF_UNLEARN) { CTX->totals.innocent_learned -= (CTX->totals.innocent_learned >0) ? 1:0; } else { CTX->totals.innocent_misclassified++; if (CTX->training_mode != DST_TOE && CTX->training_mode != DST_NOTRAIN) { CTX->totals.spam_learned -= (CTX->totals.spam_learned > 0) ? 1 : 0; } } } } /* TOE mode increments 'classified' totals */ if (CTX->training_mode == DST_TOE && CTX->operating_mode == DSM_CLASSIFY) { if (CTX->result == DSR_ISSPAM) CTX->totals.spam_classified++; else if (CTX->result == DSR_ISINNOCENT) CTX->totals.innocent_classified++; } _ds_increment_tokens(CTX, diction); /* Store all tokens */ if (CTX->training_mode != DST_NOTRAIN) { if (_ds_setall_spamrecords (CTX, diction)) { LOGDEBUG ("_ds_setall_spamrecords() failed"); errcode = EUNKNOWN; goto bail; } } ds_diction_destroy (diction); ds_heap_destroy (heap_sort); #ifdef LIBBNR_DEBUG ds_heap_destroy (heap_nobnr); #endif /* One final sanity check */ if (CTX->classification == DSR_ISINNOCENT) { CTX->probability = 0.0; CTX->result = DSR_ISINNOCENT; } else if (CTX->classification == DSR_ISSPAM) { CTX->probability = 1.0; CTX->result = DSR_ISSPAM; } return CTX->result; bail: LOG(LOG_ERR, "bailing on error %d", errcode); ds_heap_destroy (heap_sort); #ifdef LIBBNR_DEBUG ds_heap_destroy (heap_nobnr); #endif ds_diction_destroy(diction); ds_diction_destroy(bnr_patterns); if (CTX->signature != NULL) { if (CTX->signature->data != NULL) { free(CTX->signature->data); CTX->signature->data = NULL; } if (CTX->signature != NULL && heap_sort_items > 0) free (CTX->signature); CTX->signature = NULL; } return errcode; } /* * _ds_process_signature() * * DESCRIPTION * process an erroneously classified message processing based on signature * * INPUT ARGUMENTS * parameters: DSPAM_CTX *CTX Pointer to context containing signature */ int _ds_process_signature (DSPAM_CTX * CTX) { struct _ds_signature_token t; int num_tokens, i; ds_diction_t diction = ds_diction_create(24593ul); ds_term_t ds_term; ds_cursor_t ds_c; int occurrence = _ds_match_attribute(CTX->config->attributes, "ProcessorWordFrequency", "occurrence"); if (diction == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } if (CTX->signature == NULL) { LOG(LOG_WARNING, "DSF_SIGNATURE specified, but no signature provided."); ds_diction_destroy(diction); return EINVAL; } LOGDEBUG ("processing signature. length: %ld", CTX->signature->length); CTX->result = DSR_NONE; if (!(CTX->flags & DSF_UNLEARN)) CTX->learned = 1; /* INNOCENT */ if (CTX->classification == DSR_ISINNOCENT && CTX->operating_mode != DSM_CLASSIFY) { if (CTX->flags & DSF_UNLEARN) { CTX->totals.innocent_learned -= (CTX->totals.innocent_learned) > 0 ? 1:0; } else { if (CTX->source == DSS_ERROR) { CTX->totals.innocent_misclassified++; if (CTX->training_mode != DST_TOE && CTX->training_mode != DST_NOTRAIN) { CTX->totals.spam_learned -= (CTX->totals.spam_learned > 0) ? 1:0; } } else { CTX->totals.innocent_corpusfed++; } CTX->totals.innocent_learned++; } } /* SPAM */ else if (CTX->classification == DSR_ISSPAM && CTX->operating_mode != DSM_CLASSIFY) { if (CTX->flags & DSF_UNLEARN) { CTX->totals.spam_learned -= (CTX->totals.spam_learned > 0) ? 1 : 0; } else { if (CTX->source == DSS_ERROR) { CTX->totals.spam_misclassified++; if (CTX->training_mode != DST_TOE && CTX->training_mode != DST_NOTRAIN) { CTX->totals.innocent_learned -= (CTX->totals.innocent_learned > 0) ? 1:0; } } else { CTX->totals.spam_corpusfed++; } CTX->totals.spam_learned++; } } num_tokens = CTX->signature->length / sizeof (struct _ds_signature_token); if (CTX->class[0] == 0) { if (CTX->classification == DSR_ISSPAM) strcpy(CTX->class, LANG_CLASS_SPAM); else if (CTX->classification == DSR_ISINNOCENT) strcpy(CTX->class, LANG_CLASS_INNOCENT); } /* Don't retrain if no tokens where loaded from the signature */ if (num_tokens == 0) { LOG (LOG_WARNING, "Skipping retraining for signature with %d tokens", num_tokens); LOGDEBUG ("Skipping retraining for signature with %d tokens", num_tokens); } else { LOGDEBUG ("Reversing %d tokens", num_tokens); for (i = 0; i < num_tokens; i++) { memcpy (&t, (char *) CTX->signature->data + (i * sizeof (struct _ds_signature_token)), sizeof (struct _ds_signature_token)); ds_term = ds_diction_touch (diction, t.token, "-", 0); if (ds_term) { ds_term->frequency = t.frequency; } } if (_ds_getall_spamrecords (CTX, diction)) { ds_diction_destroy(diction); return EUNKNOWN; } ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while(ds_term) { /* INNOCENT */ if (CTX->classification == DSR_ISINNOCENT) { if (CTX->flags & DSF_UNLEARN) { if (occurrence) { ds_term->s.innocent_hits -= ds_term->frequency; if (ds_term->s.innocent_hits < 0) ds_term->s.innocent_hits = 0; } else { ds_term->s.innocent_hits -= (ds_term->s.innocent_hits>0) ? 1:0; } } else { if (CTX->source == DSS_ERROR && CTX->training_mode != DST_NOTRAIN && CTX->training_mode != DST_TOE) { if (occurrence) { ds_term->s.spam_hits -= ds_term->frequency; if (ds_term->s.spam_hits < 0) ds_term->s.spam_hits = 0; } else { ds_term->s.spam_hits -= (ds_term->s.spam_hits>0) ? 1:0; } } if (CTX->source == DSS_INOCULATION) { if (ds_term->s.spam_hits < 2 && ds_term->s.innocent_hits < 5) { ds_term->s.innocent_hits += 5; } else { ds_term->s.innocent_hits += 2; } } else /* ERROR or CORPUS */ { if (occurrence) { ds_term->s.innocent_hits += ds_term->frequency; } else { ds_term->s.innocent_hits++; } } } } /* SPAM */ else if (CTX->classification == DSR_ISSPAM) { if (CTX->flags & DSF_UNLEARN) { if (occurrence) { ds_term->s.spam_hits -= ds_term->frequency; if (ds_term->s.spam_hits < 0) ds_term->s.spam_hits = 0; } else { ds_term->s.spam_hits -= (ds_term->s.spam_hits>0) ? 1:0; } } else { if (CTX->source == DSS_ERROR && CTX->training_mode != DST_NOTRAIN && CTX->training_mode != DST_TOE) { if (occurrence) { ds_term->s.innocent_hits -= ds_term->frequency; if (ds_term->s.innocent_hits < 0) ds_term->s.innocent_hits = 0; } else { ds_term->s.innocent_hits -= (ds_term->s.innocent_hits>0) ? 1:0; } } if (CTX->source == DSS_INOCULATION) { if (ds_term->s.innocent_hits < 2 && ds_term->s.spam_hits < 5) { ds_term->s.spam_hits += 5; } else { ds_term->s.spam_hits += 2; } } else /* ERROR or CORPUS */ { if (occurrence) { ds_term->s.spam_hits += ds_term->frequency; } else { ds_term->s.spam_hits++; } } } } ds_term->s.status |= TST_DIRTY; ds_term = ds_diction_next(ds_c); } ds_diction_close(ds_c); if (CTX->training_mode != DST_NOTRAIN) { if (_ds_setall_spamrecords (CTX, diction)) { ds_diction_destroy(diction); return EUNKNOWN; } } } if (CTX->classification == DSR_ISSPAM) { CTX->probability = 1.0; CTX->result = DSR_ISSPAM; LOGDEBUG ("Message classification/result: SPAM"); } else { CTX->probability = 0.0; CTX->result = DSR_ISINNOCENT; LOGDEBUG ("Message classification/result: INNOCENT"); } ds_diction_destroy(diction); return 0; } /* * _ds_calc_stat() - Calculate the probability of a token * * DESCRIPTION * * Calculates the probability of an individual token based on the * pvalue algorithm chosen. The resulting value largely depends on * the total amount of ham/spam in the user's corpus. The result * is written to s. * * INPUT ARGUMENTS * CTX DSPAM context * term ds_term_t * token_type DTT_ value specifying token type * bnr_tot BNR totals structure */ int _ds_calc_stat ( DSPAM_CTX * CTX, ds_term_t term, struct _ds_spam_stat *s, int token_type, struct _ds_spam_stat *bnr_tot) { int min_hits, sed_hits = 0; unsigned long ti, ts; if (token_type == DTT_BNR) { min_hits = 25; /* Bayesian Noise Reduction patterns */ } else { min_hits = 5; /* "Standard" token threshold */ } /* Statistical Sedation: Adjust hapaxial threshold to compensate for a * spam corpus imbalance */ ti = CTX->totals.innocent_learned + CTX->totals.innocent_classified; ts = CTX->totals.spam_learned + CTX->totals.spam_classified; if (CTX->training_buffer>0) { if (ti < 1000 && ti < ts) { sed_hits = min_hits+(CTX->training_buffer/2)+ (CTX->training_buffer*((ts-ti)/200)); } if (ti < 2500 && ti >=1000 && ts > ti) { float spams = (ts * 1.0 / (ts * 1.0 + ti * 1.0)) * 100; sed_hits = min_hits+(CTX->training_buffer/2)+ (CTX->training_buffer*(spams/20)); } } else if (! CTX->training_buffer) { min_hits = 5; } if (token_type != DTT_DEFAULT || sed_hits > min_hits) min_hits = sed_hits; /* TUM mode training only records up to 20 hits so we need to make sure we * don't require more than that. */ if (CTX->training_mode == DST_TUM && min_hits > 20) min_hits = 20; if (CTX->classification == DSR_ISSPAM) s->probability = .7; else s->probability = (CTX->algorithms & DSP_MARKOV) ? .5 : .4; /* Markovian Weighting */ if (CTX->algorithms & DSP_MARKOV) { unsigned int weight; long num, den; /* some utilities don't provide the token name, and so we can't compute * a probability. just return something neutral. */ if (term == NULL) { s->probability = .5; return 0; } /* return neutral probability for BNR patterns */ if (token_type == DTT_BNR || term->type == 'B' || !strncmp(term->name, "bnr.", 4)) { s->probability = .5; return 0; } /* return neutral probability for frequency tokens */ if (!strncmp(term->name, "E: ", 3)) { s->probability = .5; return 0; } /* return neutral probability for "From" tokens (used for when whitelisting) */ if (!strncmp(term->name, "From*", 5)) { s->probability = .5; return 0; } /* return neutral probability for control tokens */ if (!strncmp(term->name, "$$CONTROL$$", 11)) { s->probability = .5; return 0; } weight = _ds_compute_weight(term->name); if (CTX->flags & DSF_BIAS) { num = weight * (s->spam_hits - (s->innocent_hits*2)); den = C1 * (s->spam_hits + (s->innocent_hits*2) + C2) * 256; s->probability = 0.49 + ((double) num / (double) den); } else { num = (s->spam_hits - s->innocent_hits) * weight; den = C1 * (s->spam_hits + s->innocent_hits + C2) * 256; s->probability = 0.5 + ((double) num / (double) den); } /* Graham and Robinson Start Here */ } else { int ih = 1; if (CTX->flags & DSF_BIAS) ih = 2; if (CTX->totals.spam_learned > 0 && CTX->totals.innocent_learned > 0) { if (token_type == DTT_BNR) { s->probability = (s->spam_hits * 1.0 / bnr_tot->spam_hits * 1.0) / ((s->spam_hits * 1.0 / bnr_tot->spam_hits * 1.0) + (s->innocent_hits * 1.0 / bnr_tot->innocent_hits * 1.0)); } else { s->probability = (s->spam_hits * 1.0 / CTX->totals.spam_learned * 1.0) / ((s->spam_hits * 1.0 / CTX->totals.spam_learned * 1.0) + (s->innocent_hits * ih * 1.0 / CTX->totals.innocent_learned * 1.0)); } } if (s->spam_hits == 0 && s->innocent_hits > 0) { s->probability = 0.01; if (CTX->totals.spam_learned > 0 && CTX->totals.innocent_learned > 0) { if ((1.0 / CTX->totals.spam_learned * 1.0) / ((1.0 / CTX->totals.spam_learned * 1.0) + (s->innocent_hits * ih * 1.0 / CTX->totals.innocent_learned * 1.0)) < 0.01) { s->probability = (1.0 / CTX->totals.spam_learned * 1.0) / ((1.0 / CTX->totals.spam_learned * 1.0) + (s->innocent_hits * ih *1.0 / CTX->totals.innocent_learned * 1.0)); } } } else if (s->spam_hits > 0 && s->innocent_hits == 0) { s->probability = 0.99; if (CTX->totals.spam_learned > 0 && CTX->totals.innocent_learned > 0) { if ((s->spam_hits * 1.0 / CTX->totals.spam_learned * 1.0) / ((s->spam_hits * 1.0 / CTX->totals.spam_learned * 1.0) + (ih * 1.0 / CTX->totals.innocent_learned * 1.0)) > 0.99) { s->probability = (s->spam_hits * 1.0 / CTX->totals.spam_learned * 1.0) / ((s->spam_hits * 1.0 / CTX->totals.spam_learned * 1.0) + (ih * 1.0 / CTX->totals.innocent_learned * 1.0)); } } } if ( (CTX->flags & DSF_BIAS && (s->spam_hits + (2 * s->innocent_hits) < min_hits)) || (!(CTX->flags & DSF_BIAS) && (s->spam_hits + s->innocent_hits < min_hits))) { s->probability = (CTX->algorithms & DSP_MARKOV) ? .5000 : .4; } } if (s->probability < 0.0001) s->probability = 0.0001; if (s->probability > 0.9999) s->probability = 0.9999; /* Finish off Robinson */ if (token_type != DTT_BNR && CTX->algorithms & DSP_ROBINSON) { unsigned long n = s->spam_hits + s->innocent_hits; double fw = ((CHI_S * CHI_X) + (n * s->probability))/(CHI_S + n); s->probability = fw; } return 0; } /* * _ds_calc_result() * * DESCRIPTION * Perform statistical combination of the token index * * Passed in an index of tokens, this function is responsible for choosing * and combining the most relevant characteristics (based on the algorithms * configured) and calculating libdspam's decision about the provided * message sample. */ int _ds_calc_result(DSPAM_CTX *CTX, ds_heap_t heap_sort, ds_diction_t diction) { struct _ds_spam_stat stat; ds_heap_element_t node_heap; ds_heap_element_t heap_list[heap_sort->items]; /* Naive-Bayesian */ float nbay_top = 0.0; float nbay_bot = 0.0; float nbay_result = -1; long nbay_used = 0; /* Total tokens used in naive bayes */ struct nt *factor_nbayes = nt_create(NT_PTR); /* Graham-Bayesian */ float bay_top = 0.0; float bay_bot = 0.0; float bay_result = -1; long bay_used = 0; /* Total tokens used in bayes */ struct nt *factor_bayes = nt_create(NT_PTR); /* Burton-Bayesian */ double abay_top = 0.0; double abay_bot = 0.0; double abay_result = -1; long abay_used = 0; /* Total tokens used in altbayes */ struct nt *factor_altbayes = nt_create(NT_PTR); /* Robinson's Geometric Mean, used to calculate confidence */ float rob_top = 0.0; /* Robinson's Geometric Mean */ float rob_bot = 0.0; float rob_result = -1; double p = 0.0, q = 0.0, s = 0.0; /* Robinson PQS Calculations */ long rob_used = 0; /* Total tokens used in Robinson's GM */ struct nt *factor_rob = nt_create(NT_PTR); /* Fisher-Robinson's Chi-Square */ float chi_result = -1; long chi_used = 0, chi_sx = 0, chi_hx = 0; double chi_s = 1.0, chi_h = 1.0; struct nt *factor_chi = nt_create(NT_PTR); unsigned int i; /* Invert the heap */ node_heap = heap_sort->root; for(i=0;iitems;i++) { heap_list[(heap_sort->items-i)-1] = node_heap; node_heap = node_heap->next; } /* BEGIN Combine Token Values */ for(i=0;iitems;i++) { char *token_name; ds_term_t ds_term; node_heap = heap_list[i]; ds_term = ds_diction_find(diction, node_heap->token); if (!ds_term) continue; /* Skip BNR patterns */ if (ds_term->type == 'B') continue; token_name = ds_term->name; if (ds_diction_getstat(diction, node_heap->token, &stat) || !token_name) continue; /* Set the probability if we've provided a classification */ if (CTX->classification == DSR_ISSPAM) stat.probability = 1.00; else if (CTX->classification == DSR_ISINNOCENT) stat.probability = 0.00; /* Graham-Bayesian */ if (CTX->algorithms & DSA_GRAHAM && bay_used < 15) { LOGDEBUG ("[graham] [%2.6f] %s (%dfrq, %lds, %ldi)", stat.probability, token_name, ds_term->frequency, stat.spam_hits, stat.innocent_hits); _ds_factor(factor_bayes, token_name, stat.probability); if (bay_used == 0) { bay_top = stat.probability; bay_bot = 1 - stat.probability; } else { bay_top *= stat.probability; bay_bot *= (1 - stat.probability); } bay_used++; } /* Burton Bayesian */ if (CTX->algorithms & DSA_BURTON && abay_used < BURTON_WINDOW_SIZE) { LOGDEBUG ("[burton] [%2.6f] %s (%dfrq, %lds, %ldi)", stat.probability, token_name, ds_term->frequency, stat.spam_hits, stat.innocent_hits); _ds_factor(factor_altbayes, token_name, stat.probability); if (abay_used == 0) { abay_top = stat.probability; abay_bot = (1 - stat.probability); } else { abay_top *= stat.probability; abay_bot *= (1 - stat.probability); } abay_used++; if (abay_used < BURTON_WINDOW_SIZE && ds_term->frequency > 1 ) { LOGDEBUG ("[burton] [%2.6f] %s (%dfrq, %lds, %ldi)", stat.probability, token_name, ds_term->frequency, stat.spam_hits, stat.innocent_hits); _ds_factor(factor_altbayes, token_name, stat.probability); abay_used++; abay_top *= stat.probability; abay_bot *= (1 - stat.probability); } } /* Robinson's Geometric Mean Definitions */ //#define ROB_S 0.010 /* Sensitivity */ //#define ROB_X 0.415 /* Value to use when N = 0 */ //#define ROB_CUTOFF 0.54 #define ROB_S 0.010 /* Sensitivity */ #define ROB_X 0.500 /* Value to use when N = 0 */ #define ROB_CUTOFF 0.50 if (rob_used < 25) { float probability; long n = (heap_sort->items > 25) ? 25 : heap_sort->items; probability = ((ROB_S * ROB_X) + (n * stat.probability)) / (ROB_S + n); #ifdef ROBINSON #ifndef VERBOSE if (CTX->operating_mode != DSM_CLASSIFY) { #endif LOGDEBUG ("[rob] [%2.6f] %s (%dfrq, %lds, %ldi)", stat.probability, token_name, ds_term->frequency, stat.spam_hits, stat.innocent_hits); #ifndef VERBOSE } #endif #endif _ds_factor(factor_rob, token_name, stat.probability); if (probability < 0.3 || probability > 0.7) { if (rob_used == 0) { rob_top = probability; rob_bot = (1 - probability); } else { rob_top *= probability; rob_bot *= (1 - probability); } rob_used++; if (rob_used < 25 && ds_term->frequency > 1) { #ifdef ROBINSON #ifndef VERBOSE if (CTX->operating_mode != DSM_CLASSIFY) { #endif LOGDEBUG ("[rob] [%2.6f] %s (%dfrq, %lds, %ldi)", stat.probability, token_name, ds_term->frequency, stat.spam_hits, stat.innocent_hits); #ifndef VERBOSE } #endif #endif _ds_factor(factor_rob, token_name, stat.probability); rob_used++; rob_top *= probability; rob_bot *= (1 - probability); } } } } /* END Combine Token Values */ /* Fisher-Robinson's Inverse Chi-Square */ #define CHI_CUTOFF 0.5010 /* Ham/Spam Cutoff */ #define CHI_EXCR 0.4500 /* Exclusionary Radius */ #define LN2 0.69314718055994530942 /* log e2 */ if (CTX->algorithms & DSA_CHI_SQUARE || CTX->algorithms & DSA_NAIVE) { ds_term_t ds_term; ds_cursor_t ds_c; double fw; int n, exp; ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while(ds_term) { if (ds_term->key == CONTROL_TOKEN) { ds_term = ds_diction_next(ds_c); continue; } /* Naive-Bayesian */ if (CTX->algorithms & DSA_NAIVE) { LOGDEBUG ("[naive] [%2.6f] %s (%dfrq, %lds, %ldi)", ds_term->s.probability, ds_term->name, ds_term->frequency, ds_term->s.spam_hits, ds_term->s.innocent_hits); _ds_factor(factor_nbayes, ds_term->name, stat.probability); if (nbay_used == 0) { nbay_top = stat.probability; nbay_bot = 1 - stat.probability; } else { nbay_top *= stat.probability; nbay_bot *= (1 - stat.probability); } nbay_used++; } if (CTX->algorithms & DSA_CHI_SQUARE) { /* Skip BNR Tokens */ if (ds_term->type == 'B') goto CHI_NEXT; /* Convert the p-value */ if (CTX->algorithms & DSP_ROBINSON) { fw = ds_term->s.probability; } else { n = ds_term->s.spam_hits + ds_term->s.innocent_hits; fw = ((CHI_S * CHI_X) + (n * ds_term->s.probability))/(CHI_S + n); } if (fabs(0.5-fw)>CHI_EXCR) { int iter = 1; while(iter>0) { iter --; #ifndef VERBOSE if (CTX->operating_mode != DSM_CLASSIFY) { #endif LOGDEBUG ("[chi-sq] [%2.6f] %s (%dfrq, %lds, %ldi)", fw, ds_term->name, ds_term->frequency, ds_term->s.spam_hits, ds_term->s.innocent_hits); #ifndef VERBOSE } #endif _ds_factor(factor_chi, ds_term->name, ds_term->s.probability); chi_used++; chi_s *= (1.0 - fw); chi_h *= fw; if (chi_s < 1e-200) { chi_s = frexp(chi_s, &exp); chi_sx += exp; } if (chi_h < 1e-200) { chi_h = frexp(chi_h, &exp); chi_hx += exp; } } } } CHI_NEXT: ds_term = ds_diction_next(ds_c); } ds_diction_close(ds_c); } /* BEGIN Calculate Individual Probabilities */ if (CTX->algorithms & DSA_NAIVE) { nbay_result = (nbay_top) / (nbay_top + nbay_bot); LOGDEBUG ("Naive-Bayesian Probability: %f Samples: %ld", nbay_result, nbay_used); } if (CTX->algorithms & DSA_GRAHAM) { bay_result = (bay_top) / (bay_top + bay_bot); LOGDEBUG ("Graham-Bayesian Probability: %f Samples: %ld", bay_result, bay_used); } if (CTX->algorithms & DSA_BURTON) { abay_result = (abay_top) / (abay_top + abay_bot); LOGDEBUG ("Burton-Bayesian Probability: %f Samples: %ld", abay_result, abay_used); } /* Robinson's */ if (rob_used == 0) { p = q = s = 0; } else { p = 1.0 - pow (rob_bot, 1.0 / rob_used); q = 1.0 - pow (rob_top, 1.0 / rob_used); s = (p - q) / (p + q); s = (s + 1.0) / 2.0; } rob_result = s; if (CTX->algorithms & DSA_ROBINSON) { LOGDEBUG("Robinson's Geometric Confidence: %f (Spamminess: %f, " "Non-Spamminess: %f, Samples: %ld)", rob_result, p, q, rob_used); } if (CTX->algorithms & DSA_CHI_SQUARE) { chi_s = log(chi_s) + chi_sx * LN2; chi_h = log(chi_h) + chi_hx * LN2; if (chi_used) { chi_s = 1.0 - chi2Q(-2.0 * chi_s, 2 * chi_used); chi_h = 1.0 - chi2Q(-2.0 * chi_h, 2 * chi_used); chi_result = ((chi_s-chi_h)+1.0) / 2.0; } else { chi_result = (float)(CHI_CUTOFF-0.1); } LOGDEBUG("Chi-Square Confidence: %f", chi_result); } /* END Calculate Individual Probabilities */ /* BEGIN Determine Result */ if (CTX->classification == DSR_ISSPAM) { CTX->result = DSR_ISSPAM; CTX->probability = 1.0; } else if (CTX->classification == DSR_ISINNOCENT) { CTX->result = DSR_ISINNOCENT; CTX->probability = 0.0; } else { struct nt *factor = NULL; if (CTX->algorithms & DSA_NAIVE) { factor = factor_nbayes; if (((CTX->algorithms & DSP_MARKOV) && nbay_result > 0.5000) || (!(CTX->algorithms & DSP_MARKOV) && nbay_result >= 0.9)) { CTX->result = DSR_ISSPAM; CTX->probability = nbay_result; CTX->factors = factor; LOGDEBUG("using Naive-Bayes factors"); } } if (CTX->algorithms & DSA_GRAHAM) { factor = factor_bayes; if (((CTX->algorithms & DSP_MARKOV) && bay_result > 0.5000) || (!(CTX->algorithms & DSP_MARKOV) && bay_result >= 0.9)) { CTX->result = DSR_ISSPAM; CTX->probability = bay_result; CTX->factors = factor; LOGDEBUG("using Graham factors"); } } if (CTX->algorithms & DSA_BURTON) { factor = factor_altbayes; if (((CTX->algorithms & DSP_MARKOV) && abay_result > 0.5000) || (!(CTX->algorithms & DSP_MARKOV) && abay_result >= 0.9)) { CTX->result = DSR_ISSPAM; CTX->probability = abay_result; if (!CTX->factors) { CTX->factors = factor; LOGDEBUG("using Burton factors"); } } } if (CTX->algorithms & DSA_ROBINSON) { factor = factor_rob; if (((CTX->algorithms & DSP_MARKOV) && rob_result > 0.5000) || (!(CTX->algorithms & DSP_MARKOV) && rob_result >= ROB_CUTOFF)) { CTX->result = DSR_ISSPAM; if (CTX->probability < 0) CTX->probability = rob_result; if (!CTX->factors) { CTX->factors = factor; LOGDEBUG("using Robinson-Geom factors"); } } } if (CTX->algorithms & DSA_CHI_SQUARE) { factor = factor_chi; if (((CTX->algorithms & DSP_MARKOV) && chi_result > 0.5000) || (!(CTX->algorithms & DSP_MARKOV) && chi_result >= CHI_CUTOFF)) { CTX->result = DSR_ISSPAM; if (CTX->probability < 0) CTX->probability = chi_result; if (!CTX->factors) { CTX->factors = factor; LOGDEBUG("using Chi-Square factors"); } } } if (!CTX->factors) { CTX->factors = factor; LOGDEBUG("no factors specified; using default"); } } if (CTX->factors != factor_nbayes) _ds_factor_destroy(factor_nbayes); if (CTX->factors != factor_bayes) _ds_factor_destroy(factor_bayes); if (CTX->factors != factor_altbayes) _ds_factor_destroy(factor_altbayes); if (CTX->factors != factor_rob) _ds_factor_destroy(factor_rob); if (CTX->factors != factor_chi) _ds_factor_destroy(factor_chi); /* If somehow we haven't yet assigned a probability, assign one */ if (CTX->probability == DSP_UNCALCULATED) { if (CTX->algorithms & DSA_GRAHAM) CTX->probability = bay_result; if (CTX->algorithms & DSA_NAIVE) CTX->probability = nbay_result; if (CTX->probability < 0 && CTX->algorithms & DSA_BURTON) CTX->probability = abay_result; if (CTX->probability < 0 && CTX->algorithms & DSA_ROBINSON) CTX->probability = rob_result; if (CTX->probability < 0 && CTX->algorithms & DSA_CHI_SQUARE) CTX->probability = chi_result; } #ifdef VERBOSE if (DO_DEBUG && (!(CTX->algorithms & DSP_MARKOV))) { if (abay_result >= 0.9 && bay_result < 0.9) { LOGDEBUG ("CATCH: Burton Bayesian"); } else if (abay_result < 0.9 && bay_result >= 0.9) { LOGDEBUG ("MISS: Burton Bayesian"); } if (rob_result >= ROB_CUTOFF && bay_result < 0.9) { LOGDEBUG ("CATCH: Robinson's"); } else if (rob_result < ROB_CUTOFF && bay_result >= 0.9) { LOGDEBUG ("MISS: Robinson's"); } if (chi_result >= CHI_CUTOFF && bay_result < 0.9) { LOGDEBUG("CATCH: Chi-Square"); } else if (chi_result < CHI_CUTOFF && bay_result >= 0.9) { LOGDEBUG("MISS: Chi-Square"); } } #endif /* Calculate Confidence */ if (CTX->algorithms & DSP_MARKOV) { if (CTX->result == DSR_ISSPAM) { CTX->confidence = CTX->probability; } else { CTX->confidence = 1.0 - CTX->probability; } } else { if (CTX->result == DSR_ISSPAM) { CTX->confidence = rob_result; } else { CTX->confidence = 1.0 - rob_result; } } LOGDEBUG("Result Confidence: %1.2f", CTX->confidence); return CTX->result; } /* * _ds_factor() * * DESCRIPTION * Factors a token/value into a set * * Adds a token/value pair to a factor set. The factor set of the dominant * calculation is provided to the client in order to explain libdspam's * final decision about the message's classification. */ int _ds_factor(struct nt *set, char *token_name, float value) { struct dspam_factor *f; f = calloc(1, sizeof(struct dspam_factor)); if (!f) return EUNKNOWN; f->token_name = strdup(token_name); f->value = value; nt_add(set, (void *) f); return 0; } /* * _ds_factor_destroy - destroy a factor tree * */ void _ds_factor_destroy(struct nt *factors) { struct dspam_factor *f; struct nt_node *node; struct nt_c c; if (factors == NULL) return; node = c_nt_first(factors, &c); while(node != NULL) { f = (struct dspam_factor *) node->ptr; if (f) free(f->token_name); node = c_nt_next(factors, &c); } nt_destroy(factors); return; } int libdspam_init(const char *driver) { #ifndef STATIC_DRIVER if (driver == NULL) { LOG(LOG_CRIT, "dlopen() failed: Can not load NULL driver"); return EFAILURE; } else if (driver) { if ((_drv_handle = dlopen(driver, RTLD_NOW))==NULL) { LOG(LOG_CRIT, "dlopen() failed: %s: %s", driver, dlerror()); return EFAILURE; } } #endif return 0; } int libdspam_shutdown(void) { #ifndef STATIC_DRIVER if (_drv_handle) { int r; if ((r=dlclose(_drv_handle))) { LOG(LOG_CRIT, "dlclose() failed: %s", dlerror()); return r; } } #endif return 0; } int _ds_instantiate_bnr( DSPAM_CTX *CTX, ds_diction_t patterns, struct nt *stream, char identifier) { float previous_bnr_probs[BNR_SIZE]; ds_term_t ds_term, ds_touch; struct nt_node *node_nt; struct nt_c c_nt; unsigned long long crc; char bnr_token[64]; int i; for(i=0;iptr; _ds_calc_stat (CTX, ds_term, &ds_term->s, DTT_DEFAULT, NULL); for(i=0;is.probability); sprintf(bnr_token, "bnr.%c|", identifier); for(i=0;itype = 'B'; node_nt = c_nt_next(stream, &c_nt); } return 0; } ds_diction_t _ds_apply_bnr (DSPAM_CTX *CTX, ds_diction_t diction) { /* Bayesian Noise Reduction - Contextual Symmetry Logic http://bnr.nuclearelephant.com */ ds_diction_t bnr_patterns = ds_diction_create(3079); struct _ds_spam_stat bnr_tot; unsigned long long crc; BNR_CTX *BTX_S, *BTX_C; struct nt_node *node_nt; struct nt_c c_nt; ds_term_t ds_term, ds_touch; ds_cursor_t ds_c; if (!bnr_patterns) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return NULL; } BTX_S = bnr_init(BNR_INDEX, 's'); BTX_C = bnr_init(BNR_INDEX, 'c'); if (!BTX_S || !BTX_C) { LOGDEBUG("bnr_init() failed"); bnr_destroy(BTX_S); bnr_destroy(BTX_C); ds_diction_destroy(bnr_patterns); return NULL; } BTX_S->window_size = BNR_SIZE; BTX_C->window_size = BNR_SIZE; _ds_instantiate_bnr(CTX, bnr_patterns, diction->order, 's'); _ds_instantiate_bnr(CTX, bnr_patterns, diction->chained_order, 'c'); /* Add BNR totals to the list of load elements */ memset(&bnr_tot, 0, sizeof(struct _ds_spam_stat)); crc = _ds_getcrc64("bnr.t|"); ds_touch = ds_diction_touch(bnr_patterns, crc, "bnr.t|", 0); ds_touch->type = 'B'; /* Load BNR patterns */ LOGDEBUG("Loading %ld BNR patterns", bnr_patterns->items); if (_ds_getall_spamrecords (CTX, bnr_patterns)) { LOGDEBUG ("_ds_getall_spamrecords() failed"); ds_diction_destroy(bnr_patterns); return NULL; } /* Perform BNR Processing */ if (CTX->classification == DSR_NONE && CTX->_sig_provided == 0 && CTX->totals.innocent_learned + CTX->totals.innocent_classified > 2500) { int elim; #ifdef LIBBNR_DEBUG char fn[MAX_FILENAME_LENGTH]; FILE *file; #endif node_nt = c_nt_first(diction->order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; bnr_add(BTX_S, ds_term->name, ds_term->s.probability); node_nt = c_nt_next(diction->order, &c_nt); } node_nt = c_nt_first(diction->chained_order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; bnr_add(BTX_C, ds_term->name, ds_term->s.probability); node_nt = c_nt_next(diction->chained_order, &c_nt); } bnr_instantiate(BTX_S); bnr_instantiate(BTX_C); /* Calculate pattern p-values */ ds_diction_getstat(bnr_patterns, crc, &bnr_tot); ds_c = ds_diction_cursor(bnr_patterns); ds_term = ds_diction_next(ds_c); while(ds_term) { _ds_calc_stat(CTX, ds_term, &ds_term->s, DTT_BNR, &bnr_tot); if (ds_term->name[4] == 's') bnr_set_pattern(BTX_S, ds_term->name, ds_term->s.probability); else if (ds_term->name[4] == 'c') bnr_set_pattern(BTX_C, ds_term->name, ds_term->s.probability); ds_term = ds_diction_next(ds_c); } ds_diction_close(ds_c); bnr_finalize(BTX_S); bnr_finalize(BTX_C); /* Propagate eliminations to DSPAM */ node_nt = c_nt_first(diction->order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; bnr_get_token(BTX_S, &elim); if (elim) ds_term->frequency--; node_nt = c_nt_next(diction->order, &c_nt); } node_nt = c_nt_first(diction->chained_order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; bnr_get_token(BTX_C, &elim); if (elim) ds_term->frequency--; node_nt = c_nt_next(diction->chained_order, &c_nt); } #ifdef LIBBNR_DEBUG float snr; if (BTX_S->stream->items + BTX_C->stream->items + BTX_S->eliminations + BTX_C->eliminations > 0) { snr = 100.0*((BTX_S->eliminations + BTX_C->eliminations + 0.0)/ (BTX_S->stream->items + BTX_C->stream->items + BTX_S->eliminations + BTX_C->eliminations)); } else { snr = 0; } LOGDEBUG("bnr reported snr of %02.3f", snr); #ifdef LIBBNR_GRAPH_OUTPUT printf("BEFORE\n\n"); node_nt = c_nt_first(diction->order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; printf("%1.5f\n", ds_term->s.probability); node_nt = c_nt_next(diction->order, &c_nt); } printf("\n\nAFTER\n\n"); node_nt = c_nt_first(diction->order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; if (ds_term->frequency > 0) printf("%1.5f\n", ds_term->s.probability); node_nt = c_nt_next(diction->order, &c_nt); } printf("\n"); #endif snprintf(fn, sizeof(fn), "%s/bnr.log", LOGDIR); file = fopen(fn, "a"); if (file != NULL) { fprintf(file, "-- BNR Filter Process Results --\n"); fprintf(file, "Eliminations:\n"); node_nt = c_nt_first(diction->order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; if (ds_term->frequency <= 0) fprintf(file, "%s ", ds_term->name); node_nt = c_nt_next(diction->order, &c_nt); } fprintf(file, "\n["); node_nt = c_nt_first(diction->order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; if (ds_term->frequency <= 0) fprintf(file, "%1.2f ", ds_term->s.probability); node_nt = c_nt_next(diction->order, &c_nt); } fprintf(file, "]\n\nRemaining:\n"); node_nt = c_nt_first(diction->order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; if (ds_term->frequency > 0) fprintf(file, "%s ", ds_term->name); node_nt = c_nt_next(diction->order, &c_nt); } fprintf(file, "\n["); node_nt = c_nt_first(diction->order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; if (ds_term->frequency > 0) fprintf(file, "%1.2f ", ds_term->s.probability); node_nt = c_nt_next(diction->order, &c_nt); } fprintf(file, "]\nProcessed for: %s\n\n", CTX->username); fprintf(file, "-- Chained Tokens --\n"); fprintf(file, "Eliminations:\n"); node_nt = c_nt_first(diction->chained_order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; if (ds_term->frequency <= 0) fprintf(file, "%s ", ds_term->name); node_nt = c_nt_next(diction->chained_order, &c_nt); } fprintf(file, "\n["); node_nt = c_nt_first(diction->chained_order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; if (ds_term->frequency <= 0) fprintf(file, "%1.2f ", ds_term->s.probability); node_nt = c_nt_next(diction->chained_order, &c_nt); } fprintf(file, "]\n\nRemaining:\n"); node_nt = c_nt_first(diction->chained_order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; if (ds_term->frequency > 0) fprintf(file, "%s ", ds_term->name); node_nt = c_nt_next(diction->chained_order, &c_nt); } fprintf(file, "\n["); node_nt = c_nt_first(diction->chained_order, &c_nt); while(node_nt != NULL) { ds_term = node_nt->ptr; if (ds_term->frequency > 0) fprintf(file, "%1.2f ", ds_term->s.probability); node_nt = c_nt_next(diction->chained_order, &c_nt); } fprintf(file, "]\nProcessed for: %s\n\n", CTX->username); fclose(file); } #endif } bnr_destroy(BTX_S); bnr_destroy(BTX_C); /* Add BNR pattern to token hash */ if (CTX->totals.innocent_learned + CTX->totals.innocent_classified > 1000) { ds_c = ds_diction_cursor(bnr_patterns); ds_term = ds_diction_next(ds_c); while(ds_term) { ds_term_t t = ds_diction_touch(diction, ds_term->key, ds_term->name, 0); t->type = 'B'; ds_diction_setstat(diction, ds_term->key, &ds_term->s); if (t) t->frequency = 1; #ifdef LIBBNR_DEBUG if (fabs(0.5-ds_term->s.probability)>0.25) { LOGDEBUG("Interesting BNR Pattern: %s %01.5f %lds %ldi", ds_term->name, ds_term->s.probability, ds_term->s.spam_hits, ds_term->s.innocent_hits); } #endif ds_term = ds_diction_next(ds_c); } ds_diction_close(ds_c); } return bnr_patterns; } int _ds_increment_tokens(DSPAM_CTX *CTX, ds_diction_t diction) { ds_cursor_t ds_c; ds_term_t ds_term; int i = 0; int occurrence = _ds_match_attribute(CTX->config->attributes, "ProcessorWordFrequency", "occurrence"); ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while(ds_term) { unsigned long long crc; crc = ds_term->key; /* Create a signature if we're processing a message */ if (CTX->tokenizer != DSZ_SBPH && CTX->flags & DSF_SIGNATURE && (CTX->operating_mode != DSM_CLASSIFY || !(CTX->_sig_provided))) { struct _ds_signature_token t; memset(&t, 0, sizeof(t)); t.token = crc; t.frequency = ds_term->frequency; memcpy ((char *) CTX->signature->data + (i * sizeof (struct _ds_signature_token)), &t, sizeof (struct _ds_signature_token)); } /* If classification was provided, force probabilities */ if (CTX->classification == DSR_ISSPAM) ds_term->s.probability = 1.00; else if (CTX->classification == DSR_ISINNOCENT) ds_term->s.probability = 0.00; if (ds_term->type == 'D' && ( CTX->training_mode != DST_TUM || CTX->source == DSS_ERROR || CTX->source == DSS_INOCULATION || ds_term->s.spam_hits + ds_term->s.innocent_hits < 50 || ds_term->key == diction->whitelist_token || CTX->confidence < 0.70)) { ds_term->s.status |= TST_DIRTY; } if (ds_term->type == 'B' && CTX->totals.innocent_learned + CTX->totals.innocent_classified > 500 && CTX->flags & DSF_NOISE && CTX->_sig_provided == 0) { ds_term->s.status |= TST_DIRTY; } /* SPAM */ if (CTX->result == DSR_ISSPAM) { /* Inoculations increase token count considerably */ if (CTX->source == DSS_INOCULATION) { if (ds_term->s.innocent_hits < 2 && ds_term->s.spam_hits < 5) ds_term->s.spam_hits += 5; else ds_term->s.spam_hits += 2; } /* Standard increase */ else { if (CTX->flags & DSF_UNLEARN) { if (CTX->classification == DSR_ISSPAM) { if (occurrence) { ds_term->s.spam_hits -= ds_term->frequency; if (ds_term->s.spam_hits < 0) ds_term->s.spam_hits = 0; } else { ds_term->s.spam_hits -= (ds_term->s.spam_hits>0) ? 1:0; } } } else { if (occurrence) { ds_term->s.spam_hits += ds_term->frequency; } else { ds_term->s.spam_hits++; } } } if (SPAM_MISS(CTX) && !(CTX->flags & DSF_UNLEARN) && CTX->training_mode != DST_TOE && CTX->training_mode != DST_NOTRAIN) { if (occurrence) { ds_term->s.innocent_hits -= ds_term->frequency; if (ds_term->s.innocent_hits < 0) ds_term->s.innocent_hits = 0; } else { ds_term->s.innocent_hits -= (ds_term->s.innocent_hits>0) ? 1:0; } } } /* INNOCENT */ else { if (CTX->flags & DSF_UNLEARN) { if (CTX->classification == DSR_ISINNOCENT) { if (occurrence) { ds_term->s.innocent_hits -= ds_term->frequency; if (ds_term->s.innocent_hits < 0) ds_term->s.innocent_hits = 0; } else { ds_term->s.innocent_hits -= (ds_term->s.innocent_hits>0) ? 1:0; } } } else { if (occurrence) { ds_term->s.innocent_hits += ds_term->frequency; } else { ds_term->s.innocent_hits++; } } if (FALSE_POSITIVE(CTX) && !(CTX->flags & DSF_UNLEARN) && CTX->training_mode != DST_TOE && CTX->training_mode != DST_NOTRAIN) { if (occurrence) { ds_term->s.spam_hits -= ds_term->frequency; if (ds_term->s.spam_hits < 0) ds_term->s.spam_hits = 0; } else { ds_term->s.spam_hits -= (ds_term->s.spam_hits>0) ? 1:0; } } } ds_term = ds_diction_next(ds_c); i++; } ds_diction_close(ds_c); return 0; } dspam-3.10.2+dfsg/src/buffer.c0000644000175000017500000001005211741351001015351 0ustar julienjulien/* $Id: buffer.c,v 1.12 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* buffer.c - dynamic string data structure */ #include #include #include "buffer.h" buffer * buffer_create (const char *s) { buffer *b; long len; b = malloc (sizeof (buffer)); if (!b) return NULL; if (!s) { b->size = 1024; b->used = 0; b->data = malloc(b->size); if (!b->data) return NULL; b->data[0] = 0; return b; } len = strlen (s); b->size = len + 1; b->used = len; b->data = malloc (b->size); if (b->data == NULL) { free (b); return NULL; } memcpy (b->data, s, len); b->data[len] = 0; return b; } buffer * buffer_ncreate (const char *s, long plen) { buffer *b; long len; b = malloc (sizeof (buffer)); if (!b) return NULL; if (!s) { if(plen == 0) b->size = 1024; else b->size = plen; b->used = 0; b->data = malloc(b->size); if (!b->data) return NULL; b->data[0] = 0; return b; } if(plen == 0) len = strlen (s); else len = plen; b->size = len + 1; b->used = len; b->data = malloc (b->size); if (b->data == NULL) { free (b); return NULL; } memcpy (b->data, s, len); b->data[len] = 0; return b; } int buffer_clear (buffer * b) { if (b == NULL) return -1; free (b->data); b->size = 0; b->used = 0; b->data = NULL; return 0; } void buffer_destroy (buffer * b) { if (!b) return; if (b->data != NULL) { free (b->data); } free (b); return; } int buffer_copy (buffer * b, const char *s) { char *new_data; long len; if (s == NULL) return -1; len = strlen (s); new_data = malloc (len + 1); if (new_data == NULL) return -1; memcpy (new_data, s, len); new_data[len] = 0; if (b->data != NULL) { free (b->data); } b->size = len + 1; b->used = len; b->data = new_data; return 0; } int buffer_ncopy (buffer * b, const char *s, long plen) { if (s == NULL) return -1; char *new_data; long len; if(plen == 0) len = strlen (s); else len = plen; new_data = malloc (len + 1); if (new_data == NULL) return -1; memcpy (new_data, s, len); new_data[len] = 0; if (b->data != NULL) free (b->data); b->size = len + 1; b->used = len; b->data = new_data; return 0; } int buffer_cat (buffer * b, const char *s) { char *new_data; long size; long len, used; if (!b || !s) return -1; size = b->size; len = strlen (s); if (! b->data) return buffer_copy (b, s); used = b->used + len; if (used >= size) { size *= 2; size += len; new_data = realloc (b->data, size); if (!new_data) return -1; b->data = new_data; b->size = size; } memcpy (b->data + b->used, s, len); b->used = used; b->data[b->used] = 0; return 0; } int buffer_ncat (buffer * b, const char *s, long plen) { if (!b || !s) return -1; if (! b->data) return buffer_ncopy (b, s, 0); char *new_data; long size; long len, used; size = b->size; if(plen == 0) len = strlen (s); else len = plen; used = b->used + len; if (used >= size) { size *= 2; size += len; new_data = realloc (b->data, size); if (!new_data) return -1; b->data = new_data; b->size = size; } memcpy (b->data + b->used, s, len); b->used = used; b->data[b->used] = 0; return 0; } dspam-3.10.2+dfsg/src/pref.c0000644000175000017500000002030011741351001015031 0ustar julienjulien/* $Id: pref.c,v 1.38 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #ifndef _WIN32 #include #include #endif #include #include #include #include "pref.h" #include "config.h" #include "util.h" #include "language.h" #include "read_config.h" /* * _ds_pref_aggregate: aggregate system preferences and user preferences * * This function takes a set of system preferences and a set of user * preferences as input and returns an aggregated set of preferences based on * the system's override rules. */ agent_pref_t _ds_pref_aggregate(agent_pref_t STX, agent_pref_t UTX) { agent_pref_t PTX = calloc(1, PREF_MAX*sizeof(agent_attrib_t )); int i, size = 0; if (STX) { for(i=0;STX[i];i++) { PTX[i] = _ds_pref_new(STX[i]->attribute, STX[i]->value); PTX[i+1] = NULL; size++; } } if (UTX) { for(i=0;UTX[i];i++) { if (_ds_match_attribute(agent_config, "AllowOverride", UTX[i]->attribute)) { int found = 0; int j; for(j=0;PTX[j];j++) { if (!strcasecmp(PTX[j]->attribute, UTX[i]->attribute)) { found = 1; free(PTX[j]->value); PTX[j]->value = strdup(UTX[i]->value); break; } } if (!found) { PTX[size] = _ds_pref_new(UTX[i]->attribute, UTX[i]->value); PTX[size+1] = NULL; size++; } } else { LOG(LOG_ERR, ERR_AGENT_IGNORE_PREF, UTX[i]->attribute); } } } return PTX; } int _ds_pref_free(agent_pref_t PTX) { agent_attrib_t pref; int i; if (!PTX) return 0; for(i=0;PTX[i];i++) { pref = PTX[i]; free(pref->attribute); free(pref->value); free(pref); } return 0; } /* * _ds_pref_val: returns the value of an attribute within a preference set * * To allow this function to work with string operations, "" will be returned * if the value isn't found, insttead of NULL */ const char *_ds_pref_val( agent_pref_t PTX, const char *attrib) { agent_attrib_t pref; int i; if (PTX == NULL) return ""; for(i=0;PTX[i];i++) { pref = PTX[i]; if (!strcasecmp(pref->attribute, attrib)) return pref->value; } return ""; } agent_attrib_t _ds_pref_new(const char *attribute, const char *value) { agent_attrib_t pref; pref = malloc(sizeof(struct _ds_agent_attribute)); if (pref == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return NULL; } pref->attribute = strdup(attribute); pref->value = strdup(value); return pref; } /* flat-file preference extensions (defaulted to if storage driver extensions are not found) */ agent_pref_t _ds_ff_pref_load( config_t config, const char *user, const char *home, void *ignore) { char filename[MAX_FILENAME_LENGTH]; agent_pref_t PTX = malloc(sizeof(agent_attrib_t )*PREF_MAX); char buff[258]; FILE *file; char *p, *q; int i = 0; config = config; /* Keep compiler happy */ ignore = ignore; /* Keep compiler happy */ if (PTX == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return NULL; } PTX[0] = NULL; if (user == NULL) { snprintf(filename, MAX_FILENAME_LENGTH, "%s/default.prefs", home); } else { _ds_userdir_path (filename, home, user, "prefs"); } file = fopen(filename, "r"); /* Apply default preferences from dspam.conf */ if (file != NULL) { char *ptrptr; while(i<(PREF_MAX-1) && fgets(buff, sizeof(buff), file)!=NULL) { if (buff[0] == '#' || buff[0] == 0) continue; chomp(buff); p = strtok_r(buff, "=", &ptrptr); if (p == NULL) continue; q = p + strlen(p)+1; LOGDEBUG("Loading preference '%s' = '%s'", p, q); PTX[i] = _ds_pref_new(p, q); PTX[i+1] = NULL; i++; } fclose(file); } else { free(PTX); return NULL; } return PTX; } /* * _ds_ff_pref_prepare_file: prepares a backup copy of a preference file * * This operation prepares a backup copy of a given preference file, using a * .bak extension and returns an open filehandle to it at the end of the file. * This function also allows for an omission to be passed in, which is the name * of a preference that should be omitted from the file (if that preference * is to be overwritten or deleted. If nlines is provided, it will be set to * the number of lines in the file. */ FILE *_ds_ff_pref_prepare_file ( const char *filename, const char *omission, int *nlines) { char line[1024], out_filename[MAX_FILENAME_LENGTH]; int lineno = 0, omission_len; FILE *in_file, *out_file; char omission_pref[1024]; snprintf(omission_pref, sizeof(omission_pref), "%s=", omission); omission_len = strlen(omission_pref); snprintf(out_filename, MAX_FILENAME_LENGTH, "%s.bak", filename); out_file = fopen(out_filename, "w"); if (out_file == NULL) { LOG(LOG_ERR, ERR_IO_FILE_OPEN, out_filename, strerror(errno)); return NULL; } in_file = fopen(filename, "r"); if (in_file) { while (fgets(line, sizeof(line), in_file)) { if (!strncmp(line, omission_pref, omission_len)) continue; lineno++; if (fputs(line, out_file)<0) { LOG(LOG_ERR, ERR_IO_FILE_WRITE, out_filename, strerror(errno)); fclose(in_file); fclose(out_file); unlink(out_filename); return NULL; } } fclose(in_file); } if (nlines != NULL) *nlines = lineno; return out_file; } /* _ds_pref_commit: close scratch copy and commit it as the new live copy */ int _ds_ff_pref_commit ( const char *filename, FILE *out_file) { char backup[MAX_FILENAME_LENGTH]; snprintf(backup, sizeof(backup), "%s.bak", filename); if (fclose(out_file)) { LOG(LOG_ERR, ERR_IO_FILE_CLOSE, backup, strerror(errno)); return EFAILURE; } if (rename(backup, filename)) { LOG(LOG_ERR, ERR_IO_FILE_RENAME, backup, strerror(errno)); unlink(backup); return EFAILURE; } return 0; } int _ds_ff_pref_set ( config_t config, const char *username, const char *home, const char *preference, const char *value, void *ignore) { char filename[MAX_FILENAME_LENGTH]; FILE *out_file; config = config; /* Keep compiler happy */ ignore = ignore; /* Keep compiler happy */ if (username == NULL) { snprintf(filename, MAX_FILENAME_LENGTH, "%s/default.prefs", home); } else { _ds_userdir_path (filename, home, username, "prefs"); } out_file = _ds_ff_pref_prepare_file(filename, preference, NULL); if (out_file == NULL) return EFAILURE; fprintf(out_file, "%s=%s\n", preference, value); return _ds_ff_pref_commit(filename, out_file); } int _ds_ff_pref_del ( config_t config, const char *username, const char *home, const char *preference, void *ignore) { char filename[MAX_FILENAME_LENGTH]; FILE *out_file; int nlines; config = config; /* Keep compiler happy */ ignore = ignore; /* Keep compiler happy */ if (username == NULL) { snprintf(filename, MAX_FILENAME_LENGTH, "%s/default.prefs", home); } else { _ds_userdir_path (filename, home, username, "prefs"); } out_file = _ds_ff_pref_prepare_file(filename, preference, &nlines); if (out_file == NULL) return EFAILURE; if (!nlines) { char backup[MAX_FILENAME_LENGTH]; fclose(out_file); snprintf(backup, sizeof(backup), "%s.bak", filename); unlink(backup); return unlink(filename); } return _ds_ff_pref_commit(filename, out_file); } dspam-3.10.2+dfsg/src/language.h0000644000175000017500000001720711741351001015701 0ustar julienjulien/* $Id: language.h,v 1.31 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef _LANGUAGE_H # define _LANGUAGE_H #define LANGUAGE "en" /* General purpose error codes */ #define ERR_MEM_ALLOC "Memory allocation failed" #define ERR_IO_FILE_OPEN "Unable to open file for reading: %s: %s" #define ERR_IO_FILE_READ "Unable to read from file: %s: %s" #define ERR_IO_FILE_WRITE "Unable to open file for writing: %s: %s" #define ERR_IO_FILE_WRITING "Unable to write file: %s: %s" #define ERR_IO_FILE_CLOSE "Unable to close file: %s: %s" #define ERR_IO_FILE_RENAME "Unable to rename file: %s: %s" #define ERR_IO_DIR_CREATE "Unable to create directory: %s: %s" #define ERR_IO_LOCK "Failed to lock file %s: %d: %s" #define ERR_IO_LOCK_FREE "Failed to free lock file %s: %d: %s" /* External lookup related error codes */ #define ERR_EXT_LOOKUP_INIT_FAIL "Backend initialization failure" #define ERR_EXT_LOOKUP_LDAP_PROTO_VER_FAIL "Unable to set LDAP protocol version" #define ERR_EXT_LOOKUP_SEARCH_FAIL "Backend search failure" #define ERR_EXT_LOOKUP_MISCONFIGURED "External Lookup misconfigured" /* Agent error codes */ #define ERR_AGENT_USER_UNDEFINED "Unable to determine the destination user" #define ERR_AGENT_READ_CONFIG "Unable to read dspam.conf" #define ERR_AGENT_DSPAM_HOME "No DSPAM home specified" #define ERR_AGENT_RUNTIME_USER "Unable to determine the runtime user" #define ERR_AGENT_NO_SUCH_PROFILE "No such profile '%s'" #define ERR_AGENT_NO_SUCH_CLASS "No such class '%s'" #define ERR_AGENT_NO_SUCH_SOURCE "No such source '%s'" #define ERR_AGENT_NO_SUCH_DELIVER "No such delivery option '%s'" #define ERR_AGENT_NO_SUCH_FEATURE "No such feature '%s'" #define ERR_AGENT_NO_AGENT "No %s configured, and --stdout not specified" #define ERR_AGENT_NO_SOURCE "No source was specified for this class" #define ERR_AGENT_NO_CLASS "No class was specified for this source" #define ERR_AGENT_CLASSIFY_CLASS "Classify mode may not specify a class" #define ERR_AGENT_NO_OP_MODE "No operating mode was specified" #define ERR_AGENT_NO_TR_MODE "No training mode was specified" #define ERR_AGENT_TB_INVALID "Training buffer level must be 0-10" #define ERR_AGENT_TR_MODE_INVALID "Invalid training mode specified" #define ERR_AGENT_IGNORE_PREF "Ignoring disallowed preference '%s'" #define ERR_AGENT_INIT_ATX "Unable to initialize agent context" #define ERR_AGENT_MISCONFIGURED "DSPAM agent misconfigured: aborting" #define ERR_AGENT_FAILOVER "Failing over to storage profile '%s'" #define ERR_AGENT_FAILOVER_OUT "Could not fail over: out of failover servers" #define ERR_AGENT_CLEAR_ATTRIB "Unable to clear attributes list" #define ERR_AGENT_PARSER_FAILED "Message parser failed. Unable to continue." #define ERR_AGENT_SIG_RET_FAILED "Signature retrieval for '%s' failed" #define ERR_AGENT_NO_VALID_SIG "Unable to find a valid signature. Aborting." #define ERR_AGENT_OPTIN_DIR "The opt-in file %s should be a directory" /* Local delivery agent error codes */ #define ERR_LDA_EXIT "Delivery agent returned exit code %d: %s" #define ERR_LDA_SIGNAL "Delivery agent terminated by signal %d: %s" #define ERR_LDA_OPEN "Error opening pipe to delivery agent: %s: %s" #define ERR_LDA_CLOSE "Unexpected return code %d when closing pipe" #define ERR_LDA_STATUS "Error getting exit status of delivery agent: %s: %s" /* Client error codes */ #define ERR_CLIENT_EXIT "Client exited with error %d" /* Trusted-user related error codes */ #define ERR_TRUSTED_USER \ "Option --user requires special privileges when user does not match current \ user, e.g.. root or Trusted User [uid=%d(%s)]" #define ERR_TRUSTED_PRIV \ "Option %s requires special privileges; e.g.. root or Trusted User [uid=%d(%s)]" #define ERR_TRUSTED_MODE \ "Program mode requires special privileges, e.g., root or Trusted User" /* DSPAM core engine (libdspam) related error codes */ #define ERR_CORE_INIT "Context initialization failed" #define ERR_CORE_ATTACH "Unable to attach DSPAM context" #define ERR_CORE_REATTACH "Unable to attach DSPAM context. Retrying." /* Storage driver error codes */ #define ERR_DRV_NO_ATTACH "Driver does not support dbh attach" #define ERR_DRV_NO_MERGED "Driver does not support merged groups" #define ERR_DRV_INIT "Unable to initialize storage driver" /* Daemon-mode related info codes */ #define INFO_DAEMON_START "Daemon process starting" #define INFO_DAEMON_EXIT "Daemon process exiting" #define INFO_DAEMON_BIND "Binding to %s:%d" #define INFO_DAEMON_DOMAINSOCK "Creating local domain socket %s" #define INFO_DAEMON_RELOAD "Reloading configuration" /* Daemon-mode related error codes */ #define ERR_DAEMON_NO_SUPPORT "DSPAM was not compiled with daemon support" #define ERR_DAEMON_BIND "Could not bind to :%d: %s" #define ERR_DAEMON_DOMAINBIND "Could not bind to %s: %s" #define ERR_DAEMON_SOCKET "Could not create socket: %s" #define ERR_DAEMON_SOCKOPT "Could not set sockopt %s: %s" #define ERR_DAEMON_LISTEN "Unable to listen: %s" #define ERR_DAEMON_ACCEPT "Unable to accept: %s" #define ERR_DAEMON_THREAD "Thread creation failed: %s" #define ERR_DAEMON_FAIL "Daemon mode failed to start" #define ERR_DAEMON_TERMINATE "Daemon terminating on signal %d" /* LMTP (externally visible) info codes */ #define INFO_LMTP_DATA "Enter mail, end with \".\" on a line by itself" /* LMTP (externally visible) error codes */ #define ERR_LMTP_MSG_NULL "Message is empty. Aborting." #define ERR_LMTP_BAD_RCPT "Invalid RCPT TO. Use RCPT TO: " /* Client-mode related info codes */ #define INFO_CLIENT_CONNECTED "Connection established" #define INFO_CLIENT_CONNECTING "Establishing connection to %s:%d" /* Client-mode related error codes */ #define ERR_CLIENT_INVALID_CONFIG "Invalid client configuration" #define ERR_CLIENT_CONNECT "Unable to connect to server" #define ERR_CLIENT_IDENT "No ClientIdent provided in dspam.conf" #define ERR_CLIENT_CONNECT_SOCKET "Connection to socket %s failed: %s" #define ERR_CLIENT_CONNECT_HOST "Connection to %s:%d failed: %s" #define ERR_CLIENT_AUTH_FAILED "Unable to authenticate client" #define ERR_CLIENT_AUTHENTICATE "Authentication rejected" #define ERR_CLIENT_WHILE_AUTH "Error while authenticating: %s" #define ERR_CLIENT_ON_GREETING "Received error on greeting: %s" #define ERR_CLIENT_SEND_FAILED "Packet send failure" #define ERR_CLIENT_INVALID_RESPONSE "Received error in response to %s: %s" #define ERR_CLIENT_DELIVERY_FAILED "Delivery failed completely" #define ERR_CLIENT_RESPONSE "Got error %d in response to %s: %s" #define ERR_CLIENT_RESPONSE_CODE "Invalid data waiting for code %d: %s" /* Classes */ #define LANG_CLASS_WHITELISTED "Whitelisted" #define LANG_CLASS_SPAM "Spam" #define LANG_CLASS_INNOCENT "Innocent" #define LANG_CLASS_VIRUS "Virus" #define LANG_CLASS_BLOCKLISTED "Blocklisted" #define LANG_CLASS_BLACKLISTED "Blacklisted" #endif /* _LANGUAGE_H */ dspam-3.10.2+dfsg/src/agent_shared.c0000644000175000017500000005424211741351001016535 0ustar julienjulien/* $Id: agent_shared.c,v 1.86 2011/07/11 22:05:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* * agent_shared.c - shared agent-based components * * DESCRIPTION * agent-based components shared between the full dspam agent (dspam) * and the lightweight client agent (dspamc) */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #include #endif #include #include #include #ifdef _WIN32 #include #include #define WIDEXITED(x) 1 #define WEXITSTATUS(x) (x) #include #else #include #include #endif #include "util.h" #include "read_config.h" #ifdef DAEMON #include "daemon.h" #include "dspam.h" #endif #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "agent_shared.h" #include "language.h" #include "buffer.h" char * __pw_name = NULL; uid_t __pw_uid; /* * initialize_atx(AGENT_CTX *) * * DESCRIPTION * initializes an existing agent context * * INPUT ARGUMENTS * ATX agent context to initialize * * RETURN VALUES * returns 0 on success */ int initialize_atx(AGENT_CTX *ATX) { memset(ATX, 0, sizeof(AGENT_CTX)); ATX->training_buffer = 0; ATX->train_pristine = 0; ATX->classification = DSR_NONE; ATX->source = DSS_NONE; ATX->operating_mode = DSM_PROCESS; ATX->fork = 1; ATX->users = nt_create (NT_CHAR); if (ATX->users == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } #ifdef TRUSTED_USER_SECURITY if (!__pw_name) { LOG(LOG_ERR, ERR_AGENT_RUNTIME_USER); exit(EXIT_FAILURE); } LOGDEBUG("checking trusted user list for %s(%d)", __pw_name, __pw_uid); if (__pw_uid == 0) ATX->trusted = 1; else ATX->trusted = _ds_match_attribute(agent_config, "Trust", __pw_name); if (!ATX->trusted) nt_add (ATX->users, __pw_name); #endif return 0; } /* * process_arguments(AGENT_CTX *, int argc, char *argv[]) * * DESCRIPTION * master commandline argument process loop * * INPUT ARGUMENTS * ATX agent context * argc number of arguments provided * argv array of arguments * * RETURN VALUES * returns 0 on success, EINVAL when invalid options specified */ int process_arguments(AGENT_CTX *ATX, int argc, char **argv) { int flag_u = 0, flag_r = 0; int client = (_ds_read_attribute(agent_config, "ClientHost") != NULL); char *ptrptr; int i; #ifdef DEBUG ATX->debug_args[0] = 0; #endif ATX->client_args[0] = 0; for (i=0; idebug_args, argv[i], sizeof (ATX->debug_args)); strlcat (ATX->debug_args, " ", sizeof (ATX->debug_args)); #endif /* Terminate user/rcpt lists */ if ((flag_u || flag_r) && (argv[i][0] == '-' || argv[i][0] == 0 || !strcmp(argv[i], "--"))) { flag_u = flag_r = 0; if (!strcmp(argv[i], "--")) continue; } if (!strcmp (argv[i], "--user")) { flag_u = 1; continue; } if (!strcmp (argv[i], "--rcpt-to")) { if (!ATX->recipients) { ATX->recipients = nt_create(NT_CHAR); if (ATX->recipients == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } } flag_r = 1; continue; } /* Build arg list to pass to server (when in client/server mode) */ if (client && !flag_u && !flag_r && i>0) { if (argv[i][0] == 0) strlcat(ATX->client_args, "\"", sizeof(ATX->client_args)); strlcat (ATX->client_args, argv[i], sizeof(ATX->client_args)); if (argv[i][0] == 0) strlcat(ATX->client_args, "\"", sizeof(ATX->client_args)); strlcat (ATX->client_args, " ", sizeof(ATX->client_args)); } if (!strcmp (argv[i], "--debug")) { #ifdef DEBUG if (DO_DEBUG == 0) DO_DEBUG = 1; #endif continue; } #if defined(DAEMON) && !defined(_DSPAMC_H) if (!strcmp (argv[i], "--client")) { ATX->client_mode = 1; continue; } #ifdef TRUSTED_USER_SECURITY if (!strcmp (argv[i], "--daemon") && ATX->trusted) #else if (!strcmp (argv[i], "--daemon")) #endif { ATX->operating_mode = DSM_DAEMON; continue; } #endif if (!strcmp (argv[i], "--nofork")) { ATX->fork = 0; continue; } if (!strncmp (argv[i], "--mode=", 7)) { char *mode = strchr(argv[i], '=')+1; if (process_mode(ATX, mode)) return EINVAL; ATX->flags |= DAF_FIXED_TR_MODE; continue; } /* Build RCPT TO list */ if (flag_r) { if (argv[i] != NULL && strlen (argv[i]) < MAX_USERNAME_LENGTH) { char user[MAX_USERNAME_LENGTH]; if (_ds_match_attribute(agent_config, "Broken", "case")) lc(user, argv[i]); else strcpy(user, argv[i]); #ifdef TRUSTED_USER_SECURITY if (!ATX->trusted && strcmp(user, __pw_name)) { LOG(LOG_ERR, ERR_TRUSTED_USER, __pw_uid, __pw_name); return EINVAL; } if (ATX->trusted) { #endif if (_ds_validate_address(user) == 1) { nt_add (ATX->recipients, user); } else { LOG(LOG_ERR, "Invalid email address: %s", user); return EINVAL; } #ifdef TRUSTED_USER_SECURITY } #endif } continue; } /* Build process user list */ if (flag_u) { if (argv[i] != NULL && strlen (argv[i]) < MAX_USERNAME_LENGTH) { if (strstr(argv[i], "../") != NULL || strstr(argv[i], "..\\") != NULL) { LOG(LOG_ERR, "Illegal username ('../' or '..\\' not allowed in username)"); return EINVAL; } else { char user[MAX_USERNAME_LENGTH]; if (_ds_match_attribute(agent_config, "Broken", "case")) lc(user, argv[i]); else strcpy(user, argv[i]); #ifdef TRUSTED_USER_SECURITY if (!ATX->trusted && strcmp(user, __pw_name)) { LOG(LOG_ERR, ERR_TRUSTED_USER, __pw_uid, __pw_name); return EINVAL; } if (ATX->trusted) #endif nt_add (ATX->users, user); } } continue; } if (!strncmp (argv[i], "--mail-from=", 12)) { strlcpy(ATX->mailfrom, strchr(argv[i], '=')+1, sizeof(ATX->mailfrom)); LOGDEBUG("MAIL FROM: %s", ATX->mailfrom); continue; } if (!strncmp (argv[i], "--profile=", 10)) { #ifdef TRUSTED_USER_SECURITY if (!ATX->trusted) { LOG(LOG_ERR, ERR_TRUSTED_PRIV, "--profile", __pw_uid, __pw_name); return EINVAL; } #endif if (!_ds_match_attribute(agent_config, "Profile", argv[i]+10)) { LOG(LOG_ERR,ERR_AGENT_NO_SUCH_PROFILE, argv[i]+10); return EINVAL; } else { _ds_overwrite_attribute(agent_config, "DefaultProfile", argv[i]+10); } continue; } if (!strncmp (argv[i], "--signature=", 12)) { strlcpy(ATX->signature, strchr(argv[i], '=')+1, sizeof(ATX->signature)); continue; } if (!strncmp (argv[i], "--class=", 8)) { char *ptr = strchr(argv[i], '=')+1; char *spam = _ds_read_attribute(agent_config, "ClassAliasSpam"); char *nonspam = _ds_read_attribute(agent_config, "ClassAliasNonspam"); if (!strcmp(ptr, "spam") || (spam && !strcmp(ptr, spam))) { ATX->classification = DSR_ISSPAM; } else if (!strcmp(ptr, "innocent") || !strcmp(ptr, "nonspam") || (nonspam && !strcmp(ptr, nonspam))) { ATX->classification = DSR_ISINNOCENT; } else { LOG(LOG_ERR, ERR_AGENT_NO_SUCH_CLASS, ptr); return EINVAL; } continue; } if (!strncmp (argv[i], "--source=", 9)) { char *ptr = strchr(argv[i], '=')+1; if (!strcmp(ptr, "corpus")) ATX->source = DSS_CORPUS; else if (!strcmp(ptr, "inoculation")) ATX->source = DSS_INOCULATION; else if (!strcmp(ptr, "error")) ATX->source = DSS_ERROR; else { LOG(LOG_ERR, ERR_AGENT_NO_SUCH_SOURCE, ptr); return EINVAL; } continue; } if (!strcmp (argv[i], "--classify")) { ATX->operating_mode = DSM_CLASSIFY; ATX->training_mode = DST_NOTRAIN; continue; } if (!strcmp (argv[i], "--process")) { ATX->operating_mode = DSM_PROCESS; continue; } if (!strncmp (argv[i], "--deliver=", 10)) { char *dup = strdup(strchr(argv[i], '=')+1); char *ptr; if (dup == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } ptr = strtok_r(dup, ",", &ptrptr); while(ptr != NULL) { if (!strcmp(ptr, "stdout")) { ATX->flags |= DAF_DELIVER_SPAM; ATX->flags |= DAF_DELIVER_INNOCENT; ATX->flags |= DAF_STDOUT; } else if (!strcmp(ptr, "spam")) ATX->flags |= DAF_DELIVER_SPAM; else if (!strcmp(ptr, "innocent") || !strcmp(ptr, "nonspam")) ATX->flags |= DAF_DELIVER_INNOCENT; else if (!strcmp(ptr, "summary")) ATX->flags |= DAF_SUMMARY; else { LOG(LOG_ERR, ERR_AGENT_NO_SUCH_DELIVER, ptr); free(dup); return EINVAL; } ptr = strtok_r(NULL, ",", &ptrptr); } free(dup); continue; } if (!strncmp (argv[i], "--feature=", 10)) { ATX->feature = 1; process_features(ATX, strchr(argv[i], '=')+1); continue; } if (!strcmp (argv[i], "--stdout")) { ATX->flags |= DAF_STDOUT; continue; } if (!strcmp (argv[i], "--help")) { fprintf (stderr, "%s\n", SYNTAX); exit(EXIT_SUCCESS); } if (!strcmp (argv[i], "--version")) { printf ("\nDSPAM Anti-Spam Suite %s (agent/library)\n\n", VERSION); printf ("Copyright (C) 2002-2012 DSPAM Project\n"); printf ("http://dspam.sourceforge.net.\n\n"); printf ("DSPAM may be copied only under the terms of the GNU Affero General Public\n"); printf ("License, a copy of which can be found with the DSPAM distribution kit.\n\n"); #ifdef TRUSTED_USER_SECURITY if (ATX->trusted) { #endif printf("Configuration parameters: %s\n\n", CONFIGURE_ARGS); #ifdef TRUSTED_USER_SECURITY } #endif exit (EXIT_SUCCESS); } /* Append all unknown arguments as mailer args */ if (i>0 #ifdef TRUSTED_USER_SECURITY && ATX->trusted #endif ) { if (argv[i][0] == 0) strlcat (ATX->mailer_args, "\"\"", sizeof (ATX->mailer_args)); else strlcat (ATX->mailer_args, argv[i], sizeof (ATX->mailer_args)); strlcat (ATX->mailer_args, " ", sizeof (ATX->mailer_args)); } } return 0; } /* * process_features(AGENT_CTX *, const char *) * * DESCRIPTION * convert --feature= stdin into agent context values * * INPUT ARGUMENTS * ATX agent context * in remainder of --feature= stdin * * RETURN VALUES * returns 0 on success, EINVAL when invalid options specified * */ int process_features(AGENT_CTX *ATX, const char *in) { char *ptr, *dup, *ptrptr; int ret = 0; if (!in || in[0]==0) return 0; dup = strdup(in); if (dup == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } ptr = strtok_r(dup, ",", &ptrptr); while(ptr != NULL) { if (!strncmp(ptr, "no",2)) ATX->flags |= DAF_NOISE; else if (!strncmp(ptr, "wh", 2)) ATX->flags |= DAF_WHITELIST; else if (!strncmp(ptr, "tb=", 3)) { ATX->training_buffer = atoi(strchr(ptr, '=')+1); if (ATX->training_buffer < 0 || ATX->training_buffer > 10) { LOG(LOG_ERR, ERR_AGENT_TB_INVALID); ret = EINVAL; } } else { LOG(LOG_ERR, ERR_AGENT_NO_SUCH_FEATURE, ptr); ret = EINVAL; } ptr = strtok_r(NULL, ",", &ptrptr); } free(dup); return ret; } /* * process_mode(AGENT_CTX *, const char *) * * DESCRIPTION * convert --mode= stdin into training mode * * INPUT ARGUMENTS * ATX agent context * mode remainder of --mode= stdin * * RETURN VALUES * returns 0 on success, EINVAL when invalid mode specified */ int process_mode(AGENT_CTX *ATX, const char *mode) { if (!mode) return EINVAL; if (!strcmp(mode, "toe")) ATX->training_mode = DST_TOE; else if (!strcmp(mode, "teft")) ATX->training_mode = DST_TEFT; else if (!strcmp(mode, "tum")) ATX->training_mode = DST_TUM; else if (!strcmp(mode, "notrain")) ATX->training_mode = DST_NOTRAIN; else if (!strcmp(mode, "unlearn")) { ATX->training_mode = DST_TEFT; ATX->flags |= DAF_UNLEARN; } else { LOG(LOG_ERR, ERR_AGENT_TR_MODE_INVALID, mode); return EINVAL; } return 0; } /* * apply_defaults(AGENT_CTX *) * * DESCRIPTION * apply default values from dspam.conf in absence of other options * * INPUT ARGUMENTS * ATX agent context * * RETURN VALUES * returns 0 on success */ int apply_defaults(AGENT_CTX *ATX) { /* Training mode */ if (!(ATX->flags & DAF_FIXED_TR_MODE)) { char *v = _ds_read_attribute(agent_config, "TrainingMode"); if (process_mode(ATX, v)) { LOG(LOG_ERR, ERR_AGENT_NO_TR_MODE); return EINVAL; } } /* Default delivery agent */ if ( ! (ATX->flags & DAF_STDOUT) && ATX->operating_mode != DSM_CLASSIFY && (ATX->flags & DAF_DELIVER_INNOCENT || ATX->flags & DAF_DELIVER_SPAM)) { char key[32]; #ifdef TRUSTED_USER_SECURITY if (!ATX->trusted) strcpy(key, "UntrustedDeliveryAgent"); else #endif strcpy(key, "TrustedDeliveryAgent"); char *value = _ds_read_attribute(agent_config, key); if (value) { char *trimmed_value = ALLTRIM(strdup(value)); if (trimmed_value && *trimmed_value == '\0') { LOG(LOG_ERR, ERR_AGENT_NO_AGENT, key); free(trimmed_value); return EINVAL; } if (trimmed_value) free(trimmed_value); char fmt[sizeof(ATX->mailer_args)]; snprintf(fmt, sizeof(fmt), "%s ", value); #ifdef TRUSTED_USER_SECURITY if (ATX->trusted) #endif strlcat(fmt, ATX->mailer_args, sizeof(fmt)); strcpy(ATX->mailer_args, fmt); } else if (!_ds_read_attribute(agent_config, "DeliveryHost")) { LOG(LOG_ERR, ERR_AGENT_NO_AGENT, key); return EINVAL; } } /* Default quarantine agent */ if (_ds_read_attribute(agent_config, "QuarantineAgent")) { snprintf(ATX->spam_args, sizeof(ATX->spam_args), "%s ", _ds_read_attribute(agent_config, "QuarantineAgent")); } else { LOGDEBUG("No QuarantineAgent option found. Using standard quarantine."); } /* Features */ if (!ATX->feature && _ds_find_attribute(agent_config, "Feature")) { attribute_t attrib = _ds_find_attribute(agent_config, "Feature"); while(attrib != NULL) { process_features(ATX, attrib->value); attrib = attrib->next; } } return 0; } /* * check_configuration(AGENT_CTX *) * * DESCRIPTION * sanity-check agent configuration * * INPUT ARGUMENTS * ATX agent context * * RETURN VALUES * returns 0 on success, EINVAL on invalid configuration */ int check_configuration(AGENT_CTX *ATX) { if (ATX->classification != DSR_NONE && ATX->operating_mode == DSM_CLASSIFY) { LOG(LOG_ERR, ERR_AGENT_CLASSIFY_CLASS); return EINVAL; } if (ATX->classification != DSR_NONE && ATX->source == DSS_NONE && !(ATX->flags & DAF_UNLEARN)) { LOG(LOG_ERR, ERR_AGENT_NO_SOURCE); return EINVAL; } if (ATX->source != DSS_NONE && ATX->classification == DSR_NONE) { LOG(LOG_ERR, ERR_AGENT_NO_CLASS); return EINVAL; } if (ATX->operating_mode == DSM_NONE) { LOG(LOG_ERR, ERR_AGENT_NO_OP_MODE); return EINVAL; } if (!_ds_match_attribute(agent_config, "ParseToHeaders", "on")) { if (ATX->users->items == 0) { LOG(LOG_ERR, ERR_AGENT_USER_UNDEFINED); return EINVAL; } } return 0; } /* * read_stdin(AGENT_CTX *) * * DESCRIPTION * read message from stdin and perform any inline configuration * (such as servicing 'ParseToHeaders' functions) * * INPUT ARGUMENTS * ATX agent context * * RETURN VALUES * buffer structure containing the message */ buffer * read_stdin(AGENT_CTX *ATX) { int body = 0, line = 1; char buf[1024]; buffer *msg; msg = buffer_create(NULL); if (msg == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return NULL; } if (_ds_match_attribute(agent_config, "DataSource", "document")) { buffer_cat(msg, ": \n\n"); body = 1; } /* Only read the message if no signature was provided on commandline */ if (ATX->signature[0] == 0) { while ((fgets (buf, sizeof (buf), stdin)) != NULL) { /* Strip CR/LFs for admittedly broken mail servers */ if (_ds_match_attribute(agent_config, "Broken", "lineStripping")) { size_t len = strlen(buf); while (len>1 && buf[len-2]==13) { buf[len-2] = buf[len-1]; buf[len-1] = 0; len--; } } /* * Don't include first line of message if it's a quarantine header added * by dspam at time of quarantine */ if (line==1 && !strncmp(buf, "From QUARANTINE", 15)) continue; /* * Parse the "To" headers and adjust the operating mode and user when * an email is sent to spam-* or notspam-* address. Behavior must be * configured in dspam.conf */ if (_ds_match_attribute(agent_config, "ParseToHeaders", "on")) { if (buf[0] == 0) body = 1; if (!body && !strncasecmp(buf, "To: ", 4)) process_parseto(ATX, buf); } if (buffer_cat (msg, buf)) { LOG (LOG_CRIT, ERR_MEM_ALLOC); goto bail; } /* * Use the original user id if we are reversing a false positive * (this is only necessary when using shared,managed groups */ if (!strncasecmp (buf, "X-DSPAM-User: ", 14) && ATX->operating_mode == DSM_PROCESS && ATX->classification == DSR_ISINNOCENT && ATX->source == DSS_ERROR) { char user[MAX_USERNAME_LENGTH]; strlcpy (user, buf + 14, sizeof (user)); chomp (user); nt_destroy (ATX->users); ATX->users = nt_create (NT_CHAR); if (ATX->users == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); goto bail; } LOGDEBUG("found username %s in X-DSPAM-User header", user); nt_add (ATX->users, user); } line++; } } if (!msg->used) { if (ATX->signature[0] != 0) { buffer_cat(msg, "\n\n"); } else { LOG (LOG_INFO, "empty message (no data received)"); goto bail; } } return msg; bail: LOGDEBUG("read_stdin() failure"); buffer_destroy(msg); return NULL; } /* * process_parseto(AGENT_CTX *, const char *) * * DESCRIPTION * processes the To: line of a message to provide parseto services * * INPUT ARGUMENTS * ATX agent context * buf To: line * * RETURN VALUES * returns 0 on success */ int process_parseto(AGENT_CTX *ATX, const char *buf) { char *y = NULL; char *x; char *h = NULL; char *buffer; char *ptrptr; if (!buf || strncmp(buf+2,":",1) != 0) return EINVAL; buffer = strdup (buf+3); h = strtok_r (buffer, "\n", &ptrptr); while (h != NULL) { /* check for spam alias */ x = strstr(h, "classification = DSR_ISSPAM; ATX->source = DSS_ERROR; } } else { /* check for nonspam alias */ x = strstr(h, "= 9) { y = strdup(x+9); if (_ds_match_attribute(agent_config, "ChangeModeOnParse", "on")) { ATX->classification = DSR_ISINNOCENT; ATX->source = DSS_ERROR; } } } /* do not continue if we found a spam/nonspam alias */ if (y) break; /* get next line from 'To' header */ h = strtok_r (NULL, "\n", &ptrptr); if (h && h[0] != 32 && h[0] != 9) { /* we are not any more in the 'To' header */ break; } } free (buffer); if (y && (_ds_match_attribute(agent_config, "ChangeUserOnParse", "on") || _ds_match_attribute(agent_config, "ChangeUserOnParse", "full") || _ds_match_attribute(agent_config, "ChangeUserOnParse", "user"))) { char *z; if (_ds_match_attribute(agent_config, "ChangeUserOnParse", "full")) { z = strtok_r(y, ">, \t\r\n", &ptrptr); } else { if (strstr(x, "@")) z = strtok_r(y, "@", &ptrptr); else z = NULL; } if (z) { nt_destroy(ATX->users); ATX->users = nt_create(NT_CHAR); if (!ATX->users) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } nt_add (ATX->users, z); } } if (y) free(y); return 0; } int init_pwent_cache(void) { struct passwd *pwent; pwent = getpwuid(getuid()); if (pwent == NULL) { return 0; } else { __pw_name = strdup(pwent->pw_name); __pw_uid = pwent->pw_uid; } return 1; } dspam-3.10.2+dfsg/src/storage_driver.c0000644000175000017500000002164311741351001017127 0ustar julienjulien/* $Id: storage_driver.c,v 1.15 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "libdspam.h" #include "storage_driver.h" #include "error.h" #include "language.h" int dspam_init_driver (DRIVER_CTX *DTX) { int (*ptr)(DRIVER_CTX *); ptr = (int (*)(DRIVER_CTX *))(intptr_t)dlsym(_drv_handle, "dspam_init_driver"); if (!ptr) { LOG(LOG_CRIT, "dlsym(dspam_init_driver) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(DTX); } int dspam_shutdown_driver (DRIVER_CTX *DTX) { int (*ptr)(DRIVER_CTX *); ptr = (int (*)(DRIVER_CTX *))(intptr_t)dlsym(_drv_handle, "dspam_shutdown_driver"); if (!ptr) { LOG(LOG_CRIT, "dlsym(dspam_shutdown_driver) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(DTX); } int _ds_init_storage (DSPAM_CTX * CTX, void *dbh) { int (*ptr)(DSPAM_CTX *, void *); ptr = (int (*)(DSPAM_CTX *, void *))(intptr_t)dlsym(_drv_handle, "_ds_init_storage"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_init_storage) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(CTX, dbh); } int _ds_shutdown_storage (DSPAM_CTX * CTX) { int (*ptr)(DSPAM_CTX *); ptr = (int (*)(DSPAM_CTX *))(intptr_t)dlsym(_drv_handle, "_ds_shutdown_storage"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_shutdown_storage) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(CTX); } int _ds_getall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { int (*ptr)(DSPAM_CTX *, ds_diction_t); ptr = (int (*)(DSPAM_CTX *, ds_diction_t))(intptr_t)dlsym(_drv_handle, "_ds_getall_spamrecords"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_getall_spamrecords) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(CTX, diction); } int _ds_setall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { int (*ptr)(DSPAM_CTX *, ds_diction_t); ptr = (int (*)(DSPAM_CTX *, ds_diction_t))(intptr_t)dlsym(_drv_handle, "_ds_setall_spamrecords"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_setall_spamrecords) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(CTX, diction); } int _ds_delall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { int (*ptr)(DSPAM_CTX *, ds_diction_t); ptr = (int (*)(DSPAM_CTX *, ds_diction_t))(intptr_t)dlsym(_drv_handle, "_ds_delall_spamrecords"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_delall_spamrecords) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(CTX, diction); } int _ds_get_spamrecord ( DSPAM_CTX * CTX, unsigned long long token, struct _ds_spam_stat *stat) { int (*ptr)(DSPAM_CTX *, unsigned long long, struct _ds_spam_stat *); ptr = (int (*)(DSPAM_CTX *, unsigned long long, struct _ds_spam_stat *))(intptr_t)dlsym(_drv_handle, "_ds_get_spamrecord"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_get_spamrecord) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(CTX, token, stat); } int _ds_set_spamrecord ( DSPAM_CTX * CTX, unsigned long long token, struct _ds_spam_stat *stat) { int (*ptr)(DSPAM_CTX *, unsigned long long, struct _ds_spam_stat *); ptr = (int (*)(DSPAM_CTX *, unsigned long long, struct _ds_spam_stat *))(intptr_t)dlsym(_drv_handle, "_ds_set_spamrecord"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_set_spamrecord) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(CTX, token, stat); } int _ds_del_spamrecord (DSPAM_CTX * CTX, unsigned long long token) { int (*ptr)(DSPAM_CTX *, unsigned long long); ptr = (int (*)(DSPAM_CTX *, unsigned long long))(intptr_t)dlsym(_drv_handle, "_ds_del_spamrecord"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_del_spamrecord) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(CTX, token); } struct _ds_storage_record *_ds_get_nexttoken (DSPAM_CTX * CTX) { struct _ds_storage_record *(*ptr)(DSPAM_CTX *); ptr = (struct _ds_storage_record * (*)(DSPAM_CTX *))(intptr_t)dlsym(_drv_handle, "_ds_get_nexttoken"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_get_nexttoken) failed: %s", dlerror()); return NULL; } return (*ptr)(CTX); } struct _ds_storage_signature *_ds_get_nextsignature (DSPAM_CTX * CTX) { struct _ds_storage_signature *(*ptr)(DSPAM_CTX *); ptr = (struct _ds_storage_signature * (*)(DSPAM_CTX *))(intptr_t)dlsym(_drv_handle, "_ds_get_nextsignature"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_get_nextsignature) failed: %s", dlerror()); return NULL; } return (*ptr)(CTX); } char *_ds_get_nextuser (DSPAM_CTX * CTX) { char *(*ptr)(DSPAM_CTX *); ptr = (char * (*)(DSPAM_CTX *))(intptr_t)dlsym(_drv_handle, "_ds_get_nextuser"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_get_nextuser) failed: %s", dlerror()); return NULL; } return (*ptr)(CTX); } int _ds_delete_signature (DSPAM_CTX * CTX, const char *signature) { int (*ptr)(DSPAM_CTX *, const char *); ptr = (int (*)(DSPAM_CTX *, const char *))(intptr_t)dlsym(_drv_handle, "_ds_delete_signature"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_delete_signature) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(CTX, signature); } int _ds_get_signature ( DSPAM_CTX * CTX, struct _ds_spam_signature *SIG, const char *signature) { int (*ptr)(DSPAM_CTX *, struct _ds_spam_signature *, const char *); ptr = (int (*)(DSPAM_CTX *, struct _ds_spam_signature *, const char *))(intptr_t)dlsym(_drv_handle, "_ds_get_signature"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_get_signature) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(CTX, SIG, signature); } int _ds_set_signature ( DSPAM_CTX * CTX, struct _ds_spam_signature *SIG, const char *signature) { int (*ptr)(DSPAM_CTX *, struct _ds_spam_signature *, const char *); ptr = (int (*)(DSPAM_CTX *, struct _ds_spam_signature *, const char *))(intptr_t)dlsym(_drv_handle, "_ds_set_signature"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_set_signature) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(CTX, SIG, signature); } int _ds_verify_signature (DSPAM_CTX * CTX, const char *signature) { int (*ptr)(DSPAM_CTX *, const char *); ptr = (int (*)(DSPAM_CTX *, const char *))(intptr_t)dlsym(_drv_handle, "_ds_verify_signature"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_verify_signature) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(CTX, signature); } int _ds_create_signature_id (DSPAM_CTX * CTX, char *buf, size_t len) { int (*ptr)(DSPAM_CTX *, char *, size_t); ptr = (int (*)(DSPAM_CTX *, char *, size_t))(intptr_t)dlsym(_drv_handle, "_ds_create_signature_id"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_create_signature_id) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(CTX, buf, len); } void *_ds_connect (DSPAM_CTX *CTX) { void *(*ptr)(DSPAM_CTX *); ptr = (void * (*)(DSPAM_CTX *))(intptr_t)dlsym(_drv_handle, "_ds_connect"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_connect) failed: %s", dlerror()); return NULL; } return (*ptr)(CTX); } agent_pref_t _ds_pref_load( config_t config, const char *user, const char *home, void *dbh) { agent_pref_t (*ptr)(config_t, const char *, const char *, void *); ptr = (agent_pref_t (*)(config_t, const char *, const char *, void *))(intptr_t)dlsym(_drv_handle, "_ds_pref_load"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_pref_load) failed: %s", dlerror()); return NULL; } return (*ptr)(config, user, home, dbh); } int _ds_pref_set( config_t config, const char *user, const char *home, const char *attrib, const char *value, void *dbh) { int (*ptr)(config_t, const char *, const char *, const char *, const char *, void *); ptr = (int (*)(config_t, const char *, const char *, const char *, const char *, void *))(intptr_t)dlsym(_drv_handle, "_ds_pref_set"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_pref_set) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(config, user, home, attrib, value, dbh); } int _ds_pref_del( config_t config, const char *user, const char *home, const char *attrib, void *dbh) { int (*ptr)(config_t, const char *, const char *, const char *, void *); ptr = (int (*)(config_t, const char *, const char *, const char *, void *))(intptr_t)dlsym(_drv_handle, "_ds_pref_del"); if (!ptr) { LOG(LOG_CRIT, "dlsym(_ds_pref_del) failed: %s", dlerror()); return EFAILURE; } return (*ptr)(config, user, home, attrib, dbh); } dspam-3.10.2+dfsg/src/external_lookup.h0000644000175000017500000000253111622570546017342 0ustar julienjulien/* $Id: external_lookup.h,v 1.00 2009/12/22 12:25:59 sbajic Exp $ */ /* COPYRIGHT (C) 2006 HUGO MONTEIRO external lookup library for DSPAM v0.1 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef EXT_LOOKUP #ifndef _EXT_LOOKUP_H #define _EXT_LOOKUP_H #include "agent_shared.h" #include "libdspam.h" int verified_user; void sig_alrm(int signum); char *transcode_query(const char *query, const char *username, char *transcoded_query); char *external_lookup(config_t agent_config, const char *username, char *external_uid); char *ldap_lookup(config_t agent_config, const char *username, char *external_uid); char *program_lookup(config_t agent_config, const char *username, char *external_uid); #endif /* _EXTERNAL_LOOKUP_H */ #endif /* USE_EXTLOOKUP */ dspam-3.10.2+dfsg/src/libdspam_objects.h0000644000175000017500000002735511741351001017427 0ustar julienjulien/* $Id: libdspam_objects.h,v 1.27 2011/07/11 21:29:57 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef _LIBDSPAM_OBJECTS_H # define _LIBDSPAM_OBJECTS_H #ifdef HAVE_CONFIG_H #include #endif #include #include "config.h" #include "config_shared.h" #include "decode.h" #if ((defined(__sun__) && defined(__svr4__)) || (defined(__sun) && defined(__SUNPRO_C))) && !defined(u_int32_t) && !defined(__BIT_TYPES_DEFINED__) #define __BIT_TYPES_DEFINED__ typedef unsigned long long u_int64_t; typedef unsigned int u_int32_t; typedef unsigned short u_int16_t; typedef unsigned char u_int8_t; #endif #ifdef _WIN32 typedef unsigned int u_int32_t; typedef u_int32_t uid_t; #endif extern void *_drv_handle; /* Handle to storage driver library */ /* * struct dspam_factor - A single determining factor * * An element containing a determining factor in the dominant calculation of * a message. An array of these are returned to the calling application to * explain libdspam's final classification decision. */ struct dspam_factor { char *token_name; float value; }; /* * struct _ds_spam_totals - User spam totals * * Spam totals loaded into the user's filter context upon a call to * dspam_init(). This structure represents the user's cumulative statistics. * * spam_learned, innocent_learned * The total number of messages trained on. * * spam_misclassified, innocent_misclassified * The total number of messages that were misclassified by DSPAM, and * submitted for retraining. * * spam_classified, innocent_classified * The total number of messages that were classified by DSPAM, but not * learned. Used exclusively with Train-on-Error mode. * * spam_corpusfed, innocent_corpusfed * The total number of messages supplied by the end-user for training. * * NOTE: The ordering of the variables in the structure must remain * consistent to ensure backward-compatibility with some storage * drivers (such as the Berkeley DB drivers) */ struct _ds_spam_totals { long spam_learned; long innocent_learned; long spam_misclassified; long innocent_misclassified; long spam_corpusfed; long innocent_corpusfed; long spam_classified; long innocent_classified; }; /* * struct _ds_spam_stat - Statistics for a single token: * * probability * The calculated probability of the token based on the active pvalue * algorithm (selected at configure-time). * * spam_hits, innocent_hits * The total number of times the token has appeared in each class of * message. If Train-on-Error or Train-until-Mature training modes are * employed, these values will not necessarily be updated for every * message. * * status * TST_DISK Value was loaded from the storage interface * TST_DIRTY Statistic is dirty (not written to disk since last modified) */ typedef struct _ds_spam_stat { double probability; long spam_hits; long innocent_hits; char status; unsigned long offset; } *ds_spam_stat_t; /* * struct _ds_spam_signature - A historical classification signature * * A binary representation of the original training instance. The spam * signature contains all the metadata used in the original decision * about the message, so that a 1:1 retraining can take place if the * message is submitted for retraining (e.g. was misclassified). The * signature contains a series of _ds_signature_token structures, which * house the original set of tokens used and their frequency counts in * the message. A spam signature is a temporary piece of data that is * usually purged from disk after a short period of time. */ struct _ds_spam_signature { void *data; unsigned long length; }; /* * struct _ds_signature_token - An entry in the classification signature * * A signature token is a single entry in the binary _ds_spam_signature * data blob, representing a single data point from the original * training instance. * * token * The checksum of the original token in the message * * frequency * The token's frequency in the original message */ struct _ds_signature_token { unsigned long long token; unsigned char frequency; }; /* * struct _ds_config - libdspam attributes configuration * * Each classification context may have an attributes configuration * which is read by various components of libdspam. This structure * contains an array of attributes and the size of the array. */ struct _ds_config { config_t attributes; long size; }; /* * DSPAM_CTX - The DSPAM Classification Context * * A classification context is attached directly to a filter instance * and supplies the entire context for the filter instance to operate * under. This includes the user and group, operational flags, * training mode, and the message being operated on. The filter * instance also sets specific output variables within the context * such as the result of a classification, confidence level, and * etcetera. * * username, group (input) * The current username and group that is being operated on. * * totals (output) * The set of statistics loaded when dspam_init() is called. * * signature (input, output) * The signature represents a DSPAM signature, and can be supplied * as an input variable for retraining (e.g. in the event of a * misclassification) or used as an output variable to store a * signature generated by the filter instance during normal * classification. * * message (input) * The message being operated on, post-actualization. This can be * left NULL, and libdspam will automatically actualize the message * * probability (output) * The probability of the resulting operation. This is generally a * floating point number between 0 and 1, 1 being the highest * probability of high order classification. * * result (output) * The final result of the requested operation. This is generally * either DSR_ISSPAM, DSR_ISINNOCENT, or DSR_WHITELISTED. * * confidence (output) * The confidence that the filter has in its returned result. * NOTE: Confidence is not always supported, and may be zero. * * operating_mode (input) * Sets the operating mode of the filter instance. This can be one * of the following: * * DSM_PROCESS Classify and learn the supplied message using * whatever training mode is specified * * DSM_CLASSIFY Classify the supplied message only; do not * learn or update any counters. * * DSM_TOOLS Identifies that the calling function is from * a utility, and no operation will be requested. * * training_mode (input) * The training mode sets the type of training the filter instance * should apply to the process. This can be one of: * * DST_TEFT Train-on-Everything * Trains every single message processed * * DST_TOE Train-on-Error * Trains only on a misclassification or * corpus-fed message. * * DST_TUM Train-until-Mature * Trains individual tokens based on the * maturity of the user's dictionary * * DST_NOTRAIN No Training * Process the message but do not perform * any training. * training_buffer (input) * Sets the amount of training-loop buffering. This number is a * range from 0-10 and changes the amount of token sedation used * during the training loop. The higher the number, the more token * statistics are watered down during initial training to prevent * false positives. Setting this value to zero results in no * sedation being performed. * * flags (input) * Applies different fine-tuning behavior to the context: * * DSF_NOISE Apply Bayesian Noise Reduction logic * DSF_SIGNATURE Signature is provided/requested * DSF_WHITELIST Use automatic whitelisting logic * DSF_MERGED Merge user/group data in memory * DSF_UNLEARN Unlearn the message * DSF_BIAS Assign processor bias to unknown tokens * * tokenizer (input) * Specifies which tokenizer to use * * DSZ_WORD Use WORD (uniGram) tokenizer * DSZ_CHAIN Use CHAIN (biGram) tokenizer * DSZ_SBPH Use SBPH (Sparse Binary Polynomial Hashing) tokenizer * DSZ_OSB Use OSB (Orthogonal Sparse biGram) tokenizer * * algorithms (input) * Optional API to override the default algorithms. This value is set * with the default compiled values whenever dspam_create() is called. * * DSA_GRAHAM Graham-Bayesian * DSA_BURTON Burton-Bayesian * DSA_ROBINSON Robinson's Geometric Mean Test * DSA_CHI_SQUARE Fisher-Robinson's Chi-Square * DSA_NAIVE Naive-Bayesian * * P-Value Computations: * * DSP_ROBINSON Robinson's Technique * DSP_GRAHAM Graham's Technique * DSP_MARKOV Markov Weighted Technique * * locked (output) * Identifies that the user's storage is presently locked */ typedef struct { struct _ds_spam_totals totals; struct _ds_spam_signature * signature; struct _ds_message * message; struct _ds_config * config; char *username; char *group; char *home; /* DSPAM Home */ int operating_mode; /* DSM_ */ int training_mode; /* DST_ */ int training_buffer; /* 0-10 */ int wh_threshold; /* Whitelisting Threshold (default 10) */ int classification; /* DSR_ */ int source; /* DSS_ */ int learned; /* Did we actually learn something? */ int tokenizer; /* DSZ_ */ u_int32_t flags; u_int32_t algorithms; int result; char class[32]; float probability; float confidence; int locked; void * storage; time_t _process_start; int _sig_provided; struct nt * factors; } DSPAM_CTX; /* Processing Flags */ #define DSF_SIGNATURE 0x02 #define DSF_BIAS 0x04 #define DSF_NOISE 0x08 #define DSF_WHITELIST 0x10 #define DSF_MERGED 0x20 #define DSF_UNLEARN 0x80 /* Tokenizers */ #define DSZ_WORD 0x01 #define DSZ_CHAIN 0x02 #define DSZ_SBPH 0x03 #define DSZ_OSB 0x04 /* Algorithms */ #define DSA_GRAHAM 0x01 #define DSA_BURTON 0x02 #define DSA_ROBINSON 0x04 #define DSA_CHI_SQUARE 0x08 #define DSP_ROBINSON 0x10 #define DSP_GRAHAM 0x20 #define DSP_MARKOV 0x40 #define DSA_NAIVE 0x80 /* Operating Modes */ #define DSM_PROCESS 0x00 #define DSM_TOOLS 0x01 #define DSM_CLASSIFY 0x02 #define DSM_NONE 0xFF /* Training Modes */ #define DST_TEFT 0x00 #define DST_TOE 0x01 #define DST_TUM 0x02 #define DST_NOTRAIN 0xFE /* Classification Results */ #define DSR_ISSPAM 0x01 #define DSR_ISINNOCENT 0x02 #define DSR_NONE 0xFF /* Classification Sources */ #define DSS_ERROR 0x00 /* Retraining an error */ #define DSS_CORPUS 0x01 /* Training a message from corpus */ #define DSS_INOCULATION 0x02 /* Message is an inoculation */ #define DSS_NONE 0xFF /* Standard inbound processing */ /* Statuses for token-status bit */ #define TST_DISK 0x01 #define TST_DIRTY 0x02 /* Token Types */ #define DTT_DEFAULT 0x00 #define DTT_BNR 0x01 #define DSP_UNCALCULATED -1 #define BURTON_WINDOW_SIZE 27 #endif /* _LIBDSPAM_OBJECTS */ dspam-3.10.2+dfsg/src/config_api.h0000644000175000017500000000176611741351001016217 0ustar julienjulien/* $Id: config_api.h,v 1.10 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef _CONFIG_API_H #define _CONFIG_API_H #ifdef HAVE_CONFIG_H #include #endif #include "libdspam.h" int set_libdspam_attributes(DSPAM_CTX *CTX); int attach_context (DSPAM_CTX *CTX, void *dbh); #endif /* _CONFIG_API_H */ dspam-3.10.2+dfsg/src/Makefile.am0000644000175000017500000002024011622570546016007 0ustar julienjulien# $Id: Makefile.am,v 1.50 2010/11/30 09:01:56 sbajic Exp $ # # autoconf (GNU Autoconf) 2.59 # ltmain.sh (GNU libtool) 1.5.6 # automake (GNU automake) 1.9.2 includedir=@includedir@/dspam SUBDIRS = . tools $(storage_drv_subdirs) DIST_SUBDIRS = . \ tools.mysql_drv tools.pgsql_drv tools.sqlite_drv tools.hash_drv tools pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = dspam.pc etcdir = $(sysconfdir) etc_SCRIPTS = dspam_conf libversion = 7:0:0 # Defaults from dspam.conf EXTRA_DIST = example.c dspam.pc.in dspam-uninstalled.pc.in dspam.conf.in CLEANFILES = dspam.conf MAINTAINERCLEANFILES = Makefile.in aclocal.m4 auto-config.h.in \ config.guess config.sub configure depcomp install-sh \ ltmain.sh missing mkinstalldirs DEFS = @DEFS@ -DLOGDIR=\"$(logdir)\" \ -DCONFDIR=\"$(sysconfdir)\"\ -DCONFIG_DEFAULT=\"$(sysconfdir)/dspam.conf\"\ -D_THREAD_SAFE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE lib_LTLIBRARIES = libdspam.la pkglib_LTLIBRARIES = if DYNAMIC_DRIVER if BUILD_HASH_DRV pkglib_LTLIBRARIES += libhash_drv.la endif if BUILD_MYSQL_DRV pkglib_LTLIBRARIES += libmysql_drv.la endif if BUILD_PGSQL_DRV pkglib_LTLIBRARIES += libpgsql_drv.la endif if BUILD_SQLITE_DRV pkglib_LTLIBRARIES += libsqlite_drv.la endif if BUILD_SQLITE3_DRV pkglib_LTLIBRARIES += libsqlite3_drv.la endif endif bin_PROGRAMS = dspam dspamc # 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 pref.h read_config.h if BUILD_EXT_LOOKUP include_HEADERS += external_lookup.h endif # libdspam.a contans objects common for dspam and tools/* binaries libdspam_la_SOURCES = \ config.h libdspam_objects.h \ libdspam.c libdspam.h \ heap.c heap.h \ diction.c diction.h \ base64.c base64.h \ buffer.c buffer.h \ util.c util.h \ nodetree.c nodetree.h \ error.c error.h \ decode.c decode.h \ pref.c pref.h \ config_shared.c config_shared.h \ bnr.c bnr.h \ hash.c hash.h \ list.c list.h \ tokenizer.c tokenizer.h \ storage_driver.h if BUILD_EXT_LOOKUP libdspam_la_SOURCES += external_lookup.c external_lookup.h endif if DYNAMIC_DRIVER libdspam_la_SOURCES += storage_driver.c endif EXTRA_libdspam_la_SOURCES = \ mysql_drv.c mysql_drv.h \ pgsql_drv.c pgsql_drv.h \ sqlite_drv.c sqlite_drv.h \ sqlite3_drv.c sqlite3_drv.h #if STATIC_DRIVER #if BUILD_HASH_DRV #libdspam_la_SOURCES += libhash_drv.c libhash_drv.h #endif #if BUILD_MYSQL_DRV #libdspam_la_SOURCES += libmysql_drv.c libmysql_drv.h #endif #if BUILD_PGSQL_DRV #libdspam_la_SOURCES += libpgsql_drv.c libpgsql_drv.h #endif #if BUILD_SQLITE_DRV #libdspam_la_SOURCES += libsqlite_drv.c libsqlite_drv.h #endif #if BUILD_SQLITE3_DRV #libdspam_la_SOURCES += libsqlite3_drv.c libsqlite3_drv.h #endif #endif libdspam_la_LIBADD = $(adapter_objects) libdspam_la_LIBADD += -lm $(NETLIBS) $(DLLIBS) libdspam_la_DEPENDENCIES = $(adapter_objects) if BUILD_EXT_LOOKUP libdspam_la_LIBADD += $(external_lookup_libs) endif if STATIC_DRIVER libdspam_la_LIBADD += $(active_driver).lo libdspam_la_DEPENDENCIES += $(active_driver).lo endif # current:revision:age libdspam_la_LDFLAGS = -rpath '$(libdir)' -version-info $(libversion) if DYNAMIC_DRIVER libmysql_drv_la_SOURCES = \ mysql_drv.c mysql_drv.h libmysql_drv_la_LIBADD = $(libmysql_drv_libs) -L. -ldspam libmysql_drv_la_CPPFLAGS = $(libmysql_drv_cppflags) libmysql_drv_la_LDFLAGS = $(libmysql_drv_ldflags) libmysql_drv_la_LDFLAGS += -rpath '$(pkglibdir)' -version-info $(libversion) libmysql_drv_la_DEPENDENCIES = libdspam.la libpgsql_drv_la_SOURCES = \ pgsql_drv.c pgsql_drv.h libpgsql_drv_la_LIBADD = $(libpgsql_drv_libs) -L. -ldspam libpgsql_drv_la_CPPFLAGS = $(libpgsql_drv_cppflags) libpgsql_drv_la_LDFLAGS = $(libpgsql_drv_ldflags) libpgsql_drv_la_LDFLAGS += -rpath '$(pkglibdir)' -version-info $(libversion) libpgsql_drv_la_DEPENDENCIES = libdspam.la libsqlite_drv_la_SOURCES = \ sqlite_drv.c sqlite_drv.h libsqlite_drv_la_LIBADD = $(libsqlite_drv_libs) -L. -ldspam libsqlite_drv_la_CPPFLAGS = $(libsqlite_drv_cppflags) libsqlite_drv_la_LDFLAGS = $(libsqlite_drv_ldflags) libsqlite_drv_la_LDFLAGS += -rpath '$(pkglibdir)' -version-info $(libversion) libsqlite_drv_la_DEPENDENCIES = libdspam.la libsqlite3_drv_la_SOURCES = \ sqlite3_drv.c sqlite3_drv.h libsqlite3_drv_la_LIBADD = $(libsqlite3_drv_libs) -L. -ldspam libsqlite3_drv_la_CPPFLAGS = $(libsqlite3_drv_cppflags) libsqlite3_drv_la_LDFLAGS = $(libsqlite3_drv_ldflags) libsqlite3_drv_la_LDFLAGS += -rpath '$(pkglibdir)' -version-info $(libversion) libsqlite3_drv_la_DEPENDENCIES = libdspam.la libhash_drv_la_SOURCES = \ hash_drv.c hash_drv.h libhash_drv_la_LIBADD = $(libhash_drv_libs) -L. -ldspam libhash_drv_la_CPPFLAGS = $(libhash_drv_cppflags) libhash_drv_la_LDFLAGS = $(libhash_drv_ldflags) libhash_drv_la_LDFLAGS += -rpath '$(pkglibdir)' -version-info $(libversion) libhash_drv_la_DEPENDENCIES = libdspam.la endif dspam_SOURCES = \ config.h libdspam.h language.h \ dspam.c dspam.h \ buffer.h storage_driver.h \ read_config.c read_config.h \ config_api.c config_api.h \ daemon.c daemon.h \ client.c client.h \ agent_shared.c agent_shared.h dspam_LDADD = -lm libdspam.la dspam_DEPENDENCIES = libdspam.la dspamc_SOURCES = \ config.h language.h \ dspamc.c dspamc.h \ buffer.h error.h \ read_config.c read_config.h \ client.c client.h \ agent_shared.c agent_shared.h dspamc_LDADD = -lm buffer.o config_shared.o error.o pref.o nodetree.o util.o $(NETLIBS) $(DLLIBS) dspamc_LDFLAGS = dspamc_DEPENDENCIES = buffer.o config_shared.o error.o pref.o nodetree.o util.o # Failing of chgrp is expected and normal case when someone do # make install DESTDIR=... # from user other than root (from user not included in the `mail' group # is exactly), and only after this and after checking what was installed # changes ownership. # # Caveat: creating the $(dspam_home) in the install-exec-hook is not the # right way, but for some (unknown to me) reason `installdirs-local' # target have no chances to be executed under automake-1.7.3 (at least). # # Solaris' ln seems to have a problem with -sf and existing symlinks. install-exec-hook: -if test ! -d $(DESTDIR)$(sysconfdir); then \ mkdir -p $(DESTDIR)$(sysconfdir); \ chmod 755 $(DESTDIR)$(sysconfdir); \ fi -if test ! -f $(DESTDIR)$(sysconfdir)/dspam.conf; then \ cp dspam.conf $(DESTDIR)$(sysconfdir)/dspam.conf; \ chmod 640 $(DESTDIR)$(sysconfdir)/dspam.conf; \ chown "$(dspam_owner)" $(DESTDIR)$(sysconfdir)/dspam.conf; \ chgrp "$(dspam_group)" $(DESTDIR)$(sysconfdir)/dspam.conf; \ fi -if test x"$(dspam_owner)" != xnone; then \ chown "$(dspam_owner)" $(DESTDIR)$(bindir)/dspam; \ fi -if test x"$(dspam_group)" != xnone; then \ chgrp "$(dspam_group)" $(DESTDIR)$(bindir)/dspam; \ fi -if test x"$(dspam_mode)" != xnone; then \ chmod "$(dspam_mode)" $(DESTDIR)$(bindir)/dspam; \ fi -if test ! -d $(DESTDIR)$(dspam_home); then \ $(mkinstalldirs) $(DESTDIR)$(dspam_home); \ if test x"$(dspam_home_owner)" != xnone; then \ chown "$(dspam_home_owner)" $(DESTDIR)$(dspam_home); \ fi; \ if test x"$(dspam_home_group)" != xnone; then \ chgrp "$(dspam_home_group)" $(DESTDIR)$(dspam_home); \ fi; \ if test x"$(dspam_home_mode)" != xnone; then \ chmod "$(dspam_home_mode)" $(DESTDIR)$(dspam_home); \ fi; \ fi -if test ! -d $(DESTDIR)$(logdir); then \ $(mkinstalldirs) $(DESTDIR)$(logdir); \ if test x"$(dspam_home_owner)" != xnone; then \ chown "$(dspam_home_owner)" $(DESTDIR)$(logdir); \ fi; \ if test x"$(dspam_home_group)" != xnone; then \ chgrp "$(dspam_home_group)" $(DESTDIR)$(logdir); \ fi; \ if test x"$(dspam_home_mode)" != xnone; then \ chmod "$(dspam_home_mode)" $(DESTDIR)$(logdir); \ fi; \ fi ACLOCAL_AMFLAGS = -I m4 sed_substitute_variables = \ dspam_transformed=`echo dspam | sed '$(transform)'`; \ sed -e 's,@dspam_home\@,$(dspam_home),g' \ -e 's,@delivery_agent\@,$(delivery_agent),g' \ -e 's,@storage_driver\@,lib$(active_driver).so,g' \ -e 's,@libdir\@,$(libdir),g' dspam_conf: dspam.conf.in Makefile ${sed_substitute_variables} < $(srcdir)/dspam.conf.in > dspam.conf dspam-3.10.2+dfsg/src/error.c0000644000175000017500000000706411741351001015242 0ustar julienjulien/* $Id: error.c,v 1.21 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* * error.c - error reporting * * DESCRIPTION * The error reporting facilities include: * LOGDEBUG Log to debug only * LOG Log to syslog, stderr, and debug */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_UNISTD_H # include #endif #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "error.h" #include "util.h" #include "config.h" #ifdef DAEMON #include pthread_mutex_t __syslog_lock; #endif #ifdef _WIN32 #include #endif #ifndef _WIN32 void LOG(int priority, const char *err, ... ) { #if defined(USE_SYSLOG) || defined(LOGFILE) va_list ap; va_start (ap, err); #endif #ifdef LOGFILE char date[128]; FILE *file; #endif #ifdef DAEMON #if defined(USE_SYSLOG) && defined(LOGFILE) pthread_mutex_lock(&__syslog_lock); #endif #endif #ifdef USE_SYSLOG openlog ("dspam", LOG_PID | LOG_CONS | LOG_NOWAIT, LOG_MAIL); vsyslog (priority, err, ap); closelog (); #endif #ifdef LOGFILE char err_text[256]; vsnprintf(err_text, sizeof(err_text), err, ap); file = fopen(LOGFILE, "a"); if (file) { fprintf(file, "%ld: [%s] %s\n", (long) getpid(), format_date_r(date), err_text); fclose(file); } else { fprintf(stderr, "%s: %s", LOGFILE, strerror(errno)); fprintf(stderr, "%ld: [%s] %s\n", (long)getpid(), format_date_r(date), err_text); } #endif #if defined(USE_SYSLOG) || defined(LOGFILE) va_end (ap); #endif #ifdef DAEMON #if defined(USE_SYSLOG) && defined(LOGFILE) pthread_mutex_unlock(&__syslog_lock); #endif #endif return; } #endif #ifdef DEBUG void LOGDEBUG (const char *err, ... ) { char debug_text[1024]; va_list args; if (!DO_DEBUG) return; va_start (args, err); vsnprintf (debug_text, sizeof (debug_text), err, args); va_end (args); debug_out(debug_text); } void debug_out (const char *err) { FILE *file; char fn[MAX_FILENAME_LENGTH]; char buf[128]; if (DO_DEBUG == 1) { snprintf (fn, sizeof (fn), "%s/dspam.debug", LOGDIR); file = fopen (fn, "a"); if (file != NULL) { fprintf(file, "%ld: [%s] %s\n", (long) getpid(), format_date_r(buf), err); fclose(file); } } else if (DO_DEBUG == 2) { printf ("%ld: [%s] %s\n", (long) getpid (), format_date_r(buf), err); } return; } #endif char * format_date_r(char *buf) { struct tm *l; #ifdef HAVE_LOCALTIME_R struct tm lt; #endif time_t t = time(NULL); #ifdef HAVE_LOCALTIME_R l = localtime_r(&t, <); #else l = localtime(&t); #endif sprintf(buf, "%02d/%02d/%04d %02d:%02d:%02d", l->tm_mon+1, l->tm_mday, l->tm_year+1900, l->tm_hour, l->tm_min, l->tm_sec); return buf; } dspam-3.10.2+dfsg/src/bnr.c0000644000175000017500000002145011741351001014665 0ustar julienjulien/* $Id: bnr.c,v 1.32 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* * bnr.c - bayesian noise reduction - contextual symmetry logic * * http://bnr.nuclearelephant.com * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif #include #include #include #include "bnr.h" /* * bnr_init(): Create and initialize a new noise reduction context * parameters: type (int) BNR_CHAR: Token identifier as character arrays * BNR_INDEX: Token identifiers as pointers * identifier (char) An identifier to add to the pattern * name to identify the type of stream * * returns: pointer to the new context */ BNR_CTX *bnr_init(int type, char identifier) { BNR_CTX *BTX; BTX = calloc(1, sizeof(BNR_CTX)); if (BTX == NULL) { perror("memory allocation error: bnr_init() failed"); return NULL; } BTX->identifier = identifier; BTX->window_size = 3; BTX->ex_radius = 0.25; BTX->in_radius = 0.33; BTX->stream = bnr_list_create(type); BTX->patterns = bnr_hash_create(1543ul); if (BTX->stream == NULL || BTX->patterns == NULL) { perror("memory allocation error: bnr_init() failed"); bnr_list_destroy(BTX->stream); bnr_hash_destroy(BTX->patterns); free(BTX); return NULL; } return BTX; } /* * bnr_destroy(): Destroys a noise reduction context no longer being used * parameters: BTX (BNR_CTX *) The context to destroy * returns: 0 on success */ int bnr_destroy(BNR_CTX *BTX) { bnr_list_destroy(BTX->stream); bnr_hash_destroy(BTX->patterns); free(BTX); return 0; } /* * bnr_add(): Adds a token to the noise reduction stream. This function * should be called once for each token in the message body (in order). * * parameters: BTX (BNR_CTX *) The noise reduction context to use * token (void *) The token's name, or pointer if NT_INDEX * value (float) The token's probability * returns: 0 on success */ int bnr_add(BNR_CTX *BTX, void *token, float value) { return (bnr_list_insert(BTX->stream, token, value) != NULL) ? 0 : EFAILURE; } /* * bnr_instantiate(): Instantiates a series of patterns for the given stream. * This function should be called after all tokens are added to the stream. * * parameters: BTX (BNR_CTX *) The noise reduction context to use * returns: 0 on success */ int bnr_instantiate(BNR_CTX *BTX) { int BNR_SIZE = BTX->window_size; float previous_bnr_probs[BNR_SIZE]; struct bnr_list_node *node_list; struct bnr_list_c c_list; char bnr_token[64]; int i; for(i=0;istream, &c_list); while(node_list != NULL) { for(i=1;ivalue); sprintf(bnr_token, "bnr.%c|", BTX->identifier); for(i=0;ipatterns, bnr_token); node_list = c_bnr_list_next(BTX->stream, &c_list); } return 0; } /* * bnr_get_pattern(): Retrieves the next instantiated pattern. * This function should be called after a call to bnr_instantiate(). Each * call to bnr_get_pattern() will return the next instantiated pattern, which * should then be looked up by your classifier and assigned a value using * bnr_set_pattern(). * * parameters: BTX (BNR_CTX *) The noise reduction context to use * returns: The name of the next instantiated pattern in the context */ char *bnr_get_pattern(BNR_CTX *BTX) { struct bnr_hash_node *node; if (!BTX->pattern_iter) { node = c_bnr_hash_first(BTX->patterns, &BTX->c_pattern); BTX->pattern_iter = 1; } else { node = c_bnr_hash_next(BTX->patterns, &BTX->c_pattern); } if (node) return node->name; BTX->pattern_iter = 0; return NULL; } /* * bnr_set_pattern(): Sets the value of a pattern * This function should be called once for each pattern instantiated. The * name of the patterns can be retrieved using repeated calls to * bnr_get_pattern(). The value of the pattern should then be looked up by * the classifier and set in the context using this function. * * parameters: BTX (BNR_CTX *) The noise reduction context to use * name (const char *) The name of the pattern to set * value (float) The p-value of the pattern * returns: 0 on success */ int bnr_set_pattern(BNR_CTX *BTX, const char *name, float value) { return bnr_hash_set(BTX->patterns, name, value); } /* * bnr_get_token() Retrieves the next token from the stream. * This function should be called after a call to bnr_finalize(). Each * call to bnr_get_token() will return the next token and set its elimination * status (by way of the passed-in variable). * parameters: BTX (BNR_CTX *) The noise reduction context to use * returns: The name (or pointer) of the next non-eliminated token */ void *bnr_get_token(BNR_CTX *BTX, int *eliminated) { struct bnr_list_node *node; if (BTX->stream_iter == 0) { BTX->stream_iter = 1; node = c_bnr_list_first(BTX->stream, &BTX->c_stream); } else { node = c_bnr_list_next(BTX->stream, &BTX->c_stream); } if (node) { if (node->eliminated) *eliminated = 1; else *eliminated = 0; return node->ptr; } BTX->stream_iter = 0; return NULL; } /* * _bnr_round(): [internal] Round value to the nearest 0.05 * parameters: value (float) Value to be rounded * returns: Rounded value as a float */ float _bnr_round(float n) { int r = (n*100); while(r % 5) r++; return (r/100.0); } /* * bnr_finalize() Finalizes the noise reduction context and performs dubbing * This function should be called after all calls to bnr_set_pattern() have * completed. This function performs the actual noise reduction process * after which calls to bnr_get_token() may be called. * * parameters: BTX (BNR_CTX *) The noise reduction context to use * returns: 0 on success */ int bnr_finalize(BNR_CTX *BTX) { int BNR_SIZE = BTX->window_size; struct bnr_list_node * previous_bnr_tokens[BNR_SIZE]; float previous_bnr_probs[BNR_SIZE]; struct bnr_list_node *node_list; struct bnr_list_c c_list; char bnr_token[64]; int i, interesting; for(i=0;istream, &c_list); while(node_list != NULL) { float pattern_value; for(i=1;ivalue); previous_bnr_tokens[BNR_SIZE-1] = node_list; sprintf(bnr_token, "bnr.%c|", BTX->identifier); for(i=0;ipatterns, bnr_token); interesting = (fabs(0.5-pattern_value) > BTX->ex_radius); if (interesting) { #ifdef LIBBNR_VERBOSE_DEBUG fprintf(stderr, "Analyzing Pattern '%s' P-Value: %1.5f\n", bnr_token, pattern_value); #endif /* Eliminate inconsistent tokens */ for(i=0;ivalue - pattern_value) > BTX->in_radius) { #ifdef LIBBNR_VERBOSE_DEBUG fprintf(stderr, "\tEliminating '%s' P-Value: %1.5f\n", (const char *) previous_bnr_tokens[i]->ptr, previous_bnr_tokens[i]->value); #endif BTX->eliminations++; previous_bnr_tokens[i]->eliminated = 1; } } } } node_list = c_bnr_list_next(BTX->stream, &c_list); } return 0; } dspam-3.10.2+dfsg/src/dspamc.h0000644000175000017500000000165211741351001015362 0ustar julienjulien/* $Id: dspamc.h,v 1.8 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #include #ifndef _WIN32 #include #endif #ifdef HAVE_CONFIG_H #include #endif #ifndef _DSPAMC_H # define _DSPAMC_H #endif /* _DSPAMC_H */ dspam-3.10.2+dfsg/src/dspam.pc.in0000644000175000017500000000031711622570546016013 0ustar julienjulienprefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: DSPAM Description: DSPAM Anti-Spam Library Version: @VERSION@ Libs: -L${libdir} -ldspam Cflags: -I${includedir}/dspam dspam-3.10.2+dfsg/src/sqlite_drv.c0000644000175000017500000010664411741351001016271 0ustar julienjulien/* $Id: sqlite_drv.c,v 1.34 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #ifndef _WIN32 # include # include #endif #ifdef HAVE_UNISTD_H # include #endif #include #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "storage_driver.h" #include "sqlite_drv.h" #include "libdspam.h" #include "config.h" #include "error.h" #include "language.h" #include "util.h" #include "config_shared.h" #ifdef _WIN32 # include # include "dir_win32.h" #endif int dspam_init_driver (DRIVER_CTX *DTX) { return 0; } int dspam_shutdown_driver (DRIVER_CTX *DTX) { return 0; } int _sqlite_drv_get_spamtotals (DSPAM_CTX * CTX) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[1024]; char *err=NULL, **row; int nrow, ncolumn; int rc; if (s->dbh == NULL) { LOGDEBUG ("_sqlite_drv_get_spamtotals: invalid database handle (NULL)"); return EINVAL; } memset(&s->control_totals, 0, sizeof(struct _ds_spam_totals)); memset(&CTX->totals, 0, sizeof(struct _ds_spam_totals)); snprintf (query, sizeof (query), "select spam_learned, innocent_learned, " "spam_misclassified, innocent_misclassified, " "spam_corpusfed, innocent_corpusfed, " "spam_classified, innocent_classified " " from dspam_stats"); if ((sqlite_get_table(s->dbh, query, &row, &nrow, &ncolumn, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } if (nrow>0 && row != NULL) { CTX->totals.spam_learned = strtol (row[ncolumn], NULL, 0); CTX->totals.innocent_learned = strtol (row[ncolumn+1], NULL, 0); CTX->totals.spam_misclassified = strtol (row[ncolumn+2], NULL, 0); CTX->totals.innocent_misclassified = strtol (row[ncolumn+3], NULL, 0); CTX->totals.spam_corpusfed = strtol (row[ncolumn+4], NULL, 0); CTX->totals.innocent_corpusfed = strtol (row[ncolumn+5], NULL, 0); CTX->totals.spam_classified = strtol (row[ncolumn+6], NULL, 0); CTX->totals.innocent_classified = strtol (row[ncolumn+7], NULL, 0); rc = 0; } else { rc = EFAILURE; } sqlite_free_table(row); if ( !rc ) memcpy(&s->control_totals, &CTX->totals, sizeof(struct _ds_spam_totals)); return rc; } int _sqlite_drv_set_spamtotals (DSPAM_CTX * CTX) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[1024]; char *err=NULL; int result; if (s->dbh == NULL) { LOGDEBUG ("_sqlite_drv_set_spamtotals: invalid database handle (NULL)"); return EINVAL; } if (CTX->operating_mode == DSM_CLASSIFY) { _sqlite_drv_get_spamtotals (CTX); /* undo changes to in memory totals */ return 0; } /* dspam_stat_id insures only one stats record */ if (s->control_totals.innocent_learned == 0) { snprintf (query, sizeof (query), "insert into dspam_stats(dspam_stat_id, spam_learned, " "innocent_learned, spam_misclassified, innocent_misclassified, " "spam_corpusfed, innocent_corpusfed, " "spam_classified, innocent_classified) " "values(%d, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld)", 0, CTX->totals.spam_learned, CTX->totals.innocent_learned, CTX->totals.spam_misclassified, CTX->totals.innocent_misclassified, CTX->totals.spam_corpusfed, CTX->totals.innocent_corpusfed, CTX->totals.spam_classified, CTX->totals.innocent_classified); result = sqlite_exec(s->dbh, query, NULL, NULL, &err); } if (s->control_totals.innocent_learned != 0 || result != SQLITE_OK) { snprintf (query, sizeof (query), "update dspam_stats set spam_learned = spam_learned %s %d, " "innocent_learned = innocent_learned %s %d, " "spam_misclassified = spam_misclassified %s %d, " "innocent_misclassified = innocent_misclassified %s %d, " "spam_corpusfed = spam_corpusfed %s %d, " "innocent_corpusfed = innocent_corpusfed %s %d, " "spam_classified = spam_classified %s %d, " "innocent_classified = innocent_classified %s %d ", (CTX->totals.spam_learned > s->control_totals.spam_learned) ? "+" : "-", abs (CTX->totals.spam_learned - s->control_totals.spam_learned), (CTX->totals.innocent_learned > s->control_totals.innocent_learned) ? "+" : "-", abs (CTX->totals.innocent_learned - s->control_totals.innocent_learned), (CTX->totals.spam_misclassified > s->control_totals.spam_misclassified) ? "+" : "-", abs (CTX->totals.spam_misclassified - s->control_totals.spam_misclassified), (CTX->totals.innocent_misclassified > s->control_totals.innocent_misclassified) ? "+" : "-", abs (CTX->totals.innocent_misclassified - s->control_totals.innocent_misclassified), (CTX->totals.spam_corpusfed > s->control_totals.spam_corpusfed) ? "+" : "-", abs (CTX->totals.spam_corpusfed - s->control_totals.spam_corpusfed), (CTX->totals.innocent_corpusfed > s->control_totals.innocent_corpusfed) ? "+" : "-", abs (CTX->totals.innocent_corpusfed - s->control_totals.innocent_corpusfed), (CTX->totals.spam_classified > s->control_totals.spam_classified) ? "+" : "-", abs (CTX->totals.spam_classified - s->control_totals.spam_classified), (CTX->totals.innocent_classified > s->control_totals.innocent_classified) ? "+" : "-", abs (CTX->totals.innocent_classified - s->control_totals.innocent_classified)); if ((sqlite_exec(s->dbh, query, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } } return 0; } int _ds_getall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; buffer *query; ds_term_t ds_term; ds_cursor_t ds_c; char scratch[1024]; struct _ds_spam_stat stat; unsigned long long token = 0; char *err=NULL, **row; int nrow, ncolumn, get_one = 0, i; if (s->dbh == NULL) { LOGDEBUG ("_ds_getall_spamrecords: invalid database handle (NULL)"); return EINVAL; } stat.spam_hits = 0; stat.innocent_hits = 0; query = buffer_create (NULL); if (query == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } snprintf (scratch, sizeof (scratch), "select token, spam_hits, innocent_hits " "from dspam_token_data where token in("); buffer_cat (query, scratch); ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while(ds_term) { snprintf (scratch, sizeof (scratch), "'%" LLU_FMT_SPEC "'", ds_term->key); buffer_cat (query, scratch); ds_term->s.innocent_hits = 0; ds_term->s.spam_hits = 0; ds_term->s.probability = 0; ds_term->s.status &= ~TST_DISK; ds_term = ds_diction_next(ds_c); if (ds_term != NULL) buffer_cat (query, ","); get_one = 1; } ds_diction_close(ds_c); buffer_cat (query, ")"); #ifdef VERBOSE LOGDEBUG ("sqlite query length: %ld\n", query->used); _sqlite_drv_query_error (strdup("VERBOSE DEBUG (INFO ONLY - NOT AN ERROR)"), query->data); #endif if (!get_one) return 0; if ((sqlite_get_table(s->dbh, query->data, &row, &nrow, &ncolumn, &err)) !=SQLITE_OK) { _sqlite_drv_query_error (err, query->data); buffer_destroy(query); return EFAILURE; } if (nrow < 1) { sqlite_free_table(row); buffer_destroy(query); return 0; } if (row == NULL) return 0; stat.probability = 0; stat.status |= TST_DISK; for(i=1;i<=nrow;i++) { token = strtoull (row[(i*ncolumn)], NULL, 0); stat.spam_hits = strtol (row[1+(i*ncolumn)], NULL, 0); stat.innocent_hits = strtol (row[2+(i*ncolumn)], NULL, 0); if (stat.spam_hits < 0) stat.spam_hits = 0; if (stat.innocent_hits < 0) stat.innocent_hits = 0; ds_diction_addstat(diction, token, &stat); } sqlite_free_table(row); ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while(ds_term && !s->control_token) { if (ds_term->s.spam_hits && ds_term->s.innocent_hits) { s->control_token = ds_term->key; s->control_sh = ds_term->s.spam_hits; s->control_ih = ds_term->s.innocent_hits; } ds_term = ds_diction_next(ds_c); } ds_diction_close(ds_c); if (!s->control_token) { ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); s->control_token = ds_term->key; s->control_sh = ds_term->s.spam_hits; s->control_ih = ds_term->s.innocent_hits; ds_diction_close(ds_c); } buffer_destroy (query); return 0; } int _ds_setall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; struct _ds_spam_stat stat, stat2; ds_term_t ds_term; ds_cursor_t ds_c; buffer *query; char scratch[1024]; char *err=NULL; int update_one = 0; if (s->dbh == NULL) { LOGDEBUG ("_ds_setall_spamrecords: invalid database handle (NULL)"); return EINVAL; } if (CTX->operating_mode == DSM_CLASSIFY && (CTX->training_mode != DST_TOE || (diction->whitelist_token == 0 && (!(CTX->flags & DSF_NOISE))))) return 0; query = buffer_create (NULL); if (query == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } if (s->control_token == 0) { ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); if (ds_term == NULL) { stat.spam_hits = 0; stat.innocent_hits = 0; } else { stat.spam_hits = ds_term->s.spam_hits; stat.innocent_hits = ds_term->s.innocent_hits; } ds_diction_close(ds_c); } else { ds_diction_getstat(diction, s->control_token, &stat); } snprintf (scratch, sizeof (scratch), "update dspam_token_data set last_hit = date('now'), " "spam_hits = max(0, spam_hits %s %d), " "innocent_hits = max(0, innocent_hits %s %d) " "where token in(", (stat.spam_hits > s->control_sh) ? "+" : "-", abs (stat.spam_hits - s->control_sh), (stat.innocent_hits > s->control_ih) ? "+" : "-", abs (stat.innocent_hits - s->control_ih)); buffer_cat (query, scratch); ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while(ds_term) { int wrote_this = 0; if (CTX->training_mode == DST_TOE && CTX->classification == DSR_NONE && CTX->operating_mode == DSM_CLASSIFY && diction->whitelist_token != ds_term->key && (!ds_term->name || strncmp(ds_term->name, "bnr.", 4))) { ds_term = ds_diction_next(ds_c); continue; } if (!(ds_term->s.status & TST_DIRTY)) { ds_term = ds_diction_next(ds_c); continue; } ds_diction_getstat(diction, ds_term->key, &stat2); if (!(stat2.status & TST_DISK)) { char insert[1024]; snprintf(insert, sizeof (insert), "insert into dspam_token_data(token, spam_hits, " "innocent_hits, last_hit) values('%" LLU_FMT_SPEC "', %ld, %ld, " "date('now'))", ds_term->key, stat2.spam_hits > 0 ? (long) 1 : (long) 0, stat2.innocent_hits > 0 ? (long) 1 : (long) 0); if ((sqlite_exec(s->dbh, insert, NULL, NULL, &err)) != SQLITE_OK) { stat2.status |= TST_DISK; free(err); } } if ((stat2.status & TST_DISK)) { snprintf (scratch, sizeof (scratch), "'%" LLU_FMT_SPEC "'", ds_term->key); buffer_cat (query, scratch); update_one = 1; wrote_this = 1; ds_term->s.status |= TST_DISK; } ds_term = ds_diction_next(ds_c); if (ds_term && wrote_this) buffer_cat (query, ","); } ds_diction_close(ds_c); if (query->used && query->data[strlen (query->data) - 1] == ',') { query->used--; query->data[strlen (query->data) - 1] = 0; } buffer_cat (query, ")"); LOGDEBUG("Control: [%ld %ld] [%ld %ld]", s->control_sh, s->control_ih, stat.spam_hits, stat.innocent_hits); if (update_one) { if ((sqlite_exec(s->dbh, query->data, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query->data); buffer_destroy(query); return EFAILURE; } } buffer_destroy (query); return 0; } int _ds_get_spamrecord (DSPAM_CTX * CTX, unsigned long long token, struct _ds_spam_stat *stat) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[1024]; char *err=NULL, **row; int nrow, ncolumn; if (s->dbh == NULL) { LOGDEBUG ("_ds_get_spamrecord: invalid database handle (NULL)"); return EINVAL; } snprintf (query, sizeof (query), "select spam_hits, innocent_hits from dspam_token_data " "where token = '%" LLU_FMT_SPEC "' ", token); stat->probability = 0.0; stat->spam_hits = 0; stat->innocent_hits = 0; stat->status &= ~TST_DISK; if ((sqlite_get_table(s->dbh, query, &row, &nrow, &ncolumn, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } if (nrow < 1) sqlite_free_table(row); if (nrow < 1 || row == NULL) return 0; stat->spam_hits = strtol (row[0], NULL, 0); stat->innocent_hits = strtol (row[1], NULL, 0); stat->status |= TST_DISK; sqlite_free_table(row); return 0; } int _ds_set_spamrecord (DSPAM_CTX * CTX, unsigned long long token, struct _ds_spam_stat *stat) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[1024]; char *err=NULL; int result = 0; if (s->dbh == NULL) { LOGDEBUG ("_ds_set_spamrecord: invalid database handle (NULL)"); return EINVAL; } if (CTX->operating_mode == DSM_CLASSIFY) return 0; /* It's either not on disk or the caller isn't using stat.disk */ if (!(stat->status & TST_DISK)) { snprintf (query, sizeof (query), "insert into dspam_token_data(token, spam_hits, " "innocent_hits, last_hit)" " values('%" LLU_FMT_SPEC "', %ld, %ld, date('now'))", token, stat->spam_hits > 0 ? stat->spam_hits : 0, stat->innocent_hits > 0 ? stat->innocent_hits : 0); result = sqlite_exec(s->dbh, query, NULL, NULL, &err); } if ((stat->status & TST_DISK) || result) { /* insert failed; try updating instead */ snprintf (query, sizeof (query), "update dspam_token_data " "set spam_hits = %ld, " "innocent_hits = %ld " "where token = %" LLD_FMT_SPEC, stat->spam_hits > 0 ? stat->spam_hits : 0, stat->innocent_hits > 0 ? stat->innocent_hits : 0, token); if ((sqlite_exec(s->dbh, query, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } } return 0; } int _ds_init_storage (DSPAM_CTX * CTX, void *dbh) { struct _sqlite_drv_storage *s; FILE *file; char buff[1024]; char filename[MAX_FILENAME_LENGTH]; char *err=NULL; struct stat st; int noexist; buff[0] = 0; if (CTX == NULL) return EINVAL; if (!CTX->home) { LOG(LOG_ERR, ERR_AGENT_DSPAM_HOME); return EINVAL; } if (CTX->flags & DSF_MERGED) { LOG(LOG_ERR, ERR_DRV_NO_MERGED); return EINVAL; } /* don't init if we're already initted */ if (CTX->storage != NULL) { LOGDEBUG ("_ds_init_storage: storage already initialized"); return EINVAL; } s = malloc (sizeof (struct _sqlite_drv_storage)); if (s == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } s->dbh = NULL; s->control_token = 0; s->iter_token = NULL; s->iter_sig = NULL; s->control_token = 0; s->control_sh = 0; s->control_ih = 0; s->dbh_attached = (dbh) ? 1 : 0; if (CTX->group == NULL || CTX->group[0] == 0) _ds_userdir_path (filename, CTX->home, CTX->username, "sdb"); else _ds_userdir_path (filename, CTX->home, CTX->group, "sdb"); _ds_prepare_path_for (filename); noexist = stat(filename, &st); if (dbh) s->dbh = dbh; else s->dbh = sqlite_open(filename, 0660, &err); if (s->dbh == NULL) { free(s); LOGDEBUG ("_ds_init_storage: sqlite_open: unable to initialize database: %s", err); return EUNKNOWN; } /* Commit timeout of 20 minutes */ sqlite_busy_timeout(s->dbh, 1000 * 60 * 20); /* Create database objects */ if (noexist) { sqlite_exec(s->dbh, "create table dspam_token_data (token char(20) primary key, " "spam_hits int, innocent_hits int, last_hit date)", NULL, NULL, &err); sqlite_exec(s->dbh, "create index id_token_data_02 on dspam_token_data" "(innocent_hits)", NULL, NULL, &err); sqlite_exec(s->dbh, "create table dspam_signature_data (" "signature char(128) primary key, data blob, created_on date)", NULL, NULL, &err); sqlite_exec(s->dbh, "create table dspam_stats (dspam_stat_id int 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)", NULL, NULL, &err); } if (_ds_read_attribute(CTX->config->attributes, "SQLitePragma")) { char pragma[1024]; attribute_t t = _ds_find_attribute(CTX->config->attributes, "SQLitePragma"); while(t != NULL) { snprintf(pragma, sizeof(pragma), "PRAGMA %s", t->value); if ((sqlite_exec(s->dbh, pragma, NULL, NULL, &err))!=SQLITE_OK) { LOG(LOG_WARNING, "sqlite.pragma function error: %s: %s", err, pragma); _sqlite_drv_query_error (err, pragma); } t = t->next; } } else if (CTX->home) { snprintf(filename, MAX_FILENAME_LENGTH, "%s/sqlite.pragma", CTX->home); file = fopen(filename, "r"); if (file != NULL) { while((fgets(buff, sizeof(buff), file))!=NULL) { chomp(buff); if ((sqlite_exec(s->dbh, buff, NULL, NULL, &err))!=SQLITE_OK) { LOG(LOG_WARNING, "sqlite.pragma function error: %s: %s", err, buff); _sqlite_drv_query_error (err, buff); } } fclose(file); } } CTX->storage = s; s->dir_handles = nt_create (NT_INDEX); s->control_token = 0; s->control_ih = 0; s->control_sh = 0; /* get spam totals on successful init */ if (CTX->username != NULL) { if (_sqlite_drv_get_spamtotals (CTX)) { LOGDEBUG ("unable to load totals. using zero values."); } } else { memset (&CTX->totals, 0, sizeof (struct _ds_spam_totals)); memset (&s->control_totals, 0, sizeof (struct _ds_spam_totals)); } return 0; } int _ds_shutdown_storage (DSPAM_CTX * CTX) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; struct nt_node *node_nt; struct nt_c c_nt; if (s->dbh == NULL) { LOGDEBUG ("_ds_shutdown_storage: invalid database handle (NULL)"); return EINVAL; } node_nt = c_nt_first (s->dir_handles, &c_nt); while (node_nt != NULL) { DIR *dir; dir = (DIR *) node_nt->ptr; closedir (dir); node_nt = c_nt_next (s->dir_handles, &c_nt); } nt_destroy (s->dir_handles); /* Store spam totals on shutdown */ if (CTX->username != NULL && CTX->operating_mode != DSM_CLASSIFY) { _sqlite_drv_set_spamtotals (CTX); } if (!s->dbh_attached) sqlite_close(s->dbh); s->dbh = NULL; free(s); CTX->storage = NULL; return 0; } int _ds_create_signature_id (DSPAM_CTX * CTX, char *buf, size_t len) { char session[64]; char digit[6]; int pid, j; pid = getpid (); snprintf (session, sizeof (session), "%8lx%d", (long) time (NULL), pid); for (j = 0; j < 2; j++) { snprintf (digit, 6, "%d", rand ()); strlcat (session, digit, 64); } strlcpy (buf, session, len); return 0; } int _ds_get_signature (DSPAM_CTX * CTX, struct _ds_spam_signature *SIG, const char *signature) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; unsigned long length; unsigned char *mem; char query[128]; char *err=NULL, **row; int nrow, ncolumn; void *ptr; if (s->dbh == NULL) { LOGDEBUG ("_ds_get_signature: invalid database handle (NULL)"); return EINVAL; } snprintf (query, sizeof (query), "select data, length(data) " " from dspam_signature_data where signature = \"%s\"", signature); if ((sqlite_get_table(s->dbh, query, &row, &nrow, &ncolumn, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } if (nrow<1) sqlite_free_table(row); if (nrow<1 || row == NULL) return EFAILURE; length = strlen(row[ncolumn]); if (length == 0) { sqlite_free_table(row); return EFAILURE; } mem = malloc(length+1); if (mem == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); sqlite_free_table(row); return EUNKNOWN; } length = sqlite_decode_binary((unsigned char *) row[ncolumn], mem); if (length<=0) { LOG(LOG_ERR, "sqlite_decode_binary() failed with error %d", length); return EFAILURE; } ptr = realloc(mem, length); if (ptr) SIG->data = ptr; else { LOG(LOG_CRIT, ERR_MEM_ALLOC); SIG->data = mem; } SIG->length = length; sqlite_free_table(row); return 0; } int _ds_set_signature (DSPAM_CTX * CTX, struct _ds_spam_signature *SIG, const char *signature) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; unsigned long length; char *mem; char scratch[1024]; buffer *query; char *err=NULL; if (s->dbh == NULL) { LOGDEBUG ("_ds_set_signature; invalid database handle (NULL)"); return EINVAL; } query = buffer_create (NULL); if (query == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } mem = calloc (1, 2 + (257*SIG->length)/254); if (mem == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); buffer_destroy(query); return EUNKNOWN; } length = sqlite_encode_binary(SIG->data, SIG->length, (unsigned char *) mem); if (length<0) { LOG(LOG_ERR, "sqlite_encode_binary() failed on error %d", length); buffer_destroy(query); return EFAILURE; } snprintf (scratch, sizeof (scratch), "insert into dspam_signature_data(signature, created_on, data) " "values(\"%s\", date('now'), '", signature); buffer_cat (query, scratch); buffer_cat (query, mem); buffer_cat (query, "')"); if ((sqlite_exec(s->dbh, query->data, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query->data); buffer_destroy(query); free(mem); return EFAILURE; } free (mem); buffer_destroy(query); return 0; } int _ds_delete_signature (DSPAM_CTX * CTX, const char *signature) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[128]; char *err=NULL; if (s->dbh == NULL) { LOGDEBUG ("_ds_delete_signature: invalid database handle (NULL)"); return EINVAL; } snprintf (query, sizeof (query), "delete from dspam_signature_data where signature = \"%s\"", signature); if ((sqlite_exec(s->dbh, query, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } return 0; } int _ds_verify_signature (DSPAM_CTX * CTX, const char *signature) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[128]; char *err=NULL, **row; int nrow, ncolumn; if (s->dbh == NULL) { LOGDEBUG ("_ds_verify_signature: invalid database handle (NULL)"); return EINVAL; } snprintf (query, sizeof (query), "select signature from dspam_signature_data where signature = \"%s\"", signature); if ((sqlite_get_table(s->dbh, query, &row, &nrow, &ncolumn, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } sqlite_free_table(row); if (nrow<1) { return -1; } return 0; } char * _ds_get_nextuser (DSPAM_CTX * CTX) { static char user[MAX_FILENAME_LENGTH]; static char path[MAX_FILENAME_LENGTH]; struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; struct nt_node *node_nt, *prev; struct nt_c c_nt; char *x = NULL, *y; DIR *dir = NULL; struct dirent *entry; if (s->dir_handles->items == 0) { char filename[MAX_FILENAME_LENGTH]; snprintf(filename, MAX_FILENAME_LENGTH, "%s/data", CTX->home); dir = opendir (filename); if (dir == NULL) { LOG (LOG_WARNING, "unable to open directory '%s' for reading: %s", CTX->home, strerror (errno)); return NULL; } nt_add (s->dir_handles, (void *) dir); strlcpy (path, filename, sizeof (path)); } else { node_nt = c_nt_first (s->dir_handles, &c_nt); while (node_nt != NULL) { if (node_nt->next == NULL) dir = (DIR *) node_nt->ptr; node_nt = c_nt_next (s->dir_handles, &c_nt); } } while ((entry = readdir (dir)) != NULL) { struct stat st; char filename[MAX_FILENAME_LENGTH]; snprintf (filename, sizeof (filename), "%s/%s", path, entry->d_name); if (!strcmp (entry->d_name, ".") || !strcmp (entry->d_name, "..")) continue; if (stat (filename, &st)) { continue; } /* push a new directory */ if (st.st_mode & S_IFDIR) { DIR *ndir; ndir = opendir (filename); if (ndir == NULL) continue; strlcat (path, "/", sizeof (path)); strlcat (path, entry->d_name, sizeof (path)); nt_add (s->dir_handles, (void *) ndir); return _ds_get_nextuser (CTX); } else if (!strncmp (entry->d_name + strlen (entry->d_name) - 4, ".sdb", 4)) { strlcpy (user, entry->d_name, sizeof (user)); user[strlen (user) - 4] = 0; return user; } } /* pop current directory */ y = strchr (path, '/'); while (y != NULL) { x = y; y = strchr (x + 1, '/'); } if (x) x[0] = 0; /* pop directory handle from list */ node_nt = c_nt_first (s->dir_handles, &c_nt); prev = NULL; while (node_nt != NULL) { if (node_nt->next == NULL) { dir = (DIR *) node_nt->ptr; closedir (dir); if (prev != NULL) { prev->next = NULL; s->dir_handles->insert = NULL; } else s->dir_handles->first = NULL; free (node_nt); s->dir_handles->items--; break; } prev = node_nt; node_nt = c_nt_next (s->dir_handles, &c_nt); } if (s->dir_handles->items > 0) return _ds_get_nextuser (CTX); /* done */ user[0] = 0; return NULL; } struct _ds_storage_record * _ds_get_nexttoken (DSPAM_CTX * CTX) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; struct _ds_storage_record *st; char query[128]; char *err=NULL; const char **row, *query_tail=NULL; int ncolumn, x; if (s->dbh == NULL) { LOGDEBUG ("_ds_get_nexttoken: invalid database handle (NULL)"); return NULL; } st = calloc (1, sizeof (struct _ds_storage_record)); if (st == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return NULL; } if (s->iter_token == NULL) { snprintf (query, sizeof (query), "select token, spam_hits, innocent_hits, strftime('%%s', " "last_hit) from dspam_token_data"); if ((sqlite_compile(s->dbh, query, &query_tail, &s->iter_token, &err)) !=SQLITE_OK) { _sqlite_drv_query_error (err, query); free(st); return NULL; } } if ((x = sqlite_step(s->iter_token, &ncolumn, &row, NULL)) !=SQLITE_ROW) { if (x != SQLITE_DONE) { _sqlite_drv_query_error (err, query); s->iter_token = NULL; free(st); return NULL; } sqlite_finalize((struct sqlite_vm *) s->iter_token, &err); s->iter_token = NULL; free(st); return NULL; } st->token = strtoull (row[0], NULL, 0); st->spam_hits = strtol (row[1], NULL, 0); st->innocent_hits = strtol (row[2], NULL, 0); st->last_hit = (time_t) strtol (row[3], NULL, 0); return st; } struct _ds_storage_signature * _ds_get_nextsignature (DSPAM_CTX * CTX) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; struct _ds_storage_signature *st; unsigned long length; char query[128]; unsigned char *mem; char *err=NULL; const char **row, *query_tail=NULL; int ncolumn, x; if (s->dbh == NULL) { LOGDEBUG ("_ds_get_nextsignature: invalid database handle (NULL)"); return NULL; } st = calloc (1, sizeof (struct _ds_storage_signature)); if (st == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return NULL; } if (s->iter_sig == NULL) { snprintf (query, sizeof (query), "select data, signature, strftime('%%s', created_on), " "length(data) from dspam_signature_data"); if ((sqlite_compile(s->dbh, query, &query_tail, &s->iter_sig, &err)) !=SQLITE_OK) { _sqlite_drv_query_error (err, query); free(st); return NULL; } } if ((x = sqlite_step(s->iter_sig, &ncolumn, &row, NULL)) !=SQLITE_ROW) { if (x != SQLITE_DONE) { _sqlite_drv_query_error (err, query); s->iter_sig = NULL; free(st); return NULL; } sqlite_finalize((struct sqlite_vm *) s->iter_sig, &err); s->iter_sig = NULL; free(st); return NULL; } length = strtol(row[3], NULL, 0); if (length == 0) { free(st); return _ds_get_nextsignature(CTX); } mem = malloc (length+1); if (mem == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); sqlite_finalize(s->iter_sig, &err); s->iter_sig = NULL; free(st); return NULL; } length = sqlite_decode_binary((const unsigned char *) &row[ncolumn], mem); if (length<0) { LOG(LOG_ERR, "sqlite_decode_binary() failed with error %d", length); s->iter_sig = NULL; free(st); return NULL; } st->data = realloc(mem, length); strlcpy(st->signature, row[1], sizeof(st->signature)); st->length = length; st->created_on = (time_t) strtol(row[2], NULL, 0); return st; } void _sqlite_drv_query_error (const char *error, const char *query) { FILE *file; time_t tm = time (NULL); char ct[128]; char fn[MAX_FILENAME_LENGTH]; LOG (LOG_WARNING, "query error: %s: see sql.errors for more details", error); snprintf (fn, sizeof (fn), "%s/sql.errors", LOGDIR); snprintf (ct, sizeof (ct), "%s", ctime (&tm)); chomp (ct); file = fopen (fn, "a"); if (file == NULL) { LOG(LOG_ERR, ERR_IO_FILE_WRITE, fn, strerror (errno)); } else { fprintf (file, "[%s] %d: %s: %s\n", ct, (int) getpid (), error, query); fclose (file); } free((char *)error); return; } int _ds_del_spamrecord (DSPAM_CTX * CTX, unsigned long long token) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; char query[128]; char *err=NULL; if (s->dbh == NULL) { LOGDEBUG ("_ds_delete_signature: invalid database handle (NULL)"); return EINVAL; } snprintf (query, sizeof (query), "delete from dspam_token_data where token = \"%" LLU_FMT_SPEC "\"", token); if ((sqlite_exec(s->dbh, query, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query); return EFAILURE; } return 0; } int _ds_delall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; ds_term_t ds_term; ds_cursor_t ds_c; buffer *query; char *err=NULL; char scratch[1024]; char queryhead[1024]; int writes = 0; if (diction->items < 1) return 0; if (s->dbh == NULL) { LOGDEBUG ("_ds_delall_spamrecords: invalid database handle (NULL)"); return EINVAL; } query = buffer_create (NULL); if (query == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } snprintf (queryhead, sizeof(queryhead), "delete from dspam_token_data " "where token in("); buffer_cat (query, queryhead); ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while (ds_term) { snprintf (scratch, sizeof (scratch), "'%" LLU_FMT_SPEC "'", ds_term->key); buffer_cat (query, scratch); ds_term = ds_diction_next(ds_c); if (writes > 2500 || ds_term == NULL) { buffer_cat (query, ")"); if ((sqlite_exec(s->dbh, query->data, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query->data); buffer_destroy(query); return EFAILURE; } buffer_copy(query, queryhead); writes = 0; } else { writes++; if (ds_term) buffer_cat (query, ","); } } ds_diction_close(ds_c); if (writes) { buffer_cat (query, ")"); if ((sqlite_exec(s->dbh, query->data, NULL, NULL, &err))!=SQLITE_OK) { _sqlite_drv_query_error (err, query->data); buffer_destroy(query); return EFAILURE; } } buffer_destroy (query); return 0; } void *_ds_connect (DSPAM_CTX *CTX) { return NULL; } /* Preference Stubs for Flat-File */ agent_pref_t _ds_pref_load(config_t config, const char *user, const char *home, void *dbh) { return _ds_ff_pref_load(config, user, home, dbh); } int _ds_pref_set(config_t config, const char *user, const char *home, const char *attrib, const char *value, void *dbh) { return _ds_ff_pref_set(config, user, home, attrib, value, dbh); } int _ds_pref_del(config_t config, const char *user, const char *home, const char *attrib, void *dbh) { return _ds_ff_pref_del(config, user, home, attrib, dbh); } dspam-3.10.2+dfsg/src/tokenizer.c0000644000175000017500000005652611741351001016132 0ustar julienjulien/* $Id: tokenizer.c,v 1.301 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* * tokenizer.c - tokenizer functions * * DESCRIPTION * The tokenizer subroutines are responsible for decomposing a message into * its colloquial components. All components are stored collectively in * a diction object, passed into the function. * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "config.h" #include "tokenizer.h" #include "util.h" #include "libdspam.h" #include "language.h" /* * _ds_tokenize() - tokenize the message * * DESCRIPTION * tokenizes the supplied message * * INPUT ARGUMENTS * DSPAM_CTX *CTX pointer to context * char *header pointer to message header * char *body pointer to message body * ds_diction_t diction to store components * * RETURN VALUES * standard errors on failure * zero if successful * */ int _ds_tokenize (DSPAM_CTX * CTX, char *headers, char *body, ds_diction_t diction) { if (diction == NULL) return EINVAL; if (CTX->tokenizer == DSZ_SBPH || CTX->tokenizer == DSZ_OSB) return _ds_tokenize_sparse(CTX, headers, body, diction); else return _ds_tokenize_ngram(CTX, headers, body, diction); } int _ds_tokenize_ngram( DSPAM_CTX *CTX, char *headers, char *body, ds_diction_t diction) { char *token; /* current token */ char *previous_token = NULL; /* used for bigrams (chained tokens) */ char *line = NULL; /* header broken up into lines */ char *ptrptr; char heading[128]; /* current heading */ int l, tokenizer = CTX->tokenizer; struct nt *header = NULL; struct nt_node *node_nt; struct nt_c c_nt; /* Tokenize URLs in message */ if (_ds_match_attribute(CTX->config->attributes, "ProcessorURLContext", "on")) { _ds_url_tokenize(diction, body, "http://"); _ds_url_tokenize(diction, body, "www."); _ds_url_tokenize(diction, body, "href="); } /* * Header Tokenization */ header = nt_create (NT_CHAR); if (header == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } line = strtok_r (headers, "\n", &ptrptr); while (line) { nt_add (header, line); line = strtok_r (NULL, "\n", &ptrptr); } node_nt = c_nt_first (header, &c_nt); heading[0] = 0; while (node_nt) { int multiline; #ifdef VERBOSE LOGDEBUG("processing line: %s", node_nt->ptr); #endif line = node_nt->ptr; token = strtok_r (line, ":", &ptrptr); if (token && token[0] != 32 && token[0] != 9 && !strstr (token, " ")) { multiline = 0; strlcpy (heading, token, 128); previous_token = NULL; } else { multiline = 1; } #ifdef VERBOSE LOGDEBUG ("Reading '%s' header from: '%s'", heading, line); #endif if (CTX->flags & DSF_WHITELIST) { /* Use the entire From: line for auto-whitelisting */ if (!strcmp(heading, "From")) { char wl[256]; char *fromline = line + 5; unsigned long long whitelist_token; if (fromline[0] == 32) fromline++; snprintf(wl, sizeof(wl), "%s*%s", heading, fromline); whitelist_token = _ds_getcrc64(wl); ds_diction_touch(diction, whitelist_token, wl, 0); diction->whitelist_token = whitelist_token; } } /* Received headers use a different set of delimiters to preserve things like ip addresses */ token = strtok_r ((multiline) ? line : NULL, DELIMITERS_HEADING, &ptrptr); while (token) { l = strlen(token); if (l >= 1 && l < 50) { #ifdef VERBOSE LOGDEBUG ("Processing '%s' token in '%s' header", token, heading); #endif /* Process "current" token */ if (!_ds_process_header_token (CTX, token, previous_token, diction, heading) && (tokenizer == DSZ_CHAIN)) { previous_token = token; } } token = strtok_r (NULL, DELIMITERS_HEADING, &ptrptr); } previous_token = NULL; node_nt = c_nt_next (header, &c_nt); } nt_destroy (header); /* * Body Tokenization */ #ifdef VERBOSE LOGDEBUG("parsing message body"); #endif token = strtok_r (body, DELIMITERS, &ptrptr); while (token != NULL) { l = strlen (token); if (l >= 1 && l < 50) { #ifdef VERBOSE LOGDEBUG ("Processing body token '%s'", token); #endif /* Process "current" token */ if ( !_ds_process_body_token(CTX, token, previous_token, diction) && tokenizer == DSZ_CHAIN) { previous_token = token; } } token = strtok_r (NULL, DELIMITERS, &ptrptr); } #ifdef VERBOSE LOGDEBUG("Finished tokenizing (ngram) message"); #endif /* Final token reassembly (anything left in the buffer) */ return 0; } int _ds_tokenize_sparse( DSPAM_CTX *CTX, char *headers, char *body, ds_diction_t diction) { int i; char *token; /* current token */ char *previous_tokens[SPARSE_WINDOW_SIZE]; /* sparse chain */ char *line = NULL; /* header broken up into lines */ char *ptrptr; char *bitpattern; char heading[128]; /* current heading */ int l; struct nt *header = NULL; struct nt_node *node_nt; struct nt_c c_nt; for(i=0;iconfig->attributes, "ProcessorURLContext", "on")) { _ds_url_tokenize(diction, body, "http://"); _ds_url_tokenize(diction, body, "www."); _ds_url_tokenize(diction, body, "href="); } /* * Header Tokenization */ header = nt_create (NT_CHAR); if (header == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); free(bitpattern); return EUNKNOWN; } line = strtok_r (headers, "\n", &ptrptr); while (line) { nt_add (header, line); line = strtok_r (NULL, "\n", &ptrptr); } node_nt = c_nt_first (header, &c_nt); heading[0] = 0; while (node_nt) { int multiline; #ifdef VERBOSE LOGDEBUG("processing line: %s", node_nt->ptr); #endif _ds_sparse_clear(previous_tokens); line = node_nt->ptr; token = strtok_r (line, ":", &ptrptr); if (token && token[0] != 32 && token[0] != 9 && !strstr (token, " ")) { multiline = 0; strlcpy (heading, token, 128); _ds_sparse_clear(previous_tokens); } else { multiline = 1; } #ifdef VERBOSE LOGDEBUG ("Reading '%s' header from: '%s'", heading, line); #endif if (CTX->flags & DSF_WHITELIST) { /* Use the entire From: line for auto-whitelisting */ if (!strcmp(heading, "From")) { char wl[256]; char *fromline = line + 5; unsigned long long whitelist_token; if (fromline[0] == 32) fromline++; snprintf(wl, sizeof(wl), "%s*%s", heading, fromline); whitelist_token = _ds_getcrc64(wl); ds_diction_touch(diction, whitelist_token, wl, 0); diction->whitelist_token = whitelist_token; } } /* Received headers use a different set of delimiters to preserve things like ip addresses */ token = strtok_r ((multiline) ? line : NULL, SPARSE_DELIMITERS_HEADING, &ptrptr); while (token) { l = strlen(token); if (l > 0 && l < 50) { #ifdef VERBOSE LOGDEBUG ("Processing '%s' token in '%s' header", token, heading); #endif _ds_map_header_token (CTX, token, previous_tokens, diction, heading, bitpattern); } token = strtok_r (NULL, SPARSE_DELIMITERS_HEADING, &ptrptr); } for(i=0;i 0 && l < 50) { #ifdef VERBOSE LOGDEBUG ("Processing body token '%s'", token); #endif /* Process "current" token */ _ds_map_body_token (CTX, token, previous_tokens, diction, bitpattern); } token = strtok_r (NULL, SPARSE_DELIMITERS, &ptrptr); } for(i=0;iconfig->attributes, "IgnoreHeader", heading)) return 0; if (!strncmp(heading, "X-DSPAM-", 8)) return 0; /* This is where we used to ignore certain headings */ if (heading[0] != 0) snprintf (combined_token, sizeof (combined_token), "%s*%s", heading, token); else strlcpy (combined_token, token, sizeof (combined_token)); tweaked_token = _ds_truncate_token(token); if (tweaked_token == NULL) return EUNKNOWN; snprintf(combined_token, sizeof(combined_token), "%s*%s", heading, tweaked_token); crc = _ds_getcrc64 (combined_token); #ifdef VERBOSE LOGDEBUG ("Token Hit: '%s'", combined_token); #endif ds_diction_touch(diction, crc, combined_token, 0); if (CTX->tokenizer == DSZ_CHAIN && previous_token != NULL) { char *tweaked_previous; tweaked_previous = _ds_truncate_token(previous_token); if (tweaked_previous == NULL) { free(tweaked_token); return EUNKNOWN; } snprintf (combined_token, sizeof (combined_token), "%s*%s+%s", heading, tweaked_previous, tweaked_token); crc = _ds_getcrc64 (combined_token); ds_diction_touch(diction, crc, combined_token, DSD_CHAINED); free(tweaked_previous); } free(tweaked_token); return 0; } int _ds_process_body_token (DSPAM_CTX * CTX, char *token, const char *previous_token, ds_diction_t diction) { char combined_token[256]; unsigned long long crc; char *tweaked_token; tweaked_token = _ds_truncate_token(token); if (tweaked_token == NULL) return EUNKNOWN; crc = _ds_getcrc64 (tweaked_token); ds_diction_touch(diction, crc, tweaked_token, DSD_CONTEXT); if (CTX->tokenizer == DSZ_CHAIN && previous_token != NULL) { char *tweaked_previous = _ds_truncate_token(previous_token); if (tweaked_previous == NULL) { free(tweaked_token); return EUNKNOWN; } snprintf (combined_token, sizeof (combined_token), "%s+%s", tweaked_previous, tweaked_token); crc = _ds_getcrc64 (combined_token); ds_diction_touch(diction, crc, combined_token, DSD_CHAINED | DSD_CONTEXT); free(tweaked_previous); } free(tweaked_token); return 0; } int _ds_map_header_token (DSPAM_CTX * CTX, char *token, char **previous_tokens, ds_diction_t diction, const char *heading, const char *bitpattern) { int i, t, keylen, breadth; u_int32_t mask; unsigned long long crc; char key[256]; int active = 0, top, tokenizer = CTX->tokenizer; if (_ds_match_attribute(CTX->config->attributes, "IgnoreHeader", heading)) return 0; if (!strncmp(heading, "X-DSPAM-", 8)) return 0; /* Shift all previous tokens up */ for(i=0;i2 && !strcmp((key+keylen)-2, "+#")) { key[keylen-2] = 0; keylen -=2; } while(!strncmp(k, "#+", 2)) { top = 0; k+=2; keylen -= 2; } if (top) { snprintf(hkey, sizeof(hkey), "%s*%s", heading, k); crc = _ds_getcrc64(hkey); ds_diction_touch(diction, crc, hkey, DSD_CONTEXT); } } } return 0; } int _ds_map_body_token ( DSPAM_CTX * CTX, char *token, char **previous_tokens, ds_diction_t diction, const char *bitpattern) { int i, t, keylen, breadth; int top, tokenizer = CTX->tokenizer; unsigned long long crc; char key[256]; int active = 0; u_int32_t mask; /* Shift all previous tokens up */ for(i=0;i2 && !strcmp((key+keylen)-2, "+#")) { key[keylen-2] = 0; keylen -=2; } while(!strncmp(k, "#+", 2)) { top = 0; k+=2; keylen -=2; } if (top) { crc = _ds_getcrc64(k); ds_diction_touch(diction, crc, k, DSD_CONTEXT); } } } return 0; } /* * _ds_degenerate_message() * * DESCRIPTION * Degenerate the message into headers, body and tokenizable pieces * * This function is responsible for analyzing the actualized message and * degenerating it into only the components which are tokenizable. This * process effectively eliminates much HTML noise, special symbols, or * other non-tokenizable/non-desirable components. What is left is the * bulk of the message and only desired tags, URLs, and other data. * * INPUT ARGUMENTS * header pointer to buffer containing headers * body pointer to buffer containing message body */ int _ds_degenerate_message(DSPAM_CTX *CTX, buffer * header, buffer * body) { char *decode = NULL; struct nt_node *node_nt, *node_header; struct nt_c c_nt, c_nt2; int i = 0; char heading[1024]; if (! CTX->message) { LOG (LOG_WARNING, "_ds_degenerate_message() failed: CTX->message is NULL"); return EUNKNOWN; } /* Iterate through each component and create large header/body buffers */ node_nt = c_nt_first (CTX->message->components, &c_nt); while (node_nt != NULL) { struct _ds_message_part *block = (struct _ds_message_part *) node_nt->ptr; #ifdef VERBOSE LOGDEBUG ("Processing component %d", i); #endif if (! block->headers || ! block->headers->items) { #ifdef VERBOSE LOGDEBUG (" : End of Message Identifier"); #endif } else { struct _ds_header_field *current_header; /* Accumulate the headers */ node_header = c_nt_first (block->headers, &c_nt2); while (node_header != NULL) { current_header = (struct _ds_header_field *) node_header->ptr; snprintf (heading, sizeof (heading), "%s: %s\n", current_header->heading, current_header->data); buffer_cat (header, heading); node_header = c_nt_next (block->headers, &c_nt2); } decode = block->body->data; if (block->media_type == MT_TEXT || block->media_type == MT_MESSAGE || block->media_type == MT_UNKNOWN || (block->media_type == MT_MULTIPART && !i)) { /* Accumulate the bodies, skip attachments */ if ( ( block->encoding == EN_BASE64 || block->encoding == EN_QUOTED_PRINTABLE) && ! block->original_signed_body) { if (block->content_disposition != PCD_ATTACHMENT) { LOGDEBUG ("decoding message block from encoding type %d", block->encoding); decode = _ds_decode_block (block); } } /* We found a tokenizable body component, add prefilters */ if (decode) { char *decode2 = NULL; char *decode3 = NULL; /* -- PREFILTERS BEGIN -- */ /* Hexadecimal 8-Bit Encodings */ if (block->encoding == EN_8BIT) { decode2 = _ds_decode_hex8bit(decode); } else { decode2 = strdup(decode); } /* HTML-Specific Filters */ if (decode2) { if (block->media_subtype == MST_HTML) { decode3 = _ds_strip_html(decode2); } else { decode3 = strdup(decode2); } free(decode2); } /* -- PREFILTERS END -- */ if (decode3) { buffer_cat (body, decode3); free(decode3); } /* If we've decoded the body, save the original copy */ if (decode != block->body->data) { block->original_signed_body = block->body; block->body = buffer_create (decode); free (decode); } } } } #ifdef VERBOSE LOGDEBUG ("Getting next message component"); #endif node_nt = c_nt_next (CTX->message->components, &c_nt); i++; } /* while (node_nt != NULL) */ if (header->data == NULL) buffer_cat (header, " "); if (body->data == NULL) buffer_cat (body, " "); return 0; } int _ds_url_tokenize(ds_diction_t diction, char *body, const char *key) { char *token, *url_ptr, *url_token, *ptr; char combined_token[256]; unsigned long long crc; int key_len = strlen(key); #ifdef VERBOSE LOGDEBUG("scanning for urls: %s\n", key); #endif if (!body) return EINVAL; url_ptr = body; token = strcasestr(url_ptr, key); while (token != NULL) { int i = 0, old; while(token[i] && token[i] > 32 && token[i] != '>' && ((token[i] != '\"' && token[i] != '\'') || i <= key_len)) i++; old = token[i]; token[i] = 0; /* parse in place */ /* Tokenize URL */ url_token = strtok_r (token, DELIMITERS, &ptr); while (url_token != NULL) { snprintf (combined_token, sizeof (combined_token), "Url*%s", url_token); crc = _ds_getcrc64 (combined_token); ds_diction_touch(diction, crc, combined_token, 0); url_token = strtok_r (NULL, DELIMITERS, &ptr); } memset (token, 32, i); token[i] = old; url_ptr = token + i; token = strcasestr(url_ptr, key); } return 0; } /* Truncate tokens with EOT delimiters */ char * _ds_truncate_token(const char *token) { char *tweaked; int i; if (token == NULL) return NULL; tweaked = strdup(token); if (tweaked == NULL) return NULL; i = strlen(tweaked); while(i>1 && strspn(tweaked+i-2, DELIMITERS_EOT)) { tweaked[i-1] = 0; i--; } return tweaked; } /* * _ds_spbh_clear * * DESCRIPTION * Clears the SBPH stack * * Clears and frees all of the tokens in the SBPH stack. Used when a * boundary has been crossed (such as a new message header) where * tokens from the previous boundary are no longer useful. */ void _ds_sparse_clear(char **previous_tokens) { int i; for(i=0;i. */ /* * hash_drv.c - hash-based storage driver * mmap'd flat-file storage for fast storage * inspired by crm114 sparse spectra algorithm * * DESCRIPTION * This driver uses a random access file for storage. It is exceptionally fast * and does not require any third-party dependencies. The auto-extend * functionality allows the file to grow as needed. */ #define READ_ATTRIB(A) _ds_read_attribute(CTX->config->attributes, A) #define MATCH_ATTRIB(A, B) _ds_match_attribute(CTX->config->attributes, A, B) #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "storage_driver.h" #include "config_shared.h" #include "hash_drv.h" #include "libdspam.h" #include "config.h" #include "error.h" #include "language.h" #include "util.h" int dspam_init_driver (DRIVER_CTX *DTX) { DSPAM_CTX *CTX; char *HashConcurrentUser; #ifdef DAEMON unsigned long connection_cache = 1; #endif if (DTX == NULL) return 0; CTX = DTX->CTX; HashConcurrentUser = READ_ATTRIB("HashConcurrentUser"); #ifdef DAEMON /* * Stateful concurrent hash databases are preloaded into memory and * shared using a reader-writer lock. At the present moment, only a single * user can be loaded into any instance of the daemon, so it is only useful * if you are running with a system-wide filtering user. */ if (DTX->flags & DRF_STATEFUL) { char filename[MAX_FILENAME_LENGTH]; hash_drv_map_t map; unsigned long hash_rec_max = HASH_REC_MAX; unsigned long max_seek = HASH_SEEK_MAX; unsigned long max_extents = 0; unsigned long extent_size = HASH_EXTENT_MAX; int pctincrease = 0; int flags = HMAP_AUTOEXTEND; int ret; unsigned long i; if (READ_ATTRIB("HashConnectionCache") && !HashConcurrentUser) connection_cache = strtol(READ_ATTRIB("HashConnectionCache"), NULL, 0); DTX->connection_cache = connection_cache; if (READ_ATTRIB("HashRecMax")) hash_rec_max = strtol(READ_ATTRIB("HashRecMax"), NULL, 0); if (READ_ATTRIB("HashExtentSize")) extent_size = strtol(READ_ATTRIB("HashExtentSize"), NULL, 0); if (READ_ATTRIB("HashMaxExtents")) max_extents = strtol(READ_ATTRIB("HashMaxExtents"), NULL, 0); if (!MATCH_ATTRIB("HashAutoExtend", "on")) flags = 0; if (READ_ATTRIB("HashPctIncrease")) { pctincrease = atoi(READ_ATTRIB("HashPctIncrease")); if (pctincrease > 100) { LOG(LOG_ERR, "HashPctIncrease out of range; ignoring"); pctincrease = 0; } } if (READ_ATTRIB("HashMaxSeek")) max_seek = strtol(READ_ATTRIB("HashMaxSeek"), NULL, 0); /* Connection array (just one single connection for hash_drv) */ DTX->connections = calloc(1, sizeof(struct _ds_drv_connection *) * connection_cache); if (DTX->connections == NULL) goto memerr; /* Initialize Connections */ for(i=0;iconnections[i] = calloc(1, sizeof(struct _ds_drv_connection)); if (DTX->connections[i] == NULL) goto memerr; /* Our connection's storage structure */ if (HashConcurrentUser) { DTX->connections[i]->dbh = calloc(1, sizeof(struct _hash_drv_map)); if (DTX->connections[i]->dbh == NULL) goto memerr; pthread_rwlock_init(&DTX->connections[i]->rwlock, NULL); } else { DTX->connections[i]->dbh = NULL; pthread_mutex_init(&DTX->connections[i]->lock, NULL); } } /* Load concurrent database into resident memory */ if (HashConcurrentUser) { map = (hash_drv_map_t) DTX->connections[0]->dbh; /* Tell the server our connection lock will be reader/writer based */ if (!(DTX->flags & DRF_RWLOCK)) DTX->flags |= DRF_RWLOCK; _ds_userdir_path(filename, DTX->CTX->home, HashConcurrentUser, "css"); _ds_prepare_path_for(filename); LOGDEBUG("preloading %s into memory via mmap()", filename); ret = _hash_drv_open(filename, map, hash_rec_max, max_seek, max_extents, extent_size, pctincrease, flags); if (ret) { LOG(LOG_CRIT, "_hash_drv_open(%s) failed on error %d: %s", filename, ret, strerror(errno)); free(DTX->connections[0]->dbh); free(DTX->connections[0]); free(DTX->connections); return EFAILURE; } } } #endif return 0; #ifdef DAEMON memerr: if (DTX) { if (DTX->connections) { unsigned long i; for(i=0;iconnections[i]) free(DTX->connections[i]->dbh); free(DTX->connections[i]); } } free(DTX->connections); } LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; #endif } int dspam_shutdown_driver (DRIVER_CTX *DTX) { #ifdef DAEMON DSPAM_CTX *CTX; if (DTX && DTX->CTX) { char *HashConcurrentUser; CTX = DTX->CTX; HashConcurrentUser = READ_ATTRIB("HashConcurrentUser"); if (DTX->flags & DRF_STATEFUL) { int connection_cache = 1; if (READ_ATTRIB("HashConnectionCache") && !HashConcurrentUser) connection_cache = strtol(READ_ATTRIB("HashConnectionCache"), NULL, 0); LOGDEBUG("unloading hash database from memory"); if (DTX->connections) { int i; for(i=0;iconnections[i]) { if (!HashConcurrentUser) { pthread_mutex_destroy(&DTX->connections[i]->lock); } else { pthread_rwlock_destroy(&DTX->connections[i]->rwlock); hash_drv_map_t map = (hash_drv_map_t) DTX->connections[i]->dbh; if (map) _hash_drv_close(map); } free(DTX->connections[i]->dbh); free(DTX->connections[i]); } } free(DTX->connections); } } } #endif return 0; } int _hash_drv_lock_get ( DSPAM_CTX *CTX, struct _hash_drv_storage *s, const char *username) { char filename[MAX_FILENAME_LENGTH]; int r; _ds_userdir_path(filename, CTX->home, username, "lock"); _ds_prepare_path_for(filename); s->lock = fopen(filename, "a"); if (s->lock == NULL) { LOG(LOG_ERR, ERR_IO_FILE_WRITE, filename, strerror(errno)); return EFAILURE; } r = _ds_get_fcntl_lock(fileno(s->lock)); if (r) { fclose(s->lock); LOG(LOG_ERR, ERR_IO_LOCK, filename, r, strerror(errno)); } return r; } int _hash_drv_lock_free ( struct _hash_drv_storage *s, const char *username) { int r; if (username == NULL) return 0; r = _ds_free_fcntl_lock(fileno(s->lock)); if (!r) { fclose(s->lock); } else { LOG(LOG_ERR, ERR_IO_LOCK_FREE, username, r, strerror(errno)); } return r; } FILE* _hash_tools_lock_get (const char *cssfilename) { char filename[MAX_FILENAME_LENGTH]; char *pPeriod; int r; FILE* lockfile = NULL; if (cssfilename == NULL) return NULL; pPeriod = strrchr(cssfilename, '.'); if (pPeriod == NULL || strcmp(pPeriod + 1, "css") || (size_t)(pPeriod - cssfilename + 5) >= sizeof(filename)) return NULL; strncpy(filename, cssfilename, pPeriod - cssfilename + 1); strcpy(filename + (pPeriod - cssfilename + 1), "lock"); _ds_prepare_path_for(filename); lockfile = fopen(filename, "a"); if (lockfile == NULL) { LOG(LOG_ERR, ERR_IO_FILE_OPEN, filename, strerror(errno)); return NULL; } r = _ds_get_fcntl_lock(fileno(lockfile)); if (r) { fclose(lockfile); lockfile = NULL; LOG(LOG_ERR, ERR_IO_LOCK, filename, r, strerror(errno)); } return lockfile; } int _hash_tools_lock_free ( const char *cssfilename, FILE* lockfile) { int r; if (cssfilename == NULL || lockfile == NULL) return 0; r = _ds_free_fcntl_lock(fileno(lockfile)); if (!r) { fclose(lockfile); } else { LOG(LOG_ERR, ERR_IO_LOCK_FREE, cssfilename, r, strerror(errno)); } return r; } int _hash_drv_open( const char *filename, hash_drv_map_t map, unsigned long recmaxifnew, unsigned long max_seek, unsigned long max_extents, unsigned long extent_size, int pctincrease, int flags) { struct _hash_drv_header header; int open_flags = O_RDWR; int mmap_flags = PROT_READ + PROT_WRITE; FILE *f; map->fd = open(filename, open_flags); /* * Create a new hash database if desired. The record count written in the * first segment will be recmaxifnew. Once the file is created, it's then * mmap()'d into memory as usual. */ if (map->fd < 0 && recmaxifnew) { struct _hash_drv_spam_record rec; unsigned long i; memset(&header, 0, sizeof(struct _hash_drv_header)); memset(&rec, 0, sizeof(struct _hash_drv_spam_record)); header.hash_rec_max = recmaxifnew; f = fopen(filename, "w"); if (!f) { LOG(LOG_ERR, ERR_IO_FILE_WRITE, filename, strerror(errno)); return EFILE; } if(fwrite(&header, sizeof(struct _hash_drv_header), 1, f)!=1) goto WRITE_ERROR; for(i=0;ifd = open(filename, open_flags); } if (map->fd < 0) { LOG(LOG_ERR, ERR_IO_FILE_WRITE, filename, strerror(errno)); return EFILE; } map->header = malloc(sizeof(struct _hash_drv_header)); if (map->header == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); close(map->fd); map->addr = 0; return EFAILURE; } if (read(map->fd, map->header, sizeof(struct _hash_drv_header)) != sizeof(struct _hash_drv_header)) { free(map->header); close(map->fd); return EFAILURE; } map->file_len = lseek(map->fd, 0, SEEK_END); map->addr = mmap(NULL, map->file_len, mmap_flags, MAP_SHARED, map->fd, 0); if (map->addr == MAP_FAILED) { free(map->header); close(map->fd); map->addr = 0; return EFAILURE; } strlcpy(map->filename, filename, MAX_FILENAME_LENGTH); map->max_seek = max_seek; map->max_extents = max_extents; map->extent_size = extent_size; map->pctincrease = pctincrease; map->flags = flags; return 0; WRITE_ERROR: fclose(f); unlink(filename); LOG(LOG_ERR, ERR_IO_FILE_WRITING, filename, strerror(errno)); return EFILE; } int _hash_drv_close(hash_drv_map_t map) { struct _hash_drv_header header; int r; if (!map->addr) return EINVAL; memcpy(&header, map->header, sizeof(struct _hash_drv_header)); r = munmap(map->addr, map->file_len); if (r) { LOG(LOG_WARNING, "munmap failed on error %d: %s", r, strerror(errno)); } lseek (map->fd, 0, SEEK_SET); r = write (map->fd, &header, sizeof(struct _hash_drv_header)); if (r < 0) { LOG(LOG_WARNING, "write failed on error %d: %s", r, strerror(errno)); } close(map->fd); map->addr = 0; free(map->header); return r; } int _ds_init_storage (DSPAM_CTX * CTX, void *dbh) { struct _hash_drv_storage *s = NULL; hash_drv_map_t map = NULL; if (CTX == NULL) return EINVAL; if (!CTX->home) { LOG(LOG_ERR, ERR_AGENT_DSPAM_HOME); return EINVAL; } if (CTX->flags & DSF_MERGED) { LOG(LOG_ERR, ERR_DRV_NO_MERGED); return EINVAL; } if (CTX->storage) return EINVAL; /* Persistent driver storage */ s = calloc (1, sizeof (struct _hash_drv_storage)); if (s == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } /* If running in HashConcurrentUser mode, use existing hash mapping */ if (dbh) { map = dbh; s->dbh_attached = 1; } else { map = calloc(1, sizeof(struct _hash_drv_map)); if (!map) { LOG(LOG_CRIT, ERR_MEM_ALLOC); free(s); return EUNKNOWN; } s->dbh_attached = 0; } s->map = map; /* Mapping defaults */ s->hash_rec_max = HASH_REC_MAX; s->max_seek = HASH_SEEK_MAX; s->max_extents = 0; s->extent_size = HASH_EXTENT_MAX; s->pctincrease = 0; s->flags = HMAP_AUTOEXTEND; if (READ_ATTRIB("HashRecMax")) s->hash_rec_max = strtol(READ_ATTRIB("HashRecMax"), NULL, 0); if (READ_ATTRIB("HashExtentSize")) s->extent_size = strtol(READ_ATTRIB("HashExtentSize"), NULL, 0); if (READ_ATTRIB("HashMaxExtents")) s->max_extents = strtol(READ_ATTRIB("HashMaxExtents"), NULL, 0); if (!MATCH_ATTRIB("HashAutoExtend", "on")) s->flags = 0; if (READ_ATTRIB("HashPctIncrease")) { s->pctincrease = atoi(READ_ATTRIB("HashPctIncrease")); if (s->pctincrease > 100) { LOG(LOG_ERR, "HashPctIncrease out of range; ignoring"); s->pctincrease = 0; } } if (READ_ATTRIB("HashMaxSeek")) s->max_seek = strtol(READ_ATTRIB("HashMaxSeek"), NULL, 0); if (!dbh && CTX->username != NULL) { char db[MAX_FILENAME_LENGTH]; int lock_result; int ret; if (CTX->group == NULL) _ds_userdir_path(db, CTX->home, CTX->username, "css"); else _ds_userdir_path(db, CTX->home, CTX->group, "css"); lock_result = _hash_drv_lock_get (CTX, s, (CTX->group) ? CTX->group : CTX->username); if (lock_result < 0) goto BAIL; ret = _hash_drv_open(db, s->map, s->hash_rec_max, s->max_seek, s->max_extents, s->extent_size, s->pctincrease, s->flags); if (ret) { _hash_drv_close(s->map); free(s); return EFAILURE; } } CTX->storage = s; s->dir_handles = nt_create (NT_INDEX); if (_hash_drv_get_spamtotals (CTX)) { LOGDEBUG ("unable to load totals. using zero values."); memset (&CTX->totals, 0, sizeof (struct _ds_spam_totals)); } return 0; BAIL: free(s); return EFAILURE; } int _ds_shutdown_storage (DSPAM_CTX * CTX) { struct _hash_drv_storage *s; struct nt_node *node_nt; struct nt_c c_nt; if (!CTX || !CTX->storage) return EINVAL; s = (struct _hash_drv_storage *) CTX->storage; /* Close open file handles to directories (iteration functions) */ node_nt = c_nt_first (s->dir_handles, &c_nt); while (node_nt != NULL) { DIR *dir; dir = (DIR *) node_nt->ptr; closedir (dir); node_nt = c_nt_next (s->dir_handles, &c_nt); } nt_destroy (s->dir_handles); if (CTX->operating_mode != DSM_CLASSIFY) _hash_drv_set_spamtotals (CTX); /* Close connection to hash database only if we're not concurrent */ if (!s->dbh_attached) { _hash_drv_close(s->map); free(s->map); int lock_result = _hash_drv_lock_free (s, (CTX->group) ? CTX->group : CTX->username); if (lock_result < 0) return EUNKNOWN; } free (CTX->storage); CTX->storage = NULL; return 0; } int _hash_drv_get_spamtotals (DSPAM_CTX * CTX) { struct _hash_drv_storage *s = (struct _hash_drv_storage *) CTX->storage; if (s->map->addr == 0) return EINVAL; /* Totals are loaded straight from the hash header */ memcpy(&CTX->totals, &s->map->header->totals, sizeof(struct _ds_spam_totals)); return 0; } int _hash_drv_set_spamtotals (DSPAM_CTX * CTX) { struct _hash_drv_storage *s = (struct _hash_drv_storage *) CTX->storage; if (s->map->addr == NULL) return EINVAL; /* Totals are stored into the hash header */ memcpy(&s->map->header->totals, &CTX->totals, sizeof(struct _ds_spam_totals)); return 0; } int _ds_getall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { ds_term_t ds_term; ds_cursor_t ds_c; struct _ds_spam_stat stat; struct _ds_spam_stat *p_stat = &stat; int ret = 0, x = 0; if (diction == NULL || CTX == NULL) return EINVAL; ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while(ds_term) { ds_term->s.spam_hits = 0; ds_term->s.innocent_hits = 0; ds_term->s.offset = 0; x = _ds_get_spamrecord (CTX, ds_term->key, p_stat); if (!x) ds_diction_setstat(diction, ds_term->key, p_stat); else if (x != EFAILURE) ret = x; ds_term = ds_diction_next(ds_c); } ds_diction_close(ds_c); if (ret) { LOGDEBUG("_ds_getall_spamtotals returning %d", ret); } return ret; } int _ds_setall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { ds_term_t ds_term; ds_cursor_t ds_c; int ret = EUNKNOWN; if (diction == NULL || CTX == NULL) return EINVAL; if (CTX->operating_mode == DSM_CLASSIFY && (CTX->training_mode != DST_TOE || (diction->whitelist_token == 0 && (!(CTX->flags & DSF_NOISE))))) { return 0; } ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while(ds_term) { if (!(ds_term->s.status & TST_DIRTY)) { ds_term = ds_diction_next(ds_c); continue; } if (CTX->training_mode == DST_TOE && CTX->classification == DSR_NONE && CTX->operating_mode == DSM_CLASSIFY && diction->whitelist_token != ds_term->key && (!ds_term->name || strncmp(ds_term->name, "bnr.", 4))) { ds_term = ds_diction_next(ds_c); continue; } if (ds_term->s.spam_hits > CTX->totals.spam_learned) ds_term->s.spam_hits = CTX->totals.spam_learned; if (ds_term->s.innocent_hits > CTX->totals.innocent_learned) ds_term->s.innocent_hits = CTX->totals.innocent_learned; if (!_ds_set_spamrecord (CTX, ds_term->key, &ds_term->s)) ret = 0; ds_term = ds_diction_next(ds_c); } ds_diction_close(ds_c); return ret; } int _ds_get_spamrecord ( DSPAM_CTX * CTX, unsigned long long token, struct _ds_spam_stat *stat) { struct _hash_drv_spam_record rec; struct _hash_drv_storage *s = (struct _hash_drv_storage *) CTX->storage; rec.spam = rec.nonspam = 0; rec.hashcode = token; stat->offset = _hash_drv_get_spamrecord(s->map, &rec); if (!stat->offset) return EFAILURE; stat->probability = 0.00000; stat->status = 0; stat->innocent_hits = rec.nonspam & 0x0fffffff; stat->spam_hits = rec.spam & 0x0fffffff; return 0; } int _ds_set_spamrecord ( DSPAM_CTX * CTX, unsigned long long token, struct _ds_spam_stat *stat) { struct _hash_drv_spam_record rec; struct _hash_drv_storage *s = (struct _hash_drv_storage *) CTX->storage; rec.hashcode = token; rec.nonspam = (stat->innocent_hits > 0) ? stat->innocent_hits : 0; rec.spam = (stat->spam_hits > 0) ? stat->spam_hits : 0; if(rec.nonspam>0x0fffffff)rec.nonspam=0x0fffffff; if(rec.spam>0x0fffffff)rec.spam=0x0fffffff; return _hash_drv_set_spamrecord(s->map, &rec, stat->offset); } int _ds_set_signature (DSPAM_CTX * CTX, struct _ds_spam_signature *SIG, const char *signature) { char filename[MAX_FILENAME_LENGTH]; char scratch[128]; FILE *file; _ds_userdir_path(filename, CTX->home, (CTX->group) ? CTX->group : CTX->username, "sig"); snprintf(scratch, sizeof(scratch), "/%s.sig", signature); strlcat(filename, scratch, sizeof(filename)); _ds_prepare_path_for(filename); file = fopen(filename, "w"); if (!file) { LOG(LOG_ERR, ERR_IO_FILE_WRITE, filename, strerror(errno)); return EFAILURE; } if(fwrite(SIG->data, SIG->length, 1, file)!=1) { fclose(file); unlink(filename); LOG(LOG_ERR, ERR_IO_FILE_WRITING, filename, strerror(errno)); return(EFAILURE); } fclose(file); return 0; } int _ds_get_signature (DSPAM_CTX * CTX, struct _ds_spam_signature *SIG, const char *signature) { char filename[MAX_FILENAME_LENGTH]; char scratch[128]; FILE *file; struct stat statbuf; _ds_userdir_path(filename, CTX->home, (CTX->group) ? CTX->group : CTX->username, "sig"); snprintf(scratch, sizeof(scratch), "/%s.sig", signature); strlcat(filename, scratch, sizeof(filename)); if (stat (filename, &statbuf)) { LOG(LOG_ERR, ERR_IO_FILE_OPEN, filename, strerror(errno)); return EFAILURE; }; SIG->data = malloc(statbuf.st_size); if (!SIG->data) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } file = fopen(filename, "r"); if (!file) { LOG(LOG_ERR, ERR_IO_FILE_OPEN, filename, strerror(errno)); return EFAILURE; } if (fread(SIG->data, statbuf.st_size, 1, file) != 1) { LOG(LOG_ERR, ERR_IO_FILE_READ, filename, strerror(errno)); fclose(file); return EFAILURE; } SIG->length = statbuf.st_size; fclose(file); return 0; } void *_ds_connect (DSPAM_CTX *CTX) { CTX = CTX; /* Keep compiler happy */ return NULL; } int _ds_create_signature_id (DSPAM_CTX * CTX, char *buf, size_t len) { char session[64]; char digit[6]; int pid, j; CTX = CTX; /* Keep compiler happy */ pid = getpid (); snprintf (session, sizeof (session), "%8lx%d", (long) time (NULL), pid); for (j = 0; j < 2; j++) { snprintf (digit, 6, "%d", rand ()); strlcat (session, digit, 64); } strlcpy (buf, session, len); return 0; } int _ds_verify_signature (DSPAM_CTX * CTX, const char *signature) { char filename[MAX_FILENAME_LENGTH]; char scratch[128]; struct stat statbuf; _ds_userdir_path(filename, CTX->home, (CTX->group) ? CTX->group : CTX->username, "sig"); snprintf(scratch, sizeof(scratch), "/%s.sig", signature); strlcat(filename, scratch, sizeof(filename)); if (stat (filename, &statbuf)) return 1; return 0; } struct _ds_storage_record * _ds_get_nexttoken (DSPAM_CTX * CTX) { struct _hash_drv_storage *s = (struct _hash_drv_storage *) CTX->storage; struct _hash_drv_spam_record rec; struct _ds_storage_record *sr; struct _ds_spam_stat stat; rec.hashcode = 0; sr = calloc(1, sizeof(struct _ds_storage_record)); if (!sr) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return NULL; } if (s->offset_nexttoken == 0) { s->offset_header = s->map->addr; s->offset_nexttoken = sizeof(struct _hash_drv_header); memcpy(&rec, (void *)((unsigned long) s->map->addr + s->offset_nexttoken), sizeof(struct _hash_drv_spam_record)); if (rec.hashcode) _ds_get_spamrecord (CTX, rec.hashcode, &stat); } while(rec.hashcode == 0 || ((unsigned long) s->map->addr + s->offset_nexttoken == (unsigned long) s->offset_header + sizeof(struct _hash_drv_header) + (s->offset_header->hash_rec_max * sizeof(struct _hash_drv_spam_record)))) { s->offset_nexttoken += sizeof(struct _hash_drv_spam_record); if ((unsigned long) s->map->addr + s->offset_nexttoken > (unsigned long) s->offset_header + sizeof(struct _hash_drv_header) + (s->offset_header->hash_rec_max * sizeof(struct _hash_drv_spam_record))) { if (s->offset_nexttoken < s->map->file_len) { s->offset_header = (void *)((unsigned long) s->map->addr + (s->offset_nexttoken - sizeof(struct _hash_drv_spam_record))); s->offset_nexttoken += sizeof(struct _hash_drv_header); s->offset_nexttoken -= sizeof(struct _hash_drv_spam_record); } else { free(sr); return NULL; } } memcpy(&rec, (void *)((unsigned long) s->map->addr + s->offset_nexttoken), sizeof(struct _hash_drv_spam_record)); _ds_get_spamrecord (CTX, rec.hashcode, &stat); } sr->token = rec.hashcode; sr->spam_hits = stat.spam_hits; sr->innocent_hits = stat.innocent_hits; sr->last_hit = time(NULL); return sr; } int _ds_delete_signature (DSPAM_CTX * CTX, const char *signature) { char filename[MAX_FILENAME_LENGTH]; char scratch[128]; _ds_userdir_path(filename, CTX->home, (CTX->group) ? CTX->group : CTX->username, "sig"); snprintf(scratch, sizeof(scratch), "/%s.sig", signature); strlcat(filename, scratch, sizeof(filename)); return unlink(filename); } char * _ds_get_nextuser (DSPAM_CTX * CTX) { static char user[MAX_FILENAME_LENGTH]; static char path[MAX_FILENAME_LENGTH]; struct _hash_drv_storage *s = (struct _hash_drv_storage *) CTX->storage; struct nt_node *node_nt, *prev; struct nt_c c_nt; char *x = NULL, *y; DIR *dir = NULL; struct dirent *entry; if (s->dir_handles->items == 0) { char filename[MAX_FILENAME_LENGTH]; snprintf(filename, MAX_FILENAME_LENGTH, "%s/data", CTX->home); dir = opendir (filename); if (dir == NULL) { LOG (LOG_WARNING, "unable to open directory '%s' for reading: %s", CTX->home, strerror (errno)); return NULL; } nt_add (s->dir_handles, (void *) dir); strlcpy (path, filename, sizeof (path)); } else { node_nt = c_nt_first (s->dir_handles, &c_nt); while (node_nt != NULL) { if (node_nt->next == NULL) dir = (DIR *) node_nt->ptr; node_nt = c_nt_next (s->dir_handles, &c_nt); } } if (dir != NULL) { while ((entry = readdir (dir)) != NULL) { struct stat st; char filename[MAX_FILENAME_LENGTH]; snprintf (filename, sizeof (filename), "%s/%s", path, entry->d_name); if (!strcmp (entry->d_name, ".") || !strcmp (entry->d_name, "..")) continue; if (stat (filename, &st)) { continue; } /* push a new directory */ if (st.st_mode & S_IFDIR) { DIR *ndir; ndir = opendir (filename); if (ndir == NULL) continue; strlcat (path, "/", sizeof (path)); strlcat (path, entry->d_name, sizeof (path)); nt_add (s->dir_handles, (void *) ndir); return _ds_get_nextuser (CTX); } else if (strlen(entry->d_name)>4 && !strncmp ((entry->d_name + strlen (entry->d_name)) - 4, ".css", 4)) { strlcpy (user, entry->d_name, sizeof (user)); user[strlen (user) - 4] = 0; return user; } } } /* pop current directory */ y = strchr (path, '/'); while (y != NULL) { x = y; y = strchr (x + 1, '/'); } if (x) x[0] = 0; /* pop directory handle from list */ node_nt = c_nt_first (s->dir_handles, &c_nt); prev = NULL; while (node_nt != NULL) { if (node_nt->next == NULL) { dir = (DIR *) node_nt->ptr; closedir (dir); if (prev != NULL) { prev->next = NULL; s->dir_handles->insert = NULL; } else s->dir_handles->first = NULL; free (node_nt); s->dir_handles->items--; break; } prev = node_nt; node_nt = c_nt_next (s->dir_handles, &c_nt); } if (s->dir_handles->items > 0) return _ds_get_nextuser (CTX); user[0] = 0; return NULL; } struct _ds_storage_signature * _ds_get_nextsignature (DSPAM_CTX * CTX) { CTX = CTX; /* Keep compiler happy */ return NULL; } int _ds_delall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { CTX = CTX; /* Keep compiler happy */ diction = diction; /* Keep compiler happy */ return 0; } int _hash_drv_autoextend( hash_drv_map_t map, int extents, unsigned long last_extent_size) { struct _hash_drv_header header; struct _hash_drv_spam_record rec; int lastsize; unsigned long i; _hash_drv_close(map); map->fd = open(map->filename, O_RDWR); if (map->fd < 0) { LOG(LOG_WARNING, "unable to resize hash. open failed: %s", strerror(errno)); return EFAILURE; } memset(&header, 0, sizeof(struct _hash_drv_header)); memset(&rec, 0, sizeof(struct _hash_drv_spam_record)); if (extents == 0 || !map->pctincrease) header.hash_rec_max = map->extent_size; else header.hash_rec_max = last_extent_size + (last_extent_size * (map->pctincrease/100.0)); LOGDEBUG("adding extent last: %d(%ld) new: %d(%ld) pctincrease: %1.2f", extents, last_extent_size, extents+1, header.hash_rec_max, (map->pctincrease/100.0)); lastsize=lseek (map->fd, 0, SEEK_END); if(write (map->fd, &header, sizeof(struct _hash_drv_header))!=sizeof(struct _hash_drv_header)) { if (ftruncate(map->fd, lastsize) < 0) { LOG(LOG_WARNING, "unable to truncate hash file %s: %s", map->filename, strerror(errno)); } close(map->fd); LOG(LOG_WARNING, "unable to resize hash. open failed: %s", strerror(errno)); return EFAILURE; } for(i=0;ifd, &rec, sizeof(struct _hash_drv_spam_record))!=sizeof(struct _hash_drv_spam_record)) { if (ftruncate(map->fd, lastsize) < 0) { LOG(LOG_WARNING, "unable to truncate hash file %s: %s", map->filename, strerror(errno)); } close(map->fd); LOG(LOG_WARNING, "unable to resize hash. open failed: %s", strerror(errno)); return EFAILURE; } close(map->fd); _hash_drv_open(map->filename, map, 0, map->max_seek, map->max_extents, map->extent_size, map->pctincrease, map->flags); return 0; } unsigned long _hash_drv_seek( hash_drv_map_t map, unsigned long offset, unsigned long long hashcode, int flags) { hash_drv_header_t header = (void *)((unsigned long) map->addr + offset); hash_drv_spam_record_t rec; unsigned long fpos; unsigned long iterations = 0; if (offset >= map->file_len) return 0; fpos = sizeof(struct _hash_drv_header) + ((hashcode % header->hash_rec_max) * sizeof(struct _hash_drv_spam_record)); rec = (void *)((unsigned long) map->addr + offset + fpos); while(rec->hashcode != hashcode && /* Match token */ rec->hashcode != 0 && /* Insert on empty */ iterations < map->max_seek) /* Max Iterations */ { iterations++; fpos += sizeof(struct _hash_drv_spam_record); if (fpos >= (header->hash_rec_max * sizeof(struct _hash_drv_spam_record))) fpos = sizeof(struct _hash_drv_header); rec = (void *)((unsigned long) map->addr + offset + fpos); } if (rec->hashcode == hashcode) return fpos; if (rec->hashcode == 0 && (flags & HSEEK_INSERT)) return fpos; return 0; } int _hash_drv_set_spamrecord ( hash_drv_map_t map, hash_drv_spam_record_t wrec, unsigned long map_offset) { hash_drv_spam_record_t rec; unsigned long offset = 0, extents = 0, last_extent_size = 0, rec_offset = 0; if (map->addr == NULL) return EINVAL; if (map_offset) { rec = (void *)((unsigned long) map->addr + map_offset); } else { while(rec_offset <= 0 && offset < map->file_len) { rec_offset = _hash_drv_seek(map, offset, wrec->hashcode, HSEEK_INSERT); if (rec_offset <= 0) { hash_drv_header_t header = (void *)((unsigned long) map->addr + offset); offset += sizeof(struct _hash_drv_header) + (sizeof(struct _hash_drv_spam_record) * header->hash_rec_max); last_extent_size = header->hash_rec_max; extents++; } } if (rec_offset <= 0) { if (map->flags & HMAP_AUTOEXTEND) { if (extents > map->max_extents && map->max_extents) goto FULL; if (!_hash_drv_autoextend(map, extents-1, last_extent_size)) return _hash_drv_set_spamrecord(map, wrec, map_offset); else return EFAILURE; } else { goto FULL; } } rec = (void *)((unsigned long) map->addr + offset + rec_offset); } rec->hashcode = wrec->hashcode; rec->nonspam = wrec->nonspam; rec->spam = wrec->spam; return 0; FULL: LOG(LOG_WARNING, "hash table %s full", map->filename); return EFAILURE; } unsigned long _hash_drv_get_spamrecord ( hash_drv_map_t map, hash_drv_spam_record_t wrec) { hash_drv_spam_record_t rec; unsigned long offset = 0, extents = 0, rec_offset = 0; if (map->addr == NULL) return 0; while(rec_offset <= 0 && offset < map->file_len) { rec_offset = _hash_drv_seek(map, offset, wrec->hashcode, 0); if (rec_offset <= 0) { hash_drv_header_t header = (void *)((unsigned long) map->addr + offset); offset += sizeof(struct _hash_drv_header) + (sizeof(struct _hash_drv_spam_record) * header->hash_rec_max); extents++; } } if (rec_offset <= 0) return 0; offset += rec_offset; rec = (void *)((unsigned long) map->addr + offset); wrec->nonspam = rec->nonspam; wrec->spam = rec->spam; return offset; } /* Preference Stubs for Flat-File */ agent_pref_t _ds_pref_load(config_t config, const char *user, const char *home, void *dbh) { return _ds_ff_pref_load(config, user, home, dbh); } int _ds_pref_set(config_t config, const char *user, const char *home, const char *attrib, const char *value, void *dbh) { return _ds_ff_pref_set(config, user, home, attrib, value, dbh); } int _ds_pref_del(config_t config, const char *user, const char *home, const char *attrib, void *dbh) { return _ds_ff_pref_del(config, user, home, attrib, dbh); } dspam-3.10.2+dfsg/src/Makefile.in0000644000175000017500000015236511745313451016032 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.50 2010/11/30 09:01:56 sbajic Exp $ # # autoconf (GNU Autoconf) 2.59 # ltmain.sh (GNU libtool) 1.5.6 # automake (GNU automake) 1.9.2 VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @BUILD_HASH_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am__append_1 = libhash_drv.la @BUILD_MYSQL_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am__append_2 = libmysql_drv.la @BUILD_PGSQL_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am__append_3 = libpgsql_drv.la @BUILD_SQLITE_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am__append_4 = libsqlite_drv.la @BUILD_SQLITE3_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am__append_5 = libsqlite3_drv.la bin_PROGRAMS = dspam$(EXEEXT) dspamc$(EXEEXT) @BUILD_EXT_LOOKUP_TRUE@am__append_6 = external_lookup.h @BUILD_EXT_LOOKUP_TRUE@am__append_7 = external_lookup.c external_lookup.h @DYNAMIC_DRIVER_TRUE@am__append_8 = storage_driver.c @BUILD_EXT_LOOKUP_TRUE@am__append_9 = $(external_lookup_libs) @STATIC_DRIVER_TRUE@am__append_10 = $(active_driver).lo @STATIC_DRIVER_TRUE@am__append_11 = $(active_driver).lo @DYNAMIC_DRIVER_FALSE@libhash_drv_la_DEPENDENCIES = subdir = src DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/auto-config.h.in \ $(srcdir)/dspam-uninstalled.pc.in $(srcdir)/dspam.pc.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = auto-config.h CONFIG_CLEAN_FILES = dspam.pc dspam-uninstalled.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkglibdir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(etcdir)" \ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(pkglib_LTLIBRARIES) am__DEPENDENCIES_1 = @BUILD_EXT_LOOKUP_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) am__libdspam_la_SOURCES_DIST = config.h libdspam_objects.h libdspam.c \ libdspam.h heap.c heap.h diction.c diction.h base64.c base64.h \ buffer.c buffer.h util.c util.h nodetree.c nodetree.h error.c \ error.h decode.c decode.h pref.c pref.h config_shared.c \ config_shared.h bnr.c bnr.h hash.c hash.h list.c list.h \ tokenizer.c tokenizer.h storage_driver.h external_lookup.c \ external_lookup.h storage_driver.c @BUILD_EXT_LOOKUP_TRUE@am__objects_1 = external_lookup.lo @DYNAMIC_DRIVER_TRUE@am__objects_2 = storage_driver.lo am_libdspam_la_OBJECTS = libdspam.lo heap.lo diction.lo base64.lo \ buffer.lo util.lo nodetree.lo error.lo decode.lo pref.lo \ config_shared.lo bnr.lo hash.lo list.lo tokenizer.lo \ $(am__objects_1) $(am__objects_2) libdspam_la_OBJECTS = $(am_libdspam_la_OBJECTS) libdspam_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libdspam_la_LDFLAGS) $(LDFLAGS) -o $@ am__libhash_drv_la_SOURCES_DIST = hash_drv.c hash_drv.h @DYNAMIC_DRIVER_TRUE@am_libhash_drv_la_OBJECTS = \ @DYNAMIC_DRIVER_TRUE@ libhash_drv_la-hash_drv.lo libhash_drv_la_OBJECTS = $(am_libhash_drv_la_OBJECTS) libhash_drv_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libhash_drv_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_HASH_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am_libhash_drv_la_rpath = \ @BUILD_HASH_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@ -rpath $(pkglibdir) am__libmysql_drv_la_SOURCES_DIST = mysql_drv.c mysql_drv.h @DYNAMIC_DRIVER_TRUE@am_libmysql_drv_la_OBJECTS = \ @DYNAMIC_DRIVER_TRUE@ libmysql_drv_la-mysql_drv.lo libmysql_drv_la_OBJECTS = $(am_libmysql_drv_la_OBJECTS) libmysql_drv_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libmysql_drv_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_MYSQL_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am_libmysql_drv_la_rpath = \ @BUILD_MYSQL_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@ -rpath $(pkglibdir) am__libpgsql_drv_la_SOURCES_DIST = pgsql_drv.c pgsql_drv.h @DYNAMIC_DRIVER_TRUE@am_libpgsql_drv_la_OBJECTS = \ @DYNAMIC_DRIVER_TRUE@ libpgsql_drv_la-pgsql_drv.lo libpgsql_drv_la_OBJECTS = $(am_libpgsql_drv_la_OBJECTS) libpgsql_drv_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libpgsql_drv_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_PGSQL_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am_libpgsql_drv_la_rpath = \ @BUILD_PGSQL_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@ -rpath $(pkglibdir) am__libsqlite3_drv_la_SOURCES_DIST = sqlite3_drv.c sqlite3_drv.h @DYNAMIC_DRIVER_TRUE@am_libsqlite3_drv_la_OBJECTS = \ @DYNAMIC_DRIVER_TRUE@ libsqlite3_drv_la-sqlite3_drv.lo libsqlite3_drv_la_OBJECTS = $(am_libsqlite3_drv_la_OBJECTS) libsqlite3_drv_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libsqlite3_drv_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_SQLITE3_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am_libsqlite3_drv_la_rpath = \ @BUILD_SQLITE3_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@ -rpath \ @BUILD_SQLITE3_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@ $(pkglibdir) am__libsqlite_drv_la_SOURCES_DIST = sqlite_drv.c sqlite_drv.h @DYNAMIC_DRIVER_TRUE@am_libsqlite_drv_la_OBJECTS = \ @DYNAMIC_DRIVER_TRUE@ libsqlite_drv_la-sqlite_drv.lo libsqlite_drv_la_OBJECTS = $(am_libsqlite_drv_la_OBJECTS) libsqlite_drv_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libsqlite_drv_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_SQLITE_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am_libsqlite_drv_la_rpath = \ @BUILD_SQLITE_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@ -rpath \ @BUILD_SQLITE_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@ $(pkglibdir) PROGRAMS = $(bin_PROGRAMS) am_dspam_OBJECTS = dspam.$(OBJEXT) read_config.$(OBJEXT) \ config_api.$(OBJEXT) daemon.$(OBJEXT) client.$(OBJEXT) \ agent_shared.$(OBJEXT) dspam_OBJECTS = $(am_dspam_OBJECTS) am_dspamc_OBJECTS = dspamc.$(OBJEXT) read_config.$(OBJEXT) \ client.$(OBJEXT) agent_shared.$(OBJEXT) dspamc_OBJECTS = $(am_dspamc_OBJECTS) dspamc_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(dspamc_LDFLAGS) \ $(LDFLAGS) -o $@ SCRIPTS = $(etc_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libdspam_la_SOURCES) $(EXTRA_libdspam_la_SOURCES) \ $(libhash_drv_la_SOURCES) $(libmysql_drv_la_SOURCES) \ $(libpgsql_drv_la_SOURCES) $(libsqlite3_drv_la_SOURCES) \ $(libsqlite_drv_la_SOURCES) $(dspam_SOURCES) $(dspamc_SOURCES) DIST_SOURCES = $(am__libdspam_la_SOURCES_DIST) \ $(EXTRA_libdspam_la_SOURCES) \ $(am__libhash_drv_la_SOURCES_DIST) \ $(am__libmysql_drv_la_SOURCES_DIST) \ $(am__libpgsql_drv_la_SOURCES_DIST) \ $(am__libsqlite3_drv_la_SOURCES_DIST) \ $(am__libsqlite_drv_la_SOURCES_DIST) $(dspam_SOURCES) \ $(dspamc_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive DATA = $(pkgconfig_DATA) am__include_HEADERS_DIST = 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 pref.h read_config.h \ external_lookup.h HEADERS = $(include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ -DLOGDIR=\"$(logdir)\" \ -DCONFDIR=\"$(sysconfdir)\"\ -DCONFIG_DEFAULT=\"$(sysconfdir)/dspam.conf\"\ -D_THREAD_SAFE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@/dspam infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = . tools $(storage_drv_subdirs) DIST_SUBDIRS = . \ tools.mysql_drv tools.pgsql_drv tools.sqlite_drv tools.hash_drv tools pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = dspam.pc etcdir = $(sysconfdir) etc_SCRIPTS = dspam_conf libversion = 7:0:0 # Defaults from dspam.conf EXTRA_DIST = example.c dspam.pc.in dspam-uninstalled.pc.in dspam.conf.in CLEANFILES = dspam.conf MAINTAINERCLEANFILES = Makefile.in aclocal.m4 auto-config.h.in \ config.guess config.sub configure depcomp install-sh \ ltmain.sh missing mkinstalldirs lib_LTLIBRARIES = libdspam.la pkglib_LTLIBRARIES = $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_4) $(am__append_5) # 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 pref.h read_config.h \ $(am__append_6) # libdspam.a contans objects common for dspam and tools/* binaries libdspam_la_SOURCES = config.h libdspam_objects.h libdspam.c \ libdspam.h heap.c heap.h diction.c diction.h base64.c base64.h \ buffer.c buffer.h util.c util.h nodetree.c nodetree.h error.c \ error.h decode.c decode.h pref.c pref.h config_shared.c \ config_shared.h bnr.c bnr.h hash.c hash.h list.c list.h \ tokenizer.c tokenizer.h storage_driver.h $(am__append_7) \ $(am__append_8) EXTRA_libdspam_la_SOURCES = \ mysql_drv.c mysql_drv.h \ pgsql_drv.c pgsql_drv.h \ sqlite_drv.c sqlite_drv.h \ sqlite3_drv.c sqlite3_drv.h #if STATIC_DRIVER #if BUILD_HASH_DRV #libdspam_la_SOURCES += libhash_drv.c libhash_drv.h #endif #if BUILD_MYSQL_DRV #libdspam_la_SOURCES += libmysql_drv.c libmysql_drv.h #endif #if BUILD_PGSQL_DRV #libdspam_la_SOURCES += libpgsql_drv.c libpgsql_drv.h #endif #if BUILD_SQLITE_DRV #libdspam_la_SOURCES += libsqlite_drv.c libsqlite_drv.h #endif #if BUILD_SQLITE3_DRV #libdspam_la_SOURCES += libsqlite3_drv.c libsqlite3_drv.h #endif #endif libdspam_la_LIBADD = $(adapter_objects) -lm $(NETLIBS) $(DLLIBS) \ $(am__append_9) $(am__append_10) libdspam_la_DEPENDENCIES = $(adapter_objects) $(am__append_11) # current:revision:age libdspam_la_LDFLAGS = -rpath '$(libdir)' -version-info $(libversion) @DYNAMIC_DRIVER_TRUE@libmysql_drv_la_SOURCES = \ @DYNAMIC_DRIVER_TRUE@ mysql_drv.c mysql_drv.h @DYNAMIC_DRIVER_TRUE@libmysql_drv_la_LIBADD = $(libmysql_drv_libs) -L. -ldspam @DYNAMIC_DRIVER_TRUE@libmysql_drv_la_CPPFLAGS = $(libmysql_drv_cppflags) @DYNAMIC_DRIVER_TRUE@libmysql_drv_la_LDFLAGS = \ @DYNAMIC_DRIVER_TRUE@ $(libmysql_drv_ldflags) -rpath \ @DYNAMIC_DRIVER_TRUE@ '$(pkglibdir)' -version-info \ @DYNAMIC_DRIVER_TRUE@ $(libversion) @DYNAMIC_DRIVER_TRUE@libmysql_drv_la_DEPENDENCIES = libdspam.la @DYNAMIC_DRIVER_TRUE@libpgsql_drv_la_SOURCES = \ @DYNAMIC_DRIVER_TRUE@ pgsql_drv.c pgsql_drv.h @DYNAMIC_DRIVER_TRUE@libpgsql_drv_la_LIBADD = $(libpgsql_drv_libs) -L. -ldspam @DYNAMIC_DRIVER_TRUE@libpgsql_drv_la_CPPFLAGS = $(libpgsql_drv_cppflags) @DYNAMIC_DRIVER_TRUE@libpgsql_drv_la_LDFLAGS = \ @DYNAMIC_DRIVER_TRUE@ $(libpgsql_drv_ldflags) -rpath \ @DYNAMIC_DRIVER_TRUE@ '$(pkglibdir)' -version-info \ @DYNAMIC_DRIVER_TRUE@ $(libversion) @DYNAMIC_DRIVER_TRUE@libpgsql_drv_la_DEPENDENCIES = libdspam.la @DYNAMIC_DRIVER_TRUE@libsqlite_drv_la_SOURCES = \ @DYNAMIC_DRIVER_TRUE@ sqlite_drv.c sqlite_drv.h @DYNAMIC_DRIVER_TRUE@libsqlite_drv_la_LIBADD = $(libsqlite_drv_libs) -L. -ldspam @DYNAMIC_DRIVER_TRUE@libsqlite_drv_la_CPPFLAGS = $(libsqlite_drv_cppflags) @DYNAMIC_DRIVER_TRUE@libsqlite_drv_la_LDFLAGS = \ @DYNAMIC_DRIVER_TRUE@ $(libsqlite_drv_ldflags) -rpath \ @DYNAMIC_DRIVER_TRUE@ '$(pkglibdir)' -version-info \ @DYNAMIC_DRIVER_TRUE@ $(libversion) @DYNAMIC_DRIVER_TRUE@libsqlite_drv_la_DEPENDENCIES = libdspam.la @DYNAMIC_DRIVER_TRUE@libsqlite3_drv_la_SOURCES = \ @DYNAMIC_DRIVER_TRUE@ sqlite3_drv.c sqlite3_drv.h @DYNAMIC_DRIVER_TRUE@libsqlite3_drv_la_LIBADD = $(libsqlite3_drv_libs) -L. -ldspam @DYNAMIC_DRIVER_TRUE@libsqlite3_drv_la_CPPFLAGS = $(libsqlite3_drv_cppflags) @DYNAMIC_DRIVER_TRUE@libsqlite3_drv_la_LDFLAGS = \ @DYNAMIC_DRIVER_TRUE@ $(libsqlite3_drv_ldflags) -rpath \ @DYNAMIC_DRIVER_TRUE@ '$(pkglibdir)' -version-info \ @DYNAMIC_DRIVER_TRUE@ $(libversion) @DYNAMIC_DRIVER_TRUE@libsqlite3_drv_la_DEPENDENCIES = libdspam.la @DYNAMIC_DRIVER_TRUE@libhash_drv_la_SOURCES = \ @DYNAMIC_DRIVER_TRUE@ hash_drv.c hash_drv.h @DYNAMIC_DRIVER_TRUE@libhash_drv_la_LIBADD = $(libhash_drv_libs) -L. -ldspam @DYNAMIC_DRIVER_TRUE@libhash_drv_la_CPPFLAGS = $(libhash_drv_cppflags) @DYNAMIC_DRIVER_TRUE@libhash_drv_la_LDFLAGS = $(libhash_drv_ldflags) \ @DYNAMIC_DRIVER_TRUE@ -rpath '$(pkglibdir)' -version-info \ @DYNAMIC_DRIVER_TRUE@ $(libversion) @DYNAMIC_DRIVER_TRUE@libhash_drv_la_DEPENDENCIES = libdspam.la dspam_SOURCES = \ config.h libdspam.h language.h \ dspam.c dspam.h \ buffer.h storage_driver.h \ read_config.c read_config.h \ config_api.c config_api.h \ daemon.c daemon.h \ client.c client.h \ agent_shared.c agent_shared.h dspam_LDADD = -lm libdspam.la dspam_DEPENDENCIES = libdspam.la dspamc_SOURCES = \ config.h language.h \ dspamc.c dspamc.h \ buffer.h error.h \ read_config.c read_config.h \ client.c client.h \ agent_shared.c agent_shared.h dspamc_LDADD = -lm buffer.o config_shared.o error.o pref.o nodetree.o util.o $(NETLIBS) $(DLLIBS) dspamc_LDFLAGS = dspamc_DEPENDENCIES = buffer.o config_shared.o error.o pref.o nodetree.o util.o ACLOCAL_AMFLAGS = -I m4 sed_substitute_variables = \ dspam_transformed=`echo dspam | sed '$(transform)'`; \ sed -e 's,@dspam_home\@,$(dspam_home),g' \ -e 's,@delivery_agent\@,$(delivery_agent),g' \ -e 's,@storage_driver\@,lib$(active_driver).so,g' \ -e 's,@libdir\@,$(libdir),g' all: auto-config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): auto-config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/auto-config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/auto-config.h $(srcdir)/auto-config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f auto-config.h stamp-h1 dspam.pc: $(top_builddir)/config.status $(srcdir)/dspam.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ dspam-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/dspam-uninstalled.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ } uninstall-pkglibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ done clean-pkglibLTLIBRARIES: -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libdspam.la: $(libdspam_la_OBJECTS) $(libdspam_la_DEPENDENCIES) $(libdspam_la_LINK) -rpath $(libdir) $(libdspam_la_OBJECTS) $(libdspam_la_LIBADD) $(LIBS) libhash_drv.la: $(libhash_drv_la_OBJECTS) $(libhash_drv_la_DEPENDENCIES) $(libhash_drv_la_LINK) $(am_libhash_drv_la_rpath) $(libhash_drv_la_OBJECTS) $(libhash_drv_la_LIBADD) $(LIBS) libmysql_drv.la: $(libmysql_drv_la_OBJECTS) $(libmysql_drv_la_DEPENDENCIES) $(libmysql_drv_la_LINK) $(am_libmysql_drv_la_rpath) $(libmysql_drv_la_OBJECTS) $(libmysql_drv_la_LIBADD) $(LIBS) libpgsql_drv.la: $(libpgsql_drv_la_OBJECTS) $(libpgsql_drv_la_DEPENDENCIES) $(libpgsql_drv_la_LINK) $(am_libpgsql_drv_la_rpath) $(libpgsql_drv_la_OBJECTS) $(libpgsql_drv_la_LIBADD) $(LIBS) libsqlite3_drv.la: $(libsqlite3_drv_la_OBJECTS) $(libsqlite3_drv_la_DEPENDENCIES) $(libsqlite3_drv_la_LINK) $(am_libsqlite3_drv_la_rpath) $(libsqlite3_drv_la_OBJECTS) $(libsqlite3_drv_la_LIBADD) $(LIBS) libsqlite_drv.la: $(libsqlite_drv_la_OBJECTS) $(libsqlite_drv_la_DEPENDENCIES) $(libsqlite_drv_la_LINK) $(am_libsqlite_drv_la_rpath) $(libsqlite_drv_la_OBJECTS) $(libsqlite_drv_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list dspam$(EXEEXT): $(dspam_OBJECTS) $(dspam_DEPENDENCIES) @rm -f dspam$(EXEEXT) $(LINK) $(dspam_OBJECTS) $(dspam_LDADD) $(LIBS) dspamc$(EXEEXT): $(dspamc_OBJECTS) $(dspamc_DEPENDENCIES) @rm -f dspamc$(EXEEXT) $(dspamc_LINK) $(dspamc_OBJECTS) $(dspamc_LDADD) $(LIBS) install-etcSCRIPTS: $(etc_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(etcdir)" || $(MKDIR_P) "$(DESTDIR)$(etcdir)" @list='$(etc_SCRIPTS)'; test -n "$(etcdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(etcdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(etcdir)$$dir" || exit $$?; \ } \ ; done uninstall-etcSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(etc_SCRIPTS)'; test -n "$(etcdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(etcdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(etcdir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agent_shared.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bnr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_api.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_shared.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/daemon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspam.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspamc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/external_lookup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/heap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdspam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhash_drv_la-hash_drv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmysql_drv_la-mysql_drv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpgsql_drv_la-pgsql_drv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsqlite3_drv_la-sqlite3_drv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsqlite_drv_la-sqlite_drv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mysql_drv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nodetree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgsql_drv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqlite3_drv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqlite_drv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/storage_driver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tokenizer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libhash_drv_la-hash_drv.lo: hash_drv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhash_drv_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhash_drv_la-hash_drv.lo -MD -MP -MF $(DEPDIR)/libhash_drv_la-hash_drv.Tpo -c -o libhash_drv_la-hash_drv.lo `test -f 'hash_drv.c' || echo '$(srcdir)/'`hash_drv.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhash_drv_la-hash_drv.Tpo $(DEPDIR)/libhash_drv_la-hash_drv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hash_drv.c' object='libhash_drv_la-hash_drv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhash_drv_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhash_drv_la-hash_drv.lo `test -f 'hash_drv.c' || echo '$(srcdir)/'`hash_drv.c libmysql_drv_la-mysql_drv.lo: mysql_drv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmysql_drv_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmysql_drv_la-mysql_drv.lo -MD -MP -MF $(DEPDIR)/libmysql_drv_la-mysql_drv.Tpo -c -o libmysql_drv_la-mysql_drv.lo `test -f 'mysql_drv.c' || echo '$(srcdir)/'`mysql_drv.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmysql_drv_la-mysql_drv.Tpo $(DEPDIR)/libmysql_drv_la-mysql_drv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mysql_drv.c' object='libmysql_drv_la-mysql_drv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmysql_drv_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmysql_drv_la-mysql_drv.lo `test -f 'mysql_drv.c' || echo '$(srcdir)/'`mysql_drv.c libpgsql_drv_la-pgsql_drv.lo: pgsql_drv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpgsql_drv_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpgsql_drv_la-pgsql_drv.lo -MD -MP -MF $(DEPDIR)/libpgsql_drv_la-pgsql_drv.Tpo -c -o libpgsql_drv_la-pgsql_drv.lo `test -f 'pgsql_drv.c' || echo '$(srcdir)/'`pgsql_drv.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpgsql_drv_la-pgsql_drv.Tpo $(DEPDIR)/libpgsql_drv_la-pgsql_drv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pgsql_drv.c' object='libpgsql_drv_la-pgsql_drv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpgsql_drv_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpgsql_drv_la-pgsql_drv.lo `test -f 'pgsql_drv.c' || echo '$(srcdir)/'`pgsql_drv.c libsqlite3_drv_la-sqlite3_drv.lo: sqlite3_drv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsqlite3_drv_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsqlite3_drv_la-sqlite3_drv.lo -MD -MP -MF $(DEPDIR)/libsqlite3_drv_la-sqlite3_drv.Tpo -c -o libsqlite3_drv_la-sqlite3_drv.lo `test -f 'sqlite3_drv.c' || echo '$(srcdir)/'`sqlite3_drv.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsqlite3_drv_la-sqlite3_drv.Tpo $(DEPDIR)/libsqlite3_drv_la-sqlite3_drv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sqlite3_drv.c' object='libsqlite3_drv_la-sqlite3_drv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsqlite3_drv_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsqlite3_drv_la-sqlite3_drv.lo `test -f 'sqlite3_drv.c' || echo '$(srcdir)/'`sqlite3_drv.c libsqlite_drv_la-sqlite_drv.lo: sqlite_drv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsqlite_drv_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsqlite_drv_la-sqlite_drv.lo -MD -MP -MF $(DEPDIR)/libsqlite_drv_la-sqlite_drv.Tpo -c -o libsqlite_drv_la-sqlite_drv.lo `test -f 'sqlite_drv.c' || echo '$(srcdir)/'`sqlite_drv.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsqlite_drv_la-sqlite_drv.Tpo $(DEPDIR)/libsqlite_drv_la-sqlite_drv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sqlite_drv.c' object='libsqlite_drv_la-sqlite_drv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsqlite_drv_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsqlite_drv_la-sqlite_drv.lo `test -f 'sqlite_drv.c' || echo '$(srcdir)/'`sqlite_drv.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) auto-config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) auto-config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) auto-config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) auto-config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \ $(HEADERS) auto-config.h install-binPROGRAMS: install-libLTLIBRARIES installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(etcdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool clean-pkglibLTLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-etcSCRIPTS install-includeHEADERS \ install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \ install-pkglibLTLIBRARIES @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-etcSCRIPTS \ uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA uninstall-pkglibLTLIBRARIES .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-exec-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-pkglibLTLIBRARIES ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-etcSCRIPTS install-exec install-exec-am \ install-exec-hook install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgconfigDATA install-pkglibLTLIBRARIES install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-etcSCRIPTS \ uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA uninstall-pkglibLTLIBRARIES # Failing of chgrp is expected and normal case when someone do # make install DESTDIR=... # from user other than root (from user not included in the `mail' group # is exactly), and only after this and after checking what was installed # changes ownership. # # Caveat: creating the $(dspam_home) in the install-exec-hook is not the # right way, but for some (unknown to me) reason `installdirs-local' # target have no chances to be executed under automake-1.7.3 (at least). # # Solaris' ln seems to have a problem with -sf and existing symlinks. install-exec-hook: -if test ! -d $(DESTDIR)$(sysconfdir); then \ mkdir -p $(DESTDIR)$(sysconfdir); \ chmod 755 $(DESTDIR)$(sysconfdir); \ fi -if test ! -f $(DESTDIR)$(sysconfdir)/dspam.conf; then \ cp dspam.conf $(DESTDIR)$(sysconfdir)/dspam.conf; \ chmod 640 $(DESTDIR)$(sysconfdir)/dspam.conf; \ chown "$(dspam_owner)" $(DESTDIR)$(sysconfdir)/dspam.conf; \ chgrp "$(dspam_group)" $(DESTDIR)$(sysconfdir)/dspam.conf; \ fi -if test x"$(dspam_owner)" != xnone; then \ chown "$(dspam_owner)" $(DESTDIR)$(bindir)/dspam; \ fi -if test x"$(dspam_group)" != xnone; then \ chgrp "$(dspam_group)" $(DESTDIR)$(bindir)/dspam; \ fi -if test x"$(dspam_mode)" != xnone; then \ chmod "$(dspam_mode)" $(DESTDIR)$(bindir)/dspam; \ fi -if test ! -d $(DESTDIR)$(dspam_home); then \ $(mkinstalldirs) $(DESTDIR)$(dspam_home); \ if test x"$(dspam_home_owner)" != xnone; then \ chown "$(dspam_home_owner)" $(DESTDIR)$(dspam_home); \ fi; \ if test x"$(dspam_home_group)" != xnone; then \ chgrp "$(dspam_home_group)" $(DESTDIR)$(dspam_home); \ fi; \ if test x"$(dspam_home_mode)" != xnone; then \ chmod "$(dspam_home_mode)" $(DESTDIR)$(dspam_home); \ fi; \ fi -if test ! -d $(DESTDIR)$(logdir); then \ $(mkinstalldirs) $(DESTDIR)$(logdir); \ if test x"$(dspam_home_owner)" != xnone; then \ chown "$(dspam_home_owner)" $(DESTDIR)$(logdir); \ fi; \ if test x"$(dspam_home_group)" != xnone; then \ chgrp "$(dspam_home_group)" $(DESTDIR)$(logdir); \ fi; \ if test x"$(dspam_home_mode)" != xnone; then \ chmod "$(dspam_home_mode)" $(DESTDIR)$(logdir); \ fi; \ fi dspam_conf: dspam.conf.in Makefile ${sed_substitute_variables} < $(srcdir)/dspam.conf.in > dspam.conf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/src/nodetree.c0000644000175000017500000000704011741351001015710 0ustar julienjulien/* $Id: nodetree.c,v 1.11 2011/08/28 12:25:20 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #include #include #ifndef _WIN32 #include #endif #include "nodetree.h" #include "util.h" #include "error.h" #include "libdspam_objects.h" #include "language.h" /* nt_node_create (used internally) to allocate space for a new node */ struct nt_node * nt_node_create (void *data) { struct nt_node *node; if ((node = (struct nt_node *) malloc (sizeof (struct nt_node))) == 0) { LOG (LOG_CRIT, ERR_MEM_ALLOC); exit (1); } node->ptr = data; node->next = (struct nt_node *) NULL; return (node); } /* nt_create allocates space for and initializes a nodetree */ struct nt * nt_create (int nodetype) { struct nt *nt = (struct nt *) malloc (sizeof (struct nt)); if (nt == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return NULL; } nt->first = (struct nt_node *) NULL; nt->insert = (struct nt_node *) NULL; nt->items = 0; nt->nodetype = nodetype; return (nt); } /* nt_destroy methodically destroys a nodetree, freeing resources */ void nt_destroy (struct nt *nt) { struct nt_node *cur, *next; int i; if (!nt) return; cur = nt->first; for (i = 0; i < nt->items; i++) { next = cur->next; if (nt->nodetype != NT_INDEX) free (cur->ptr); free (cur); cur = next; } free (nt); } /* nt_add adds an item to the nodetree */ struct nt_node * nt_add (struct nt *nt, void *data) { struct nt_node *prev; struct nt_c c; struct nt_node *node = c_nt_first (nt, &c); void *vptr; if (nt->insert) { prev = nt->insert; } else { prev = 0; while (node) { prev = node; node = node->next; } } nt->items++; if (nt->nodetype == NT_CHAR) { long size = strlen ((char *) data) + 1; /* vptr is compared with 'From' and 'X-DSPAM-'even if data is shorter; but a larger buffer is allocated to prevent a comparison against garbage */ vptr = malloc (size < 16 ? 16 : size); if (vptr == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return NULL; } strlcpy (vptr, data, size); } else { vptr = data; } if (prev) { node = nt_node_create (vptr); prev->next = node; nt->insert = node; return (node); } else { node = nt_node_create (vptr); nt->first = node; nt->insert = node; return (node); } } /* c_nt_next returns the next item in a nodetree */ struct nt_node * c_nt_next (struct nt *nt, struct nt_c *c) { struct nt_node *node = c->iter_index; if (node) { c->iter_index = node->next; return (node->next); } else { if (nt->items > 0) { c->iter_index = nt->first; return nt->first; } } return ((struct nt_node *) NULL); } /* nt_first returns the first item in a nodetree */ struct nt_node * c_nt_first (struct nt *nt, struct nt_c *c) { c->iter_index = nt->first; return (nt->first); } dspam-3.10.2+dfsg/src/bnr.h0000644000175000017500000000413311741351001014671 0ustar julienjulien/* $Id: bnr.h,v 1.14 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef __BNR_H #define __BNR_H #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif #include #include #include "list.h" #include "hash.h" typedef struct { long eliminations; struct bnr_list *stream; struct bnr_hash *patterns; char identifier; struct bnr_list_c c_stream; struct bnr_hash_c c_pattern; int stream_iter; int pattern_iter; int window_size; float ex_radius; float in_radius; } BNR_CTX; BNR_CTX *bnr_init(int type, char identifier); int bnr_destroy(BNR_CTX *BTX); int bnr_add (BNR_CTX *BTX, void *token, float value); int bnr_instantiate (BNR_CTX *BTX); int bnr_set_pattern (BNR_CTX *BTX, const char *name, float value); int bnr_finalize (BNR_CTX *BTX); void * bnr_get_token (BNR_CTX *BTX, int *eliminated); char * bnr_get_pattern (BNR_CTX *BTX); float _bnr_round(float n); /* BTX_CHAR Character-Based Context Treats the passed token identifier as a const char * and creates new storage space for each string (strdup) BTX_INDEX Pointer-Based Context Treats the passed token identifier as a void * to your own token structure, whose pointers are used only for indexing */ #define BNR_CHAR 0x00 #define BNR_INDEX 0x01 #ifndef EFAILURE #define EFAILURE -0x01 #endif #endif dspam-3.10.2+dfsg/src/mysql_drv.c0000644000175000017500000031350411741351001016130 0ustar julienjulien/* $Id: mysql_drv.c,v 1.889 2011/10/01 10:22:17 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include /* Work around broken limits.h on debian etch (and possibly others?) */ #if defined __GNUC__ && defined _GCC_LIMITS_H_ && ! defined ULLONG_MAX # define ULLONG_MAX ULONG_LONG_MAX #endif #ifdef DAEMON #include #endif #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "storage_driver.h" #include "mysql_drv.h" #include "libdspam.h" #include "config.h" #include "error.h" #include "language.h" #include "util.h" #include "pref.h" #include "config_shared.h" #define MYSQL_RUN_QUERY(A, B) mysql_query(A, B) #define MYSQL_RUN_REAL_QUERY(A, B, C) mysql_real_query(A, B, C) /* * _mysql_drv_get_UIDInSignature() * * DESCRIPTION * The _mysql_drv_get_UIDInSignature() function is called to check if the * configuration option MySQLUIDInSignature is turned on or off. * * RETURN VALUES * Returns 1 if MySQLUIDInSignature is turned "on" and 0 if turned "off". */ /* static int _mysql_drv_get_UIDInSignature (DSPAM_CTX *CTX) { static int uid_in_signature = -1; if (uid_in_signature > -1) { return uid_in_signature; } else { if (_ds_match_attribute(CTX->config->attributes, "MySQLUIDInSignature", "on")) uid_in_signature = 1; else uid_in_signature = 0; } return uid_in_signature; } */ /* * _mysql_drv_get_virtual_table() * * DESCRIPTION * The _mysql_drv_get_virtual_table() function is called to get the * virtual table name. * * RETURN VALUES * Returns the name of the virtual table if defined, otherwise returns * "dspam_virtual_uids". */ /* static char *_mysql_drv_get_virtual_table (DSPAM_CTX *CTX) { static char *virtual_table = "*"; if (virtual_table[0] != '*') { return virtual_table; } else { if ((virtual_table = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualTable")) == NULL) { virtual_table = "dspam_virtual_uids"; } } return virtual_table; } */ /* * _mysql_drv_get_virtual_uid_field() * * DESCRIPTION * The _mysql_drv_get_virtual_uid_field() function is called to get the * virtual uid field name. * * RETURN VALUES * Returns the name of the virtual uid field if defined, otherwise returns * "uid". */ /* static char *_mysql_drv_get_virtual_uid_field (DSPAM_CTX *CTX) { static char *virtual_uid = "*"; if (virtual_uid[0] != '*') { return virtual_uid; } else { if ((virtual_uid = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualUIDField")) == NULL) { virtual_uid = "uid"; } } return virtual_uid; } */ /* * _mysql_drv_get_virtual_username_field() * * DESCRIPTION * The _mysql_drv_get_virtual_username_field() function is called to get the * virtual username field name. * * RETURN VALUES * Returns the name of the virtual username field if defined, otherwise returns * "username". */ /* static char *_mysql_drv_get_virtual_username_field (DSPAM_CTX *CTX) { static char *virtual_username = "*"; if (virtual_username[0] != '*') { return virtual_username; } else { if ((virtual_username = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualUsernameField")) == NULL) { virtual_username = "username"; } } return virtual_username; } */ /* * _mysql_driver_get_max_packet() * * DESCRIPTION * The _mysql_driver_get_max_packet() function is called to get the maximum * size of db communication buffer. * * RETURN VALUES * Returns the maximum size for the db communication buffer. If the maximum * size can not be determined then 1000000 is returned. */ static unsigned long _mysql_driver_get_max_packet (MYSQL *dbh) { static unsigned long drv_max_packet = 0; if (drv_max_packet > 0) { return drv_max_packet; } else { drv_max_packet = 1000000; } if (dbh) { MYSQL_RES *result; MYSQL_ROW row; char scratch[128]; snprintf (scratch, sizeof (scratch), "SHOW VARIABLES WHERE variable_name='max_allowed_packet'"); if (MYSQL_RUN_QUERY (dbh, scratch) == 0) { result = mysql_use_result (dbh); if (result != NULL) { row = mysql_fetch_row (result); if (row != NULL) { drv_max_packet = strtoul (row[1], NULL, 0); if (drv_max_packet == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_init_storage: failed converting %s to max_allowed_packet", row[1]); drv_max_packet = 1000000; } } } mysql_free_result (result); } } return drv_max_packet; } int dspam_init_driver (DRIVER_CTX *DTX) { #if defined(MYSQL4_INITIALIZATION) && defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 40001 const char *server_default_groups[]= { "server", "embedded", "mysql_SERVER", 0 }; #if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 50003 if (mysql_library_init(0, NULL, (char**) server_default_groups)) { LOGDEBUG("dspam_init_driver: failed initializing MySQL driver"); return EFAILURE; } #else if (mysql_server_init(0, NULL, (char**) server_default_groups)) { LOGDEBUG("dspam_init_driver: failed initializing MySQL driver"); return EFAILURE; } #endif #endif if (DTX == NULL) return 0; /* Establish a series of stateful connections */ if (DTX->flags & DRF_STATEFUL) { int i, connection_cache = 3; if (_ds_read_attribute(DTX->CTX->config->attributes, "MySQLConnectionCache")) connection_cache = atoi(_ds_read_attribute(DTX->CTX->config->attributes, "MySQLConnectionCache")); DTX->connection_cache = connection_cache; DTX->connections = calloc(1, sizeof(struct _ds_drv_connection *)*connection_cache); if (DTX->connections == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } for(i=0;iconnections[i] = calloc(1, sizeof(struct _ds_drv_connection)); if (DTX->connections[i]) { #ifdef DAEMON LOGDEBUG("dspam_init_driver: initializing lock %d", i); pthread_mutex_init(&DTX->connections[i]->lock, NULL); #endif DTX->connections[i]->dbh = (void *) _ds_connect(DTX->CTX); } } } return 0; } int dspam_shutdown_driver (DRIVER_CTX *DTX) { if (DTX != NULL) { if (DTX->flags & DRF_STATEFUL && DTX->connections) { int i; for(i=0;iconnection_cache;i++) { if (DTX->connections[i]) { if (DTX->connections[i]->dbh) { _mysql_drv_dbh_t dbt = (_mysql_drv_dbh_t) DTX->connections[i]->dbh; mysql_close(dbt->dbh_read); if (dbt->dbh_write != dbt->dbh_read) mysql_close(dbt->dbh_write); } #ifdef DAEMON LOGDEBUG("dspam_shutdown_driver: destroying lock %d", i); pthread_mutex_destroy(&DTX->connections[i]->lock); #endif free(DTX->connections[i]); } } free(DTX->connections); DTX->connections = NULL; } } #if defined(MYSQL4_INITIALIZATION) && defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 40001 #if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 50003 mysql_library_end(); #else mysql_server_end(); #endif #endif return 0; } int _mysql_drv_get_spamtotals (DSPAM_CTX * CTX) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; char query[512]; struct passwd *p; char *name; MYSQL_RES *result; MYSQL_ROW row; int query_rc = 0; int query_errno = 0; struct _ds_spam_totals user, group; int uid = -1, gid = -1; result = NULL; if (s->dbt == NULL) { LOGDEBUG ("_mysql_drv_get_spamtotals: invalid database handle (NULL)"); return EINVAL; } memset(&s->control_totals, 0, sizeof(struct _ds_spam_totals)); if (CTX->flags & DSF_MERGED) { memset(&s->merged_totals, 0, sizeof(struct _ds_spam_totals)); memset(&group, 0, sizeof(struct _ds_spam_totals)); } memset(&CTX->totals, 0, sizeof(struct _ds_spam_totals)); memset(&user, 0, sizeof(struct _ds_spam_totals)); if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_mysql_drv_get_spamtotals: unable to _mysql_drv_getpwnam(%s)", name); if (!(CTX->flags & DSF_MERGED)) return EINVAL; } else { uid = (int) p->pw_uid; } if (CTX->group != NULL && CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->group); if (p == NULL) { LOGDEBUG ("_mysql_drv_get_spamtotals: unable to _mysql_drv_getpwnam(%s)", CTX->group); return EINVAL; } gid = (int) p->pw_uid; } if (gid < 0) gid = uid; if (gid != uid) snprintf (query, sizeof (query), "SELECT uid,spam_learned,innocent_learned," "spam_misclassified,innocent_misclassified," "spam_corpusfed,innocent_corpusfed," "spam_classified,innocent_classified" " FROM dspam_stats WHERE uid IN ('%d','%d')", (int) uid, (int) gid); else snprintf (query, sizeof (query), "SELECT uid,spam_learned,innocent_learned," "spam_misclassified,innocent_misclassified," "spam_corpusfed,innocent_corpusfed," "spam_classified,innocent_classified" " FROM dspam_stats WHERE uid='%d'", (int) uid); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_read); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_read), query); LOGDEBUG ("_mysql_drv_get_spamtotals: unable to run query: %s", query); return EFAILURE; } result = mysql_use_result (s->dbt->dbh_read); if (result == NULL) { LOGDEBUG("_mysql_drv_get_spamtotals: failed mysql_use_result()"); return EFAILURE; } while ((row = mysql_fetch_row (result)) != NULL) { int rid = atoi(row[0]); if (rid == INT_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to rid", row[0]); goto FAIL; } if (rid == uid) { user.spam_learned = strtoul (row[1], NULL, 0); if ((unsigned long int)user.spam_learned == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to user.spam_learned", row[1]); goto FAIL; } user.innocent_learned = strtoul (row[2], NULL, 0); if ((unsigned long int)user.innocent_learned == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to user.innocent_learned", row[2]); goto FAIL; } user.spam_misclassified = strtoul (row[3], NULL, 0); if ((unsigned long int)user.spam_misclassified == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to user.spam_misclassified", row[3]); goto FAIL; } user.innocent_misclassified = strtoul (row[4], NULL, 0); if ((unsigned long int)user.innocent_misclassified == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to user.innocent_misclassified", row[4]); goto FAIL; } user.spam_corpusfed = strtoul (row[5], NULL, 0); if ((unsigned long int)user.spam_corpusfed == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to user.spam_corpusfed", row[5]); goto FAIL; } user.innocent_corpusfed = strtoul (row[6], NULL, 0); if ((unsigned long int)user.innocent_corpusfed == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to user.innocent_corpusfed", row[6]); goto FAIL; } if (row[7] != NULL && row[8] != NULL) { user.spam_classified = strtoul (row[7], NULL, 0); if ((unsigned long int)user.spam_classified == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to user.spam_classified", row[7]); goto FAIL; } user.innocent_classified = strtoul (row[8], NULL, 0); if ((unsigned long int)user.innocent_classified == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to user.innocent_classified", row[8]); goto FAIL; } } else { user.spam_classified = 0; user.innocent_classified = 0; } } else { group.spam_learned = strtoul (row[1], NULL, 0); if ((unsigned long int)group.spam_learned == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to group.spam_learned", row[1]); goto FAIL; } group.innocent_learned = strtoul (row[2], NULL, 0); if ((unsigned long int)group.innocent_learned == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to group.innocent_learned", row[2]); goto FAIL; } group.spam_misclassified = strtoul (row[3], NULL, 0); if ((unsigned long int)group.spam_misclassified == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to group.spam_misclassified", row[3]); goto FAIL; } group.innocent_misclassified = strtoul (row[4], NULL, 0); if ((unsigned long int)group.innocent_misclassified == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to group.innocent_misclassified", row[4]); goto FAIL; } group.spam_corpusfed = strtoul (row[5], NULL, 0); if ((unsigned long int)group.spam_corpusfed == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to group.spam_corpusfed", row[5]); goto FAIL; } group.innocent_corpusfed = strtoul (row[6], NULL, 0); if ((unsigned long int)group.innocent_corpusfed == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to group.innocent_corpusfed", row[6]); goto FAIL; } if (row[7] != NULL && row[8] != NULL) { group.spam_classified = strtoul (row[7], NULL, 0); if ((unsigned long int)group.spam_classified == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to group.spam_classified", row[7]); goto FAIL; } group.innocent_classified = strtoul (row[8], NULL, 0); if ((unsigned long int)group.innocent_classified == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_get_spamtotals: failed converting %s to group.innocent_classified", row[8]); goto FAIL; } } else { group.spam_classified = 0; group.innocent_classified = 0; } } } mysql_free_result (result); result = NULL; if (CTX->flags & DSF_MERGED) { memcpy(&s->merged_totals, &group, sizeof(struct _ds_spam_totals)); memcpy(&s->control_totals, &user, sizeof(struct _ds_spam_totals)); CTX->totals.spam_learned = user.spam_learned + group.spam_learned; CTX->totals.innocent_learned = user.innocent_learned + group.innocent_learned; CTX->totals.spam_misclassified = user.spam_misclassified + group.spam_misclassified; CTX->totals.innocent_misclassified = user.innocent_misclassified + group.innocent_misclassified; CTX->totals.spam_corpusfed = user.spam_corpusfed + group.spam_corpusfed; CTX->totals.innocent_corpusfed = user.innocent_corpusfed + group.innocent_corpusfed; CTX->totals.spam_classified = user.spam_classified + group.spam_classified; CTX->totals.innocent_classified = user.innocent_classified + group.innocent_classified; } else { memcpy(&CTX->totals, &user, sizeof(struct _ds_spam_totals)); memcpy(&s->control_totals, &user, sizeof(struct _ds_spam_totals)); } return 0; FAIL: mysql_free_result (result); result = NULL; return EFAILURE; } int _mysql_drv_set_spamtotals (DSPAM_CTX * CTX) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; struct passwd *p; char *name; char query[1024]; int query_rc = 0; int query_errno = 0; int update_any = 0; struct _ds_spam_totals user; if (s->dbt == NULL) { LOGDEBUG ("_mysql_drv_set_spamtotals: invalid database handle (NULL)"); return EINVAL; } if (CTX->operating_mode == DSM_CLASSIFY) { _mysql_drv_get_spamtotals (CTX); /* undo changes to in memory totals */ return 0; } if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_mysql_drv_set_spamtotals: unable to _mysql_drv_getpwnam(%s)", name); return EINVAL; } /* Subtract the group totals from our active set */ if (CTX->flags & DSF_MERGED) { memcpy(&user, &CTX->totals, sizeof(struct _ds_spam_totals)); CTX->totals.innocent_learned -= s->merged_totals.innocent_learned; CTX->totals.spam_learned -= s->merged_totals.spam_learned; CTX->totals.innocent_misclassified -= s->merged_totals.innocent_misclassified; CTX->totals.spam_misclassified -= s->merged_totals.spam_misclassified; CTX->totals.innocent_corpusfed -= s->merged_totals.innocent_corpusfed; CTX->totals.spam_corpusfed -= s->merged_totals.spam_corpusfed; CTX->totals.innocent_classified -= s->merged_totals.innocent_classified; CTX->totals.spam_classified -= s->merged_totals.spam_classified; if (CTX->totals.innocent_learned < 0) CTX->totals.innocent_learned = 0; if (CTX->totals.spam_learned < 0) CTX->totals.spam_learned = 0; if (CTX->totals.innocent_misclassified < 0) CTX->totals.innocent_misclassified = 0; if (CTX->totals.spam_misclassified < 0) CTX->totals.spam_misclassified = 0; if (CTX->totals.innocent_corpusfed < 0) CTX->totals.innocent_corpusfed = 0; if (CTX->totals.spam_corpusfed < 0) CTX->totals.spam_corpusfed = 0; if (CTX->totals.innocent_classified < 0) CTX->totals.innocent_classified = 0; if (CTX->totals.spam_classified < 0) CTX->totals.spam_classified = 0; } if (s->control_totals.innocent_learned == 0) { snprintf (query, sizeof (query), "INSERT INTO dspam_stats (uid,spam_learned,innocent_learned," "spam_misclassified,innocent_misclassified," "spam_corpusfed,innocent_corpusfed," "spam_classified,innocent_classified)" " VALUES (%d,%lu,%lu,%lu,%lu,%lu,%lu,%lu,%lu)", (int) p->pw_uid, CTX->totals.spam_learned, CTX->totals.innocent_learned, CTX->totals.spam_misclassified, CTX->totals.innocent_misclassified, CTX->totals.spam_corpusfed, CTX->totals.innocent_corpusfed, CTX->totals.spam_classified, CTX->totals.innocent_classified); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); } } } else { query_rc = -1; } if (query_rc) { /* Do not update stats if all values are zero (aka: no update needed) */ if (!(abs(CTX->totals.spam_learned - s->control_totals.spam_learned) == 0 && abs(CTX->totals.innocent_learned - s->control_totals.innocent_learned) == 0 && abs(CTX->totals.spam_misclassified - s->control_totals.spam_misclassified) == 0 && abs(CTX->totals.innocent_misclassified - s->control_totals.innocent_misclassified) == 0 && abs(CTX->totals.spam_corpusfed - s->control_totals.spam_corpusfed) == 0 && abs(CTX->totals.innocent_corpusfed - s->control_totals.innocent_corpusfed) == 0 && abs(CTX->totals.spam_classified - s->control_totals.spam_classified) == 0 && abs(CTX->totals.innocent_classified - s->control_totals.innocent_classified) == 0)) { buffer *buf; buf = buffer_create (NULL); if (buf == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); if (CTX->flags & DSF_MERGED) memcpy(&CTX->totals, &user, sizeof(struct _ds_spam_totals)); return EUNKNOWN; } snprintf (query, sizeof (query), "UPDATE dspam_stats SET "); buffer_copy (buf, query); /* Do not update spam learned if no change is needed */ if (abs (CTX->totals.spam_learned - s->control_totals.spam_learned) != 0) { snprintf (query, sizeof (query), "%sspam_learned=spam_learned%s%d", (update_any) ? "," : "", (CTX->totals.spam_learned > s->control_totals.spam_learned) ? "+" : "-", abs (CTX->totals.spam_learned - s->control_totals.spam_learned)); update_any = 1; buffer_cat (buf, query); } /* Do not update innocent learned if no change is needed */ if (abs (CTX->totals.innocent_learned - s->control_totals.innocent_learned) != 0) { snprintf (query, sizeof (query), "%sinnocent_learned=innocent_learned%s%d", (update_any) ? "," : "", (CTX->totals.innocent_learned > s->control_totals.innocent_learned) ? "+" : "-", abs (CTX->totals.innocent_learned - s->control_totals.innocent_learned)); update_any = 1; buffer_cat (buf, query); } /* Do not update spam misclassified if no change is needed */ if (abs (CTX->totals.spam_misclassified - s->control_totals.spam_misclassified) != 0) { snprintf (query, sizeof (query), "%sspam_misclassified=spam_misclassified%s%d", (update_any) ? "," : "", (CTX->totals.spam_misclassified > s->control_totals.spam_misclassified) ? "+" : "-", abs (CTX->totals.spam_misclassified - s->control_totals.spam_misclassified)); update_any = 1; buffer_cat (buf, query); } /* Do not update innocent misclassified if no change is needed */ if (abs (CTX->totals.innocent_misclassified - s->control_totals.innocent_misclassified) != 0) { snprintf (query, sizeof (query), "%sinnocent_misclassified=innocent_misclassified%s%d", (update_any) ? "," : "", (CTX->totals.innocent_misclassified > s->control_totals.innocent_misclassified) ? "+" : "-", abs (CTX->totals.innocent_misclassified - s->control_totals.innocent_misclassified)); update_any = 1; buffer_cat (buf, query); } /* Do not update spam corpusfed if no change is needed */ if (abs (CTX->totals.spam_corpusfed - s->control_totals.spam_corpusfed) != 0) { snprintf (query, sizeof (query), "%sspam_corpusfed=spam_corpusfed%s%d", (update_any) ? "," : "", (CTX->totals.spam_corpusfed > s->control_totals.spam_corpusfed) ? "+" : "-", abs (CTX->totals.spam_corpusfed - s->control_totals.spam_corpusfed)); update_any = 1; buffer_cat (buf, query); } /* Do not update innocent corpusfed if no change is needed */ if (abs (CTX->totals.innocent_corpusfed - s->control_totals.innocent_corpusfed) != 0) { snprintf (query, sizeof (query), "%sinnocent_corpusfed=innocent_corpusfed%s%d", (update_any) ? "," : "", (CTX->totals.innocent_corpusfed > s->control_totals.innocent_corpusfed) ? "+" : "-", abs (CTX->totals.innocent_corpusfed - s->control_totals.innocent_corpusfed)); update_any = 1; buffer_cat (buf, query); } /* Do not update spam classified if no change is needed */ if (abs (CTX->totals.spam_classified - s->control_totals.spam_classified) != 0) { snprintf (query, sizeof (query), "%sspam_classified=spam_classified%s%d", (update_any) ? "," : "", (CTX->totals.spam_classified > s->control_totals.spam_classified) ? "+" : "-", abs (CTX->totals.spam_classified - s->control_totals.spam_classified)); update_any = 1; buffer_cat (buf, query); } /* Do not update innocent classified if no change is needed */ if (abs (CTX->totals.innocent_classified - s->control_totals.innocent_classified) != 0) { snprintf (query, sizeof (query), "%sinnocent_classified=innocent_classified%s%d", (update_any) ? "," : "", (CTX->totals.innocent_classified > s->control_totals.innocent_classified) ? "+" : "-", abs (CTX->totals.innocent_classified - s->control_totals.innocent_classified)); buffer_cat (buf, query); } snprintf (query, sizeof (query), " WHERE uid=%d", (int) p->pw_uid); buffer_cat (buf, query); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, buf->data); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, buf->data); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), buf->data); LOGDEBUG ("_mysql_drv_set_spamtotals: unable to run query: %s", buf->data); if (CTX->flags & DSF_MERGED) memcpy(&CTX->totals, &user, sizeof(struct _ds_spam_totals)); buffer_destroy (buf); return EFAILURE; } buffer_destroy (buf); } } if (CTX->flags & DSF_MERGED) memcpy(&CTX->totals, &user, sizeof(struct _ds_spam_totals)); return 0; } int _ds_getall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; struct passwd *p; char *name; buffer *query; ds_term_t ds_term; ds_cursor_t ds_c; char scratch[1024]; char queryhead[1024]; MYSQL_RES *result; MYSQL_ROW row; int query_rc = 0; int query_errno = 0; struct _ds_spam_stat stat; unsigned long long token = 0; int uid = -1, gid = -1; result = NULL; if (diction->items < 1) return 0; if (s->dbt == NULL) { LOGDEBUG ("_ds_getall_spamrecords: invalid database handle (NULL)"); return EINVAL; } if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_ds_getall_spamrecords: unable to _mysql_drv_getpwnam(%s)", name); return EINVAL; } uid = (int) p->pw_uid; if (CTX->group != NULL && CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->group); if (p == NULL) { LOGDEBUG ("_ds_getall_spamrecords: unable to _mysql_drv_getpwnam(%s)", CTX->group); return EINVAL; } gid = (int) p->pw_uid; } if (gid < 0) gid = uid; stat.spam_hits = 0; stat.innocent_hits = 0; stat.probability = 0.00000; /* Get the all spam records but split the query when the query size + 1024 * reaches max_allowed_packet */ query = buffer_create (NULL); if (query == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } if (uid != gid) { snprintf (queryhead, sizeof(queryhead), "SELECT uid,token,spam_hits,innocent_hits" " FROM dspam_token_data WHERE uid IN (%d,%d) AND token IN (", (int) uid, (int) gid); } else { snprintf (queryhead, sizeof(queryhead), "SELECT uid,token,spam_hits,innocent_hits" " FROM dspam_token_data WHERE uid=%d AND token IN (", (int) uid); } ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while (ds_term) { scratch[0] = 0; buffer_copy(query, queryhead); while (ds_term) { snprintf (scratch, sizeof (scratch), "'%llu'", ds_term->key); buffer_cat (query, scratch); ds_term->s.innocent_hits = 0; ds_term->s.spam_hits = 0; ds_term->s.probability = 0.00000; ds_term->s.status = 0; if((unsigned long)(query->used + 1024) > _mysql_driver_get_max_packet(s->dbt->dbh_read)) { LOGDEBUG("_ds_getall_spamrecords: Splitting query at %ld characters", query->used); break; } ds_term = ds_diction_next(ds_c); if (ds_term) buffer_cat (query, ","); } buffer_cat (query, ")"); #ifdef VERBOSE LOGDEBUG ("mysql query length: %ld\n", query->used); _mysql_drv_query_error ("VERBOSE DEBUG (INFO ONLY - NOT AN ERROR)", query->data); #endif query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query->data); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_read); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query->data); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_read), query->data); LOGDEBUG ("_ds_getall_spamrecords: unable to run query: %s", query->data); buffer_destroy(query); ds_diction_close(ds_c); return EFAILURE; } result = mysql_use_result (s->dbt->dbh_read); if (result == NULL) { LOGDEBUG("_ds_getall_spamrecords: failed mysql_use_result()"); buffer_destroy(query); ds_diction_close(ds_c); return EFAILURE; } while ((row = mysql_fetch_row (result)) != NULL) { int rid = atoi(row[0]); if (rid == INT_MAX && errno == ERANGE) { LOGDEBUG("_ds_getall_spamrecords: failed converting %s to rid", row[0]); ds_diction_close(ds_c); goto FAIL; } token = strtoull (row[1], NULL, 0); if (token == ULLONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_getall_spamrecords: failed converting %s to token", row[1]); ds_diction_close(ds_c); goto FAIL; } stat.spam_hits = strtoul (row[2], NULL, 0); if ((unsigned long int)stat.spam_hits == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_getall_spamrecords: failed converting %s to stat.spam_hits", row[2]); ds_diction_close(ds_c); goto FAIL; } stat.innocent_hits = strtoul (row[3], NULL, 0); if ((unsigned long int)stat.innocent_hits == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_getall_spamrecords: failed converting %s to stat.innocent_hits", row[3]); ds_diction_close(ds_c); goto FAIL; } stat.status = 0; if (rid == uid) stat.status |= TST_DISK; ds_diction_addstat(diction, token, &stat); } mysql_free_result (result); result = NULL; ds_term = ds_diction_next(ds_c); } ds_diction_close(ds_c); buffer_destroy (query); mysql_free_result (result); result = NULL; /* Control token */ stat.spam_hits = 10; stat.innocent_hits = 10; stat.status = 0; ds_diction_touch(diction, CONTROL_TOKEN, "$$CONTROL$$", 0); ds_diction_addstat(diction, CONTROL_TOKEN, &stat); s->control_token = CONTROL_TOKEN; s->control_ih = 10; s->control_sh = 10; return 0; FAIL: mysql_free_result (result); result = NULL; return EFAILURE; } int _ds_setall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; struct _ds_spam_stat control, stat; ds_term_t ds_term; ds_cursor_t ds_c; char queryhead[1024]; buffer *query; char scratch[1024]; buffer *buf; int query_rc = 0; int query_errno = 0; struct passwd *p; char *name; int update_any = 0; #if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 40100 char inserthead[1024]; buffer *insert; int insert_any = 0; #endif if (diction->items < 1) return 0; if (s->dbt == NULL) { LOGDEBUG ("_ds_setall_spamrecords: invalid database handle (NULL)"); return EINVAL; } if (CTX->operating_mode == DSM_CLASSIFY && (CTX->training_mode != DST_TOE || (diction->whitelist_token == 0 && (!(CTX->flags & DSF_NOISE))))) return 0; if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_ds_setall_spamrecords: unable to _mysql_drv_getpwnam(%s)", name); return EINVAL; } query = buffer_create (NULL); if (query == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } buf = buffer_create (NULL); if (buf == NULL) { buffer_destroy(query); LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } #if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 40100 insert = buffer_create(NULL); if (insert == NULL) { buffer_destroy(query); buffer_destroy(buf); LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } #endif ds_diction_getstat(diction, s->control_token, &control); snprintf (scratch, sizeof (scratch), "UPDATE dspam_token_data SET last_hit=CURRENT_DATE()"); buffer_copy (buf, scratch); /* Do not update spam hits if no change is needed */ int sh_adiff = abs(control.spam_hits - s->control_sh); if (sh_adiff != 0) { if (control.spam_hits > s->control_sh) { snprintf (scratch, sizeof (scratch), ",spam_hits=spam_hits+%d", sh_adiff); } else { snprintf (scratch, sizeof (scratch), ",spam_hits=IF(spam_hits<%d,0,spam_hits-%d)", sh_adiff + 1, sh_adiff); } buffer_cat (buf, scratch); } /* Do not update innocent hits if no change is needed */ int ih_adiff = abs(control.innocent_hits - s->control_ih); if (ih_adiff != 0) { if (control.innocent_hits > s->control_ih) { snprintf (scratch, sizeof (scratch), ",innocent_hits=innocent_hits+%d", ih_adiff); } else { snprintf (scratch, sizeof (scratch), ",innocent_hits=IF(innocent_hits<%d,0,innocent_hits-%d)", ih_adiff + 1, ih_adiff); } buffer_cat (buf, scratch); } snprintf (scratch, sizeof (scratch), " WHERE uid=%d AND token IN (", (int) p->pw_uid); buffer_cat (buf, scratch); /* Query head used for update */ snprintf (queryhead, sizeof (queryhead), "%s", buf->data); buffer_destroy (buf); buffer_copy (query, queryhead); #if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 40100 snprintf (inserthead, sizeof(inserthead), "INSERT INTO dspam_token_data(uid,token,spam_hits," "innocent_hits,last_hit) VALUES"); buffer_copy (insert, inserthead); #endif /* * Add each token in the diction to either an update or an insert queue */ ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while(ds_term) { int use_comma = 0; if (ds_term->key == s->control_token) { ds_term = ds_diction_next(ds_c); continue; } /* Don't write lexical tokens if we're in TOE mode classifying */ if (CTX->training_mode == DST_TOE && CTX->operating_mode == DSM_CLASSIFY && ds_term->key != diction->whitelist_token && (!ds_term->name || strncmp(ds_term->name, "bnr.", 4))) { ds_term = ds_diction_next(ds_c); continue; } ds_diction_getstat(diction, ds_term->key, &stat); /* Changed tokens are marked as "dirty" by libdspam */ if (!(stat.status & TST_DIRTY)) { ds_term = ds_diction_next(ds_c); continue; } else { stat.status &= ~TST_DIRTY; } /* This token wasn't originally loaded from disk, so try an insert */ if (!(stat.status & TST_DISK)) { char ins[1024]; #if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 40100 snprintf (ins, sizeof (ins), "%s(%d,'%llu',%d,%d,CURRENT_DATE())", (insert_any) ? "," : "", (int) p->pw_uid, ds_term->key, stat.spam_hits > 0 ? 1 : 0, stat.innocent_hits > 0 ? 1 : 0); insert_any = 1; buffer_cat(insert, ins); if((unsigned long)(insert->used + 1024) > _mysql_driver_get_max_packet(s->dbt->dbh_write)) { LOGDEBUG("_ds_setall_spamrecords: Splitting insert query at %ld characters", insert->used); if (insert_any) { snprintf (scratch, sizeof (scratch), " ON DUPLICATE KEY UPDATE last_hit=CURRENT_DATE()"); buffer_cat(insert, scratch); /* Do not update spam hits if no change is needed */ if (abs(control.spam_hits - s->control_sh) != 0) { if (control.spam_hits > s->control_sh) { snprintf (scratch, sizeof (scratch), ",spam_hits=spam_hits+1"); } else { snprintf (scratch, sizeof (scratch), ",spam_hits=IF(spam_hits<2,0,spam_hits-1)"); } buffer_cat(insert, scratch); } /* Do not update innocent hits if no change is needed */ if (abs(control.innocent_hits - s->control_ih) != 0) { if (control.innocent_hits > s->control_ih) { snprintf (scratch, sizeof (scratch), ",innocent_hits=innocent_hits+1"); } else { snprintf (scratch, sizeof (scratch), ",innocent_hits=IF(innocent_hits<2,0,innocent_hits-1)"); } buffer_cat(insert, scratch); } query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, insert->data); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, insert->data); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), insert->data); LOGDEBUG ("_ds_setall_spamrecords: unable to run insert query: %s", insert->data); buffer_destroy(insert); return EFAILURE; } } buffer_copy (insert, inserthead); insert_any = 0; } #else snprintf(ins, sizeof (ins), "INSERT INTO dspam_token_data(uid,token,spam_hits," "innocent_hits,last_hit) VALUES (%d,'%llu',%d,%d," "CURRENT_DATE())", p->pw_uid, ds_term->key, stat.spam_hits > 0 ? 1 : 0, stat.innocent_hits > 0 ? 1 : 0); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, ins); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, ins); } } if (query_rc) stat.status |= TST_DISK; #endif } if (stat.status & TST_DISK) { snprintf (scratch, sizeof (scratch), "'%llu'", ds_term->key); buffer_cat (query, scratch); update_any = 1; use_comma = 1; } ds_term->s.status |= TST_DISK; ds_term = ds_diction_next(ds_c); if((unsigned long)(query->used + 1024) > _mysql_driver_get_max_packet(s->dbt->dbh_write)) { LOGDEBUG("_ds_setall_spamrecords: Splitting update query at %ld characters", query->used); buffer_cat (query, ")"); if (update_any) { query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query->data); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query->data); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), query->data); LOGDEBUG ("_ds_setall_spamrecords: unable to run update query: %s", query->data); buffer_destroy(query); ds_diction_close(ds_c); return EFAILURE; } } buffer_copy (query, queryhead); } else if (ds_term && use_comma) buffer_cat (query, ","); } ds_diction_close(ds_c); /* Just incase */ if (query->used && query->data[strlen (query->data) - 1] == ',') { query->used--; query->data[strlen (query->data) - 1] = 0; } buffer_cat (query, ")"); LOGDEBUG("Control: [%ld %ld] [%lu %lu] Delta: [%lu %lu]", s->control_sh, s->control_ih, control.spam_hits, control.innocent_hits, control.spam_hits - s->control_sh, control.innocent_hits - s->control_ih); if (update_any) { query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query->data); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query->data); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), query->data); LOGDEBUG ("_ds_setall_spamrecords: unable to run update query: %s", query->data); buffer_destroy(query); return EFAILURE; } } buffer_destroy (query); #if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 40100 if (insert_any) { snprintf (scratch, sizeof (scratch), " ON DUPLICATE KEY UPDATE last_hit=CURRENT_DATE()"); buffer_cat(insert, scratch); /* Do not update spam hits if no change is needed */ if (abs(control.spam_hits - s->control_sh) != 0) { if (control.spam_hits > s->control_sh) { snprintf (scratch, sizeof (scratch), ",spam_hits=spam_hits+1"); } else { snprintf (scratch, sizeof (scratch), ",spam_hits=IF(spam_hits<2,0,spam_hits-1)"); } buffer_cat(insert, scratch); } /* Do not update innocent hits if no change is needed */ if (abs(control.innocent_hits - s->control_ih) != 0) { if (control.innocent_hits > s->control_ih) { snprintf (scratch, sizeof (scratch), ",innocent_hits=innocent_hits+1"); } else { snprintf (scratch, sizeof (scratch), ",innocent_hits=IF(innocent_hits<2,0,innocent_hits-1)"); } buffer_cat(insert, scratch); } query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, insert->data); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, insert->data); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), insert->data); LOGDEBUG ("_ds_setall_spamrecords: unable to run insert query: %s", insert->data); buffer_destroy(insert); return EFAILURE; } } buffer_destroy(insert); #endif return 0; } int _ds_get_spamrecord (DSPAM_CTX * CTX, unsigned long long token, struct _ds_spam_stat *stat) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; char query[1024]; struct passwd *p; char *name; MYSQL_RES *result; MYSQL_ROW row; int query_rc = 0; int query_errno = 0; result = NULL; if (s->dbt == NULL) { LOGDEBUG ("_ds_get_spamrecord: invalid database handle (NULL)"); return EINVAL; } if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_ds_get_spamrecord: unable to _mysql_drv_getpwnam(%s)", name); return EINVAL; } snprintf (query, sizeof (query), "SELECT spam_hits,innocent_hits FROM dspam_token_data" " WHERE uid=%d AND token IN ('%llu')", (int) p->pw_uid, token); stat->probability = 0.00000; stat->spam_hits = 0; stat->innocent_hits = 0; stat->status &= ~TST_DISK; query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_read); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_read), query); LOGDEBUG ("_ds_get_spamrecord: unable to run query: %s", query); return EFAILURE; } result = mysql_use_result (s->dbt->dbh_read); if (result == NULL) { LOGDEBUG("_ds_get_spamrecord: failed mysql_use_result()"); return EFAILURE; } row = mysql_fetch_row (result); if (row == NULL) { mysql_free_result (result); result = NULL; return 0; } stat->spam_hits = strtoul (row[0], NULL, 0); if ((unsigned long int)stat->spam_hits == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_spamrecord: failed converting %s to stat->spam_hits", row[0]); mysql_free_result (result); result = NULL; return EFAILURE; } stat->innocent_hits = strtoul (row[1], NULL, 0); if ((unsigned long int)stat->innocent_hits == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_spamrecord: failed converting %s to stat->innocent_hits", row[1]); mysql_free_result (result); result = NULL; return EFAILURE; } stat->status |= TST_DISK; mysql_free_result (result); result = NULL; return 0; } int _ds_set_spamrecord (DSPAM_CTX * CTX, unsigned long long token, struct _ds_spam_stat *stat) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; char query[1024]; struct passwd *p; char *name; int query_rc = 0; int query_errno = 0; if (s->dbt == NULL) { LOGDEBUG ("_ds_set_spamrecord: invalid database handle (NULL)"); return EINVAL; } if (CTX->operating_mode == DSM_CLASSIFY) return 0; if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_ds_set_spamrecord: unable to _mysql_drv_getpwnam(%s)", name); return EINVAL; } #if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 40001 /* It's either not on disk or the caller isn't using stat.status */ if (!(stat->status & TST_DISK)) { snprintf (query, sizeof (query), "INSERT INTO dspam_token_data (uid,token,spam_hits,innocent_hits,last_hit)" " VALUES (%d,'%llu',%lu,%lu,CURRENT_DATE())" " ON DUPLICATE KEY UPDATE" " spam_hits=%lu," "innocent_hits=%lu," "last_hit=CURRENT_DATE()", (int) p->pw_uid, token, stat->spam_hits, stat->innocent_hits, stat->spam_hits, stat->innocent_hits); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); } } } #else /* It's either not on disk or the caller isn't using stat.status */ if (!(stat->status & TST_DISK)) { snprintf (query, sizeof (query), "INSERT INTO dspam_token_data (uid,token,spam_hits,innocent_hits,last_hit)" " VALUES (%d,'%llu',%lu,%lu,CURRENT_DATE())", (int) p->pw_uid, token, stat->spam_hits, stat->innocent_hits); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); } } } else { query_rc = -1; } if ((stat->status & TST_DISK) || query_rc) { /* insert failed; try updating instead */ snprintf (query, sizeof (query), "UPDATE dspam_token_data" " SET spam_hits=%lu," "innocent_hits=%lu," "last_hit=CURRENT_DATE()," " WHERE uid=%d" " AND token='%llu'", stat->spam_hits, stat->innocent_hits, (int) p->pw_uid, token); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); } } } #endif if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), query); LOGDEBUG ("_ds_set_spamrecord: unable to run query: %s", query); return EFAILURE; } return 0; } int _ds_init_storage (DSPAM_CTX * CTX, void *dbh) { struct _mysql_drv_storage *s; _mysql_drv_dbh_t dbt = (_mysql_drv_dbh_t) dbh; if (CTX == NULL) { return EINVAL; } /* don't init if we're already initted */ if (CTX->storage != NULL) { LOGDEBUG ("_ds_init_storage: storage already initialized"); return EINVAL; } if (dbt) { if (dbt->dbh_read) if (mysql_ping(dbt->dbh_read)) { LOGDEBUG ("_ds_init_storage: MySQL server not responding to mysql_ping()"); return EFAILURE; } } s = calloc (1, sizeof (struct _mysql_drv_storage)); if (s == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } s->dbh_attached = (dbt) ? 1 : 0; s->u_getnextuser[0] = 0; memset(&s->p_getpwnam, 0, sizeof(struct passwd)); memset(&s->p_getpwuid, 0, sizeof(struct passwd)); if (dbt) s->dbt = dbt; else s->dbt = _ds_connect(CTX); if (s->dbt == NULL) { LOG (LOG_WARNING, "Unable to initialize handle to MySQL database"); free(s); return EFAILURE; } CTX->storage = s; s->control_token = 0; s->control_ih = 0; s->control_sh = 0; /* get spam totals on successful init */ if (CTX->username != NULL) { if (_mysql_drv_get_spamtotals (CTX)) { LOGDEBUG ("_ds_init_storage: unable to load totals. Using zero values."); } } else { memset (&CTX->totals, 0, sizeof (struct _ds_spam_totals)); memset (&s->control_totals, 0, sizeof (struct _ds_spam_totals)); } return 0; } int _ds_shutdown_storage (DSPAM_CTX * CTX) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; if (CTX->storage == NULL) { LOGDEBUG ("_ds_shutdown_storage: called with NULL storage handle"); return EINVAL; } if (s->dbt == NULL) { LOGDEBUG ("_ds_shutdown_storage: invalid database handle (NULL)"); return EINVAL; } /* Store spam totals on shutdown */ if (CTX->username != NULL && CTX->operating_mode != DSM_CLASSIFY) { _mysql_drv_set_spamtotals (CTX); } if (s->iter_user != NULL) { mysql_free_result (s->iter_user); s->iter_user = NULL; } if (s->iter_token != NULL) { mysql_free_result (s->iter_token); s->iter_token = NULL; } if (s->iter_sig != NULL) { mysql_free_result (s->iter_sig); s->iter_sig = NULL; } if (! s->dbh_attached) { mysql_close (s->dbt->dbh_read); if (s->dbt->dbh_write != s->dbt->dbh_read) mysql_close (s->dbt->dbh_write); if (s->dbt) free(s->dbt); } s->dbt = NULL; if (s->p_getpwnam.pw_name) free(s->p_getpwnam.pw_name); if (s->p_getpwuid.pw_name) free(s->p_getpwuid.pw_name); free(s); CTX->storage = NULL; return 0; } int _ds_create_signature_id (DSPAM_CTX * CTX, char *buf, size_t len) { char session[64]; char digit[6]; int pid, j; struct passwd *p; char *name; pid = getpid (); /* TODO if (_mysql_drv_get_UIDInSignature(CTX)) */ if (_ds_match_attribute(CTX->config->attributes, "MySQLUIDInSignature", "on")) { if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (!p) { LOG(LOG_ERR, "Unable to determine UID for %s", name); return EINVAL; } snprintf (session, sizeof (session), "%d,%8lx%d", (int) p->pw_uid, (long) time(NULL), pid); } else snprintf (session, sizeof (session), "%8lx%d", (long) time (NULL), pid); for (j = 0; j < 2; j++) { snprintf (digit, 6, "%d", rand ()); strlcat (session, digit, 64); } strlcpy (buf, session, len); return 0; } int _ds_get_signature (DSPAM_CTX * CTX, struct _ds_spam_signature *SIG, const char *signature) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; struct passwd *p; char *name; unsigned long *lengths; char *mem; char query[256]; MYSQL_RES *result; MYSQL_ROW row; int uid = -1; MYSQL *dbh; result = NULL; if (s->dbt == NULL) { LOGDEBUG ("_ds_get_signature: invalid database handle (NULL)"); return EINVAL; } dbh = _mysql_drv_sig_write_handle(CTX, s); if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_ds_get_signature: unable to _mysql_drv_getpwnam(%s)", name); return EINVAL; } /* TODO if (_mysql_drv_get_UIDInSignature(CTX)) */ if (_ds_match_attribute(CTX->config->attributes, "MySQLUIDInSignature", "on")) { char *u, *sig, *username; void *dbt = s->dbt; int dbh_attached = s->dbh_attached; sig = strdup(signature); u = strchr(sig, ','); if (!u) { LOGDEBUG("_ds_get_signature: unable to locate uid in signature"); free(sig); sig = NULL; return EFAILURE; } u[0] = 0; u = sig; uid = atoi(u); free(sig); sig = NULL; /* Change the context's username and reinitialize storage */ p = _mysql_drv_getpwuid (CTX, uid); if (p == NULL) { LOG(LOG_CRIT, "_ds_get_signature: _mysql_drv_getpwuid(%d) failed: aborting", uid); return EFAILURE; } username = strdup(p->pw_name); _ds_shutdown_storage(CTX); free(CTX->username); CTX->username = username; _ds_init_storage(CTX, (dbh_attached) ? dbt : NULL); s = (struct _mysql_drv_storage *) CTX->storage; dbh = _mysql_drv_sig_write_handle(CTX, s); } if (uid == -1) { uid = (int) p->pw_uid; } snprintf (query, sizeof (query), "SELECT data,length FROM dspam_signature_data WHERE uid=%d AND signature=\"%s\"", (int) uid, signature); if (mysql_real_query (dbh, query, strlen (query))) { _mysql_drv_query_error (mysql_error (dbh), query); LOGDEBUG ("_ds_get_signature: unable to run query: %s", query); return EFAILURE; } result = mysql_use_result (dbh); if (result == NULL) { LOGDEBUG("_ds_get_signature: failed mysql_use_result()"); return EFAILURE; } row = mysql_fetch_row (result); if (row == NULL) { LOGDEBUG("_ds_get_signature: mysql_fetch_row() failed"); mysql_free_result (result); result = NULL; return EFAILURE; } lengths = mysql_fetch_lengths (result); if (lengths == NULL || lengths[0] == 0) { LOGDEBUG("_ds_get_signature: mysql_fetch_lengths() failed"); mysql_free_result (result); result = NULL; return EFAILURE; } mem = malloc (lengths[0]); if (mem == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); mysql_free_result (result); result = NULL; return EUNKNOWN; } memcpy (mem, row[0], lengths[0]); if (SIG->data) free(SIG->data); SIG->data = mem; SIG->length = strtoul (row[1], NULL, 0); if (SIG->length == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_signature: failed converting %s to signature data length", row[1]); SIG->length = lengths[0]; } mysql_free_result (result); result = NULL; return 0; } int _ds_set_signature (DSPAM_CTX * CTX, struct _ds_spam_signature *SIG, const char *signature) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; unsigned long length; char *mem; char scratch[1024]; buffer *query; struct passwd *p; char *name; if (s->dbt == NULL) { LOGDEBUG ("_ds_set_signature: invalid database handle (NULL)"); return EINVAL; } if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_ds_set_signature: unable to _mysql_drv_getpwnam(%s)", name); return EINVAL; } query = buffer_create (NULL); if (query == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } mem = calloc(1, (SIG->length*2)+1); if (mem == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); buffer_destroy(query); return EUNKNOWN; } length = mysql_real_escape_string (s->dbt->dbh_write, mem, SIG->data, SIG->length); if(length+1024 > _mysql_driver_get_max_packet(s->dbt->dbh_write)) { LOG (LOG_WARNING, "_ds_set_signature: signature data to big to be inserted"); LOG (LOG_WARNING, "_ds_set_signature: consider increasing max_allowed_packet to at least %llu", length+1025); return EINVAL; } snprintf (scratch, sizeof (scratch), "INSERT INTO dspam_signature_data (uid,signature,length,created_on,data) VALUES (%d,\"%s\",%lu,CURRENT_DATE(),\"", (int) p->pw_uid, signature, (unsigned long) SIG->length); buffer_cat (query, scratch); buffer_cat (query, mem); buffer_cat (query, "\")"); free(mem); mem = NULL; if (mysql_real_query (s->dbt->dbh_write, query->data, query->used)) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), query->data); LOGDEBUG ("_ds_set_signature: unable to run query: %s", query->data); buffer_destroy(query); return EFAILURE; } buffer_destroy(query); return 0; } int _ds_delete_signature (DSPAM_CTX * CTX, const char *signature) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; struct passwd *p; char *name; char query[256]; int query_rc = 0; int query_errno = 0; if (s->dbt == NULL) { LOGDEBUG ("_ds_delete_signature: invalid database handle (NULL)"); return EINVAL; } if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_ds_delete_signature: unable to _mysql_drv_getpwnam(%s)", name); return EINVAL; } snprintf (query, sizeof (query), "DELETE FROM dspam_signature_data WHERE uid=%d AND signature=\"%s\"", (int) p->pw_uid, signature); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), query); LOGDEBUG ("_ds_delete_signature: unable to run query: %s", query); return EFAILURE; } return 0; } int _ds_verify_signature (DSPAM_CTX * CTX, const char *signature) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; struct passwd *p; char *name; char query[256]; MYSQL_RES *result; MYSQL_ROW row; int query_rc = 0; int query_errno = 0; result = NULL; if (s->dbt == NULL) { LOGDEBUG ("_ds_verify_signature: invalid database handle (NULL)"); return EINVAL; } if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_ds_verify_signature: unable to _mysql_drv_getpwnam(%s)", name); return EINVAL; } snprintf (query, sizeof (query), "SELECT signature FROM dspam_signature_data WHERE uid=%d AND signature=\"%s\"", (int) p->pw_uid, signature); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_read); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_read), query); LOGDEBUG ("_ds_verify_signature: unable to run query: %s", query); return EFAILURE; } result = mysql_use_result (s->dbt->dbh_read); if (result == NULL) { return -1; } row = mysql_fetch_row (result); if (row == NULL) { mysql_free_result (result); result = NULL; return -1; } mysql_free_result (result); result = NULL; return 0; } /* * _ds_get_nextuser() * * DESCRIPTION * The _ds_get_nextuser() function is called to get the next user from the * classification context. Calling this function repeatedly will return all * users one by one. * * RETURN VALUES * returns username on success, NULL on failure or when all usernames have * already been returned for the classification context. When there are no * more users to return then iter_user of the storage driver is set to NULL. */ char * _ds_get_nextuser (DSPAM_CTX * CTX) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; #ifndef VIRTUAL_USERS struct passwd *p; #else char *virtual_table, *virtual_username; #endif uid_t uid; char query[512]; MYSQL_ROW row; int query_rc = 0; int query_errno = 0; #ifdef VIRTUAL_USERS if ((virtual_table = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualTable"))==NULL) { virtual_table = "dspam_virtual_uids"; } if ((virtual_username = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualUsernameField")) ==NULL) { virtual_username = "username"; } #endif if (s->dbt == NULL) { LOGDEBUG ("_ds_get_nextuser: invalid database handle (NULL)"); return NULL; } if (s->iter_user == NULL) { #ifdef VIRTUAL_USERS /* TODO char *virtual_table, *virtual_username; virtual_table = _mysql_drv_get_virtual_table(CTX); virtual_username = _mysql_drv_get_virtual_username_field(CTX); */ snprintf(query, sizeof(query), "SELECT DISTINCT %s FROM %s", virtual_username, virtual_table); #else strncpy (query, "SELECT DISTINCT uid FROM dspam_stats", sizeof(query)); #endif query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_read); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_read), query); LOGDEBUG ("_ds_get_nextuser: unable to run query: %s", query); return NULL; } s->iter_user = mysql_use_result (s->dbt->dbh_read); if (s->iter_user == NULL) return NULL; } row = mysql_fetch_row (s->iter_user); if (row == NULL) { mysql_free_result (s->iter_user); s->iter_user = NULL; return NULL; } if (row[0]) { uid = (uid_t) atoi (row[0]); if (uid == INT_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_nextuser: failed converting %s to uid", row[0]); return NULL; } } else { LOG (LOG_CRIT, "_ds_get_nextuser: detected empty or NULL uid in stats table"); return NULL; } #ifdef VIRTUAL_USERS strlcpy (s->u_getnextuser, row[0], sizeof (s->u_getnextuser)); #else p = _mysql_drv_getpwuid (CTX, uid); if (p == NULL) return NULL; strlcpy (s->u_getnextuser, p->pw_name, sizeof (s->u_getnextuser)); #endif return s->u_getnextuser; } /* * _ds_get_nexttoken() * * DESCRIPTION * The _ds_get_nexttoken() function is called to get the next token from the * classification context. Calling this function repeatedly will return all * tokens for a user or group one by one. * * RETURN VALUES * returns token on success, NULL on failure or when all tokens have already * been returned for the user or group. When there are no more tokens to return * then iter_token of the storage driver is set to NULL. */ struct _ds_storage_record * _ds_get_nexttoken (DSPAM_CTX * CTX) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; struct _ds_storage_record *st; char query[256]; MYSQL_ROW row; int query_rc = 0; int query_errno = 0; struct passwd *p; char *name; if (s->dbt == NULL) { LOGDEBUG ("_ds_get_nexttoken: invalid database handle (NULL)"); return NULL; } if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_ds_get_nexttoken: unable to _mysql_drv_getpwnam(%s)", name); return NULL; } st = calloc (1,sizeof(struct _ds_storage_record)); if (st == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return NULL; } if (s->iter_token == NULL) { snprintf (query, sizeof (query), "SELECT token,spam_hits,innocent_hits,unix_timestamp(last_hit) FROM dspam_token_data WHERE uid=%d", (int) p->pw_uid); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_read); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_read), query); LOGDEBUG ("_ds_get_nexttoken: unable to run query: %s", query); goto FAIL; } s->iter_token = mysql_use_result (s->dbt->dbh_read); if (s->iter_token == NULL) goto FAIL; } row = mysql_fetch_row (s->iter_token); if (row == NULL) { mysql_free_result (s->iter_token); s->iter_token = NULL; goto FAIL; } st->token = strtoull (row[0], NULL, 0); if (st->token == ULLONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_nexttoken: failed converting %s to st->token", row[0]); goto FAIL; } st->spam_hits = strtoul (row[1], NULL, 0); if ((unsigned long int)st->spam_hits == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_nexttoken: failed converting %s to st->spam_hits", row[1]); goto FAIL; } st->innocent_hits = strtoul (row[2], NULL, 0); if ((unsigned long int)st->innocent_hits == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_nexttoken: failed converting %s to st->innocent_hits", row[2]); goto FAIL; } st->last_hit = (time_t) strtol (row[3], NULL, 0); if (st->last_hit == LONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_nexttoken: failed converting %s to st->last_hit", row[3]); goto FAIL; } return st; FAIL: free(st); return NULL; } /* * _ds_get_nextsignature() * * DESCRIPTION * The _ds_get_nextsignature() function is called to get the next signature * from the classification context. Calling this function repeatedly will return * all signatures for a user or group one by one. * * RETURN VALUES * returns signature on success, NULL on failure or when all signatures have * already been returned for the user or group. When there are no more signatures * to return then iter_sig of the storage driver is set to NULL. */ struct _ds_storage_signature * _ds_get_nextsignature (DSPAM_CTX * CTX) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; struct _ds_storage_signature *st; unsigned long *lengths; char query[256]; MYSQL_ROW row; struct passwd *p; char *name; char *mem; if (s->dbt == NULL) { LOGDEBUG ("_ds_get_nextsignature: invalid database handle (NULL)"); return NULL; } if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_ds_get_nextsignature: unable to _mysql_drv_getpwnam(%s)", name); return NULL; } st = calloc (1, sizeof (struct _ds_storage_signature)); if (st == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return NULL; } if (s->iter_sig == NULL) { snprintf (query, sizeof (query), "SELECT data,signature,length,unix_timestamp(created_on) FROM dspam_signature_data WHERE uid=%d", (int) p->pw_uid); if (mysql_real_query (s->dbt->dbh_read, query, strlen (query))) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_read), query); LOGDEBUG ("_ds_get_nextsignature: unable to run query: %s", query); goto FAIL; } s->iter_sig = mysql_use_result (s->dbt->dbh_read); if (s->iter_sig == NULL) goto FAIL; } row = mysql_fetch_row (s->iter_sig); if (row == NULL) { mysql_free_result (s->iter_sig); s->iter_sig = NULL; goto FAIL; } lengths = mysql_fetch_lengths (s->iter_sig); if (lengths == NULL || lengths[0] == 0) goto FAIL; mem = malloc (lengths[0]); if (mem == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); goto FAIL; } memcpy (mem, row[0], lengths[0]); st->data = mem; strlcpy (st->signature, row[1], sizeof (st->signature)); st->length = strtoul (row[2], NULL, 0); if ((unsigned long int)st->length == ULONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_nextsignature: failed converting %s to st->length", row[2]); free(st->data); goto FAIL; } st->created_on = (time_t) strtol (row[3], NULL, 0); if (st->created_on == LONG_MAX && errno == ERANGE) { LOGDEBUG("_ds_get_nextsignature: failed converting %s to st->created_on", row[3]); free(st->data); goto FAIL; } return st; FAIL: free(st); return NULL; } struct passwd * _mysql_drv_getpwnam (DSPAM_CTX * CTX, const char *name) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; int query_rc = 0; int query_errno = 0; #ifndef VIRTUAL_USERS struct passwd *q; #if defined(_REENTRANT) && defined(HAVE_GETPWNAM_R) struct passwd pwbuf; char buf[1024]; #endif if (name == NULL) return NULL; if (s->p_getpwnam.pw_name != NULL) { /* cache the last name queried */ if (name != NULL && !strcmp (s->p_getpwnam.pw_name, name)) return &s->p_getpwnam; free (s->p_getpwnam.pw_name); s->p_getpwnam.pw_name = NULL; s->p_getpwnam.pw_uid = 0; } #if defined(_REENTRANT) && defined(HAVE_GETPWNAM_R) if (getpwnam_r(name, &pwbuf, buf, sizeof(buf), &q)) q = NULL; #else q = getpwnam (name); #endif if (q == NULL) return NULL; s->p_getpwnam.pw_uid = q->pw_uid; s->p_getpwnam.pw_name = strdup (q->pw_name); return &s->p_getpwnam; #else char query[512]; MYSQL_RES *result; MYSQL_ROW row; char *virtual_table, *virtual_uid, *virtual_username; char *sql_username; int name_size = MAX_USERNAME_LENGTH; result = NULL; if ((virtual_table = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualTable"))==NULL) { virtual_table = "dspam_virtual_uids"; } if ((virtual_uid = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualUIDField"))==NULL) { virtual_uid = "uid"; } if ((virtual_username = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualUsernameField")) ==NULL) { virtual_username = "username"; } /* TODO virtual_table = _mysql_drv_get_virtual_table(CTX); virtual_uid = _mysql_drv_get_virtual_uid_field(CTX); virtual_username = _mysql_drv_get_virtual_username_field(CTX); */ if (s->p_getpwnam.pw_name != NULL) { /* cache the last name queried */ if (name != NULL && !strcmp (s->p_getpwnam.pw_name, name)) { LOGDEBUG("_mysql_drv_getpwnam returning cached name %s.", name); return &s->p_getpwnam; } free (s->p_getpwnam.pw_name); s->p_getpwnam.pw_name = NULL; } if (name != NULL) { name_size = strlen(name); } sql_username = malloc ((2 * name_size) + 1); if (sql_username == NULL) { LOGDEBUG("_mysql_drv_getpwnam returning NULL for name: %s. malloc() failed somehow.", name); return NULL; } mysql_real_escape_string (s->dbt->dbh_read, sql_username, name, strlen(name)); snprintf (query, sizeof (query), "SELECT %s FROM %s WHERE %s='%s'", virtual_uid, virtual_table, virtual_username, sql_username); free (sql_username); sql_username = NULL; query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_read); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_read), query); LOGDEBUG ("_mysql_drv_getpwnam: unable to run query: %s", query); return NULL; } result = mysql_use_result (s->dbt->dbh_read); if (result == NULL) { if (CTX->source == DSS_ERROR || CTX->operating_mode != DSM_PROCESS) { LOGDEBUG("_mysql_drv_getpwnam: returning NULL for query on name: %s that returned a null result", name); return NULL; } LOGDEBUG("_mysql_drv_getpwnam: setting, then returning passed name: %s after null MySQL result", name); return _mysql_drv_setpwnam (CTX, name); } row = mysql_fetch_row (result); if (row == NULL) { mysql_free_result (result); result = NULL; if (CTX->source == DSS_ERROR || CTX->operating_mode != DSM_PROCESS) { LOGDEBUG("_mysql_drv_getpwnam: returning NULL for query on name: %s", name); return NULL; } LOGDEBUG("_mysql_drv_getpwnam: setting, then returning passed name: %s", name); return _mysql_drv_setpwnam (CTX, name); } s->p_getpwnam.pw_uid = atoi(row[0]); if (s->p_getpwnam.pw_uid == INT_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_getpwnam: failed converting %s to s->p_getpwnam.pw_uid", row[0]); mysql_free_result (result); result = NULL; return NULL; } if (name == NULL) s->p_getpwnam.pw_name = strdup(""); else s->p_getpwnam.pw_name = strdup (name); mysql_free_result (result); result = NULL; LOGDEBUG("_mysql_drv_getpwnam: successful returning struct for name: %s", s->p_getpwnam.pw_name); return &s->p_getpwnam; #endif } struct passwd * _mysql_drv_getpwuid (DSPAM_CTX * CTX, uid_t uid) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; int query_rc = 0; int query_errno = 0; #ifndef VIRTUAL_USERS struct passwd *q; #if defined(_REENTRANT) && defined(HAVE_GETPWUID_R) struct passwd pwbuf; char buf[1024]; #endif if (s->p_getpwuid.pw_name != NULL) { /* cache the last uid queried */ if (s->p_getpwuid.pw_uid == uid) { return &s->p_getpwuid; } free(s->p_getpwuid.pw_name); s->p_getpwuid.pw_name = NULL; } #if defined(_REENTRANT) && defined(HAVE_GETPWUID_R) if (getpwuid_r(uid, &pwbuf, buf, sizeof(buf), &q)) q = NULL; #else q = getpwuid (uid); #endif if (q == NULL) return NULL; if (s->p_getpwuid.pw_name) { free(s->p_getpwuid.pw_name); s->p_getpwuid.pw_name = NULL; } memcpy (&s->p_getpwuid, q, sizeof (struct passwd)); s->p_getpwuid.pw_name = strdup(q->pw_name); return &s->p_getpwuid; #else char query[512]; MYSQL_RES *result; MYSQL_ROW row; char *virtual_table, *virtual_uid, *virtual_username; result = NULL; if ((virtual_table = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualTable"))==NULL) { virtual_table = "dspam_virtual_uids"; } if ((virtual_uid = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualUIDField"))==NULL) { virtual_uid = "uid"; } if ((virtual_username = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualUsernameField")) ==NULL) { virtual_username = "username"; } /* TODO virtual_table = _mysql_drv_get_virtual_table(CTX); virtual_uid = _mysql_drv_get_virtual_uid_field(CTX); virtual_username = _mysql_drv_get_virtual_username_field(CTX); */ if (s->p_getpwuid.pw_name != NULL) { /* cache the last uid queried */ if (s->p_getpwuid.pw_uid == uid) return &s->p_getpwuid; free (s->p_getpwuid.pw_name); s->p_getpwuid.pw_name = NULL; } snprintf (query, sizeof (query), "SELECT %s FROM %s WHERE %s='%d'", virtual_username, virtual_table, virtual_uid, (int) uid); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_read); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_read), query); LOGDEBUG ("_mysql_drv_getpwuid: unable to run query: %s", query); return NULL; } result = mysql_use_result (s->dbt->dbh_read); if (result == NULL) return NULL; row = mysql_fetch_row (result); if (row == NULL) { mysql_free_result (result); result = NULL; return NULL; } if (row[0] == NULL) { mysql_free_result (result); result = NULL; return NULL; } s->p_getpwuid.pw_name = strdup (row[0]); s->p_getpwuid.pw_uid = (int) uid; mysql_free_result (result); result = NULL; return &s->p_getpwuid; #endif } void _mysql_drv_query_error (const char *error, const char *query) { FILE *file; char fn[MAX_FILENAME_LENGTH]; char buf[128]; LOG (LOG_WARNING, "query error: %s: see sql.errors for more details", error); snprintf (fn, sizeof (fn), "%s/sql.errors", LOGDIR); file = fopen (fn, "a"); if (file == NULL) { LOG(LOG_ERR, ERR_IO_FILE_WRITE, fn, strerror (errno)); return; } fprintf (file, "[%s] %d: %s: %s\n", format_date_r(buf), (int) getpid (), error, query); fclose (file); return; } #ifdef VIRTUAL_USERS struct passwd * _mysql_drv_setpwnam (DSPAM_CTX * CTX, const char *name) { if (name == NULL) return NULL; char query[512]; int query_rc = 0; int query_errno = 0; char *virtual_table, *virtual_uid, *virtual_username; struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; char *sql_username; if ((virtual_table = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualTable"))==NULL) { virtual_table = "dspam_virtual_uids"; } if ((virtual_uid = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualUIDField"))==NULL) { virtual_uid = "uid"; } if ((virtual_username = _ds_read_attribute(CTX->config->attributes, "MySQLVirtualUsernameField")) ==NULL) { virtual_username = "username"; } /* TODO virtual_table = _mysql_drv_get_virtual_table(CTX); virtual_uid = _mysql_drv_get_virtual_uid_field(CTX); virtual_username = _mysql_drv_get_virtual_username_field(CTX); */ #ifdef EXT_LOOKUP LOGDEBUG("_mysql_drv_setpwnam: verified_user is %d", verified_user); if (verified_user == 0) { LOGDEBUG("_mysql_drv_setpwnam: External lookup verification of %s failed: not adding user", name); return NULL; } #endif sql_username = malloc (strlen(name) * 2 + 1); if (sql_username == NULL) { return NULL; } mysql_real_escape_string (s->dbt->dbh_write, sql_username, name, strlen(name)); snprintf (query, sizeof (query), "INSERT INTO %s (%s,%s) VALUES (NULL,'%s')", virtual_table, virtual_uid, virtual_username, sql_username); free (sql_username); sql_username = NULL; query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); } } /* we need to fail, to prevent a potential loop - even if it was inserted * by another process */ if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), query); LOGDEBUG ("_mysql_drv_setpwnam: unable to run query: %s", query); return NULL; } return _mysql_drv_getpwnam (CTX, name); } #endif int _ds_del_spamrecord (DSPAM_CTX * CTX, unsigned long long token) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; struct passwd *p; char *name; char query[256]; int query_rc = 0; int query_errno = 0; if (s->dbt == NULL) { LOGDEBUG ("_ds_del_spamrecord: invalid database handle (NULL)"); return EINVAL; } if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_ds_del_spamrecord: unable to _mysql_drv_getpwnam(%s)", name); return EINVAL; } snprintf (query, sizeof (query), "DELETE FROM dspam_token_data WHERE uid=%d AND token=\"%llu\"", (int) p->pw_uid, token); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), query); LOGDEBUG ("_ds_del_spamrecord: unable to run query: %s", query); return EFAILURE; } return 0; } int _ds_delall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction) { struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage; ds_term_t ds_term; ds_cursor_t ds_c; buffer *query; char scratch[1024]; char queryhead[1024]; int query_rc = 0; int query_errno = 0; struct passwd *p; char *name; if (diction->items < 1) return 0; if (s->dbt->dbh_write == NULL) { LOGDEBUG ("_ds_delall_spamrecords: invalid database handle (NULL)"); return EINVAL; } if (!CTX->group || CTX->flags & DSF_MERGED) { p = _mysql_drv_getpwnam (CTX, CTX->username); name = CTX->username; } else { p = _mysql_drv_getpwnam (CTX, CTX->group); name = CTX->group; } if (p == NULL) { LOGDEBUG ("_ds_delall_spamrecords: unable to _mysql_drv_getpwnam(%s)", name); return EINVAL; } query = buffer_create (NULL); if (query == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } snprintf (queryhead, sizeof(queryhead), "DELETE FROM dspam_token_data" " WHERE uid=%d AND token IN (", (int) p->pw_uid); /* Delete the spam records but split the query when the query size + 1024 * reaches max_allowed_packet */ ds_c = ds_diction_cursor(diction); ds_term = ds_diction_next(ds_c); while (ds_term) { scratch[0] = 0; buffer_copy(query, queryhead); while (ds_term) { snprintf (scratch, sizeof (scratch), "'%llu'", ds_term->key); buffer_cat (query, scratch); ds_term = ds_diction_next(ds_c); if((unsigned long)(query->used + 1024) > _mysql_driver_get_max_packet(s->dbt->dbh_write) || !ds_term) { LOGDEBUG("_ds_delall_spamrecords: Splitting query at %lu characters", query->used); break; } buffer_cat (query, ","); } buffer_cat (query, ")"); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query->data); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query->data); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), query->data); LOGDEBUG ("_ds_delall_spamrecords: unable to run query: %s", query->data); buffer_destroy(query); query = NULL; ds_diction_close(ds_c); return EFAILURE; } } ds_diction_close(ds_c); buffer_destroy (query); query = NULL; return 0; } #ifdef PREFERENCES_EXTENSION DSPAM_CTX *_mysql_drv_init_tools( const char *home, config_t config, void *dbt, int mode) { DSPAM_CTX *CTX; struct _mysql_drv_storage *s; int dbh_attached = (dbt) ? 1 : 0; CTX = dspam_create (NULL, NULL, home, mode, 0); if (CTX == NULL) return NULL; _mysql_drv_set_attributes(CTX, config); if (!dbt) dbt = _ds_connect(CTX); if (!dbt) goto BAIL; if (dspam_attach(CTX, dbt)) goto BAIL; s = (struct _mysql_drv_storage *) CTX->storage; s->dbh_attached = dbh_attached; return CTX; BAIL: LOGDEBUG ("_mysql_drv_init_tools: Bailing and returning NULL!"); dspam_destroy(CTX); return NULL; } agent_pref_t _ds_pref_load( config_t config, const char *username, const char *home, void *dbt) { struct _mysql_drv_storage *s; struct passwd *p; char query[512]; int query_rc = 0; int query_errno = 0; MYSQL_RES *result; MYSQL_ROW row; DSPAM_CTX *CTX; agent_pref_t PTX; agent_attrib_t pref; int uid, i = 0; result = NULL; CTX = _mysql_drv_init_tools(home, config, dbt, DSM_TOOLS); if (CTX == NULL) { LOG (LOG_WARNING, "_ds_pref_load: unable to initialize tools context"); return NULL; } s = (struct _mysql_drv_storage *) CTX->storage; if (username != NULL) { p = _mysql_drv_getpwnam (CTX, username); if (p == NULL) { LOGDEBUG ("_ds_pref_load: unable to _mysql_drv_getpwnam(%s)", username); dspam_destroy(CTX); return NULL; } else { uid = (int) p->pw_uid; } } else { uid = 0; /* Default Preferences */ } LOGDEBUG("Loading preferences for uid %d", uid); snprintf(query, sizeof(query), "SELECT preference,value" " FROM dspam_preferences WHERE uid=%d", (int) uid); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_read); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_read, query); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_read), query); LOGDEBUG ("_ds_pref_load: unable to run query: %s", query); dspam_destroy(CTX); return NULL; } result = mysql_store_result (s->dbt->dbh_read); if (result == NULL) { dspam_destroy(CTX); return NULL; } PTX = malloc(sizeof(agent_attrib_t )*(mysql_num_rows(result)+1)); if (PTX == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); dspam_destroy(CTX); mysql_free_result(result); result = NULL; return NULL; } PTX[0] = NULL; row = mysql_fetch_row (result); if (row == NULL) { dspam_destroy(CTX); mysql_free_result(result); result = NULL; _ds_pref_free(PTX); free(PTX); return NULL; } while(row != NULL) { char *p = row[0]; char *q = row[1]; pref = malloc(sizeof(struct _ds_agent_attribute)); if (pref == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); mysql_free_result(result); result = NULL; dspam_destroy(CTX); return PTX; } pref->attribute = strdup(p); pref->value = strdup(q); PTX[i] = pref; PTX[i+1] = NULL; i++; row = mysql_fetch_row (result); } mysql_free_result(result); result = NULL; dspam_destroy(CTX); return PTX; } int _ds_pref_set ( config_t config, const char *username, const char *home, const char *preference, const char *value, void *dbt) { struct _mysql_drv_storage *s; struct passwd *p; char query[512]; int query_rc = 0; int query_errno = 0; DSPAM_CTX *CTX; int uid; char *m1, *m2; CTX = _mysql_drv_init_tools(home, config, dbt, DSM_PROCESS); if (CTX == NULL) { LOG (LOG_WARNING, "_ds_pref_set: unable to initialize tools context"); return EFAILURE; } s = (struct _mysql_drv_storage *) CTX->storage; if (username != NULL) { p = _mysql_drv_getpwnam (CTX, username); if (p == NULL) { LOGDEBUG ("_ds_pref_set: unable to _mysql_drv_getpwnam(%s)", CTX->username); dspam_destroy(CTX); return EFAILURE; } else { uid = (int) p->pw_uid; } } else { uid = 0; /* Default Preferences */ } m1 = calloc(1, strlen(preference)*2+1); m2 = calloc(1, strlen(value)*2+1); if (m1 == NULL || m2 == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); dspam_destroy(CTX); free(m1); m1 = NULL; free(m2); m2 = NULL; return EFAILURE; } mysql_real_escape_string (s->dbt->dbh_write, m1, preference, strlen(preference)); mysql_real_escape_string (s->dbt->dbh_write, m2, value, strlen(value)); snprintf(query, sizeof(query), "DELETE FROM dspam_preferences" " WHERE uid=%d AND preference='%s'", (int) uid, m1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), query); LOGDEBUG ("_ds_pref_set: unable to run query: %s", query); goto FAIL; } snprintf(query, sizeof(query), "INSERT INTO dspam_preferences" " (uid,preference,value) VALUES (%d,'%s','%s')", (int) uid, m1, m2); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), query); LOGDEBUG ("_ds_pref_set: unable to run query: %s", query); goto FAIL; } dspam_destroy(CTX); free(m1); m1 = NULL; free(m2); m2 = NULL; return 0; FAIL: LOGDEBUG("_ds_pref_set: failed"); free(m1); m1 = NULL; free(m2); m2 = NULL; dspam_destroy(CTX); return EFAILURE; } int _ds_pref_del ( config_t config, const char *username, const char *home, const char *preference, void *dbt) { struct _mysql_drv_storage *s; struct passwd *p; char query[512]; int query_rc = 0; int query_errno = 0; DSPAM_CTX *CTX; int uid; char *m1; CTX = _mysql_drv_init_tools(home, config, dbt, DSM_TOOLS); if (CTX == NULL) { LOG (LOG_WARNING, "_ds_pref_del: unable to initialize tools context"); return EFAILURE; } s = (struct _mysql_drv_storage *) CTX->storage; if (username != NULL) { p = _mysql_drv_getpwnam (CTX, username); if (p == NULL) { LOGDEBUG ("_ds_pref_del: unable to _mysql_drv_getpwnam(%s)", username); dspam_destroy(CTX); return EFAILURE; } else { uid = (int) p->pw_uid; } } else { uid = 0; /* Default Preferences */ } m1 = calloc(1, strlen(preference)*2+1); if (m1 == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); dspam_destroy(CTX); free(m1); m1 = NULL; return EFAILURE; } mysql_real_escape_string (s->dbt->dbh_write, m1, preference, strlen(preference)); snprintf(query, sizeof(query), "DELETE FROM dspam_preferences" " WHERE uid=%d AND preference='%s'", (int) uid, m1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); if (query_rc) { query_errno = mysql_errno (s->dbt->dbh_write); if (query_errno == ER_LOCK_DEADLOCK || query_errno == ER_LOCK_WAIT_TIMEOUT || query_errno == ER_LOCK_OR_ACTIVE_TRANSACTION) { /* Locking issue. Wait 1 second and then retry the transaction again */ sleep(1); query_rc = MYSQL_RUN_QUERY (s->dbt->dbh_write, query); } } if (query_rc) { _mysql_drv_query_error (mysql_error (s->dbt->dbh_write), query); LOGDEBUG ("_ds_pref_del: unable to run query: %s", query); goto FAIL; } dspam_destroy(CTX); free(m1); m1 = NULL; return 0; FAIL: LOGDEBUG("_ds_pref_del: failed"); free(m1); m1 = NULL; dspam_destroy(CTX); return EFAILURE; } int _mysql_drv_set_attributes(DSPAM_CTX *CTX, config_t config) { int i, ret = 0; attribute_t t; char *profile; profile = _ds_read_attribute(config, "DefaultProfile"); for(i=0;config[i];i++) { t = config[i]; while(t) { if (!strncasecmp(t->key, "MySQL", 5)) { if (profile == NULL || profile[0] == 0) { ret += dspam_addattribute(CTX, t->key, t->value); } else if (strchr(t->key, '.')) { if (!strcasecmp((strchr(t->key, '.')+1), profile)) { char *x = strdup(t->key); char *y = strchr(x, '.'); y[0] = 0; ret += dspam_addattribute(CTX, x, t->value); free(x); x = NULL; } } } t = t->next; } } return 0; } #else /* Preference Stubs for Flat-File */ agent_pref_t _ds_pref_load(config_t config, const char *user, const char *home, void *dbh) { return _ds_ff_pref_load(config, user, home, dbh); } int _ds_pref_set(config_t config, const char *user, const char *home, const char *attrib, const char *value, void *dbh) { return _ds_ff_pref_set(config, user, home, attrib, value, dbh); } int _ds_pref_del(config_t config, const char *user, const char *home, const char *attrib, void *dbh) { return _ds_ff_pref_del(config, user, home, attrib, dbh); } #endif void *_ds_connect (DSPAM_CTX *CTX) { _mysql_drv_dbh_t dbt = calloc(1, sizeof(struct _mysql_drv_dbh)); dbt->dbh_read = _mysql_drv_connect(CTX, "MySQL"); if (!dbt->dbh_read) { free(dbt); return NULL; } if (_ds_read_attribute(CTX->config->attributes, "MySQLWriteServer")) dbt->dbh_write = _mysql_drv_connect(CTX, "MySQLWrite"); else dbt->dbh_write = dbt->dbh_read; return (void *) dbt; } MYSQL *_mysql_drv_connect (DSPAM_CTX *CTX, const char *prefix) { MYSQL *dbh; FILE *file; char filename[MAX_FILENAME_LENGTH]; char buffer[128]; char hostname[128] = { 0 }; char user[64] = { 0 }; char password[64] = { 0 }; char db[64] = { 0 }; int port = 3306, i = 0, real_connect_flag = 0; char *p; char attrib[128]; if (!prefix) prefix = "MySQL"; /* Read storage attributes */ snprintf(attrib, sizeof(attrib), "%sServer", prefix); if ((p = _ds_read_attribute(CTX->config->attributes, attrib))) { strlcpy(hostname, p, sizeof(hostname)); if (strlen(p) >= sizeof(hostname)) { LOG(LOG_WARNING, "Truncating MySQLServer to %d characters.", sizeof(hostname)-1); } snprintf(attrib, sizeof(attrib), "%sPort", prefix); if (_ds_read_attribute(CTX->config->attributes, attrib)) { port = atoi(_ds_read_attribute(CTX->config->attributes, attrib)); if (port == INT_MAX && errno == ERANGE) { LOGDEBUG("_mysql_drv_connect: failed converting %s to port", _ds_read_attribute(CTX->config->attributes, attrib)); goto FAILURE; } } else port = 0; snprintf(attrib, sizeof(attrib), "%sUser", prefix); if ((p = _ds_read_attribute(CTX->config->attributes, attrib))) { strlcpy(user, p, sizeof(user)); if (strlen(p) >= sizeof(user)) { LOG(LOG_WARNING, "Truncating MySQLUser to %d characters.", sizeof(user)-1); } } snprintf(attrib, sizeof(attrib), "%sPass", prefix); if ((p = _ds_read_attribute(CTX->config->attributes, attrib))) { strlcpy(password, p, sizeof(password)); if (strlen(p) >= sizeof(password)) { LOG(LOG_WARNING, "Truncating MySQLPass to %d characters.", sizeof(password)-1); } } snprintf(attrib, sizeof(attrib), "%sDb", prefix); if ((p = _ds_read_attribute(CTX->config->attributes, attrib))) { strlcpy(db, p, sizeof(db)); if (strlen(p) >= sizeof(db)) { LOG(LOG_WARNING, "Truncating MySQLDb to %d characters.", sizeof(db)-1); } } snprintf(attrib, sizeof(attrib), "%sCompress", prefix); if (_ds_match_attribute(CTX->config->attributes, attrib, "true")) real_connect_flag = CLIENT_COMPRESS; } else { if (!CTX->home) { LOG(LOG_ERR, ERR_AGENT_DSPAM_HOME); goto FAILURE; } snprintf (filename, MAX_FILENAME_LENGTH, "%s/mysql.data", CTX->home); file = fopen (filename, "r"); if (file == NULL) { LOG (LOG_WARNING, "_mysql_drv_connect: unable to locate mysql configuration"); goto FAILURE; } db[0] = 0; while (fgets (buffer, sizeof (buffer), file) != NULL) { chomp (buffer); if (!i) strlcpy (hostname, buffer, sizeof (hostname)); else if (i == 1) { port = atoi (buffer); if (port == INT_MAX && errno == ERANGE) { fclose (file); LOGDEBUG("_mysql_drv_connect: failed converting %s to port", buffer); goto FAILURE; } } else if (i == 2) strlcpy (user, buffer, sizeof (user)); else if (i == 3) strlcpy (password, buffer, sizeof (password)); else if (i == 4) strlcpy (db, buffer, sizeof (db)); i++; } fclose (file); } if (db[0] == 0) { LOG (LOG_WARNING, "file %s: incomplete mysql connect data", filename); goto FAILURE; } dbh = mysql_init(NULL); if (dbh == NULL) { LOGDEBUG ("_mysql_drv_connect: mysql_init: unable to initialize handle to database"); goto FAILURE; } #if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 50013 /* enable automatic reconnect for MySQL >= 5.0.13 */ snprintf(attrib, sizeof(attrib), "%sReconnect", prefix); if (_ds_match_attribute(CTX->config->attributes, attrib, "true")) { my_bool reconnect = 1; mysql_options(dbh, MYSQL_OPT_RECONNECT, &reconnect); } #endif if (hostname[0] == '/') { if (!mysql_real_connect (dbh, NULL, user, password, db, 0, hostname, real_connect_flag)) { LOG (LOG_WARNING, "%s", mysql_error (dbh)); mysql_close(dbh); goto FAILURE; } } else { if (!mysql_real_connect (dbh, hostname, user, password, db, port, NULL, real_connect_flag)) { LOG (LOG_WARNING, "%s", mysql_error (dbh)); mysql_close(dbh); goto FAILURE; } } return dbh; FAILURE: LOGDEBUG("_mysql_drv_connect: failed"); return NULL; } MYSQL * _mysql_drv_sig_write_handle( DSPAM_CTX *CTX, struct _mysql_drv_storage *s) { if (_ds_match_attribute(CTX->config->attributes, "MySQLReadSignaturesFromWriteDb", "on")) return s->dbt->dbh_write; else return s->dbt->dbh_read; } dspam-3.10.2+dfsg/src/hash.c0000644000175000017500000001237711741351001015037 0ustar julienjulien/* $Id: hash.c,v 1.75 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "hash.h" /* Read-only */ static unsigned long bnr_hash_prime_list[bnr_hash_num_primes] = { 53ul, 97ul, 193ul, 389ul, 769ul, 1543ul, 3079ul, 6151ul, 12289ul, 24593ul, 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul, 1610612741ul, 3221225473ul, 4294967291ul }; struct bnr_hash_node * bnr_hash_node_create (const char *name) { struct bnr_hash_node *node = (struct bnr_hash_node *) calloc (1, sizeof (struct bnr_hash_node)); if (node) node->name = strdup(name); return node; } struct bnr_hash * bnr_hash_create (unsigned long size) { unsigned long i = 0; struct bnr_hash *hash = (struct bnr_hash *) malloc (sizeof (struct bnr_hash)); if (hash == NULL) return NULL; while (bnr_hash_prime_list[i] < size) i++; hash->size = bnr_hash_prime_list[i]; hash->items = 0; hash->tbl = (struct bnr_hash_node **) calloc (hash->size, sizeof (struct bnr_hash_node *)); if (hash->tbl == NULL) { free (hash); return NULL; } return (hash); } int bnr_hash_destroy (struct bnr_hash *hash) { struct bnr_hash_node *node, *next; struct bnr_hash_c c; if (hash == NULL) return -1; node = c_bnr_hash_first (hash, &c); while (node != NULL) { char *x = node->name; next = c_bnr_hash_next (hash, &c); bnr_hash_delete (hash, node->name); free (x); node = next; } free (hash->tbl); free (hash); return 0; } int bnr_hash_delete (struct bnr_hash *hash, const char *name) { unsigned long hash_code; struct bnr_hash_node *node; struct bnr_hash_node *del_node = NULL; struct bnr_hash_node *parent = NULL; hash_code = bnr_hash_hashcode(hash, name); node = hash->tbl[hash_code]; while (node) { if (!strcmp(name, node->name)) { del_node = node; node = NULL; } else { parent = node; node = node->next; } } if (del_node == NULL) return -2; if (parent) parent->next = del_node->next; else hash->tbl[hash_code] = del_node->next; free (del_node); hash->items--; return 0; } struct bnr_hash_node * c_bnr_hash_first (struct bnr_hash *hash, struct bnr_hash_c *c) { c->iter_index = 0; c->iter_next = (struct bnr_hash_node *) NULL; return (c_bnr_hash_next (hash, c)); } struct bnr_hash_node * c_bnr_hash_next (struct bnr_hash *hash, struct bnr_hash_c *c) { unsigned long index; struct bnr_hash_node *node = c->iter_next; if (node) { c->iter_next = node->next; return (node); } while (c->iter_index < hash->size) { index = c->iter_index++; if (hash->tbl[index]) { c->iter_next = hash->tbl[index]->next; return (hash->tbl[index]); } } return NULL; } int bnr_hash_hit (struct bnr_hash *hash, const char *name) { unsigned long hash_code; struct bnr_hash_node *parent; struct bnr_hash_node *node; struct bnr_hash_node *new_node = NULL; hash_code = bnr_hash_hashcode(hash, name); parent = NULL; node = hash->tbl[hash_code]; while (node != NULL) { if (!strcmp(name, node->name)) { new_node = node; node = NULL; } else { parent = node; node = node->next; } } if (new_node != NULL) return 0; /* Create a new node */ new_node = bnr_hash_node_create(name); hash->items++; /* Insert */ if (parent) { parent->next = new_node; return 0; } /* No existing parent; add directly to hash table */ hash->tbl[hash_code] = new_node; return 0; } float bnr_hash_value (struct bnr_hash *hash, const char *name) { unsigned long hash_code; struct bnr_hash_node *node; hash_code = bnr_hash_hashcode(hash, name); node = hash->tbl[hash_code]; while (node != NULL) { if (!strcmp(node->name, name)) return node->value; node = node->next; } return 0.00000; } int bnr_hash_set (struct bnr_hash *hash, const char *name, float value) { unsigned long hash_code; struct bnr_hash_node *node; if (!name) return 0; hash_code = bnr_hash_hashcode(hash, name); node = hash->tbl[hash_code]; while (node != NULL) { if (!strcmp(node->name, name)) { node->value = value; return 0; } node = node->next; } return 0; } long bnr_hash_hashcode(struct bnr_hash *hash, const char *name) { unsigned long val = 0; if (!name) return 0; for (; *name; ++name) val = 5 * val + *name; return(val % hash->size); } dspam-3.10.2+dfsg/src/daemon.c0000644000175000017500000007516511741351001015363 0ustar julienjulien/* $Id: daemon.c,v 1.23 2012/02/09 22:05:07 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* * daemon.c - server daemon codebase (for operating in client/daemon mode) * * DESCRIPTION * The code in this section is responsible for managing the DSPAM agent as * a server-side process when --daemon is called. It ties in with many * standard agent processing functions.. */ #ifdef HAVE_CONFIG_H #include #endif #ifdef DAEMON #define RSET(A) ( A && !strcmp(A, "RSET") ) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef _WIN32 #include #include #endif #include #include #include "daemon.h" #include "client.h" #include "dspam.h" #include "libdspam.h" #include "config.h" #include "util.h" #include "buffer.h" #include "language.h" /* * daemon_listen(DRIVER_CTX *DTX) * * DESCRIPTION * primary daemon loop * * this function is called by the agent when --daemon is specified on the * commandline, and is responsible for innitializing and managing core daemon * services. these include listening for and accepting incoming connections * and spawning new protocol handler threads. * * INPUT ARGUMENTS * DTX driver context (containing cached database connections) * * RETURN VALUES * returns 0 on success */ int daemon_listen(DRIVER_CTX *DTX) { struct sockaddr_in local_addr, remote_addr; THREAD_CTX *TTX = NULL; fd_set master, read_fds; pthread_attr_t attr; struct timeval tv; int fdmax, yes = 1; int domain = 0; /* listening on domain socket? */ int listener; /* listener fd */ int i; int port = 24, queue = 32; /* default port and queue size */ signal(SIGPIPE, SIG_IGN); signal(SIGINT, process_signal); signal(SIGTERM, process_signal); signal(SIGHUP, process_signal); if (_ds_read_attribute(agent_config, "ServerPort")) port = atoi(_ds_read_attribute(agent_config, "ServerPort")); if (_ds_read_attribute(agent_config, "ServerQueueSize")) queue = atoi(_ds_read_attribute(agent_config, "ServerQueueSize")); if (_ds_read_attribute(agent_config, "ServerDomainSocketPath")) domain = 1; /* initialize */ FD_ZERO(&master); FD_ZERO(&read_fds); pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); /* Bind (domain socket) */ if (domain) { struct sockaddr_un saun; char *address = _ds_read_attribute(agent_config, "ServerDomainSocketPath"); mode_t mask; int len; mask = umask (000); listener = socket(AF_UNIX, SOCK_STREAM, 0); if (listener == -1) { LOG(LOG_CRIT, ERR_DAEMON_SOCKET, strerror(errno)); umask (mask); return(EFAILURE); } memset(&saun, 0, sizeof(struct sockaddr_un)); saun.sun_family = AF_UNIX; strcpy(saun.sun_path, address); unlink(address); len = sizeof(saun.sun_family) + strlen(saun.sun_path) + 1; LOGDEBUG(INFO_DAEMON_DOMAINSOCK, address); if (bind(listener, (struct sockaddr *) &saun, len)<0) { close(listener); LOG(LOG_CRIT, INFO_DAEMON_DOMAINSOCK, address, strerror(errno)); umask (mask); return EFAILURE; } umask (mask); /* Bind to a TCP socket */ } else { listener = socket(AF_INET, SOCK_STREAM, 0); if (listener == -1) { LOG(LOG_CRIT, ERR_DAEMON_SOCKET, strerror(errno)); return(EFAILURE); } if (setsockopt(listener,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(int)) == -1) { close(listener); LOG(LOG_CRIT, ERR_DAEMON_SOCKOPT, "SO_REUSEADDR", strerror(errno)); return(EFAILURE); } memset(&local_addr, 0, sizeof(struct sockaddr_in)); local_addr.sin_family = AF_INET; local_addr.sin_port = htons(port); if (_ds_read_attribute(agent_config, "ServerHost")) { char *host = _ds_read_attribute(agent_config, "ServerHost"); local_addr.sin_addr.s_addr = inet_addr(host); LOGDEBUG(INFO_DAEMON_BIND, host, port); } else { local_addr.sin_addr.s_addr = INADDR_ANY; LOGDEBUG(INFO_DAEMON_BIND, "*", port); } if (bind(listener, (struct sockaddr *)&local_addr, sizeof(struct sockaddr)) == -1) { close(listener); LOG(LOG_CRIT, ERR_DAEMON_BIND, port, strerror(errno)); return(EFAILURE); } } /* Listen */ if (listen(listener, queue) == -1) { close(listener); LOG(LOG_CRIT, ERR_DAEMON_LISTEN, strerror(errno)); return(EFAILURE); } FD_SET(listener, &master); fdmax = listener; /* Process new connections (until death or reload) */ for(;;) { read_fds = master; tv.tv_sec = 2; tv.tv_usec = 0; if (__daemon_run == 0) { close(listener); if (_ds_read_attribute(agent_config, "ServerDomainSocketPath")) unlink (_ds_read_attribute(agent_config, "ServerDomainSocketPath")); return 0; } if (select(fdmax+1, &read_fds, NULL, NULL, &tv)>0) { /* Process read-ready connections */ for(i=0;i<=fdmax;i++) { if (FD_ISSET(i, &read_fds)) { /* Accept new connections */ if (i == listener) { int newfd; int addrlen = sizeof(remote_addr); if ((newfd = accept(listener, (struct sockaddr *)&remote_addr, (socklen_t *) &addrlen)) == -1) { LOG(LOG_WARNING, ERR_DAEMON_ACCEPT, strerror(errno)); continue; #ifdef DEBUG } else if (!domain) { char buff[32]; LOGDEBUG("connection id %d from %s.", newfd, #ifdef HAVE_INET_NTOA_R_2 inet_ntoa_r(remote_addr.sin_addr, buff) #else inet_ntoa_r(remote_addr.sin_addr, buff, sizeof(buff)) #endif ); #endif } fcntl(newfd, F_SETFL, O_RDWR); setsockopt(newfd,SOL_SOCKET,TCP_NODELAY,&yes,sizeof(int)); /* * Since processing time varies, each new connection gets its own * thread, so we create a new thread context and send it on its way * */ TTX = calloc(1, sizeof(THREAD_CTX)); if (TTX == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); close(newfd); continue; } else { TTX->sockfd = newfd; TTX->DTX = DTX; memcpy(&TTX->remote_addr, &remote_addr, sizeof(remote_addr)); increment_thread_count(); if (pthread_create(&TTX->thread, &attr, process_connection, (void *) TTX)) { decrement_thread_count(); LOG(LOG_CRIT, ERR_DAEMON_THREAD, strerror(errno)); close(TTX->sockfd); free(TTX); continue; } } } /* if i == listener */ } /* if FD_SET else */ } /* for(i.. */ } /* if (select)... */ } /* for(;;) */ /* Shutdown - we should never get here, but who knows */ close(listener); pthread_attr_destroy(&attr); return 0; } /* * process_connection(void *ptr) * * DESCRIPTION * process a connection after establishment * * this function instantiates for each thread at the beginning of a connection * and is the hub for a connection's processing. * * INPUT ARGUMENTS * ptr thread context (TTX) * * RETURN VALUES * returns NULL on success * */ void *process_connection(void *ptr) { char *server_ident = _ds_read_attribute(agent_config, "ServerIdent"); THREAD_CTX *TTX = (THREAD_CTX *) ptr; AGENT_CTX *ATX = NULL; char *input, *cmdline = NULL, *token, *ptrptr; buffer *message = NULL; char *parms=NULL, *p=NULL; int i, locked = -1, invalid = 0; int server_mode = SSM_DSPAM; char *argv[64]; char buf[1024]; int tries = 0; int argc = 0; FILE *fd = 0; if (_ds_read_attribute(agent_config, "ServerMode") && !strcasecmp(_ds_read_attribute(agent_config, "ServerMode"), "standard")) { server_mode = SSM_STANDARD; } if (_ds_read_attribute(agent_config, "ServerMode") && !strcasecmp(_ds_read_attribute(agent_config, "ServerMode"), "auto")) { server_mode = SSM_AUTO; } /* Initialize a file descriptor hook for dspam to use as stdout */ fd = fdopen(TTX->sockfd, "w"); if (!fd) { close(TTX->sockfd); goto CLOSE; } setbuf(fd, NULL); TTX->packet_buffer = buffer_create(NULL); if (TTX->packet_buffer == NULL) goto CLOSE; /* * Send greeting banner * in auto mode, we want to look like a regular LMTP server so we don't * cause any compatibility problems. in dspam mode, we can change this. */ snprintf(buf, sizeof(buf), "%d DSPAM %sLMTP %s %s", LMTP_GREETING, (server_mode == SSM_DSPAM) ? "D" : "", VERSION, (server_mode == SSM_DSPAM) ? "Authentication Required" : "Ready"); if (send_socket(TTX, buf)<=0) goto CLOSE; TTX->authenticated = 0; /* LHLO */ input = daemon_expect(TTX, "LHLO"); if (input == NULL) goto CLOSE; if (server_mode == SSM_AUTO && input[4]) { char buff[128]; /* * Auto-detect the server mode based on whether or not the ident is * assigned a password in dspam.conf */ snprintf(buff, sizeof(buff), "ServerPass.%s", input + 5); chomp(buff); if (_ds_read_attribute(agent_config, buff)) server_mode = SSM_DSPAM; else server_mode = SSM_STANDARD; } free(input); /* Advertise extensions */ if (daemon_extension(TTX, (server_ident) ? server_ident : "localhost.localdomain")<=0) goto CLOSE; if (daemon_extension(TTX, "PIPELINING")<=0) goto CLOSE; if (daemon_extension(TTX, "ENHANCEDSTATUSCODES")<=0) goto CLOSE; if (server_mode == SSM_DSPAM) if (daemon_extension(TTX, "DSPAMPROCESSMODE")<=0) goto CLOSE; if (daemon_extension(TTX, "8BITMIME")<=0) goto CLOSE; if (daemon_reply(TTX, LMTP_OK, "", "SIZE")<=0) goto CLOSE; /* Main protocol loop */ while(1) { char processmode[256]; parms = NULL; /* Configure a new agent context for each pass */ ATX = calloc(1, sizeof(AGENT_CTX)); if (ATX == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); daemon_reply(TTX, LMTP_TEMP_FAIL, "4.3.0", ERR_MEM_ALLOC); goto CLOSE; } if (initialize_atx(ATX)) { LOG(LOG_ERR, ERR_AGENT_INIT_ATX); daemon_reply(TTX, LMTP_BAD_CMD, "5.3.0", ERR_AGENT_INIT_ATX); goto CLOSE; } /* MAIL FROM (and authentication, if SSM_DSPAM) */ processmode[0] = 0; while(!TTX->authenticated) { input = daemon_expect(TTX, "MAIL FROM"); if (RSET(input)) goto RSET; if (input == NULL) goto CLOSE; else { char *pass, *ident; chomp(input); if (server_mode == SSM_STANDARD) { TTX->authenticated = 1; ATX->mailfrom[0] = 0; _ds_extract_address(ATX->mailfrom, input, sizeof(ATX->mailfrom)); if (daemon_reply(TTX, LMTP_OK, "2.1.0", "OK")<=0) { free(input); goto CLOSE; } } else { char id[256]; pass = ident = NULL; id[0] = 0; if (!_ds_extract_address(id, input, sizeof(id))) { pass = strtok_r(id, "@", &ptrptr); ident = strtok_r(NULL, "@", &ptrptr); } if (pass && ident) { char *serverpass; char *ptr, *ptr2, *ptr3; snprintf(buf, sizeof(buf), "ServerPass.%s", ident); serverpass = _ds_read_attribute(agent_config, buf); snprintf(buf, sizeof(buf), "ServerPass.%s", ident); if (serverpass && !strcmp(pass, serverpass)) { TTX->authenticated = 1; /* Parse PROCESSMODE service tag */ ptr = strstr(input, "DSPAMPROCESSMODE=\""); if (ptr) { char *mode; int i; ptr2 = strchr(ptr, '"')+1; mode = ptr2; while((ptr3 = strstr(ptr2, "\\\""))) ptr2 = ptr3+2; ptr3 = strchr(ptr2+2, '"'); if (ptr3) ptr3[0] = 0; strlcpy(processmode, mode, sizeof(processmode)); ptr = processmode; for(i=0;ptr[i];i++) { if (ptr[i] == '\\' && ptr[i+1] == '"') { strcpy(ptr+i, ptr+i+1); } } LOGDEBUG("process mode: '%s'", processmode); } if (daemon_reply(TTX, LMTP_OK, "2.1.0", "OK")<=0) { free(input); goto CLOSE; } } } } free(input); if (!TTX->authenticated) { LOGDEBUG("fd %d authentication failure.", TTX->sockfd); if (daemon_reply(TTX, LMTP_AUTH_ERROR, "5.1.0", "Authentication Required")<=0) { free(input); goto CLOSE; } tries++; if (tries>=3) { struct timeval tv; tv.tv_sec = 5; tv.tv_usec = 0; select(0, NULL, NULL, NULL, &tv); goto CLOSE; } } } } /* MAIL FROM response */ snprintf(buf, sizeof(buf), "%d OK", LMTP_OK); argc = 1; argv[0] = "dspam"; argv[1] = 0; /* Load open-LMTP configuration parameters */ if (server_mode == SSM_STANDARD) { parms = _ds_read_attribute(agent_config, "ServerParameters"); if (parms) { p = strdup(parms); if (p) { token = strtok_r(p, " ", &ptrptr); while(token != NULL && argc<63) { argv[argc] = token; argc++; argv[argc] = 0; token = strtok_r(NULL, " ", &ptrptr); } } } } /* RCPT TO */ while(ATX->users->items == 0 || invalid) { free(cmdline); cmdline = daemon_getline(TTX, 300); while(cmdline && (!strncasecmp(cmdline, "RCPT TO:", 8) || !strncasecmp(cmdline, "RSET", 4))) { char username[256]; char *at = NULL; if (!strncasecmp(cmdline, "RSET", 4)) { snprintf(buf, sizeof(buf), "%d OK", LMTP_OK); if (send_socket(TTX, buf)<=0) goto CLOSE; goto RSET; } if (_ds_extract_address(username, cmdline, sizeof(username)) || username[0] == 0 || username[0] == '-' || username[0] == '@') { if ((server_mode == SSM_DSPAM) || (server_mode == SSM_STANDARD && _ds_validate_address(username) == 0)) { daemon_reply(TTX, LMTP_BAD_CMD, "5.1.2", ERR_LMTP_BAD_RCPT); goto GETCMD; } } if (_ds_match_attribute(agent_config, "Broken", "case")) lc(username, username); /* Chop of @.* from the recipient */ if (_ds_match_attribute(agent_config, "StripRcptDomain", "on")) { at = strchr(username, '@'); if (at != NULL) *at = '\0'; } if (server_mode == SSM_DSPAM) { nt_add(ATX->users, username); } else { if (!parms || !strstr(parms, "--user ")) nt_add(ATX->users, username); if (!ATX->recipients) { ATX->recipients = nt_create(NT_CHAR); if (ATX->recipients == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); goto CLOSE; } } if (at != NULL) *at = '@'; /* always add complete address (user@domain) to recipient list */ nt_add(ATX->recipients, username); } if (daemon_reply(TTX, LMTP_OK, "2.1.5", "OK")<=0) goto CLOSE; GETCMD: free(cmdline); cmdline = daemon_getline(TTX, 300); } if (cmdline == NULL) goto CLOSE; if (!strncasecmp(cmdline, "RSET", 4)) { snprintf(buf, sizeof(buf), "%d OK", LMTP_OK); if (send_socket(TTX, buf)<=0) goto CLOSE; goto RSET; } if (!strncasecmp(cmdline, "quit", 4)) { daemon_reply(TTX, LMTP_OK, "2.0.0", "OK"); goto CLOSE; } /* Parse DSPAMPROCESSMODE input and set up process arguments */ if (server_mode == SSM_DSPAM && processmode[0] != 0) { token = strtok_r(processmode, " ", &ptrptr); while(token != NULL && argc<63) { argv[argc] = token; argc++; argv[argc] = 0; token = strtok_r(NULL, " ", &ptrptr); } } invalid = 0; if (process_arguments(ATX, argc, argv) || apply_defaults(ATX)) { LOG(LOG_ERR, ERR_AGENT_INIT_ATX); daemon_reply(TTX, LMTP_NO_RCPT, "5.1.0", ERR_AGENT_INIT_ATX); invalid = 1; } else if (ATX->users->items == 0) { daemon_reply(TTX, LMTP_NO_RCPT, "5.1.1", ERR_AGENT_USER_UNDEFINED); } } ATX->sockfd = fd; ATX->sockfd_output = 0; /* Something's terribly misconfigured */ if (check_configuration(ATX)) { LOG(LOG_ERR, ERR_AGENT_MISCONFIGURED); daemon_reply(TTX, LMTP_BAD_CMD, "5.3.5", ERR_AGENT_MISCONFIGURED); goto CLOSE; } /* DATA */ if (cmdline != NULL) { if (strncasecmp(cmdline, "DATA", 4)) { if (daemon_reply(TTX, LMTP_BAD_CMD, "5.0.0", "Need DATA Here")<0) goto CLOSE; input = daemon_expect(TTX, "DATA"); if (input == NULL) goto CLOSE; if (RSET(input)) goto RSET; } } if (daemon_reply(TTX, LMTP_DATA, "", INFO_LMTP_DATA)<=0) goto CLOSE; /* * Read in the message from a DATA. I personally like to just hang up on * a client stupid enough to pass in a NULL message for DATA, but you're * welcome to do whatever you want. */ message = read_sock(TTX, ATX); if (message == NULL || message->data == NULL || message->used == 0) { daemon_reply(TTX, LMTP_FAILURE, "5.2.0", ERR_LMTP_MSG_NULL); goto CLOSE; } /* * Lock a database handle. We currently use the modulus of the socket * id against the number of database connections in the cache. This * seems to work rather well, as we would need to lock up the entire * cache to wrap back around. And if we do wrap back around, that means * we're busy enough to justify spinning on the current lock (vs. seeking * out a free handle, which there likely are none). */ i = (TTX->sockfd % TTX->DTX->connection_cache); LOGDEBUG("using database handle id %d", i); if (TTX->DTX->flags & DRF_RWLOCK) { if (ATX->operating_mode == DSM_CLASSIFY || ATX->training_mode == DST_NOTRAIN || (ATX->training_mode == DST_TOE && ATX->classification == DSR_NONE)) { pthread_rwlock_rdlock(&TTX->DTX->connections[i]->rwlock); } else { pthread_rwlock_wrlock(&TTX->DTX->connections[i]->rwlock); } } else { pthread_mutex_lock(&TTX->DTX->connections[i]->lock); } LOGDEBUG("handle locked"); ATX->dbh = TTX->DTX->connections[i]->dbh; locked = i; /* Process the message by tying back into the agent functions */ ATX->results = nt_create(NT_PTR); if (ATX->results == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); goto CLOSE; } process_users(ATX, message); /* * Unlock the database handle as soon as we're done. We also need to * refresh our handle index with a new handle if for some reason we * had to re-establish a dewedged connection. */ if (TTX->DTX->connections[locked]->dbh != ATX->dbh) TTX->DTX->connections[locked]->dbh = ATX->dbh; if (TTX->DTX->flags & DRF_RWLOCK) { pthread_rwlock_unlock(&TTX->DTX->connections[locked]->rwlock); } else { pthread_mutex_unlock(&TTX->DTX->connections[locked]->lock); } locked = -1; /* Send a terminating '.' if --stdout in 'dspam' mode */ if (ATX->sockfd_output) { if (send_socket(TTX, ".")<=0) goto CLOSE; /* Otherwise, produce standard delivery results */ } else { struct nt_node *node_nt, *node_res = NULL; struct nt_c c_nt; if (ATX->recipients) node_nt = c_nt_first(ATX->recipients, &c_nt); else node_nt = c_nt_first(ATX->users, &c_nt); if (ATX->results) node_res = ATX->results->first; while(node_res && node_nt != NULL) { agent_result_t result = (agent_result_t) node_res->ptr; if (result != NULL && result->exitcode == ERC_SUCCESS) { if (server_mode == SSM_DSPAM) { snprintf(buf, sizeof(buf), "%d 2.6.0 <%s> Message accepted for delivery: %s", LMTP_OK, (char *) node_nt->ptr, (result->classification == DSR_ISSPAM) ? "SPAM" : "INNOCENT"); } else { snprintf(buf, sizeof(buf), "%d 2.6.0 <%s> Message accepted for delivery", LMTP_OK, (char *) node_nt->ptr); } } else { if (result != NULL && result->exitcode == ERC_PERMANENT_DELIVERY) { snprintf(buf, sizeof(buf), "%d 5.3.0 <%s> %s", LMTP_FAILURE, (char *) node_nt->ptr, (result->text[0]) ? result->text : "Permanent error occured"); } else { if (result != NULL && result->text[0]) { snprintf(buf, sizeof(buf), "%d 4.3.0 <%s> %s", LMTP_TEMP_FAIL, (char *) node_nt->ptr, result->text); } else { snprintf(buf, sizeof(buf), "%d 4.3.0 <%s> Error occured during %s", LMTP_TEMP_FAIL, (char *) node_nt->ptr, (result != NULL && result->exitcode == ERC_DELIVERY) ? "delivery" : "processing"); } } } if (send_socket(TTX, buf)<=0) goto CLOSE; if (ATX->recipients) node_nt = c_nt_next(ATX->recipients, &c_nt); else node_nt = c_nt_next(ATX->users, &c_nt); if (node_res) node_res = node_res->next; } } /* Cleanup and get ready for another message */ RSET: fflush(fd); buffer_destroy(message); message = NULL; if (ATX != NULL) { nt_destroy(ATX->users); nt_destroy(ATX->recipients); nt_destroy(ATX->results); free(ATX); ATX = NULL; free(cmdline); cmdline = NULL; TTX->authenticated = 0; /* argc = 0; */ } free(p); p = NULL; } /* while(1) */ /* Close connection and return */ CLOSE: if (locked>=0) pthread_mutex_unlock(&TTX->DTX->connections[locked]->lock); if (fd) fclose(fd); buffer_destroy(TTX->packet_buffer); if (message) buffer_destroy(message); if (ATX != NULL) { nt_destroy(ATX->users); nt_destroy(ATX->recipients); nt_destroy(ATX->results); } free(ATX); free(cmdline); free(TTX); decrement_thread_count(); pthread_exit(0); return 0; } /* * read_sock(THREAD_CTX *TTX, AGENT_CTX *ATX) * * DESCRIPTION * read in a message via socket and perform standard parseto services * this is a daemonized version of read_stdin, adding in timeouts and * termination via '.' * * INPUT ARGUMENTS * TTX thread context * ATX agent context * * RETURN VALUES * pointer to allocated buffer containing the message */ buffer * read_sock(THREAD_CTX *TTX, AGENT_CTX *ATX) { buffer *message; int body = 0, line = 1; char *buf; int strip = _ds_match_attribute(agent_config, "Broken", "lineStripping"); int parseto = _ds_match_attribute(agent_config, "ParseToHeaders", "on"); message = buffer_create(NULL); if (message == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return NULL; } if (_ds_match_attribute(agent_config, "DataSource", "document")) { buffer_cat(message, ".\n\n"); body = 1; } while ((buf = daemon_getline(TTX, 300))!=NULL) { chomp(buf); if (!strcmp(buf, ".")) { free(buf); return message; } if (strip) { size_t len = strlen(buf); while (len>1 && buf[len-2]=='\n') { buf[len-2] = buf[len-1]; buf[len-1] = 0; len--; } } if (line > 1 || strncmp (buf, "From QUARANTINE", 15)) { if (parseto) { if (buf[0] == 0) body = 1; if (!body && !strncasecmp(buf, "To: ", 4)) process_parseto(ATX, buf); } /* remove dot stuffing, if needed */ if((buf[0] && buf[0]=='.') && (buf[1] && buf[1]=='.')) { size_t i, len = strlen(buf); for(i=0;isource == DSS_ERROR && ATX->classification == DSR_ISINNOCENT && ATX->operating_mode == DSM_PROCESS && !strncasecmp (buf, "X-DSPAM-User: ", 14)) { char user[MAX_USERNAME_LENGTH]; strlcpy (user, buf + 14, sizeof (user)); chomp (user); nt_destroy (ATX->users); ATX->users = nt_create (NT_CHAR); if (ATX->users == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); goto bail; } nt_add (ATX->users, user); } free(buf); line++; } return NULL; bail: buffer_destroy(message); return NULL; } /* * daemon_expect(THREAD_CTX *TTX, const char *command) { * * DESCRIPTION * wait for the right command ot be issued by the client * if any other command is issued, give them an error * * INPUT ARGUMENTS * TTX thread context * command command to wait for * * RETURN VALUES * pointer to allocated character array containing the input line */ char *daemon_expect(THREAD_CTX *TTX, const char *command) { char buf[128]; char *cmd; cmd = daemon_getline(TTX, 300); if (cmd == NULL) return NULL; while(strncasecmp(cmd, command, strlen(command))) { if (!strncasecmp(cmd, "QUIT", 4)) { free(cmd); daemon_reply(TTX, LMTP_QUIT, "2.0.0", "OK"); return NULL; } else if (!strncasecmp(cmd, "RSET", 4)) { snprintf(buf, sizeof(buf), "%d OK", LMTP_OK); if (send_socket(TTX, buf)<=0) return NULL; free(cmd); if (!strncasecmp(command, "LHLO", 4)) { cmd = daemon_getline(TTX, 300); if (cmd == NULL) return NULL; } else { return "RSET"; } } else { snprintf(buf, sizeof(buf), "%d 5.0.0 Need %s here.", LMTP_BAD_CMD, command); if (send_socket(TTX, buf)<=0) return NULL; free(cmd); cmd = daemon_getline(TTX, 300); if (cmd == NULL) return NULL; } } return cmd; } /* * daemon_reply(THREAD_CTX *TTX, int reply, const char *ecode, const char *text) * * DESCRIPTION * send a formatted response to the client * * INPUT ARGUMENTS * TTX thread context * reply numeric response code * ecode enhanced status code * text info text to send * * RETURN VALUES * returns 0 on success */ int daemon_reply( THREAD_CTX *TTX, int reply, const char *ecode, const char *text) { char buf[128]; snprintf(buf, sizeof(buf), "%d %s%s%s", reply, ecode, (ecode[0]) ? " " : "", text); return send_socket(TTX, buf); } /* * daemon_extension(THREAD_CTX *TTX, const char *extension) * * DESCRIPTION * advertise a supported LMTP extension * * INPUT ARGUMENTS * TTX thread context * extension extension name * * RETURN VALUES * returns 0 on success */ int daemon_extension(THREAD_CTX *TTX, const char *extension) { char buf[128]; snprintf(buf, sizeof(buf), "%d-%s", LMTP_OK, extension); return send_socket(TTX, buf); } /* * process_signal(int sig) * * DESCRIPTION * terminate daemon or perform a reload (signal handler) * * INPUT ARGUMENTS * sig signal code * */ void process_signal(int sig) { __daemon_run = 0; if (sig == SIGHUP) { LOG(LOG_INFO, INFO_DAEMON_RELOAD); __hup = 1; } else { LOG(LOG_WARNING, ERR_DAEMON_TERMINATE, sig); __hup = 0; } return; } /* * daemon_getline(THREAD_CTX *TTX, int timeout) * * DESCRIPTION * retrieves a full line of text from a socket * * INPUT ARGUMENTS * TTX thread context * timeout timeout to enforce in waiting for complete line * * RETURN VALUES * pointer to allocated character array containing line of input */ char *daemon_getline(THREAD_CTX *TTX, int timeout) { struct timeval tv; char *p, *q, *pop; char buf[1024]; int total_wait = 0; long recv_len; fd_set fds; int i; pop = pop_buffer(TTX); while(!pop && total_waitsockfd, &fds); i = select(TTX->sockfd+1, &fds, NULL, NULL, &tv); if (i<=0) continue; recv_len = recv(TTX->sockfd, buf, sizeof(buf)-1, 0); buf[recv_len] = 0; if (recv_len == 0) return NULL; for(p=q=buf,i=0;ipacket_buffer, buf); pop = pop_buffer(TTX); } #ifdef VERBOSE LOGDEBUG("SRECV: %s", pop); #endif return pop; } /* * {increment,decrement}_thread_count * * DESCRIPTION * keep track of running thread count * * in order to reload or terminate, all threads must complete and exit. * these functions are called whenever a thread spawns or ends and bumps the * thread counter in the appropriate direction * * RETURN VALUES * pointer to allocated character array containing line of input */ void increment_thread_count(void) { pthread_mutex_lock(&__lock); __num_threads++; pthread_mutex_unlock(&__lock); } void decrement_thread_count(void) { pthread_mutex_lock(&__lock); __num_threads--; pthread_mutex_unlock(&__lock); } #endif dspam-3.10.2+dfsg/src/tools/0000755000175000017500000000000011745313543015113 5ustar julienjuliendspam-3.10.2+dfsg/src/tools/dspam_crc.c0000644000175000017500000000311511741351001017175 0ustar julienjulien/* $Id: dspam_crc.c,v 1.8 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include "util.h" #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "config.h" #include "libdspam.h" #define SYNTAX "syntax: dspam_crc [token]" int main (int argc, char *argv[]) { unsigned long long crc; if (argc < 2) { printf ("%s\n", SYNTAX); exit (EXIT_FAILURE); } crc = _ds_getcrc64 (argv[1]); printf ("TOKEN: '%s' CRC: %"LLU_FMT_SPEC"\n", argv[1], crc); exit (EXIT_SUCCESS); } dspam-3.10.2+dfsg/src/tools/dspam_merge.c0000644000175000017500000001631411741351001017532 0ustar julienjulien/* $Id: dspam_merge.c,v 1.158 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #define DEBUG 1 #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "util.h" #include "libdspam.h" #include "language.h" #include "read_config.h" #include "config_api.h" #define TSYNTAX "syntax: dspam_merge [user1] [user2] ... [userN] [-o user]" DSPAM_CTX *open_ctx, *open_mtx; void dieout (int signal); int main (int argc, char **argv) { char destuser[MAX_USERNAME_LENGTH]; struct nt *users = NULL; struct nt_node *node_nt; struct nt_c c_nt; struct _ds_storage_record *token; ds_diction_t merge1 = NULL; ds_diction_t merge2 = NULL; DSPAM_CTX *CTX, *MTX; ds_term_t ds_term; ds_cursor_t ds_c; long i; #ifndef _WIN32 #ifdef TRUSTED_USER_SECURITY struct passwd *p = getpwuid (getuid ()); #endif #endif /* Read dspam.conf */ agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); fprintf (stderr, ERR_AGENT_READ_CONFIG "\n"); exit(EXIT_FAILURE); } if (!_ds_read_attribute(agent_config, "Home")) { LOG(LOG_ERR, ERR_AGENT_DSPAM_HOME); fprintf (stderr, ERR_AGENT_DSPAM_HOME "\n"); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } if (libdspam_init(_ds_read_attribute(agent_config, "StorageDriver")) != 0) { LOG(LOG_ERR, ERR_DRV_INIT); fprintf (stderr, ERR_DRV_INIT "\n"); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } #ifndef _WIN32 #ifdef TRUSTED_USER_SECURITY if (!_ds_match_attribute(agent_config, "Trust", p->pw_name) && p->pw_uid) { fprintf(stderr, ERR_TRUSTED_MODE "\n"); _ds_destroy_config(agent_config); goto bail; } #endif #endif if (argc < 4) { printf ("%s\n", TSYNTAX); _ds_destroy_config(agent_config); goto bail; } open_ctx = open_mtx = NULL; signal (SIGINT, dieout); signal (SIGPIPE, dieout); signal (SIGTERM, dieout); dspam_init_driver (NULL); users = nt_create (NT_CHAR); if (users == NULL) { fprintf (stderr, ERR_MEM_ALLOC); goto bail; } for (i = 1; i < argc; i++) { if (!strncmp (argv[i], "--profile=", 10)) { if (!_ds_match_attribute(agent_config, "Profile", argv[i]+10)) { LOG(LOG_ERR, ERR_AGENT_NO_SUCH_PROFILE, argv[i]+10); fprintf (stderr, ERR_AGENT_NO_SUCH_PROFILE "\n", argv[i]+10); goto bail; } else { _ds_overwrite_attribute(agent_config, "DefaultProfile", argv[i]+10); } continue; } if (!strcmp (argv[i], "-o")) { strlcpy (destuser, argv[i + 1], sizeof (destuser)); i += 1; continue; } nt_add (users, argv[i]); } #ifdef DEBUG fprintf(stderr, "Destination user: %s\n", destuser); #endif CTX = dspam_create (destuser, NULL, _ds_read_attribute(agent_config, "Home"), DSM_PROCESS, 0); open_ctx = CTX; if (CTX == NULL) { fprintf (stderr, "unable to initialize context: %s\n", strerror (errno)); goto bail; } set_libdspam_attributes(CTX); if (dspam_attach(CTX, NULL)) { LOG (LOG_WARNING, "unable to attach dspam context"); fprintf (stderr, "Unable to attach DSPAM context\n"); goto bail; } node_nt = c_nt_first (users, &c_nt); while (node_nt != NULL) { #ifdef DEBUG printf ("Merging user: %s\n", (const char *) node_nt->ptr); #endif merge1 = ds_diction_create(196613); merge2 = ds_diction_create(196613); if (users == NULL || merge1 == NULL || merge2 == NULL) { fprintf (stderr, ERR_MEM_ALLOC); goto bail; } MTX = dspam_create ((const char *) node_nt->ptr, NULL, _ds_read_attribute(agent_config, "Home"), DSM_CLASSIFY, 0); open_mtx = MTX; if (MTX == NULL) { fprintf (stderr, "unable to initialize context: %s\n", strerror (errno)); node_nt = c_nt_next (users, &c_nt); continue; } set_libdspam_attributes(MTX); if (dspam_attach(MTX, NULL)) { LOG (LOG_WARNING, "unable to attach dspam context"); fprintf (stderr, "Unable to attach DSPAM context\n"); goto bail; } CTX->totals.spam_learned += MTX->totals.spam_learned; CTX->totals.innocent_learned += MTX->totals.innocent_learned; token = _ds_get_nexttoken (MTX); while (token != NULL) { char tok[128]; snprintf(tok, 128, "%llu", token->token); ds_diction_touch (merge1, token->token, tok, 0); ds_diction_touch (merge2, token->token, tok, 0); token = _ds_get_nexttoken (MTX); } _ds_getall_spamrecords(CTX, merge1); _ds_getall_spamrecords(MTX, merge2); ds_c = ds_diction_cursor(merge2); ds_term = ds_diction_next(ds_c); i = 0; while(ds_term) { ds_term_t target = ds_diction_find(merge1, ds_term->key); if (target) { target->s.spam_hits += ds_term->s.spam_hits; target->s.innocent_hits += ds_term->s.innocent_hits; target->s.status |= TST_DIRTY; _ds_set_spamrecord(CTX, target->key, &target->s); } ds_term = ds_diction_next(ds_c); i++; } #ifdef DEBUG printf ("processed %ld tokens\n", i); #endif node_nt = c_nt_next (users, &c_nt); ds_diction_destroy(merge1); ds_diction_destroy(merge2); dspam_destroy (MTX); open_mtx = NULL; } #ifdef DEBUG printf ("storing merged tokens...\n"); #endif #ifdef DEBUG printf ("completed.\n"); #endif nt_destroy (users); dspam_destroy (CTX); open_ctx = NULL; dspam_shutdown_driver (NULL); _ds_destroy_config(agent_config); libdspam_shutdown(); exit (EXIT_SUCCESS); bail: if (merge1 != NULL) ds_diction_destroy(merge1); if (merge2 != NULL) ds_diction_destroy(merge2); if (open_ctx != NULL) dspam_destroy (open_ctx); if (open_mtx != NULL) dspam_destroy (open_mtx); dspam_shutdown_driver (NULL); if (users != NULL) nt_destroy(users); _ds_destroy_config(agent_config); libdspam_shutdown(); exit (EXIT_FAILURE); } void dieout (int signal) { signal = signal; /* Keep compile happy */ fprintf (stderr, "terminated.\n"); if (open_ctx != NULL) dspam_destroy (open_ctx); if (open_mtx != NULL) dspam_destroy (open_mtx); _ds_destroy_config(agent_config); exit (EXIT_SUCCESS); } dspam-3.10.2+dfsg/src/tools/dspam_2sql.c0000644000175000017500000001367411741351001017322 0ustar julienjulien/* $Id: dspam_2sql.c,v 1.17 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include "libdspam.h" #include "util.h" #include "read_config.h" #include "config_api.h" #include "language.h" DSPAM_CTX *open_ctx, *open_mtx; int dump_user (const char *username); int process_all_users (void); void dieout (int signal); int main (int argc, char **argv) { #ifndef _WIN32 #ifdef TRUSTED_USER_SECURITY struct passwd *p = getpwuid (getuid ()); #endif #endif int i, ret; /* Read dspam.conf */ agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); fprintf (stderr, ERR_AGENT_READ_CONFIG "\n"); exit(EXIT_FAILURE); } if (!_ds_read_attribute(agent_config, "Home")) { LOG(LOG_ERR, ERR_AGENT_DSPAM_HOME); fprintf (stderr, ERR_AGENT_DSPAM_HOME "\n"); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } if (libdspam_init(_ds_read_attribute(agent_config, "StorageDriver")) != 0) { LOG(LOG_ERR, ERR_DRV_INIT); fprintf (stderr, ERR_DRV_INIT "\n"); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } #ifndef _WIN32 #ifdef TRUSTED_USER_SECURITY if (!_ds_match_attribute(agent_config, "Trust", p->pw_name) && p->pw_uid) { fprintf(stderr, ERR_TRUSTED_MODE "\n"); _ds_destroy_config(agent_config); goto BAIL; } #endif #endif for(i=0;ipw_uid, CTX->totals.spam_learned, CTX->totals.innocent_learned, CTX->totals.spam_misclassified, CTX->totals.innocent_misclassified, CTX->totals.spam_corpusfed, CTX->totals.innocent_corpusfed, CTX->totals.spam_classified, CTX->totals.innocent_classified); record = _ds_get_nexttoken (CTX); while (record != NULL) { printf ("insert into dspam_token_data (uid, token, spam_hits, innocent_hits, last_hit) values(%d, \"%"LLU_FMT_SPEC"\", %ld, %ld, %ld);\n", (int) p->pw_uid, record->token, record->spam_hits, record->innocent_hits, (long) record->last_hit); record = _ds_get_nexttoken (CTX); } dspam_destroy (CTX); open_mtx = NULL; return 0; } void dieout (int signal) { signal = signal; /* Keep compiler happy */ fprintf (stderr, "terminated.\n"); if (open_ctx != NULL) dspam_destroy (open_ctx); if (open_mtx != NULL) dspam_destroy (open_mtx); _ds_destroy_config(agent_config); exit (EXIT_SUCCESS); } dspam-3.10.2+dfsg/src/tools/dspam_admin.c0000644000175000017500000001765111741351001017530 0ustar julienjulien/* $Id: dspam_admin.c,v 1.26 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "libdspam.h" #include "read_config.h" #include "language.h" #include "pref.h" #define TSYNTAX "syntax: dspam_admin [function] [arguments] [--profile=PROFILE]" /* PREFERENCE FUNCTIONS 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] */ int set_preference_attribute(const char *, const char *, const char *); int del_preference_attribute(const char *, const char *); int list_preference_attributes(const char *); int list_aggregate_preference_attributes(const char *); void dieout (int signal); int usage (void); int min_args(int argc, int min); int main (int argc, char **argv) { #ifdef TRUSTED_USER_SECURITY struct passwd *p = getpwuid (getuid ()); #endif int i, valid = 0; int ret = EXIT_SUCCESS; /* Read dspam.conf */ agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); fprintf (stderr, ERR_AGENT_READ_CONFIG "\n"); exit(EXIT_FAILURE); } if (!_ds_read_attribute(agent_config, "Home")) { LOG(LOG_ERR, ERR_AGENT_DSPAM_HOME); fprintf (stderr, ERR_AGENT_DSPAM_HOME "\n"); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } if (libdspam_init(_ds_read_attribute(agent_config, "StorageDriver")) != 0) { LOG(LOG_ERR, ERR_DRV_INIT); fprintf (stderr, ERR_DRV_INIT "\n"); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } #ifndef _WIN32 #ifdef TRUSTED_USER_SECURITY if (!_ds_match_attribute(agent_config, "Trust", p->pw_name) && p->pw_uid) { fprintf(stderr, ERR_TRUSTED_MODE "\n"); _ds_destroy_config(agent_config); goto BAIL; } #endif #endif for(i=0;iattribute, pref->value); } _ds_pref_free(PTX); free(PTX); return 0; } int list_aggregate_preference_attributes(const char *username) { agent_pref_t PTX = NULL; agent_pref_t STX = NULL; agent_pref_t UTX = NULL; agent_attrib_t pref; int i; STX = _ds_pref_load(agent_config, NULL, _ds_read_attribute(agent_config, "Home"), NULL); if (STX == NULL || STX[0] == 0) { if (STX) { _ds_pref_free(STX); } LOGDEBUG("default preferences empty. reverting to dspam.conf preferences."); STX = pref_config(); } else { LOGDEBUG("loaded default preferences externally"); } if (username[0] == 0 || !strncmp(username, "default", strlen(username))) UTX = _ds_pref_load(agent_config, NULL, _ds_read_attribute(agent_config, "Home"), NULL); else { UTX = _ds_pref_load(agent_config, username, _ds_read_attribute(agent_config, "Home"), NULL); } PTX = _ds_pref_aggregate(STX, UTX); _ds_pref_free(STX); free(STX); if (UTX != NULL) { _ds_pref_free(UTX); free(UTX); } for(i=0;PTX[i];i++) { pref = PTX[i]; printf("%s=%s\n", pref->attribute, pref->value); } _ds_pref_free(PTX); free(PTX); return 0; } dspam-3.10.2+dfsg/src/tools/dspam_stats.c0000644000175000017500000003355311741351001017575 0ustar julienjulien/* $Id: dspam_stats.c,v 1.36 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #ifndef _WIN32 #include #include #endif #include "config.h" #include "libdspam.h" #include "read_config.h" #include "config_api.h" #include "language.h" #include "util.h" #define TSYNTAX "syntax: dspam_stats [-h]\|[--profile=PROFILE] [-HrsSt] [user [user...]]" #ifdef _WIN32 /* no trusted users under Windows */ #undef TRUSTED_USER_SECURITY #endif DSPAM_CTX *open_ctx, *open_mtx; int opt_humanfriendly; int opt_reset; int opt_snapshot; int opt_stats; int opt_total; int stat_user (const char *username, struct _ds_spam_totals *totals); int process_all_users (struct _ds_spam_totals *totals); void dieout (int signal); void usage (void); int main (int argc, char **argv) { int ch, i, users = 0; #ifndef HAVE_GETOPT int optind = 1; #endif struct _ds_spam_totals totals; #ifdef TRUSTED_USER_SECURITY struct passwd *p = getpwuid (getuid ()); int trusted = 0; #endif memset(&totals, 0, sizeof(struct _ds_spam_totals)); /* Read dspam.conf */ agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); fprintf (stderr, ERR_AGENT_READ_CONFIG "\n"); exit(EXIT_FAILURE); } if (!_ds_read_attribute(agent_config, "Home")) { LOG(LOG_ERR, ERR_AGENT_DSPAM_HOME); fprintf (stderr, ERR_AGENT_DSPAM_HOME "\n"); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } if (libdspam_init(_ds_read_attribute(agent_config, "StorageDriver")) != 0) { LOG(LOG_ERR, ERR_DRV_INIT); fprintf (stderr, ERR_DRV_INIT "\n"); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } #ifdef TRUSTED_USER_SECURITY if (_ds_match_attribute(agent_config, "Trust", p->pw_name) || !p->pw_uid) { trusted = 1; } #endif for(i=0;ipw_uid, p->pw_name); fprintf (stderr, ERR_TRUSTED_PRIV "\n", "--profile", p->pw_uid, p->pw_name); _ds_destroy_config(agent_config); goto BAIL; } #endif if (!_ds_match_attribute(agent_config, "Profile", argv[i]+10)) { LOG(LOG_ERR, ERR_AGENT_NO_SUCH_PROFILE, argv[i]+10); fprintf (stderr, ERR_AGENT_NO_SUCH_PROFILE "\n", argv[i]+10); _ds_destroy_config(agent_config); goto BAIL; } else { _ds_overwrite_attribute(agent_config, "DefaultProfile", argv[i]+10); } break; } } open_ctx = open_mtx = NULL; signal (SIGINT, dieout); #ifndef _WIN32 signal (SIGPIPE, dieout); #endif signal (SIGTERM, dieout); dspam_init_driver (NULL); /* Process command line */ ch = opt_humanfriendly = 0; opt_reset = opt_snapshot = opt_stats = opt_total = 0; #ifndef HAVE_GETOPT while ( argv[optind] && argv[optind][0] == '-' && (ch = argv[optind][1]) && argv[optind][2] == '\0' ) #else while((ch = getopt(argc, argv, "hHrsS")) != -1) #endif { switch(ch) { case 'h': /* print help, and then exit. usage exits for us */ usage(); break; case 'H': opt_humanfriendly = 1; break; case 'r': opt_reset = 1; break; case 's': opt_snapshot = 1; break; case 'S': opt_stats = 1; break; case 't': opt_total = 1; break; #ifndef HAVE_GETOPT default: fprintf(stderr, "%s: unknown option \"%s\".\n", argv[0], argv[optind] + 1); usage(); #endif } #ifndef HAVE_GETOPT optind++; #endif } #ifndef HAVE_GETOPT /* reset our option array and index to where we are after getopt */ argv += optind; argc -= optind; #endif /* process arguments */ for (i=0; i < argc; i++) { if (argv[i] && strncmp(argv[i], "--", 2)) { #ifdef TRUSTED_USER_SECURITY if ( !trusted && strcmp(argv[i], p->pw_name) ) { fprintf(stderr, ERR_TRUSTED_MODE "\n"); _ds_destroy_config(agent_config); goto BAIL; } #endif stat_user(argv[i], &totals); users++; } } if (!users) { #ifdef TRUSTED_USER_SECURITY if ( !trusted ) { fprintf(stderr, ERR_TRUSTED_MODE "\n"); _ds_destroy_config(agent_config); goto BAIL; } #endif process_all_users (&totals); } if (opt_total) stat_user(NULL, &totals); dspam_shutdown_driver (NULL); _ds_destroy_config(agent_config); libdspam_shutdown(); exit (EXIT_SUCCESS); BAIL: libdspam_shutdown(); exit(EXIT_FAILURE); } int process_all_users (struct _ds_spam_totals *totals) { DSPAM_CTX *CTX; char *user; CTX = dspam_create (NULL, NULL, _ds_read_attribute(agent_config, "Home"), DSM_TOOLS, 0); open_ctx = CTX; if (CTX == NULL) { fprintf (stderr, "Could not initialize context: %s\n", strerror (errno)); return EFAILURE; } set_libdspam_attributes(CTX); if (dspam_attach(CTX, NULL)) { LOG (LOG_WARNING, "unable to attach dspam context"); fprintf (stderr, "Unable to attach DSPAM context\n"); dspam_destroy(CTX); return EFAILURE; } user = _ds_get_nextuser (CTX); while (user != NULL) { stat_user (user, totals); user = _ds_get_nextuser (CTX); } dspam_destroy (CTX); open_ctx = NULL; return 0; } int stat_user (const char *username, struct _ds_spam_totals *totals) { DSPAM_CTX *MTX = NULL; long total_spam, total_innocent, spam_misclassified, innocent_misclassified, spam_corpusfed, innocent_corpusfed, all_spam, all_innocent; char filename[MAX_FILENAME_LENGTH]; FILE *file; struct _ds_spam_totals *tptr; if (username) { MTX = dspam_create (username, NULL, _ds_read_attribute(agent_config, "Home"), DSM_CLASSIFY, 0); open_mtx = MTX; if (MTX == NULL) { fprintf (stderr, "Could not init context: %s\n", strerror (errno)); return EUNKNOWN; } set_libdspam_attributes(MTX); if (dspam_attach(MTX, NULL)) { LOG (LOG_WARNING, "unable to attach dspam context"); fprintf (stderr, "Unable to attach DSPAM context\n"); return EUNKNOWN; } tptr = &MTX->totals; } else { tptr = totals; } /* Convenience variables. Compiling with optimization will cause this to have 0 slowdown, as it is essentially dead code */ total_spam = MAX(0, (tptr->spam_learned + tptr->spam_classified) - (tptr->spam_misclassified + tptr->spam_corpusfed)); total_innocent = MAX(0, (tptr->innocent_learned + tptr->innocent_classified) - (tptr->innocent_misclassified + tptr->innocent_corpusfed)); spam_misclassified = tptr->spam_misclassified; innocent_misclassified = tptr->innocent_misclassified; spam_corpusfed = tptr->spam_corpusfed; innocent_corpusfed = tptr->innocent_corpusfed; if (MTX) { totals->spam_learned += MTX->totals.spam_learned; totals->innocent_learned += MTX->totals.innocent_learned; totals->spam_misclassified += MTX->totals.spam_misclassified; totals->innocent_misclassified += MTX->totals.innocent_misclassified; totals->spam_corpusfed += MTX->totals.spam_corpusfed; totals->innocent_corpusfed += MTX->totals.innocent_corpusfed; } /* Subtract the snapshot from the current totals to get stats "since last reset" for the user */ if (opt_snapshot && username) { long s_total_spam, s_total_innocent, s_spam_misclassified, s_innocent_misclassified, s_spam_corpusfed, s_innocent_corpusfed; _ds_userdir_path(filename, _ds_read_attribute(agent_config, "Home"), username, "rstats"); _ds_prepare_path_for (filename); file = fopen (filename, "r"); if (file != NULL) { if (fscanf(file, "%ld,%ld,%ld,%ld,%ld,%ld", &s_total_spam, &s_total_innocent, &s_spam_misclassified, &s_innocent_misclassified, &s_spam_corpusfed, &s_innocent_corpusfed)==6) { total_spam -= s_total_spam; total_innocent -= s_total_innocent; spam_misclassified -= s_spam_misclassified; innocent_misclassified -= s_innocent_misclassified; spam_corpusfed -= s_spam_corpusfed; innocent_corpusfed -= s_innocent_corpusfed; } fclose(file); } } all_spam = total_spam + spam_misclassified, all_innocent = total_innocent + innocent_misclassified; if (opt_humanfriendly) { printf("%s:\n\ \tTP True Positives: %6ld\n\ \tTN True Negatives: %6ld\n\ \tFP False Positives: %6ld\n\ \tFN False Negatives: %6ld\n\ \tSC Spam Corpusfed: %6ld\n\ \tNC Nonspam Corpusfed: %6ld\n\ \tTL Training Left: %6ld\n\ \tSHR Spam Hit Rate % 7.2f%%\n\ \tHSR Ham Strike Rate: % 7.2f%%\n\ \tPPV Positive predictive value: % 7.2f%%\n\ \tOCA Overall Accuracy: % 7.2f%%\n\ \n", (username) ? username : "TOTAL", total_spam, total_innocent, innocent_misclassified, spam_misclassified, spam_corpusfed, innocent_corpusfed, MAX(0, 2500 - (tptr->innocent_learned + tptr->innocent_classified)), (all_spam) ? (100.0-((float)spam_misclassified / (float)all_spam )*100.0) : 100.0, (all_innocent) ? 100-(100.0-((float)innocent_misclassified / (float)all_innocent )*100.0) : 100.0, (total_spam + innocent_misclassified) ? 100-(100.0-((float)total_spam / (float)(total_spam + innocent_misclassified))*100) : 100.0, (all_spam + all_innocent) ? (100.0-(((float)spam_misclassified +(float)innocent_misclassified) / (float)(all_spam + all_innocent))*100.0) : 100.0); } else { #ifdef LONG_USERNAMES printf ("%s\n TP:%6ld TN:%6ld FP:%6ld FN:%6ld SC:%6ld NC:%6ld\n", #else printf ("%-16s TP:%6ld TN:%6ld FP:%6ld FN:%6ld SC:%6ld NC:%6ld\n", #endif (username) ? username : "TOTAL", total_spam, total_innocent, innocent_misclassified, spam_misclassified, spam_corpusfed, innocent_corpusfed); if (opt_stats) printf ( #ifdef LONG_USERNAMES " " #else " " #endif "SHR: % 7.2f%% HSR: % 7.2f%% OCA: % 7.2f%%\n", (all_spam) ? (100.0-((float)spam_misclassified / (float)all_spam )*100.0) : 100.0, (all_innocent) ? 100.0- (100.0-((float)innocent_misclassified / (float)all_innocent )*100.0) : 0.0, (all_spam + all_innocent) ? (100.0-(((float)spam_misclassified +(float)innocent_misclassified) / (float)(all_spam + all_innocent))*100.0) : 100.0); } if (opt_reset && username) { _ds_userdir_path(filename, _ds_read_attribute(agent_config, "Home"), username, "rstats"); _ds_prepare_path_for (filename); file = fopen (filename, "w"); if (file == NULL) { LOG(LOG_ERR, ERR_IO_FILE_WRITE, filename, strerror (errno)); if (MTX) dspam_destroy (MTX); open_mtx = NULL; return EFILE; } fprintf (file, "%ld,%ld,%ld,%ld,%ld,%ld\n", MAX(0,(tptr->spam_learned + tptr->spam_classified) - (tptr->spam_misclassified + tptr->spam_corpusfed)), MAX(0,(tptr->innocent_learned + tptr->innocent_classified) - (tptr->innocent_misclassified + tptr->innocent_corpusfed)), tptr->spam_misclassified, tptr->innocent_misclassified, tptr->spam_corpusfed, tptr->innocent_corpusfed); fclose(file); } if (MTX) dspam_destroy (MTX); open_mtx = NULL; return 0; } void dieout (int signal) { signal = signal; /* Keep compile happy */ fprintf (stderr, "terminated.\n"); if (open_ctx != NULL) dspam_destroy (open_ctx); if (open_mtx != NULL) dspam_destroy (open_mtx); _ds_destroy_config(agent_config); exit (EXIT_SUCCESS); } void usage (void) { (void)fprintf (stderr, "usage: dspam_stats [-h]|[--profile=PROFILE] [-HrsSt] [user [user...]]\n\ \tPrint dspam statistics for users.\n\ \tIf no users are specified, stats for all users are printed.\n\ \t-h: print this message\n\ \t-H: print stats in \"human friendly\" format\n\ \t-r: Resets the current snapshot\n\ \t-s: Displays stats since last snapshot (instead of since epoch)\n\ \t-S: Displays accuracy percentages in addition to stats\n\ \t-t: Displays a total of all statistics displayed\n"); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } dspam-3.10.2+dfsg/src/tools/Makefile.am0000644000175000017500000000326011622570546017152 0ustar julienjulien# $Id: Makefile.am,v 1.85 2010/03/13 00:57:23 sbajic Exp $ # tools/Makefile.am EXTRA_DIST = dspam_train.in dspam_notify.in dspam_logrotate CLEANFILES = dspam_train dspam_notify AM_CPPFLAGS = \ -DLOGDIR=\"$(logdir)\" -DCONFIG_DEFAULT=\"$(sysconfdir)/dspam.conf\" \ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE -I$(top_srcdir) CFLAGS = @CFLAGS@ -I$(top_srcdir)/src bin_PROGRAMS = dspam_dump dspam_clean dspam_crc dspam_stats dspam_merge dspam_2sql dspam_admin bin_SCRIPTS = dspam_train dspam_logrotate dspam_notify dspam_2sql_SOURCES = dspam_2sql.c ../read_config.c ../config_api.c dspam_2sql_LDFLAGS = dspam_dump_SOURCES = dspam_dump.c ../read_config.c ../config_api.c dspam_dump_LDFLAGS = dspam_clean_SOURCES = dspam_clean.c ../read_config.c ../config_api.c dspam_clean_LDFLAGS = dspam_crc_SOURCES = dspam_crc.c dspam_crc_LDFLAGS = dspam_stats_SOURCES = dspam_stats.c ../read_config.c ../config_api.c dspam_stats_LDFLAGS = dspam_merge_SOURCES = dspam_merge.c ../read_config.c ../config_api.c dspam_merge_LDFLAGS = dspam_admin_SOURCES = dspam_admin.c ../read_config.c ../config_api.c dspam_admin_LDFLAGS = LDADD = ../libdspam.la sed_substitute_variables = \ dspam_transformed=`echo dspam | sed '$(transform)'`; \ sed -e 's,@bindir\@,$(bindir),g' \ -e 's,@sysconfdir\@,$(sysconfdir),g' \ -e 's,@PACKAGE_STRING\@,$(PACKAGE_STRING),g' \ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \ -e "s,@dspam_transformed\@,$$dspam_transformed,g" dspam_train: dspam_train.in Makefile ${sed_substitute_variables} < $(srcdir)/dspam_train.in > $@ chmod +x $@ dspam_notify: dspam_notify.in Makefile ${sed_substitute_variables} < $(srcdir)/dspam_notify.in > $@ chmod +x $@ dspam-3.10.2+dfsg/src/tools/dspam_train.in0000755000175000017500000001533511622570546017760 0ustar julienjulien#!/usr/bin/perl # # $Id: dspam_train.in,v 1.01 2010/08/12 02:03:35 sbajic Exp $ use strict; use vars qw { $USER %CONFIG $SPAM_CORPUS $NONSPAM_CORPUS }; $CONFIG{'SHOW_SUBJECTS'} = 0; $CONFIG{'DSPAM_BINARY'} = '@bindir@/@dspam_transformed@'; $CONFIG{'BINDIR'} = '@bindir@'; ### DO NOT CONFIGURE ANYTHING BELOW THIS LINE $USER = shift; $SPAM_CORPUS = shift; if ($SPAM_CORPUS eq "--client" || $SPAM_CORPUS eq "-c") { $SPAM_CORPUS = shift; $CONFIG{'DSPAM_BINARY'} .= " --client"; } $NONSPAM_CORPUS = shift; if ($NONSPAM_CORPUS eq "") { # we were wrong about the first argument, it was the spam corpus and not # the user name in fact ($USER, $NONSPAM_CORPUS, $SPAM_CORPUS) = ((getpwuid($<))[0], $SPAM_CORPUS, $USER) } sub usage { print STDERR "Usage: $0 [username] [--client] [[-i index]|[spam_corpus] [nonspam_corpus]]\n"; exit(-1); } print "Taking Snapshot...\n"; system("$CONFIG{'BINDIR'}/dspam_stats -r $USER"); if (($? >> 8) != 0) { print STDERR "Running dspam_stats for $USER failed.\n"; exit(-1); } if ($SPAM_CORPUS eq "-i") { TrainOnIndex($NONSPAM_CORPUS); } else { &Train("$NONSPAM_CORPUS", "$SPAM_CORPUS"); } FinishTraining(); sub TrainOnIndex { my($index) = @_; open(INDEX, "<$index") or die "Failed to open index file \"$index\": $!\n"; print "Training on $index index...\n"; while() { chomp; my($class, $filename) = split(/\s+/); if ($class eq "ham" || $class eq "nonspam") { TestNonspam($filename); } elsif ($class eq "spam") { TestSpam($filename); } else { die "ERROR: Unknown class '$class'. Test Broken."; } } } sub Train { my($nonspam, $spam) = @_; my(@nonspam_corpus, @spam_corpus); my($msg); print "Training $nonspam / $spam corpora...\n"; @nonspam_corpus = GetFilesOrMessages($nonspam); @spam_corpus = GetFilesOrMessages($spam); while($#nonspam_corpus > -1 || $#spam_corpus > -1) { if ($#nonspam_corpus > -1) { my($count) = 0; # Process nonspam until balanced $msg = shift(@nonspam_corpus); TestNonspam($msg); if ($#spam_corpus > -1) { $count = ($#nonspam_corpus+1) / ($#spam_corpus+1); } for(1..$count-1) { $msg = shift(@nonspam_corpus); TestNonspam($msg); } } if ($#spam_corpus > -1) { my($count) = 0; # Process spam until balanced $msg = shift(@spam_corpus); TestSpam($msg); if ($#nonspam_corpus > -1) { $count = ($#spam_corpus+1) / ($#nonspam_corpus+1); } for(1..$count-1) { $msg = shift(@spam_corpus); TestSpam($msg); } } } } sub FinishTraining() { print "TRAINING COMPLETE\n"; print "\nTraining Snapshot:\n"; system("$CONFIG{'BINDIR'}/dspam_stats -S -s $USER"); if (($? >> 8) != 0) { print STDERR "Running dspam_stats for $USER failed.\n"; exit(-1); } print "\nOverall Statistics:\n"; system("$CONFIG{'BINDIR'}/dspam_stats -S $USER"); if (($? >> 8) != 0) { print STDERR "Running dspam_stats for $USER failed.\n"; exit(-1); } } sub GetFilesOrMessages { my ($corpus) = @_; if (-d $corpus) { return GetFiles($corpus); } elsif (-f $corpus) { return GetMessages($corpus); } else { die "Corpus \"$corpus\" must be either a MBOX file or a maildir directory.\n" } } sub GetFiles { my($corpus) = @_; my(@files); opendir(DIR, "$corpus") || die "$corpus: $!"; @files = grep(!/^\.\.?$/, readdir(DIR)); closedir(DIR); return map { $_ = "$corpus/" . $_ } @files; } sub GetMessages { my ($mbox) = @_; die "Please install Mail::MboxParser module if you want to be able to use " . "MBOX files for training.\n" unless eval { require Mail::MboxParser; }; # filter out special pseudo messages used by Pine/UW-IMAPd return grep { $_->header->{subject} ne "DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA" } Mail::MboxParser->new($mbox)->get_messages(); } sub TestNonspam { my($msg) = @_; TestAny($msg, "nonspam", "Innocent", "Whitelisted", "innocent", "fp") } sub TestSpam { my($msg) = @_; TestAny($msg, "spam ", "Spam", "Blacklisted", "spam", "fn") } sub TestAny { my($msg, $testname, $ok1, $ok2, $dspam_class, $short_class) = @_; my $response; print "[test: $testname] " . substr($msg . " " x 32, 0, 32) . " result: "; my $cmd = "$CONFIG{'DSPAM_BINARY'} --user $USER --deliver=summary --stdout"; if ( -f $msg ) { $response = `$cmd < '$msg'`; } else { use FileHandle; use IPC::Open2; my ($dspam_in, $dspam_out); my $pid = open2($dspam_out, $dspam_in, $cmd); print $dspam_in $msg->as_string(); close $dspam_in; $response = join('', <$dspam_out>); waitpid $pid, 0 } my $code = "UNKNOWN"; if ($response =~ /class="(\S+)"/i) { $code = $1; } if ($code eq "UNKNOWN") { # print "\n===== WOAH THERE =====\n"; # print "I was unable to parse the result. Test Broken.\n"; # print "======================\n"; # exit(0); print "BROKEN result!!\n"; return; } if ($code eq $ok1 || $code eq $ok2) { print "PASS"; } else { my($class) = "UNKNOWN"; my($signature) = "UNKNOWN"; if ($response =~ /class="(\S+)"/i) { $class = $1; } else { print "BROKEN class!!\n"; return; } if ($response =~ /signature=(\S+)/i) { $signature = $1; } else { # print "\n===== WOAH THERE =====\n"; # print "I was unable to find the DSPAM signature. Test Broken.\n"; # print "======================\n"; # print "\n$response\n"; # exit(0); print "BROKEN signature!!\n"; return; } print "FAIL ($class)"; if ($CONFIG{'SHOW_SUBJECTS'} == 1) { print "\n\t[$short_class] "; if ( -f $msg ) { open(FILE, "<$msg"); while() { if (/^Subject:/i) { chomp; print $_; close(FILE); } } close(FILE); } else { print $msg->header->{subject} } } open(TRAIN, "|$CONFIG{'DSPAM_BINARY'} --user $USER --class=$dspam_class " . "--source=error --signature=$signature"); close(TRAIN); } print "\n"; } dspam-3.10.2+dfsg/src/tools/Makefile.in0000644000175000017500000007111411745313452017163 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.85 2010/03/13 00:57:23 sbajic Exp $ # tools/Makefile.am VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = dspam_dump$(EXEEXT) dspam_clean$(EXEEXT) \ dspam_crc$(EXEEXT) dspam_stats$(EXEEXT) dspam_merge$(EXEEXT) \ dspam_2sql$(EXEEXT) dspam_admin$(EXEEXT) subdir = src/tools DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_dspam_2sql_OBJECTS = dspam_2sql.$(OBJEXT) read_config.$(OBJEXT) \ config_api.$(OBJEXT) dspam_2sql_OBJECTS = $(am_dspam_2sql_OBJECTS) dspam_2sql_LDADD = $(LDADD) dspam_2sql_DEPENDENCIES = ../libdspam.la dspam_2sql_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(dspam_2sql_LDFLAGS) $(LDFLAGS) -o $@ am_dspam_admin_OBJECTS = dspam_admin.$(OBJEXT) read_config.$(OBJEXT) \ config_api.$(OBJEXT) dspam_admin_OBJECTS = $(am_dspam_admin_OBJECTS) dspam_admin_LDADD = $(LDADD) dspam_admin_DEPENDENCIES = ../libdspam.la dspam_admin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(dspam_admin_LDFLAGS) $(LDFLAGS) -o $@ am_dspam_clean_OBJECTS = dspam_clean.$(OBJEXT) read_config.$(OBJEXT) \ config_api.$(OBJEXT) dspam_clean_OBJECTS = $(am_dspam_clean_OBJECTS) dspam_clean_LDADD = $(LDADD) dspam_clean_DEPENDENCIES = ../libdspam.la dspam_clean_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(dspam_clean_LDFLAGS) $(LDFLAGS) -o $@ am_dspam_crc_OBJECTS = dspam_crc.$(OBJEXT) dspam_crc_OBJECTS = $(am_dspam_crc_OBJECTS) dspam_crc_LDADD = $(LDADD) dspam_crc_DEPENDENCIES = ../libdspam.la dspam_crc_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(dspam_crc_LDFLAGS) $(LDFLAGS) -o $@ am_dspam_dump_OBJECTS = dspam_dump.$(OBJEXT) read_config.$(OBJEXT) \ config_api.$(OBJEXT) dspam_dump_OBJECTS = $(am_dspam_dump_OBJECTS) dspam_dump_LDADD = $(LDADD) dspam_dump_DEPENDENCIES = ../libdspam.la dspam_dump_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(dspam_dump_LDFLAGS) $(LDFLAGS) -o $@ am_dspam_merge_OBJECTS = dspam_merge.$(OBJEXT) read_config.$(OBJEXT) \ config_api.$(OBJEXT) dspam_merge_OBJECTS = $(am_dspam_merge_OBJECTS) dspam_merge_LDADD = $(LDADD) dspam_merge_DEPENDENCIES = ../libdspam.la dspam_merge_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(dspam_merge_LDFLAGS) $(LDFLAGS) -o $@ am_dspam_stats_OBJECTS = dspam_stats.$(OBJEXT) read_config.$(OBJEXT) \ config_api.$(OBJEXT) dspam_stats_OBJECTS = $(am_dspam_stats_OBJECTS) dspam_stats_LDADD = $(LDADD) dspam_stats_DEPENDENCIES = ../libdspam.la dspam_stats_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(dspam_stats_LDFLAGS) $(LDFLAGS) -o $@ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(dspam_2sql_SOURCES) $(dspam_admin_SOURCES) \ $(dspam_clean_SOURCES) $(dspam_crc_SOURCES) \ $(dspam_dump_SOURCES) $(dspam_merge_SOURCES) \ $(dspam_stats_SOURCES) DIST_SOURCES = $(dspam_2sql_SOURCES) $(dspam_admin_SOURCES) \ $(dspam_clean_SOURCES) $(dspam_crc_SOURCES) \ $(dspam_dump_SOURCES) $(dspam_merge_SOURCES) \ $(dspam_stats_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -I$(top_srcdir)/src CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = dspam_train.in dspam_notify.in dspam_logrotate CLEANFILES = dspam_train dspam_notify AM_CPPFLAGS = \ -DLOGDIR=\"$(logdir)\" -DCONFIG_DEFAULT=\"$(sysconfdir)/dspam.conf\" \ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE -I$(top_srcdir) bin_SCRIPTS = dspam_train dspam_logrotate dspam_notify dspam_2sql_SOURCES = dspam_2sql.c ../read_config.c ../config_api.c dspam_2sql_LDFLAGS = dspam_dump_SOURCES = dspam_dump.c ../read_config.c ../config_api.c dspam_dump_LDFLAGS = dspam_clean_SOURCES = dspam_clean.c ../read_config.c ../config_api.c dspam_clean_LDFLAGS = dspam_crc_SOURCES = dspam_crc.c dspam_crc_LDFLAGS = dspam_stats_SOURCES = dspam_stats.c ../read_config.c ../config_api.c dspam_stats_LDFLAGS = dspam_merge_SOURCES = dspam_merge.c ../read_config.c ../config_api.c dspam_merge_LDFLAGS = dspam_admin_SOURCES = dspam_admin.c ../read_config.c ../config_api.c dspam_admin_LDFLAGS = LDADD = ../libdspam.la sed_substitute_variables = \ dspam_transformed=`echo dspam | sed '$(transform)'`; \ sed -e 's,@bindir\@,$(bindir),g' \ -e 's,@sysconfdir\@,$(sysconfdir),g' \ -e 's,@PACKAGE_STRING\@,$(PACKAGE_STRING),g' \ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \ -e "s,@dspam_transformed\@,$$dspam_transformed,g" all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/tools/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list dspam_2sql$(EXEEXT): $(dspam_2sql_OBJECTS) $(dspam_2sql_DEPENDENCIES) @rm -f dspam_2sql$(EXEEXT) $(dspam_2sql_LINK) $(dspam_2sql_OBJECTS) $(dspam_2sql_LDADD) $(LIBS) dspam_admin$(EXEEXT): $(dspam_admin_OBJECTS) $(dspam_admin_DEPENDENCIES) @rm -f dspam_admin$(EXEEXT) $(dspam_admin_LINK) $(dspam_admin_OBJECTS) $(dspam_admin_LDADD) $(LIBS) dspam_clean$(EXEEXT): $(dspam_clean_OBJECTS) $(dspam_clean_DEPENDENCIES) @rm -f dspam_clean$(EXEEXT) $(dspam_clean_LINK) $(dspam_clean_OBJECTS) $(dspam_clean_LDADD) $(LIBS) dspam_crc$(EXEEXT): $(dspam_crc_OBJECTS) $(dspam_crc_DEPENDENCIES) @rm -f dspam_crc$(EXEEXT) $(dspam_crc_LINK) $(dspam_crc_OBJECTS) $(dspam_crc_LDADD) $(LIBS) dspam_dump$(EXEEXT): $(dspam_dump_OBJECTS) $(dspam_dump_DEPENDENCIES) @rm -f dspam_dump$(EXEEXT) $(dspam_dump_LINK) $(dspam_dump_OBJECTS) $(dspam_dump_LDADD) $(LIBS) dspam_merge$(EXEEXT): $(dspam_merge_OBJECTS) $(dspam_merge_DEPENDENCIES) @rm -f dspam_merge$(EXEEXT) $(dspam_merge_LINK) $(dspam_merge_OBJECTS) $(dspam_merge_LDADD) $(LIBS) dspam_stats$(EXEEXT): $(dspam_stats_OBJECTS) $(dspam_stats_DEPENDENCIES) @rm -f dspam_stats$(EXEEXT) $(dspam_stats_LINK) $(dspam_stats_OBJECTS) $(dspam_stats_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_api.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspam_2sql.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspam_admin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspam_clean.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspam_crc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspam_dump.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspam_merge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspam_stats.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_config.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< read_config.o: ../read_config.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT read_config.o -MD -MP -MF $(DEPDIR)/read_config.Tpo -c -o read_config.o `test -f '../read_config.c' || echo '$(srcdir)/'`../read_config.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/read_config.Tpo $(DEPDIR)/read_config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../read_config.c' object='read_config.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o read_config.o `test -f '../read_config.c' || echo '$(srcdir)/'`../read_config.c read_config.obj: ../read_config.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT read_config.obj -MD -MP -MF $(DEPDIR)/read_config.Tpo -c -o read_config.obj `if test -f '../read_config.c'; then $(CYGPATH_W) '../read_config.c'; else $(CYGPATH_W) '$(srcdir)/../read_config.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/read_config.Tpo $(DEPDIR)/read_config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../read_config.c' object='read_config.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o read_config.obj `if test -f '../read_config.c'; then $(CYGPATH_W) '../read_config.c'; else $(CYGPATH_W) '$(srcdir)/../read_config.c'; fi` config_api.o: ../config_api.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT config_api.o -MD -MP -MF $(DEPDIR)/config_api.Tpo -c -o config_api.o `test -f '../config_api.c' || echo '$(srcdir)/'`../config_api.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/config_api.Tpo $(DEPDIR)/config_api.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../config_api.c' object='config_api.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o config_api.o `test -f '../config_api.c' || echo '$(srcdir)/'`../config_api.c config_api.obj: ../config_api.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT config_api.obj -MD -MP -MF $(DEPDIR)/config_api.Tpo -c -o config_api.obj `if test -f '../config_api.c'; then $(CYGPATH_W) '../config_api.c'; else $(CYGPATH_W) '$(srcdir)/../config_api.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/config_api.Tpo $(DEPDIR)/config_api.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../config_api.c' object='config_api.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o config_api.obj `if test -f '../config_api.c'; then $(CYGPATH_W) '../config_api.c'; else $(CYGPATH_W) '$(srcdir)/../config_api.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-binSCRIPTS dspam_train: dspam_train.in Makefile ${sed_substitute_variables} < $(srcdir)/dspam_train.in > $@ chmod +x $@ dspam_notify: dspam_notify.in Makefile ${sed_substitute_variables} < $(srcdir)/dspam_notify.in > $@ chmod +x $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/src/tools/dspam_logrotate0000644000175000017500000001025411622570546020226 0ustar julienjulien#!/usr/bin/perl # # $Id: dspam_logrotate,v 1.00 2009/12/22 12:25:59 sbajic Exp $ # # dspam_logrotate - Removed old entries from DSPAM log files. # Steve Pellegrin # # Patched for working on dspam installation with thousends of users. # Norman Maurer # # Usage: # dspam_logrotate -v -a days logfile ... # -v: Print verbose output # -a days: All log entries older than 'days' will be removed. # -l logfile: A list of one or more files to process. # -d dspamdir: The home directory of dspam. ########################################################### # # Print usage info # sub usage { print "Usage: " . $0 . " -a age [-v] -l logfiles\n"; print "or\n"; print "Usage: " . $0 . " -a age [-v] -d /var/dspam\n"; } ########################################################### ########################################################### # # "Rotate" one log file # sub rotate { # Give names to input args. my($filename); my($cutoffTimestamp); my($printStats); ($filename, $cutoffTimestamp, $printStats) = @_; # Generate names for the temporary files. my($tempInputFile) = $filename . ".in"; my($tempOutputFile) = $filename . ".out"; # Rename the log file to the temporary input file name. rename $filename, $tempInputFile; # Open the temporary input and output files. open INFILE, "< $tempInputFile" or die "Cannot open input file: $tempInputFile\n$!"; open OUTFILE, "> $tempOutputFile" or die "Cannot open output file: $tempOutputFile\n$!"; # Read the input file and copy eligible records to the output. # Count the number of delete records in case printStats is true. my($linesDeleted) = 0; while (defined($thisLine = )) { # Get this line's timestamp. my($lineTimestamp) = substr($thisLine, 0, index($thisLine, "\t")); # Write lines with newer timestamps to the output file. if ($lineTimestamp >= $cutoffTimestamp) { print OUTFILE $thisLine; } else { $linesDeleted++; } } close INFILE; # It is possible that records have been written to the log file while # we have been processing the temporary files. If so, append them to # our temporary output file. if (-e $filename) { open INFILE, "< $filename" or die "Cannot open log file: $filename\n$!"; while (defined($thisLine = )) { print OUTFILE $thisLine; } close INFILE; } close OUTFILE; #Set the original uid, gid and perms my @filestat = stat($tempInputFile); chmod @filestat[2], $tempOutputFile; chown @filestat[4], @filestat[5], $tempOutputFile; # Rename our temporary output file to the original log file name. rename $tempOutputFile, $filename; # Remove our temporary input file. unlink $tempInputFile; # Print statistics, if desired. if ($printStats != 0) { print "Deleted $linesDeleted lines from $filename \n"; } } ########################################################### ########################################################### # # Mainline # ########################################################### # Extract the command line arguments # -a days: All log entries older than 'days' will be removed. # -v: Print verbose output # logfile: A list of one or more files to process. # my($ageDays) = undef; my($logfiles); my($help) = 0; my($verbose) = 0; while ($arg = shift(@ARGV)) { if ($arg eq "-a") { $ageDays = shift(@ARGV); } elsif ($arg eq "-v") { $verbose = 1; } elsif ($arg eq "-l") { @logfiles = @ARGV; } elsif ($arg eq "-d") { my $dspamdir = shift(@ARGV); @logfiles = split(/\n/, `find $dspamdir -name \"*.log\"`); } elsif ($arg eq "-h") { $help = 1; } } # # Quit now if the command line looks screwy. # if (!defined($ageDays) || (scalar @logfiles == 0) || $help == 1) { usage(); exit(-1); } # # Determine the earliest timestamp allowed to stay in the file. # my($minimumTimestamp) = (time - ($ageDays * 60 * 60 * 24)); # # Rotate each logfile specified on the command line. # foreach $logfile (@logfiles) { rotate($logfile, $minimumTimestamp, $verbose); } dspam-3.10.2+dfsg/src/tools/dspam_clean.c0000644000175000017500000003024011741351001017507 0ustar julienjulien/* $Id: dspam_clean.c,v 1.247 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "libdspam.h" #include "language.h" #include "read_config.h" #include "config_api.h" #include "pref.h" #include "error.h" DSPAM_CTX *open_ctx = NULL, *open_mtx = NULL; int process_sigs (DSPAM_CTX * CTX, int age); int process_probs (DSPAM_CTX * CTX, int age); int process_unused (DSPAM_CTX * CTX, int any, int quota, int nospam, int onehit); void dieout (int signal); #define CLEANSYNTAX "dspam_clean [-s[age] -p[age] -u[any,hapax,nospam,onehit] -h] [user1 user2 ... userN]\n" int main (int argc, char *argv[]) { DSPAM_CTX *CTX = NULL, *CTX2; char *user; int do_sigs = 0; int do_probs = 0; int do_unused = 0; int age_sigs = 14; int age_probs = 30; int age_unused[4] = { 90, 30, 15, 15 }; int i, help = 0; struct nt *users = NULL; struct nt_node *node = NULL; #ifndef _WIN32 #ifdef TRUSTED_USER_SECURITY struct passwd *p = getpwuid (getuid ()); #endif #endif /* Read dspam.conf */ agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); fprintf (stderr, ERR_AGENT_READ_CONFIG "\n"); exit(EXIT_FAILURE); } if (!_ds_read_attribute(agent_config, "Home")) { LOG(LOG_ERR, ERR_AGENT_DSPAM_HOME); fprintf (stderr, ERR_AGENT_DSPAM_HOME "\n"); goto bail; } if (libdspam_init(_ds_read_attribute(agent_config, "StorageDriver")) != 0) { LOG(LOG_ERR, ERR_DRV_INIT); fprintf (stderr, ERR_DRV_INIT "\n"); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } #ifndef _WIN32 #ifdef TRUSTED_USER_SECURITY if (!_ds_match_attribute(agent_config, "Trust", p->pw_name) && p->pw_uid) { fprintf(stderr, ERR_TRUSTED_MODE "\n"); goto bail; } #endif #endif for(i=0;i2) age_probs = atoi(argv[i]+2); } else if (!strncmp(argv[i], "-s", 2)) { do_sigs = 1; if (strlen(argv[i])>2) age_sigs = atoi(argv[i]+2); } else if (!strncmp(argv[i], "-u", 2)) { do_unused = 1; if (strlen(argv[i])>2) { char *c = strdup(argv[i]+2); char *d = strtok(c, ","); int j = 0; while(d != NULL && j<4) { age_unused[j] = atoi(d); j++; d = strtok(NULL, ","); } free(c); } } else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) help = 1; else if (i>0) nt_add(users, argv[i]); } if (help || (!do_probs && !do_sigs && !do_unused)) { fprintf(stderr, "%s", CLEANSYNTAX); _ds_destroy_config(agent_config); nt_destroy(users); libdspam_shutdown(); if (help) { exit(EXIT_SUCCESS); } exit(EXIT_FAILURE); } open_ctx = open_mtx = NULL; signal (SIGINT, dieout); signal (SIGPIPE, dieout); signal (SIGTERM, dieout); dspam_init_driver (NULL); if (users->items == 0) { CTX = dspam_create (NULL, NULL, _ds_read_attribute(agent_config, "Home"), DSM_TOOLS, 0); open_ctx = CTX; if (CTX == NULL) { fprintf (stderr, "Could not initialize context: %s\n", strerror (errno)); dspam_shutdown_driver (NULL); goto bail; } set_libdspam_attributes(CTX); if (dspam_attach(CTX, NULL)) { LOG (LOG_WARNING, "unable to attach dspam context"); fprintf (stderr, "Unable to attach DSPAM context\n"); goto bail; } user = _ds_get_nextuser (CTX); } else { node = users->first; if (node != NULL) user = node->ptr; else goto bail; } while (user != NULL) { #ifdef DEBUG printf ("PROCESSING USER: %s\n", user); #endif CTX2 = dspam_create (user, NULL, _ds_read_attribute(agent_config, "Home"), DSM_TOOLS, 0); open_mtx = CTX2; if (CTX2 == NULL) { fprintf (stderr, "Could not initialize context: %s\n", strerror (errno)); return EUNKNOWN; } set_libdspam_attributes(CTX2); if (dspam_attach(CTX2, NULL)) { LOG (LOG_WARNING, "unable to attach dspam context"); fprintf (stderr, "Unable to attach DSPAM context\n"); goto bail; } if (do_sigs) process_sigs(CTX2, age_sigs); if (do_probs) process_probs(CTX2, age_probs); if (do_unused) process_unused(CTX2, age_unused[0], age_unused[1], age_unused[2], age_unused[3]); dspam_destroy (CTX2); open_mtx = NULL; if (users->items == 0) { user = _ds_get_nextuser (CTX); } else { if (node == NULL || node->next == NULL) { node = NULL; user = NULL; } else { node = node->next; user = node->ptr; } } } if (users->items == 0) { dspam_destroy (CTX); open_ctx = NULL; } dspam_shutdown_driver (NULL); _ds_destroy_config(agent_config); nt_destroy(users); libdspam_shutdown(); exit (EXIT_SUCCESS); bail: if (open_ctx) dspam_destroy(open_ctx); if (open_mtx) dspam_destroy(open_mtx); _ds_destroy_config(agent_config); nt_destroy(users); libdspam_shutdown(); exit(EXIT_FAILURE); } int process_sigs (DSPAM_CTX * CTX, int age) { struct _ds_storage_signature *ss; struct nt *del; struct nt_node *node; int delta; del = nt_create(NT_CHAR); if (del == NULL) return -1; #ifdef DEBUG printf ("Processing sigs; age: %d\n", age); #endif ss = _ds_get_nextsignature (CTX); while (ss != NULL) { #ifdef DEBUG printf ("Signature: %s\n Created: %s\n", ss->signature, ctime (&ss->created_on)); #endif delta = (((time (NULL) - ss->created_on) / 60) / 60) / 24; if (age == 0 || delta > age) { #ifdef DEBUG printf (" DELETED!\n"); #endif nt_add(del, ss->signature); } free(ss->data); free(ss); ss = _ds_get_nextsignature (CTX); } node = del->first; while(node != NULL) { _ds_delete_signature (CTX, node->ptr); node = node->next; } nt_destroy(del); return 0; } int process_probs (DSPAM_CTX *CTX, int age) { struct _ds_storage_record *sr; struct _ds_spam_stat s; ds_diction_t del; int delta; #ifdef DEBUG printf("Processing probabilities; age: %d\n", age); #endif del = ds_diction_create(196613); if (del == NULL) return -1; sr = _ds_get_nexttoken (CTX); while (sr != NULL) { s.innocent_hits = sr->innocent_hits; s.spam_hits = sr->spam_hits; s.probability = 0.00000; _ds_calc_stat(CTX, NULL, &s, DTT_DEFAULT, NULL); if (s.probability >= 0.3500 && s.probability <= 0.6500) { delta = (((time (NULL) - sr->last_hit) / 60) / 60) / 24; if (age == 0 || delta > age) ds_diction_touch(del, sr->token, "", 0); } free (sr); sr = _ds_get_nexttoken (CTX); } _ds_delall_spamrecords(CTX, del); ds_diction_destroy(del); return 0; } int process_unused (DSPAM_CTX *CTX, int any, int quota, int nospam, int onehit) { struct _ds_storage_record *sr; ds_diction_t del; time_t t = time(NULL); int delta, toe = 0, tum = 0; agent_pref_t PTX; #ifdef DEBUG printf("Processing unused; any: %d quota: %d nospam: %d onehit: %d\n", any, quota, nospam, onehit); #endif PTX = _ds_pref_load(agent_config, CTX->username, _ds_read_attribute(agent_config, "Home"), NULL); if (PTX == NULL || PTX[0] == 0) { if (PTX) _ds_pref_free(PTX); PTX = pref_config(); } if (!strcasecmp(_ds_pref_val(PTX, "trainingMode"), "toe")) { #ifdef DEBUG printf("Limiting unused token purges for user %s - TOE Training Mode Set\n", CTX->username); #endif toe = 1; } if (!strcasecmp(_ds_pref_val(PTX, "trainingMode"), "tum")) { #ifdef DEBUG printf("Limiting unused token purges for user %s - TUM Training Mode Set\n", CTX->username); #endif tum = 1; } if (PTX) _ds_pref_free(PTX); del = ds_diction_create(196613); if (del == NULL) return -1; sr = _ds_get_nexttoken (CTX); while (sr != NULL) { delta = (((t - sr->last_hit) / 60) / 60) / 24; if (!toe && (any == 0 || delta > any)) { if (!tum || sr->innocent_hits + sr->spam_hits < 50) ds_diction_touch(del, sr->token, "", 0); } else if ((sr->innocent_hits*2) + sr->spam_hits < 5) { if (quota == 0 || delta > quota) { ds_diction_touch(del, sr->token, "", 0); } else if (sr->innocent_hits == 0 && sr->spam_hits == 1 && (nospam == 0 || delta > nospam)) { ds_diction_touch(del, sr->token, "", 0); } else if (sr->innocent_hits == 1 && sr->spam_hits == 0 && (onehit == 0 || delta > onehit)) { ds_diction_touch(del, sr->token, "", 0); } } free (sr); sr = _ds_get_nexttoken (CTX); } _ds_delall_spamrecords(CTX, del); ds_diction_destroy(del); return 0; } void dieout (int signal) { signal = signal; /* Keep compiler happy */ fprintf (stderr, "terminated.\n"); if (open_ctx != NULL) dspam_destroy (open_ctx); if (open_mtx != NULL) dspam_destroy (open_mtx); _ds_destroy_config(agent_config); exit (EXIT_SUCCESS); } dspam-3.10.2+dfsg/src/tools/dspam_dump.c0000644000175000017500000001507511741351001017403 0ustar julienjulien/* $Id: dspam_dump.c,v 1.21 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include "util.h" #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "libdspam.h" #include "read_config.h" #include "config_api.h" #include "language.h" #ifdef _WIN32 /* no trusted users under Windows */ #undef TRUSTED_USER_SECURITY #endif DSPAM_CTX *open_ctx; /* headers */ int dump_database (DSPAM_CTX * CTX, const char *token, int sql); void dieout (int signal); #define TSYNTAX \ "syntax: dspam_dump [--profile=Profile] [-d sqlite_drv] username [token]" #define SQL_SQLITE_DRV 1 int main (int argc, char **argv) { DSPAM_CTX *CTX; int r, sql = 0, i; char *username = NULL, *token = NULL; #ifdef TRUSTED_USER_SECURITY struct passwd *p = getpwuid (getuid ()); #endif /* Read dspam.conf */ agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); fprintf (stderr, ERR_AGENT_READ_CONFIG "\n"); exit(EXIT_FAILURE); } if (!_ds_read_attribute(agent_config, "Home")) { LOG(LOG_ERR, ERR_AGENT_DSPAM_HOME); fprintf (stderr, ERR_AGENT_DSPAM_HOME "\n"); exit(EXIT_FAILURE); } if (libdspam_init(_ds_read_attribute(agent_config, "StorageDriver")) != 0) { LOG(LOG_ERR, ERR_DRV_INIT); fprintf (stderr, ERR_DRV_INIT "\n"); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } open_ctx = NULL; signal (SIGINT, dieout); signal (SIGPIPE, dieout); signal (SIGTERM, dieout); if (argc < 2) { fprintf (stderr, "%s\n", TSYNTAX); goto BAIL; } for(i=1;ipw_name) && !_ds_match_attribute(agent_config, "Trust", p->pw_name) && p->pw_uid) { fprintf(stderr, ERR_TRUSTED_MODE "\n"); goto BAIL; } #endif } else token = argv[i]; } } dspam_init_driver (NULL); CTX = dspam_create (username, NULL, _ds_read_attribute(agent_config, "Home"), DSM_CLASSIFY, 0); open_ctx = CTX; if (CTX == NULL) { fprintf (stderr, "Could not init context: %s\n", strerror (errno)); dspam_shutdown_driver (NULL); goto BAIL; } set_libdspam_attributes(CTX); if (dspam_attach(CTX, NULL)) { LOG (LOG_WARNING, "unable to attach dspam context"); fprintf (stderr, "Unable to attach DSPAM context\n"); goto BAIL; } r = dump_database (CTX, token, sql); dspam_destroy (CTX); open_ctx = NULL; dspam_shutdown_driver (NULL); libdspam_shutdown(); return (r) ? EXIT_FAILURE : EXIT_SUCCESS; BAIL: libdspam_shutdown(); exit(EXIT_FAILURE); } int dump_database (DSPAM_CTX * CTX, const char *token, int sql) { struct _ds_storage_record *sr; struct _ds_spam_stat s; unsigned long long crc = 0; if (token) crc = _ds_getcrc64(token); if (sql == SQL_SQLITE_DRV) { printf("insert into dspam_stats (dspam_stat_id, " "spam_learned, innocent_learned, " "spam_misclassified, innocent_misclassified, " "spam_corpusfed, innocent_corpusfed, " "spam_classified, innocent_classified) values " "(0, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld)\n", CTX->totals.spam_learned, CTX->totals.innocent_learned, CTX->totals.spam_misclassified, CTX->totals.innocent_misclassified, CTX->totals.spam_corpusfed, CTX->totals.innocent_corpusfed, CTX->totals.spam_classified, CTX->totals.innocent_classified); } if (token == NULL) { sr = _ds_get_nexttoken (CTX); while (sr != NULL) { s.innocent_hits = sr->innocent_hits; s.spam_hits = sr->spam_hits; s.probability = 0.00000; _ds_calc_stat(CTX, NULL, &s, DTT_DEFAULT, NULL); if (!sql) { printf ("%-20"LLU_FMT_SPEC" S: %05ld I: %05ld P: %0.4f LH: %s", sr->token, sr->spam_hits, sr->innocent_hits, s.probability, ctime (&sr->last_hit)); free (sr); } else if (sql == SQL_SQLITE_DRV) { printf("insert into dspam_token_data(token, spam_hits, " "innocent_hits, last_hit) values('%"LLU_FMT_SPEC"', %ld, %ld, " "date('now'))\n", sr->token, sr->spam_hits, sr->innocent_hits); } sr = _ds_get_nexttoken (CTX); } } else { if (_ds_get_spamrecord (CTX, crc, &s)) { fprintf(stderr, "token not found\n"); return -1; } _ds_calc_stat(CTX, NULL, &s, DTT_DEFAULT, NULL); printf ("%-20"LLU_FMT_SPEC" S: %05ld I: %05ld P: %0.4f\n", crc, s.spam_hits, s.innocent_hits, s.probability); } return 0; } void dieout (int signal) { signal = signal; /* Keep compiler happy */ fprintf (stderr, "terminated.\n"); if (open_ctx != NULL) dspam_destroy (open_ctx); exit (EXIT_SUCCESS); } dspam-3.10.2+dfsg/src/tools/dspam_notify.in0000755000175000017500000002323711741351001020134 0ustar julienjulien#!/usr/bin/perl # # $Id: dspam_notify,v 1.06 2011/11/03 11:58:15 sbajic Exp $ use Net::SMTP; # Enter the location of you dspam.conf, dspam binary and path to dspam_admin/dspam_stats. $DSPAMCONF = '@sysconfdir@/dspam.conf'; $DSPAM_BINARY = '@bindir@/@dspam_transformed@'; $BINDIR = '@bindir@'; # Who will the notifications be sent from? $FROM_EMAIL = 'dspam@example.org'; $FROM_NAME = 'DSPAM Filter'; # What will the notification subject be? $SUBJECT = 'Daily Spam Quarantine Summary'; # What text to display in the body? $BODY = qq!

This report has been sent to you from the Anti-Spam service hosted at example.org. Below is a list of items in your quarantine area. You can view or release a message by clicking on the links (right). If you no longer wish to receive these reports then you may change the option on the 'Preferences' page.

!; # Quarantine URL $DSPAM_URL = 'https://dspam.example.org'; # Maximum of entries to show in mail $MAX_ITEMS = 200; # Address of your SMTP server? localhost should be fine. $SERVER = 'localhost'; # Port of your SMTP server? 25 should be fine $PORT = '25'; # Enable User Preference Checking (Very CPU Intensive!!!) Not Recommended for more than 500 email accounts. $PREF_CHECK = 0; ###################################### # No need to config below this point.# ###################################### #Build the Quarantine URL $QUARANTINE_URL = $DSPAM_URL . '/dspam.cgi?template=quarantine'; # Autodetect scale and preference extension support $LARGE_SCALE = 0; $DOMAIN_SCALE = 0; $PREFERENCES_EXTENSION = 0; do { my $x = `$DSPAM_BINARY --version`; $PREFERENCES_EXTENSION = 1 if ($x =~ /--enable-preferences-extension/); $LARGE_SCALE = 1 if ($x =~ /--enable-large-scale/); $DOMAIN_SCALE = 1 if ($x =~ /--enable-domain-scale/) ; }; # Date Formatting my ($SEC,$MIN,$HOUR,$MDAY,$MON,$YEAR,$WDAY,$YDAY,$ISDST) = localtime(time); # Array containing Days of the week abreviations @WEEKDAYS = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); # Array containing Month abreviations @MONTHS = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); $D = (localtime)[6]; $M = (localtime)[4]; $DAY_ABR = $WEEKDAYS[$D]; $MONTH_ABR = $MONTHS[$M]; $DAY_NUM = $MDAY; $YEAR += 1900; $TODAY = $DAY_ABR . " " . $MONTH_ABR . " " . sprintf("%2s", $DAY_NUM); # Get the location of DSPAM home and if AllowOverride is set for dailyQuarantineSummary $DSPAMHOME = ""; $ALLOW_OVERRIDE = ""; $DEFAULT_PREF = ""; open(DCONF, $DSPAMCONF) || die("Could not open " . $DSPAMCONF . " file!"); while() { chomp; my($directive, $value) = split(/\s+/); $DSPAMHOME = $value if ($directive eq "Home"); $ALLOW_OVERRIDE = "on" if ($directive eq "AllowOverride" && $value eq "dailyQuarantineSummary"); if ($directive eq "Preference") { if ($value =~ /^\s*[\"\']?dailyQuarantineSummary[\t ]*=[\t ]*on[\"\']?/) { $DEFAULT_PREF = "on"; } else { $DEFAULT_PREF = "off"; } } last if($DSPAMHOME ne "" && $ALLOW_OVERRIDE ne "" && $DEFAULT_PREF ne ""); } close(DCONF); $ALLOW_OVERRIDE = "off" if($ALLOW_OVERRIDE eq ""); $DEFAULT_PREF = "off" if($DEFAULT_PREF eq ""); if (! -d $DSPAMHOME) { die("Could not determine DSPAM home!"); } # Create list of users having TP bigger then zero open(IN, "$BINDIR/dspam_stats|"); while() { chomp; s/:/ /g; my($username, $tp, $tn, $fp, $fn, $sc, $nc) = (split(/\s+/))[0,2,4,6,8,10,12]; if ($tp eq "") { $_ = ; s/:/ /g; ($tp, $tn, $fp, $fn, $sc, $nc) = (split(/\s+/))[2,4,6,8,10,12]; } push(@RECIPIENT_LIST, $username) if $tp != 0; } close(IN); # Get default user preference for dailyQuarantineSummary if ($PREF_CHECK == 1 && $PREFERENCES_EXTENSION == 1) { open(PIPE, "$BINDIR/dspam_admin agg pref 'default'|"); while() { chomp; my($directive, $value) = split(/\=/); if ($directive eq "dailyQuarantineSummary") { $DEFAULT_PREF = $value; last; } } close(PIPE); } # Gather Recipient Quarantine Info foreach $RECIPIENT (@RECIPIENT_LIST) { # Get User Preference from dspam_admin if ($ALLOW_OVERRIDE eq "on") { # Check for Allow Overides open(PIPE, "$BINDIR/dspam_admin li pref " . quotemeta($RECIPIENT) . "|"); while() { chomp; my($directive, $value) = split(/\=/); if ($directive eq "dailyQuarantineSummary") { if ($value ne "on" && $value ne "off") { $USER_PREF = $DEFAULT_PREF; # User Preference in valid, use default preference } else { $USER_PREF = $value; } last; } } close(PIPE); } else { $USER_PREF = $DEFAULT_PREF; # Overrides off, use default preference } # Build path to Quarantine .mbox if ($DOMAIN_SCALE == 1) { # Format Quarantine path for Domain Scale my($u, $D) = (split(/@/, $RECIPIENT)); $MBOX = $DSPAMHOME . "/data/" . $D . "/" . $u . "/" . $u . ".mbox"; } elsif ($LARGE_SCALE == 1) { # Format Quarantine path for Large Scale $u = substr($RECIPIENT, 0, 1); $s = substr($RECIPIENT, 1, 1); $MBOX = $DSPAMHOME . "/data/" . $u . "/" . $s . "/" . $RECIPIENT . "/" . $RECIPIENT . ".mbox"; } else { # Format Quarantine path for Normal Scale $MBOX = $DSPAMHOME . "/data/" . $RECIPIENT . "/" . $RECIPIENT . ".mbox"; } # Get total amount of quarantine messages and their signature $NEW = 0; $TOTAL = 0; $SIG = ''; @Q_SIG = (); @Q_SUBJECT = (); if ($USER_PREF ne "off" && -e $MBOX) { # Check if .mbox file exists and user pref open(MBOX, "<$MBOX") || die("Could not open " . $MBOX . " file!"); while() { s/\r?\n//; next if ($_ !~ /^From QUARANTINE/); $TOTAL++; # Count Total messages in Quarantine $NEW++ if ($_ =~ /^From QUARANTINE $TODAY/); # Count New messages in Quarantine $QSUBJECT = ''; while() { s/\r?\n//; last if ($_ eq ""); my($key, $val) = split(/\: ?/, $_, 2); if ($key =~ /^Subject$/i) { $val =~ s/^\s+//; $val =~ s/\s+$//; $QSUBJECT = $val if ($val ne ""); } if ($key =~ /^X\-DSPAM\-Signature$/) { push(@Q_SIG, $val); $QSUBJECT =~ s//>/g; $QSUBJECT = substr($QSUBJECT, 0, 50) . "..." if (length($QSUBJECT)>50); push(@Q_SUBJECT, $QSUBJECT); last; } } } close(MBOX); } push(@Q_SUBJECT_ITEMS, join("\n", @Q_SUBJECT)); push(@Q_SIG_ITEMS, join("\n", @Q_SIG)); push(@Q_NEW_ITEMS, $NEW); # Send Count to Array for later use push(@Q_TOTAL_ITEMS, $TOTAL); # Send Count to Array for later use @Q_SUBJECT = (); @Q_SIG = (); } # Send some emails @Q_ROW_COLOR=('CCCCCC','FFFFFF'); $SMTP = Net::SMTP->new( # Establish SMTP Connection Host => $SERVER . ":" . $PORT, Timeout => 30) || die ("Could not connect to SMTP server " . $SERVER . ":" . $PORT . "; $!"); for ($I = 0; $I <= $#RECIPIENT_LIST; $I++) { # Loop through Recipients List and send the message if (@Q_TOTAL_ITEMS[$I] != 0) { # Don't send reminders to users with empty quarantines $SMTP->mail($FROM_EMAIL); $SMTP->to($RECIPIENT_LIST[$I]); $SMTP->data(); $SMTP->datasend("From: $FROM_NAME <$FROM_EMAIL>\n"); $SMTP->datasend("To: $RECIPIENT_LIST[$I]\n"); $SMTP->datasend("Subject: $SUBJECT\n"); $SMTP->datasend("Mime-Version: 1.0\n"); $SMTP->datasend("Content-Type: text/html; charset=UTF-8\n"); $SMTP->datasend("\n"); $SMTP->datasend("\n"); $SMTP->datasend("\n"); $SMTP->datasend("DSPAM Quarantine Summary for $RECIPIENT_LIST[$I]\n"); $SMTP->datasend("\n"); $SMTP->datasend("\n"); $SMTP->datasend("\n"); $SMTP->datasend($BODY ."\n"); $SMTP->datasend("\n"); $SMTP->datasend("\n"); $SMTP->datasend("\n"); $SMTP->datasend("\n"); $SMTP->datasend("\n"); $SMTP->datasend("\n"); $SMTP->datasend("
Quarantine Summary for$RECIPIENT_LIST[$I]
Date$TODAY, $YEAR
 
New Messages@Q_NEW_ITEMS[$I]
Total Messages@Q_TOTAL_ITEMS[$I]
\n"); $SMTP->datasend("
\n"); $SMTP->datasend("\n"); @Q_SUBJECT = split(/\n/,@Q_SUBJECT_ITEMS[$I]); @Q_SIG = split(/\n/,@Q_SIG_ITEMS[$I]); for ($J = 0; $J <= $#Q_SIG; $J++) { my $QCOMMAND = $QUARANTINE_URL . "&user=" . $RECIPIENT_LIST[$I] . "&signatureID=" . @Q_SIG[$J]; my $QROW_COLOR = 0; $QROW_COLOR = 1 if(($J % 2) != 0); $SMTP->datasend(""); if ($J >= $MAX_ITEMS) { $SMTP->datasend("\n"); $SMTP->datasend("\n"); last; } $SMTP->datasend(""); $SMTP->datasend(""); $SMTP->datasend(""); $SMTP->datasend("\n"); } $SMTP->datasend("
To display more then " . $MAX_ITEMS . " messages, please visit the DSPAM Control Center.
" . @Q_SUBJECT[$J] . "ViewRelease
\n"); $SMTP->datasend("
\n"); $SMTP->datasend("Please remember to check Your Quarantine regularly.\n"); $SMTP->datasend("\n"); $SMTP->datasend("\n"); $SMTP->dataend(); } } $SMTP->quit; # Close SMTP Connection dspam-3.10.2+dfsg/src/dspamc.c0000644000175000017500000001152011741351001015350 0ustar julienjulien/* $Id: dspamc.c,v 1.19 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* * dspamc.c - lightweight dspam client * * DESCRIPTION * The lightweight client build is designed to perform identical to the full * agent, but without any linkage to libdspam. Instead, the client calls * the client-based functions (client.c) to perform processing by connecting * to a DSPAM server process (dspam in --daemon mode). * * This code-base is the client-only codebase. See dspam.c for the full * agent base. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #include #endif #include #include #include #ifdef _WIN32 #include #include #define WIDEXITED(x) 1 #define WEXITSTATUS(x) (x) #include #else #include #include #endif #include "config.h" #include "util.h" #include "read_config.h" #ifdef DAEMON #include "daemon.h" #include "client.h" #endif #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "dspamc.h" #include "agent_shared.h" #include "pref.h" #include "libdspam.h" #include "language.h" #include "buffer.h" #include "pref.h" #include "error.h" #ifdef DEBUG int DO_DEBUG; char debug_text[1024]; #endif int main (int argc, char *argv[]) { AGENT_CTX ATX; /* agent configuration */ buffer *message = NULL; /* input Message */ int agent_init = 0; /* agent is initialized */ int pwent_cache_init = 0; /* cache for username and uid is initialized */ int exitcode = EXIT_SUCCESS; srand ((long) time(NULL) ^ (long) getpid()); umask (006); /* rw-rw---- */ setbuf (stdout, NULL); /* unbuffered output */ #ifdef DEBUG DO_DEBUG = 0; #endif #ifndef DAEMON LOG(LOG_ERR, ERR_DAEMON_NO_SUPPORT); exit(EXIT_FAILURE); #endif /* Cache my username and uid for trusted user security */ if (!init_pwent_cache()) { LOG(LOG_ERR, ERR_AGENT_RUNTIME_USER); exitcode = EXIT_FAILURE; goto BAIL; } else pwent_cache_init = 1; /* Read dspam.conf into global config structure (ds_config_t) */ agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); exitcode = EXIT_FAILURE; goto BAIL; } if (!_ds_read_attribute(agent_config, "Home")) { LOG(LOG_ERR, ERR_AGENT_DSPAM_HOME); exitcode = EXIT_FAILURE; goto BAIL; } /* Set up an agent context to define the behavior of the processor */ if (initialize_atx(&ATX)) { LOG(LOG_ERR, ERR_AGENT_INIT_ATX); exitcode = EXIT_FAILURE; goto BAIL; } else { agent_init = 1; } if (process_arguments(&ATX, argc, argv)) { LOG(LOG_ERR, ERR_AGENT_INIT_ATX); exitcode = EXIT_FAILURE; goto BAIL; } if (apply_defaults(&ATX)) { LOG(LOG_ERR, ERR_AGENT_INIT_ATX); exitcode = EXIT_FAILURE; goto BAIL; } if (check_configuration(&ATX)) { LOG(LOG_ERR, ERR_AGENT_MISCONFIGURED); exitcode = EXIT_FAILURE; goto BAIL; } /* Read the message in and apply ParseTo services */ message = read_stdin(&ATX); if (message == NULL) { exitcode = EXIT_FAILURE; goto BAIL; } if (ATX.users->items == 0) { LOG (LOG_ERR, ERR_AGENT_USER_UNDEFINED); fprintf (stderr, "%s\n", SYNTAX); exitcode = EXIT_FAILURE; goto BAIL; } /* Perform client-based processing */ #ifdef DAEMON if (_ds_read_attribute(agent_config, "ClientIdent") && (_ds_read_attribute(agent_config, "ClientHost") || _ds_read_attribute(agent_config, "ServerDomainSocketPath"))) { exitcode = client_process(&ATX, message); if (exitcode<0) { LOG(LOG_ERR, ERR_CLIENT_EXIT, exitcode); } } else { LOG(LOG_ERR, ERR_CLIENT_INVALID_CONFIG); exitcode = EINVAL; } #endif BAIL: if (message) buffer_destroy(message); if (agent_init) { nt_destroy(ATX.users); nt_destroy(ATX.recipients); } if (agent_config) _ds_destroy_config(agent_config); if (pwent_cache_init) free(__pw_name); exit (exitcode); } dspam-3.10.2+dfsg/src/read_config.h0000644000175000017500000000211711741351001016350 0ustar julienjulien/* $Id: read_config.h,v 1.95 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef _READ_CONFIG_H #define _READ_CONFIG_H #ifdef HAVE_CONFIG_H #include #endif #include "config_shared.h" #include "libdspam.h" #include "pref.h" config_t read_config (const char *path); int configure_algorithms (DSPAM_CTX * CTX); agent_pref_t pref_config(void); config_t agent_config; #endif /* _READ_CONFIG_H */ dspam-3.10.2+dfsg/src/heap.h0000644000175000017500000000300211741351001015017 0ustar julienjulien/* $Id: heap.h,v 1.10 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef _HEAP_H #define _HEAP_H #define HP_DELTA 0x00 #define HP_VALUE 0x01 typedef struct _ds_heap { unsigned int items; unsigned int size; char type; struct _ds_heap_element *root; } *ds_heap_t; typedef struct _ds_heap_element { double delta; float probability; unsigned long long token; unsigned long frequency; int complexity; struct _ds_heap_element *next; } *ds_heap_element_t; ds_heap_t ds_heap_create (int size, int type); void ds_heap_destroy (ds_heap_t); ds_heap_element_t ds_heap_element_create (double probability, unsigned long long token, unsigned long frequency, int complexity); ds_heap_element_t ds_heap_insert (ds_heap_t h, double probability, unsigned long long token, unsigned long frequency, int complexity); #endif /* _HEAP_H */ dspam-3.10.2+dfsg/src/read_config.c0000644000175000017500000002307011741351001016344 0ustar julienjulien/* $Id: read_config.c,v 1.197 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #ifdef SPLIT_CONFIG #include #endif #ifdef HAVE_STRINGS_H #include #endif #include #include "config_shared.h" #include "read_config.h" #include "config.h" #include "error.h" #include "language.h" #include "libdspam.h" #include "pref.h" #include "util.h" #ifdef SPLIT_CONFIG long dirread(const char *path, config_t *attrib, long num_root); long fileread(const char *path, config_t *attrib, long num_root); #endif static char *next_normal_token(char **p) { char *start = *p; while (**p) { if (**p == ' ' || **p == '\t') { **p = 0; *p += 1; break; } *p += 1; } return start; } static char *next_quoted_token(char **p) { char *start = *p; while (**p) { if (**p == '\"') { **p = 0; *p += 1; break; } *p += 1; } return start; } static char *tokenize(char *text, char **next) { /* Initialize */ if (text) *next = text; while (**next) { /* Skip leading whitespace */ if (**next == ' ' || **next == '\t') { *next += 1; continue; } /* Strip off one token */ if (**next == '\"') { *next += 1; return next_quoted_token(next); } else return next_normal_token(next); } return NULL; } #ifdef SPLIT_CONFIG // 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 = NULL; struct dirent *dir_entry_p; if (path == NULL) return 0; // Strip "\n" char *ptr = strrchr(path, '\n'); if (ptr) *ptr = '\0'; if ((dir_p = opendir(path)) == NULL) { LOG(LOG_ERR, ERR_IO_FILE_OPEN, path, strerror(errno)); return 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; int n = strlen(dir_entry_p->d_name); // only use files which end in .conf: if (n < 5) continue; if (strncmp(dir_entry_p->d_name + n - 5, ".conf", 5) != 0) continue; int m = strlen(path); fulldir = (char *)malloc(n+m+2); if (fulldir == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return 0; } 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; #else config_t read_config(const char *path) { config_t attrib, ptr; #endif FILE *file; #ifdef SPLIT_CONFIG long attrib_size = 128; #else long attrib_size = 128, num_root = 0; #endif char buffer[1024]; char *a, *c, *v, *bufptr = buffer; #ifndef SPLIT_CONFIG attrib = calloc(1, attrib_size*sizeof(attribute_t)); if (attrib == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return NULL; } #endif if (path == NULL) file = fopen(CONFIG_DEFAULT, "r"); else file = fopen(path, "r"); if (file == NULL) { #ifdef SPLIT_CONFIG 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)); } return 0; #else LOG(LOG_ERR, ERR_IO_FILE_OPEN, CONFIG_DEFAULT, strerror(errno)); free(attrib); return NULL; #endif } while(fgets(buffer, sizeof(buffer), file)!=NULL) { chomp(buffer); /* Remove comments */ if ((c = strchr(buffer, '#')) || (c = strchr(buffer, ';'))) *c = 0; /* Parse attribute name */ if (!(a = tokenize(buffer, &bufptr))) continue; /* Ignore whitespace-only lines */ while ((v = tokenize(NULL, &bufptr)) != NULL) { #ifdef SPLIT_CONFIG // 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); fclose(file); return 0; } } _ds_add_attribute((*attrib), a, v); } #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); fclose(file); return NULL; } } _ds_add_attribute(attrib, a, v); #endif } } } fclose(file); #ifdef SPLIT_CONFIG 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; #else ptr = realloc(attrib, ((num_root+1)*sizeof(attribute_t))+1); if (ptr) return ptr; LOG(LOG_CRIT, ERR_MEM_ALLOC); #endif return attrib; } int configure_algorithms(DSPAM_CTX *CTX) { if (_ds_read_attribute(agent_config, "Algorithm")) CTX->algorithms = 0; if (_ds_match_attribute(agent_config, "Algorithm", "graham")) CTX->algorithms |= DSA_GRAHAM; if (_ds_match_attribute(agent_config, "Algorithm", "burton")) CTX->algorithms |= DSA_BURTON; if (_ds_match_attribute(agent_config, "Algorithm", "robinson")) CTX->algorithms |= DSA_ROBINSON; if (_ds_match_attribute(agent_config, "Algorithm", "naive")) CTX->algorithms |= DSA_NAIVE; if (_ds_match_attribute(agent_config, "PValue", "robinson")) CTX->algorithms |= DSP_ROBINSON; else if (_ds_match_attribute(agent_config, "PValue", "markov")) CTX->algorithms |= DSP_MARKOV; else CTX->algorithms |= DSP_GRAHAM; if (_ds_match_attribute(agent_config, "Tokenizer", "word")) CTX->tokenizer = DSZ_WORD; else if (_ds_match_attribute(agent_config, "Tokenizer", "chain") || _ds_match_attribute(agent_config, "Tokenizer", "chained")) CTX->tokenizer = DSZ_CHAIN; else if (_ds_match_attribute(agent_config, "Tokenizer", "sbph")) CTX->tokenizer = DSZ_SBPH; else if (_ds_match_attribute(agent_config, "Tokenizer", "osb")) CTX->tokenizer = DSZ_OSB; if (_ds_match_attribute(agent_config, "Algorithm", "chi-square")) { if (CTX->algorithms != 0 && CTX->algorithms != DSP_ROBINSON) { LOG(LOG_WARNING, "Warning: Chi-Square algorithm enabled with other algorithms. False positives may ensue."); } CTX->algorithms |= DSA_CHI_SQUARE; } return 0; } agent_pref_t pref_config(void) { agent_pref_t PTX = malloc(sizeof(agent_attrib_t)*PREF_MAX); agent_pref_t ptr; attribute_t attrib; char *p, *q; char *ptrptr = NULL; int i = 0; if (PTX == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return NULL; } PTX[0] = NULL; /* Apply default preferences from dspam.conf */ attrib = _ds_find_attribute(agent_config, "Preference"); LOGDEBUG("Loading preferences from dspam.conf"); while(attrib != NULL) { char *pcopy = strdup(attrib->value); p = strtok_r(pcopy, "=", &ptrptr); if (p == NULL) { free(pcopy); continue; } q = p + strlen(p)+1; PTX[i] = _ds_pref_new(p, q); PTX[i+1] = NULL; i++; attrib = attrib->next; free(pcopy); } ptr = realloc(PTX, sizeof(agent_attrib_t)*(i+1)); if (ptr) return ptr; LOG(LOG_CRIT, ERR_MEM_ALLOC); return PTX; } dspam-3.10.2+dfsg/src/hash.h0000644000175000017500000000372311741351001015037 0ustar julienjulien/* $Id: hash.h,v 1.6 2011/06/28 00:13:48 sbajic Exp $ */ /* Bayesian Noise Reduction - Jonathan A. Zdziarski http://www.zdziarski.com/papers/bnr.html COPYRIGHT (C) 2004-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef _BNR_HASH_H #define _BNR_HASH_H enum { bnr_hash_num_primes = 28 }; /* bnr_hash root */ struct bnr_hash { unsigned long size; unsigned long items; struct bnr_hash_node **tbl; }; /* bnr_hash node */ struct bnr_hash_node { struct bnr_hash_node *next; char *name; float value; }; /* bnr_hash cursor */ struct bnr_hash_c { unsigned long iter_index; struct bnr_hash_node *iter_next; }; /* constructor and destructor */ struct bnr_hash * bnr_hash_create (unsigned long size); int bnr_hash_destroy (struct bnr_hash *hash); int bnr_hash_set (struct bnr_hash *hash, const char *name, float value); int bnr_hash_hit (struct bnr_hash *hash, const char *name); int bnr_hash_delete (struct bnr_hash *hash, const char *name); float bnr_hash_value(struct bnr_hash *hash, const char *name); struct bnr_hash_node *bnr_hash_node_create (const char *name); long bnr_hash_hashcode(struct bnr_hash *hash, const char *name); /* iteration functions */ struct bnr_hash_node *c_bnr_hash_first (struct bnr_hash *hash, struct bnr_hash_c *c); struct bnr_hash_node *c_bnr_hash_next (struct bnr_hash *hash, struct bnr_hash_c *c); #endif /* _BNR_HASH_H */ dspam-3.10.2+dfsg/src/libdspam.h0000644000175000017500000000645411741351001015713 0ustar julienjulien/* $Id: libdspam.h,v 1.27 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef __cplusplus extern "C" { #endif #ifdef HAVE_CONFIG_H #include #endif #ifndef _LIBDSPAM_H # define _LIBDSPAM_H #include "diction.h" #include "nodetree.h" #include "error.h" #include "storage_driver.h" #include "decode.h" #include "libdspam_objects.h" #include "heap.h" #include "tokenizer.h" #define LIBDSPAM_VERSION_MAJOR 3 #define LIBDSPAM_VERSION_MINOR 6 #define LIBDSPAM_VERSION_PATCH 0 #define BNR_SIZE 3 /* Public API */ int libdspam_init(const char *); int libdspam_shutdown(void); DSPAM_CTX * dspam_init (const char *username, const char *group, const char *home, int operating_mode, u_int32_t flags); DSPAM_CTX * dspam_create (const char *username, const char *group, const char *home, int operating_mode, u_int32_t flags); int dspam_attach (DSPAM_CTX *CTX, void *dbh); int dspam_detach (DSPAM_CTX *CTX); int dspam_process (DSPAM_CTX * CTX, const char *message); int dspam_getsource (DSPAM_CTX * CTX, char *buf, size_t size); int dspam_addattribute (DSPAM_CTX * CTX, const char *key, const char *value); int dspam_clearattributes (DSPAM_CTX * CTX); void dspam_destroy (DSPAM_CTX * CTX); /* Private functions */ int _ds_calc_stat (DSPAM_CTX * CTX, ds_term_t term, struct _ds_spam_stat *s, int type, struct _ds_spam_stat *bnr_tot); int _ds_calc_result (DSPAM_CTX * CTX, ds_heap_t sort, ds_diction_t diction); int _ds_increment_tokens(DSPAM_CTX *CTX, ds_diction_t diction); int _ds_operate (DSPAM_CTX * CTX, char *headers, char *body); int _ds_process_signature (DSPAM_CTX * CTX); int _ds_factor (struct nt *set, char *token_name, float value); int _ds_instantiate_bnr (DSPAM_CTX *CTX, ds_diction_t patterns, struct nt *order, char identifier); ds_diction_t _ds_apply_bnr (DSPAM_CTX *CTX, ds_diction_t diction); void _ds_factor_destroy (struct nt *factors); /* Standard Return Codes */ #ifndef EINVAL # define EINVAL -0x01 /* Invalid call or parms - already initialized or shutdown */ #endif #define EUNKNOWN -0x02 /* Unknown/unexpected error */ #define EFILE -0x03 /* File error */ #define ELOCK -0x04 /* Lock error */ #define EFAILURE -0x05 /* Failed to perform operation */ #define FALSE_POSITIVE(A) \ (A->classification == DSR_ISINNOCENT && A->source == DSS_ERROR) #define SPAM_MISS(A) \ (A->classification == DSR_ISSPAM && A->source == DSS_ERROR) #define SIGNATURE_NULL(A) (A->signature == NULL) #endif /* _LIBDSPAM_H */ #ifdef __cplusplus } #endif dspam-3.10.2+dfsg/src/storage_driver.h0000644000175000017500000001251111741351001017126 0ustar julienjulien/* $Id: storage_driver.h,v 1.22 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #ifndef _STORAGE_DRIVER_H # define _STORAGE_DRIVER_H #include "libdspam_objects.h" #include "diction.h" #include "pref.h" #include "config_shared.h" #ifdef DAEMON #include #endif /* * _ds_drv_connection: a storage resource for a server worker thread * in stateful (daemon) mode, the storage driver may create a series * of _ds_drv_connections which are then pooled into a series of worker * threads. depending on the locking paradigm (mutex or rwlock), one * connection may or may not service multiple threads simultaneously. * connections usually contain stateful resources such as connections to * a backend database or in the case of hash_drv, pointers to an mmap'd * portion of memory. */ struct _ds_drv_connection { void *dbh; #ifdef DAEMON pthread_mutex_t lock; pthread_rwlock_t rwlock; #endif }; /* * DRIVER_CTX: storage driver context * a single storage driver context is used to pool connection resources, * set driver behavior (e.g. locking paradigm), and most importantly connect * to the dspam context being used by the worker thread. */ typedef struct { DSPAM_CTX *CTX; /* IN */ int status; /* OUT */ int flags; /* IN */ int connection_cache; /* IN */ struct _ds_drv_connection **connections; /* OUT */ } DRIVER_CTX; /* * _ds_storage_record: dspam-facing storage structure * the _ds_storage_record structure is a common structure passed between * libdspam and the storage abstraction layer. each instance represents a * single token in a diction. once the storage driver has it, it can create * its own internal structures, but must pass this structure back and forth * to libdspam. */ struct _ds_storage_record { unsigned long long token; long spam_hits; long innocent_hits; time_t last_hit; }; /* * _ds_storage_signature: dspam-facing signature structure * the _ds_storage_signature structure is a common structure passed between * libdspam and the storage abstraction layer. the signature represents * binary training data used later for reclassification of errors. once the * storage driver has it, it can create its own internal structures, but * must pass this structure back and forth to libdspam. */ struct _ds_storage_signature { char signature[256]; void *data; long length; time_t created_on; }; int dspam_init_driver (DRIVER_CTX *DTX); int dspam_shutdown_driver (DRIVER_CTX *DTX); int _ds_init_storage (DSPAM_CTX * CTX, void *dbh); int _ds_shutdown_storage (DSPAM_CTX * CTX); void *_ds_connect (DSPAM_CTX *CTX); int _ds_getall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction); int _ds_setall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction); int _ds_delall_spamrecords (DSPAM_CTX * CTX, ds_diction_t diction); int _ds_get_spamrecord( DSPAM_CTX * CTX, unsigned long long token, struct _ds_spam_stat *stat); int _ds_set_spamrecord( DSPAM_CTX * CTX, unsigned long long token, struct _ds_spam_stat *stat); int _ds_del_spamrecord( DSPAM_CTX * CTX, unsigned long long token); struct _ds_storage_record *_ds_get_nexttoken (DSPAM_CTX * CTX); struct _ds_storage_signature *_ds_get_nextsignature (DSPAM_CTX * CTX); char *_ds_get_nextuser (DSPAM_CTX * CTX); int _ds_delete_signature( DSPAM_CTX * CTX, const char *signature); int _ds_get_signature( DSPAM_CTX * CTX, struct _ds_spam_signature *SIG, const char *signature); int _ds_set_signature( DSPAM_CTX * CTX, struct _ds_spam_signature *SIG, const char *signature); int _ds_verify_signature( DSPAM_CTX * CTX, const char *signature); int _ds_create_signature_id( DSPAM_CTX * CTX, char *buf, size_t len); /* * Storage Driver Preferences Extension * When defined, the built-in preferences functions are overridden with * functions specific to the storage driver. This allows preferences to be * alternatively stored in the storage facility instead of flat files. * The selected storage driver must support preference extensions. */ agent_pref_t _ds_pref_load( config_t config, const char *user, const char *home, void *dbh); int _ds_pref_set( config_t config, const char *user, const char *home, const char *attrib, const char *value, void *dbh); int _ds_pref_del( config_t config, const char *user, const char *home, const char *attrib, void *dbh); /* Driver context flags */ #define DRF_STATEFUL 0x01 #define DRF_RWLOCK 0x02 /* Driver statuses */ #define DRS_ONLINE 0x01 #define DRS_OFFLINE 0x02 #define DRS_UNKNOWN 0xFF #define CONTROL_TOKEN 11624422384514212933llu /* $$CONTROL$$ */ #endif /* _STORAGE_DRIVER_H */ dspam-3.10.2+dfsg/src/diction.c0000644000175000017500000001604711741351001015543 0ustar julienjulien/* $Id: diction.c,v 1.16 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* * diction.c - subset of lexical data * * DESCRIPTION * a diction is a subset of lexical data from a user's dictionary. in the * context used within DSPAM, a diction is all of the matching lexical * information from the current message being processed. the diction is * loaded/stored by the storage driver and managed primarily by libdspam. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "diction.h" static unsigned long _ds_prime_list[] = { 53ul, 97ul, 193ul, 389ul, 769ul, 1543ul, 3079ul, 6151ul, 12289ul, 24593ul, 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul, 1610612741ul, 3221225473ul, 4294967291ul }; ds_diction_t ds_diction_create (unsigned long size) { ds_diction_t diction = (ds_diction_t) calloc(1, sizeof(struct _ds_diction)); int i = 0; if (!diction) { perror("ds_diction_create: calloc() failed"); return NULL; } while (_ds_prime_list[i] < size) { i++; } diction->size = _ds_prime_list[i]; diction->items = 0; diction->tbl = (struct _ds_term **) calloc(diction->size, sizeof (struct _ds_term *)); if (!diction->tbl) { perror("ds_diction_create: calloc() failed"); free(diction); return NULL; } diction->order = nt_create(NT_INDEX); diction->chained_order = nt_create(NT_INDEX); if (!diction->order || !diction->chained_order) { nt_destroy(diction->order); nt_destroy(diction->chained_order); free(diction->tbl); free(diction); return NULL; } return diction; } void ds_diction_destroy (ds_diction_t diction) { ds_term_t term, next; ds_cursor_t cur; if (!diction) return; cur = ds_diction_cursor(diction); if (!cur) { perror("ds_diction_destroy: ds_diction_cursor() failed"); return; } term = ds_diction_next(cur); while(term) { next = ds_diction_next(cur); ds_diction_delete(diction, term->key); term = next; } ds_diction_close(cur); nt_destroy(diction->order); nt_destroy(diction->chained_order); free(diction->tbl); free(diction); return; } ds_term_t ds_diction_term_create (ds_key_t key, const char *name) { ds_term_t term = (ds_term_t) calloc(1, sizeof(struct _ds_term)); if (!term) { perror("ds_diction_term_create: calloc() failed"); } else { term->key = key; term->frequency = 1; term->type = 'D'; if (name) term->name = strdup(name); } return term; } ds_term_t ds_diction_find (ds_diction_t diction, ds_key_t key) { ds_term_t term; term = diction->tbl[key % diction->size]; while (term) { if (key == term->key) return term; term = term->next; } return NULL; } ds_term_t ds_diction_touch( ds_diction_t diction, ds_key_t key, const char *name, int flags) { unsigned long bucket = key % diction->size; ds_term_t parent = NULL; ds_term_t insert = NULL; ds_term_t term; term = diction->tbl[bucket]; while (term) { if (key == term->key) { insert = term; break; } parent = term; term = term->next; } if (!insert) { insert = ds_diction_term_create(key, name); if (!insert) { perror("ds_diction_touch: ds_diction_term_create() failed"); return NULL; } diction->items++; if (parent) parent->next = insert; else diction->tbl[bucket] = insert; } else { if (!insert->name && name) insert->name = strdup(name); insert->frequency++; } if (flags & DSD_CONTEXT) { if (flags & DSD_CHAINED) nt_add(diction->chained_order, insert); else nt_add(diction->order, insert); } return insert; } void ds_diction_delete(ds_diction_t diction, ds_key_t key) { unsigned long bucket = key % diction->size; ds_term_t parent = NULL; ds_term_t delete = NULL; ds_term_t term; term = diction->tbl[bucket]; while(term) { if (key == term->key) { delete = term; break; } parent = term; term = term->next; } if (delete) { if (parent) parent->next = delete->next; else diction->tbl[bucket] = delete->next; free(delete->name); free(delete); diction->items--; } return; } ds_cursor_t ds_diction_cursor (ds_diction_t diction) { ds_cursor_t cur = (ds_cursor_t) calloc(1, sizeof(struct _ds_diction_c)); if (!cur) { perror("ds_diction_cursor: calloc() failed"); return NULL; } cur->diction = diction; cur->iter_index = 0; cur->iter_next = NULL; return cur; } ds_term_t ds_diction_next (ds_cursor_t cur) { unsigned long bucket; ds_term_t term; ds_term_t tbl_term; if (!cur) return NULL; term = cur->iter_next; if (term) { cur->iter_next = term->next; return term; } while (cur->iter_index < cur->diction->size) { bucket = cur->iter_index; cur->iter_index++; tbl_term = cur->diction->tbl[bucket]; if (tbl_term) { cur->iter_next = tbl_term->next; return (tbl_term); } } return NULL; } void ds_diction_close (ds_cursor_t cur) { free(cur); return; } int ds_diction_setstat (ds_diction_t diction, ds_key_t key, ds_spam_stat_t s) { ds_term_t term = ds_diction_find(diction, key); if (term) { term->s.probability = s->probability; term->s.spam_hits = s->spam_hits; term->s.innocent_hits = s->innocent_hits; term->s.status = s->status; term->s.offset = s->offset; return 0; } return -1; } int ds_diction_addstat (ds_diction_t diction, ds_key_t key, ds_spam_stat_t s) { ds_term_t term = ds_diction_find(diction, key); if (term) { term->s.probability += s->probability; term->s.spam_hits += s->spam_hits; term->s.innocent_hits += s->innocent_hits; if (!term->s.offset) term->s.offset = s->offset; if (s->status & TST_DISK) term->s.status |= TST_DISK; if (s->status & TST_DIRTY) term->s.status |= TST_DIRTY; return 0; } return -1; } int ds_diction_getstat (ds_diction_t diction, ds_key_t key, ds_spam_stat_t s) { ds_term_t term = ds_diction_find(diction, key); if (term) { s->probability = term->s.probability; s->spam_hits = term->s.spam_hits; s->innocent_hits = term->s.innocent_hits; s->status = term->s.status; s->offset = term->s.offset; return 0; } return -1; } dspam-3.10.2+dfsg/src/client.c0000644000175000017500000005500511741351001015365 0ustar julienjulien/* $Id: client.c,v 1.691 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* * client.c - client-based functions (for operating in client/daemon mode)c * * DESCRIPTION * Client-based functions are called when --client is specified on the * commandline or by dspamc (where --client is inferred). The client * functions connect to a DSPAM server for processing (rather than the * usual behavior which is to process the message itself). Client * functions are also used when delivering via LMTP or SMTP. */ #ifdef HAVE_CONFIG_H #include #endif #ifdef DAEMON #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef _WIN32 #include #include #endif #include #include #include #include "client.h" #include "dspam.h" #include "config.h" #include "util.h" #include "language.h" #include "buffer.h" /* * client_process(AGENT_CTX *, buffer *) * * DESCRIPTION * connect to a dspam daemon socket and attempt to process a message * this function is called by the dspam agent when --client is specified * * INPUT ARGUMENTS * ATX agent context * message message to be processed * * RETURN VALUES * returns 0 on success */ int client_process(AGENT_CTX *ATX, buffer *message) { char buf[1024], err[256]; struct nt_node *node_nt; struct nt_c c_nt; int exitcode = 0, msglen; THREAD_CTX TTX; int i; TTX.sockfd = client_connect(ATX, 0); if (TTX.sockfd <0) { LOG(LOG_WARNING, ERR_CLIENT_CONNECT); STATUS(ERR_CLIENT_CONNECT); return TTX.sockfd; } TTX.packet_buffer = buffer_create(NULL); if (TTX.packet_buffer == NULL) goto BAIL; /* LHLO / MAIL FROM - Authenticate on the server */ if (client_authenticate(&TTX, ATX->client_args)<0) { LOG(LOG_WARNING, ERR_CLIENT_AUTH_FAILED); STATUS(ERR_CLIENT_AUTH_FAILED); goto QUIT; } /* RCPT TO - Send recipient information */ strcpy(buf, "RCPT TO: "); node_nt = c_nt_first(ATX->users, &c_nt); while(node_nt != NULL) { const char *ptr = (const char *) node_nt->ptr; snprintf(buf, sizeof(buf), "RCPT TO: <%s>", ptr); if (send_socket(&TTX, buf)<=0) { STATUS(ERR_CLIENT_SEND_FAILED); goto BAIL; } if (client_getcode(&TTX, err, sizeof(err))!=LMTP_OK) { STATUS("%s", err); goto QUIT; } node_nt = c_nt_next(ATX->users, &c_nt); } /* DATA - Send message */ if (send_socket(&TTX, "DATA")<=0) goto BAIL; if (client_getcode(&TTX, err, sizeof(err))!=LMTP_DATA) { STATUS("%s", err); goto QUIT; } i = 0; msglen = strlen(message->data); while(i 0) { if (message->data[i] == '\n') { /* only replace \n and not \r\n */ if (message->data[i - 1] != '\r') { buf[buflen] = '\r'; buflen++; } /* take care of dot stuffing \n */ if (message->data[i + 1] && message->data[i + 1] == '.') { buf[buflen] = '\n'; buflen++; buf[buflen] = '.'; buflen++; buf[buflen] = '.'; buflen++; i += 2; continue; } } } buf[buflen] = message->data[i]; buflen++; i++; } /* send buf */ t = 0; while (t < buflen) { r = send(TTX.sockfd, buf+t, buflen - t, 0); if (r <= 0) { LOG(LOG_ERR, ERR_CLIENT_SEND_FAILED); STATUS(ERR_CLIENT_SEND_FAILED); goto BAIL; } t += r; } } if (message->data[msglen-1]!= '\n') { if (send_socket(&TTX, "")<=0) { STATUS(ERR_CLIENT_SEND_FAILED); goto BAIL; } } if (send_socket(&TTX, ".")<=0) { STATUS(ERR_CLIENT_SEND_FAILED); goto BAIL; } /* Server response */ if (ATX->flags & DAF_STDOUT || ATX->flags & DAF_SUMMARY || ATX->operating_mode == DSM_CLASSIFY) { char *line = NULL; int head = !(ATX->flags & DAF_STDOUT); if (ATX->flags & DAF_SUMMARY) head = 1; line = client_getline(&TTX, 300); while(line != NULL && strcmp(line, ".")) { chomp(line); if (!head) { head = 1; if (!strncmp(line, "250 ", 4)) { free(line); goto QUIT; } if (!strcmp(line, "X-Daemon-Classification: SPAM") && _ds_match_attribute(agent_config, "Broken", "returnCodes")) { exitcode = 99; } } else { printf("%s\n", line); } free(line); line = client_getline(&TTX, 300); if (line) chomp(line); } free(line); } else { for(i=0;iusers->items;i++) { char *input = client_getline(&TTX, 300); char *x; int code = 500; if (!input) { goto BAIL; } x = strtok(input, " "); if (x) { code = atoi(x); if (code != LMTP_OK) { if (exitcode > 0) exitcode = 0; exitcode--; } else { if (_ds_match_attribute(agent_config, "Broken", "returnCodes")) { x = strtok(NULL, ":"); if (x) x = strtok(NULL, ":"); if (x && strstr(x, "SPAM") && exitcode == 0) exitcode = 99; } } } } } send_socket(&TTX, "QUIT"); client_getcode(&TTX, err, sizeof(err)); close(TTX.sockfd); buffer_destroy(TTX.packet_buffer); return exitcode; QUIT: send_socket(&TTX, "QUIT"); client_getcode(&TTX, err, sizeof(err)); BAIL: exitcode = EFAILURE; buffer_destroy(TTX.packet_buffer); close(TTX.sockfd); return exitcode; } /* * client_connect(AGENT_CTX ATX, int flags) * * DESCRIPTION * establish a connection to a server * * INPUT ARGUMENTS * ATX agent context * flags connection flags * * FLAGS * CCF_PROCESS Use ClientHost as destination * CCF_DELIVERY Use DeliveryHost as destination * * RETURN VALUES * returns 0 on success */ int client_connect(AGENT_CTX *ATX, int flags) { struct sockaddr_in addr; struct sockaddr_un saun; int sockfd; int yes = 1; int port = 24; int domain = 0; int addr_len; char *host; if (flags & CCF_DELIVERY) { host = _ds_read_attribute(agent_config, "DeliveryHost"); if (_ds_read_attribute(agent_config, "DeliveryPort")) port = atoi(_ds_read_attribute(agent_config, "DeliveryPort")); if (ATX->recipient && ATX->recipient[0]) { char *domain = strchr(ATX->recipient, '@'); if (domain) { char key[128]; char lcdomain[strlen(ATX->recipient)]; lc(lcdomain, domain+1); snprintf(key, sizeof(key), "DeliveryHost.%s", lcdomain); if (_ds_read_attribute(agent_config, key)) host = _ds_read_attribute(agent_config, key); snprintf(key, sizeof(key), "DeliveryPort.%s", lcdomain); if (_ds_read_attribute(agent_config, key)) port = atoi(_ds_read_attribute(agent_config, key)); } } if (host && host[0] == '/') domain = 1; } else { host = _ds_read_attribute(agent_config, "ClientHost"); if (_ds_read_attribute(agent_config, "ClientPort")) port = atoi(_ds_read_attribute(agent_config, "ClientPort")); if (host && host[0] == '/') domain = 1; } if (host == NULL) { LOG(LOG_CRIT, ERR_CLIENT_INVALID_CONFIG); STATUS(ERR_CLIENT_INVALID_CONFIG); return EINVAL; } /* Connect (domain socket) */ if (domain) { sockfd = socket(AF_UNIX, SOCK_STREAM, 0); saun.sun_family = AF_UNIX; strcpy(saun.sun_path, host); addr_len = sizeof(saun.sun_family) + strlen(saun.sun_path) + 1; LOGDEBUG(INFO_CLIENT_CONNECTING, host, 0); if(connect(sockfd, (struct sockaddr *)&saun, addr_len)<0) { LOG(LOG_ERR, ERR_CLIENT_CONNECT_SOCKET, host, strerror(errno)); STATUS("%s", strerror(errno)); close(sockfd); return EFAILURE; } /* Connect (TCP socket) */ } else { sockfd = socket(AF_INET, SOCK_STREAM, 0); memset(&addr, 0, sizeof(struct sockaddr_in)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = inet_addr(host); addr.sin_port = htons(port); addr_len = sizeof(struct sockaddr_in); LOGDEBUG(INFO_CLIENT_CONNECTING, host, port); if(connect(sockfd, (struct sockaddr *)&addr, addr_len)<0) { LOG(LOG_ERR, ERR_CLIENT_CONNECT_HOST, host, port, strerror(errno)); STATUS("%s", strerror(errno)); close(sockfd); return EFAILURE; } } LOGDEBUG(INFO_CLIENT_CONNECTED); setsockopt(sockfd,SOL_SOCKET,TCP_NODELAY,&yes,sizeof(int)); return sockfd; } /* * client_authenticate(AGENT_CTX *ATX, const char *mode) * * DESCRIPTION * greet and authenticate on a server * * INPUT ARGUMENTS * ATX agent context * mode processing mode * * NOTES * the process mode is passed using the DSPAMPROCESSMODE service tag * * RETURN VALUES * returns 0 on success */ int client_authenticate(THREAD_CTX *TTX, const char *mode) { char *ident = _ds_read_attribute(agent_config, "ClientIdent"); char buf[1024], err[128]; char *ptr; char pmode[1024]; pmode[0] = 0; if (mode) { int pos = 0, cpos = 0; for(;mode[cpos]&&(size_t)pos<(sizeof(pmode)-1);cpos++) { if (mode[cpos] == '"') { pmode[pos] = '\\'; pos++; } pmode[pos] = mode[cpos]; pos++; } pmode[pos] = 0; } if (!ident || !strchr(ident, '@')) { LOG(LOG_ERR, ERR_CLIENT_IDENT); return EINVAL; } ptr = client_expect(TTX, LMTP_GREETING, err, sizeof(err)); if (ptr == NULL) { LOG(LOG_ERR, ERR_CLIENT_WHILE_AUTH, err); return EFAILURE; } free(ptr); snprintf(buf, sizeof(buf), "LHLO %s", strchr(ident, '@')+1); if (send_socket(TTX, buf)<=0) return EFAILURE; if (client_getcode(TTX, err, sizeof(err))!=LMTP_OK) { return EFAILURE; } if (mode) { snprintf(buf, sizeof(buf), "MAIL FROM: <%s> DSPAMPROCESSMODE=\"%s\"", ident, pmode); } else { snprintf(buf, sizeof(buf), "MAIL FROM: <%s>", ident); } if (send_socket(TTX, buf)<=0) { return EFAILURE; } if (client_getcode(TTX, err, sizeof(err))!=LMTP_OK) { LOG(LOG_ERR, ERR_CLIENT_AUTHENTICATE); return EFAILURE; } return 0; } /* * client_expect(THREAD_CTX *TTX, int code, char *err, size_t len) * * DESCRIPTION * wait for the appropriate return code, then return * * INPUT ARGUMENTS * ATX agent context * code return code to wait for * err error buffer * len buffer len * * RETURN VALUES * allocated pointer to acknowledgement line, NULL on error * err buffer is populated on error */ char * client_expect(THREAD_CTX *TTX, int code, char *err, size_t len) { char *inp, *dup, *ptr, *ptrptr; int recv_code; inp = client_getline(TTX, 300); while(inp != NULL) { recv_code = 0; dup = strdup(inp); if (!dup) { free(inp); LOG(LOG_CRIT, ERR_MEM_ALLOC); strlcpy(err, ERR_MEM_ALLOC, len); return NULL; } if (strncmp(dup, "250-", 4)) { ptr = strtok_r(dup, " ", &ptrptr); if (ptr) recv_code = atoi(ptr); free(dup); if (recv_code == code) { err[0] = 0; return inp; } LOG(LOG_WARNING, ERR_CLIENT_RESPONSE_CODE, code, inp); } strlcpy(err, inp, len); free(inp); inp = client_getline(TTX, 300); } return NULL; } /* * client_parsecode(const char *err) * * DESCRIPTION * parse response code from plain text * * INPUT ARGUMENTS * err error message to parse * * RETURN VALUES * integer value of response code */ int client_parsecode(char *error) { char code[4]; code[3] = 0; strncpy(code, error, 3); return atoi(code); } /* * client_getcode(THREAD_CTX *TTX, char *err, size_t len) * * DESCRIPTION * retrieve a line of input and return response code * * INPUT ARGUMENTS * TTX thread context containing sockfd * err error buffer * len buffer len * * RETURN VALUES * integer value of response code */ int client_getcode(THREAD_CTX *TTX, char *err, size_t len) { char *inp, *ptr, *ptrptr = NULL; int i; inp = client_getline(TTX, 300); if (!inp) return EFAILURE; while(inp && !strncmp(inp, "250-", 4)) { free(inp); inp = client_getline(TTX, 300); } strlcpy(err, inp, len); ptr = strtok_r(inp, " ", &ptrptr); if (ptr == NULL) return EFAILURE; i = atoi(ptr); free(inp); return i; } /* * client_getline(THREAD_CTX *TTX, int timeout) * * DESCRIPTION * read a complete line from a socket * * INPUT ARGUMENTS * TTX thread context containing sockfd * timeout timeout (in seconds) to wait for input * * RETURN VALUES * allocated pointer to input */ char *client_getline(THREAD_CTX *TTX, int timeout) { struct timeval tv; long recv_len; char buf[1024]; char *pop; fd_set fds; int i; pop = pop_buffer(TTX); while(!pop) { tv.tv_sec = timeout; tv.tv_usec = 0; FD_ZERO(&fds); FD_SET(TTX->sockfd, &fds); i = select(TTX->sockfd+1, &fds, NULL, NULL, &tv); if (i<=0) return NULL; recv_len = recv(TTX->sockfd, buf, sizeof(buf)-1, 0); buf[recv_len] = 0; if (recv_len == 0) return NULL; buffer_cat(TTX->packet_buffer, buf); pop = pop_buffer(TTX); } #ifdef VERBOSE LOGDEBUG("RECV: %s", pop); #endif return pop; } /* * pop_buffer (THREAD_CTX *TTX) * * DESCRIPTION * pop a line off the packet buffer * * INPUT ARGUMENTS * TTX thread context containing the packet buffer * * RETURN VALUES * allocated pointer to line, NULL if complete line isn't available */ char *pop_buffer(THREAD_CTX *TTX) { char *buf, *eol; long len; if (!TTX || !TTX->packet_buffer || !TTX->packet_buffer->data) return NULL; eol = strchr(TTX->packet_buffer->data, 10); if (!eol) return NULL; len = (eol - TTX->packet_buffer->data) + 1; buf = calloc(1, len+1); if (!buf) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return NULL; } memcpy(buf, TTX->packet_buffer->data, len); memmove(TTX->packet_buffer->data, eol+1, strlen(eol+1)+1); TTX->packet_buffer->used -= len; return buf; } /* * send_socket(THREAD_CTX *TTX, const char *text) * * DESCRIPTION * send a line of text to a socket * * INPUT ARGUMENTS * TTX thread context containing sockfd * text text to send * * RETURN VALUES * number of bytes sent */ int send_socket(THREAD_CTX *TTX, const char *text) { int i = 0, r, msglen; #ifdef VERBOSE LOGDEBUG("SEND: %s", text); #endif msglen = strlen(text); while(isockfd, text+i, msglen-i, 0); if (r <= 0) { return r; } i += r; } r = send(TTX->sockfd, "\r\n", 2, 0); if (r > 0) { i += r; } return i; } /* * deliver_socket(AGENT_CTX *ATX, const char *msg, int proto) * * DESCRIPTION * delivers message via LMTP or SMTP (instead of TrustedDeliveryAgent) * * If LMTP/SMTP delivery was specified in dspam.conf, this function will be * called by deliver_message(). This function connects to and delivers the * message using standard LMTP or SMTP. Depending on how DSPAM was originally * called, either the address supplied with the incoming RCPT TO or the * address supplied on the commandline with --rcpt-to will be used. If * neither are present, the username will be used. * * INPUT ARGUMENTS * ATX agent context * msg message to send * proto protocol to use * * PROTOCOLS * DDP_LMTP LMTP * DDP_SMTP SMTP * * RETURN VALUES * returns 0 on success */ int deliver_socket(AGENT_CTX *ATX, const char *msg, int proto) { THREAD_CTX TTX; char buf[1024], err[256]; char *ident = _ds_read_attribute(agent_config, "DeliveryIdent"); int exitcode = EFAILURE; int msglen, code; int buflen; char *inp; int i; int size_extension = 0; err[0] = 0; TTX.sockfd = client_connect(ATX, CCF_DELIVERY); if (TTX.sockfd <0) { STATUS(ERR_CLIENT_CONNECT); LOG(LOG_ERR, ERR_CLIENT_CONNECT); return TTX.sockfd; } TTX.packet_buffer = buffer_create(NULL); if (TTX.packet_buffer == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); STATUS(ERR_MEM_ALLOC); goto BAIL; } inp = client_expect(&TTX, LMTP_GREETING, err, sizeof(err)); if (inp == NULL) { LOG(LOG_ERR, ERR_CLIENT_ON_GREETING, err); STATUS("%s", err); goto BAIL; } free(inp); /* LHLO / HELO */ snprintf(buf, sizeof(buf), "%s %s", (proto == DDP_LMTP) ? "LHLO" : "HELO", (ident) ? ident : "localhost"); if (send_socket(&TTX, buf)<=0) { LOG(LOG_ERR, ERR_CLIENT_SEND_FAILED); STATUS(ERR_CLIENT_SEND_FAILED); goto BAIL; } /* Check for SIZE extension */ if (proto == DDP_LMTP) { char *dup, *ptr, *ptrptr; inp = client_getline(&TTX, 300); while(inp != NULL) { code = 0; dup = strdup(inp); if (!dup) { free(inp); LOG(LOG_CRIT, ERR_MEM_ALLOC); LOG(LOG_ERR, ERR_CLIENT_INVALID_RESPONSE, "LHLO", ERR_MEM_ALLOC); STATUS("LHLO: %s", ERR_MEM_ALLOC); goto QUIT; } if (!strcmp(dup, "250-SIZE") || (!strncmp(dup, "250-SIZE", 8) && strlen(dup)>=8 && isspace(dup[8]))) { free(inp); free(dup); size_extension = 1; inp = client_expect(&TTX, LMTP_OK, err, sizeof(err)); break; } else if (strncmp(dup, "250-", 4)) { ptr = strtok_r(dup, " ", &ptrptr); if (ptr) code = atoi(ptr); if (code == LMTP_OK) { ptr = strtok_r(NULL, " ", &ptrptr); if (ptr && !strcmp(ptr, "SIZE")) size_extension = 1; } free(dup); if (code == LMTP_OK) { err[0] = 0; break; } LOG(LOG_WARNING, ERR_CLIENT_RESPONSE_CODE, code, inp); } strlcpy(err, inp, sizeof(err)); free(inp); inp = client_getline(&TTX, 300); } } else { inp = client_expect(&TTX, LMTP_OK, err, sizeof(err)); } if (inp == NULL) { LOG(LOG_ERR, ERR_CLIENT_INVALID_RESPONSE, (proto == DDP_LMTP) ? "LHLO" : "HELO", err); STATUS("%s: %s", (proto == DDP_LMTP) ? "LHLO" : "HELO", err); goto QUIT; } free(inp); /* MAIL FROM */ if (proto == DDP_LMTP && size_extension == 1) { snprintf(buf, sizeof(buf), "MAIL FROM:<%s> SIZE=%ld", ATX->mailfrom, (long) strlen(msg)); } else { snprintf(buf, sizeof(buf), "MAIL FROM:<%s>", ATX->mailfrom); } if (send_socket(&TTX, buf)<=0) { LOG(LOG_ERR, ERR_CLIENT_SEND_FAILED); STATUS(ERR_CLIENT_SEND_FAILED); goto BAIL; } code = client_getcode(&TTX, err, sizeof(err)); if (code!=LMTP_OK) { LOG(LOG_ERR, ERR_CLIENT_RESPONSE, code, "MAIL FROM", err); if (code >= 500) exitcode = EINVAL; chomp(err); STATUS((code >= 500) ? "Fatal: %s" : "Deferred: %s", err); goto QUIT; } /* RCPT TO */ snprintf(buf, sizeof(buf), "RCPT TO:<%s>", (ATX->recipient) ? ATX->recipient : ""); if (send_socket(&TTX, buf)<=0) { LOG(LOG_ERR, ERR_CLIENT_SEND_FAILED); STATUS(ERR_CLIENT_SEND_FAILED); goto BAIL; } code = client_getcode(&TTX, err, sizeof(err)); if (code!=LMTP_OK) { LOG(LOG_ERR, ERR_CLIENT_RESPONSE, code, "RCPT TO", err); if (code >= 500) exitcode = EINVAL; chomp(err); STATUS((code >= 500) ? "Fatal: %s" : "Deferred: %s", err); goto QUIT; } /* DATA */ if (send_socket(&TTX, "DATA")<=0) { LOG(LOG_ERR, ERR_CLIENT_SEND_FAILED); STATUS(ERR_CLIENT_SEND_FAILED); goto BAIL; } code = client_getcode(&TTX, err, sizeof(err)); if (code!=LMTP_DATA) { LOG(LOG_ERR, ERR_CLIENT_RESPONSE, code, "DATA", err); if (code >= 500) exitcode = EINVAL; chomp(err); STATUS((code >= 500) ? "Fatal: %s" : "Deferred: %s", err); goto QUIT; } i = 0; msglen = strlen(msg); while(i 0 && msg[i] == '\n' && msg[i - 1] != '\r') { buf[buflen] = '\r'; buflen++; } /* escape dot if first character on line */ if (msg[i] == '.' && (i == 0 || msg[i - 1] == '\n')) { buf[buflen] = '.'; buflen++; } buf[buflen] = msg[i]; buflen++; i++; } /* send buf */ t = 0; while (t < buflen) { r = send(TTX.sockfd, buf+t, buflen - t, 0); if (r <= 0) { LOG(LOG_ERR, ERR_CLIENT_SEND_FAILED); STATUS(ERR_CLIENT_SEND_FAILED); goto BAIL; } t += r; } } if (msg[strlen(msg)-1]!= '\n') { if (send_socket(&TTX, "")<=0) { LOG(LOG_ERR, ERR_CLIENT_SEND_FAILED); STATUS(ERR_CLIENT_SEND_FAILED); goto BAIL; } } if (send_socket(&TTX, "\r\n.")<=0) { LOG(LOG_ERR, ERR_CLIENT_SEND_FAILED); STATUS(ERR_CLIENT_SEND_FAILED); goto BAIL; } /* server response */ code = client_getcode(&TTX, err, sizeof(err)); if (code < 200 || code >= 300) { LOG(LOG_ERR, ERR_CLIENT_RESPONSE, code, "message data", err); if (code >= 400 && code < 500) exitcode = EX_TEMPFAIL; else if (code >= 500) exitcode = EINVAL; chomp(err); STATUS((code >= 500) ? "Fatal: %s" : "Deferred: %s", err); goto QUIT; } send_socket(&TTX, "QUIT"); client_getcode(&TTX, err, sizeof(err)); close(TTX.sockfd); buffer_destroy(TTX.packet_buffer); return 0; QUIT: send_socket(&TTX, "QUIT"); client_getcode(&TTX, err, sizeof(err)); buffer_destroy(TTX.packet_buffer); close(TTX.sockfd); return exitcode; BAIL: LOG(LOG_ERR, ERR_CLIENT_DELIVERY_FAILED); buffer_destroy(TTX.packet_buffer); close(TTX.sockfd); return exitcode; } #endif /* DAEMON */ dspam-3.10.2+dfsg/src/tools.mysql_drv/0000755000175000017500000000000011745313541017130 5ustar julienjuliendspam-3.10.2+dfsg/src/tools.mysql_drv/purge.sql0000644000175000017500000000410011622570546020772 0ustar julienjulien-- $Id: purge.sql,v 1.8 2009/12/19 17:50:03 sbajic Exp $ -- --------------------------------------------------------------------------- -- ! ! ! ! ! ! ! THIS FILE SHOULD ONLY BE USED ON MYSQL < 4.1 ! ! ! ! ! ! ! -- ! ! ! ! ! ! ! FOR MYSQL 4.1+ PLEASE USE purge-4.1.sql FILE ! ! ! ! ! ! ! -- --------------------------------------------------------------------------- -- --------------------------------------------------------------------------- -- Note: Should you have modified your dspam.conf to have other intervals for -- the purging then please modify this SQL file to be in sync with your -- dspam.conf. -- -- Note: It is difficult to purge neutral tokens with SQL clauses the same -- way as dspam_clean is doing it. So you should still run dspam_clean -- with the "-u" parameter from time to time. -- --------------------------------------------------------------------------- -- -- Set some defaults -- SET @PurgeSignatures = 14; -- Stale signatures SET @PurgeUnused = 90; -- Unused tokens SET @PurgeHapaxes = 30; -- Tokens with less than 5 hits (hapaxes) SET @PurgeHits1S = 15; -- Tokens with only 1 spam hit SET @PurgeHits1I = 15; -- Tokens with only 1 innocent hit SET @today = to_days(current_date()); -- -- Delete tokens with less than 5 hits (hapaxes) -- DELETE FROM dspam_token_data WHERE from_days(@today-@PurgeHapaxes) > last_hit AND (2*innocent_hits)+spam_hits < 5; -- -- Delete tokens with only 1 spam hit -- DELETE FROM dspam_token_data WHERE from_days(@today-@PurgeHits1S) > last_hit AND innocent_hits = 0 AND spam_hits = 1; -- -- Delete tokens with only 1 innocent hit -- DELETE FROM dspam_token_data WHERE from_days(@today-@PurgeHits1I) > last_hit AND innocent_hits = 1 AND spam_hits = 0; -- -- Delete old tokens not seen for a while -- DELETE FROM dspam_token_data WHERE from_days(@today-@PurgeUnused) > last_hit; -- -- Delete stale signatures -- DELETE FROM dspam_signature_data WHERE from_days(@today-@PurgeSignatures) > created_on; dspam-3.10.2+dfsg/src/tools.mysql_drv/mysql_objects-4.1.sql0000644000175000017500000000341711622570546023040 0ustar julienjulien-- $Id: mysql_objects-4.1.sql,v 1.43 2011/05/09 22:58:48 sbajic Exp $ -- -- This file contains statements for creating the DSPAM -- database objects for MySQL 4.1 or greater. -- create table dspam_token_data ( uid int unsigned not null, token bigint unsigned not null, spam_hits bigint unsigned not null, innocent_hits bigint unsigned not null, last_hit date not null ) engine=MyISAM default charset=latin1 collate=latin1_general_ci pack_keys=1; create unique index id_token_data_01 on dspam_token_data(uid,token); create table dspam_signature_data ( uid int unsigned not null, signature char(32) COLLATE latin1_general_ci not null, data longblob not null, length int unsigned not null, created_on date not null ) engine=MyISAM default charset=latin1 collate=latin1_general_ci 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 int unsigned primary key, spam_learned bigint unsigned not null, innocent_learned bigint unsigned not null, spam_misclassified bigint unsigned not null, innocent_misclassified bigint unsigned not null, spam_corpusfed bigint unsigned not null, innocent_corpusfed bigint unsigned not null, spam_classified bigint unsigned not null, innocent_classified bigint unsigned not null ) engine=MyISAM default charset=latin1 collate=latin1_general_ci; create table dspam_preferences ( uid int unsigned not null, preference varchar(32) COLLATE latin1_general_ci not null, value varchar(64) COLLATE latin1_general_ci not null ) engine=MyISAM default charset=latin1 collate=latin1_general_ci; create unique index id_preferences_01 on dspam_preferences(uid, preference); dspam-3.10.2+dfsg/src/tools.mysql_drv/virtual_users.sql0000644000175000017500000000041711622570546022566 0ustar julienjulien# $Id: virtual_users.sql,v 1.23 2011/05/09 23:02:12 sbajic Exp $ create table dspam_virtual_uids ( uid int unsigned not null primary key auto_increment, username varchar(128) ) engine=MyISAM; create unique index id_virtual_uids_01 on dspam_virtual_uids(username); dspam-3.10.2+dfsg/src/tools.mysql_drv/Makefile.am0000644000175000017500000000035711622570546021175 0ustar julienjulien# $Id: Makefile.am,v 1.4 2006/01/24 14:39:38 jonz Exp $ # tools.mysql_drv/Makefile.am # EXTRA_DIST = mysql_objects-speed.sql mysql_objects-space.sql virtual_users.sql purge.sql mysql_objects-4.1.sql purge-4.1.sql virtual_user_aliases.sql dspam-3.10.2+dfsg/src/tools.mysql_drv/purge-4.1.sql0000644000175000017500000000634011622570546021302 0ustar julienjulien-- $Id: purge-4.1.sql,v 1.11 2010/04/21 21:14:18 sbajic Exp $ -- -- This file contains statements for purging the DSPAM for MySQL 4.1 or greater. -- -- --------------------------------------------------------------------------- -- Note: Should you have modified your dspam.conf to have other intervals for -- the purging or you have modified the TrainingMode to be other then -- 'TEFT' then please modify this SQL file to be in sync with your -- dspam.conf. -- -- Note: It is difficult to purge neutral tokens with SQL clauses the same way -- as dspam_clean is doing it. So you should still run dspam_clean with -- the "-u" parameter from time to time. -- --------------------------------------------------------------------------- -- -- Set some defaults -- SET @TrainingMode = 'TEFT'; -- Default training mode SET @PurgeSignatures = 14; -- Stale signatures SET @PurgeUnused = 90; -- Unused tokens SET @PurgeHapaxes = 30; -- Tokens with less than 5 hits (hapaxes) SET @PurgeHits1S = 15; -- Tokens with only 1 spam hit SET @PurgeHits1I = 15; -- Tokens with only 1 innocent hit SET @today = to_days(current_date()); -- -- Delete tokens with less than 5 hits (hapaxes) -- START TRANSACTION; DELETE LOW_PRIORITY QUICK FROM dspam_token_data WHERE from_days(@today-@PurgeHapaxes) > last_hit AND (2*innocent_hits)+spam_hits < 5; COMMIT; -- -- Delete tokens with only 1 spam hit -- START TRANSACTION; DELETE LOW_PRIORITY QUICK FROM dspam_token_data WHERE from_days(@today-@PurgeHits1S) > last_hit AND innocent_hits = 0 AND spam_hits = 1; COMMIT; -- -- Delete tokens with only 1 innocent hit -- START TRANSACTION; DELETE LOW_PRIORITY QUICK FROM dspam_token_data WHERE from_days(@today-@PurgeHits1I) > last_hit AND innocent_hits = 1 AND spam_hits = 0; COMMIT; -- -- Delete unused tokens, except for TOE, TUM and NOTRAIN modes -- START TRANSACTION; DELETE LOW_PRIORITY QUICK FROM t USING dspam_token_data t LEFT JOIN dspam_preferences p ON (p.preference = 'trainingMode' AND p.uid = t.uid) LEFT JOIN dspam_preferences d ON (d.preference = 'trainingMode' AND d.uid = 0) WHERE COALESCE(CONVERT(p.value USING latin1) COLLATE latin1_general_ci,CONVERT(d.value USING latin1) COLLATE latin1_general_ci,CONVERT(@TrainingMode USING latin1) COLLATE latin1_general_ci) NOT IN (_latin1 'TOE',_latin1 'TUM',_latin1 'NOTRAIN') AND from_days(@today-@PurgeUnused) > last_hit; COMMIT; -- -- Delete TUM tokens seen no more than 50 times -- START TRANSACTION; DELETE LOW_PRIORITY QUICK FROM t USING dspam_token_data t LEFT JOIN dspam_preferences p ON (p.preference = 'trainingMode' AND p.uid = t.uid) LEFT JOIN dspam_preferences d ON (d.preference = 'trainingMode' AND d.uid = 0) WHERE COALESCE(CONVERT(p.value USING latin1) COLLATE latin1_general_ci,CONVERT(d.value USING latin1) COLLATE latin1_general_ci,CONVERT(@TrainingMode USING latin1) COLLATE latin1_general_ci) = _latin1 'TUM' AND from_days(@today-@PurgeUnused) > last_hit AND innocent_hits + spam_hits < 50; COMMIT; -- -- Delete stale signatures -- START TRANSACTION; DELETE LOW_PRIORITY QUICK FROM dspam_signature_data WHERE from_days(@today-@PurgeSignatures) > created_on; COMMIT; dspam-3.10.2+dfsg/src/tools.mysql_drv/Makefile.in0000644000175000017500000002564211745313452021207 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.4 2006/01/24 14:39:38 jonz Exp $ # tools.mysql_drv/Makefile.am # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/tools.mysql_drv DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = mysql_objects-speed.sql mysql_objects-space.sql virtual_users.sql purge.sql mysql_objects-4.1.sql purge-4.1.sql virtual_user_aliases.sql all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tools.mysql_drv/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/tools.mysql_drv/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/src/tools.mysql_drv/virtual_user_aliases.sql0000644000175000017500000000040211622570546024076 0ustar julienjulien# $Id: virtual_user_aliases.sql,v 1.3 2011/05/09 23:01:51 sbajic Exp $ create table dspam_virtual_uids ( uid int unsigned not null, username varchar(128) not null ) engine=MyISAM; create unique index id_virtual_uids_01 on dspam_virtual_uids(username); dspam-3.10.2+dfsg/src/tools.mysql_drv/mysql_objects-speed.sql0000644000175000017500000000347411622570546023641 0ustar julienjulien# $Id: mysql_objects-speed.sql,v 1.32 2011/05/09 22:43:52 sbajic Exp $ -- --------------------------------------------------------------------------- -- ! ! ! ! ! ! ! THIS FILE SHOULD ONLY BE USED ON MYSQL < 4.1 ! ! ! ! ! ! ! -- ! ! ! ! ! FOR MYSQL 4.1+ PLEASE USE mysql_objects-4.1.sql FILE ! ! ! ! ! -- --------------------------------------------------------------------------- create table dspam_token_data ( uid int unsigned not null, token char(20) not null, spam_hits bigint unsigned not null, innocent_hits bigint unsigned not null, last_hit date not null ) engine=MyISAM; create unique index id_token_data_01 on dspam_token_data(uid,token); create index spam_hits on dspam_token_data(spam_hits); create index innocent_hits on dspam_token_data(innocent_hits); create index last_hit on dspam_token_data(last_hit); create table dspam_signature_data ( uid int unsigned not null, signature char(32) not null, data longblob not null, length int unsigned not null, created_on date not null ) engine=MyISAM; 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 int unsigned primary key, spam_learned bigint unsigned not null, innocent_learned bigint unsigned not null, spam_misclassified bigint unsigned not null, innocent_misclassified bigint unsigned not null, spam_corpusfed bigint unsigned not null, innocent_corpusfed bigint unsigned not null, spam_classified bigint unsigned not null, innocent_classified bigint unsigned not null ) engine=MyISAM; create table dspam_preferences ( uid int unsigned not null, preference varchar(32) not null, value varchar(64) not null ) engine=MyISAM; create unique index id_preferences_01 on dspam_preferences(uid, preference); dspam-3.10.2+dfsg/src/tools.mysql_drv/mysql_objects-space.sql0000644000175000017500000000324211622570546023625 0ustar julienjulien# $Id: mysql_objects-space.sql,v 1.32 2011/05/09 22:46:09 sbajic Exp $ -- --------------------------------------------------------------------------- -- ! ! ! ! ! ! ! THIS FILE SHOULD ONLY BE USED ON MYSQL < 4.1 ! ! ! ! ! ! ! -- ! ! ! ! ! FOR MYSQL 4.1+ PLEASE USE mysql_objects-4.1.sql FILE ! ! ! ! ! -- --------------------------------------------------------------------------- create table dspam_token_data ( uid int unsigned not null, token varchar(20) not null, spam_hits bigint unsigned not null, innocent_hits bigint unsigned not null, last_hit date not null ) engine=MyISAM; create unique index id_token_data_01 on dspam_token_data(uid,token); create table dspam_signature_data ( uid int unsigned not null, signature varchar(32) not null, data longblob not null, length int unsigned not null, created_on date not null ) engine=MyISAM; 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 int unsigned primary key not null, spam_learned bigint unsigned not null, innocent_learned bigint unsigned not null, spam_misclassified bigint unsigned not null, innocent_misclassified bigint unsigned not null, spam_corpusfed bigint unsigned not null, innocent_corpusfed bigint unsigned not null, spam_classified bigint unsigned not null, innocent_classified bigint unsigned not null ) engine=MyISAM; create table dspam_preferences ( uid int unsigned not null, preference varchar(32) not null, value varchar(64) not null ) engine=MyISAM; create unique index id_preferences_01 on dspam_preferences(uid, preference); dspam-3.10.2+dfsg/src/dspam.conf.in0000644000175000017500000010606611741351001016327 0ustar julienjulien## $Id: dspam.conf.in,v 1.103 2011/11/10 00:27:34 tomhendr Exp $ ## dspam.conf -- DSPAM configuration file ## # # DSPAM Home: Specifies the base directory to be used for DSPAM storage # Home @dspam_home@ # # StorageDriver: Specifies the storage driver backend (library) to use. # You'll only need to set this if you are using dynamic storage driver plugins # from a binary distribution. The default build statically links the storage # driver (when only one is specified at configure time), overriding this # setting, which only comes into play if multiple storage drivers are specified # at configure time. When using dynamic linking, be sure to include the path # to the library if necessary, and some systems may use an extension other # than .so (e.g. OSX uses .dylib). # # Options include: # # libmysql_drv.so libpgsql_drv.so libsqlite_drv.so # libsqlite3_drv.so libhash_drv.so # # IMPORTANT: Switching storage drivers requires more than merely changing # 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@/dspam/@storage_driver@ # # 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/local/sbin/exim -oMr spam-scanned" # Exim # TrustedDeliveryAgent "@delivery_agent@" # # 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" # # SMTP or LMTP Delivery: Alternatively, you may wish to use SMTP or LMTP # delivery to deliver your message to the mail server instead of using a # delivery agent. You will need to configure with --enable-daemon to use host # delivery, however you do not need to operate in daemon mode. Specify an IP # address or UNIX path to a domain socket below as a host. # # If you would like to set up DeliveryHost's on a per-domain basis, use # the syntax: DeliveryHost.example.org 1.2.3.4 # #DeliveryHost 127.0.0.1 #DeliveryPort 24 #DeliveryIdent localhost #DeliveryProto LMTP # # FallbackDomains: If you want to specify certain domains as fallback domains, # enable this option. For example, you could create a user @example.org, and # if bob@example.org does not resolve to a known user on the system, the user # could default to your @example.org user. NOTE: This also requires designating # fallbackDomain for the domain name; # e.g. dspam_admin ch pref example.org fallbackDomain on # #FallbackDomains on # # 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" # # DSPAM can optionally process "plused users" (addresses in the user+detail # form) by truncating the username just before the "+", so all internal # processing occurs for "user", but delivery will be performed for # "user+detail". This is only useful if the LDA can handle "plused users" # (for example Cyrus IMAP) and when configured for LMTP delivery above # #EnablePlusedDetail on # # Character to use as seperator between user names and address extensions. # If you change this value then please adjust QuarantineMailbox to use the # new specified character. The default is '+'. # #PlusedCharacter + # # Turn this feature on if you want to force DSPAM to lowercase the "plused # users" username. # #PlusedUserLowercase on # # Quarantine Mailbox: DSPAM's LMTP code can send spam mail using LMTP to a # "plused" mailbox (such as user+quarantine) leaving quarantine processing # for retraining or deletion to be performed by the LDA and the mail client. # "plused" mailboxes are supported by Cyrus IMAP and possibly other LDAs. If # you don't set/change PlusedCharacter then the mailbox name must have the + # since the + is the default used character. # #QuarantineMailbox +quarantine # # 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 dspam Trust apache 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 # # ClassAlias: Alias a particular class to spam/nonspam. This is useful if # classifying things other than spam. # #ClassAliasSpam badstuff #ClassAliasNonspam goodstuff # # 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 Train on Error (Only) # teft Train Everything (Trains on every message) # tum Train Until Mature (Train only tokens without enough data) # notrain Do not train or store signatures (large ISP systems, post-train) # TrainingMode teft # # TestConditionalTraining: By default, dspam will retrain certain errors # until the condition is no longer met. This usually accelerates learning. # Some people argue that this can increase the risk of errors, however. # TestConditionalTraining on # # 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 noise Feature whitelist # Training Buffer: The training buffer waters down statistics during training. # It is designed to prevent false positives, but can also dramatically reduce # dspam's catch rate during initial training. This can be a number from 0 # (no buffering) to 10 (maximum buffering). If you are paranoid about false # positives, you should probably enable this option. # #Feature tb=5 # # Algorithms: Specify the statistical algorithms to use, overriding any # defaults configured in the build. The options are: # naive Naive-Bayesian (All Tokens) # 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. # # NOTE: For standard "CRM114" Markovian weighting, use 'naive', or consider # using 'burton' for slightly better accuracy # # Don't mess with this unless you know what you're doing # #Algorithm chi-square #Algorithm naive Algorithm graham burton # # Tokenizer: Specify the tokenizer to use. The tokenizer is the piece # responsible for parsing the message into individual tokens. Depending on # how many resources you are willing to trade off vs. accuracy, you may # choose to use a less or more detailed tokenizer: # word uniGram (single word) tokenizer # Tokenizes message into single individual words/tokens # example: "free" and "viagra" # chain biGram (chained tokens) tokenizer (default) # Single words + chains adjacent tokens together # example: "free" and "viagra" and "free viagra" # sbph Sparse Binary Polynomial Hashing tokenizer # Creates sparse token patterns across sliding window of 5-tokens # example: "the quick * fox jumped" and "the * * fox jumped" # osb Orthogonal Sparse biGram tokenizer # Similar to SBPH, but only uses the biGrams # example: "the * * fox" and "the * * * jumped" # # In general the reccomendation is to use 'osb' for new installations. # The default value of 'chain' remains here as not to surprise anyone upgrading # that has not changed from the default value. # Tokenizer chain # # PValue: Specify the technique used for calculating Probability Values, # overriding any defaults configured in the build. These options are: # bcr Bayesian Chain Rule (Graham's Technique - "A Plan for Spam") # robinson Robinson's Technique (used in Chi-Square) # markov Markovian Weighted Technique (for Markovian discrimination) # # Unlike the "Algorithms" property, 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 markov PValue bcr # # WebStats: Enable this if you are using the CGI, which writes .stats files WebStats on # # ImprobabilityDrive: Calculate odds-ratios for ham/spam, and add to # X-DSPAM-Improbability headers # #ImprobabilityDrive on # # 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, the user's preferences will override any # defaults. # Preference "trainingMode=TEFT" # { TOE | TUM | TEFT | NOTRAIN } -> default:teft Preference "spamAction=quarantine" # { quarantine | tag | deliver } -> default:quarantine Preference "spamSubject=[SPAM]" # { string } -> default:[SPAM] Preference "statisticalSedation=5" # { 0 - 10 } -> default:0 Preference "enableBNR=on" # { on | off } -> default:off Preference "enableWhitelist=on" # { on | off } -> default:on Preference "signatureLocation=message" # { message | headers } -> default:message Preference "tagSpam=off" # { on | off } Preference "tagNonspam=off" # { on | off } Preference "showFactors=off" # { on | off } -> default:off Preference "optIn=off" # { on | off } Preference "optOut=off" # { on | off } Preference "whitelistThreshold=10" # { Integer } -> default:10 Preference "makeCorpus=off" # { on | off } -> default:off Preference "storeFragments=off" # { on | off } -> default:off Preference "localStore=" # { on | off } -> default:username Preference "processorBias=on" # { on | off } -> default:on Preference "fallbackDomain=off" # { on | off } -> default:off Preference "trainPristine=off" # { on | off } -> default:off Preference "optOutClamAV=off" # { on | off } -> default:off Preference "ignoreRBLLookups=off" # { on | off } -> default:off Preference "RBLInoculate=off" # { on | off } -> default:off Preference "notifications=off" # { on | off } -> default:off # # Overrides: Specifies the user preferences which may override configuration # and commandline defaults. Any other preferences supplied by an untrusted user # will be ignored. # AllowOverride enableBNR AllowOverride enableWhitelist AllowOverride fallbackDomain AllowOverride ignoreGroups AllowOverride ignoreRBLLookups AllowOverride localStore AllowOverride makeCorpus AllowOverride optIn AllowOverride optOut AllowOverride optOutClamAV AllowOverride processorBias AllowOverride RBLInoculate AllowOverride showFactors AllowOverride signatureLocation AllowOverride spamAction AllowOverride spamSubject AllowOverride statisticalSedation AllowOverride storeFragments AllowOverride tagNonspam AllowOverride tagSpam AllowOverride trainPristine AllowOverride trainingMode AllowOverride whitelistThreshold AllowOverride dailyQuarantineSummary AllowOverride notifications # --- 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 #MySQLReconnect 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 #MySQLReconnect 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 # 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 --- # For PgSQLServer you can Use a TCP/IP address or a socket. If your socket is # in /var/run/postgresql/.s.PGSQL.5432 specify just the path where the socket # resits (without .s.PGSQL.5432). #PgSQLServer /var/run/postgresql/ #PgSQLPort #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 # --- SQLite --- #SQLitePragma "synchronous = OFF" # --- Hash --- # # HashRecMax: Default number of records to create in the initial segment when # building hash files. 100,000 yields files 1.6MB in size, but can fill up # fast, so be sure to increase this (to a million or more) if you're not using # autoextend. # # NOTE: If you're using a heavy-weight tokenizer, such as SBPH, you should be # looking for settings in the 'millions' of records. # # Primes List: # 53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, 98317, 196613, # 393241, 786433, 1572869, 3145739, 6291469, 12582917, 25165843, 50331653, # 100663319, 201326611, 402653189, 805306457, 1610612741, 3221225473, # 4294967291 # HashRecMax 98317 # # HashAutoExtend: Autoextend hash databases when they fill up. This allows # them to continue to train by adding extents (extensions) to the file. There # will be a small delay during the growth process, as everything needs to be # closed and remapped. # HashAutoExtend on # # HashMaxExtents: The maximum number of extents that may be created in a single # hash file. Set this to zero for unlimited # HashMaxExtents 0 # # HashExtentSize: The initial record size for newly created extents. Creating # this too small could result in many extents being created. Creating this too # large could result in excessive disk space usage. Typically, a value close # to half of the HashRecMax size is good. # HashExtentSize 49157 # # HashPctIncrease: Increase the next extent size by n% from the size of the # last extent. This is useful in accommodating systems where the default # HashExtentSize can be too small for certain high-volume users, and can also # help keep seeks nice and speedy and/or prevent too many unnecessary extents # from being created when using a low HashMaxSeek. The default behavior, when # HashPctIncrease is not used, is to always use # HashExtentSize with no # increase. # HashPctIncrease 10 # # HashMaxSeek: The maximum number of record seeks when inserting a new record # before failing or adding a new extent. This ultimately translates into the # max # of acceptable seeks per segment. Setting this too high will exhaustively # scan each segment and hurt performance. Typically, a low value is acceptable # as even older extents will continue to fill as training progresses. # HashMaxSeek 10 # # HashConcurrentUser: If you are using a single, stateful hash database in # daemon mode, specifying a concurrent user below will cause the user to be # permanently mapped into memory and shared via rwlocks. This is very fast and # very cool if you are running a "userless" relay appliance. # #HashConcurrentUser user # # HashConnectionCache: If running in daemon mode, this is the max # of # concurrent connections that will be supported. NOTE: If you are using # HashConcurrentUser, this option is ignored, as all connections are read- # write locked instead of mutex locked. # HashConnectionCache 10 # --- ExtLookup --- # ExtLookup: Perform various external lookup functions depending on user- # defined variables. ExtLookup can either be set to 'on' or 'off'. The # behavior of such lookups are defined by the use of ExtLookupMode, which # can be set to 'verify', 'map' and 'strict'. # # verify Will cause dspam to validate the user, prior to # creating the user entry in the system. # # map Will cause dspam to try to map the user address # to a certain unique identifier. # # strict Will cause dspam to enforce both 'verify' and 'map'. # # ExtLookupDriver will set the engine behind the lookups. For now the only # supported mechanisms are 'ldap' and 'program'. The first will make dspam # talk directly to the configured LDAP server. The second will prefrom the # various lookup functions by running a certain binary program or executable # script. The program MUST be a binary executable or a script with a well # defined interpreter in its first line ( #!/path/to/interpreter ). There # are plans to support TLS/SSL connections to backend databases. # #ExtLookup on # Turns on/off external lookup #ExtLookupMode strict # available modes are 'verify', 'map' and 'strict'. # 'strict' enforces both verify and map #ExtLookupDriver ldap # Currently only ldap and program are supported. # There are plans to support both MySQL and Postgres. #ExtLookupServer ldap.example.org # Can either be a database hostname or the full path to # an executable lookup program and its arguments. #ExtLookupPort 389 # Desired port when connecting to the lookup database. #ExtLookupDB "ou=Users,dc=domain,dc=com" # Can either be an LDAP search base or a database name (TODO). #ExtLookupQuery "(&(objectClass=qmailUser)(|(mail=%u)(mailAlternateAddress=%u)))" # Can either be an LDAP search filter or an SQL query (TODO) #ExtLookupLDAPAttribute "mail" # Attribute to be used when ExtLookupDriver is 'ldap' # and ExtLookupMode 'map' or 'strict' #ExtLookupLDAPScope sub # Can be set to 'base', 'sub' or 'one'. Only used when ExtLookupDriver is 'ldap'. #ExtLookupLDAPVersion 3 # Sets the LDAP protocol version (1, 2 or 3) #ExtLookupLogin "cn=admin,dc=domain,dc=com" # Login to be used when connecting to any direct database backend. #ExtLookupPassword itsasecret # Password to use with ExtLookupLogin. #ExtLookupCrypto tls # Sets the use of TLS on backend communication (only compatible with LDAPv3) # --- Profiles --- # # You can specify multiple 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 #MySQLReconnect.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 #MySQLReconnect.Sun420R true # #DefaultProfile DECAlpha # # If you're using storage profiles, you can set failovers for each profile. # Of course, if you'll be failing over to another database, that database # must have the same information as the first. If you're using a global # database with no training, this should be relatively simple. If you're # configuring per-user data, however, you'll need to set up some type of # replication between databases. # #Failover.DECAlpha SUN420R #Failover.Sun420R DECAlpha # If the storage fails, the agent will follow each profile's failover up to # a maximum number of failover attempts. This should be set to a maximum of # the number of profiles you have, otherwise the agent could loop and try # the same profile multiple times (unless this is your desired behavior). # #FailoverAttempts 1 # # 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 # # Lookup: Perform lookups on streamlined blackhole list servers (see # http://www.nuclearelephant.com/projects/sbl/). The streamlined blacklist # server is machine-automated, unsupervised blacklisting system designed to # provide real-time and highly accurate blacklisting based on network spread. # When performing a lookup, DSPAM will automatically learn the inbound message # as spam if the source IP is listed. Until an official public RABL server is # available, this feature is only useful if you are running your own # streamlined blackhole list server for internal reporting among multiple mail # servers. Provide the name of the lookup zone below to use. # # This function performs standard reverse-octet.domain lookups, and while it # will function with many RBLs, it's strongly discouraged to use those # maintained by humans as they're often inaccurate and could hurt filter # learning and accuracy. # #Lookup "sbl.example.org" # # RBLInoculate: If you want to inoculate the user from RBL'd messages it would # have otherwise missed, set this to on. # #RBLInoculate off # # Notifications: Enable the sending of notification emails to users (first # message, quarantine full, etc.) # Notifications off # TxtDirectory: the directory that holds the templates for notification # messages (see Notifications) and tagging (see tagSpam/tagNonspam). # #TxtDirectory @dspam_home@/txt # # QuarantineWarnSize: You may specify a size when DSPAM should send a "Quarantine # Full" message to each user. This is only working if you enable notifications # (see above). Value is in bytes. Default is 2097152 -> 2MB. # #QuarantineWarnSize 2097152 # # Purge configuration: Set dspam_clean purge default options, if not otherwise # specified on the commandline # PurgeSignatures 14 # Stale signatures PurgeNeutral 90 # Tokens with neutralish probabilities PurgeUnused 90 # Unused tokens PurgeHapaxes 30 # Tokens with less than 5 hits (hapaxes) PurgeHits1S 15 # Tokens with only 1 spam hit PurgeHits1I 15 # Tokens with only 1 innocent hit # # Purge configuration for SQL-based installations using purge.sql # #PurgeSignature off # Specified in purge.sql #PurgeNeutral 90 #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. # By default DSPAM is considering the following IPs always as LocalMX: # 10.0.0.0/8 - Private IP addresses (RFC 1918) # 127.0.0.0/8 - Localhost Loopback Address (RFC 1700) # 169.254.0.0/16 - Zeroconf / APIPA (RFC 3330) # 172.16.0.0/12 - Private IP addresses (RFC 1918) # 192.168.0.0/16 - Private IP addresses (RFC 1918) # 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. # # NOTE: You can't use this setting with dspam_trian; if you're going to use it, # wait until after you train any corpora. # #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 # RABL blacklist files (see http://www.nuclearelephant.com/projects/rabl/). # #TrackSources spam nonspam virus # # ParseToHeaders: In lieu of setting up individual aliases for each user, # DSPAM can be configured to automatically parse the To: address for spam and # false positive forwards. From there, it can be configured to either set the # DSPAM user based on the username specified in the header and/or change the # training class and source accordingly. The options below can be used to # customize most common types of header parsing behavior to avoid the need for # multiple aliases, or if using LMTP, aliases entirely.. # # ParseToHeader: Parse the To: headers of an incoming message. This must be # set to 'on' to use either of the following features. # # ChangeModeOnParse: Automatically change the class (to spam or innocent) # depending on whether spam- or notspam- was specified, and change the source # to 'error'. This is convenient if you're not using aliases at all, but # are delivering via LMTP. # # ChangeUserOnParse: Automatically change the username to match that specified # in the To: header. For example, spam-bob@example.org will set the username # to bob, ignoring any --user passed in. This may not always be desirable if # you are using virtual email addresses as usernames. Options: # on or user take the portion before the @ sign only # full take everything after the initial {spam,notspam}-. # #ParseToHeaders on #ChangeModeOnParse on #ChangeUserOnParse 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. # Specifying 'lineStripping' causes DSPAM to strip ^M's from messages passed # in. # #Broken returnCodes #Broken case #Broken lineStripping # # MaxMessageSize: You may specify a maximum message size for DSPAM to process. # If the message is larger than the maximum size, it will be delivered # without processing. Value is in bytes. # #MaxMessageSize 4194304 # --- ClamAV --- # # Virus Checking: If you are running clamd, DSPAM can perform stream-based # virus checking using TCP. Uncomment the values below to enable virus # checking. # # ClamAVResponse: reject (reject or drop the message with a permanent failure) # accept (accept the message and quietly drop the message) # spam (treat as spam and quarantine/tag/whatever) # #ClamAVPort 3310 #ClamAVHost 127.0.0.1 #ClamAVResponse accept # --- CLIENT / SERVER --- # # Daemonized Server: If you are running DSPAM as a daemonized server using # --daemon, the following parameters will override the default. Use the # ServerPass option to set up accounts for each client machine. The DSPAM # server will process and deliver the message based on the parameters # specified. If you want the client machine to perform delivery, use # the --stdout option in conjunction with a local setup. # # ServerHost: Not enabling ServerHost will bind DSPAM server to all available # interfaces. # #ServerHost 127.0.0.1 #ServerPort 24 #ServerQueueSize 32 #ServerPID /var/run/dspam.pid # # ServerMode specifies the type of LMTP server to start. This can be one of: # dspam: DSPAM-proprietary DLMTP server, for communicating with dspamc # standard: Standard LMTP server, for communicating with Postfix or other MTA # auto: Speak both DLMTP and LMTP; auto-detect by ServerPass.IDENT # #ServerMode dspam # If supporting DLMTP (dspam) mode, dspam clients will require authentication # as they will be passing in parameters. The idents below will be used to # determine which clients will be speaking DLMTP, so if you will be using # both LMTP and DLMTP from the same host, be sure to use something other # than the server's hostname below (which will be sent by the MTA during a # standard LMTP LHLO). # #ServerPass.Relay1 "secret" #ServerPass.Relay2 "password" # If supporting standard LMTP mode, server parameters will need to be specified # here, as they will not be passed in by the mail server. The ServerIdent # specifies the 250 response code ident sent back to connecting clients and # should be set to the hostname of your server, or an alias. # # NOTE: If you specify --user in ServerParameters, the RCPT TO will be # used only for delivery, and not set as the active user for processing. # #ServerParameters "--deliver=innocent -d %u" #ServerIdent "localhost.localdomain" # If you wish to use a local domain socket instead of a TCP socket, uncomment # the following. It is strongly recommended you use local domain sockets if # you are running the client and server on the same machine, as it eliminates # much of the bandwidth overhead. # #ServerDomainSocketPath "/tmp/dspam.sock" # # Client Mode: If you are running DSPAM in client/server mode, uncomment and # set these variables. A ClientHost beginning with a / will be treated as # a domain socket. # #ClientHost /tmp/dspam.sock #ClientIdent "secret@Relay1" # #ClientHost 127.0.0.1 #ClientPort 24 #ClientIdent "secret@Relay1" # --- RABL --- # RABLQueue: Touch files in the RABL queue # If you are a reporting streamlined blackhole list participant, you can # touch ip addresses within the directory the rabl_client process is watching. # #RABLQueue /var/spool/rabl # --- --- # DataSource: If you are using any type of data source that does not include # email-like headers (such as documents), uncomment the line below. This # will cause the entire input to be treated like a message "body" # #DataSource document # ProcessorWordFrequency: By default, words are only counted once per message. # If you are classifying large documents, however, you may wish to count once # per occurrence instead. # #ProcessorWordFrequency occurrence # ProcessorURLContext: By default, a URL context is generated for URLs, which # records their tokens as separate from words found in documents. To use # URL tokens in the same context as words, turn this feature off. # ProcessorURLContext on # ProcessorBias: Bias causes the filter to lean more toward 'innocent', and # usually greatly reduces false positives. It is the default behavior of # most Bayesian filters (including dspam). # # NOTE: You probably DONT want this if you're using Markovian Weighting, unless # you are paranoid about false positives. # ProcessorBias on # StripRcptDomain: Cut the domain (including the at sign) from recipients. # This is particularly useful if the recipient name is equal to real user # accounts as recipients with domains tend to cause permission issues with # dspam-web. # StripRcptDomain off # GroupConfig: The configuration file for groups. See the README file # for details on how to enable users to combine their training data to # get better results. GroupConfig @dspam_home@/group # --- Split Configuration File Support --- # Include a directory with configuration items. #Include /etc/dspam/dspam.d/ # --- --- ## EOF dspam-3.10.2+dfsg/src/util.c0000644000175000017500000005164611741351001015073 0ustar julienjulien/* $Id: util.c,v 1.269 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #ifndef _WIN32 # include #endif #include #include #ifdef HAVE_UNISTD_H # include #endif #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "language.h" #include "config.h" #include "util.h" #include "libdspam.h" #ifdef _WIN32 #include #define mkdir(filename, perm) _mkdir(filename) #endif #ifndef HAVE_STRTOK_R char * strtok_r(char *s1, const char *s2, char **lasts) { char *ret; if (s1 == NULL) s1 = *lasts; while(*s1 && strchr(s2, *s1)) ++s1; if(*s1 == '\0') return NULL; ret = s1; while(*s1 && !strchr(s2, *s1)) ++s1; if(*s1) *s1++ = '\0'; *lasts = s1; return ret; } #endif /* HAVE_STRTOK_R */ double _ds_gettime(void) { double t; #ifdef _WIN32 t = GetTickCount()/1000.; #else /* !_WIN32 */ struct timeval tv; if (gettimeofday(&tv, NULL) != -1 ) t = tv.tv_usec/1000000.0 + tv.tv_sec; else t = 0.; #endif /* _WIN32/!_WIN32 */ return t; } /* Compliments of Jay Freeman */ #ifndef HAVE_STRSEP char * strsep (char **stringp, const char *delim) { char *ret = *stringp; if (ret == NULL) return (NULL); if ((*stringp = strpbrk (*stringp, delim)) != NULL) *((*stringp)++) = '\0'; return (ret); } #endif void chomp (char *string) { int len; if (string == NULL) return; len = strlen (string); if (len && string[len - 1] == 10) { string[len - 1] = 0; len--; } if (len && string[len - 1] == 13) string[len - 1] = 0; return; } char * ltrim (char *str) { char *p; if (!str || !str[0]) return str; for (p = str; isspace ((int) *p); ++p) { /* do nothing */ } if (p > str) strcpy (str, p); /* __STRCPY_CHECKED__ */ return str; } char * rtrim (char *str) { size_t offset; char *p; if (!str || !str[0]) return str; offset = strlen (str); p = str + offset - 1; /* now p points to the last character in * string */ for (; p >= str && isspace ((int) *p); --p) { *p = 0; } return str; } #ifndef HAVE_STRLCPY /* * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters * will be copied. Always NUL terminates (unless siz <= strlen(dst)). * Returns strlen(src) + MIN(siz, strlen(initial dst)). * If retval >= siz, truncation occurred. */ size_t strlcat (dst, src, siz) char *dst; const char *src; size_t siz; { register char *d = dst; register const char *s = src; register size_t n = siz; size_t dlen; /* Find the end of dst and adjust bytes left but don't go past end */ while (n-- != 0 && *d != '\0') d++; dlen = d - dst; n = siz - dlen; if (n == 0) return (dlen + strlen (s)); while (*s != '\0') { if (n != 1) { *d++ = *s; n--; } s++; } *d = '\0'; return (dlen + (s - src)); /* count does not include NUL */ } /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). * Returns strlen(src); if retval >= siz, truncation occurred. */ size_t strlcpy (dst, src, siz) char *dst; const char *src; size_t siz; { register char *d = dst; register const char *s = src; register size_t n = siz; /* Copy as many bytes as will fit */ if (n != 0 && --n != 0) { do { if ((*d++ = *s++) == 0) break; } while (--n != 0); } /* Not enough room in dst, add NUL and traverse rest of src */ if (n == 0) { if (siz != 0) *d = '\0'; /* NUL-terminate dst */ while (*s++) ; } return (s - src - 1); /* count does not include NUL */ } #endif const char * _ds_userdir_path (char *path, const char *home, const char *filename, const char *extension) { char username[MAX_FILENAME_LENGTH]; char userpath[MAX_FILENAME_LENGTH]; #ifdef DOMAINSCALE char *f, *domain, *user; char *ptrptr; #endif #ifdef HOMEDIR struct passwd *p; #if defined(_REENTRANT) && defined(HAVE_GETPWNAM_R) struct passwd pwbuf; char buf[1024]; #endif char userhome[MAX_FILENAME_LENGTH]; #endif if (filename == NULL || filename[0] == 0) { path[0] = 0; return path; } #ifdef HOMEDIR #if defined(_REENTRANT) && defined(HAVE_GETPWNAM_R) if (getpwnam_r(filename, &pwbuf, buf, sizeof(buf), &p)) p = NULL; #else p = getpwnam(filename); #endif if (p == NULL) strcpy(userhome, home); else strlcpy(userhome, p->pw_dir, sizeof(userhome)); if (extension != NULL && (!strcmp (extension, "nodspam") || !strcmp (extension, "dspam"))) { if (p != NULL) { snprintf (path, MAX_FILENAME_LENGTH, "%s/.%s", p->pw_dir, extension); #ifdef DEBUG LOGDEBUG ("using %s as path", path); #endif return path; } } #endif /* HOMEDIR */ #ifdef DOMAINSCALE f = strdup(filename); user = strtok_r(f, "@", &ptrptr); domain = strtok_r(NULL, "@", &ptrptr); if (domain == NULL) domain = "local"; snprintf(userpath, MAX_FILENAME_LENGTH, "%s/%s", domain, user); strlcpy(username, user, MAX_FILENAME_LENGTH); free(f); #else strlcpy(username, filename, MAX_FILENAME_LENGTH); strcpy(userpath, username); #endif /* Use home/opt-in/ and home/opt-out/ to store opt files, instead of each user's directory */ if (extension != NULL && (!strcmp (extension, "nodspam") || !strcmp (extension, "dspam"))) { snprintf (path, MAX_FILENAME_LENGTH, "%s/opt-%s/%s.%s", home, (!strcmp(extension, "nodspam")) ? "out" : "in", userpath, extension); #ifdef DEBUG LOGDEBUG ("using %s as path", path); #endif return path; } #ifdef LARGESCALE if (filename[1] != 0) { if (extension == NULL) { snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%c/%c/%s", home, filename[0], filename[1], filename); } else { if (extension[0] == 0) snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%c/%c/%s/%s", home, filename[0], filename[1], filename, filename); else snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%c/%c/%s/%s.%s", home, filename[0], filename[1], filename, filename, extension); } } else { if (extension == NULL) { snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%c/%s", home, filename[0], filename); } else { if (extension[0] == 0) snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%c/%s/%s", home, filename[0], filename, filename); else snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%c/%s/%s.%s", home, filename[0], filename, filename, extension); } } #else if (extension == NULL) { #ifdef HOMEDIR snprintf (path, MAX_FILENAME_LENGTH, "%s/.dspam", userhome); #else snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%s", home, userpath); #endif } else { #ifdef HOMEDIR snprintf(path, MAX_FILENAME_LENGTH, "%s/.dspam/%s.%s", userhome, username, extension); #else snprintf (path, MAX_FILENAME_LENGTH, "%s/data/%s/%s.%s", home, userpath, username, extension); #endif } #endif return path; } int _ds_prepare_path_for (const char *filename) { char path[MAX_FILENAME_LENGTH]; char *dir, *file; char *file_buffer_start; struct stat s; if (!filename) return EINVAL; file = strdup (filename); if (!file) { LOG (LOG_ERR, ERR_MEM_ALLOC); return EFAILURE; } #ifdef _WIN32 /* Windows uses both slash and backslash as path separators while the code below only deals with slashes -- make it work by adjusting the path. */ { char *p; for ( p = strchr(file, '\\'); p; p = strchr(p + 1, '\\') ) { *p = '/'; } } #endif file_buffer_start = file; path[0] = 0; dir = strsep (&file, "/"); while (dir != NULL) { strlcat (path, dir, sizeof (path)); dir = strsep (&file, "/"); #ifdef _WIN32 /* don't try to create root directory of a drive */ if ( path[2] != '\0' || path[1] != ':' ) #endif { #ifdef EXT_LOOKUP /* don't create users data dir if user verification is required */ if (dir != NULL && stat (path, &s) && path[0] != 0 && verified_user == 1) #else if (dir != NULL && stat (path, &s) && path[0] != 0) #endif { int x; LOGDEBUG ("creating directory '%s'", path); x = mkdir (path, 0770); if (x) { LOG(LOG_ERR, ERR_IO_DIR_CREATE, path, strerror (errno)); free (file_buffer_start); return EFILE; } } } strlcat (path, "/", sizeof (path)); } free (file_buffer_start); return 0; } int lc (char *buff, const char *string) { char *buffer; int i, j = 0; int len = strlen (string); buffer = malloc (len + 1); if (len == 0) { buff[0] = 0; free (buffer); return 0; } for (i = 0; i < len; i++) { if (isupper ((int) string[i])) { buffer[i] = tolower (string[i]); j++; } else { buffer[i] = string[i]; } } buffer[len] = 0; strcpy (buff, buffer); free (buffer); return j; } unsigned long long _ds_getcrc64 (const char *s) { static unsigned long long CRCTable[256]; unsigned long long crc = 0; static int init = 0; if (!init) { int i; init = 1; for (i = 0; i <= 255; i++) { int j; unsigned long long part = i; for (j = 0; j < 8; j++) { if (part & 1) part = (part >> 1) ^ POLY64REV; else part >>= 1; } CRCTable[i] = part; } } for (; *s; s++) { unsigned long long temp1 = crc >> 8; unsigned long long temp2 = CRCTable[(crc ^ (unsigned long long) *s) & 0xff]; crc = temp1 ^ temp2; } return crc; } int _ds_compute_weight(const char *token) { int complexity = _ds_compute_complexity(token); int sparse = _ds_compute_sparse(token); /* * Mathematically correct algorithm (but slower): * * int weight = 0; * * if (complexity >= 1 && complexity <= SPARSE_WINDOW_SIZE) { * weight = (int)pow(2.0,(2*(complexity-sparse-1))); * if (weight < 1) * return 1; * else * return weight; * } */ /* * The same (+/-) as above but without using an algorithm (and * therefore faster then calling each time the pow() function). * Using reverse order of complexity to speed up processing. * */ if (complexity == 5) { if (sparse == 1) /* the * brown fox jumped | the quick * fox jumped | the quick brown * jumped */ return 64; if (sparse == 2) /* the * * fox jumped | the * brown * jumped | the quick * * jumped */ return 16; if (sparse == 3) /* the * * * jumped */ return 4; if (sparse == 0) /* the quick brown fox jumped */ return 256; } if (complexity == 4) { if (sparse == 1) /* quick * fox jumped | quick brown * jumped */ return 16; if (sparse == 2) /* quick * * jumped */ return 4; if (sparse == 0) /* quick brown fox jumped */ return 64; } if (complexity == 3) { if (sparse == 1) /* brown * jumped */ return 4; if (sparse == 0) /* brown fox jumped */ return 16; } if (complexity == 2) { if (sparse == 0) /* fox jumped */ return 4; } if (complexity == 1) { if (sparse == 0) /* jumped */ return 1; } LOG(LOG_WARNING, "_ds_compute_weight: no rule to compute markovian weight for '%s'; complexity: %d; sparse: %d", token, complexity, sparse); return 1; } int _ds_compute_weight_osb(const char *token) { /* We have two possibilities here to compute the weight. * * One would be to use the original code found in older * CRM114 and compute (have larger weights for 'shorter' * (narrower) matches): * (SPARSE_WINDOW_SIZE-sparse)**(SPARSE_WINDOW_SIZE-sparse) * * Or use newer algorithm found in CRM114 (have larger * weights for 'longer' (wider) matches): * complexity**complexity * * We are going to use here the later one. */ int complexity = _ds_compute_complexity(token); /* * Mathematically correct algorithm (but slower): * * int weight = 1; * * if (complexity >= 1 && complexity <= SPARSE_WINDOW_SIZE) { * weight = (int)pow(complexity,complexity); * if (weight < 1) * weight = 1; * } * return weight; */ /* * The same (+/-) as above but without using an algorithm (and * therefore faster then calling each time the pow() function). * */ if (complexity == 5) { /* the * * * jumped */ return 3125; } if (complexity == 4) { /* quick * * jumped */ return 256; } if (complexity == 3) { /* brown * jumped */ return 27; } if (complexity == 2) { /* fox jumped */ return 4; } LOG(LOG_WARNING, "_ds_compute_weight_osb: no rule to compute OSB/OSBF/WINNOW weight for '%s'; complexity: %d", token, complexity); return 1; } int _ds_compute_sparse(const char *token) { int sparse = 0, i; if (!strncmp(token, "#+", 2)) sparse++; if (strlen(token)>=2 && !strncmp((token+strlen(token))-2, "+#", 2)) sparse++; for(i=0;token[i];i++) { if (!strncmp(token+i, "+#+", 3)) { sparse++; i++; } } return sparse; } int _ds_compute_complexity(const char *token) { int i, complexity = 1; if (token == NULL) return 1; for(i=0;token[i];i++) { if (token[i] == '+') { complexity++; i++; } } return complexity; } int _ds_extract_address(char *buf, const char *address, size_t len) { char *str = strdup(address); char *x, *y; if (str == NULL) return EUNKNOWN; x = strchr(str, '<'); if (!x) { free(str); return EFAILURE; } y = strchr(x, '>'); if (y) y[0] = 0; strlcpy(buf, x+1, len); free(str); return 0; } double chi2Q (double x, int v) { int i; double m, s, t; m = x / 2.0; s = exp(-m); t = s; for(i=1;i<(v/2);i++) { t *= m / i; s += t; } return MIN(s, 1.0); } void timeout(void) {} int _ds_get_fcntl_lock(int fd) { #ifdef _WIN32 return 0; #else struct flock f; int r; f.l_type = F_WRLCK; f.l_whence = SEEK_SET; f.l_start = 0; f.l_len = 0; #if defined __GLIBC__ && __GLIBC__ >= 2 signal(SIGALRM, (sighandler_t)timeout); #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) signal(SIGALRM, (sig_t)timeout); #else signal(SIGALRM, (void *)timeout); #endif alarm(300); r=fcntl(fd, F_SETLKW, &f); alarm(0); signal(SIGALRM,SIG_DFL); return r; #endif } int _ds_free_fcntl_lock(int fd) { #ifdef _WIN32 return 0; #else struct flock f; f.l_type = F_UNLCK; f.l_whence = SEEK_SET; f.l_start = 0; f.l_len = 0; return fcntl(fd, F_SETLKW, &f); #endif } int _ds_pow(int base, unsigned int exp) { int result = 1; while (exp > 0) { if (exp & 1) result *= base; base *= base; exp /= 2; } return result; } int _ds_pow2(int exp) { return _ds_pow(2, exp); } float _ds_round(float n) { int r = (n*100); while(r % 5) r++; return (r/100.0); } #ifndef HAVE_STRCASESTR char * strcasestr(s, find) const char *s, *find; { char c; if ((c = *find++) != 0) { size_t len; c = tolower((unsigned char)c); len = strlen(find); do { char sc; do { if ((sc = *s++) == 0) return (NULL); } while ((char)tolower((unsigned char)sc) != c); } while (strncasecmp(s, find, len) != 0); s--; } return ((char *)s); } #endif #ifndef HAVE_INET_NTOA_R /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ char * inet_ntoa_r(struct in_addr in, char *buf, int len) { char b[18]; register char *p; p = (char *)∈ #define UC(b) (((int)b)&0xff) snprintf(b, sizeof(b), "%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3])); if ((size_t)len <= strlen(b)) { errno = ERANGE; return(NULL); } return strcpy(buf, b); } #endif /* * _ds_validate_address() - Validate a email address * * DESCRIPTION * validate the supplied email address * * INPUT ARGUMENTS * const char *address pointer to email address * * NOTES * This function is NOT RFC 821/822 complete. However... most invalid * RFC 821/822 email addresses should be caputred by this function. * Extend this function if you need to capture more invalid email addresses. * * RETURN VALUES * returns 1 if email address is valid * returns 0 if email address is not valid * */ int _ds_validate_address(const char *address) { int count = 0; const char *p; char *email; const char *domain; static char *rfc822_specials = "()<>@,;:\\\"[]"; /* remove < at the beginning and > at the end of email address */ email = ALLTRIM(strdup(address)); if (*email == '<' && *(email + strlen(email) - 1) == '>') { *(email + strlen(email) - 1) = 0; email++; } /* First validate the local part (local_part@domain_part.tld) */ if (*email == '.') return 0; for (p = email; *p; p++) { if (*p == '\"' && (p == email || *(p - 1) == '.' || *(p - 1) == '\"')) { while (*++p) { if (*p == '\"') break; if (*p == '\\' && (*++p == ' ')) continue; if (*p < ' ' || *p >= 127) return 0; } if (!*p++) return 0; if (*p == '@') break; if (*p != '.') return 0; continue; } if (*p == '@') break; if (*p == '.' && (*++p == '.')) return 0; if (*p <= ' ' || *p >= 127) return 0; if (strchr(rfc822_specials, *p)) return 0; } if (p == email || *(p - 1) == '.') return 0; /* Next validate the domain part (local_part@domain_part.tld) */ if (!*(domain = ++p)) return 0; do { if (*p == '.') { if (p == domain || *(p - 1) == '.') return 0; count++; } if (*p <= ' ' || *p >= 127) return 0; if (*p == '.' && (*++p == '.')) return 0; if (strchr(rfc822_specials, *p)) return 0; } while (*++p); return (count >= 1); } dspam-3.10.2+dfsg/src/tools.hash_drv/0000755000175000017500000000000011745313542016707 5ustar julienjuliendspam-3.10.2+dfsg/src/tools.hash_drv/Makefile.am0000644000175000017500000000377711622570546020764 0ustar julienjulien# $Id: Makefile.am,v 1.2 2010/12/05 01:53:33 sbajic Exp $ # # tools.hash_drv/Makefile.am # EXTRA_DIST = AM_CPPFLAGS = \ -DLOGDIR=\"$(logdir)\" -DCONFIG_DEFAULT=\"$(sysconfdir)/dspam.conf\" \ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE -I$(top_srcdir) CFLAGS = @CFLAGS@ -I$(top_srcdir)/src bin_PROGRAMS = cssstat cssclean cssconvert csscompress DEFS = @DEFS@ -DLOGDIR=\"$(logdir)\" \ -DCONFIG_DEFAULT=\"$(sysconfdir)/dspam.conf\"\ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE 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 = cssstat_LDADD = -lm if DYNAMIC_DRIVER if BUILD_HASH_DRV cssstat_CPPFLAGS = $(libhash_drv_cppflags) cssstat_LDFLAGS += $(libhash_drv_libs) $(libhash_drv_ldflags) endif endif 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 = cssclean_LDADD = -lm if DYNAMIC_DRIVER if BUILD_HASH_DRV cssclean_CPPFLAGS = $(libhash_drv_cppflags) cssclean_LDFLAGS += $(libhash_drv_libs) $(libhash_drv_ldflags) endif endif 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 = cssconvert_LDADD = -lm if DYNAMIC_DRIVER if BUILD_HASH_DRV cssconvert_CPPFLAGS = $(libhash_drv_cppflags) cssconvert_LDFLAGS += $(libhash_drv_libs) $(libhash_drv_ldflags) endif endif 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 = csscompress_LDADD = -lm if DYNAMIC_DRIVER if BUILD_HASH_DRV csscompress_CPPFLAGS = $(libhash_drv_cppflags) csscompress_LDFLAGS += $(libhash_drv_libs) $(libhash_drv_ldflags) endif endif dspam-3.10.2+dfsg/src/tools.hash_drv/Makefile.in0000644000175000017500000025474211745313451020771 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.2 2010/12/05 01:53:33 sbajic Exp $ # # tools.hash_drv/Makefile.am # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = cssstat$(EXEEXT) cssclean$(EXEEXT) cssconvert$(EXEEXT) \ csscompress$(EXEEXT) @BUILD_HASH_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am__append_1 = $(libhash_drv_libs) $(libhash_drv_ldflags) @BUILD_HASH_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am__append_2 = $(libhash_drv_libs) $(libhash_drv_ldflags) @BUILD_HASH_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am__append_3 = $(libhash_drv_libs) $(libhash_drv_ldflags) @BUILD_HASH_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am__append_4 = $(libhash_drv_libs) $(libhash_drv_ldflags) subdir = src/tools.hash_drv DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_cssclean_OBJECTS = cssclean-cssclean.$(OBJEXT) \ cssclean-read_config.$(OBJEXT) cssclean-util.$(OBJEXT) \ cssclean-diction.$(OBJEXT) cssclean-nodetree.$(OBJEXT) \ cssclean-hash_drv.$(OBJEXT) cssclean-error.$(OBJEXT) \ cssclean-config_shared.$(OBJEXT) cssclean-pref.$(OBJEXT) cssclean_OBJECTS = $(am_cssclean_OBJECTS) cssclean_DEPENDENCIES = cssclean_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(cssclean_LDFLAGS) \ $(LDFLAGS) -o $@ am_csscompress_OBJECTS = csscompress-csscompress.$(OBJEXT) \ csscompress-read_config.$(OBJEXT) csscompress-util.$(OBJEXT) \ csscompress-diction.$(OBJEXT) csscompress-nodetree.$(OBJEXT) \ csscompress-hash_drv.$(OBJEXT) csscompress-error.$(OBJEXT) \ csscompress-config_shared.$(OBJEXT) csscompress-pref.$(OBJEXT) csscompress_OBJECTS = $(am_csscompress_OBJECTS) csscompress_DEPENDENCIES = csscompress_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(csscompress_LDFLAGS) $(LDFLAGS) -o $@ am_cssconvert_OBJECTS = cssconvert-cssconvert.$(OBJEXT) \ cssconvert-read_config.$(OBJEXT) cssconvert-util.$(OBJEXT) \ cssconvert-diction.$(OBJEXT) cssconvert-nodetree.$(OBJEXT) \ cssconvert-hash_drv.$(OBJEXT) cssconvert-error.$(OBJEXT) \ cssconvert-config_shared.$(OBJEXT) cssconvert-pref.$(OBJEXT) cssconvert_OBJECTS = $(am_cssconvert_OBJECTS) cssconvert_DEPENDENCIES = cssconvert_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(cssconvert_LDFLAGS) $(LDFLAGS) -o $@ am_cssstat_OBJECTS = cssstat-cssstat.$(OBJEXT) \ cssstat-read_config.$(OBJEXT) cssstat-util.$(OBJEXT) \ cssstat-diction.$(OBJEXT) cssstat-nodetree.$(OBJEXT) \ cssstat-hash_drv.$(OBJEXT) cssstat-error.$(OBJEXT) \ cssstat-config_shared.$(OBJEXT) cssstat-pref.$(OBJEXT) cssstat_OBJECTS = $(am_cssstat_OBJECTS) cssstat_DEPENDENCIES = cssstat_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(cssstat_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(cssclean_SOURCES) $(csscompress_SOURCES) \ $(cssconvert_SOURCES) $(cssstat_SOURCES) DIST_SOURCES = $(cssclean_SOURCES) $(csscompress_SOURCES) \ $(cssconvert_SOURCES) $(cssstat_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -I$(top_srcdir)/src CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ -DLOGDIR=\"$(logdir)\" \ -DCONFIG_DEFAULT=\"$(sysconfdir)/dspam.conf\"\ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = AM_CPPFLAGS = \ -DLOGDIR=\"$(logdir)\" -DCONFIG_DEFAULT=\"$(sysconfdir)/dspam.conf\" \ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE -I$(top_srcdir) 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 = $(am__append_1) cssstat_LDADD = -lm @BUILD_HASH_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@cssstat_CPPFLAGS = $(libhash_drv_cppflags) 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 = $(am__append_2) cssclean_LDADD = -lm @BUILD_HASH_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@cssclean_CPPFLAGS = $(libhash_drv_cppflags) 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 = $(am__append_3) cssconvert_LDADD = -lm @BUILD_HASH_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@cssconvert_CPPFLAGS = $(libhash_drv_cppflags) 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 = $(am__append_4) csscompress_LDADD = -lm @BUILD_HASH_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@csscompress_CPPFLAGS = $(libhash_drv_cppflags) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tools.hash_drv/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/tools.hash_drv/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list cssclean$(EXEEXT): $(cssclean_OBJECTS) $(cssclean_DEPENDENCIES) @rm -f cssclean$(EXEEXT) $(cssclean_LINK) $(cssclean_OBJECTS) $(cssclean_LDADD) $(LIBS) csscompress$(EXEEXT): $(csscompress_OBJECTS) $(csscompress_DEPENDENCIES) @rm -f csscompress$(EXEEXT) $(csscompress_LINK) $(csscompress_OBJECTS) $(csscompress_LDADD) $(LIBS) cssconvert$(EXEEXT): $(cssconvert_OBJECTS) $(cssconvert_DEPENDENCIES) @rm -f cssconvert$(EXEEXT) $(cssconvert_LINK) $(cssconvert_OBJECTS) $(cssconvert_LDADD) $(LIBS) cssstat$(EXEEXT): $(cssstat_OBJECTS) $(cssstat_DEPENDENCIES) @rm -f cssstat$(EXEEXT) $(cssstat_LINK) $(cssstat_OBJECTS) $(cssstat_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssclean-config_shared.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssclean-cssclean.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssclean-diction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssclean-error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssclean-hash_drv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssclean-nodetree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssclean-pref.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssclean-read_config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssclean-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csscompress-config_shared.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csscompress-csscompress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csscompress-diction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csscompress-error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csscompress-hash_drv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csscompress-nodetree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csscompress-pref.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csscompress-read_config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csscompress-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssconvert-config_shared.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssconvert-cssconvert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssconvert-diction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssconvert-error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssconvert-hash_drv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssconvert-nodetree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssconvert-pref.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssconvert-read_config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssconvert-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssstat-config_shared.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssstat-cssstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssstat-diction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssstat-error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssstat-hash_drv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssstat-nodetree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssstat-pref.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssstat-read_config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cssstat-util.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< cssclean-cssclean.o: cssclean.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-cssclean.o -MD -MP -MF $(DEPDIR)/cssclean-cssclean.Tpo -c -o cssclean-cssclean.o `test -f 'cssclean.c' || echo '$(srcdir)/'`cssclean.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-cssclean.Tpo $(DEPDIR)/cssclean-cssclean.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cssclean.c' object='cssclean-cssclean.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-cssclean.o `test -f 'cssclean.c' || echo '$(srcdir)/'`cssclean.c cssclean-cssclean.obj: cssclean.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-cssclean.obj -MD -MP -MF $(DEPDIR)/cssclean-cssclean.Tpo -c -o cssclean-cssclean.obj `if test -f 'cssclean.c'; then $(CYGPATH_W) 'cssclean.c'; else $(CYGPATH_W) '$(srcdir)/cssclean.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-cssclean.Tpo $(DEPDIR)/cssclean-cssclean.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cssclean.c' object='cssclean-cssclean.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-cssclean.obj `if test -f 'cssclean.c'; then $(CYGPATH_W) 'cssclean.c'; else $(CYGPATH_W) '$(srcdir)/cssclean.c'; fi` cssclean-read_config.o: ../read_config.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-read_config.o -MD -MP -MF $(DEPDIR)/cssclean-read_config.Tpo -c -o cssclean-read_config.o `test -f '../read_config.c' || echo '$(srcdir)/'`../read_config.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-read_config.Tpo $(DEPDIR)/cssclean-read_config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../read_config.c' object='cssclean-read_config.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-read_config.o `test -f '../read_config.c' || echo '$(srcdir)/'`../read_config.c cssclean-read_config.obj: ../read_config.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-read_config.obj -MD -MP -MF $(DEPDIR)/cssclean-read_config.Tpo -c -o cssclean-read_config.obj `if test -f '../read_config.c'; then $(CYGPATH_W) '../read_config.c'; else $(CYGPATH_W) '$(srcdir)/../read_config.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-read_config.Tpo $(DEPDIR)/cssclean-read_config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../read_config.c' object='cssclean-read_config.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-read_config.obj `if test -f '../read_config.c'; then $(CYGPATH_W) '../read_config.c'; else $(CYGPATH_W) '$(srcdir)/../read_config.c'; fi` cssclean-util.o: ../util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-util.o -MD -MP -MF $(DEPDIR)/cssclean-util.Tpo -c -o cssclean-util.o `test -f '../util.c' || echo '$(srcdir)/'`../util.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-util.Tpo $(DEPDIR)/cssclean-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../util.c' object='cssclean-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-util.o `test -f '../util.c' || echo '$(srcdir)/'`../util.c cssclean-util.obj: ../util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-util.obj -MD -MP -MF $(DEPDIR)/cssclean-util.Tpo -c -o cssclean-util.obj `if test -f '../util.c'; then $(CYGPATH_W) '../util.c'; else $(CYGPATH_W) '$(srcdir)/../util.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-util.Tpo $(DEPDIR)/cssclean-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../util.c' object='cssclean-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-util.obj `if test -f '../util.c'; then $(CYGPATH_W) '../util.c'; else $(CYGPATH_W) '$(srcdir)/../util.c'; fi` cssclean-diction.o: ../diction.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-diction.o -MD -MP -MF $(DEPDIR)/cssclean-diction.Tpo -c -o cssclean-diction.o `test -f '../diction.c' || echo '$(srcdir)/'`../diction.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-diction.Tpo $(DEPDIR)/cssclean-diction.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../diction.c' object='cssclean-diction.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-diction.o `test -f '../diction.c' || echo '$(srcdir)/'`../diction.c cssclean-diction.obj: ../diction.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-diction.obj -MD -MP -MF $(DEPDIR)/cssclean-diction.Tpo -c -o cssclean-diction.obj `if test -f '../diction.c'; then $(CYGPATH_W) '../diction.c'; else $(CYGPATH_W) '$(srcdir)/../diction.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-diction.Tpo $(DEPDIR)/cssclean-diction.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../diction.c' object='cssclean-diction.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-diction.obj `if test -f '../diction.c'; then $(CYGPATH_W) '../diction.c'; else $(CYGPATH_W) '$(srcdir)/../diction.c'; fi` cssclean-nodetree.o: ../nodetree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-nodetree.o -MD -MP -MF $(DEPDIR)/cssclean-nodetree.Tpo -c -o cssclean-nodetree.o `test -f '../nodetree.c' || echo '$(srcdir)/'`../nodetree.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-nodetree.Tpo $(DEPDIR)/cssclean-nodetree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../nodetree.c' object='cssclean-nodetree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-nodetree.o `test -f '../nodetree.c' || echo '$(srcdir)/'`../nodetree.c cssclean-nodetree.obj: ../nodetree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-nodetree.obj -MD -MP -MF $(DEPDIR)/cssclean-nodetree.Tpo -c -o cssclean-nodetree.obj `if test -f '../nodetree.c'; then $(CYGPATH_W) '../nodetree.c'; else $(CYGPATH_W) '$(srcdir)/../nodetree.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-nodetree.Tpo $(DEPDIR)/cssclean-nodetree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../nodetree.c' object='cssclean-nodetree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-nodetree.obj `if test -f '../nodetree.c'; then $(CYGPATH_W) '../nodetree.c'; else $(CYGPATH_W) '$(srcdir)/../nodetree.c'; fi` cssclean-hash_drv.o: ../hash_drv.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-hash_drv.o -MD -MP -MF $(DEPDIR)/cssclean-hash_drv.Tpo -c -o cssclean-hash_drv.o `test -f '../hash_drv.c' || echo '$(srcdir)/'`../hash_drv.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-hash_drv.Tpo $(DEPDIR)/cssclean-hash_drv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../hash_drv.c' object='cssclean-hash_drv.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-hash_drv.o `test -f '../hash_drv.c' || echo '$(srcdir)/'`../hash_drv.c cssclean-hash_drv.obj: ../hash_drv.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-hash_drv.obj -MD -MP -MF $(DEPDIR)/cssclean-hash_drv.Tpo -c -o cssclean-hash_drv.obj `if test -f '../hash_drv.c'; then $(CYGPATH_W) '../hash_drv.c'; else $(CYGPATH_W) '$(srcdir)/../hash_drv.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-hash_drv.Tpo $(DEPDIR)/cssclean-hash_drv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../hash_drv.c' object='cssclean-hash_drv.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-hash_drv.obj `if test -f '../hash_drv.c'; then $(CYGPATH_W) '../hash_drv.c'; else $(CYGPATH_W) '$(srcdir)/../hash_drv.c'; fi` cssclean-error.o: ../error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-error.o -MD -MP -MF $(DEPDIR)/cssclean-error.Tpo -c -o cssclean-error.o `test -f '../error.c' || echo '$(srcdir)/'`../error.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-error.Tpo $(DEPDIR)/cssclean-error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../error.c' object='cssclean-error.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-error.o `test -f '../error.c' || echo '$(srcdir)/'`../error.c cssclean-error.obj: ../error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-error.obj -MD -MP -MF $(DEPDIR)/cssclean-error.Tpo -c -o cssclean-error.obj `if test -f '../error.c'; then $(CYGPATH_W) '../error.c'; else $(CYGPATH_W) '$(srcdir)/../error.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-error.Tpo $(DEPDIR)/cssclean-error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../error.c' object='cssclean-error.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-error.obj `if test -f '../error.c'; then $(CYGPATH_W) '../error.c'; else $(CYGPATH_W) '$(srcdir)/../error.c'; fi` cssclean-config_shared.o: ../config_shared.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-config_shared.o -MD -MP -MF $(DEPDIR)/cssclean-config_shared.Tpo -c -o cssclean-config_shared.o `test -f '../config_shared.c' || echo '$(srcdir)/'`../config_shared.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-config_shared.Tpo $(DEPDIR)/cssclean-config_shared.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../config_shared.c' object='cssclean-config_shared.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-config_shared.o `test -f '../config_shared.c' || echo '$(srcdir)/'`../config_shared.c cssclean-config_shared.obj: ../config_shared.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-config_shared.obj -MD -MP -MF $(DEPDIR)/cssclean-config_shared.Tpo -c -o cssclean-config_shared.obj `if test -f '../config_shared.c'; then $(CYGPATH_W) '../config_shared.c'; else $(CYGPATH_W) '$(srcdir)/../config_shared.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-config_shared.Tpo $(DEPDIR)/cssclean-config_shared.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../config_shared.c' object='cssclean-config_shared.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-config_shared.obj `if test -f '../config_shared.c'; then $(CYGPATH_W) '../config_shared.c'; else $(CYGPATH_W) '$(srcdir)/../config_shared.c'; fi` cssclean-pref.o: ../pref.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-pref.o -MD -MP -MF $(DEPDIR)/cssclean-pref.Tpo -c -o cssclean-pref.o `test -f '../pref.c' || echo '$(srcdir)/'`../pref.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-pref.Tpo $(DEPDIR)/cssclean-pref.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../pref.c' object='cssclean-pref.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-pref.o `test -f '../pref.c' || echo '$(srcdir)/'`../pref.c cssclean-pref.obj: ../pref.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssclean-pref.obj -MD -MP -MF $(DEPDIR)/cssclean-pref.Tpo -c -o cssclean-pref.obj `if test -f '../pref.c'; then $(CYGPATH_W) '../pref.c'; else $(CYGPATH_W) '$(srcdir)/../pref.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssclean-pref.Tpo $(DEPDIR)/cssclean-pref.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../pref.c' object='cssclean-pref.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssclean_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssclean-pref.obj `if test -f '../pref.c'; then $(CYGPATH_W) '../pref.c'; else $(CYGPATH_W) '$(srcdir)/../pref.c'; fi` csscompress-csscompress.o: csscompress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-csscompress.o -MD -MP -MF $(DEPDIR)/csscompress-csscompress.Tpo -c -o csscompress-csscompress.o `test -f 'csscompress.c' || echo '$(srcdir)/'`csscompress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-csscompress.Tpo $(DEPDIR)/csscompress-csscompress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='csscompress.c' object='csscompress-csscompress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-csscompress.o `test -f 'csscompress.c' || echo '$(srcdir)/'`csscompress.c csscompress-csscompress.obj: csscompress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-csscompress.obj -MD -MP -MF $(DEPDIR)/csscompress-csscompress.Tpo -c -o csscompress-csscompress.obj `if test -f 'csscompress.c'; then $(CYGPATH_W) 'csscompress.c'; else $(CYGPATH_W) '$(srcdir)/csscompress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-csscompress.Tpo $(DEPDIR)/csscompress-csscompress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='csscompress.c' object='csscompress-csscompress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-csscompress.obj `if test -f 'csscompress.c'; then $(CYGPATH_W) 'csscompress.c'; else $(CYGPATH_W) '$(srcdir)/csscompress.c'; fi` csscompress-read_config.o: ../read_config.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-read_config.o -MD -MP -MF $(DEPDIR)/csscompress-read_config.Tpo -c -o csscompress-read_config.o `test -f '../read_config.c' || echo '$(srcdir)/'`../read_config.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-read_config.Tpo $(DEPDIR)/csscompress-read_config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../read_config.c' object='csscompress-read_config.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-read_config.o `test -f '../read_config.c' || echo '$(srcdir)/'`../read_config.c csscompress-read_config.obj: ../read_config.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-read_config.obj -MD -MP -MF $(DEPDIR)/csscompress-read_config.Tpo -c -o csscompress-read_config.obj `if test -f '../read_config.c'; then $(CYGPATH_W) '../read_config.c'; else $(CYGPATH_W) '$(srcdir)/../read_config.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-read_config.Tpo $(DEPDIR)/csscompress-read_config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../read_config.c' object='csscompress-read_config.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-read_config.obj `if test -f '../read_config.c'; then $(CYGPATH_W) '../read_config.c'; else $(CYGPATH_W) '$(srcdir)/../read_config.c'; fi` csscompress-util.o: ../util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-util.o -MD -MP -MF $(DEPDIR)/csscompress-util.Tpo -c -o csscompress-util.o `test -f '../util.c' || echo '$(srcdir)/'`../util.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-util.Tpo $(DEPDIR)/csscompress-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../util.c' object='csscompress-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-util.o `test -f '../util.c' || echo '$(srcdir)/'`../util.c csscompress-util.obj: ../util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-util.obj -MD -MP -MF $(DEPDIR)/csscompress-util.Tpo -c -o csscompress-util.obj `if test -f '../util.c'; then $(CYGPATH_W) '../util.c'; else $(CYGPATH_W) '$(srcdir)/../util.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-util.Tpo $(DEPDIR)/csscompress-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../util.c' object='csscompress-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-util.obj `if test -f '../util.c'; then $(CYGPATH_W) '../util.c'; else $(CYGPATH_W) '$(srcdir)/../util.c'; fi` csscompress-diction.o: ../diction.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-diction.o -MD -MP -MF $(DEPDIR)/csscompress-diction.Tpo -c -o csscompress-diction.o `test -f '../diction.c' || echo '$(srcdir)/'`../diction.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-diction.Tpo $(DEPDIR)/csscompress-diction.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../diction.c' object='csscompress-diction.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-diction.o `test -f '../diction.c' || echo '$(srcdir)/'`../diction.c csscompress-diction.obj: ../diction.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-diction.obj -MD -MP -MF $(DEPDIR)/csscompress-diction.Tpo -c -o csscompress-diction.obj `if test -f '../diction.c'; then $(CYGPATH_W) '../diction.c'; else $(CYGPATH_W) '$(srcdir)/../diction.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-diction.Tpo $(DEPDIR)/csscompress-diction.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../diction.c' object='csscompress-diction.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-diction.obj `if test -f '../diction.c'; then $(CYGPATH_W) '../diction.c'; else $(CYGPATH_W) '$(srcdir)/../diction.c'; fi` csscompress-nodetree.o: ../nodetree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-nodetree.o -MD -MP -MF $(DEPDIR)/csscompress-nodetree.Tpo -c -o csscompress-nodetree.o `test -f '../nodetree.c' || echo '$(srcdir)/'`../nodetree.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-nodetree.Tpo $(DEPDIR)/csscompress-nodetree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../nodetree.c' object='csscompress-nodetree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-nodetree.o `test -f '../nodetree.c' || echo '$(srcdir)/'`../nodetree.c csscompress-nodetree.obj: ../nodetree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-nodetree.obj -MD -MP -MF $(DEPDIR)/csscompress-nodetree.Tpo -c -o csscompress-nodetree.obj `if test -f '../nodetree.c'; then $(CYGPATH_W) '../nodetree.c'; else $(CYGPATH_W) '$(srcdir)/../nodetree.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-nodetree.Tpo $(DEPDIR)/csscompress-nodetree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../nodetree.c' object='csscompress-nodetree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-nodetree.obj `if test -f '../nodetree.c'; then $(CYGPATH_W) '../nodetree.c'; else $(CYGPATH_W) '$(srcdir)/../nodetree.c'; fi` csscompress-hash_drv.o: ../hash_drv.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-hash_drv.o -MD -MP -MF $(DEPDIR)/csscompress-hash_drv.Tpo -c -o csscompress-hash_drv.o `test -f '../hash_drv.c' || echo '$(srcdir)/'`../hash_drv.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-hash_drv.Tpo $(DEPDIR)/csscompress-hash_drv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../hash_drv.c' object='csscompress-hash_drv.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-hash_drv.o `test -f '../hash_drv.c' || echo '$(srcdir)/'`../hash_drv.c csscompress-hash_drv.obj: ../hash_drv.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-hash_drv.obj -MD -MP -MF $(DEPDIR)/csscompress-hash_drv.Tpo -c -o csscompress-hash_drv.obj `if test -f '../hash_drv.c'; then $(CYGPATH_W) '../hash_drv.c'; else $(CYGPATH_W) '$(srcdir)/../hash_drv.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-hash_drv.Tpo $(DEPDIR)/csscompress-hash_drv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../hash_drv.c' object='csscompress-hash_drv.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-hash_drv.obj `if test -f '../hash_drv.c'; then $(CYGPATH_W) '../hash_drv.c'; else $(CYGPATH_W) '$(srcdir)/../hash_drv.c'; fi` csscompress-error.o: ../error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-error.o -MD -MP -MF $(DEPDIR)/csscompress-error.Tpo -c -o csscompress-error.o `test -f '../error.c' || echo '$(srcdir)/'`../error.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-error.Tpo $(DEPDIR)/csscompress-error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../error.c' object='csscompress-error.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-error.o `test -f '../error.c' || echo '$(srcdir)/'`../error.c csscompress-error.obj: ../error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-error.obj -MD -MP -MF $(DEPDIR)/csscompress-error.Tpo -c -o csscompress-error.obj `if test -f '../error.c'; then $(CYGPATH_W) '../error.c'; else $(CYGPATH_W) '$(srcdir)/../error.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-error.Tpo $(DEPDIR)/csscompress-error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../error.c' object='csscompress-error.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-error.obj `if test -f '../error.c'; then $(CYGPATH_W) '../error.c'; else $(CYGPATH_W) '$(srcdir)/../error.c'; fi` csscompress-config_shared.o: ../config_shared.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-config_shared.o -MD -MP -MF $(DEPDIR)/csscompress-config_shared.Tpo -c -o csscompress-config_shared.o `test -f '../config_shared.c' || echo '$(srcdir)/'`../config_shared.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-config_shared.Tpo $(DEPDIR)/csscompress-config_shared.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../config_shared.c' object='csscompress-config_shared.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-config_shared.o `test -f '../config_shared.c' || echo '$(srcdir)/'`../config_shared.c csscompress-config_shared.obj: ../config_shared.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-config_shared.obj -MD -MP -MF $(DEPDIR)/csscompress-config_shared.Tpo -c -o csscompress-config_shared.obj `if test -f '../config_shared.c'; then $(CYGPATH_W) '../config_shared.c'; else $(CYGPATH_W) '$(srcdir)/../config_shared.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-config_shared.Tpo $(DEPDIR)/csscompress-config_shared.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../config_shared.c' object='csscompress-config_shared.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-config_shared.obj `if test -f '../config_shared.c'; then $(CYGPATH_W) '../config_shared.c'; else $(CYGPATH_W) '$(srcdir)/../config_shared.c'; fi` csscompress-pref.o: ../pref.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-pref.o -MD -MP -MF $(DEPDIR)/csscompress-pref.Tpo -c -o csscompress-pref.o `test -f '../pref.c' || echo '$(srcdir)/'`../pref.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-pref.Tpo $(DEPDIR)/csscompress-pref.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../pref.c' object='csscompress-pref.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-pref.o `test -f '../pref.c' || echo '$(srcdir)/'`../pref.c csscompress-pref.obj: ../pref.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT csscompress-pref.obj -MD -MP -MF $(DEPDIR)/csscompress-pref.Tpo -c -o csscompress-pref.obj `if test -f '../pref.c'; then $(CYGPATH_W) '../pref.c'; else $(CYGPATH_W) '$(srcdir)/../pref.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/csscompress-pref.Tpo $(DEPDIR)/csscompress-pref.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../pref.c' object='csscompress-pref.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(csscompress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o csscompress-pref.obj `if test -f '../pref.c'; then $(CYGPATH_W) '../pref.c'; else $(CYGPATH_W) '$(srcdir)/../pref.c'; fi` cssconvert-cssconvert.o: cssconvert.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-cssconvert.o -MD -MP -MF $(DEPDIR)/cssconvert-cssconvert.Tpo -c -o cssconvert-cssconvert.o `test -f 'cssconvert.c' || echo '$(srcdir)/'`cssconvert.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-cssconvert.Tpo $(DEPDIR)/cssconvert-cssconvert.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cssconvert.c' object='cssconvert-cssconvert.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-cssconvert.o `test -f 'cssconvert.c' || echo '$(srcdir)/'`cssconvert.c cssconvert-cssconvert.obj: cssconvert.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-cssconvert.obj -MD -MP -MF $(DEPDIR)/cssconvert-cssconvert.Tpo -c -o cssconvert-cssconvert.obj `if test -f 'cssconvert.c'; then $(CYGPATH_W) 'cssconvert.c'; else $(CYGPATH_W) '$(srcdir)/cssconvert.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-cssconvert.Tpo $(DEPDIR)/cssconvert-cssconvert.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cssconvert.c' object='cssconvert-cssconvert.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-cssconvert.obj `if test -f 'cssconvert.c'; then $(CYGPATH_W) 'cssconvert.c'; else $(CYGPATH_W) '$(srcdir)/cssconvert.c'; fi` cssconvert-read_config.o: ../read_config.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-read_config.o -MD -MP -MF $(DEPDIR)/cssconvert-read_config.Tpo -c -o cssconvert-read_config.o `test -f '../read_config.c' || echo '$(srcdir)/'`../read_config.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-read_config.Tpo $(DEPDIR)/cssconvert-read_config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../read_config.c' object='cssconvert-read_config.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-read_config.o `test -f '../read_config.c' || echo '$(srcdir)/'`../read_config.c cssconvert-read_config.obj: ../read_config.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-read_config.obj -MD -MP -MF $(DEPDIR)/cssconvert-read_config.Tpo -c -o cssconvert-read_config.obj `if test -f '../read_config.c'; then $(CYGPATH_W) '../read_config.c'; else $(CYGPATH_W) '$(srcdir)/../read_config.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-read_config.Tpo $(DEPDIR)/cssconvert-read_config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../read_config.c' object='cssconvert-read_config.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-read_config.obj `if test -f '../read_config.c'; then $(CYGPATH_W) '../read_config.c'; else $(CYGPATH_W) '$(srcdir)/../read_config.c'; fi` cssconvert-util.o: ../util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-util.o -MD -MP -MF $(DEPDIR)/cssconvert-util.Tpo -c -o cssconvert-util.o `test -f '../util.c' || echo '$(srcdir)/'`../util.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-util.Tpo $(DEPDIR)/cssconvert-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../util.c' object='cssconvert-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-util.o `test -f '../util.c' || echo '$(srcdir)/'`../util.c cssconvert-util.obj: ../util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-util.obj -MD -MP -MF $(DEPDIR)/cssconvert-util.Tpo -c -o cssconvert-util.obj `if test -f '../util.c'; then $(CYGPATH_W) '../util.c'; else $(CYGPATH_W) '$(srcdir)/../util.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-util.Tpo $(DEPDIR)/cssconvert-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../util.c' object='cssconvert-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-util.obj `if test -f '../util.c'; then $(CYGPATH_W) '../util.c'; else $(CYGPATH_W) '$(srcdir)/../util.c'; fi` cssconvert-diction.o: ../diction.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-diction.o -MD -MP -MF $(DEPDIR)/cssconvert-diction.Tpo -c -o cssconvert-diction.o `test -f '../diction.c' || echo '$(srcdir)/'`../diction.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-diction.Tpo $(DEPDIR)/cssconvert-diction.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../diction.c' object='cssconvert-diction.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-diction.o `test -f '../diction.c' || echo '$(srcdir)/'`../diction.c cssconvert-diction.obj: ../diction.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-diction.obj -MD -MP -MF $(DEPDIR)/cssconvert-diction.Tpo -c -o cssconvert-diction.obj `if test -f '../diction.c'; then $(CYGPATH_W) '../diction.c'; else $(CYGPATH_W) '$(srcdir)/../diction.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-diction.Tpo $(DEPDIR)/cssconvert-diction.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../diction.c' object='cssconvert-diction.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-diction.obj `if test -f '../diction.c'; then $(CYGPATH_W) '../diction.c'; else $(CYGPATH_W) '$(srcdir)/../diction.c'; fi` cssconvert-nodetree.o: ../nodetree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-nodetree.o -MD -MP -MF $(DEPDIR)/cssconvert-nodetree.Tpo -c -o cssconvert-nodetree.o `test -f '../nodetree.c' || echo '$(srcdir)/'`../nodetree.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-nodetree.Tpo $(DEPDIR)/cssconvert-nodetree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../nodetree.c' object='cssconvert-nodetree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-nodetree.o `test -f '../nodetree.c' || echo '$(srcdir)/'`../nodetree.c cssconvert-nodetree.obj: ../nodetree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-nodetree.obj -MD -MP -MF $(DEPDIR)/cssconvert-nodetree.Tpo -c -o cssconvert-nodetree.obj `if test -f '../nodetree.c'; then $(CYGPATH_W) '../nodetree.c'; else $(CYGPATH_W) '$(srcdir)/../nodetree.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-nodetree.Tpo $(DEPDIR)/cssconvert-nodetree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../nodetree.c' object='cssconvert-nodetree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-nodetree.obj `if test -f '../nodetree.c'; then $(CYGPATH_W) '../nodetree.c'; else $(CYGPATH_W) '$(srcdir)/../nodetree.c'; fi` cssconvert-hash_drv.o: ../hash_drv.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-hash_drv.o -MD -MP -MF $(DEPDIR)/cssconvert-hash_drv.Tpo -c -o cssconvert-hash_drv.o `test -f '../hash_drv.c' || echo '$(srcdir)/'`../hash_drv.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-hash_drv.Tpo $(DEPDIR)/cssconvert-hash_drv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../hash_drv.c' object='cssconvert-hash_drv.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-hash_drv.o `test -f '../hash_drv.c' || echo '$(srcdir)/'`../hash_drv.c cssconvert-hash_drv.obj: ../hash_drv.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-hash_drv.obj -MD -MP -MF $(DEPDIR)/cssconvert-hash_drv.Tpo -c -o cssconvert-hash_drv.obj `if test -f '../hash_drv.c'; then $(CYGPATH_W) '../hash_drv.c'; else $(CYGPATH_W) '$(srcdir)/../hash_drv.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-hash_drv.Tpo $(DEPDIR)/cssconvert-hash_drv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../hash_drv.c' object='cssconvert-hash_drv.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-hash_drv.obj `if test -f '../hash_drv.c'; then $(CYGPATH_W) '../hash_drv.c'; else $(CYGPATH_W) '$(srcdir)/../hash_drv.c'; fi` cssconvert-error.o: ../error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-error.o -MD -MP -MF $(DEPDIR)/cssconvert-error.Tpo -c -o cssconvert-error.o `test -f '../error.c' || echo '$(srcdir)/'`../error.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-error.Tpo $(DEPDIR)/cssconvert-error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../error.c' object='cssconvert-error.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-error.o `test -f '../error.c' || echo '$(srcdir)/'`../error.c cssconvert-error.obj: ../error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-error.obj -MD -MP -MF $(DEPDIR)/cssconvert-error.Tpo -c -o cssconvert-error.obj `if test -f '../error.c'; then $(CYGPATH_W) '../error.c'; else $(CYGPATH_W) '$(srcdir)/../error.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-error.Tpo $(DEPDIR)/cssconvert-error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../error.c' object='cssconvert-error.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-error.obj `if test -f '../error.c'; then $(CYGPATH_W) '../error.c'; else $(CYGPATH_W) '$(srcdir)/../error.c'; fi` cssconvert-config_shared.o: ../config_shared.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-config_shared.o -MD -MP -MF $(DEPDIR)/cssconvert-config_shared.Tpo -c -o cssconvert-config_shared.o `test -f '../config_shared.c' || echo '$(srcdir)/'`../config_shared.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-config_shared.Tpo $(DEPDIR)/cssconvert-config_shared.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../config_shared.c' object='cssconvert-config_shared.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-config_shared.o `test -f '../config_shared.c' || echo '$(srcdir)/'`../config_shared.c cssconvert-config_shared.obj: ../config_shared.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-config_shared.obj -MD -MP -MF $(DEPDIR)/cssconvert-config_shared.Tpo -c -o cssconvert-config_shared.obj `if test -f '../config_shared.c'; then $(CYGPATH_W) '../config_shared.c'; else $(CYGPATH_W) '$(srcdir)/../config_shared.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-config_shared.Tpo $(DEPDIR)/cssconvert-config_shared.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../config_shared.c' object='cssconvert-config_shared.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-config_shared.obj `if test -f '../config_shared.c'; then $(CYGPATH_W) '../config_shared.c'; else $(CYGPATH_W) '$(srcdir)/../config_shared.c'; fi` cssconvert-pref.o: ../pref.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-pref.o -MD -MP -MF $(DEPDIR)/cssconvert-pref.Tpo -c -o cssconvert-pref.o `test -f '../pref.c' || echo '$(srcdir)/'`../pref.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-pref.Tpo $(DEPDIR)/cssconvert-pref.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../pref.c' object='cssconvert-pref.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-pref.o `test -f '../pref.c' || echo '$(srcdir)/'`../pref.c cssconvert-pref.obj: ../pref.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssconvert-pref.obj -MD -MP -MF $(DEPDIR)/cssconvert-pref.Tpo -c -o cssconvert-pref.obj `if test -f '../pref.c'; then $(CYGPATH_W) '../pref.c'; else $(CYGPATH_W) '$(srcdir)/../pref.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssconvert-pref.Tpo $(DEPDIR)/cssconvert-pref.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../pref.c' object='cssconvert-pref.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssconvert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssconvert-pref.obj `if test -f '../pref.c'; then $(CYGPATH_W) '../pref.c'; else $(CYGPATH_W) '$(srcdir)/../pref.c'; fi` cssstat-cssstat.o: cssstat.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-cssstat.o -MD -MP -MF $(DEPDIR)/cssstat-cssstat.Tpo -c -o cssstat-cssstat.o `test -f 'cssstat.c' || echo '$(srcdir)/'`cssstat.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-cssstat.Tpo $(DEPDIR)/cssstat-cssstat.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cssstat.c' object='cssstat-cssstat.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-cssstat.o `test -f 'cssstat.c' || echo '$(srcdir)/'`cssstat.c cssstat-cssstat.obj: cssstat.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-cssstat.obj -MD -MP -MF $(DEPDIR)/cssstat-cssstat.Tpo -c -o cssstat-cssstat.obj `if test -f 'cssstat.c'; then $(CYGPATH_W) 'cssstat.c'; else $(CYGPATH_W) '$(srcdir)/cssstat.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-cssstat.Tpo $(DEPDIR)/cssstat-cssstat.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cssstat.c' object='cssstat-cssstat.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-cssstat.obj `if test -f 'cssstat.c'; then $(CYGPATH_W) 'cssstat.c'; else $(CYGPATH_W) '$(srcdir)/cssstat.c'; fi` cssstat-read_config.o: ../read_config.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-read_config.o -MD -MP -MF $(DEPDIR)/cssstat-read_config.Tpo -c -o cssstat-read_config.o `test -f '../read_config.c' || echo '$(srcdir)/'`../read_config.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-read_config.Tpo $(DEPDIR)/cssstat-read_config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../read_config.c' object='cssstat-read_config.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-read_config.o `test -f '../read_config.c' || echo '$(srcdir)/'`../read_config.c cssstat-read_config.obj: ../read_config.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-read_config.obj -MD -MP -MF $(DEPDIR)/cssstat-read_config.Tpo -c -o cssstat-read_config.obj `if test -f '../read_config.c'; then $(CYGPATH_W) '../read_config.c'; else $(CYGPATH_W) '$(srcdir)/../read_config.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-read_config.Tpo $(DEPDIR)/cssstat-read_config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../read_config.c' object='cssstat-read_config.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-read_config.obj `if test -f '../read_config.c'; then $(CYGPATH_W) '../read_config.c'; else $(CYGPATH_W) '$(srcdir)/../read_config.c'; fi` cssstat-util.o: ../util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-util.o -MD -MP -MF $(DEPDIR)/cssstat-util.Tpo -c -o cssstat-util.o `test -f '../util.c' || echo '$(srcdir)/'`../util.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-util.Tpo $(DEPDIR)/cssstat-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../util.c' object='cssstat-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-util.o `test -f '../util.c' || echo '$(srcdir)/'`../util.c cssstat-util.obj: ../util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-util.obj -MD -MP -MF $(DEPDIR)/cssstat-util.Tpo -c -o cssstat-util.obj `if test -f '../util.c'; then $(CYGPATH_W) '../util.c'; else $(CYGPATH_W) '$(srcdir)/../util.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-util.Tpo $(DEPDIR)/cssstat-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../util.c' object='cssstat-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-util.obj `if test -f '../util.c'; then $(CYGPATH_W) '../util.c'; else $(CYGPATH_W) '$(srcdir)/../util.c'; fi` cssstat-diction.o: ../diction.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-diction.o -MD -MP -MF $(DEPDIR)/cssstat-diction.Tpo -c -o cssstat-diction.o `test -f '../diction.c' || echo '$(srcdir)/'`../diction.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-diction.Tpo $(DEPDIR)/cssstat-diction.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../diction.c' object='cssstat-diction.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-diction.o `test -f '../diction.c' || echo '$(srcdir)/'`../diction.c cssstat-diction.obj: ../diction.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-diction.obj -MD -MP -MF $(DEPDIR)/cssstat-diction.Tpo -c -o cssstat-diction.obj `if test -f '../diction.c'; then $(CYGPATH_W) '../diction.c'; else $(CYGPATH_W) '$(srcdir)/../diction.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-diction.Tpo $(DEPDIR)/cssstat-diction.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../diction.c' object='cssstat-diction.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-diction.obj `if test -f '../diction.c'; then $(CYGPATH_W) '../diction.c'; else $(CYGPATH_W) '$(srcdir)/../diction.c'; fi` cssstat-nodetree.o: ../nodetree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-nodetree.o -MD -MP -MF $(DEPDIR)/cssstat-nodetree.Tpo -c -o cssstat-nodetree.o `test -f '../nodetree.c' || echo '$(srcdir)/'`../nodetree.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-nodetree.Tpo $(DEPDIR)/cssstat-nodetree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../nodetree.c' object='cssstat-nodetree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-nodetree.o `test -f '../nodetree.c' || echo '$(srcdir)/'`../nodetree.c cssstat-nodetree.obj: ../nodetree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-nodetree.obj -MD -MP -MF $(DEPDIR)/cssstat-nodetree.Tpo -c -o cssstat-nodetree.obj `if test -f '../nodetree.c'; then $(CYGPATH_W) '../nodetree.c'; else $(CYGPATH_W) '$(srcdir)/../nodetree.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-nodetree.Tpo $(DEPDIR)/cssstat-nodetree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../nodetree.c' object='cssstat-nodetree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-nodetree.obj `if test -f '../nodetree.c'; then $(CYGPATH_W) '../nodetree.c'; else $(CYGPATH_W) '$(srcdir)/../nodetree.c'; fi` cssstat-hash_drv.o: ../hash_drv.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-hash_drv.o -MD -MP -MF $(DEPDIR)/cssstat-hash_drv.Tpo -c -o cssstat-hash_drv.o `test -f '../hash_drv.c' || echo '$(srcdir)/'`../hash_drv.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-hash_drv.Tpo $(DEPDIR)/cssstat-hash_drv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../hash_drv.c' object='cssstat-hash_drv.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-hash_drv.o `test -f '../hash_drv.c' || echo '$(srcdir)/'`../hash_drv.c cssstat-hash_drv.obj: ../hash_drv.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-hash_drv.obj -MD -MP -MF $(DEPDIR)/cssstat-hash_drv.Tpo -c -o cssstat-hash_drv.obj `if test -f '../hash_drv.c'; then $(CYGPATH_W) '../hash_drv.c'; else $(CYGPATH_W) '$(srcdir)/../hash_drv.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-hash_drv.Tpo $(DEPDIR)/cssstat-hash_drv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../hash_drv.c' object='cssstat-hash_drv.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-hash_drv.obj `if test -f '../hash_drv.c'; then $(CYGPATH_W) '../hash_drv.c'; else $(CYGPATH_W) '$(srcdir)/../hash_drv.c'; fi` cssstat-error.o: ../error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-error.o -MD -MP -MF $(DEPDIR)/cssstat-error.Tpo -c -o cssstat-error.o `test -f '../error.c' || echo '$(srcdir)/'`../error.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-error.Tpo $(DEPDIR)/cssstat-error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../error.c' object='cssstat-error.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-error.o `test -f '../error.c' || echo '$(srcdir)/'`../error.c cssstat-error.obj: ../error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-error.obj -MD -MP -MF $(DEPDIR)/cssstat-error.Tpo -c -o cssstat-error.obj `if test -f '../error.c'; then $(CYGPATH_W) '../error.c'; else $(CYGPATH_W) '$(srcdir)/../error.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-error.Tpo $(DEPDIR)/cssstat-error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../error.c' object='cssstat-error.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-error.obj `if test -f '../error.c'; then $(CYGPATH_W) '../error.c'; else $(CYGPATH_W) '$(srcdir)/../error.c'; fi` cssstat-config_shared.o: ../config_shared.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-config_shared.o -MD -MP -MF $(DEPDIR)/cssstat-config_shared.Tpo -c -o cssstat-config_shared.o `test -f '../config_shared.c' || echo '$(srcdir)/'`../config_shared.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-config_shared.Tpo $(DEPDIR)/cssstat-config_shared.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../config_shared.c' object='cssstat-config_shared.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-config_shared.o `test -f '../config_shared.c' || echo '$(srcdir)/'`../config_shared.c cssstat-config_shared.obj: ../config_shared.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-config_shared.obj -MD -MP -MF $(DEPDIR)/cssstat-config_shared.Tpo -c -o cssstat-config_shared.obj `if test -f '../config_shared.c'; then $(CYGPATH_W) '../config_shared.c'; else $(CYGPATH_W) '$(srcdir)/../config_shared.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-config_shared.Tpo $(DEPDIR)/cssstat-config_shared.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../config_shared.c' object='cssstat-config_shared.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-config_shared.obj `if test -f '../config_shared.c'; then $(CYGPATH_W) '../config_shared.c'; else $(CYGPATH_W) '$(srcdir)/../config_shared.c'; fi` cssstat-pref.o: ../pref.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-pref.o -MD -MP -MF $(DEPDIR)/cssstat-pref.Tpo -c -o cssstat-pref.o `test -f '../pref.c' || echo '$(srcdir)/'`../pref.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-pref.Tpo $(DEPDIR)/cssstat-pref.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../pref.c' object='cssstat-pref.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-pref.o `test -f '../pref.c' || echo '$(srcdir)/'`../pref.c cssstat-pref.obj: ../pref.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cssstat-pref.obj -MD -MP -MF $(DEPDIR)/cssstat-pref.Tpo -c -o cssstat-pref.obj `if test -f '../pref.c'; then $(CYGPATH_W) '../pref.c'; else $(CYGPATH_W) '$(srcdir)/../pref.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cssstat-pref.Tpo $(DEPDIR)/cssstat-pref.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../pref.c' object='cssstat-pref.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cssstat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cssstat-pref.obj `if test -f '../pref.c'; then $(CYGPATH_W) '../pref.c'; else $(CYGPATH_W) '$(srcdir)/../pref.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/src/tools.hash_drv/cssstat.c0000644000175000017500000000765411741351001020537 0ustar julienjulien/* $Id: cssstat.c,v 1.86 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* cssstat.c - Print hash file statistics */ #define READ_ATTRIB(A) _ds_read_attribute(agent_config, A) #define MATCH_ATTRIB(A, B) _ds_match_attribute(agent_config, A, B) #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif int DO_DEBUG #ifdef DEBUG = 1 #else = 0 #endif ; #include "read_config.h" #include "hash_drv.h" #include "language.h" #include "error.h" #define SYNTAX "syntax: cssstat [filename]" int cssstat(const char *filename); int main(int argc, char *argv[]) { char *filename; int r; if (argc<2) { fprintf(stderr, "%s\n", SYNTAX); exit(EXIT_FAILURE); } agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); exit(EXIT_FAILURE); } filename = argv[1]; r = cssstat(filename); if (r) { fprintf(stderr, "cssstat failed on error %d\n", r); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); } int cssstat(const char *filename) { struct _hash_drv_map map; hash_drv_header_t header; hash_drv_spam_record_t rec; unsigned long filepos = sizeof(struct _hash_drv_header); unsigned long nfree = 0, nused = 0; unsigned long efree, eused; unsigned long extents = 0; unsigned long i; unsigned long max_seek = HASH_SEEK_MAX; unsigned long max_extents = 0; unsigned long extent_size = HASH_EXTENT_MAX; int flags = 0; if (READ_ATTRIB("HashExtentSize")) extent_size = strtol(READ_ATTRIB("HashExtentSize"), NULL, 0); if (READ_ATTRIB("HashMaxExtents")) max_extents = strtol(READ_ATTRIB("HashMaxExtents"), NULL, 0); if (MATCH_ATTRIB("HashAutoExtend", "on")) flags = HMAP_AUTOEXTEND; if (READ_ATTRIB("HashMaxSeek")) max_seek = strtol(READ_ATTRIB("HashMaxSeek"), NULL, 0); if (_hash_drv_open(filename, &map, 0, max_seek, max_extents, extent_size, 0, flags)) { return EFAILURE; } header = map.addr; printf("filename %s length %ld\n", filename, (long) map.file_len); while(filepos < map.file_len) { printf("extent %lu: record length %lu\n", extents, (unsigned long) header->hash_rec_max); efree = eused = 0; for(i=0;ihash_rec_max;i++) { rec = (void *) ((unsigned long) map.addr + filepos); if (rec->hashcode) { eused++; nused++; } else { efree++; nfree++; } filepos += sizeof(struct _hash_drv_spam_record); } header = (void *) ((unsigned long) map.addr + filepos); filepos += sizeof(struct _hash_drv_header); extents++; printf("\textent records used %lu\n", eused); printf("\textent records free %lu\n", efree); } _hash_drv_close(&map); printf("total database records used %lu\n", nused); printf("total database records free %lu\n", nfree); printf("total extents %lu\n", extents); return 0; } dspam-3.10.2+dfsg/src/tools.hash_drv/cssclean.c0000644000175000017500000001407311741351001020637 0ustar julienjulien/* $Id: cssclean.c,v 1.138 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* cssclean.c - rebuild a hash database, omitting hapaxes */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #define READ_ATTRIB(A) _ds_read_attribute(agent_config, A) #define MATCH_ATTRIB(A, B) _ds_match_attribute(agent_config, A, B) int DO_DEBUG #ifdef DEBUG = 1 #else = 0 #endif ; #include "read_config.h" #include "hash_drv.h" #include "error.h" #include "language.h" #define SYNTAX "syntax: cssclean [filename]" int cssclean(const char *filename, int heavy); int main(int argc, char *argv[]) { int r; int heavy=0; if (argc<2) { fprintf(stderr, "%s\n", SYNTAX); exit(EXIT_FAILURE); } if ( (argc>=3) && (!strcmp(argv[2], "heavy") ) )heavy=1; agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); exit(EXIT_FAILURE); } r = cssclean(argv[1], heavy); if (r) { fprintf(stderr, "cssclean failed on error %d\n", r); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); } int cssclean(const char *filename, int heavy) { unsigned long i; hash_drv_header_t header; FILE* lockfile = NULL; void *offset; struct _hash_drv_map old, new; hash_drv_spam_record_t rec; unsigned long filepos; char *dir = NULL; char newfile[512]; struct stat st; unsigned long spam, nonspam, cntr; int drop, prb; char *filenamecopy; unsigned long hash_rec_max = HASH_REC_MAX; unsigned long max_seek = HASH_SEEK_MAX; unsigned long max_extents = 0; unsigned long extent_size = HASH_EXTENT_MAX; int pctincrease = 0; int flags = 0; int rc = EFAILURE; if (READ_ATTRIB("HashRecMax")) hash_rec_max = strtol(READ_ATTRIB("HashRecMax"), NULL, 0); if (READ_ATTRIB("HashExtentSize")) extent_size = strtol(READ_ATTRIB("HashExtentSize"), NULL, 0); if (READ_ATTRIB("HashMaxExtents")) max_extents = strtol(READ_ATTRIB("HashMaxExtents"), NULL, 0); if (READ_ATTRIB("HashPctIncrease")) { pctincrease = atoi(READ_ATTRIB("HashPctIncrease")); if (pctincrease > 100) { LOG(LOG_ERR, "HashPctIncrease out of range; ignoring"); pctincrease = 0; } } if (MATCH_ATTRIB("HashAutoExtend", "on")) flags = HMAP_AUTOEXTEND; if (READ_ATTRIB("HashMaxSeek")) max_seek = strtol(READ_ATTRIB("HashMaxSeek"), NULL, 0); if (stat(filename, &st) < 0) return EFAILURE; /* create a temporary file name */ dir = strdup(filename); if (dir == NULL) goto end; filenamecopy = strdup(filename); if (filenamecopy == NULL) goto end; snprintf(newfile, sizeof(newfile), "/%s/.dspam%u.css", dirname((char *) filenamecopy), (unsigned int) getpid()); lockfile = _hash_tools_lock_get (filename); if (lockfile == NULL) goto end; if (_hash_drv_open(filename, &old, 0, max_seek, max_extents, extent_size, pctincrease, flags)) goto end; if (_hash_drv_open(newfile, &new, hash_rec_max, max_seek, max_extents, extent_size, pctincrease, flags)) { _hash_drv_close(&old); goto end; } /* preserve counters */ memcpy(new.header, old.header, sizeof(*new.header)); if (fchown(new.fd, st.st_uid, st.st_gid) < 0) { _hash_drv_close(&new); _hash_drv_close(&old); unlink(newfile); goto end; } if (fchmod(new.fd, st.st_mode) < 0) { _hash_drv_close(&new); _hash_drv_close(&old); unlink(newfile); goto end; } filepos = sizeof(struct _hash_drv_header); header = old.addr; while(filepos < old.file_len) { for(i=0;ihash_rec_max;i++) { rec = (void *)((unsigned long) old.addr + filepos); nonspam = rec->nonspam & 0x0fffffff; spam = rec->spam & 0x0fffffff; cntr = ((rec->nonspam>>28) & 0x0f) | ((rec->spam>>24) & 0xf0); if(cntr<255)cntr++; rec->nonspam=nonspam|((cntr&0x0f)<<28); rec->spam=spam|((cntr&0xf0)<<24); if(nonspam+spam>0) prb=(abs(nonspam-spam)*1000)/(nonspam+spam); else prb=1000; drop=0; if(heavy) { if( (nonspam+spam<=1) || (prb<100) )drop=1; } else { if( ((nonspam*2+spam<5)&&(cntr>60)) || ((nonspam+spam<=1)&&(cntr>15)) || ((prb<200)&&(cntr>15)) || (cntr>120) ) drop=1; } if (rec->hashcode && !drop) { if (_hash_drv_set_spamrecord(&new, rec, 0)) { LOG(LOG_WARNING, "aborting on error"); _hash_drv_close(&new); _hash_drv_close(&old); unlink(newfile); goto end; } } filepos += sizeof(struct _hash_drv_spam_record); } offset = (void *)((unsigned long) old.addr + filepos); header = offset; filepos += sizeof(struct _hash_drv_header); } bcopy (old.header, new.header, sizeof(struct _hash_drv_header)); _hash_drv_close(&new); _hash_drv_close(&old); if (rename(newfile, filename) < 0) goto end; rc = 0; end: free(dir); _hash_tools_lock_free(filename, lockfile); return rc; } dspam-3.10.2+dfsg/src/tools.hash_drv/cssconvert.c0000644000175000017500000001112111741351001021224 0ustar julienjulien/* $Id: cssconvert.c,v 1.626 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* cssconvert.c - convert a v3.6.0 hash database to v3.6.1 (which includes * 8-byte alignment for 64-bit systems */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #define READ_ATTRIB(A) _ds_read_attribute(agent_config, A) #define MATCH_ATTRIB(A, B) _ds_match_attribute(agent_config, A, B) int DO_DEBUG #ifdef DEBUG = 1 #else = 0 #endif ; #include "read_config.h" #include "hash_drv.h" #include "error.h" #include "language.h" #define SYNTAX "syntax: cssconvert [filename]" typedef struct _old_hash_drv_header { unsigned long hash_rec_max; struct _ds_spam_totals totals; } *old_hash_drv_header_t; int cssconvert(const char *filename); int main(int argc, char *argv[]) { int r; if (argc<2) { fprintf(stderr, "%s\n", SYNTAX); exit(EXIT_FAILURE); } agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); exit(EXIT_FAILURE); } r = cssconvert(argv[1]); if (r) { fprintf(stderr, "cssconvert failed on error %d\n", r); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); } int cssconvert(const char *filename) { unsigned long i; hash_drv_header_t header; void *offset; struct _hash_drv_map old, new; hash_drv_spam_record_t rec; unsigned long filepos; char newfile[128]; char *filenamecopy; unsigned long hash_rec_max = HASH_REC_MAX; unsigned long max_seek = HASH_SEEK_MAX; unsigned long max_extents = 0; unsigned long extent_size = HASH_EXTENT_MAX; int pctincrease = 0; int flags = 0; if (READ_ATTRIB("HashRecMax")) hash_rec_max = strtol(READ_ATTRIB("HashRecMax"), NULL, 0); if (READ_ATTRIB("HashExtentSize")) extent_size = strtol(READ_ATTRIB("HashExtentSize"), NULL, 0); if (READ_ATTRIB("HashMaxExtents")) max_extents = strtol(READ_ATTRIB("HashMaxExtents"), NULL, 0); if (MATCH_ATTRIB("HashAutoExtend", "on")) flags = HMAP_AUTOEXTEND; if (READ_ATTRIB("HashMaxSeek")) max_seek = strtol(READ_ATTRIB("HashMaxSeek"), NULL, 0); if (READ_ATTRIB("HashPctIncrease")) { pctincrease = atoi(READ_ATTRIB("HashPctIncrease")); if (pctincrease > 100) { LOG(LOG_ERR, "HashPctIncrease out of range; ignoring"); pctincrease = 0; } } filenamecopy = strdup(filename); if (filenamecopy == NULL) return EFAILURE; snprintf(newfile, sizeof(newfile), "/%s/.dspam%u.css", dirname((char *)filenamecopy), (unsigned int) getpid()); if (_hash_drv_open(filename, &old, 0, max_seek, max_extents, extent_size, pctincrease, flags)) { return EFAILURE; } if (_hash_drv_open(newfile, &new, hash_rec_max, max_seek, max_extents, extent_size, pctincrease, flags)) { _hash_drv_close(&old); return EFAILURE; } filepos = sizeof(struct _old_hash_drv_header); header = old.addr; while(filepos < old.file_len) { for(i=0;ihash_rec_max;i++) { rec = (void *)((unsigned long) old.addr + filepos); if (_hash_drv_set_spamrecord(&new, rec, 0)) { LOG(LOG_WARNING, "aborting on error"); _hash_drv_close(&new); _hash_drv_close(&old); unlink(newfile); return EFAILURE; } filepos += sizeof(struct _hash_drv_spam_record); } offset = (void *)((unsigned long) old.addr + filepos); header = offset; filepos += sizeof(struct _old_hash_drv_header); } _hash_drv_close(&new); _hash_drv_close(&old); rename(newfile, filename); return 0; } dspam-3.10.2+dfsg/src/tools.hash_drv/csscompress.c0000644000175000017500000001274611741351001021415 0ustar julienjulien/* $Id: csscompress.c,v 1.838 2011/11/16 00:19:14 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* csscompress.c - Compress a hash database's extents */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #define READ_ATTRIB(A) _ds_read_attribute(agent_config, A) #define MATCH_ATTRIB(A, B) _ds_match_attribute(agent_config, A, B) int DO_DEBUG #ifdef DEBUG = 1 #else = 0 #endif ; #include "read_config.h" #include "hash_drv.h" #include "error.h" #include "language.h" #define SYNTAX "syntax: csscompress [filename]" int csscompress(const char *filename); int main(int argc, char *argv[]) { int r; if (argc<2) { fprintf(stderr, "%s\n", SYNTAX); exit(EXIT_FAILURE); } agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); exit(EXIT_FAILURE); } r = csscompress(argv[1]); if (r) { fprintf(stderr, "csscompress failed on error %d\n", r); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); } int csscompress(const char *filename) { unsigned long i; hash_drv_header_t header; void *offset; unsigned long reclen, extent = 0; struct _hash_drv_map old, new; hash_drv_spam_record_t rec; unsigned long filepos; char newfile[128]; struct stat st; char *filenamecopy; unsigned long max_seek = HASH_SEEK_MAX; unsigned long max_extents = 0; unsigned long extent_size = HASH_EXTENT_MAX; int pctincrease = 0; int flags = 0; if (READ_ATTRIB("HashExtentSize")) extent_size = strtol(READ_ATTRIB("HashExtentSize"), NULL, 0); if (READ_ATTRIB("HashMaxExtents")) max_extents = strtol(READ_ATTRIB("HashMaxExtents"), NULL, 0); if (MATCH_ATTRIB("HashAutoExtend", "on")) flags = HMAP_AUTOEXTEND; if (READ_ATTRIB("HashMaxSeek")) max_seek = strtol(READ_ATTRIB("HashMaxSeek"), NULL, 0); if (READ_ATTRIB("HashPctIncrease")) { pctincrease = atoi(READ_ATTRIB("HashPctIncrease")); if (pctincrease > 100) { LOG(LOG_ERR, "HashPctIncrease out of range; ignoring"); pctincrease = 0; } } filenamecopy = strdup(filename); if (filenamecopy == NULL) return EFAILURE; snprintf(newfile, sizeof(newfile), "/%s/.dspam%u.css", dirname((char *)filenamecopy), (unsigned int) getpid()); if (stat(filename, &st) < 0) return EFAILURE; if (_hash_drv_open(filename, &old, 0, max_seek, max_extents, extent_size, pctincrease, flags)) { return EFAILURE; } /* determine total record length */ header = old.addr; reclen = 0; while((unsigned long) header < (unsigned long) ((unsigned long) old.addr + old.file_len)) { unsigned long max = header->hash_rec_max; reclen += max; offset = header; offset = (void *)((unsigned long) offset + sizeof(struct _hash_drv_header)); max *= sizeof(struct _hash_drv_spam_record); offset = (void *)((unsigned long) offset + max); header = offset; } if (_hash_drv_open(newfile, &new, reclen, max_seek, max_extents, extent_size, pctincrease, flags)) { _hash_drv_close(&old); return EFAILURE; } /* preserve counters, permissions, and ownership */ memcpy(&(new.header->totals), &(old.header->totals), sizeof(new.header->totals)); if (fchown(new.fd, st.st_uid, st.st_gid) < 0) { _hash_drv_close(&new); _hash_drv_close(&old); unlink(newfile); return EFAILURE; } if (fchmod(new.fd, st.st_mode) < 0) { _hash_drv_close(&new); _hash_drv_close(&old); unlink(newfile); return EFAILURE; } filepos = sizeof(struct _hash_drv_header); header = old.addr; while(filepos < old.file_len) { printf("compressing %lu records in extent %lu\n", header->hash_rec_max, extent); extent++; for(i=0;ihash_rec_max;i++) { rec = (void *)((unsigned long) old.addr + filepos); if (rec->hashcode) { if (_hash_drv_set_spamrecord(&new, rec, 0)) { LOG(LOG_WARNING, "aborting on error"); _hash_drv_close(&new); _hash_drv_close(&old); unlink(newfile); return EFAILURE; } } filepos += sizeof(struct _hash_drv_spam_record); } offset = (void *)((unsigned long) old.addr + filepos); header = offset; filepos += sizeof(struct _hash_drv_header); } _hash_drv_close(&new); _hash_drv_close(&old); if (rename(newfile, filename)) fprintf(stderr, "rename(%s, %s): %s\n", newfile, filename, strerror(errno)); return 0; } dspam-3.10.2+dfsg/src/tools.pgsql_drv/0000755000175000017500000000000011745313541017111 5ustar julienjuliendspam-3.10.2+dfsg/src/tools.pgsql_drv/purge.sql0000644000175000017500000000130211622570546020754 0ustar julienjulien/* $Id: purge.sql,v 1.52 2010/04/21 11:30:39 sbajic Exp $ */ START TRANSACTION; DELETE FROM dspam_token_data WHERE (innocent_hits*2) + spam_hits < 5 AND last_hit < CURRENT_DATE - 30; COMMIT; START TRANSACTION; DELETE FROM dspam_token_data WHERE ((innocent_hits=1 AND spam_hits=0) OR (innocent_hits=0 AND spam_hits=1)) AND last_hit < CURRENT_DATE - 15; COMMIT; START TRANSACTION; DELETE FROM dspam_token_data WHERE last_hit < CURRENT_DATE - 90; COMMIT; START TRANSACTION; DELETE FROM dspam_signature_data WHERE created_on < CURRENT_DATE - 14; COMMIT; VACUUM ANALYSE dspam_token_data; VACUUM ANALYSE dspam_signature_data; REINDEX TABLE dspam_token_data; REINDEX TABLE dspam_signature_data; dspam-3.10.2+dfsg/src/tools.pgsql_drv/purge-pe.sql0000644000175000017500000000215111622570546021361 0ustar julienjulien/* $Id: purge-pe.sql,v 1.52 2010/04/21 11:30:04 sbajic Exp $ */ START TRANSACTION; DELETE FROM dspam_token_data WHERE (innocent_hits*2) + spam_hits < 5 AND last_hit < CURRENT_DATE - 30; COMMIT; START TRANSACTION; DELETE FROM dspam_token_data WHERE ((innocent_hits=1 AND spam_hits=0) OR (innocent_hits=0 AND spam_hits=1)) AND last_hit < CURRENT_DATE - 15; COMMIT; START TRANSACTION; DELETE FROM dspam_token_data WHERE last_hit < CURRENT_DATE - 90 AND uid NOT IN (SELECT uid FROM dspam_preferences WHERE preference = 'trainingMode' AND UPPER(value) IN('TOE','TUM','NOTRAIN')); COMMIT; START TRANSACTION; DELETE FROM dspam_token_data WHERE uid IN (SELECT uid FROM dspam_preferences WHERE preference = 'trainingMode' AND UPPER(value) = 'TUM') AND last_hit < CURRENT_DATE - 90 AND innocent_hits + spam_hits < 50 AND uid IS NOT NULL; COMMIT; START TRANSACTION; DELETE FROM dspam_signature_data WHERE created_on < CURRENT_DATE - 14; COMMIT; VACUUM ANALYSE dspam_token_data; VACUUM ANALYSE dspam_signature_data; REINDEX TABLE dspam_token_data; REINDEX TABLE dspam_signature_data; dspam-3.10.2+dfsg/src/tools.pgsql_drv/virtual_users.sql0000644000175000017500000000060611622570546022547 0ustar julienjulien/* $Id: virtual_users.sql,v 1.11 2009/06/01 15:45:15 sbajic Exp $ */ CREATE SEQUENCE dspam_virtual_uids_seq; CREATE TABLE dspam_virtual_uids ( uid int 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); dspam-3.10.2+dfsg/src/tools.pgsql_drv/dspam_pg2int8.c0000644000175000017500000002506311741351001021727 0ustar julienjulien/* $Id: dspam_pg2int8.c,v 1.15 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include "libdspam.h" #include "util.h" #include "read_config.h" #include "config_api.h" #include "language.h" #include "storage_driver.h" #include "pgsql_drv.h" DSPAM_CTX *open_ctx, *open_mtx; int opt_humanfriendly; void dieout (int signal); void usage (void); void GenSQL (PGconn *dbh,const char *file); void OutputMessage(DSPAM_CTX *open_ctx,char *sqlfile); #ifndef PATH_MAX # define PATH_MAX 1024 #endif /* ** Type OIDs; values come from postgresql/include/server/catalog/pg_type.h */ #ifndef NUMERICOID # define NUMERICOID 1700 #endif #ifndef INT8OID # define INT8OID 20 #endif #define BIGINTOID INT8OID int main (int argc, char **argv) { #ifndef _WIN32 #ifdef TRUSTED_USER_SECURITY struct passwd *p = getpwuid (getuid ()); #endif #endif struct _pgsql_drv_storage *store; char file[PATH_MAX+1]; int i, ch; #ifndef HAVE_GETOPT int optind = 1; #endif /* Read dspam.conf */ agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); exit(EXIT_FAILURE); } if (!_ds_read_attribute(agent_config, "Home")) { LOG(LOG_ERR, ERR_AGENT_DSPAM_HOME); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } #ifndef _WIN32 #ifdef TRUSTED_USER_SECURITY if (!_ds_match_attribute(agent_config, "Trust", p->pw_name) && p->pw_uid) { fprintf(stderr, ERR_TRUSTED_MODE "\n"); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } #endif #endif for(i=0;istorage); GenSQL(store->dbh,file); //PQfinish(store->dbh); OutputMessage(open_ctx,file); if (open_ctx != NULL) dspam_destroy (open_ctx); if (open_mtx != NULL) dspam_destroy (open_mtx); _ds_destroy_config(agent_config); exit (EXIT_SUCCESS); } #define TOKEN_TYPE_LEN 20 #define TOKEN_DATA_LEN 30 void GenSQL (PGconn *dbh,const char *file) { int i,ntuples; int reverse=0; int type_check=0; int preamble=0; PGresult *result; Oid col_type; FILE *out; char token_data[TOKEN_DATA_LEN+1]; char token_type[TOKEN_TYPE_LEN+1]; unsigned long long token; memset((void *)token_type, 0, TOKEN_TYPE_LEN+1); memset((void *)token_data, 0, TOKEN_DATA_LEN+1); if (strncmp(file,"-",1)==0) { out=stdout; } else { if ( (out = fopen(file,"w+")) == NULL ) { fprintf(stderr, "Failed to open file %s for writing - %s\n", file, strerror(errno)); PQfinish(dbh); exit(EXIT_FAILURE); } } result = PQexec(dbh, "SELECT uid, token, spam_hits, innocent_hits, last_hit " "FROM dspam_token_data"); if (! result || PQresultStatus(result) != PGRES_TUPLES_OK) { fprintf(stderr, "Failed to run result: %s\n", PQresultErrorMessage(result)); if (result) PQclear(result); PQfinish(dbh); fclose (out); exit(EXIT_FAILURE); } ntuples = PQntuples(result); for (i=0; iconfig->attributes, "PgSQLServer")) { char *p; strlcpy(hostname, _ds_read_attribute(open_ctx->config->attributes, "PgSQLServer"), sizeof(hostname)); if (_ds_read_attribute(open_ctx->config->attributes, "PgSQLPort")) port = atoi(_ds_read_attribute(open_ctx->config->attributes, "PgSQLPort")); else port = 0; if ((p = _ds_read_attribute(open_ctx->config->attributes, "PgSQLUser"))) strlcpy(user, p, sizeof(user)); if ((p = _ds_read_attribute(open_ctx->config->attributes, "PgSQLDb"))) strlcpy(db, p, sizeof(db)); } else { snprintf (filename, MAX_FILENAME_LENGTH, "%s/pgsql.data", open_ctx->home); file = fopen (filename, "r"); if (file == NULL) { fprintf(stderr, "Failed to open config file %s - %s\n", filename, strerror(errno)); dieout(0); } db[0] = 0; while (fgets (buffer, sizeof (buffer), file) != NULL) { chomp (buffer); if (!i) strlcpy (hostname, buffer, sizeof (hostname)); else if (i == 1) port = atoi (buffer); else if (i == 2) strlcpy (user, buffer, sizeof (user)); else if (i == 4) strlcpy (db, buffer, sizeof (db)); i++; } fclose (file); } if (db[0] == 0) { fprintf(stderr, "file %s: incomplete pgsql connect data", filename); dieout(0); } if (port == 0) port = 5432; fprintf(stderr, "Created SQL in %s; run using:\n", sqlfile); if ( strlen(hostname) == 0 ) fprintf(stderr, "\tpsql -q -p %d -U %s -d %s -f %s -v AUTOCOMMIT=off\n", port, user, db, sqlfile); else fprintf(stderr, "\tpsql -q -h %s -p %d -U %s -d %s -f %s -v AUTOCOMMIT=off\n", hostname, port, user, db, sqlfile); } void dieout (int signal) { fprintf (stderr, "terminated.\n"); if (open_ctx != NULL) dspam_destroy (open_ctx); if (open_mtx != NULL) dspam_destroy (open_mtx); _ds_destroy_config(agent_config); exit (EXIT_SUCCESS); } void usage (void) { (void)fprintf (stderr, "Usage: dspam_pg2int8 [-h] file\n" "\tCreates SQL file to migrate from NUMERIC to BIGINT type and vice-versa in PostgreSQL.\n" "\t-h: print this message\n"); _ds_destroy_config(agent_config); exit(EXIT_FAILURE); } dspam-3.10.2+dfsg/src/tools.pgsql_drv/Makefile.am0000644000175000017500000000153011622570546021150 0ustar julienjulien# $Id: Makefile.am,v 1.6.2 2009/11/14 01:19:13 sbajic Exp $ # tools.pgsql_drv/Makefile.am # EXTRA_DIST = pgsql_objects.sql virtual_users.sql purge.sql purge-pe.sql AM_CPPFLAGS = \ -DLOGDIR=\"$(logdir)\" -DCONFIG_DEFAULT=\"$(sysconfdir)/dspam.conf\" \ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE -I$(top_srcdir) CFLAGS = @CFLAGS@ -I$(top_srcdir)/src bin_PROGRAMS = dspam_pg2int8 DEFS = @DEFS@ -DLOGDIR=\"$(logdir)\" \ -DCONFIG_DEFAULT=\"$(sysconfdir)/dspam.conf\"\ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE dspam_pg2int8_SOURCES = dspam_pg2int8.c ../read_config.c ../config_api.c ../pref.c dspam_pg2int8_LDFLAGS = if DYNAMIC_DRIVER if BUILD_PGSQL_DRV dspam_pg2int8_CPPFLAGS = $(libpgsql_drv_cppflags) dspam_pg2int8_LDFLAGS += $(libpgsql_drv_libs) $(libpgsql_drv_ldflags) endif endif LDADD = ../libdspam.la dspam-3.10.2+dfsg/src/tools.pgsql_drv/Makefile.in0000644000175000017500000006336511745313452021174 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.6.2 2009/11/14 01:19:13 sbajic Exp $ # tools.pgsql_drv/Makefile.am # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = dspam_pg2int8$(EXEEXT) @BUILD_PGSQL_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@am__append_1 = $(libpgsql_drv_libs) $(libpgsql_drv_ldflags) subdir = src/tools.pgsql_drv DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_dspam_pg2int8_OBJECTS = dspam_pg2int8-dspam_pg2int8.$(OBJEXT) \ dspam_pg2int8-read_config.$(OBJEXT) \ dspam_pg2int8-config_api.$(OBJEXT) \ dspam_pg2int8-pref.$(OBJEXT) dspam_pg2int8_OBJECTS = $(am_dspam_pg2int8_OBJECTS) dspam_pg2int8_LDADD = $(LDADD) dspam_pg2int8_DEPENDENCIES = ../libdspam.la dspam_pg2int8_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(dspam_pg2int8_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(dspam_pg2int8_SOURCES) DIST_SOURCES = $(dspam_pg2int8_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -I$(top_srcdir)/src CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ -DLOGDIR=\"$(logdir)\" \ -DCONFIG_DEFAULT=\"$(sysconfdir)/dspam.conf\"\ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = pgsql_objects.sql virtual_users.sql purge.sql purge-pe.sql AM_CPPFLAGS = \ -DLOGDIR=\"$(logdir)\" -DCONFIG_DEFAULT=\"$(sysconfdir)/dspam.conf\" \ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE -I$(top_srcdir) dspam_pg2int8_SOURCES = dspam_pg2int8.c ../read_config.c ../config_api.c ../pref.c dspam_pg2int8_LDFLAGS = $(am__append_1) @BUILD_PGSQL_DRV_TRUE@@DYNAMIC_DRIVER_TRUE@dspam_pg2int8_CPPFLAGS = $(libpgsql_drv_cppflags) LDADD = ../libdspam.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tools.pgsql_drv/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/tools.pgsql_drv/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list dspam_pg2int8$(EXEEXT): $(dspam_pg2int8_OBJECTS) $(dspam_pg2int8_DEPENDENCIES) @rm -f dspam_pg2int8$(EXEEXT) $(dspam_pg2int8_LINK) $(dspam_pg2int8_OBJECTS) $(dspam_pg2int8_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspam_pg2int8-config_api.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspam_pg2int8-dspam_pg2int8.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspam_pg2int8-pref.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspam_pg2int8-read_config.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< dspam_pg2int8-dspam_pg2int8.o: dspam_pg2int8.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dspam_pg2int8-dspam_pg2int8.o -MD -MP -MF $(DEPDIR)/dspam_pg2int8-dspam_pg2int8.Tpo -c -o dspam_pg2int8-dspam_pg2int8.o `test -f 'dspam_pg2int8.c' || echo '$(srcdir)/'`dspam_pg2int8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dspam_pg2int8-dspam_pg2int8.Tpo $(DEPDIR)/dspam_pg2int8-dspam_pg2int8.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dspam_pg2int8.c' object='dspam_pg2int8-dspam_pg2int8.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dspam_pg2int8-dspam_pg2int8.o `test -f 'dspam_pg2int8.c' || echo '$(srcdir)/'`dspam_pg2int8.c dspam_pg2int8-dspam_pg2int8.obj: dspam_pg2int8.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dspam_pg2int8-dspam_pg2int8.obj -MD -MP -MF $(DEPDIR)/dspam_pg2int8-dspam_pg2int8.Tpo -c -o dspam_pg2int8-dspam_pg2int8.obj `if test -f 'dspam_pg2int8.c'; then $(CYGPATH_W) 'dspam_pg2int8.c'; else $(CYGPATH_W) '$(srcdir)/dspam_pg2int8.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dspam_pg2int8-dspam_pg2int8.Tpo $(DEPDIR)/dspam_pg2int8-dspam_pg2int8.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dspam_pg2int8.c' object='dspam_pg2int8-dspam_pg2int8.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dspam_pg2int8-dspam_pg2int8.obj `if test -f 'dspam_pg2int8.c'; then $(CYGPATH_W) 'dspam_pg2int8.c'; else $(CYGPATH_W) '$(srcdir)/dspam_pg2int8.c'; fi` dspam_pg2int8-read_config.o: ../read_config.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dspam_pg2int8-read_config.o -MD -MP -MF $(DEPDIR)/dspam_pg2int8-read_config.Tpo -c -o dspam_pg2int8-read_config.o `test -f '../read_config.c' || echo '$(srcdir)/'`../read_config.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dspam_pg2int8-read_config.Tpo $(DEPDIR)/dspam_pg2int8-read_config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../read_config.c' object='dspam_pg2int8-read_config.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dspam_pg2int8-read_config.o `test -f '../read_config.c' || echo '$(srcdir)/'`../read_config.c dspam_pg2int8-read_config.obj: ../read_config.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dspam_pg2int8-read_config.obj -MD -MP -MF $(DEPDIR)/dspam_pg2int8-read_config.Tpo -c -o dspam_pg2int8-read_config.obj `if test -f '../read_config.c'; then $(CYGPATH_W) '../read_config.c'; else $(CYGPATH_W) '$(srcdir)/../read_config.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dspam_pg2int8-read_config.Tpo $(DEPDIR)/dspam_pg2int8-read_config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../read_config.c' object='dspam_pg2int8-read_config.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dspam_pg2int8-read_config.obj `if test -f '../read_config.c'; then $(CYGPATH_W) '../read_config.c'; else $(CYGPATH_W) '$(srcdir)/../read_config.c'; fi` dspam_pg2int8-config_api.o: ../config_api.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dspam_pg2int8-config_api.o -MD -MP -MF $(DEPDIR)/dspam_pg2int8-config_api.Tpo -c -o dspam_pg2int8-config_api.o `test -f '../config_api.c' || echo '$(srcdir)/'`../config_api.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dspam_pg2int8-config_api.Tpo $(DEPDIR)/dspam_pg2int8-config_api.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../config_api.c' object='dspam_pg2int8-config_api.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dspam_pg2int8-config_api.o `test -f '../config_api.c' || echo '$(srcdir)/'`../config_api.c dspam_pg2int8-config_api.obj: ../config_api.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dspam_pg2int8-config_api.obj -MD -MP -MF $(DEPDIR)/dspam_pg2int8-config_api.Tpo -c -o dspam_pg2int8-config_api.obj `if test -f '../config_api.c'; then $(CYGPATH_W) '../config_api.c'; else $(CYGPATH_W) '$(srcdir)/../config_api.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dspam_pg2int8-config_api.Tpo $(DEPDIR)/dspam_pg2int8-config_api.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../config_api.c' object='dspam_pg2int8-config_api.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dspam_pg2int8-config_api.obj `if test -f '../config_api.c'; then $(CYGPATH_W) '../config_api.c'; else $(CYGPATH_W) '$(srcdir)/../config_api.c'; fi` dspam_pg2int8-pref.o: ../pref.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dspam_pg2int8-pref.o -MD -MP -MF $(DEPDIR)/dspam_pg2int8-pref.Tpo -c -o dspam_pg2int8-pref.o `test -f '../pref.c' || echo '$(srcdir)/'`../pref.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dspam_pg2int8-pref.Tpo $(DEPDIR)/dspam_pg2int8-pref.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../pref.c' object='dspam_pg2int8-pref.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dspam_pg2int8-pref.o `test -f '../pref.c' || echo '$(srcdir)/'`../pref.c dspam_pg2int8-pref.obj: ../pref.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dspam_pg2int8-pref.obj -MD -MP -MF $(DEPDIR)/dspam_pg2int8-pref.Tpo -c -o dspam_pg2int8-pref.obj `if test -f '../pref.c'; then $(CYGPATH_W) '../pref.c'; else $(CYGPATH_W) '$(srcdir)/../pref.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dspam_pg2int8-pref.Tpo $(DEPDIR)/dspam_pg2int8-pref.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../pref.c' object='dspam_pg2int8-pref.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dspam_pg2int8_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dspam_pg2int8-pref.obj `if test -f '../pref.c'; then $(CYGPATH_W) '../pref.c'; else $(CYGPATH_W) '$(srcdir)/../pref.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/src/tools.pgsql_drv/pgsql_objects.sql0000644000175000017500000000426211622570546022501 0ustar julienjulien/* $Id: pgsql_objects.sql,v 1.18 2009/06/23 21:51:22 sbajic Exp $ */ CREATE TABLE dspam_token_data ( uid INT, token BIGINT, spam_hits INT, innocent_hits INT, last_hit DATE, UNIQUE (uid, token) ) WITHOUT OIDS; CREATE TABLE dspam_signature_data ( uid INT, signature varchar(128), data BYTEA, length INT, created_on DATE, UNIQUE (uid, signature) ) WITHOUT OIDS; CREATE TABLE dspam_stats ( uid INT 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 INT, preference VARCHAR(128), value VARCHAR(128), UNIQUE (uid, preference) ) WITHOUT OIDS; 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;'; create function lookup_tokens(integer,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 $3[i] from generate_series(array_lower($3,1),array_upper($3,1)) s(i)) loop return next v_rec; end loop; for v_rec in select * from dspam_token_data where uid=$2 and token in (select $3[i] from generate_series(array_lower($3,1),array_upper($3,1)) s(i)) loop return next v_rec; end loop; return; end;'; /* For much better performance * see http://archives.postgresql.org/pgsql-performance/2004-11/msg00416.php * and http://archives.postgresql.org/pgsql-performance/2004-11/msg00417.php * for details */ ALTER TABLE dspam_token_data ALTER token SET STATISTICS 200; ALTER TABLE dspam_signature_data ALTER signature SET STATISTICS 200; ALTER TABLE dspam_token_data ALTER innocent_hits SET STATISTICS 200; ALTER TABLE dspam_token_data ALTER spam_hits SET STATISTICS 200; ANALYZE; dspam-3.10.2+dfsg/src/pref.h0000644000175000017500000000366011741351001015050 0ustar julienjulien/* $Id: pref.h,v 1.20 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef _PREF_H # define _PREF_H #include #ifndef _WIN32 #include #endif #ifdef HAVE_CONFIG_H #include #endif #include "config_shared.h" #define PREF_MAX 32 /* a single preference attribute */ typedef struct _ds_agent_attribute { char *attribute; char *value; } *agent_attrib_t; typedef agent_attrib_t *agent_pref_t; /* preference utilities */ const char * _ds_pref_val (agent_pref_t PTX, const char *attrib); int _ds_pref_free (agent_pref_t PTX); agent_pref_t _ds_pref_aggregate (agent_pref_t, agent_pref_t); agent_attrib_t _ds_pref_new (const char *attribute, const char *value); agent_pref_t _ds_ff_pref_load( config_t config, const char *user, const char *home, void *ignore); int _ds_ff_pref_set( config_t config, const char *user, const char *home, const char *preference, const char *value, void *ignore); int _ds_ff_pref_del( config_t config, const char *user, const char *home, const char *preference, void *ignore); FILE *_ds_ff_pref_prepare_file( const char *filename, const char *omission, int *nlines); int _ds_ff_pref_commit ( const char *filename, FILE *out_file); #endif /* _PREF_H */ dspam-3.10.2+dfsg/src/util.h0000644000175000017500000000640411741351001015070 0ustar julienjulien/* $Id: util.h,v 1.20 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef _UTIL_H # define _UTIL_H #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifndef _WIN32 #include #endif void chomp (char *string); char * ltrim (char *str); char * rtrim (char *str); int lc (char *buff, const char *string); #ifndef HAVE_STRCASESTR char * strcasestr (const char *, const char *); #endif #define ALLTRIM(str) ltrim(rtrim(str)) #ifndef HAVE_STRSEP char *strsep (char **stringp, const char *delim); #endif #ifndef HAVE_STRLCPY size_t strlcpy (char *, const char *, size_t); size_t strlcat (char *, const char *, size_t); #endif /* * Specialized Functions * Utilities specialized for DSPAM functions. * * _ds_userdir_path() * Generates the path for files within DSPAM's filesystem, according to the * filesystem structure specified at configure time. * * _ds_prepare_path_for() * Creates any necessary subdirectories to support the supplied path * * _ds_get_crc64() * Generates the CRC of the supplied string, using CRC64 * * _ds_compute_complexity() * Calculates the complexity of a token based on its nGram depth * * _ds_compute_sparse() * Calculates the number of sparse skips in a token * * _ds_compute_weight() * Calculates the markovian weight of a token * * _ds_compute_weight_osb() * Calculates the OSB/OSBF/WINNOW weight of a token */ #ifndef HAVE_STRTOK_R char * strtok_r(char *s1, const char *s2, char **lasts); #endif #ifndef HAVE_INET_NTOA_R unsigned int i2a (char* dest,unsigned int x); char *inet_ntoa_r (struct in_addr in, char *buf, int len); #endif #ifdef EXT_LOOKUP int verified_user; #endif const char * _ds_userdir_path ( char *buff, const char *home, const char *filename, const char *extension); int _ds_prepare_path_for (const char *filename); int _ds_compute_complexity (const char *token); int _ds_compute_sparse (const char *token); int _ds_compute_weight (const char *token); int _ds_compute_weight_osb (const char *token); char *_ds_truncate_token (const char *token); int _ds_extract_address( char *buf, const char *address, size_t len); double _ds_gettime(void); void timeout(void); int _ds_get_fcntl_lock (int fd); int _ds_free_fcntl_lock (int fd); unsigned long long _ds_getcrc64 (const char *); int _ds_pow (int base, unsigned int exp); int _ds_pow2 (int exp); double chi2Q (double x, int v); float _ds_round (float n); int _ds_validate_address (const char *address); #endif /* _UTIL_H */ dspam-3.10.2+dfsg/src/dspam.c0000644000175000017500000037175111741351001015224 0ustar julienjulien/* $Id: dspam.c,v 1.412 2011/11/10 00:26:00 tomhendr Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* * dspam.c - primary dspam processing agent * * DESCRIPTION * The agent provides a commandline interface to the libdspam core engine * and also provides advanced functions such as a daemonized LMTP server, * extended groups, and other agent features outlined in the documentation. * * This codebase is the full client/processing engine. See dspamc.c for * the lightweight client-only codebase. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #include #endif #include #include #include #include #include #include #ifdef _WIN32 #include #include #define WIDEXITED(x) 1 #define WEXITSTATUS(x) (x) #include #else #include #include #endif #include "config.h" #include "util.h" #include "read_config.h" #ifdef DAEMON #include #include "daemon.h" #include "client.h" #endif #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #ifdef EXT_LOOKUP #include "external_lookup.h" int verified_user = 0; #endif #include "dspam.h" #include "agent_shared.h" #include "pref.h" #include "libdspam.h" #include "language.h" #include "buffer.h" #include "base64.h" #include "heap.h" #include "pref.h" #include "config_api.h" #define USE_LMTP (_ds_read_attribute(agent_config, "DeliveryProto") && !strcmp(_ds_read_attribute(agent_config, "DeliveryProto"), "LMTP")) #define USE_SMTP (_ds_read_attribute(agent_config, "DeliveryProto") && !strcmp(_ds_read_attribute(agent_config, "DeliveryProto"), "SMTP")) #define LOOKUP(A, B) ((_ds_pref_val(A, "localStore")[0]) ? _ds_pref_val(A, "localStore") : B) int main (int argc, char *argv[]) { AGENT_CTX ATX; /* agent configuration */ buffer *message = NULL; /* input message */ int agent_init = 0; /* agent is initialized */ int driver_init = 0; /* storage driver is initialized */ int pwent_cache_init = 0; /* cache for username and uid is initialized */ int exitcode = EXIT_SUCCESS; struct nt_node *node_nt; struct nt_c c_nt; srand ((long) time(NULL) ^ (long) getpid ()); umask (006); /* rw-rw---- */ setbuf (stdout, NULL); /* unbuffered output */ #ifdef DEBUG DO_DEBUG = 0; #endif #ifdef DAEMON pthread_mutex_init(&__syslog_lock, NULL); #endif /* Cache my username and uid for trusted user security */ if (!init_pwent_cache()) { LOG(LOG_ERR, ERR_AGENT_RUNTIME_USER); exitcode = EXIT_FAILURE; goto BAIL; } else pwent_cache_init = 1; /* Read dspam.conf into global config structure (ds_config_t) */ agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); exitcode = EXIT_FAILURE; goto BAIL; } if (!_ds_read_attribute(agent_config, "Home")) { LOG(LOG_ERR, ERR_AGENT_DSPAM_HOME); exitcode = EXIT_FAILURE; goto BAIL; } /* Set up an agent context to define the behavior of the processor */ if (initialize_atx(&ATX)) { LOG(LOG_ERR, ERR_AGENT_INIT_ATX); exitcode = EXIT_FAILURE; goto BAIL; } else { agent_init = 1; } if (process_arguments(&ATX, argc, argv)) { LOG(LOG_ERR, ERR_AGENT_INIT_ATX); exitcode = EXIT_FAILURE; goto BAIL; } /* Switch into daemon mode if --daemon was specified on the commandline */ #ifdef DAEMON #ifdef TRUSTED_USER_SECURITY if (ATX.operating_mode == DSM_DAEMON && ATX.trusted) #else if (ATX.operating_mode == DSM_DAEMON) #endif { exitcode = daemon_start(&ATX); if (agent_init) { nt_destroy(ATX.users); nt_destroy(ATX.recipients); } if (agent_config) _ds_destroy_config(agent_config); pthread_mutex_destroy(&__syslog_lock); if (pwent_cache_init) free(__pw_name); exit(exitcode); } #endif if (apply_defaults(&ATX)) { LOG(LOG_ERR, ERR_AGENT_INIT_ATX); exitcode = EXIT_FAILURE; goto BAIL; } if (check_configuration(&ATX)) { LOG(LOG_ERR, ERR_AGENT_MISCONFIGURED); exitcode = EXIT_FAILURE; goto BAIL; } /* Read the message in and apply ParseTo services */ message = read_stdin(&ATX); if (message == NULL) { exitcode = EXIT_FAILURE; goto BAIL; } if (ATX.users->items == 0) { LOG(LOG_ERR, ERR_AGENT_USER_UNDEFINED); fprintf (stderr, "%s\n", SYNTAX); exitcode = EXIT_FAILURE; goto BAIL; } /* Perform client-based processing of message if --client was specified */ #ifdef DAEMON if (ATX.client_mode && _ds_read_attribute(agent_config, "ClientIdent") && (_ds_read_attribute(agent_config, "ClientHost") || _ds_read_attribute(agent_config, "ServerDomainSocketPath"))) { exitcode = client_process(&ATX, message); if (exitcode<0) { LOG(LOG_ERR, ERR_CLIENT_EXIT, exitcode); } } else { #endif /* Primary (non-client) processing procedure */ if (libdspam_init(_ds_read_attribute(agent_config, "StorageDriver"))) { LOG(LOG_CRIT, ERR_DRV_INIT); exitcode = EXIT_FAILURE; goto BAIL; } if (dspam_init_driver (NULL)) { LOG (LOG_WARNING, ERR_DRV_INIT); exitcode = EXIT_FAILURE; goto BAIL; } else { driver_init = 1; } ATX.results = nt_create(NT_PTR); if (ATX.results == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); exitcode = EUNKNOWN; goto BAIL; } exitcode = process_users(&ATX, message); if (exitcode) { LOGDEBUG("process_users() failed on error %d", exitcode); } else { exitcode = 0; node_nt = c_nt_first(ATX.results, &c_nt); while(node_nt) { agent_result_t result = (agent_result_t) node_nt->ptr; if (result->exitcode) exitcode--; node_nt = c_nt_next(ATX.results, &c_nt); } } nt_destroy(ATX.results); node_nt = NULL; #ifdef DAEMON } #endif BAIL: if (message) buffer_destroy(message); if (agent_init) { nt_destroy(ATX.users); nt_destroy(ATX.recipients); } #ifdef DAEMON if (agent_init) { if (!ATX.client_mode) { #endif if (driver_init) dspam_shutdown_driver(NULL); libdspam_shutdown(); #ifdef DAEMON } } #endif if (agent_config) _ds_destroy_config(agent_config); if (pwent_cache_init) free(__pw_name); #ifdef DAEMON pthread_mutex_destroy(&__syslog_lock); // pthread_exit(0); #endif exit(exitcode); } /* * process_message(AGENT_CTX *ATX, buffer *message, const char *username) * * DESCRIPTION * Core message processing / interface to libdspam * This function should be called once for each destination user * * INPUT ARGUMENTS * ATX Agent context defining processing behavior * message Buffer structure containing the message * username Destination user * * RETURN VALUES * The processing result is returned: * * DSR_ISINNOCENT Message is innocent * DSR_ISSPAM Message is spam * (other) Error code (see libdspam.h) */ int process_message ( AGENT_CTX *ATX, buffer * message, const char *username, char **result_string) { DSPAM_CTX *CTX = NULL; /* (lib)dspam context */ ds_message_t components; char *copyback; int have_signature = 0; int result, i; int internally_canned = 0; ATX->timestart = _ds_gettime(); /* set tick count to get run time */ if (message->data == NULL) { LOGDEBUG("empty message provided"); return EINVAL; } /* Create a dspam context based on the agent context */ CTX = ctx_init(ATX, username); if (CTX == NULL) { LOG (LOG_WARNING, ERR_CORE_INIT); result = EUNKNOWN; goto RETURN; } /* Configure libdspam's storage properties, then attach storage */ set_libdspam_attributes(CTX); if (ATX->sockfd && ATX->dbh == NULL) ATX->dbh = _ds_connect(CTX); /* Re-Establish database connection (if failed) */ if (attach_context(CTX, ATX->dbh)) { if (ATX->sockfd) { ATX->dbh = _ds_connect(CTX); LOG(LOG_ERR, ERR_CORE_REATTACH); if (attach_context(CTX, ATX->dbh)) { LOG(LOG_ERR, ERR_CORE_ATTACH); result = EUNKNOWN; goto RETURN; } } else { LOG(LOG_ERR, ERR_CORE_ATTACH); result = EUNKNOWN; goto RETURN; } } /* Parse and decode the message into our message structure (ds_message_t) */ components = _ds_actualize_message (message->data); if (components == NULL) { LOG (LOG_ERR, ERR_AGENT_PARSER_FAILED); result = EUNKNOWN; goto RETURN; } CTX->message = components; #ifdef CLAMAV /* Check for viruses */ if (_ds_read_attribute(agent_config, "ClamAVPort") && _ds_read_attribute(agent_config, "ClamAVHost") && CTX->source != DSS_ERROR && strcmp(_ds_pref_val(ATX->PTX, "optOutClamAV"), "on")) { if (has_virus(message)) { char ip[32]; CTX->result = DSR_ISSPAM; CTX->probability = 1.0; CTX->confidence = 1.0; STATUS("A virus was detected in the message contents"); result = DSR_ISSPAM; strcpy(CTX->class, LANG_CLASS_VIRUS); internally_canned = 1; if(!_ds_match_attribute(agent_config, "TrackSources", "virus")) { if (!dspam_getsource (CTX, ip, sizeof (ip))) { LOG(LOG_WARNING, "virus warning: infected message from %s", ip); } } } } #endif /* Check for a domain blocklist (user-based setting) */ if (is_blocklisted(CTX, ATX)) { CTX->result = DSR_ISSPAM; CTX->probability = 1.0; CTX->confidence = 1.0; strcpy(CTX->class, LANG_CLASS_BLOCKLISTED); internally_canned = 1; } /* Check for an RBL blacklist (system-based setting) */ if (CTX->classification == DSR_NONE && _ds_read_attribute(agent_config, "Lookup")) { if(strcasecmp(_ds_pref_val(ATX->PTX, "ignoreRBLLookups"), "on")) { int bad = is_blacklisted(CTX, ATX); if (bad) { if ((_ds_match_attribute(agent_config, "RBLInoculate", "on") || !strcasecmp(_ds_pref_val(ATX->PTX, "RBLInoculate"), "on")) && strcasecmp(_ds_pref_val(ATX->PTX, "RBLInoculate"), "off")) { LOGDEBUG("source address is blacklisted. learning as spam."); CTX->classification = DSR_ISSPAM; CTX->source = DSS_INOCULATION; } else { CTX->result = DSR_ISSPAM; CTX->probability = 1.0; CTX->confidence = 1.0; strcpy(CTX->class, LANG_CLASS_BLACKLISTED); internally_canned = 1; } } } } /* Process a signature if one was provided */ have_signature = find_signature(CTX, ATX); if (ATX->source == DSS_CORPUS || ATX->source == DSS_NONE) have_signature = 0; /* ignore sigs from corpusfed and inbound email */ char *original_username = strdup(CTX->username); if (have_signature) { if (_ds_get_signature (CTX, &ATX->SIG, ATX->signature)) { LOG(LOG_WARNING, ERR_AGENT_SIG_RET_FAILED, ATX->signature); have_signature = 0; } else { /* uid-based signatures will change the active username, so reload preferences if it has changed */ CTX->signature = &ATX->SIG; if (!strcasecmp(CTX->username, original_username)) { if (ATX->PTX) _ds_pref_free(ATX->PTX); free(ATX->PTX); ATX->PTX = NULL; ATX->PTX = load_aggregated_prefs(ATX, CTX->username); ATX->train_pristine = 0; if ((_ds_match_attribute(agent_config, "TrainPristine", "on") || !strcmp(_ds_pref_val(ATX->PTX, "trainPristine"), "on")) && strcmp(_ds_pref_val(ATX->PTX, "trainPristine"), "off")) { ATX->train_pristine = 1; } /* Change also the mail recipient */ ATX->recipient = CTX->username; } } } else if (CTX->operating_mode == DSM_CLASSIFY || CTX->classification != DSR_NONE) { CTX->flags = CTX->flags ^ DSF_SIGNATURE; CTX->signature = NULL; } if (have_signature && CTX->classification != DSR_NONE) { /* * Reclassify (or retrain) message by signature */ if (retrain_message(CTX, ATX) != 0) { have_signature = 0; result = EFAILURE; goto RETURN; } } else { CTX->signature = NULL; if (! ATX->train_pristine) { if (CTX->classification != DSR_NONE && CTX->source == DSS_ERROR) { LOG(LOG_WARNING, ERR_AGENT_NO_VALID_SIG); result = EFAILURE; goto RETURN; } } /* * Call libdspam to process the environment we've configured */ if (!internally_canned) { result = dspam_process (CTX, message->data); if (result != 0) { result = EFAILURE; goto RETURN; } } } result = CTX->result; if (result == DSR_ISINNOCENT && !strcmp(CTX->class, LANG_CLASS_WHITELISTED)) { STATUS("Auto-Whitelisted"); } /* * Send any relevant notifications to the user (first spam, etc) * Only if the process was successful */ if (result == DSR_ISINNOCENT || result == DSR_ISSPAM) { do_notifications(CTX, ATX); } /* Consult global group or classification network */ result = ensure_confident_result(CTX, ATX, result); if (result < 0) goto RETURN; /* Inoculate other users (signature) */ if (have_signature && CTX->classification == DSR_ISSPAM && CTX->source != DSS_CORPUS && ATX->inoc_users->items > 0) { struct nt_node *node_int; struct nt_c c_i; node_int = c_nt_first (ATX->inoc_users, &c_i); while (node_int != NULL) { inoculate_user (ATX, (const char *) node_int->ptr, &ATX->SIG, NULL); node_int = c_nt_next (ATX->inoc_users, &c_i); } } /* Inoculate other users (message) */ if (!have_signature && CTX->classification == DSR_ISSPAM && CTX->source != DSS_CORPUS && ATX->inoc_users->items > 0) { struct nt_node *node_int; struct nt_c c_i; node_int = c_nt_first (ATX->inoc_users, &c_i); while (node_int != NULL) { inoculate_user (ATX, (const char *) node_int->ptr, NULL, message->data); node_int = c_nt_next (ATX->inoc_users, &c_i); } inoculate_user (ATX, CTX->username, NULL, message->data); result = DSR_ISSPAM; CTX->result = DSR_ISSPAM; goto RETURN; } /* Generate a signature id for the message and store */ if (internally_canned) { if (CTX->signature) { free(CTX->signature->data); free(CTX->signature); CTX->signature = NULL; } CTX->signature = calloc(1, sizeof(struct _ds_spam_signature)); if (CTX->signature) { CTX->signature->length = 8; CTX->signature->data = calloc(1, (CTX->signature->length)); } } if (internally_canned || (CTX->operating_mode == DSM_PROCESS && CTX->classification == DSR_NONE && CTX->signature != NULL)) { int valid = 0; while (!valid) { _ds_create_signature_id (CTX, ATX->signature, sizeof (ATX->signature)); if (_ds_verify_signature (CTX, ATX->signature)) valid = 1; } LOGDEBUG ("saving signature as %s", ATX->signature); if (CTX->classification == DSR_NONE && CTX->training_mode != DST_NOTRAIN) { if (!ATX->train_pristine) { int x = _ds_set_signature (CTX, CTX->signature, ATX->signature); if (x) { LOG(LOG_WARNING, "_ds_set_signature() failed with error %d", x); } } } } /* Restore original username if necessary */ if (CTX->group != NULL && strcasecmp(CTX->username, original_username) != 0) { LOGDEBUG ("restoring original username %s after group processing as %s", original_username, CTX->username); CTX->username = original_username; } /* Write .stats file for web interface */ if (CTX->training_mode != DST_NOTRAIN && _ds_match_attribute(agent_config, "WebStats", "on")) { write_web_stats ( ATX, (CTX->group == NULL || CTX->flags & DSF_MERGED) ? CTX->username : CTX->group, (CTX->group != NULL && CTX->flags & DSF_MERGED) ? CTX->group: NULL, &CTX->totals); } LOGDEBUG ("libdspam returned probability of %f", CTX->probability); LOGDEBUG ("message result: %s", (result != DSR_ISSPAM) ? "NOT SPAM" : "SPAM"); /* System and User logging */ if (CTX->operating_mode != DSM_CLASSIFY && (_ds_match_attribute(agent_config, "SystemLog", "on") || _ds_match_attribute(agent_config, "UserLog", "on"))) { log_events(CTX, ATX); } /* Fragment Store - Store 1k fragments of each message for web users who * want to be able to see them from history. This requires some type of * find recipe for purging */ if (ATX->PTX != NULL && !strcmp(_ds_pref_val(ATX->PTX, "storeFragments"), "on") && CTX->source != DSS_ERROR) { char dirname[MAX_FILENAME_LENGTH]; char corpusfile[MAX_FILENAME_LENGTH]; char output[1024]; FILE *file; _ds_userdir_path(dirname, _ds_read_attribute(agent_config, "Home"), LOOKUP(ATX->PTX, (ATX->managed_group[0]) ? ATX->managed_group : CTX->username), "frag"); snprintf(corpusfile, MAX_FILENAME_LENGTH, "%s/%s.frag", dirname, ATX->signature); LOGDEBUG("writing to frag file %s", corpusfile); _ds_prepare_path_for(corpusfile); file = fopen(corpusfile, "w"); if (file != NULL) { char *body = strstr(message->data, "\n\n"); if (!body) body = message->data; strlcpy(output, body, sizeof(output)); fputs(output, file); fputs("\n", file); fclose(file); } } /* Corpus Maker - Build a corpus in DSPAM_HOME/data/USERPATH/USER.corpus */ if (ATX->PTX != NULL && !strcmp(_ds_pref_val(ATX->PTX, "makeCorpus"), "on")) { if (ATX->source != DSS_ERROR) { char dirname[MAX_FILENAME_LENGTH]; char corpusfile[MAX_FILENAME_LENGTH]; FILE *file; _ds_userdir_path(dirname, _ds_read_attribute(agent_config, "Home"), LOOKUP(ATX->PTX, (ATX->managed_group[0]) ? ATX->managed_group : CTX->username), "corpus"); snprintf(corpusfile, MAX_FILENAME_LENGTH, "%s/%s/%s.msg", dirname, (result == DSR_ISSPAM) ? "spam" : "nonspam", ATX->signature); LOGDEBUG("writing to corpus file %s", corpusfile); _ds_prepare_path_for(corpusfile); file = fopen(corpusfile, "w"); if (file != NULL) { fputs(message->data, file); fclose(file); } } else { char dirname[MAX_FILENAME_LENGTH]; char corpusfile[MAX_FILENAME_LENGTH]; char corpusdest[MAX_FILENAME_LENGTH]; _ds_userdir_path(dirname, _ds_read_attribute(agent_config, "Home"), LOOKUP(ATX->PTX, (ATX->managed_group[0]) ? ATX->managed_group : CTX->username), "corpus"); snprintf(corpusdest, MAX_FILENAME_LENGTH, "%s/%s/%s.msg", dirname, (result == DSR_ISSPAM) ? "spam" : "nonspam", ATX->signature); snprintf(corpusfile, MAX_FILENAME_LENGTH, "%s/%s/%s.msg", dirname, (result == DSR_ISSPAM) ? "nonspam" : "spam", ATX->signature); LOGDEBUG("moving corpusfile %s -> %s", corpusfile, corpusdest); _ds_prepare_path_for(corpusdest); rename(corpusfile, corpusdest); } } /* False positives and spam misses should return here */ if (CTX->message == NULL) goto RETURN; /* Add headers, tag, and deliver if necessary */ { add_xdspam_headers(CTX, ATX); } if (!strcmp(_ds_pref_val(ATX->PTX, "spamAction"), "tag") && result == DSR_ISSPAM) { tag_message(ATX, CTX->message); } if ( (!strcmp(_ds_pref_val(ATX->PTX, "tagSpam"), "on") && CTX->result == DSR_ISSPAM) || (!strcmp(_ds_pref_val(ATX->PTX, "tagNonspam"), "on") && CTX->result == DSR_ISINNOCENT) ) { i = embed_msgtag(CTX, ATX); if (i<0) { result = i; goto RETURN; } } if (strcmp(_ds_pref_val(ATX->PTX, "signatureLocation"), "headers") && !ATX->train_pristine && (CTX->classification == DSR_NONE || internally_canned)) { i = embed_signature(CTX, ATX); if (i<0) { result = i; goto RETURN; } } /* Reassemble message from components */ copyback = _ds_assemble_message (CTX->message, (USE_LMTP || USE_SMTP) ? "\r\n" : "\n"); buffer_clear (message); buffer_cat (message, copyback); free (copyback); /* Track source address and report to syslog, RABL */ if ( _ds_read_attribute(agent_config, "TrackSources") && CTX->operating_mode == DSM_PROCESS && CTX->source != DSS_CORPUS && CTX->source != DSS_ERROR) { tracksource(CTX); } /* Print --classify output */ if (CTX->operating_mode == DSM_CLASSIFY || ATX->flags & DAF_SUMMARY) { char data[128]; FILE *fout; switch (CTX->result) { case DSR_ISSPAM: strcpy(data, "Spam"); break; default: strcpy(data, "Innocent"); break; } if (ATX->sockfd) { fout = ATX->sockfd; ATX->sockfd_output = 1; } else { fout = stdout; } fprintf(fout, "X-DSPAM-Result: %s; result=\"%s\"; class=\"%s\"; " "probability=%01.4f; confidence=%02.2f; signature=%s\n", CTX->username, data, CTX->class, CTX->probability, CTX->confidence, (ATX->signature[0]) ? ATX->signature : "N/A"); } ATX->learned = CTX->learned; if (result_string) *result_string = strdup(CTX->class); RETURN: if (have_signature) { if (ATX->SIG.data != NULL) { free(ATX->SIG.data); ATX->SIG.data = NULL; } } ATX->signature[0] = 0; nt_destroy (ATX->inoc_users); nt_destroy (ATX->classify_users); if (CTX) { if (CTX->signature == &ATX->SIG) { CTX->signature = NULL; } else if (CTX->signature != NULL) { if (CTX->signature->data != NULL) { free (CTX->signature->data); } free (CTX->signature); CTX->signature = NULL; } dspam_destroy (CTX); } return result; } /* * deliver_message(AGENT_CTX *ATX, const char *message, * const char *mailer_args, const char *username, FILE *stream, * int result) * * DESCRIPTION * Deliver message to the appropriate destination. This could be one of: * - Trusted/Untrusted Delivery Agent * - Delivery Host (SMTP/LMTP) * - Quarantine Agent * - File stream (--stdout) * * INPUT ARGUMENTS * ATX Agent context defining processing behavior * message Message to be delivered * mailer_args Arguments to pass to local agents via pipe() * username Destination username * stream File stream (if any) for stdout delivery * result Message classification result (DSR_) * * RETURN VALUES * returns 0 on success * EINVAL on permanent failure * EFAILURE on temporary failure * EFILE local agent failure */ int deliver_message ( AGENT_CTX *ATX, const char *message, const char *mailer_args, const char *username, FILE *stream, int result) { char args[1024]; char *margs, *mmargs, *arg; FILE *file; int rc; #ifdef DAEMON /* If QuarantineMailbox defined and delivering a spam, get * name of recipient, truncate possible "+detail", and * add the QuarantineMailbox name (that must include the "+") */ 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; } /* If (using LMTP or SMTP) and (not delivering to stdout) and * (we shouldn't be delivering this to a quarantine agent) * then call deliver_socket to deliver to DeliveryHost */ if ( (USE_LMTP || USE_SMTP) && ! (ATX->flags & DAF_STDOUT) && (!(result == DSR_ISSPAM && _ds_read_attribute(agent_config, "QuarantineAgent") && ATX->PTX && !strcmp(_ds_pref_val(ATX->PTX, "spamAction"), "quarantine"))) ) { return deliver_socket(ATX, message, (USE_LMTP) ? DDP_LMTP : DDP_SMTP); } #endif if (message == NULL) return EINVAL; /* If we're delivering to stdout, we need to provide a classification for * use by client/daemon setups where the client needs to know the result * in order to support broken returnCodes. */ if (ATX->sockfd && ATX->flags & DAF_STDOUT) fprintf(stream, "X-Daemon-Classification: %s\n", (result == DSR_ISSPAM) ? "SPAM" : "INNOCENT"); if (mailer_args == NULL) { fputs (message, stream); return 0; } /* Prepare local mailer args and interpolate all special symbols */ args[0] = 0; margs = strdup (mailer_args); mmargs = margs; arg = strsep (&margs, " "); while (arg != NULL) { char a[256], b[256]; /* Destination user */ if (!strcmp (arg, "$u") || !strcmp (arg, "\\$u") || !strcmp (arg, "%u") || !strcmp(arg, "\\%u")) { strlcpy(a, username, sizeof(a)); } /* Recipient (from RCPT TO)*/ else if (!strcmp (arg, "%r") || !strcmp (arg, "\\%r")) { if (ATX->recipient) strlcpy(a, ATX->recipient, sizeof(a)); else strlcpy(a, username, sizeof(a)); } /* Sender (from MAIL FROM) */ else if (!strcmp (arg, "%s") || !strcmp (arg, "\\%s")) strlcpy(a, ATX->mailfrom, sizeof(a)); else strlcpy(a, arg, sizeof(a)); /* Escape special characters */ if (strcmp(a, "\"\"")) { size_t i; for(i=0;icomponents->first->ptr; struct nt_node *node_header = block->headers->first; int tagged = 0; char spam_subject[16]; strcpy(spam_subject, "[SPAM]"); if (_ds_pref_val(ATX->PTX, "spamSubject")[0] != '\n' && _ds_pref_val(ATX->PTX, "spamSubject")[0] != 0) { strlcpy(spam_subject, _ds_pref_val(ATX->PTX, "spamSubject"), sizeof(spam_subject)); } /* Only scan the first (primary) header of the message. */ while (node_header != NULL) { ds_header_t head; head = (ds_header_t) node_header->ptr; if (head->heading && !strcasecmp(head->heading, "Subject")) { /* CURRENT HEADER: Is this header already tagged? */ if (strncmp(head->data, spam_subject, strlen(spam_subject))) { /* Not tagged, so tag it */ long subject_length = strlen(head->data)+strlen(spam_subject)+2; char *subject = malloc(subject_length); if (subject != NULL) { snprintf(subject, subject_length, "%s %s", spam_subject, head->data); free(head->data); head->data = subject; } } /* ORIGINAL HEADER: Is this header already tagged? */ if (head->original_data != NULL && strncmp(head->original_data, spam_subject, strlen(spam_subject))) { /* Not tagged => tag it. */ long subject_length = strlen(head->original_data)+strlen(spam_subject)+2; char *subject = malloc(subject_length); if (subject != NULL) { snprintf(subject, subject_length, "%s %s", spam_subject, head->original_data); free(head->original_data); head->original_data = subject; } } tagged = 1; } node_header = node_header->next; } /* There doesn't seem to be a subject field, so make one */ if (!tagged) { char text[80]; ds_header_t header; snprintf(text, sizeof(text), "Subject: %s", spam_subject); header = _ds_create_header_field(text); if (header != NULL) { #ifdef VERBOSE LOGDEBUG("appending header %s: %s", header->heading, header->data); #endif nt_add(block->headers, (void *) header); } } return 0; } /* * quarantine_message(AGENT_CTX *ATX, const char *message, * const char *username) * * DESCRIPTION * Quarantine a message using DSPAM's internal quarantine function * * INPUT ARGUMENTS * ATX Agent context defining processing behavior * message Text message to quarantine * username Destination user * * RETURN VALUES * returns 0 on success, standard errors on failure */ int quarantine_message (AGENT_CTX *ATX, const char *message, const char *username) { char filename[MAX_FILENAME_LENGTH]; char *x, *msg; int line = 1, i; FILE *file; _ds_userdir_path(filename, _ds_read_attribute(agent_config, "Home"), LOOKUP(ATX->PTX, username), "mbox"); _ds_prepare_path_for(filename); file = fopen (filename, "a"); if (file == NULL) { LOG(LOG_ERR, ERR_IO_FILE_WRITE, filename, strerror (errno)); return EFILE; } i = _ds_get_fcntl_lock(fileno(file)); if (i) { LOG(LOG_WARNING, ERR_IO_LOCK, filename, i, strerror(errno)); return EFILE; } /* Write our own "From " header if the MTA didn't give us one. This * allows for the viewing of a mailbox from elm or some other local * client that would otherwise believe the mailbox is corrupt. */ if (strncmp (message, "From ", 5)) { char head[128]; time_t tm = time (NULL); snprintf (head, sizeof (head), "From QUARANTINE %s", ctime (&tm)); fputs (head, file); } msg = strdup(message); if (msg == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } /* TODO: Is there a way to do this without a strdup/strsep ? */ x = strsep (&msg, "\n"); while (x) { /* Quote any lines beginning with 'From ' to keep mbox from breaking */ if (!strncmp (x, "From ", 5) && line != 1) fputs (">", file); fputs (x, file); fputs ("\n", file); line++; x = strsep (&msg, "\n"); } free (msg); fputs ("\n\n", file); _ds_free_fcntl_lock(fileno(file)); fclose (file); return 0; } /* * write_web_stats(AGENT_CTX *ATX, const char *username, const char *group, * struct _ds_spam_totals *totals) * * DESCRIPTION * Writes a .stats file in the user's data directory for use with web UI * * INPUT ARGUMENTS * ATX Agent context defining processing behavior * username Destination user * group Group membership * totals Pointer to processing totals * * RETURN VALUES * returns 0 on success, standard errors on failure */ int write_web_stats ( AGENT_CTX *ATX, const char *username, const char *group, struct _ds_spam_totals *totals) { char filename[MAX_FILENAME_LENGTH]; FILE *file; if (!totals) return EINVAL; _ds_userdir_path(filename, _ds_read_attribute(agent_config, "Home"), LOOKUP(ATX->PTX, username), "stats"); _ds_prepare_path_for (filename); file = fopen (filename, "w"); if (file == NULL) { LOG(LOG_ERR, ERR_IO_FILE_WRITE, filename, strerror (errno)); return EFILE; } fprintf (file, "%ld,%ld,%ld,%ld,%ld,%ld\n", MAX(0, (totals->spam_learned + totals->spam_classified) - (totals->spam_misclassified + totals->spam_corpusfed)), MAX(0, (totals->innocent_learned + totals->innocent_classified) - (totals->innocent_misclassified + totals->innocent_corpusfed)), totals->spam_misclassified, totals->innocent_misclassified, totals->spam_corpusfed, totals->innocent_corpusfed); if (group) fprintf(file, "%s\n", group); fclose (file); return 0; } /* * inoculate_user(AGENT_CTX *ATX, const char *username, * struct _ds_spam_signature *SIG, const char *message) * * DESCRIPTION * Provide a vaccination for the spam processed to the target user * * INPUT ARGUMENTS * ATX Agent context defining processing behavior * username Target user * SIG Signature (if providing signature-based inoculation) * message Text Message (if providing message-based inoculation) * * RETURN VALUES * returns 0 on success, standard errors on failure */ int inoculate_user ( AGENT_CTX *ATX, const char *username, struct _ds_spam_signature *SIG, const char *message) { DSPAM_CTX *INOC; int do_inoc = 1, result = 0; int f_all = 0; LOGDEBUG ("checking if user %s requires this inoculation", username); if (user_classify(ATX, username, SIG, message) == DSR_ISSPAM) { do_inoc = 0; } if (!do_inoc) { LOGDEBUG ("skipping user %s: doesn't require inoculation", username); return EFAILURE; } else { LOGDEBUG ("inoculating user %s", username); if (ATX->flags & DAF_NOISE) f_all |= DSF_NOISE; if (ATX->PTX != NULL && strcmp(_ds_pref_val(ATX->PTX, "processorBias"), "")) { if (!strcmp(_ds_pref_val(ATX->PTX, "processorBias"), "on")) f_all |= DSF_BIAS; } else { if (_ds_match_attribute(agent_config, "ProcessorBias", "on")) f_all |= DSF_BIAS; } INOC = dspam_create (username, NULL, _ds_read_attribute(agent_config, "Home"), DSM_PROCESS, f_all); if (INOC) { set_libdspam_attributes(INOC); if (attach_context(INOC, ATX->dbh)) { LOG (LOG_WARNING, ERR_CORE_ATTACH); dspam_destroy(INOC); return EUNKNOWN; } INOC->classification = DSR_ISSPAM; INOC->source = DSS_INOCULATION; if (SIG) { INOC->flags |= DSF_SIGNATURE; INOC->signature = SIG; result = dspam_process (INOC, NULL); } else { result = dspam_process (INOC, message); } if (SIG) INOC->signature = NULL; dspam_destroy (INOC); } } return result; } /* * user_classify(AGENT_CTX *ATX, const char *username, * struct _ds_spam_signature *SIG, const char *message) * * DESCRIPTION * Determine the classification of a message for another user * * INPUT ARGUMENTS * ATX Agent context defining processing behavior * username Target user * SIG Signature (if performing signature-based classification) * message Text Message (if performing message-based ciassification) * * RETURN VALUES * returns DSR_ value, standard errors on failure */ int user_classify ( AGENT_CTX *ATX, const char *username, struct _ds_spam_signature *SIG, const char *message) { DSPAM_CTX *CLX; int result = 0; int f_all = 0; if (SIG == NULL && message == NULL) { LOG(LOG_WARNING, "user_classify(): SIG == NULL, message == NULL"); return EINVAL; } if (ATX->flags & DAF_NOISE) f_all |= DSF_NOISE; if (ATX->PTX != NULL && strcmp(_ds_pref_val(ATX->PTX, "processorBias"), "")) { if (!strcmp(_ds_pref_val(ATX->PTX, "processorBias"), "on")) f_all |= DSF_BIAS; } else { if (_ds_match_attribute(agent_config, "ProcessorBias", "on")) f_all |= DSF_BIAS; } /* First see if the user needs to be inoculated */ CLX = dspam_create (username, NULL, _ds_read_attribute(agent_config, "Home"), DSM_CLASSIFY, f_all); if (CLX) { set_libdspam_attributes(CLX); if (attach_context(CLX, ATX->dbh)) { LOG (LOG_WARNING, ERR_CORE_ATTACH); dspam_destroy(CLX); return EUNKNOWN; } if (SIG) { CLX->flags |= DSF_SIGNATURE; CLX->signature = SIG; result = dspam_process (CLX, NULL); } else { if (message == NULL) { LOG(LOG_WARNING, "user_classify: SIG = %ld, message = NULL\n", (unsigned long) SIG); if (SIG) CLX->signature = NULL; dspam_destroy (CLX); return EFAILURE; } result = dspam_process (CLX, message); } if (SIG) CLX->signature = NULL; if (result) { LOGDEBUG ("user_classify() returned error %d", result); result = EFAILURE; } else result = CLX->result; dspam_destroy (CLX); } return result; } /* * send_notice(AGENT_CTX *ATX, const char *filename, const char *mailer_args, * const char *username) * * DESCRIPTION * Sends a canned notice to the destination user * * INPUT ARGUMENTS * ATX Agent context defining processing behavior * filename Filename of canned notice * mailer_args Local agent arguments * username Destination user * * RETURN VALUES * returns 0 on success, standard errors on failure */ int send_notice( AGENT_CTX *ATX, const char *filename, const char *mailer_args, const char *username) { FILE *f; char msgfile[MAX_FILENAME_LENGTH]; buffer *b; char buf[1024]; time_t now; int ret; time(&now); if (_ds_read_attribute(agent_config, "TxtDirectory")) { snprintf(msgfile, sizeof(msgfile), "%s/%s", _ds_read_attribute(agent_config, "TxtDirectory"), filename); } else { snprintf(msgfile, sizeof(msgfile), "%s/txt/%s", _ds_read_attribute(agent_config, "Home"), filename); } f = fopen(msgfile, "r"); if (!f) { LOG(LOG_ERR, ERR_IO_FILE_OPEN, filename, strerror(errno)); return EFILE; } b = buffer_create(NULL); if (!b) { LOG(LOG_CRIT, ERR_MEM_ALLOC); fclose(f); return EUNKNOWN; } strftime(buf,sizeof(buf), "Date: %a, %d %b %Y %H:%M:%S %z\n", localtime(&now)); buffer_cat(b, buf); while(fgets(buf, sizeof(buf), f)!=NULL) { char *s = buf; char *w = strstr(buf, "$u"); while(w != NULL) { w[0] = 0; buffer_cat(b, s); buffer_cat(b, username); s = w+2; w = strstr(s, "$u"); } buffer_cat(b, s); } fclose(f); ret = deliver_message(ATX, b->data, mailer_args, username, stdout, DSR_ISINNOCENT); buffer_destroy(b); return ret; } /* * process_users(AGENT_CTX *ATX, buffer *message) * * DESCRIPTION * Primary processing loop: cycle through all destination users and process * * INPUT ARGUMENTS * ATX Agent context defining processing behavior * message Buffer structure containing text message * * RETURN VALUES * returns 0 on success, standard errors on failure */ int process_users(AGENT_CTX *ATX, buffer *message) { int i = 0, have_rcpts = 0, return_code = 0, retcode = 0; struct nt_node *node_nt; struct nt_node *node_rcpt = NULL; struct nt_c c_nt, c_rcpt; buffer *parse_message; agent_result_t presult = NULL; char *plus, *atsign; char mailbox[256]; FILE *fout; if (ATX->sockfd) { fout = ATX->sockfd; } else { fout = stdout; } node_nt = c_nt_first (ATX->users, &c_nt); if (ATX->recipients) { node_rcpt = c_nt_first (ATX->recipients, &c_rcpt); have_rcpts = ATX->recipients->items; } /* Keep going as long as we have destination users */ while (node_nt || node_rcpt) { struct stat s; char filename[MAX_FILENAME_LENGTH]; int optin, optout; char *username = NULL; /* If ServerParameters specifies a --user, there will only be one * instance on the stack, but possible multiple recipients. So we * need to recycle. */ if (node_nt == NULL) node_nt = ATX->users->first; /* Set the "current recipient" to either the next item on the rcpt stack * or the current user if not present. */ #ifdef EXT_LOOKUP verified_user = 0; if (_ds_match_attribute(agent_config, "ExtLookup", "on")) { LOGDEBUG ("looking up user %s using %s driver.", node_nt->ptr, _ds_read_attribute(agent_config, "ExtLookupDriver")); username = external_lookup(agent_config, node_nt->ptr, username); if (username != NULL) { LOGDEBUG ("external lookup verified user %s", node_nt->ptr); verified_user = 1; if (_ds_match_attribute(agent_config, "ExtLookupMode", "map") || _ds_match_attribute(agent_config, "ExtLookupMode", "strict")) { LOGDEBUG ("mapping address %s to uid %s", node_nt->ptr, username); node_nt->ptr = username; } } else if (_ds_match_attribute(agent_config, "ExtLookupMode", "map")) { LOGDEBUG ("no match for user %s but mode is %s. continuing...", node_nt->ptr, _ds_read_attribute(agent_config, "ExtLookupMode")); verified_user = 1; } } else { verified_user = 1; } #endif username = node_nt->ptr; if (node_rcpt) { ATX->recipient = node_rcpt->ptr; node_rcpt = c_nt_next (ATX->recipients, &c_rcpt); } else { /* We started out using the recipients list and it's exhausted, so quit */ if (have_rcpts) break; ATX->recipient = node_nt->ptr; } /* If support for "+detail" is enabled, save full mailbox name for delivery and strip detail for processing */ if (_ds_match_attribute(agent_config, "EnablePlusedDetail", "on")) { char plused_char = '+'; if (_ds_read_attribute(agent_config, "PlusedCharacter")) plused_char = _ds_read_attribute(agent_config, "PlusedCharacter")[0]; strlcpy(mailbox, username, sizeof(mailbox)); ATX->recipient = mailbox; if (_ds_match_attribute(agent_config, "PlusedUserLowercase", "on")) lc (username, username); plus = index(username, plused_char); if (plus) { atsign = index(plus, '@'); if (atsign) strcpy(plus, atsign); else *plus='\0'; } } presult = calloc(1, sizeof(struct agent_result)); parse_message = buffer_create(message->data); if (parse_message == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); presult->exitcode = ERC_PROCESS; strcpy(presult->text, ERR_MEM_ALLOC); if (ATX->results) { nt_add(ATX->results, presult); if (ATX->results->nodetype == NT_CHAR) free(presult); } else free(presult); presult = NULL; continue; } /* Determine whether to activate debug. If we're running in daemon mode, * debug is either on or off (it's a global variable), so this only * applies to running in client or local processing mode. */ #ifdef DEBUG if (!DO_DEBUG && (_ds_match_attribute(agent_config, "Debug", "*") || _ds_match_attribute(agent_config, "Debug", node_nt->ptr))) { // No DebugOpt specified; turn it on for everything if (!_ds_read_attribute(agent_config, "DebugOpt")) { DO_DEBUG = 1; } else { if (_ds_match_attribute(agent_config, "DebugOpt", "process") && ATX->source == DSS_NONE && ATX->operating_mode == DSM_PROCESS) { DO_DEBUG = 1; } if (_ds_match_attribute(agent_config, "DebugOpt", "classify") && ATX->operating_mode == DSM_CLASSIFY) { DO_DEBUG = 1; } if (_ds_match_attribute(agent_config, "DebugOpt", "spam") && ATX->classification == DSR_ISSPAM && ATX->source == DSS_ERROR) { DO_DEBUG = 1; } if (_ds_match_attribute(agent_config, "DebugOpt", "fp") && ATX->classification == DSR_ISINNOCENT && ATX->source == DSS_ERROR) { DO_DEBUG = 1; } if (_ds_match_attribute(agent_config, "DebugOpt", "inoculation") && ATX->source == DSS_INOCULATION) { DO_DEBUG = 1; } if (_ds_match_attribute(agent_config, "DebugOpt", "corpus") && ATX->source == DSS_CORPUS) { DO_DEBUG = 1; } } } ATX->status[0] = 0; if (DO_DEBUG) { LOGDEBUG ("DSPAM Instance Startup"); LOGDEBUG ("input args: %s", ATX->debug_args); LOGDEBUG ("pass-thru args: %s", ATX->mailer_args); LOGDEBUG ("processing user %s", (const char *) node_nt->ptr); LOGDEBUG ("uid = %d, euid = %d, gid = %d, egid = %d", getuid(), geteuid(), getgid(), getegid()); /* Write message to dspam.messags */ { FILE *f; char m[MAX_FILENAME_LENGTH]; snprintf (m, sizeof (m), "%s/dspam.messages", LOGDIR); f = fopen (m, "a"); if (f != NULL) { fprintf (f, "%s\n", parse_message->data); fclose (f); } } } #endif /* * Determine if the user is opted in or out */ ATX->PTX = load_aggregated_prefs(ATX, username); if (!strcmp(_ds_pref_val(ATX->PTX, "fallbackDomain"), "on")) { if (username != NULL && strchr(username, '@')) { char *domain = strchr(username, '@'); username = domain; } else { LOG(LOG_ERR, "process_users(): Can not fallback to domains for username '%s' without @domain part.", username); } } ATX->train_pristine = 0; if ((_ds_match_attribute(agent_config, "TrainPristine", "on") || !strcmp(_ds_pref_val(ATX->PTX, "trainPristine"), "on")) && strcmp(_ds_pref_val(ATX->PTX, "trainPristine"), "off")) { ATX->train_pristine = 1; } _ds_userdir_path(filename, _ds_read_attribute(agent_config, "Home"), LOOKUP(ATX->PTX, username), "dspam"); optin = stat(filename, &s); #ifdef HOMEDIR if (!optin && (!S_ISDIR(s.st_mode))) { optin = -1; LOG(LOG_WARNING, ERR_AGENT_OPTIN_DIR, filename); } #endif _ds_userdir_path(filename, _ds_read_attribute(agent_config, "Home"), LOOKUP(ATX->PTX, username), "nodspam"); optout = stat(filename, &s); /* If the message is too big to process, just deliver it */ if (_ds_read_attribute(agent_config, "MaxMessageSize")) { if (parse_message->used > atoi(_ds_read_attribute(agent_config, "MaxMessageSize"))) { LOG (LOG_INFO, "message too big, delivering"); optout = 0; } } /* Deliver the message if the user has opted not to be filtered */ optout = (optout) ? 0 : 1; optin = (optin) ? 0 : 1; if /* opted out implicitly */ (optout || !strcmp(_ds_pref_val(ATX->PTX, "optOut"), "on") || /* not opted in (in an opt-in system) */ (_ds_match_attribute(agent_config, "Opt", "in") && !optin && strcmp(_ds_pref_val(ATX->PTX, "optIn"), "on"))) { if (ATX->flags & DAF_DELIVER_INNOCENT) { retcode = deliver_message (ATX, parse_message->data, (ATX->flags & DAF_STDOUT) ? NULL : ATX->mailer_args, node_nt->ptr, fout, DSR_ISINNOCENT); if (retcode) presult->exitcode = ERC_DELIVERY; if (retcode == EINVAL) presult->exitcode = ERC_PERMANENT_DELIVERY; strlcpy(presult->text, ATX->status, sizeof(presult->text)); if (ATX->sockfd && ATX->flags & DAF_STDOUT) ATX->sockfd_output = 1; } } /* Call process_message(), then handle result appropriately */ else { char *result_string = NULL; int result; result = process_message (ATX, parse_message, username, &result_string); presult->classification = result; #ifdef CLAMAV if (result_string && !strcmp(result_string, LANG_CLASS_VIRUS)) { if (_ds_match_attribute(agent_config, "ClamAVResponse", "reject")) { presult->classification = DSR_ISSPAM; presult->exitcode = ERC_PERMANENT_DELIVERY; strlcpy(presult->text, ATX->status, sizeof(presult->text)); free(result_string); result_string = NULL; goto RSET; } else if (_ds_match_attribute(agent_config, "ClamAVResponse", "spam")) { presult->classification = DSR_ISSPAM; presult->exitcode = ERC_SUCCESS; result = DSR_ISSPAM; strlcpy(presult->text, ATX->status, sizeof(presult->text)); } else { presult->classification = DSR_ISINNOCENT; presult->exitcode = ERC_SUCCESS; free(result_string); result_string = NULL; goto RSET; } } #endif free(result_string); result_string = NULL; /* Exit code 99 for spam (when using broken return codes) */ if (_ds_match_attribute(agent_config, "Broken", "returnCodes")) { if (result == DSR_ISSPAM) return_code = 99; } /* * Classify Only */ if (ATX->operating_mode == DSM_CLASSIFY) { node_nt = c_nt_next (ATX->users, &c_nt); _ds_pref_free(ATX->PTX); free(ATX->PTX); ATX->PTX = NULL; buffer_destroy(parse_message); free(presult); presult = NULL; i++; continue; } /* * Classify and Process */ /* Innocent */ if (result != DSR_ISSPAM) { int deliver = 1; /* Processing Error */ if (result != DSR_ISINNOCENT) { if (ATX->classification != DSR_NONE) { deliver = 0; LOG (LOG_WARNING, "process_message returned error %d. dropping message.", result); } else if (ATX->classification == DSR_NONE) { LOG (LOG_WARNING, "process_message returned error %d. delivering.", result); } } /* Deliver */ if (deliver && ATX->flags & DAF_DELIVER_INNOCENT) { LOGDEBUG ("delivering message"); retcode = deliver_message (ATX, parse_message->data, (ATX->flags & DAF_STDOUT) ? NULL : ATX->mailer_args, node_nt->ptr, fout, DSR_ISINNOCENT); if (ATX->sockfd && ATX->flags & DAF_STDOUT) ATX->sockfd_output = 1; if (retcode) { presult->exitcode = ERC_DELIVERY; if (retcode == EINVAL) presult->exitcode = ERC_PERMANENT_DELIVERY; strlcpy(presult->text, ATX->status, sizeof(presult->text)); if (result == DSR_ISINNOCENT && _ds_match_attribute(agent_config, "OnFail", "unlearn") && ATX->learned) { ATX->classification = result; ATX->source = DSS_ERROR; ATX->flags |= DAF_UNLEARN; process_message (ATX, parse_message, username, NULL); } } } } /* Spam */ else { /* Do not Deliver Spam */ if (! (ATX->flags & DAF_DELIVER_SPAM)) { retcode = 0; /* If a specific quarantine has been configured, use it */ if (ATX->source != DSS_CORPUS) { if (ATX->spam_args[0] != 0 || (ATX->PTX != NULL && ( !strcmp(_ds_pref_val(ATX->PTX, "spamAction"), "tag") || !strcmp(_ds_pref_val(ATX->PTX, "spamAction"), "deliver") ) ) ) { if (ATX->classification == DSR_NONE) { if (ATX->spam_args[0] != 0) { retcode = deliver_message (ATX, parse_message->data, (ATX->flags & DAF_STDOUT) ? NULL : ATX->spam_args, node_nt->ptr, fout, DSR_ISSPAM); if (ATX->sockfd && ATX->flags & DAF_STDOUT) ATX->sockfd_output = 1; } else { retcode = deliver_message (ATX, parse_message->data, (ATX->flags & DAF_STDOUT) ? NULL : ATX->mailer_args, node_nt->ptr, fout, DSR_ISSPAM); if (ATX->sockfd && ATX->flags & DAF_STDOUT) ATX->sockfd_output = 1; } if (retcode) presult->exitcode = ERC_DELIVERY; if (retcode == EINVAL) presult->exitcode = ERC_PERMANENT_DELIVERY; strlcpy(presult->text, ATX->status, sizeof(presult->text)); } } else { /* Use standard quarantine procedure */ if (ATX->source == DSS_INOCULATION || ATX->classification == DSR_NONE) { if (ATX->flags & DAF_SUMMARY) { retcode = 0; } else { if (ATX->managed_group[0] == 0) retcode = quarantine_message (ATX, parse_message->data, username); else retcode = quarantine_message (ATX, parse_message->data, ATX->managed_group); } } } if (retcode) { presult->exitcode = ERC_DELIVERY; if (retcode == EINVAL) presult->exitcode = ERC_PERMANENT_DELIVERY; strlcpy(presult->text, ATX->status, sizeof(presult->text)); /* Unlearn the message on a local delivery failure */ if (_ds_match_attribute(agent_config, "OnFail", "unlearn") && ATX->learned) { ATX->classification = result; ATX->source = DSS_ERROR; ATX->flags |= DAF_UNLEARN; process_message (ATX, parse_message, username, NULL); } } } } /* Deliver Spam */ else { if (ATX->sockfd && ATX->flags & DAF_STDOUT) ATX->sockfd_output = 1; retcode = deliver_message (ATX, parse_message->data, (ATX->flags & DAF_STDOUT) ? NULL : ATX->mailer_args, node_nt->ptr, fout, DSR_ISSPAM); if (retcode) { presult->exitcode = ERC_DELIVERY; if (retcode == EINVAL) presult->exitcode = ERC_PERMANENT_DELIVERY; strlcpy(presult->text, ATX->status, sizeof(presult->text)); if (_ds_match_attribute(agent_config, "OnFail", "unlearn") && ATX->learned) { ATX->classification = result; ATX->source = DSS_ERROR; ATX->flags |= DAF_UNLEARN; process_message (ATX, parse_message, username, NULL); } } } } } #ifdef CLAMAV RSET: #endif _ds_pref_free(ATX->PTX); free(ATX->PTX); ATX->PTX = NULL; node_nt = c_nt_next (ATX->users, &c_nt); if (ATX->results) { nt_add(ATX->results, presult); if (ATX->results->nodetype == NT_CHAR) free(presult); } else free(presult); presult = NULL; LOGDEBUG ("DSPAM Instance Shutdown. Exit Code: %d", return_code); buffer_destroy(parse_message); } if (presult) free(presult); return return_code; } // break // load_agg // continue // return /* * find_signature(DSPAM_CTX *CTX, AGENT_CTX *ATX) * * DESCRIPTION * Find and parse DSPAM signature * * INPUT ARGUMENTS * CTX DSPAM context containing message and parameters * ATX Agent context defining processing behavior * * RETURN VALUES * returns 1 (and sets CTX->signature) if found * */ int find_signature(DSPAM_CTX *CTX, AGENT_CTX *ATX) { struct nt_node *node_nt; struct nt_c c, c2; ds_message_part_t block = NULL; char first_boundary[512]; int is_signed = 0, i = 0; char *signature_begin = NULL, *signature_end, *erase_begin; int signature_length, have_signature = 0; struct nt_node *node_header; first_boundary[0] = 0; if (ATX->signature[0] != 0) return 1; /* Iterate through each message component in search of a signature * and decode components as necessary */ node_nt = c_nt_first (CTX->message->components, &c); while (node_nt != NULL) { block = (ds_message_part_t) node_nt->ptr; if (block->media_type == MT_MULTIPART && block->media_subtype == MST_SIGNED) is_signed = 1; if (!strcmp(_ds_pref_val(ATX->PTX, "signatureLocation"), "headers")) is_signed = 2; #ifdef VERBOSE LOGDEBUG ("scanning component %d for a DSPAM signature", i); #endif if (block->media_type == MT_TEXT || block->media_type == MT_MESSAGE || block->media_type == MT_UNKNOWN || (!i && block->media_type == MT_MULTIPART)) { char *body; /* Verbose output of each message component */ #ifdef VERBOSE if (DO_DEBUG) { if (block->boundary != NULL) { LOGDEBUG (" : Boundary : %s", block->boundary); } if (block->terminating_boundary != NULL) LOGDEBUG (" : Term Boundary: %s", block->terminating_boundary); LOGDEBUG (" : Encoding : %d", block->encoding); LOGDEBUG (" : Media Type : %d", block->media_type); LOGDEBUG (" : Media Subtype: %d", block->media_subtype); LOGDEBUG (" : Headers:"); node_header = c_nt_first (block->headers, &c2); while (node_header != NULL) { ds_header_t header = (ds_header_t) node_header->ptr; LOGDEBUG (" %-32s %s", header->heading, header->data); node_header = c_nt_next (block->headers, &c2); } } #endif body = block->body->data; if (block->encoding == EN_BASE64 || block->encoding == EN_QUOTED_PRINTABLE) { if (block->content_disposition != PCD_ATTACHMENT) { #ifdef VERBOSE LOGDEBUG ("decoding message block from encoding type %d", block->encoding); #endif body = _ds_decode_block (block); if (is_signed) { LOGDEBUG ("message is signed. retaining original text for reassembly"); block->original_signed_body = block->body; } else { block->encoding = EN_8BIT; node_header = c_nt_first (block->headers, &c2); while (node_header != NULL) { ds_header_t header = (ds_header_t) node_header->ptr; if (!strcasecmp (header->heading, "Content-Transfer-Encoding")) { free (header->data); header->data = strdup ("8bit"); } node_header = c_nt_next (block->headers, &c2); } buffer_destroy (block->body); } block->body = buffer_create (body); free (body); body = block->body->data; } } if (!strcmp(_ds_pref_val(ATX->PTX, "signatureLocation"), "headers")) { if (block->headers != NULL && !have_signature) { struct nt_node *node_header; ds_header_t head; node_header = block->headers->first; while(node_header != NULL) { head = (ds_header_t) node_header->ptr; if (head->heading && !strcasecmp(head->heading, "X-DSPAM-Signature")) { if (!strncmp(head->data, SIGNATURE_BEGIN, strlen(SIGNATURE_BEGIN))) { body = head->data; } else { strlcpy(ATX->signature, head->data, sizeof(ATX->signature)); have_signature = 1; } break; } node_header = node_header->next; } } } if (!ATX->train_pristine && /* Don't keep searching if we've already found the signature in the * headers, and we're using signatureLocation=headers */ (!have_signature || strcmp(_ds_pref_val(ATX->PTX, "signatureLocation"), "headers"))) { /* Look for signature */ if (body != NULL) { int tight = 1; signature_begin = strstr (body, SIGNATURE_BEGIN); if (signature_begin == NULL) { signature_begin = strstr (body, LOOSE_SIGNATURE_BEGIN); tight = 0; } if (signature_begin) { erase_begin = signature_begin; if (tight) signature_begin += strlen(SIGNATURE_BEGIN); else { char *loose = strstr (signature_begin, SIGNATURE_DELIMITER); if (!loose) { LOGDEBUG("found loose signature begin, but no delimiter"); goto NEXT; } signature_begin = loose + strlen(SIGNATURE_DELIMITER); } signature_end = signature_begin; /* Find the signature's end character */ while (signature_end != NULL && signature_end[0] != 0 && (isalnum ((int) signature_end[0]) || signature_end[0] == 32 || signature_end[0] == ',')) { signature_end++; } if (signature_end != NULL) { signature_length = signature_end - signature_begin; if (signature_length < 128) { memcpy (ATX->signature, signature_begin, signature_length); ATX->signature[signature_length] = 0; while(isspace( (int) ATX->signature[0])) { memmove(ATX->signature, ATX->signature+1, strlen(ATX->signature)); } if (strcmp(_ds_pref_val(ATX->PTX, "signatureLocation"), "headers")) { if (!is_signed && ATX->classification == DSR_NONE) { memmove(erase_begin, signature_end+1, strlen(signature_end+1)+1); block->body->used = (long) strlen(body); } } have_signature = 1; LOGDEBUG ("found signature '%s'", ATX->signature); } } } } } /* TrainPristine */ } NEXT: node_nt = c_nt_next (CTX->message->components, &c); i++; } CTX->message->protect = is_signed; return have_signature; } /* * ctx_init(AGENT_CTX *ATX, const char *username) * * DESCRIPTION * Initialize a DSPAM context from an agent context * * INPUT ARGUMENTS * ATX Agent context defining processing behavior * username Destination user * * RETURN VALUES * pointer to newly allocated DSPAM context, NULL on failure * */ DSPAM_CTX *ctx_init(AGENT_CTX *ATX, const char *username) { /* We NEED a username. Without it we can't do much */ if (username == NULL) { LOG (LOG_CRIT, ERR_AGENT_USER_UNDEFINED); return NULL; } DSPAM_CTX *CTX; char filename[MAX_FILENAME_LENGTH]; char ctx_group[128] = { 0 }; int f_all = 0, f_mode = DSM_PROCESS; FILE *file; ATX->inoc_users = nt_create (NT_CHAR); if (ATX->inoc_users == NULL) { LOG (LOG_CRIT, ERR_MEM_ALLOC); return NULL; } ATX->classify_users = nt_create (NT_CHAR); if (ATX->classify_users == NULL) { nt_destroy(ATX->inoc_users); LOG (LOG_CRIT, ERR_MEM_ALLOC); return NULL; } /* Set Group Membership */ if (ATX->operating_mode == DSM_CLASSIFY) { LOGDEBUG ("Group support disabled in classify mode"); } else if (!strcmp(_ds_pref_val(ATX->PTX, "ignoreGroups"), "on")) { LOGDEBUG ("Ignoring groups due preference ignoreGroups on"); } else if (ATX->operating_mode == DSM_PROCESS) { snprintf (filename, sizeof (filename), "%s", _ds_read_attribute(agent_config, "GroupConfig")); file = fopen (filename, "r"); if (file != NULL) { int is_group_member_inoculation = 0; int is_group_member_classification = 0; int is_group_member_global = 0; int is_group_member_shared = 0; int is_group_member_merged = 0; char *group; char buffer[10240]; while (fgets (buffer, sizeof (buffer), file) != NULL) { int do_inocgroups = 0; int do_classgroups = 0; char *type, *list, *listentry; chomp (buffer); if (buffer[0] == 0 || buffer[0] == '#' || buffer[0] == ';') continue; list = strdup (buffer); listentry = strdup (buffer); group = strtok (buffer, ":"); if (group != NULL) { type = strtok (NULL, ":"); if (!type) continue; /* Check if user is member of inoculation group */ if (strcasecmp (type, "INOCULATION") == 0 && ATX->classification == DSR_ISSPAM && ATX->source != DSS_CORPUS) { if (is_group_member_shared == 1) { LOGDEBUG ("skipping innoculation group %s: user %s is already in a shared group", group, username); /* Process next entry in group file */ continue; } else { char *l = list, *u; strsep (&l, ":"); strsep (&l, ":"); u = strsep (&l, ","); while (u != NULL) { if (strcasecmp(u,username) == 0) { LOGDEBUG ("user %s is member of inoculation group %s", username, group); is_group_member_inoculation = 1; do_inocgroups = 1; break; } u = strsep (&l, ","); } } } /* Check if user is member of classification group */ else if (strcasecmp (type, "CLASSIFICATION") == 0) { if (is_group_member_shared == 1) { LOGDEBUG ("skipping classification or global group %s: user %s is already in a shared group", group, username); /* Process next entry in group file */ continue; } else { char *l = list, *u; strsep (&l, ":"); strsep (&l, ":"); u = strsep (&l, ","); while (u != NULL) { if (u[0] == '*' && strcmp(u,"*") != 0) { if (is_group_member_classification == 1) { LOGDEBUG ("skipping global group %s: user %s is already in a classification group", group, username); break; } LOGDEBUG ("user %s is member of global group %s", username, group); is_group_member_global = 1; do_classgroups = 1; break; } else if (strcasecmp(u,username) == 0) { if (is_group_member_global == 1) { LOGDEBUG ("skipping classification group %s: user %s is already in a global group", group, username); break; } LOGDEBUG ("user %s is member of classification group %s", username, group); is_group_member_classification = 1; do_classgroups = 1; break; } u = strsep (&l, ","); } } } /* Process shared and shared,managed group */ else if (strncasecmp (type, "SHARED", 6) == 0) { if (is_group_member_shared == 1) { LOGDEBUG ("skipping shared group %s: user %s is already in a shared group", group, username); /* Process next entry in group file */ continue; } else if (is_group_member_merged == 1) { LOGDEBUG ("skipping shared group %s: user %s is already in a merged group", group, username); /* Process next entry in group file */ continue; } else if (is_group_member_inoculation == 1) { LOGDEBUG ("skipping shared group %s: user %s is already in a inoculation group", group, username); /* Process next entry in group file */ continue; } else if (is_group_member_classification == 1) { LOGDEBUG ("skipping shared group %s: user %s is already in a classification group", group, username); /* Process next entry in group file */ continue; } else if (is_group_member_global == 1) { LOGDEBUG ("skipping shared group %s: user %s is already in a global group", group, username); /* Process next entry in group file */ continue; } else { char *l = list, *u; strsep (&l, ":"); strsep (&l, ":"); u = strsep (&l, ","); while (u != NULL) { if (strcasecmp(u,username) == 0 || strcmp(u,"*") == 0 || (strncmp(u,"*@",2) == 0 && strchr(username,'@') != NULL && strcasecmp(u+1,strchr(username,'@')) == 0)) { LOGDEBUG ("assigning user %s to shared group %s", username, group); strlcpy (ctx_group, group, sizeof (ctx_group)); if (strncasecmp (type + 6, ",MANAGED", 8) == 0) { LOGDEBUG ("shared group is managed by %s", group); strlcpy (ATX->managed_group, ctx_group, sizeof(ATX->managed_group)); } is_group_member_shared = 1; break; } u = strsep (&l, ","); } } /* Process next entry in group file */ continue; } /* Process merged group */ else if (strcasecmp (type, "MERGED") == 0 && strcasecmp(group, username) != 0) { if (is_group_member_merged == 1) { LOGDEBUG ("skipping merged group %s: user %s is already in merged group %s", group, username, ctx_group); /* Process next entry in group file */ continue; } else if (is_group_member_shared == 1) { LOGDEBUG ("skipping merged group %s: user %s is already in a shared group", group, username); /* Process next entry in group file */ continue; } else if (ATX->flags & DAF_MERGED) { LOGDEBUG ("BUG in DSPAM. Please report this bug:"); LOGDEBUG (" --> Skipping merged group %s: user %s is already in merged group %s", group, username, ctx_group); /* Process next entry in group file */ continue; } else { char *l = list, *u; strsep (&l, ":"); strsep (&l, ":"); u = strsep (&l, ","); while (u != NULL) { if (strcasecmp(u,username) == 0 || strcmp(u,"*") == 0 || (strncmp(u,"*@",2) == 0 && strchr(username,'@') != NULL && strcasecmp(u+1,strchr(username,'@')) == 0)) { if (is_group_member_merged == 1) { LOGDEBUG ("skipping entry %s for merged group %s. User is already in merged group.", u, group); continue; } else { LOGDEBUG ("adding user to merged group %s", group); ATX->flags |= DAF_MERGED; strlcpy(ctx_group, group, sizeof(ctx_group)); is_group_member_merged = 1; } } else if ((strncmp(u,"-",1) == 0 && strcasecmp(u+1,username) == 0) || (strncmp(u,"-*@",3) == 0 && strchr(username,'@') != NULL && strcasecmp(u+2,strchr(username,'@')) == 0)) { if (is_group_member_merged == 0) { LOGDEBUG ("skipping entry %s for merged group %s. User is already not in merged group.", u, group); continue; } else { LOGDEBUG ("removing user from merged group %s", group); ATX->flags ^= DAF_MERGED; ctx_group[0] = 0; is_group_member_merged = 0; } } else { LOGDEBUG ("unhandled entry %s in merged group %s", u, group); } u = strsep (&l, ","); } } /* Process next entry in group file */ continue; } /* * If we are reporting a spam, report it as a spam to all other * users in the inoculation group */ if (do_inocgroups) { char *l = listentry, *u; strsep (&l, ":"); strsep (&l, ":"); u = strsep (&l, ","); while (u != NULL) { if (strcasecmp(u,username) != 0) { LOGDEBUG ("adding user %s as target for inoculation", u); nt_add (ATX->inoc_users, u); } u = strsep (&l, ","); } } /* * When user is member of a global group or classification network * then consult all other users in the group */ else if (do_classgroups) { char *l = listentry, *u; strsep (&l, ":"); strsep (&l, ":"); u = strsep (&l, ","); while (u != NULL) { if (u[0] == '*' && strcmp(u,"*") != 0) { /* global classification group */ if (is_group_member_classification == 1) { LOGDEBUG ("skipping global group (%s) entry %s: user %s is already in a classification group", group, u, username); continue; } else if (strcasecmp(u+1,username) != 0 && is_group_member_global == 1) { LOGDEBUG ("adding %s as classification peer for %s", u+1, username); ATX->flags |= DAF_GLOBAL; nt_add (ATX->classify_users, u+1); } else { LOGDEBUG ("skipping global group entry %s for user %s", u+1, username); } } else if (strcasecmp(u,username) != 0) { /* classification network group */ if (is_group_member_global == 1) { LOGDEBUG ("skipping classification group (%s) entry %s: user %s is already in a global group", group, u, username); continue; } else if (is_group_member_classification == 1) { LOGDEBUG ("adding user %s to classification network group %", u, group); nt_add (ATX->classify_users, u); } else { LOGDEBUG ("skipping classification group entry %s for user %s", u, username); } } u = strsep (&l, ","); } } } free (list); free (listentry); } fclose (file); } } /* Crunch our agent context into a DSPAM context */ f_mode = ATX->operating_mode; f_all = DSF_SIGNATURE; if (ATX->flags & DAF_UNLEARN) f_all |= DSF_UNLEARN; /* If there is no preference, defer to commandline */ if (ATX->PTX != NULL && strcmp(_ds_pref_val(ATX->PTX, "enableBNR"), "")) { if (!strcmp(_ds_pref_val(ATX->PTX, "enableBNR"), "on")) f_all |= DSF_NOISE; } else { if (ATX->flags & DAF_NOISE) f_all |= DSF_NOISE; } if (ATX->PTX != NULL && strcmp(_ds_pref_val(ATX->PTX, "processorBias"), "")) { if (!strcmp(_ds_pref_val(ATX->PTX, "processorBias"), "on")) f_all |= DSF_BIAS; } else { if (_ds_match_attribute(agent_config, "ProcessorBias", "on")) f_all |= DSF_BIAS; } if (ATX->PTX != NULL && strcmp(_ds_pref_val(ATX->PTX, "enableWhitelist"), "")) { if (!strcmp(_ds_pref_val(ATX->PTX, "enableWhitelist"), "on")) f_all |= DSF_WHITELIST; } else { if (ATX->flags & DAF_WHITELIST) f_all |= DSF_WHITELIST; } if (ATX->flags & DAF_MERGED) f_all |= DSF_MERGED; CTX = dspam_create (username, ctx_group, _ds_read_attribute(agent_config, "Home"), f_mode, f_all); if (CTX == NULL) return NULL; if (ATX->PTX != NULL && strcmp(_ds_pref_val(ATX->PTX, "statisticalSedation"), "")) { CTX->training_buffer = atoi(_ds_pref_val(ATX->PTX, "statisticalSedation")); LOGDEBUG("sedation level set to: %d", CTX->training_buffer); } else if (ATX->training_buffer>=0) { CTX->training_buffer = ATX->training_buffer; LOGDEBUG("sedation level set to: %d", CTX->training_buffer); } if (ATX->PTX != NULL && strcmp(_ds_pref_val(ATX->PTX, "whitelistThreshold"), "")) CTX->wh_threshold = atoi(_ds_pref_val(ATX->PTX, "whitelistThreshold")); if (ATX->classification != DSR_NONE) { CTX->classification = ATX->classification; CTX->source = ATX->source; } if (!( ATX->flags & DAF_FIXED_TR_MODE) && ATX->PTX != NULL && strcmp(_ds_pref_val(ATX->PTX, "trainingMode"), "")) { if (!strcasecmp(_ds_pref_val(ATX->PTX, "trainingMode"), "TEFT")) CTX->training_mode = DST_TEFT; else if (!strcasecmp(_ds_pref_val(ATX->PTX, "trainingMode"), "TOE")) CTX->training_mode = DST_TOE; else if (!strcasecmp(_ds_pref_val(ATX->PTX, "trainingMode"), "TUM")) CTX->training_mode = DST_TUM; else if (!strcasecmp(_ds_pref_val(ATX->PTX, "trainingMode"), "NOTRAIN")) CTX->training_mode = DST_NOTRAIN; else CTX->training_mode = ATX->training_mode; } else { CTX->training_mode = ATX->training_mode; } return CTX; } /* * retrain_message(DSPAM_CTX *CTX, AGENT_CTX *ATX) * * DESCRIPTION * Retrain a message and perform iterative training * * INPUT ARGUMENTS * CTX DSPAM context containing the classification results * ATX Agent context defining processing behavior * * RETURN VALUES * returns 0 on success, standard errors on failure */ int retrain_message(DSPAM_CTX *CTX, AGENT_CTX *ATX) { int do_train = 1, iter = 0, ck_result = 0, t_mode = CTX->source; /* Train until test conditions are met, 5 iterations max */ if (!_ds_match_attribute(agent_config, "TestConditionalTraining", "on")) { ck_result = dspam_process (CTX, NULL); if (ck_result != 0) return EFAILURE; } else { while (do_train && iter < 5) { DSPAM_CTX *CLX; int match; match = (CTX->classification == DSR_ISSPAM) ? DSR_ISSPAM : DSR_ISINNOCENT; iter++; ck_result = dspam_process (CTX, NULL); if (ck_result != 0) return EFAILURE; /* Only subtract innocent values once */ CTX->source = DSS_CORPUS; LOGDEBUG ("reclassifying iteration %d result: %d", iter, ck_result); if (t_mode == DSS_CORPUS) do_train = 0; /* Only attempt test-conditional training on a mature corpus */ if (CTX->totals.innocent_learned+CTX->totals.innocent_classified<1000 && CTX->classification == DSR_ISSPAM) { do_train = 0; } else { int f_all = DSF_SIGNATURE; /* CLX = Classify Context */ if (ATX->flags & DAF_NOISE) f_all |= DSF_NOISE; if (ATX->PTX != NULL && strcmp(_ds_pref_val(ATX->PTX, "processorBias"), "")) { if (!strcmp(_ds_pref_val(ATX->PTX, "processorBias"), "on")) f_all |= DSF_BIAS; } else { if (_ds_match_attribute(agent_config, "ProcessorBias", "on")) f_all |= DSF_BIAS; } CLX = dspam_create (CTX->username, CTX->group, _ds_read_attribute(agent_config, "Home"), DSM_CLASSIFY, f_all); if (!CLX) break; CLX->training_mode = CTX->training_mode; set_libdspam_attributes(CLX); if (attach_context(CLX, ATX->dbh)) { dspam_destroy(CLX); break; } CLX->signature = &ATX->SIG; ck_result = dspam_process (CLX, NULL); if (ck_result < 0) { CLX->signature = NULL; dspam_destroy(CLX); return EFAILURE; } if (ck_result == 0 || CLX->result == match) do_train = 0; CLX->signature = NULL; dspam_destroy (CLX); } } CTX->source = DSS_ERROR; } return 0; } /* * ensure_confident_result(DSPAM_CTX *CTX, AGENT_CTX *ATX, int result) * * DESCRIPTION * Consult a global group or classification network if * the user's filter instance isn't confident in its result * * INPUT ARGUMENTS * CTX DSPAM context containing classification results * ATX Agent context defining processing behavior * result DSR_ processing result * * RETURN VALUES * returns result networks believe the message should be */ /* ensure_confident_result: consult global group or clasification network if the user isn't confident in their result */ int ensure_confident_result(DSPAM_CTX *CTX, AGENT_CTX *ATX, int result) { int was_spam = 0; /* Exit if no users available for global group or classification network */ if (ATX->classify_users && ATX->classify_users->items == 0) return result; /* global groups or classification network only operates on SPAM or INNOCENT */ if (strcmp(CTX->class, LANG_CLASS_WHITELISTED) ==0 || strcmp(CTX->class, LANG_CLASS_VIRUS) == 0 || strcmp(CTX->class, LANG_CLASS_BLOCKLISTED) == 0 || strcmp(CTX->class, LANG_CLASS_BLACKLISTED) == 0) { LOGDEBUG ("Not consulting %s group: message class is %s", (ATX->flags & DAF_GLOBAL) ? "global" : "classification", CTX->class); return result; } /* Defer to global group */ if (ATX->flags & DAF_GLOBAL && ((CTX->totals.innocent_learned + CTX->totals.innocent_corpusfed < 1000 || CTX->totals.spam_learned + CTX->totals.spam_corpusfed < 250) || (CTX->training_mode == DST_NOTRAIN)) ) { if (result == DSR_ISSPAM) { was_spam = 1; CTX->result = DSR_ISINNOCENT; result = DSR_ISINNOCENT; } CTX->confidence = 0.60f; } if (result != DSR_ISSPAM && CTX->operating_mode == DSM_PROCESS && CTX->classification == DSR_NONE && CTX->confidence < 0.65) { LOGDEBUG ("consulting %s group member list", (ATX->flags & DAF_GLOBAL) ? "global" : "classification"); struct nt_node *node_int; struct nt_c c_i; node_int = c_nt_first (ATX->classify_users, &c_i); while (node_int != NULL && result != DSR_ISSPAM) { LOGDEBUG ("checking result for user %s", (const char *) node_int->ptr); result = user_classify (ATX, (const char *) node_int->ptr, CTX->signature, NULL); if (result == DSR_ISSPAM) { LOGDEBUG ("CLASSIFY CATCH: %s", (const char *) node_int->ptr); CTX->result = result; } node_int = c_nt_next (ATX->classify_users, &c_i); } /* If the global user thinks it's spam, and the user thought it was * innocent, retrain the user as a false negative. */ if (result == DSR_ISSPAM && !was_spam) { LOGDEBUG ("re-adding as %s", LANG_CLASS_SPAM); DSPAM_CTX *CTC = malloc(sizeof(DSPAM_CTX)); if (CTC == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } memcpy(CTC, CTX, sizeof(DSPAM_CTX)); CTC->operating_mode = DSM_PROCESS; CTC->classification = DSR_ISSPAM; CTC->source = DSS_ERROR; CTC->flags |= DSF_SIGNATURE; dspam_process (CTC, NULL); memcpy(&CTX->totals, &CTC->totals, sizeof(struct _ds_spam_totals)); free(CTC); CTC = NULL; CTX->totals.spam_misclassified--; strncpy(CTX->class, LANG_CLASS_SPAM, sizeof(CTX->class)); /* should we be resetting CTX->probability and CTX->confidence here as well? */ CTX->result = result; /* If the global user thinks it's innocent, and the user thought it was * spam, retrain the user as a false positive */ } else if (result == DSR_ISINNOCENT && was_spam) { LOGDEBUG ("re-adding as %s", LANG_CLASS_INNOCENT); DSPAM_CTX *CTC = malloc(sizeof(DSPAM_CTX)); if (CTC == NULL) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } memcpy(CTC, CTX, sizeof(DSPAM_CTX)); CTC->operating_mode = DSM_PROCESS; CTC->classification = DSR_ISINNOCENT; CTC->source = DSS_ERROR; CTC->flags |= DSF_SIGNATURE; dspam_process (CTC, NULL); memcpy(&CTX->totals, &CTC->totals, sizeof(struct _ds_spam_totals)); free(CTC); CTC = NULL; CTX->totals.innocent_misclassified--; strncpy(CTX->class, LANG_CLASS_INNOCENT, sizeof(CTX->class)); /* should we be resetting CTX->probability and CTX->confidence here as well? */ CTX->result = result; } } return result; } /* * log_prepare(char *buffer, char *value) * * DESCRIPTION * Prepares a value for logging by copying it to the buffer and removing * all potentially dangerous characters. * * INPUT ARGUMENTS * buffer A 256-byte buffer to store the result into * value Value to be logged or NULL * * RETURN VALUES * None */ static void log_prepare(char *buffer, char *value) { char *p; if (!value) value = ""; strncpy(buffer, value, 255); buffer[255] = 0; for (p=buffer; *p; p++) if (*p >= 0 && *p < 32) *p = ' '; } /* * log_events(DSPAM_CTX *CTX, AGENT_CTX *ATX) * * DESCRIPTION * Log events to system and user logs * * INPUT ARGUMENTS * CTX DSPAM context * ATX Agent context defining processing behavior * * RETURN VALUES * returns 0 on success, standard errors on failure */ int log_events(DSPAM_CTX *CTX, AGENT_CTX *ATX) { char filename[MAX_FILENAME_LENGTH]; char *subject = NULL, *from = NULL; struct nt_node *node_nt; struct nt_c c_nt; FILE *file; char class; char x[1024], subject_buf[256], from_buf[256]; char *messageid = NULL; if (CTX->message) messageid = _ds_find_header(CTX->message, "Message-Id"); if (ATX->status[0] == 0 && CTX->source == DSS_ERROR && (!(ATX->flags & DAF_UNLEARN))) { STATUS("Retrained"); } if (ATX->status[0] == 0 && CTX->classification == DSR_NONE && CTX->result == DSR_ISSPAM && ATX->status[0] == 0) { if (_ds_pref_val(ATX->PTX, "spamAction")[0] == 0 || !strcmp(_ds_pref_val(ATX->PTX, "spamAction"), "quarantine")) { STATUS("Quarantined"); } else if (!strcmp(_ds_pref_val(ATX->PTX, "spamAction"), "tag")) { STATUS("Tagged"); } else if (!strcmp(_ds_pref_val(ATX->PTX, "spamAction"), "deliver")) { STATUS("Delivered"); } } if (ATX->status[0] == 0 && CTX->classification == DSR_NONE && CTX->result == DSR_ISINNOCENT) { STATUS("Delivered"); } _ds_userdir_path(filename, _ds_read_attribute(agent_config, "Home"), LOOKUP(ATX->PTX, (ATX->managed_group[0]) ? ATX->managed_group : CTX->username), "log"); if (CTX->message) { node_nt = c_nt_first (CTX->message->components, &c_nt); if (node_nt != NULL) { ds_message_part_t block; block = node_nt->ptr; if (block->headers != NULL) { ds_header_t head; struct nt_node *node_header; node_header = block->headers->first; while(node_header != NULL) { head = (ds_header_t) node_header->ptr; if (head) { if (!strcasecmp(head->heading, "Subject")) { subject = head->data; if (from != NULL) break; } else if (!strcasecmp(head->heading, "From")) { from = head->data; if (subject != NULL) break; } } node_header = node_header->next; } } } } if (!strcmp(CTX->class, LANG_CLASS_WHITELISTED)) class = 'W'; else if (!strcmp(CTX->class, LANG_CLASS_VIRUS)) class = 'V'; else if (!strcmp(CTX->class, LANG_CLASS_BLACKLISTED)) class = 'A'; else if (!strcmp(CTX->class, LANG_CLASS_BLOCKLISTED)) class = 'O'; else if (CTX->result == DSR_ISSPAM) class = 'S'; else if (CTX->result == DSR_ISINNOCENT) class = 'I'; else class = 'U'; if (CTX->source == DSS_ERROR) { if (CTX->classification == DSR_ISSPAM) class = 'M'; else if (CTX->classification == DSR_ISINNOCENT) class = 'F'; } else if (CTX->source == DSS_INOCULATION) class = 'N'; else if (CTX->source == DSS_CORPUS) class = 'C'; if (ATX->flags & DAF_UNLEARN) { char stat[256]; snprintf(stat, sizeof(stat), "Delivery Failed (%s)", (ATX->status[0]) ? ATX->status : "No error provided"); STATUS("%s", stat); class = 'E'; } log_prepare(from_buf, from); log_prepare(subject_buf, subject); /* Write USER.log */ if (_ds_match_attribute(agent_config, "UserLog", "on")) { snprintf(x, sizeof(x), "%ld\t%c\t%s\t%s\t%s\t%s\t%s\n", (long) time(NULL), class, from_buf, ATX->signature, subject_buf, ATX->status, (messageid) ? messageid : ""); _ds_prepare_path_for(filename); file = fopen(filename, "a"); if (file != NULL) { int i = _ds_get_fcntl_lock(fileno(file)); if (!i) { fputs(x, file); fputs("\n", file); _ds_free_fcntl_lock(fileno(file)); } else { LOG(LOG_WARNING, ERR_IO_LOCK, filename, i, strerror(errno)); } fclose(file); } } /* Write system.log */ if (_ds_match_attribute(agent_config, "SystemLog", "on")) { snprintf(filename, sizeof(filename), "%s/system.log", _ds_read_attribute(agent_config, "Home")); file = fopen(filename, "a"); if (file != NULL) { int i = _ds_get_fcntl_lock(fileno(file)); if (!i) { snprintf(x, sizeof(x), "%ld\t%c\t%s\t%s\t%s\t%f\t%s\t%s\t%s\n", (long) time(NULL), class, from_buf, ATX->signature, subject_buf, _ds_gettime()-ATX->timestart, (CTX->username) ? CTX->username: "", (ATX->status) ? ATX->status : "", (messageid) ? messageid : ""); fputs(x, file); _ds_free_fcntl_lock(fileno(file)); } else { LOG(LOG_WARNING, ERR_IO_LOCK, filename, i, strerror(errno)); } fclose(file); } } return 0; } /* * add_xdspam_headers(DSPAM_CTX *CTX, AGENT_CTX *ATX) * * DESCRIPTION * Add X-DSPAM headers to the message being processed * * INPUT ARGUMENTS * CTX DSPAM context containing message and results * ATX Agent context defining processing behavior * * RETURN VALUES * returns 0 on success, standard errors on failure */ int add_xdspam_headers(DSPAM_CTX *CTX, AGENT_CTX *ATX) { struct nt_node *node_nt; struct nt_c c_nt; node_nt = c_nt_first (CTX->message->components, &c_nt); if (node_nt != NULL) { ds_message_part_t block = node_nt->ptr; struct nt_node *node_ft; struct nt_c c_ft; if (block != NULL && block->headers != NULL) { ds_header_t head; char data[10240]; char scratch[128]; snprintf(data, sizeof(data), "%s: %s", (CTX->source == DSS_ERROR) ? "X-DSPAM-Reclassified" : "X-DSPAM-Result", CTX->class); head = _ds_create_header_field(data); if (head != NULL) { #ifdef VERBOSE LOGDEBUG ("appending header %s: %s", head->heading, head->data); #endif nt_add (block->headers, (void *) head); } else { LOG (LOG_CRIT, ERR_MEM_ALLOC); } if (CTX->source == DSS_NONE) { char buf[27]; time_t t = time(NULL); ctime_r(&t, buf); chomp(buf); snprintf(data, sizeof(data), "X-DSPAM-Processed: %s", buf); head = _ds_create_header_field(data); if (head != NULL) { #ifdef VERBOSE LOGDEBUG("appending header %s: %s", head->heading, head->data); #endif nt_add(block->headers, (void *) head); } else LOG (LOG_CRIT, ERR_MEM_ALLOC); } if (CTX->source != DSS_ERROR) { snprintf(data, sizeof(data), "X-DSPAM-Confidence: %01.4f", CTX->confidence); head = _ds_create_header_field(data); if (head != NULL) { #ifdef VERBOSE LOGDEBUG("appending header %s: %s", head->heading, head->data); #endif nt_add(block->headers, (void *) head); } else LOG (LOG_CRIT, ERR_MEM_ALLOC); if (_ds_match_attribute(agent_config, "ImprobabilityDrive", "on")) { float probability = CTX->confidence; char *as; if (probability > 0.999999) probability = 0.999999; if (CTX->result == DSR_ISINNOCENT) { as = "spam"; } else { as = "ham"; } snprintf(data, sizeof(data), "X-DSPAM-Improbability: 1 in %.0f " "chance of being %s", 1.0+(100*(probability / (1-probability))), as); head = _ds_create_header_field(data); if (head != NULL) { #ifdef VERBOSE LOGDEBUG("appending header %s: %s", head->heading, head->data); #endif nt_add(block->headers, (void *) head); } else LOG (LOG_CRIT, ERR_MEM_ALLOC); } snprintf(data, sizeof(data), "X-DSPAM-Probability: %01.4f", CTX->probability); head = _ds_create_header_field(data); if (head != NULL) { #ifdef VERBOSE LOGDEBUG ("appending header %s: %s", head->heading, head->data); #endif nt_add (block->headers, (void *) head); } else LOG (LOG_CRIT, ERR_MEM_ALLOC); if (CTX->training_mode != DST_NOTRAIN && ATX->signature[0] != 0) { snprintf(data, sizeof(data), "X-DSPAM-Signature: %s", ATX->signature); head = _ds_create_header_field(data); if (head != NULL) { if (strlen(ATX->signature)<5) { LOGDEBUG("WARNING: Signature not generated, or invalid"); } #ifdef VERBOSE LOGDEBUG ("appending header %s: %s", head->heading, head->data); #endif nt_add (block->headers, (void *) head); } else LOG (LOG_CRIT, ERR_MEM_ALLOC); } if (CTX->result == DSR_ISSPAM && (ATX->managed_group[0] || (_ds_pref_val(ATX->PTX, "localStore")[0]))) { snprintf(data, sizeof(data), "X-DSPAM-User: %s", CTX->username); head = _ds_create_header_field(data); if (head != NULL) { #ifdef VERBOSE LOGDEBUG ("appending header %s: %s", head->heading, head->data); #endif nt_add (block->headers, (void *) head); } else LOG (LOG_CRIT, ERR_MEM_ALLOC); } if (!strcmp(_ds_pref_val(ATX->PTX, "showFactors"), "on")) { if (CTX->factors != NULL) { snprintf(data, sizeof(data), "X-DSPAM-Factors: %d", CTX->factors->items); node_ft = c_nt_first(CTX->factors, &c_ft); while(node_ft != NULL) { struct dspam_factor *f = (struct dspam_factor *) node_ft->ptr; if (f) { char *s, *t; strlcat(data, ",\n\t", sizeof(data)); s = f->token_name; t = scratch; while (*s && t < scratch + sizeof(scratch) - 16) if (*s >= ' ' && *s < 0x7f && *s != '%') *t++ = *s++; else t += sprintf(t, "%%%02x", (unsigned char) *s++); snprintf(t, 15, ", %2.5f", f->value); strlcat(data, scratch, sizeof(data)); } node_ft = c_nt_next(CTX->factors, &c_ft); } head = _ds_create_header_field(data); if (head != NULL) { #ifdef VERBOSE LOGDEBUG("appending header %s: %s", head->heading, head->data); #endif nt_add(block->headers, (void *) head); } } } } /* CTX->source != DSS_ERROR */ } } return 0; } /* * embed_msgtag(DSPAM_CTX *CTX, AGENT_CTX *ATX) * * DESCRIPTION * Embed a message tag * * INPUT ARGUMENTS * CTX DSPAM context containing the message * ATX Agent context defining processing behavior * * RETURN VALUES * returns 0 on success, standard errors on failure */ int embed_msgtag(DSPAM_CTX *CTX, AGENT_CTX *ATX) { struct nt_node *node_nt; struct nt_c c_nt; char toplevel_boundary[128] = { 0 }; ds_message_part_t block; int i = 0; FILE *f; char buff[1024], msgfile[MAX_FILENAME_LENGTH]; buffer *b; ATX = ATX; /* Keep compiler happy */ if (CTX->result != DSR_ISSPAM && CTX->result != DSR_ISINNOCENT) return EINVAL; node_nt = c_nt_first (CTX->message->components, &c_nt); if (node_nt == NULL || node_nt->ptr == NULL) return EFAILURE; block = node_nt->ptr; /* Signed messages cannot be tagged */ if (block->media_subtype == MST_SIGNED) return EINVAL; /* Load the message tag */ if (_ds_read_attribute(agent_config, "TxtDirectory")) { snprintf(msgfile, sizeof(msgfile), "%s/msgtag.%s", _ds_read_attribute(agent_config, "TxtDirectory"), (CTX->result == DSR_ISSPAM) ? "spam" : "nonspam"); } else { snprintf(msgfile, sizeof(msgfile), "%s/txt/msgtag.%s", _ds_read_attribute(agent_config, "Home"), (CTX->result == DSR_ISSPAM) ? "spam" : "nonspam"); } f = fopen(msgfile, "r"); if (!f) { LOG(LOG_ERR, ERR_IO_FILE_OPEN, msgfile, strerror(errno)); return EFILE; } b = buffer_create(NULL); if (!b) { LOG(LOG_CRIT, ERR_MEM_ALLOC); fclose(f); return EUNKNOWN; } while(fgets(buff, sizeof(buff), f)!=NULL) { buffer_cat(b, buff); } fclose(f); if (block->media_type == MT_MULTIPART && block->terminating_boundary != NULL) { strlcpy(toplevel_boundary, block->terminating_boundary, sizeof(toplevel_boundary)); } while (node_nt != NULL) { char *body_close = NULL, *dup = NULL; block = node_nt->ptr; /* Append signature to blocks when... */ if (block != NULL /* Either a text section, or this is a non-multipart message AND...*/ && (block->media_type == MT_TEXT || (block->boundary == NULL && i == 0 && block->media_type != MT_MULTIPART)) && (toplevel_boundary[0] == 0 || (block->body && block->body->used))) { if (block->content_disposition == PCD_ATTACHMENT) { node_nt = c_nt_next (CTX->message->components, &c_nt); i++; continue; } /* Some email clients reformat HTML parts, and require that we include * the signature before the HTML close tags (because they're stupid) */ if (body_close == NULL && block->body != NULL && block->body->data != NULL && block->media_subtype == MST_HTML) { body_close = strcasestr(block->body->data, "body->data, "body->used -= (long) strlen (dup); body_close[0] = 0; } buffer_cat (block->body, "\n"); buffer_cat (block->body, b->data); if (dup) { buffer_cat (block->body, dup); free (dup); } } node_nt = c_nt_next (CTX->message->components, &c_nt); i++; } buffer_destroy(b); return 0; } /* * embed_signature(DSPAM_CTX *CTX, AGENT_CTX *ATX) * * DESCRIPTION * Embed the DSPAM signature in all relevant parts of the message * * INPUT ARGUMENTS * CTX DSPAM context containing the message * ATX Agent context defining processing behavior * * RETURN VALUES * returns 0 on success, standard errors on failure */ int embed_signature(DSPAM_CTX *CTX, AGENT_CTX *ATX) { struct nt_node *node_nt; struct nt_c c_nt; char toplevel_boundary[128] = { 0 }; ds_message_part_t block; int i = 0; if (CTX->training_mode == DST_NOTRAIN || ! ATX->signature[0]) return 0; node_nt = c_nt_first (CTX->message->components, &c_nt); if (node_nt == NULL || node_nt->ptr == NULL) return EFAILURE; block = node_nt->ptr; /* Signed messages are handled differently */ if (block->media_subtype == MST_SIGNED) return embed_signed(CTX, ATX); if (block->media_type == MT_MULTIPART && block->terminating_boundary != NULL) { strlcpy(toplevel_boundary, block->terminating_boundary, sizeof(toplevel_boundary)); } while (node_nt != NULL) { char *body_close = NULL, *dup = NULL; block = node_nt->ptr; /* Append signature to blocks when... */ if (block != NULL /* Either a text section, or this is a non-multipart message AND...*/ && (block->media_type == MT_TEXT || (block->boundary == NULL && i == 0 && block->media_type != MT_MULTIPART)) && (toplevel_boundary[0] == 0 || (block->body && block->body->used))) { if (block->content_disposition == PCD_ATTACHMENT) { node_nt = c_nt_next (CTX->message->components, &c_nt); i++; continue; } /* Some email clients reformat HTML parts, and require that we include * the signature before the HTML close tags (because they're stupid) */ if (body_close == NULL && block->body != NULL && block->body->data != NULL && block->media_subtype == MST_HTML) { body_close = strcasestr(block->body->data, "body->data, "body->used -= (long) strlen (dup); body_close[0] = 0; } buffer_cat (block->body, "\n"); buffer_cat (block->body, SIGNATURE_BEGIN); buffer_cat (block->body, ATX->signature); buffer_cat (block->body, SIGNATURE_END); buffer_cat (block->body, "\n\n"); if (dup) { buffer_cat (block->body, dup); buffer_cat (block->body, "\n\n"); free (dup); } } node_nt = c_nt_next (CTX->message->components, &c_nt); i++; } return 0; } /* * embed_signed(DSPAM_CTX *CTX, AGENT_CTX *ATX) * * DESCRIPTION * Embed the DSPAM signature within a signed message * * INPUT ARGUMENTS * CTX DSPAM context containing message * ATX Agent context defining processing behavior * * RETURN VALUES * returns 0 on success, standard errors on failure */ int embed_signed(DSPAM_CTX *CTX, AGENT_CTX *ATX) { struct nt_node *node_nt, *node_block, *parent; struct nt_c c_nt; ds_message_part_t block, newblock; ds_header_t field; char scratch[256], data[256]; node_block = c_nt_first (CTX->message->components, &c_nt); if (node_block == NULL || node_block->ptr == NULL) return EFAILURE; block = node_block->ptr; /* Construct a new block to contain the signed message */ newblock = (ds_message_part_t) malloc(sizeof(struct _ds_message_part)); if (newblock == NULL) goto MEM_ALLOC; newblock->headers = nt_create(NT_PTR); if (newblock->headers == NULL) goto MEM_ALLOC; newblock->boundary = NULL; newblock->terminating_boundary= block->terminating_boundary; newblock->encoding = block->encoding; newblock->original_encoding = block->original_encoding; newblock->media_type = block->media_type; newblock->media_subtype = block->media_subtype; newblock->body = buffer_create (NULL); newblock->original_signed_body= NULL; /* Move the relevant headers from the main part to the new block */ parent = NULL; node_nt = c_nt_first(block->headers, &c_nt); while(node_nt != NULL) { field = node_nt->ptr; if (field) { if (!strcasecmp(field->heading, "Content-Type") || !strcasecmp(field->heading, "Content-Disposition")) { struct nt_node *old = node_nt; node_nt = c_nt_next(block->headers, &c_nt); if (parent) parent->next = node_nt; else block->headers->first = node_nt; nt_add(newblock->headers, field); free(old); old = NULL; block->headers->items--; continue; } } parent = node_nt; node_nt = c_nt_next(block->headers, &c_nt); } /* Create a new top-level boundary */ snprintf(scratch, sizeof(scratch), "DSPAM_MULTIPART_EX-%ld", (long)getpid()); block->terminating_boundary = strdup(scratch); /* Create a new content-type field */ block->media_type = MT_MULTIPART; block->media_subtype = MST_MIXED; snprintf(data, sizeof(data), "Content-Type: multipart/mixed; boundary=%s", scratch); field = _ds_create_header_field(data); if (field != NULL) nt_add(block->headers, field); /* Insert the new block right below the top headers and blank body */ node_nt = nt_node_create(newblock); if (node_nt == NULL) goto MEM_ALLOC; node_nt->next = node_block->next; node_block->next = node_nt; CTX->message->components->items++; /* Strip the old terminating boundary */ parent = NULL; node_nt = c_nt_first (CTX->message->components, &c_nt); while (node_nt) { if (!node_nt->next && parent) { parent->next = NULL; CTX->message->components->items--; CTX->message->components->insert = NULL; _ds_destroy_block(node_nt->ptr); free(node_nt); node_nt = NULL; } else { parent = node_nt; node_nt = node_nt->next; } } /* Create a new message part containing only the boundary delimiter */ newblock = (ds_message_part_t) malloc(sizeof(struct _ds_message_part)); if (newblock == NULL) goto MEM_ALLOC; newblock->headers = nt_create(NT_PTR); if (newblock->headers == NULL) goto MEM_ALLOC; newblock->boundary = NULL; newblock->terminating_boundary= strdup(scratch); newblock->encoding = EN_7BIT; newblock->original_encoding = EN_7BIT; newblock->media_type = MT_TEXT; newblock->media_subtype = MST_PLAIN; newblock->body = buffer_create (NULL); newblock->original_signed_body= NULL; nt_add (CTX->message->components, newblock); /* Create a new message part containing the signature */ newblock = (ds_message_part_t) malloc(sizeof(struct _ds_message_part)); if (newblock == NULL) goto MEM_ALLOC; newblock->headers = nt_create(NT_PTR); if (newblock->headers == NULL) goto MEM_ALLOC; snprintf(data, sizeof(data), "%s--\n\n", scratch); newblock->boundary = NULL; newblock->terminating_boundary= strdup(data); newblock->encoding = EN_7BIT; newblock->original_encoding = EN_7BIT; newblock->media_type = MT_TEXT; newblock->media_subtype = MST_PLAIN; snprintf (scratch, sizeof (scratch), "%s%s%s\n", SIGNATURE_BEGIN, ATX->signature, SIGNATURE_END); newblock->body = buffer_create (scratch); newblock->original_signed_body= NULL; field = _ds_create_header_field ("Content-Type: text/plain"); nt_add (newblock->headers, field); snprintf(data, sizeof(data), "X-DSPAM-Signature: %s", ATX->signature); nt_add (newblock->headers, _ds_create_header_field(data)); nt_add (CTX->message->components, newblock); return 0; MEM_ALLOC: if (newblock) { if (newblock->headers) nt_destroy(newblock->headers); free(newblock); newblock = NULL; } LOG (LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } /* * tracksources(DSPAM_CTX *CTX) * * DESCRIPTION * Track the source address of a message, report to syslog and/or RABL * * INPUT ARGUMENTS * CTX DSPAM context containing filter results and message * * RETURN VALUES * returns 0 on success, standard errors on failure */ int tracksource(DSPAM_CTX *CTX) { char ip[32]; if (!dspam_getsource (CTX, ip, sizeof (ip))) { 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]; LOG (LOG_INFO, "spam detected from %s", ip); if (_ds_read_attribute(agent_config, "RABLQueue")) { snprintf(dropfile, sizeof(dropfile), "%s/%s", _ds_read_attribute(agent_config, "RABLQueue"), ip); file = fopen(dropfile, "w"); if (file != NULL) fclose(file); } } else 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); } else 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); } } } return 0; } #ifdef CLAMAV /* * has_virus(buffer *message) * * DESCRIPTION * Call ClamAV to determine if the message has a virus * * INPUT ARGUMENTS * message pointer to buffer containing message for scanning * * RETURN VALUES * returns 1 if virus, 0 otherwise */ int has_virus(buffer *message) { struct sockaddr_in addr; int sockfd; int virus = 0; int yes = 1; int port = atoi(_ds_read_attribute(agent_config, "ClamAVPort")); int addr_len; char *host = _ds_read_attribute(agent_config, "ClamAVHost"); FILE *sock; FILE *sockout; char buf[128]; sockfd = socket(AF_INET, SOCK_STREAM, 0); if (sockfd < 0) { LOG(LOG_ERR, "socket(AF_INET, SOCK_STREAM, 0): %s", strerror(errno)); return 0; } memset(&addr, 0, sizeof(struct sockaddr_in)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = inet_addr(host); addr.sin_port = htons(port); addr_len = sizeof(struct sockaddr_in); LOGDEBUG("Connecting to %s:%d for virus check", host, port); if(connect(sockfd, (struct sockaddr *)&addr, addr_len)<0) { LOG(LOG_ERR, ERR_CLIENT_CONNECT_HOST, host, port, strerror(errno)); close(sockfd); return 0; } setsockopt(sockfd,SOL_SOCKET,TCP_NODELAY,&yes,sizeof(int)); sock = fdopen(sockfd, "r"); if (sock == NULL) { LOG(LOG_ERR, ERR_CLIENT_CONNECT_HOST, host, port, strerror(errno)); close(sockfd); return 0; } sockout = fdopen(sockfd, "w"); if (sockout == NULL) { LOG(LOG_ERR, ERR_CLIENT_CONNECT_HOST, host, port, strerror(errno)); fclose(sock); close(sockfd); return 0; } fprintf(sockout, "STREAM\r\n"); fflush(sockout); if ((fgets(buf, sizeof(buf), sock))!=NULL && !strncmp(buf, "PORT", 4)) { int s_port = atoi(buf+5); if (feed_clam(s_port, message)==0) { if ((fgets(buf, sizeof(buf), sock))!=NULL) { if (!strstr(buf, ": OK")) virus = 1; } } } fclose(sock); fclose(sockout); close(sockfd); return virus; } /* * feed_clam(int port, buffer *message) * * DESCRIPTION * Feed a stream to ClamAV for virus detection * * INPUT ARGUMENTS * sockfd port number of stream * message pointer to buffer containing message for scanning * * RETURN VALUES * returns 0 on success */ int feed_clam(int port, buffer *message) { struct sockaddr_in addr; int sockfd, r, addr_len; int yes = 1; long sent = 0; long size = strlen(message->data); char *host = _ds_read_attribute(agent_config, "ClamAVHost"); sockfd = socket(AF_INET, SOCK_STREAM, 0); if (sockfd < 0) { LOG(LOG_ERR, "socket(AF_INET, SOCK_STREAM, 0): %s", strerror(errno)); return EFAILURE; } memset(&addr, 0, sizeof(struct sockaddr_in)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = inet_addr(host); addr.sin_port = htons(port); addr_len = sizeof(struct sockaddr_in); LOGDEBUG("Connecting to %s:%d for virus stream transmission", host, port); if(connect(sockfd, (struct sockaddr *)&addr, addr_len)<0) { LOG(LOG_ERR, ERR_CLIENT_CONNECT_HOST, host, port, strerror(errno)); close(sockfd); return EFAILURE; } setsockopt(sockfd,SOL_SOCKET,TCP_NODELAY,&yes,sizeof(int)); while(sentdata+sent, size-sent, 0); if (r <= 0) { close(sockfd); return r; } sent += r; } close(sockfd); return 0; } #endif /* * is_blacklisted(DSPAM_CTX *CTX, AGENT_CTX *ATX) * * DESCRIPTION * Determine if the source address of the message is blacklisted * * INPUT ARGUMENTS * CTX DSPAM context containing the message * ATX Agent context defining processing behavior * * RETURN VALUES * returns 1 if blacklisted, 0 otherwise */ int is_blacklisted(DSPAM_CTX *CTX, AGENT_CTX *ATX) { #ifdef __CYGWIN__ /* No cygwin support for IP Blacklisting */ return 0; #else char ip[32]; int bad = 0; struct attribute *attrib; struct addrinfo *res = NULL; struct sockaddr_in saddr; char host[32]; char lookup[256]; char *ptr; char *octet[4]; int i = 3; octet[0] = octet[1] = octet[2] = octet[3] = NULL; if (!dspam_getsource (CTX, ip, sizeof (ip))) { host[0] = 0; ptr = strtok(ip, "."); while(ptr != NULL && i>=0 && i<4) { octet[i] = ptr; ptr = strtok(NULL, "."); if (ptr == NULL && i!=0) return 0; i--; } if (octet[0] == NULL || octet[1] == NULL || octet[2] == NULL || octet[3] == NULL) return 0; snprintf(host, sizeof(host), "%s.%s.%s.%s.", octet[0], octet[1], octet[2], octet[3]); attrib = _ds_find_attribute(agent_config, "Lookup"); while(attrib != NULL) { int error; snprintf(lookup, sizeof(lookup), "%s%s", host, attrib->value); error = getaddrinfo(lookup, NULL, NULL, &res); if (!error) { char buff[128]; if (!bad) { memcpy(&saddr, res->ai_addr, sizeof(struct sockaddr)); #ifdef HAVE_INET_NTOA_R_2 inet_ntoa_r(saddr.sin_addr, buff); #else inet_ntoa_r(saddr.sin_addr, buff, sizeof(buff)); #endif if (strncmp(buff, "127.0.0.", 8) == 0) { STATUS("Blacklisted (%s)", attrib->value); bad = 1; freeaddrinfo(res); break; } } freeaddrinfo(res); } attrib = attrib->next; } } return bad; #endif } /* * is_blocklisted(DSPAM_CTX *CTX, AGENT_CTX *ATX) * * DESCRIPTION * Determine if the source address of the message is blocklisted on * the destination user's blocklist * * INPUT ARGUMENTS * CTX DSPAM context containing the message * ATX Agent context defining processing behavior * * RETURN VALUES * returns 1 if blacklisted, 0 otherwise */ int is_blocklisted(DSPAM_CTX *CTX, AGENT_CTX *ATX) { char filename[MAX_FILENAME_LENGTH]; FILE *file; int blocklisted = 0; _ds_userdir_path(filename, _ds_read_attribute(agent_config, "Home"), LOOKUP(ATX->PTX, (ATX->managed_group[0]) ? ATX->managed_group : CTX->username), "blocklist"); file = fopen(filename, "r"); if (file != NULL) { char *heading = _ds_find_header(CTX->message, "From"); char buf[256]; if (heading) { char *dup = strdup(heading); char *domain = strrchr(dup, '@'); if (domain) { int i; for(i=0;domain[i] && domain[i]!='\r' && domain[i]!='\n' && domain[i]!='>' && !isspace((int) domain[i]);i++) { } domain[i] = 0; while((fgets(buf, sizeof(buf), file))!=NULL) { chomp(buf); if (!strcasecmp(buf, domain+1)) { blocklisted = 1; break; } } } free(dup); dup = NULL; } fclose(file); } return blocklisted; } /* * daemon_start(AGENT_CTX *ATX) * * DESCRIPTION * Launch into daemon mode and start listener * * INPUT ARGUMENTS * ATX Agent context defining processing behavior * * RETURN VALUES * returns 0 on successful termination */ #ifdef DAEMON int daemon_start(AGENT_CTX *ATX) { DRIVER_CTX DTX; char *pidfile; ATX = ATX; /* Keep compiler happy */ int exitcode = EXIT_SUCCESS; if (ATX->fork && fork()) /* Fork DSPAM into the background */ exit(exitcode); __daemon_run = 1; __num_threads = 0; __hup = 0; pthread_mutex_init(&__lock, NULL); if (libdspam_init(_ds_read_attribute(agent_config, "StorageDriver"))) { LOG(LOG_CRIT, ERR_DRV_INIT); // pthread_mutex_destroy(&__lock); exit(EXIT_FAILURE); } LOG(LOG_INFO, INFO_DAEMON_START); while(__daemon_run) { DTX.CTX = dspam_create (NULL, NULL, _ds_read_attribute(agent_config, "Home"), DSM_TOOLS, 0); if (!DTX.CTX) { LOG(LOG_ERR, ERR_CORE_INIT); // pthread_mutex_destroy(&__lock); // libdspam_shutdown(); exit(EXIT_FAILURE); } set_libdspam_attributes(DTX.CTX); DTX.flags = DRF_STATEFUL; #ifdef DEBUG if (DO_DEBUG) DO_DEBUG = 2; #endif if (dspam_init_driver (&DTX)) { LOG (LOG_WARNING, ERR_DRV_INIT); // pthread_mutex_destroy(&__lock); // libdspam_shutdown(); exit(EXIT_FAILURE); } pidfile = _ds_read_attribute(agent_config, "ServerPID"); if ( pidfile == NULL ) pidfile = "/var/run/dspam/dspam.pid"; if (pidfile) { FILE *file; file = fopen(pidfile, "w"); if (file == NULL) { LOG(LOG_ERR, ERR_IO_FILE_WRITE, pidfile, strerror(errno)); dspam_shutdown_driver(&DTX); libdspam_shutdown(); exit(EXIT_FAILURE); } else { fprintf(file, "%ld\n", (long) getpid()); fclose(file); } } LOGDEBUG("Spawning daemon listener"); if (daemon_listen(&DTX)) { LOG(LOG_CRIT, ERR_DAEMON_FAIL); __daemon_run = 0; exitcode = EXIT_FAILURE; } else { LOG(LOG_WARNING, "Received signal. Waiting for processing threads to exit."); while(__num_threads) { struct timeval tv; tv.tv_sec = 1; tv.tv_usec = 0; select(0, NULL, NULL, NULL, &tv); } LOG(LOG_WARNING, "Processing threads terminated."); } /* only unlink pid file if daemon is shut down */ if (pidfile && !__daemon_run) unlink(pidfile); dspam_shutdown_driver(&DTX); dspam_destroy(DTX.CTX); /* Reload */ if (__hup) { LOG(LOG_WARNING, INFO_DAEMON_RELOAD); if (agent_config) _ds_destroy_config(agent_config); agent_config = read_config(NULL); if (!agent_config) { LOG(LOG_ERR, ERR_AGENT_READ_CONFIG); pthread_mutex_destroy(&__lock); libdspam_shutdown(); exit(EXIT_FAILURE); } __daemon_run = 1; __hup = 0; } } LOG(LOG_WARNING, INFO_DAEMON_EXIT); pthread_mutex_destroy(&__lock); libdspam_shutdown(); return exitcode; } #endif /* * load_aggregated_prefs(AGENT_CTX *ATX, const char *username) * * DESCRIPTION * Load and aggregate system+user preferences * * INPUT ARGUMENTS * ATX Agent context defining processing behavior * username Target user * * RETURN VALUES * pointer to aggregated preference structure, NULL on failure */ agent_pref_t load_aggregated_prefs(AGENT_CTX *ATX, const char *username) { agent_pref_t PTX = NULL; agent_pref_t STX = NULL; agent_pref_t UTX = NULL; LOGDEBUG("loading preferences for user %s", username); UTX = _ds_pref_load(agent_config, username, _ds_read_attribute(agent_config, "Home"), ATX->dbh); if (!UTX && _ds_match_attribute(agent_config, "FallbackDomains", "on")) { if (username != NULL && strchr(username, '@')) { char *domain = strchr(username, '@'); if (domain) { UTX = _ds_pref_load(agent_config, domain, _ds_read_attribute(agent_config, "Home"), ATX->dbh); if (UTX && !strcmp(_ds_pref_val(UTX, "fallbackDomain"), "on")) { LOGDEBUG("empty prefs found. falling back to %s", domain); } else { _ds_pref_free(UTX); UTX = NULL; } } } else { LOG(LOG_ERR, "load_aggregated_prefs(): Can not fallback to domains for username '%s' without @domain part.", username); } } if (!UTX) { UTX = _ds_pref_load(agent_config, NULL, _ds_read_attribute(agent_config, "Home"), ATX->dbh); } STX = _ds_pref_load(agent_config, NULL, _ds_read_attribute(agent_config, "Home"), ATX->dbh); if (!STX || STX[0] == 0) { if (STX) { _ds_pref_free(STX); } LOGDEBUG("default preferences empty. reverting to dspam.conf preferences."); STX = pref_config(); } else { LOGDEBUG("loaded default preferences externally"); } PTX = _ds_pref_aggregate(STX, UTX); _ds_pref_free(UTX); free(UTX); UTX = NULL; _ds_pref_free(STX); free(STX); STX = NULL; #ifdef VERBOSE if (PTX) { int j; for(j=0;PTX[j];j++) { LOGDEBUG("aggregated preference '%s' => '%s'", PTX[j]->attribute, PTX[j]->value); } } #endif return PTX; } /* * do_notifications(DSPAM_CTX *CTX, AGENT_CTX *ATX) * * DESCRIPTION * Evaluate and send notifications as necessary * * INPUT ARGUMENTS * CTX DSPAM context * ATX Agent context defining processing behavior * * RETURN VALUES * returns 0 on success, standard errors in failure */ int do_notifications(DSPAM_CTX *CTX, AGENT_CTX *ATX) { char filename[MAX_FILENAME_LENGTH]; FILE *file; /* First run notification */ if ((_ds_match_attribute(agent_config, "Notifications", "on") || !strcasecmp(_ds_pref_val(ATX->PTX, "notifications"), "on")) && strcasecmp(_ds_pref_val(ATX->PTX, "notifications"), "off")) { _ds_userdir_path(filename, _ds_read_attribute(agent_config, "Home"), LOOKUP(ATX->PTX, CTX->username), "firstrun"); file = fopen(filename, "r"); if (file == NULL) { LOGDEBUG("sending firstrun.txt to %s (%s): %s", CTX->username, filename, strerror(errno)); send_notice(ATX, "firstrun.txt", ATX->mailer_args, CTX->username); _ds_prepare_path_for(filename); file = fopen(filename, "w"); if (file) { fprintf(file, "%ld\n", (long) time(NULL)); fclose(file); } } else { fclose(file); } } /* First spam notification */ if (CTX->result == DSR_ISSPAM && (_ds_match_attribute(agent_config, "Notifications", "on") || !strcasecmp(_ds_pref_val(ATX->PTX, "notifications"), "on")) && strcasecmp(_ds_pref_val(ATX->PTX, "notifications"), "off")) { _ds_userdir_path(filename, _ds_read_attribute(agent_config, "Home"), LOOKUP(ATX->PTX, CTX->username), "firstspam"); file = fopen(filename, "r"); if (file == NULL) { LOGDEBUG("sending firstspam.txt to %s (%s): %s", CTX->username, filename, strerror(errno)); send_notice(ATX, "firstspam.txt", ATX->mailer_args, CTX->username); _ds_prepare_path_for(filename); file = fopen(filename, "w"); if (file) { fprintf(file, "%ld\n", (long) time(NULL)); fclose(file); } } else { fclose(file); } } /* Quarantine size notification */ if ((_ds_match_attribute(agent_config, "Notifications", "on") || !strcasecmp(_ds_pref_val(ATX->PTX, "notifications"), "on")) && strcasecmp(_ds_pref_val(ATX->PTX, "notifications"), "off")) { struct stat s; char qfile[MAX_FILENAME_LENGTH]; int qwarn_size = 1024*1024*2; if (_ds_read_attribute(agent_config, "QuarantineWarnSize")) { qwarn_size = atoi(_ds_read_attribute(agent_config, "QuarantineWarnSize")); if (qwarn_size == INT_MAX && errno == ERANGE) { LOG (LOG_INFO, "Value for 'QuarantineWarnSize' not valid (will use 2MB for now)"); qwarn_size = 1024*1024*2; } } _ds_userdir_path(qfile, _ds_read_attribute(agent_config, "Home"), LOOKUP(ATX->PTX, CTX->username), "mbox"); if (!stat(qfile, &s) && s.st_size > qwarn_size) { _ds_userdir_path(qfile, _ds_read_attribute(agent_config, "Home"), LOOKUP(ATX->PTX, CTX->username), "mboxwarn"); if (stat(qfile, &s)) { FILE *f; _ds_prepare_path_for(qfile); f = fopen(qfile, "w"); if (f != NULL) { fprintf(f, "%ld", (long) time(NULL)); fclose(f); send_notice(ATX, "quarantinefull.txt", ATX->mailer_args, CTX->username); } } } } return 0; } dspam-3.10.2+dfsg/src/dspam.h0000644000175000017500000000631611741351001015221 0ustar julienjulien/* $Id: dspam.h,v 1.40 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #include #ifndef _WIN32 #include #endif #include "libdspam.h" #include "buffer.h" #include "pref.h" #include "read_config.h" #include "daemon.h" #ifdef HAVE_CONFIG_H #include #endif #include "agent_shared.h" #ifndef _DSPAM_H # define _DSPAM_H int deliver_message (AGENT_CTX *ATX, const char *message, const char *mailer_args, const char *username, FILE *out, int result); int process_message (AGENT_CTX *ATX, buffer *message, const char *username, char **result_string); int inoculate_user (AGENT_CTX *ATX, const char *username, struct _ds_spam_signature *SIG, const char *message); int user_classify (AGENT_CTX *ATX, const char *username, struct _ds_spam_signature *SIG, const char *message); int send_notice (AGENT_CTX *ATX, const char *filename, const char *mailer_args, const char *username); int write_web_stats (AGENT_CTX *ATX, const char *username, const char *group, struct _ds_spam_totals *totals); int ensure_confident_result (DSPAM_CTX *CTX, AGENT_CTX *ATX, int result); int quarantine_message (AGENT_CTX *ATX, const char *message, const char *username); int log_events (DSPAM_CTX *CTX, AGENT_CTX *ATX); int retrain_message (DSPAM_CTX *CTX, AGENT_CTX *ATX); int tag_message (AGENT_CTX *ATX, ds_message_t message); int process_users (AGENT_CTX *ATX, buffer *message); int find_signature (DSPAM_CTX *CTX, AGENT_CTX *ATX); int add_xdspam_headers (DSPAM_CTX *CTX, AGENT_CTX *ATX); int embed_signature (DSPAM_CTX *CTX, AGENT_CTX *ATX); int embed_msgtag (DSPAM_CTX *CTX, AGENT_CTX *ATX); int embed_signed (DSPAM_CTX *CTX, AGENT_CTX *ATX); int tracksource (DSPAM_CTX *CTX); #ifdef CLAMAV int has_virus (buffer *message); int feed_clam (int port, buffer *message); #endif int is_blacklisted (DSPAM_CTX *CTX, AGENT_CTX *ATX); int is_blocklisted (DSPAM_CTX *CTX, AGENT_CTX *ATX); int do_notifications (DSPAM_CTX *CTX, AGENT_CTX *ATX); DSPAM_CTX *ctx_init (AGENT_CTX *ATX, const char *username); buffer *read_stdin (AGENT_CTX *ATX); agent_pref_t load_aggregated_prefs (AGENT_CTX *ATX, const char *username); #ifdef DAEMON int daemon_start (AGENT_CTX *ATX); #endif #define DSM_DAEMON 0xFE typedef struct agent_result { int exitcode; int classification; char text[256]; } *agent_result_t; #define ERC_SUCCESS 0x00 #define ERC_PROCESS -0x01 #define ERC_DELIVERY -0x02 #define ERC_PERMANENT_DELIVERY -0x03 #endif /* _DSPAM_H */ dspam-3.10.2+dfsg/src/config_shared.c0000644000175000017500000001055511741351001016703 0ustar julienjulien/* $Id: config_shared.c,v 1.96 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /* * config_shared.c - attributes-based configuration functionsc * * DESCRIPTION * Attribtues are used by the agent and libdspam to control configuration * management. The included functions perform various operations on the * configuration structures supplied. * * Because these functions are used by libdspam, they are prefixed with _ds_ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include "config_shared.h" #include "error.h" #include "language.h" #include "libdspam.h" attribute_t _ds_find_attribute(config_t config, const char *key) { int i; #ifdef VERBOSE LOGDEBUG("find attribute '%s'", key); #endif if (config == NULL) { #ifdef VERBOSE LOGDEBUG("_ds_find_attribute(): NULL config"); #endif return NULL; } for(i=0;config[i];i++) { attribute_t attr = config[i]; if (!strcasecmp(attr->key, key)) { #ifdef VERBOSE LOGDEBUG(" -> found attribute '%s' with value '%s'", attr->key, attr->value); #endif return attr; } } return NULL; } int _ds_add_attribute(config_t config, const char *key, const char *val) { attribute_t attr; #ifdef VERBOSE LOGDEBUG("add attribute '%s' with value '%s'", key, val); #endif attr = _ds_find_attribute(config, key); if (!attr) { int i; for(i=0;config[i];i++) { } config[i+1] = 0; config[i] = malloc(sizeof(struct attribute)); if (!config[i]) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } attr = config[i]; } else { while(attr->next != NULL) { attr = attr->next; } attr->next = malloc(sizeof(struct attribute)); if (!attr->next) { LOG(LOG_CRIT, ERR_MEM_ALLOC); return EUNKNOWN; } attr = attr->next; } attr->key = strdup(key); attr->value = strdup(val); attr->next = NULL; return 0; } int _ds_overwrite_attribute(config_t config, const char *key, const char *val) { attribute_t attr; #ifdef VERBOSE LOGDEBUG("overwrite attribute '%s' with value '%s'", key, val); #endif attr = _ds_find_attribute(config, key); if (attr == NULL) { return _ds_add_attribute(config, key, val); } free(attr->value); attr->value = strdup(val); return 0; } char *_ds_read_attribute(config_t config, const char *key) { #ifdef VERBOSE LOGDEBUG("read attribute '%s'", key); #endif attribute_t attr = _ds_find_attribute(config, key); if (!attr) { #ifdef VERBOSE LOGDEBUG(" -> read: not found attribute '%s'", key); #endif return NULL; } #ifdef VERBOSE LOGDEBUG(" -> read attribute '%s' with value '%s'", key, attr->value); #endif return attr->value; } int _ds_match_attribute(config_t config, const char *key, const char *val) { #ifdef VERBOSE LOGDEBUG("match attribute '%s' with value '%s'", key, val); #endif attribute_t attr; attr = _ds_find_attribute(config, key); if (!attr) { #ifdef VERBOSE LOGDEBUG(" -> match: not found attribute '%s'", key); #endif return 0; } while(strcasecmp(attr->value, val) && attr->next != NULL) attr = attr->next; if (!strcasecmp(attr->value, val)) { #ifdef VERBOSE LOGDEBUG(" -> matched attribute '%s' with value '%s'", key, val); #endif return 1; } #ifdef VERBOSE LOGDEBUG(" -> match: not found attribute '%s' with value '%s'", key, val); #endif return 0; } void _ds_destroy_config(config_t config) { #ifdef VERBOSE LOGDEBUG("destroying/freeing configuration"); #endif attribute_t x, y; int i; for(i=0;config[i];i++) { x = config[i]; while(x) { y = x->next; free(x->key); free(x->value); free(x); x = y; } } free(config); return; } dspam-3.10.2+dfsg/src/agent_shared.h0000644000175000017500000001171211741351001016535 0ustar julienjulien/* $Id: agent_shared.h,v 1.35 2011/07/11 21:27:15 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #include #ifndef _WIN32 #include #endif #include "buffer.h" #ifdef HAVE_CONFIG_H #include #endif #include "libdspam.h" #ifndef _AGENT_SHARED_H # define _AGENT_SHARED_H extern char *__pw_name; extern uid_t __pw_uid; #define STATUS( ... ) snprintf(ATX->status, sizeof(ATX->status), __VA_ARGS__); #define SYNTAX "Syntax: dspam [--help|--version|[--client|--daemon [--nofork]] [--debug] --mode=[toe|tum|teft|notrain|unlearn] --user [user1 user2 ... userN] [--feature=[no,wh,tb=N]] [--class=[spam|innocent]] [--source=[error|corpus|inoculation]] [--profile=[PROFILE]] [--deliver=[spam,[innocent|nonspam],summary,stdout]] [--process|--classify] [--stdout] [--mail-from=sender-address] [--rcpt-to recipient-address(es)] [--signature=DSPAM-Signature] [passthru-arguments]]" #define SIGNATURE_BEGIN "!DSPAM:" #define SIGNATURE_END "!" #define LOOSE_SIGNATURE_BEGIN "X-DSPAM-Signature:" #define SIGNATURE_DELIMITER ": " /* AGENT_CTX: Agent context. Defines the behavior of the agent */ typedef struct { int operating_mode; /* Processing Mode IN DSM_ */ int fork; /* Fork daemon: IN 1:0 */ int client_mode; /* Client Mode: IN 1:0 */ int training_mode; /* Training Mode IN DST_ */ int classification; /* Classification IN DSR_ */ int source; /* Classification Source IN DSS_ */ int spam_action; /* Action on Spam IN DSA_ */ #ifdef TRUSTED_USER_SECURITY int trusted; /* Trusted User? IN */ #endif int feature; /* Feature Overridden? IN */ int train_pristine; /* Train Pristine? IN */ int tokenizer; /* Tokenizer IN */ void *dbh; /* Database Handle IN */ u_int64_t flags; /* Flags DAF_ IN */ int training_buffer; /* Sedation Level 0-10 IN */ char *recipient; /* Current Recipient */ char mailer_args[256]; /* Delivery Args IN */ char spam_args[256]; /* Quarantine Args IN */ char managed_group[256]; /* Managed Groupname IN */ char profile[32]; /* Storage Profile IN */ char signature[128]; /* Signature Serial IN/OUT */ char mailfrom[256]; /* For LMTP or SMTP */ struct nt *users; /* Destination Users IN */ struct nt *inoc_users; /* Inoculate list OUT */ struct nt *classify_users; /* Classify list OUT */ struct nt *recipients; /* Recipients IN */ struct nt *results; /* Process Results OUT */ struct _ds_spam_signature SIG; /* Signature object OUT */ int learned; /* Message learned? OUT */ FILE *sockfd; /* Socket FD if not STDOUT */ int sockfd_output; /* Output sent to sockfd? */ char client_args[1024]; /* Args for client connection */ double timestart; agent_pref_t PTX; char status[256]; #ifdef DEBUG char debug_args[1024]; #endif #ifndef _WIN32 #ifdef TRUSTED_USER_SECURITY struct passwd *p; #if defined(_REENTRANT) && defined(HAVE_GETPWUID_R) struct passwd pwbuf; #endif #endif #endif } AGENT_CTX; int process_features (AGENT_CTX *ATX, const char *features); int process_mode (AGENT_CTX *ATX, const char *mode); int check_configuration (AGENT_CTX *ATX); int apply_defaults (AGENT_CTX *ATX); int process_arguments (AGENT_CTX *ATX, int argc, char **argv); int initialize_atx (AGENT_CTX *ATX); int process_parseto (AGENT_CTX *ATX, const char *buf); buffer *read_stdin (AGENT_CTX *ATX); int init_pwent_cache(void); #ifndef MIN # define MAX(a,b) ((a)>(b)?(a):(b)) # define MIN(a,b) ((a)<(b)?(a):(b)) #endif /* !MIN */ /* * Agent context flag (DAF) * Do not confuse with libdspam's classification context flags (DSF) * */ #define DAF_STDOUT 0x01 #define DAF_DELIVER_SPAM 0x02 #define DAF_DELIVER_INNOCENT 0x04 #define DAF_WHITELIST 0x08 #define DAF_GLOBAL 0x10 #define DAF_INOCULATE 0x20 #define DAF_NOISE 0x40 #define DAF_MERGED 0x80 #define DAF_SUMMARY 0x100 #define DAF_UNLEARN 0x200 #define DAF_FIXED_TR_MODE 0x400 #define DAZ_WORD 0x01 #define DAZ_CHAIN 0x02 #define DAZ_SBPH 0x03 #define DAZ_OSB 0x04 #endif /* _AGENT_SHARED_H */ dspam-3.10.2+dfsg/config.guess0000755000175000017500000013013211745257500015504 0ustar julienjulien#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-02-10' # 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 # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # 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 (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' 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 "$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 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; 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) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU/*) eval $set_cc_for_build cat <<-EOF > $dummy.c #include #ifdef __UCLIBC__ # ifdef __UCLIBC_CONFIG_VERSION__ LIBC=uclibc __UCLIBC_CONFIG_VERSION__ # else LIBC=uclibc # endif #else # ifdef __dietlibc__ LIBC=dietlibc # else LIBC=gnu # endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) 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 ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # 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'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; 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 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} 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 ;; 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 echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 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 ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 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 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} 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 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} 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 # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $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 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 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 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF 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 ;; *:AIX:*:[4567]) 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 IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then 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 -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 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 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 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 ;; 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 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks 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 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 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/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 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 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 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 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp 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 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi 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 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/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 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) 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; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { 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; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' 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; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 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 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 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 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in 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 ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $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; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: dspam-3.10.2+dfsg/man/0000755000175000017500000000000011745313536013741 5ustar julienjuliendspam-3.10.2+dfsg/man/dspam_logrotate.10000644000175000017500000000244711741351001017177 0ustar julienjulien.\" $Id: dspam_logrotate.1,v 1.3 2011/06/28 00:13:48 sbajic Exp $ .\" -*- nroff -*- .\" .\" dspam_logrotate3.9 .\" .\" Authors: Stevan Bajic .\" .\" Copyright (C) 2002-2012 DSPAM Project .\" All rights reserved .\" .TH dspam_logrotate 1 "Apr 17, 2010" "DSPAM" "DSPAM" .SH NAME dspam_logrotate \- Rotate DSPAM logfiles .SH SYNOPSIS .na .B dspam_logrotate .B \-a age \c [\-v]\ [[\c .B \-l \c [\c .I logfile\c ]]|[\c .B \-d \c [\c .I dir\c ]]] .ad .SH DESCRIPTION .LP .B dspam_logrotate can be used to rotate DSPAM system log and/or the user logs. .SH OPTIONS .LP .ne 3 .TP .BI \-a\ age\c All log entries older than 'age' days will be removed. .ne 3 .TP .BI \-v\c Print verbose output. .ne 3 .TP .BI \-l \ logfile\c A list of one or more files to process. .ne 3 .TP .BI \-d \ dir\c The home directory of DSPAM or the root path where user logs are located. .SH EXIT VALUE .LP .ne 3 .PD 0 .TP .B 0 Operation was successful. .ne 3 .TP .B other Operation resulted in an error. .PD .SH COPYRIGHT Copyright \(co 2002\-2012 DSPAM Project .br All rights reserved. .br For more information, see http://dspam.sourceforge.net. .SH SEE ALSO .BR dspam (1), .BR dspam_admin (1), .BR dspam_clean (1), .BR dspam_crc (1), .BR dspam_dump (1), .BR dspam_merge (1), .BR dspam_stats (1), .BR dspam_train (1) dspam-3.10.2+dfsg/man/dspam_dump.10000644000175000017500000000370311741351001016140 0ustar julienjulien.\" $Id: dspam_dump.1,v 1.75 2011/06/28 00:13:48 sbajic Exp $ .\" -*- nroff -*- .\" .\" dspam_dump3.9 .\" .\" Authors: Jonathan A. Zdziarski .\" Stevan Bajic .\" .\" Copyright (C) 2002-2012 DSPAM Project .\" All rights reserved .\" .TH dspam_dump 1 "Apr 17, 2010" "DSPAM" "DSPAM" .SH NAME dspam_dump \- produce a dump of a user's metadata .SH SYNOPSIS .na .B dspam_dump [\c .B \--profile\c =PROFILE\c ] [\c .B \-d\c sqlite_drv\c ] .BI username\fR [\c .BI token\c ] .ad .SH DESCRIPTION .LP .B dspam_dump dumps a user's metadata dictionary to stdout. This can be used to view the entire contents of a user's dictionary, or used in combination with grep to view a subset of data. The output provides the token's stored value (in CRC64 format), the number of spam and nonspam hits, and the token's computed probability. .SH OPTIONS .LP .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 \ username \fR\c The username of the user to dump. Only trusted users (or root) can use this program for the usernames different from the current one. .ne 3 .TP .BI \ token \fR\c .br The text string of the token to search for and dump. If no token is specified, all tokens will be dumped to stdout. .SH EXAMPLES .B dspam_dump user "Subject*Viagra" Dumps the token Subject*Viagra, which represents the word Viagra in the Subject header, for the user specified. .SH EXIT VALUE .LP .ne 3 .PD 0 .TP .B 0 Operation was successful. .ne 3 .TP .B other Operation resulted in an error. .PD .SH COPYRIGHT Copyright \(co 2002\-2012 DSPAM Project .br All rights reserved. .br For more information, see http://dspam.sourceforge.net. .SH SEE ALSO .BR dspam (1), .BR dspam_admin (1), .BR dspam_clean (1), .BR dspam_crc (1), .BR dspam_logrotate (1), .BR dspam_merge (1), .BR dspam_stats (1), .BR dspam_train (1) dspam-3.10.2+dfsg/man/dspam_clean.10000644000175000017500000000547211741351001016262 0ustar julienjulien.\" $Id: dspam_clean.1,v 1.12 2011/11/16 00:14:11 sbajic Exp $ .\" -*- nroff -*- .\" .\" dspam_clean3.9 .\" .\" Authors: Jonathan A. Zdziarski .\" Stevan Bajic .\" .\" Copyright (C) 2002-2012 DSPAM Project .\" All rights reserved .\" .TH dspam_clean 1 "Apr 17, 2010" "DSPAM" "DSPAM" .SH NAME dspam_clean \- perform periodic maintenance of metadata .SH SYNOPSIS .na .B dspam_clean [\c .B \--profile\c =PROFILE\c ] [\c .I \-s[signature_life]\fR\c ] [\c .I \-p[probability_life]\fR\c ] [\c .I \-u[sl,hcl,shl,ihl]\fR\c ] [\c .I user1 user2 ... userN\fR\c ] .ad .SH DESCRIPTION .LP .B dspam_clean is used to perform periodic housecleaning on DSPAM's metadata dictionary by deleting old or useless data. .B dspam_clean has no effect if you use the "hash" storage driver. In that case, you should use the tools .B cssclean and .B csscompress (which do not currently have manual pages). .SH OPTIONS .LP .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 \-s\fR\c Performs stale signature purging. If a value is specified, the default value of 14 days will be overridden. Specifying an age of 0 will delete all signatures from the user(s) processed. .ne 3 .TP .BI \-p\fR\c Deletes all tokens from the target user(s) database whose probability is between 0.35 and 0.65 (fairly neutral, useless data). If a value is specified, the default life of 30 days will be overridden. It's a good idea to use this flag once with a life of 0 days for users after a significant amount of corpus training. .ne 3 .TP .BI \-u\fR\c Deletes all unused tokens from a user's dataset. Four different life values are used: .B sl Stale tokens which have not been used for a long period of time .B hcl Tokens with a total hit count below 5 (which will be assigned a hapaxial value by DSPAM) .B shl Tokens witha single spam hit .B ihl Tokens with a single innocent hit Ages may be overridden by specifying a format string, such as \-u30,15,10,10 where each number represents the respective life. Specifying a life of zero will delete all unused tokens in the category. .ne 3 .TP .BI \ user1\ user2\ ...\ userN\fR\c Specify the username(s) to perform the selected maintenance operations on. If no username is specified, all users are processed. .SH EXIT VALUE .LP .ne 3 .PD 0 .TP .B 0 Operation was successful. .ne 3 .TP .B other Operation resulted in an error. .PD .SH COPYRIGHT Copyright \(co 2002\-2012 DSPAM Project .br All rights reserved. .br For more information, see http://dspam.sourceforge.net. .SH SEE ALSO .BR dspam (1), .BR dspam_admin (1), .BR dspam_crc (1), .BR dspam_dump (1), .BR dspam_logrotate (1), .BR dspam_merge (1), .BR dspam_stats (1), .BR dspam_train (1) dspam-3.10.2+dfsg/man/dspam_merge.10000644000175000017500000000421111741351001016265 0ustar julienjulien.\" $Id: dspam_merge.1,v 1.11 2011/06/28 00:13:48 sbajic Exp $ .\" -*- nroff -*- .\" .\" dspam_merge3.9 .\" .\" Authors: Jonathan A. Zdziarski .\" Stevan Bajic .\" .\" Copyright (C) 2002-2012 DSPAM Project .\" All rights reserved .\" .TH dspam_merge 1 "Apr 17, 2010" "DSPAM" "DSPAM" .SH NAME dspam_merge \- merge several users' metadata into a composite .SH SYNOPSIS .na .B dspam_merge [\c .BI \--profile= \PROFILE\c ] .BI \ user1\ user2\ ...\ userN\c .BI \ \-o \ username\fR\c .ad .SH DESCRIPTION .LP .B dspam_merge merges several users' metadata into a single user's dictionary. This tool is designed to create global users and seeded data. The hit sounds for each token and per\-user totals are added together to produce a single composite dataset. After creating a composite user, .B dspam_clean should be run with the \-p option to clean up extraneous data. .B NOTE : Merges may take a considerable amount of time. This could potentially increase the load on the server or even slow down the delivery of email. A merge should only be performed when the system is fairly acquiesce. .SH OPTIONS .LP .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 \ user1\ user2\ ...\ userN\c A list of users to merge together. .ne 3 .TP .BI \ \-o \ username\c The target user which will be created (if necessary). This user will contain the composite generated by the merge. .SH EXAMPLES .B dspam_merge dick jane spot \-o ralph Merges the metadata dictionaries of dick, jane, and spot into a single composite under the user .B ralph . .SH EXIT VALUE .LP .ne 3 .PD 0 .TP .B 0 Operation was successful. .ne 3 .TP .B other Operation resulted in an error. .PD .SH COPYRIGHT Copyright \(co 2002\-2012 DSPAM Project .br All rights reserved. .br For more information, see http://dspam.sourceforge.net. .SH SEE ALSO .BR dspam (1), .BR dspam_admin (1), .BR dspam_clean (1), .BR dspam_crc (1), .BR dspam_dump (1), .BR dspam_logrotate (1), .BR dspam_stats (1), .BR dspam_train (1) dspam-3.10.2+dfsg/man/dspam_admin.10000644000175000017500000000310011741351001016252 0ustar julienjulien.\" $Id: dspam_admin.1,v 1.2 2011/06/28 00:13:48 sbajic Exp $ .\" -*- nroff -*- .\" .\" dspam_admin3.9 .\" .\" Authors: Stevan Bajic .\" .\" Copyright (C) 2002-2012 DSPAM Project .\" All rights reserved .\" .TH dspam_admin 1 "Jan 03, 2010" "DSPAM" "DSPAM" .SH NAME dspam_admin \- Alter DSPAM users preferences .SH SYNOPSIS .na .B dspam_admin [\c .B \--profile\c =PROFILE\c ] [\c .I function\fR\c ] [\c .I argument\fR\c ] .ad .SH DESCRIPTION .LP .B dspam_admin is used to alter DSPAM user's preferences. .SH OPTIONS .LP .ne 3 .TP Add a Preference:\c .B add\ preference\ \c [\c .I user\c ] [\c .I attrib\c ] [\c .I value\c ]\c .ne 3 .TP Set/change a Preference:\c .B change\ preference\ \c [\c .I user\c ] [\c .I attrib\c ] [\c .I value\c ]\c .ne 3 .TP Delete a Preference:\c .B delete\ preference\ \c [\c .I user\c ] [\c .I attrib\c ] [\c .I value\c ]\c .ne 3 .TP List Preferences:\c .B list\ preference\ \c [\c .I user\c ] [\c .I attrib\c ] [\c .I value\c ]\c .ne 3 .TP Aggregate Preferences:\c .B aggregate\ preference\ \c [\c .I user\c ]\c .LP Use\ \c .B default\ \c as username to modify the default (uid 0) user preference. .SH EXIT VALUE .LP .ne 3 .PD 0 .TP .B 0 Operation was successful. .ne 3 .TP .B other Operation resulted in an error. .PD .SH COPYRIGHT Copyright \(co 2002\-2012 DSPAM Project .br All rights reserved. .br For more information, see http://dspam.sourceforge.net. .SH SEE ALSO .BR dspam (1), .BR dspam_clean (1), .BR dspam_crc (1), .BR dspam_dump (1), .BR dspam_logrotate (1), .BR dspam_merge (1), .BR dspam_stats (1), .BR dspam_train (1) dspam-3.10.2+dfsg/man/Makefile.am0000644000175000017500000000525711622570546016006 0ustar julienjulien# $Id: Makefile.am,v 1.6 2009/12/23 02:03:10 sbajic Exp $ # # autoconf (GNU Autoconf) 2.59 # ltmain.sh (GNU libtool) 1.5.6 # automake (GNU automake) 1.9.2 includedir=@includedir@/dspam SUBDIRS = . DIST_SUBDIRS = . man_MANS = \ dspam.1 \ dspam_admin.1 \ dspam_clean.1 \ dspam_crc.1 \ dspam_dump.1 \ dspam_logrotate.1 \ dspam_merge.1 \ dspam_stats.1 \ dspam_train.1 \ libdspam.3 EXTRA_DIST = \ dspam.1 \ dspam_admin.1 \ dspam_clean.1 \ dspam_crc.1 \ dspam_dump.1 \ dspam_logrotate.1 \ dspam_merge.1 \ dspam_stats.1 \ dspam_train.1 \ libdspam.3 MAINTAINERCLEANFILES = Makefile.in DEFS = @DEFS@ # Failing of chgrp is expected and normal case when someone do # make install DESTDIR=... # from user other than root (from user not included in the `mail' group # is exactly), and only after this and after checking what was installed # changes ownership. # # Caveat: creating the $(dspam_home) in the install-exec-hook is not the # right way, but for some (unknown to me) reason `installdirs-local' # target have no chances to be executed under automake-1.7.3 (at least). # # Solaris' ln seems to have a problem with -sf and existing symlinks. install-data-hook: rm -f $(DESTDIR)$(mandir)/man3/dspam_addattribute.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_attach.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_clearattributes.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_create.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_destroy.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_detach.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_getsource.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_init.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_process.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_addattribute.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_attach.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_clearattributes.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_create.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_destroy.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_detach.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_getsource.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_init.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_process.3 uninstall-hook: rm -f $(DESTDIR)$(mandir)/man3/dspam_addattribute.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_attach.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_clearattributes.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_create.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_destroy.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_detach.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_getsource.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_init.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_process.3 ACLOCAL_AMFLAGS = -I m4 dspam-3.10.2+dfsg/man/libdspam.30000644000175000017500000001525411741351001015610 0ustar julienjulien.\" $Id: libdspam.3,v 1.13 2011/06/28 00:13:48 sbajic Exp $ .\" -*- nroff -*- .\" .\" dspam3.9 .\" .\" Authors: Jonathan A. Zdziarski .\" Stevan Bajic .\" .\" Copyright (C) 2002-2012 DSPAM Project .\" All rights reserved .\" .TH libdspam 3 "Apr 17, 2010" "libdspam" "libdspam" .SH NAME libdspam - Core message processing and classification library for DSPAM .PP \fBDSPAM\fP Core Analyis Engine Functions .SH SYNOPSIS .nf .B #include .sp .BI "DSPAM_CTX *dspam_init(const char *" username ", const char *" group ", " .BI " const char *" home ", int " operating_mode ", u_int32_t " flags ");" .sp .BI "DSPAM_CTX *dspam_create(const char *" username ", const char *" group ", " .BI " const char *" home ", int " operating_mode ", u_int32_t " flags ");" .sp .BI "int dspam_addattribute(DSPAM_CTX *" CTX ", const char *" key ", " .BI " const char *" value ");" .sp .BI "int dspam_clearattributes(DSPAM_CTX *" CTX ");" .sp .BI "int dspam_attach(DSPAM_CTX *" CTX ", void *" dbh ");" .sp .BI "int dspam_process(DSPAM_CTX *" CTX ", const char *" message ");" .sp .BI "int dspam_getsource(DSPAM_CTX *" CTX ", char *" buf ", size_t " size ");" .sp .BI "int dspam_detach(DSPAM_CTX *" CTX ");" .sp .BI "int dspam_destroy(DSPAM_CTX *" CTX ");" .fi .SH DESCRIPTION \fBlibdspam\fP provides core message processing and classification functionality. .PP The \fBdspam_init()\fP function creates and initializes a new classification context and attaches the context to whatever backend storage facility was configured. The \fBuser\fP and \fBgroup\fP arguments provided are used to read and write information stored for the user and group specified. The \fBhome\fP argument is used to configure libdspam's storage around the base directory specified. The \fBmode\fP specifies the operating mode to initialize the classification context with and may be one of: .PP \fBDSM_PROCESS\fP Classify and learn the supplied message using whatever training mode is specified \fBDSM_CLASSIFY\fP Classify the supplied message only; do not learn or update any counters. \fBDSM_TOOLS\fP No processing, attach to storage only .PP The \fBflags\fP provided further tune the classification context for a specific function. Multiple flags may be OR'd together. .PP \fBDSF_UNLEARN\fP Unlearn the message \fBDSF_BIAS\fP Assign processor bias to unknown tokens \fBDSF_SIGNATURE\fP A binary signature is requested/provided \fBDSF_NOISE\fP Apply Bayesian Noise Reduction logic \fBDSF_WHITELIST\fP Use automatic whitelisting logic \fBDSF_MERGED\fP Merge group metadata with user's in memory .PP Upon successful completion, \fBdspam_init()\fP will return a pointer to a new \fBclassification context\fP structure containing a copy of the configuration passed into dspam_init(), a connected storage driver handle, and a set of preliminary user control data read from storage. .PP The \fBdspam_create()\fP function performs in exactly the same manner as the dspam_init() function, but does not attach to storage. Instead, the caller must also call \fBdspam_attach()\fP after setting any storage- specific attributes using \fBdspam_addattribute()\fP. This is useful for cases where the implementor would prefer to configure storage internally rather than having libdspam read a configuration from a file. .PP The \fBdspam_addattribute()\fP function is called to set attributes within the classification context. Some storage drivers support the use of passing specific attributes such as server connect information. The driver-independent attributes supported by DSPAM include: .PP \fBIgnoreHeader\fP Specify a specific header to ignore \fBLocalMX\fP Specify a local mail exchanger to assist in correct results from \fBdspam_getsource()\fP. .PP Only driver-dependent attributes need be set prior to a call to \fBdspam_attach()\fP. Driver-independent attributes may be set both before and after storage has been attached. .PP The \fBdspam_attach()\fP function attaches the storage interface to the classification context and alternatively established an initial connection with storage if \fBdbh\fP is \fBNULL\fP. Some storage drivers support only a NULL value for dbh, while others (such as mysql_drv, pgsql_drv, and sqlite_drv) allow an open database handle to be attached. This function should only be called after an initial call to \fBdspam_create()\fP and should never be called if using \fBdspam_init()\fP, as storage is automatically attached by a call to dspam_init(). .PP The \fBdspam_process()\fP function performs analysis of the \fBmessage\fP passed into it and will return zero on successful completion. If successful, CTX->result will be set to one of three classification results: .PP \fBDSR_ISSPAM\fP Message was classified as spam \fBDSR_ISINNOCENT\fP Message was classified as nonspam \fBDSR_ISWHITELISTED\fP Recipient was automatically whitelisted .PP Should the call fail, one of the following errors will be returned: .PP \fBEINVAL\fP An invalid call or invalid parameter used. \fBEUNKNOWN\fP Unexpected error, such as malloc() failure \fBEFILE\fP Error opening or writing to a file or file handle \fBELOCK\fP Locking failure \fBEFAILURE\fP The operation itself has failed .PP The \fBdspam_getsource()\fP function extracts the source sender from the message passed in during a call to \fBdspam_process()\fP and writes not more than \fBsize\fP bytes to \fBbuf\fP. .PP The \fBdspam_detach()\fP function can be called when a detachment from storage is desired, but the context is still needed. The storage driver is closed, leaving the classification context in place. Once the context is no longer needed, another call to \fBdspam_destroy()\fP should be made. If you are closing storage and destroying the context at the same time, it is not necessary to call this function. Instead you may call \fBdspam_destroy()\fP directly. .PP The \fBdspam_clearattributes()\fP function is called to clear any attributes previously set using \fBdspam_addattribute()\fP within the classification context. It is necessary to call this function prior to replacing any attributes already written. .PP The \fBdspam_destroy()\fP function should be called when the context is no longer needed. If a connection was established to storage internally, the connection is closed and all data is flushed and written. If a handle was attached, the handle will remain open. .PP .SH COPYRIGHT Copyright \(co 2002\-2012 DSPAM Project .br All rights reserved. .br For more information, see http://dspam.sourceforge.net. .SH "SEE ALSO" .BR dspam (1), .BR dspam_admin (1), .BR dspam_clean (1), .BR dspam_crc (1), .BR dspam_dump (1), .BR dspam_logrotate (1), .BR dspam_merge (1), .BR dspam_stats (1), .BR dspam_train (1) dspam-3.10.2+dfsg/man/Makefile.in0000644000175000017500000006322311745313451016010 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.6 2009/12/23 02:03:10 sbajic Exp $ # # autoconf (GNU Autoconf) 2.59 # ltmain.sh (GNU libtool) 1.5.6 # automake (GNU automake) 1.9.2 VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" man3dir = $(mandir)/man3 NROFF = nroff MANS = $(man_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@/dspam infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = . DIST_SUBDIRS = . man_MANS = \ dspam.1 \ dspam_admin.1 \ dspam_clean.1 \ dspam_crc.1 \ dspam_dump.1 \ dspam_logrotate.1 \ dspam_merge.1 \ dspam_stats.1 \ dspam_train.1 \ libdspam.3 EXTRA_DIST = \ dspam.1 \ dspam_admin.1 \ dspam_clean.1 \ dspam_crc.1 \ dspam_dump.1 \ dspam_logrotate.1 \ dspam_merge.1 \ dspam_stats.1 \ dspam_train.1 \ libdspam.3 MAINTAINERCLEANFILES = Makefile.in ACLOCAL_AMFLAGS = -I m4 all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } install-man3: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" @list=''; test -n "$(man3dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ done; } uninstall-man3: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man3dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(MANS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-man @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-man3 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-man @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-man: uninstall-man1 uninstall-man3 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-data-am install-strip tags-recursive \ uninstall-am .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-hook install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-man3 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-hook uninstall-man \ uninstall-man1 uninstall-man3 # Failing of chgrp is expected and normal case when someone do # make install DESTDIR=... # from user other than root (from user not included in the `mail' group # is exactly), and only after this and after checking what was installed # changes ownership. # # Caveat: creating the $(dspam_home) in the install-exec-hook is not the # right way, but for some (unknown to me) reason `installdirs-local' # target have no chances to be executed under automake-1.7.3 (at least). # # Solaris' ln seems to have a problem with -sf and existing symlinks. install-data-hook: rm -f $(DESTDIR)$(mandir)/man3/dspam_addattribute.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_attach.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_clearattributes.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_create.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_destroy.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_detach.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_getsource.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_init.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_process.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_addattribute.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_attach.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_clearattributes.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_create.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_destroy.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_detach.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_getsource.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_init.3 cd $(DESTDIR)$(mandir)/man3/ && ln -s libdspam.3 dspam_process.3 uninstall-hook: rm -f $(DESTDIR)$(mandir)/man3/dspam_addattribute.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_attach.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_clearattributes.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_create.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_destroy.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_detach.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_getsource.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_init.3 rm -f $(DESTDIR)$(mandir)/man3/dspam_process.3 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/man/dspam_crc.10000644000175000017500000000177111741351001015745 0ustar julienjulien.\" $Id: dspam_crc.1,v 1.2 2011/06/28 00:13:48 sbajic Exp $ .\" -*- nroff -*- .\" .\" dspam_crc3.9 .\" .\" Authors: Stevan Bajic .\" .\" Copyright (C) 2002-2012 DSPAM Project .\" All rights reserved .\" .TH dspam_crc 1 "Jan 03, 2010" "DSPAM" "DSPAM" .SH NAME dspam_crc \- calculate the DSPAM CRC/hash value for a text token .SH SYNOPSIS .na .B dspam_crc .I [token]\fR\c .ad .SH DESCRIPTION .LP .B dspam_crc is used to calculate the DSPAM CRC/hash value for a text token. .SH OPTIONS .LP .ne 3 .TP .BI [token]\fR\c Data that will be CRC-ized/hashed. .SH EXIT VALUE .LP .ne 3 .PD 0 .TP .B 0 Operation was successful. .ne 3 .TP .B other Operation resulted in an error. .PD .SH COPYRIGHT Copyright \(co 2002\-2012 DSPAM Project .br All rights reserved. .br For more information, see http://dspam.sourceforge.net. .SH SEE ALSO .BR dspam (1), .BR dspam_admin (1), .BR dspam_clean (1), .BR dspam_dump (1), .BR dspam_logrotate (1), .BR dspam_merge (1), .BR dspam_stats (1), .BR dspam_train (1) dspam-3.10.2+dfsg/man/dspam_stats.10000644000175000017500000000375611741351001016341 0ustar julienjulien.\" $Id: dspam_stats.1,v 1.14 2011/06/28 00:13:48 sbajic Exp $ .\" -*- nroff -*- .\" .\" dspam_stats3.9 .\" .\" Authors: Jonathan A. Zdziarski .\" Stevan Bajic .\" .\" Copyright (C) 2002-2012 DSPAM Project .\" All rights reserved .\" .TH dspam_stats 1 "Apr 17, 2010" "DSPAM" "DSPAM" .SH NAME dspam_stats \- display spam statistics .SH SYNOPSIS .na .B dspam_stats [\c .B \--profile\c =PROFILE]\c [\c .BI \-HhrSst\fR\c ] [\c .I username\fR\c ] .ad .SH DESCRIPTION .LP .B dspam_stats displays the spam filtering statistics for one or all users on the system. Displays TP (True Positives (Spam)), TN (True Negatives (Innocent)), FP (False Positives), FN (False Negatives), SC (Spam Corpusfed) and NC (Nonspam Corpusfed). .SH OPTIONS .LP .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 \-H\fR\c Uses multi\-line, human\-readable output displaying the fully\-qualified names for each class of totals, instead of their abbreviated terms. .ne 3 .TP .BI \-h\fR\c Displays help syntax .ne 3 .TP .BI \-r\fR\c Resets the current snapshot .ne 3 .TP .BI \-s\fR\c Displays stats since last snapshot (instead of since epoch) .ne 3 .TP .BI \-S\fR\c Displays accuracy percentages in addition to stats .ne 3 .TP .BI \-t\fR\c Displays a total of all statistics displayed .ne 3 .TP .BI [username]\c Specifies the username to query. If no username is provided, all users will be queried. .SH EXIT VALUE .LP .ne 3 .PD 0 .TP .B 0 Operation was successful. .ne 3 .TP .B other Operation resulted in an error. .PD .SH COPYRIGHT Copyright \(co 2002\-2012 DSPAM Project .br All rights reserved. .br For more information, see http://dspam.sourceforge.net. .SH SEE ALSO .BR dspam (1), .BR dspam_admin (1), .BR dspam_clean (1), .BR dspam_crc (1), .BR dspam_dump (1), .BR dspam_logrotate (1), .BR dspam_merge (1), .BR dspam_train (1) dspam-3.10.2+dfsg/man/dspam.10000644000175000017500000003205411741351001015114 0ustar julienjulien.\" $Id: dspam.1,v 1.20 2011/06/28 00:13:48 sbajic Exp $ .\" -*- nroff -*- .\" .\" dspam3.9 .\" .\" Authors: Jonathan A. Zdziarski .\" Stevan Bajic .\" .\" Copyright (C) 2002-2012 DSPAM Project .\" All rights reserved .\" .TH DSPAM 1 "Aug 14, 2010" "DSPAM" "DSPAM" .SH NAME dspam \- DSPAM Anti-Spam Agent .SH SYNOPSIS .na .B dspam [\c .BI \--mode= teft|toe|tum|notrain|unlearn\c ] [\c .BI \--user \ user1 user2\ ...\ userN\c ] [\c .BI \--feature= noise|no,tb=N,whitelist|wh\c ] [\c .BI \--class= spam|innocent\c ] [\c .BI \--source= error|corpus|inoculation\c ] [\c .BI \--profile= PROFILE\c ] [\c .BI \--deliver= spam,innocent|nonspam,summary,stdout\c ] [\c .BI \--help\c ] [\c .BI \--version\c ] [\c .BI \--process\c ] [\c .BI \--classify\c ] [\c .BI \--signature= signature\c ] [\c .BI \--stdout\c ] [\c .BI \--debug\c ] [\c .BI \--daemon\c ] [\c .BI \--nofork\c ]] [\c .BI \--client\c ] [\c .BI \--rcpt\-to \ recipient\-address(es)\c ] [\c .BI \--mail\-from= sender\-address\c ] [\c .BI passthru\-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. .SH OPTIONS .LP .ne 3 .TP .BI \--user \ user1\fR\ user2\ ...\ userN\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. .ne 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 or the preference extension: .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 .B \--source=error and .B \--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= noise|no,whitelist|wh,tb=N\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 (no)ise : 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://www.zdziarski.com/papers/bnr.html 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 (wh)itelist : 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 NOTE: : None of the present features are necessary when the source is "error", because the original training data is used from the signature to retrain, instantiating whatever features (such as whitelisting) were active at the time of the initial classification. Since BNR is only necessary when a message is being classified, the .B \--feature flag can be safely omitted from error source calls. .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 .B \--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 attempt 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= spam,innocent|nonspam,summary,stdout\c Tells .B DSPAM to deliver the message if its result falls within the criteria specified. For example, .B \--deliver=innocent or .B \--deliver=nonspam will cause DSPAM to only deliver the message if its classification has been determined as innocent. Providing .B \--deliver=innocent,spam or .B \--deliver=nonspam,spam will cause DSPAM to deliver the message regardless of its classification. This flag provides a significant amount of flexibility for nonstandard implementations, where false positives may not be delivered but spam is, and etcetera. .B summary : Deliver (to stdout) a summary indentical to the output of message classification: X\-DSPAM\-Result: User; result="Innocent"; class="Innocent"; probability=0.0000; confidence=1.00; signature=4b11c532158749980119923 .B stdout : Is a shortcut for for .B \--deliver=innocent,spam --stdout .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\c If only the signature is available for training, and not the entire message, the .B \--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. .B 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 .B \--debug will turn on debugging messages. .ne 3 .TP .BI \--daemon\c If .B DSPAM was compiled with .B \--enable\-daemon then using .B \--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 \--nofork\c If .B DSPAM was compiled with .B \--enable\-daemon then using .B \--nofork will cause DSPAM to not fork the daemon into backgound when using .B \--daemon switch. .ne 3 .TP .BI \--client\c If .B DSPAM was compiled with .B \--enable\-daemon then using .B \--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 \ recipient\-address(es)\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 .B \--user If no recipients are provided, the RCPT TOs will match the username. .B 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= sender\-address\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 COPYRIGHT Copyright \(co 2002\-2012 DSPAM Project .br All rights reserved. .br For more information, see http://dspam.sourceforge.net. .SH SEE ALSO .BR dspam_admin (1), .BR dspam_clean (1), .BR dspam_crc (1), .BR dspam_dump (1), .BR dspam_logrotate (1), .BR dspam_merge (1), .BR dspam_stats (1), .BR dspam_train (1) dspam-3.10.2+dfsg/man/dspam_train.10000644000175000017500000000462411741351001016313 0ustar julienjulien.\" $Id: dspam_train.1,v 1.10 2011/06/28 00:13:48 sbajic Exp $ .\" -*- nroff -*- .\" .\" dspam_train3.9 .\" .\" Authors: Jonathan A. Zdziarski .\" Stevan Bajic .\" .\" Copyright (C) 2002-2012 DSPAM Project .\" All rights reserved .\" .TH dspam_train 1 "Apr 17, 2010" "DSPAM" "DSPAM" .SH NAME dspam_train \- train a corpus of mail .SH SYNOPSIS .na .B dspam_train [\c .BI username\fR\c ] [\c .BI \--client\fR\c ] [\c .BI \-i\ \fR\c index|\c .BI spam_corpus\fR\c \ \c .BI nonspam_corpus\fR\c ] .ad .SH DESCRIPTION .LP .B dspam_train is used to train and test a corpus of mail (in maildir or MBOX format). This tool will present each message to DSPAM for a classification and then retrain only if the message was incorrect. This provides close to real\-world training and should be used to build pretrained databases. Upon execution, the tool will automatically determine the ratio of spam:nonspam and train based on that ratio to ensure both corpora are trained consecutively. This tool can also be used as a test jig to measure the efficiency and accuracy of a particular corpus against DSPAM in a given configuration. .SH OPTIONS .LP .ne 3 .TP .ne 3 .TP .BI \--client\c If specified, DSPAM is used in client\-server mode. .ne 3 .TP .BI username\c Specifies the user to train, if omitted the current user name is used. .ne 3 .TP .BI \-i\fR\ index\c Use a index file instead of the usual spam_corpus and nonspam_corpus. .B index : Path to the index file having the following format per line: .br [class] [path to message] .ne 3 .TP .BI spam_corpus\c Specifies either the pathname to the directory containing the corpus of spam, with each in a separate file (e.g. maildir format) or a path to the mailbox in the traditional Unix MBOX format. .ne 3 .TP .BI nonspam_corpus\c Specifies either the pathname to the directory containing the corpus of nonspam with each message in a separate file or a path to the mailbox in the traditional Unix MBOX format. .SH EXIT VALUE .LP .ne 3 .PD 0 .TP .B 0 Operation was successful. .ne 3 .TP .B other Operation resulted in an error. .PD .SH COPYRIGHT Copyright \(co 2002\-2012 DSPAM Project .br All rights reserved. .br For more information, see http://dspam.sourceforge.net. .SH SEE ALSO .BR dspam (1), .BR dspam_admin (1), .BR dspam_clean (1), .BR dspam_crc (1), .BR dspam_dump (1), .BR dspam_logrotate (1), .BR dspam_merge (1), .BR dspam_stats (1) dspam-3.10.2+dfsg/UPGRADING0000644000175000017500000002111011622570546014424 0ustar julienjulienFollow the steps sequentially from the base version you are running up to the top. UPGRADING FROM 3.9.0 -------------------- 1. Ensure MySQL is using latin1 character set. This should reduce the needed database space. The following clauses should be executed for upgrading 3.9.0 DSPAM MySQL schema: ALTER TABLE `dspam_signature_data` CHANGE `signature` `signature` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL; ALTER TABLE `dspam_signature_data` DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci; ALTER TABLE `dspam_stats` DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci; ALTER TABLE `dspam_token_data` DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci; If you are using preference extension with DSPAM, then you should execute the following clause for upgrading DSPAM preference MySQL schema to use latin1 character set: ALTER TABLE `dspam_preferences` CHANGE `preference` `preference` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL; ALTER TABLE `dspam_preferences` CHANGE `value` `value` VARCHAR(64) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL; ALTER TABLE `dspam_preferences` DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci; If you are using the DSPAM virtual user feature then execute the following clauses to update the DSPAM virtual user table to use latin1 character set: ALTER TABLE `dspam_virtual_uids` CHANGE `username` `username` VARCHAR(128) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL; ALTER TABLE `dspam_virtual_uids` DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci; UPGRADING FROM 3.8 ------------------ 1. Ensure MySQL is using the new database schema. The following clauses should be executed for upgrading pre-3.9.0 DSPAM MySQL schema to the 3.9.0 schema: ALTER TABLE `dspam_signature_data` CHANGE `uid` `uid` INT UNSIGNED NOT NULL, CHANGE `data` `data` LONGBLOB NOT NULL, CHANGE `length` `length` INT UNSIGNED NOT NULL; ALTER TABLE `dspam_stats` CHANGE `uid` `uid` INT UNSIGNED NOT NULL, CHANGE `spam_learned` `spam_learned` BIGINT UNSIGNED NOT NULL, CHANGE `innocent_learned` `innocent_learned` BIGINT UNSIGNED NOT NULL, CHANGE `spam_misclassified` `spam_misclassified` BIGINT UNSIGNED NOT NULL, CHANGE `innocent_misclassified` `innocent_misclassified` BIGINT UNSIGNED NOT NULL, CHANGE `spam_corpusfed` `spam_corpusfed` BIGINT UNSIGNED NOT NULL, CHANGE `innocent_corpusfed` `innocent_corpusfed` BIGINT UNSIGNED NOT NULL, CHANGE `spam_classified` `spam_classified` BIGINT UNSIGNED NOT NULL, CHANGE `innocent_classified` `innocent_classified` BIGINT UNSIGNED NOT NULL; ALTER TABLE `dspam_token_data` CHANGE `uid` `uid` INT UNSIGNED NOT NULL, CHANGE `spam_hits` `spam_hits` BIGINT UNSIGNED NOT NULL, CHANGE `innocent_hits` `innocent_hits` BIGINT UNSIGNED NOT NULL; If you are using preference extension with DSPAM, then you should execute the following clause for upgrading pre-3.9.0 DSPAM preference MySQL schema to the 3.9.0 schema: ALTER TABLE `dspam_preferences` CHANGE `uid` `uid` INT UNSIGNED NOT NULL; If you are using virtual users (with AUTO_INCREMENT) in DSPAM, then you should execute the following clause for upgrading pre-3.9.0 DSPAM virtual uids MySQL schema to the 3.9.0 schema: ALTER TABLE `dspam_virtual_uids` CHANGE `uid` `uid` INT UNSIGNED NOT NULL AUTO_INCREMENT; If you are using virtual user aliases (aka: DSPAM in relay mode) in DSPAM, then you should execute the following clause for upgrading pre-3.9.0 DSPAM virtual uids MySQL schema to the 3.9.0 schema: ALTER TABLE `dspam_virtual_uids` CHANGE `uid` `uid` INT UNSIGNED NOT NULL; If you need to speed up the MySQL purging script and can afford to use more disk space for the DSPAM MySQL data, then consider executing the following clause for adding additional indices to the dspam_token_data table: ALTER TABLE `dspam_token_data` ADD INDEX(`spam_hits`,`innocent_hits`), ADD INDEX(`last_hit`); You can of course combine all three fields in one index (and save some space): ALTER TABLE `dspam_token_data` ADD INDEX(`spam_hits`,`innocent_hits`,`last_hit`); Those additional indices/index can speed up the purging for MyISAM tables. If you are using InnoDB tables then the difference with/without them is not that amazing and in most cases not worth the needed additional space/processing power. 2. Ensure PosgreSQL is using the new database schema. The following clauses should be executed for upgrading pre-3.9.0 DSPAM PosgreSQL schema to the 3.9.0 schema: ALTER TABLE dspam_preferences ALTER COLUMN uid TYPE integer; ALTER TABLE dspam_signature_data ALTER COLUMN uid TYPE integer; ALTER TABLE dspam_stats ALTER COLUMN uid TYPE integer; ALTER TABLE dspam_token_data ALTER COLUMN uid TYPE integer; DROP INDEX IF EXISTS id_token_data_sumhits; If you are using virtual users in DSPAM, then you should execute the following clause for upgrading pre-3.9.0 DSPAM virtual uids to the 3.9.0 schema: ALTER TABLE dspam_virtual_uids ALTER COLUMN uid TYPE integer; You need to add an second lookup_tokens function to PostgreSQL. The additional lookup_tokens function can be found in pgsql_objects.sql and it's a slightly different and enhanced then the function originally introduced in 3.6.8. 3. Follow steps in "UPGRADING FROM 3.9.0". UPGRADING FROM 3.6 ------------------ 1. Add 'Tokenizer' setting to dspam.conf The 'Tokenizer' setting in 3.8.0 replaces tokenizer definitions in the "Feature" clause of previous version configurations. See src/dspam.conf (after make) for more information about this seting. 2. Check calls to dspam_logrotate Earlier versions of 3.6 did not prepend a leading "-l" flag to specifying log file selection. This is now required. 3. Ensure 3.6.0 malaligned hash databases are converted Version 3.6.0 failed to align hash databases to 8-byte boundaries. If you are upgrading from v3.6.0 and are using the hash_drv storage driver, you should run cssconvert to upgrade your .css files to a fully aligned format. 4. Invert "SupressWebStats" setting in dspam.conf SupressWebStats has been changed to simply WebStats, and the setting is inverted. Be sure to update this in dspam.conf. 5. Add "ProcessorURLContext" setting in dspam.conf ProcessorURLContext has been added to toggle whether URL specific tokens are created in the tokenizer process. The "on" value is default for previous versions of DSPAM. 6. Follow steps in "UPGRADING FROM 3.8". UPGRADING FROM 3.4 ------------------ Follow all of the steps above, and the following steps: 1. Add "ProcessorBias" setting to dspam.conf ProcessorBias has been added to dspam.conf and must be specified. Since ProcessorBias is the default behavior for previous versions of DSPAM, you will need to add "ProcessorBias on" to dspam.conf. If you have specifically disabled bias, or are using a technique such as Markovian discrimination, you may leave this feature off. 2. Ensure references to SBLQueue are changed to RABLQueue. Older versions of DSPAM used the SBLQueue setting to write files for a DSPAM SBL setup. This has been renamed to RABLQueue. Please change this in dspam.conf if you are writing to a SBL/RABL installation. 3. Add "TestConditionalTraining" setting to dspam.conf TestConditionalTraining has been added to dspam.conf and must be specified to be enabled. Since TestConditionalTraining is the default behavior in DSPAM, it is strongly recommended that you add "TestConditionalTraining on" to dspam.conf 4. Ensure PostgreSQL installation have a lookup_tokens function PostgreSQL systems running v8.0+ must create the function lookup_tokens added to pgsql_objects.sql. The driver now checks your version and uses this function to improve performance on 8.0+. 5. Ensure you are specifying the correct storage driver. hash_drv is now the new default storage driver. hash_drv has no dependencies and is extremely fast/efficient. If you're not familiar with it, you should check out the readme. If you were previously using SQLite, you will now need to specify it as the storage driver: --with-storage-driver=sqlite_drv NOTE: Berkeley DB drivers (libdb3_drv, libdb4_drv) are deprecated and have been removed from the build. You will need to select an alternative storage driver in order to upgrade. 6. Follow steps in "UPGRADING FROM 3.6". dspam-3.10.2+dfsg/ltmain.sh0000755000175000017500000105017111645261467015022 0ustar julienjulien # libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4 TIMESTAMP="" package_revision=1.3293 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="grep -E"} : ${FGREP="grep -F"} : ${GREP="grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_apped perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 dspam-3.10.2+dfsg/missing0000755000175000017500000002623311437240436014567 0ustar julienjulien#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # 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. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: dspam-3.10.2+dfsg/webui/0000755000175000017500000000000011745313527014301 5ustar julienjuliendspam-3.10.2+dfsg/webui/cgi-bin/0000755000175000017500000000000011745313527015611 5ustar julienjuliendspam-3.10.2+dfsg/webui/cgi-bin/dspam.cgi0000755000175000017500000015400611741353010017375 0ustar julienjulien#!/usr/bin/perl # $Id: dspam.cgi,v 1.57 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . use strict; use POSIX qw(strftime ctime); use Time::Local; use vars qw { %CONFIG %DATA %FORM %LANG $MAILBOX $CURRENT_USER $USER $TMPFILE $USERSELECT }; use vars qw { $CURRENT_STORE $LANGUAGE }; # # Read configuration parameters common to all CGI scripts # if (!(-e "configure.pl") || !(-r "configure.pl")) { &htmlheader; print "Error!

"; print "Missing file configure.pl"; print "

\n"; exit; } require "configure.pl"; # # The current CGI script # $CONFIG{'ME'} = "dspam.cgi"; $| = 1; # # Determine which extensions are available # if ($CONFIG{'AUTODETECT'} == 1 || $CONFIG{'AUTODETECT'} eq "") { $CONFIG{'PREFERENCES_EXTENSION'} = 0; $CONFIG{'LARGE_SCALE'} = 0; $CONFIG{'DOMAIN_SCALE'} = 0; do { my $x = `$CONFIG{'DSPAM'} --version`; if ($x =~ /--enable-preferences-extension/) { $CONFIG{'PREFERENCES_EXTENSION'} = 1; } if ($x =~ /--enable-large-scale/) { $CONFIG{'LARGE_SCALE'} = 1; } if ($x =~ /--enable-domain-scale/) { $CONFIG{'DOMAIN_SCALE'} = 1; } } } # # Determine admin status # $CONFIG{'ADMIN'} = 0; if ($ENV{'REMOTE_USER'} ne "") { open(FILE, "<./admins"); while() { chomp; if ($_ eq $ENV{'REMOTE_USER'}) { $CONFIG{'ADMIN'} = 1; last; } } close(FILE); } $CONFIG{'SUBADMIN'} = 0; $CONFIG{'SUBADMIN_USERS'} = {}; if ($ENV{'REMOTE_USER'} ne "" && $CONFIG{'ADMIN'} == 0) { open(FILE, "<./subadmins"); while() { chomp; if ($_ !~ /^\s*#/) { my ($subadmin, $users) = (split(/\s*:\s*/))[0,1]; if ($subadmin eq $ENV{'REMOTE_USER'}) { $CONFIG{'SUBADMIN'} = 1; $CONFIG{'SUBADMIN_USERS'}->{ $ENV{'REMOTE_USER'} } = 1; for (split(/\s*,\s*/,$users)) { my $user_clean = $_; $user_clean =~ s/^\s+//; $user_clean =~ s/\s+$//; $CONFIG{'SUBADMIN_USERS'}->{ $user_clean } = 1 if $user_clean ne ""; } last; } } } close(FILE); } # # Parse form # %FORM = &ReadParse; # # Configure languages # if ($FORM{'language'} ne "") { $LANGUAGE = $FORM{'language'}; } else { $LANGUAGE = $CONFIG{'LANGUAGE_USED'}; } if (! defined $CONFIG{'LANG'}->{$LANGUAGE}->{'NAME'}) { $LANGUAGE = $CONFIG{'LANGUAGE_USED'}; } my @dslanguages = (); for (split(/\n/,$CONFIG{'LANGUAGES'})) { my $lang = $_; $lang =~ s/\s*selected>/>/; if ($lang =~ /value="([^"]+)"/) { $lang =~ s/>/ selected>/ if ($1 eq $LANGUAGE); } push(@dslanguages, $lang); } $CONFIG{'LANGUAGES'} = join("\n", @dslanguages); $CONFIG{'TEMPLATES'} = $CONFIG{'LANG'}->{$LANGUAGE}->{'TEMPLATEDIR'}; # # Configure Filesystem # $CURRENT_USER = $ENV{'REMOTE_USER'}; if ($FORM{'user'} ne "") { if ($CONFIG{'ADMIN'} == 1) { $CURRENT_USER = $FORM{'user'}; } elsif ($CONFIG{'SUBADMIN'} == 1) { my $form_user_domain = (split(/@/, $FORM{'user'}))[1]; if ($CONFIG{'SUBADMIN_USERS'}->{ $FORM{'user'} } == 1 || ($form_user_domain ne "" && $CONFIG{'SUBADMIN_USERS'}->{ "*@" . $form_user_domain } == 1)) { $CURRENT_USER = $FORM{'user'}; } else { $FORM{'user'} = $CURRENT_USER; } } else { $FORM{'user'} = $CURRENT_USER; } } else { $FORM{'user'} = $CURRENT_USER; } $CONFIG{'DSPAM_ARGS'} =~ s/%CURRENT_USER%/$CURRENT_USER/g; # Current Store do { my(%PREF) = GetPrefs($CURRENT_USER); $CURRENT_STORE = $PREF{"localStore"}; if ($CURRENT_STORE eq "") { $CURRENT_STORE = $CURRENT_USER; } }; $USER = GetPath($CURRENT_STORE); $MAILBOX = $USER . ".mbox"; $TMPFILE = $USER . ".tmp"; if ($CURRENT_USER eq "") { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_no_identity'}"); } if ($FORM{'template'} eq "" || $FORM{'template'} !~ /^([A-Z0-9]*)$/i) { $FORM{'template'} = "performance"; } # # Create a list of known users # if ($CONFIG{'ADMIN'} == 1 || $CONFIG{'SUBADMIN'} == 1) { my @dsusers = (); push(@dsusers, qq!!); close(IN); $USERSELECT = join("\n",@dsusers); @dsusers=(); } my($MYURL); $MYURL = qq!$CONFIG{'ME'}?user=$FORM{'user'}&template=$FORM{'template'}&language=$LANGUAGE!; # # Set up initial display variables # &CheckQuarantine; $DATA{'REMOTE_USER'} = $CURRENT_USER; # # Display DSPAM Version # $DATA{'DSPAMVERSION'} = $CONFIG{'DSPAM_VERSION'}; # # Process Commands # # Performance if ($FORM{'template'} eq "performance") { if ($FORM{'command'} eq "resetStats") { &ResetStats; redirect($MYURL); } elsif ($FORM{'command'} eq "tweak") { &Tweak; redirect($MYURL); } else { &DisplayIndex; } # Quarantine } elsif ($FORM{'template'} eq "quarantine") { if ($FORM{'command'} eq "viewMessage") { &Quarantine_ViewMessage; } else { $MYURL .= "&sortby=$FORM{'sortby'}" if ($FORM{'sortby'} ne ""); if ($FORM{'command'} eq "processQuarantine") { &ProcessQuarantine; redirect($MYURL); } elsif ($FORM{'command'} eq "processFalsePositive") { &ProcessFalsePositive; redirect($MYURL); } else { &DisplayQuarantine; } } # Alerts } elsif ($FORM{'template'} eq "alerts") { if ($FORM{'command'} eq "addAlert") { &AddAlert; redirect($MYURL); } elsif ($FORM{'command'} eq "deleteAlert") { &DeleteAlert; redirect($MYURL); } else { &DisplayAlerts; } # Preferences } elsif ($FORM{'template'} eq "preferences") { &DisplayPreferences; # Analysis } elsif ($FORM{'template'} eq "analysis") { &DisplayAnalysis; # History } elsif ($FORM{'template'} eq "history") { &DisplayHistory; } elsif ($FORM{'template'} eq "fragment") { &DisplayFragment; } else { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_invalid_command'} $FORM{'COMMAND'}"); } # # History Functions # sub DisplayFragment { $FORM{'signatureID'} =~ s/\///g; $DATA{'FROM'} = $FORM{'from'}; $DATA{'SUBJECT'} = $FORM{'subject'}; $DATA{'INFO'} = $FORM{'info'}; $DATA{'TIME'} = $FORM{'time'}; open(FILE, "<$USER.frag/$FORM{'signatureID'}.frag") || &error($!); while() { s//>\;/g; $DATA{'MESSAGE'} .= $_; } close(FILE); &output(%DATA); } sub DisplayHistory { my($all_lines , $begin, $history_pages, $rec, $history_page); unless ($history_page = $FORM{'history_page'}) { $history_page = 1;} my(@buffer, @history, $line, %rec); my($rowclass) = "rowEven"; if ($CONFIG{'HISTORY_PER_PAGE'} == 0) { $CONFIG{'HISTORY_PER_PAGE'} = 50; } my($show) = $FORM{'show'}; if ($show eq "") { $show = "all"; } if ($FORM{'command'} eq "retrainChecked") { foreach my $i (0 .. $#{ $FORM{retrain_checked} }) { my ($retrain, $signature) = split(/:/, $FORM{retrain_checked}[$i]); if ($retrain eq "innocent") { $FORM{'signatureID'} = $signature; &ProcessFalsePositive(); undef $FORM{'signatureID'}; } elsif ($retrain eq "innocent" or $retrain eq "spam") { system("$CONFIG{'DSPAM'} --source=error --class=" . quotemeta($retrain) . " --signature=" . quotemeta($signature) . " --user " . quotemeta("$CURRENT_USER")); } } redirect("$MYURL&show=$show&history_page=$history_page"); } elsif ($FORM{'retrain'} ne "") { if ($FORM{'retrain'} eq "innocent") { &ProcessFalsePositive(); } else { system("$CONFIG{'DSPAM'} --source=error --class=" . quotemeta($FORM{'retrain'}) . " --signature=" . quotemeta($FORM{'signatureID'}) . " --user " . quotemeta("$CURRENT_USER")); } redirect("$MYURL&show=$show&history_page=$history_page"); } my($LOG) = "$USER.log"; if (! -e $LOG) { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_no_historic'}"); } # Preseed retraining information and delivery errors open(LOG, "< $LOG") or die "Can't open log file $LOG"; while() { my($time, $class, $from, $signature, $subject, $info, $messageid) = split(/\t/, $_); next if ($signature eq ""); # not good to check for messages to show here, we're skipping # the retraining data so retrained messages won't show if ($class eq "M" || $class eq "F" || $class eq "E" || $class eq "U") { if ($class eq "E" || $class eq "U") { $rec{$signature}->{'info'} = $info; } elsif ($class eq "F" || $class eq "M") { $rec{$signature}->{'class'} = $class; $rec{$signature}->{'count'}++; $rec{$signature}->{'info'} = $info if ($rec{$signature}->{'info'} eq ""); } # filter out resents if there are any. Since it's the same # message we only allow retraining on the 1st occurence of it. } elsif ($messageid == '' || $rec{$signature}->{'messageid'} != $messageid || $CONFIG{'HISTORY_DUPLICATES'} ne "no") { # skip unwanted messages next if ($class ne "S" && $show eq "spam"); next if ($class ne "I" && $show eq "innocent"); next if ($class ne "W" && $show eq "whitelisted"); next if ($class ne "V" && $show eq "virus"); next if ($class ne "A" && $show eq "blacklisted"); next if ($class ne "O" && $show eq "blocklisted"); $rec{$signature}->{'time'} = $time; $rec{$signature}->{'class'} = $class; $rec{$signature}->{'from'} = $from; $rec{$signature}->{'signature'} = $signature; $rec{$signature}->{'subject'} = $subject; $rec{$signature}->{'info'} = $info; $rec{$signature}->{'messageid'} = $messageid; unshift(@buffer, $rec{$signature}); } } close(LOG); if($CONFIG{'HISTORY_SIZE'} < ($#buffer+1)) { $history_pages = int($CONFIG{'HISTORY_SIZE'} / $CONFIG{'HISTORY_PER_PAGE'}); $history_pages += 1 if($CONFIG{'HISTORY_SIZE'} % $CONFIG{'HISTORY_PER_PAGE'}); } else { $history_pages = int( ($#buffer+1) / $CONFIG{'HISTORY_PER_PAGE'}); $history_pages += 1 if(($#buffer+1) % $CONFIG{'HISTORY_PER_PAGE'}); } $begin = int(($history_page - 1) * $CONFIG{'HISTORY_PER_PAGE'}) ; # Now lets just keep the information that we really need. @buffer = splice(@buffer, $begin,$CONFIG{'HISTORY_PER_PAGE'}); my $retrain_checked_msg_no = 0; my $counter = 0; while ($rec = pop@buffer) { $counter++; my($time, $class, $from, $signature, $subject, $info, $messageid); $time = $rec->{'time'}; $class = $rec->{'class'}; $from = $rec->{'from'}; $signature = $rec->{'signature'}; $subject = $rec->{'subject'}; $info = $rec->{'info'}; $messageid = $rec->{'messageid'}; next if ($signature eq ""); next if ($rec{$signature}->{'displayed'} ne ""); next if ($class eq "E"); $rec{$signature}->{'displayed'} = 1; # Resends of retrained messages will need the original from/subject line if ($messageid ne "") { $from = $rec{$messageid}->{'from'} if ($from eq ""); $subject = $rec{$messageid}->{'subject'} if ($subject eq ""); $rec{$messageid}->{'from'} = $from if ($rec{$messageid}->{'from'} eq ""); $rec{$messageid}->{'subject'} = $subject if ($rec{$messageid}->{'subject'} eq ""); } $from = "" if ($from eq ""); $subject = "" if ($subject eq ""); my $ctime; if($CONFIG{"DATE_FORMAT"}) { $ctime = strftime($CONFIG{"DATE_FORMAT"}, localtime($time)); } else { $ctime = ctime($time); my(@t) = split(/\:/, (split(/\s+/, $ctime))[3]); my($x) = (split(/\s+/, $ctime))[0]; my($m) = "a"; if ($t[0]>=12) { $t[0] -= 12; $m = "p"; } if ($t[0] == 0) { $t[0] = 12; } $ctime = "$x $t[0]:$t[1]$m"; } # Set the appropriate type and label for this message my($cl, $cllabel); $class = $rec{$signature}->{'class'} if ($rec{$signature}->{'class'} ne ""); if ($class eq "S") { $cl = "spam"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_spam'}"; } elsif ($class eq "I") { $cl = "innocent"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_innocent'}"; } elsif ($class eq "F") { if ($rec{$signature}->{'count'} % 2 != 0) { $cl = "false"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_miss'}"; } else { $cl = "innocent"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_innocent'}"; } } elsif ($class eq "M") { if ($rec{$signature}->{'count'} % 2 != 0) { $cl = "missed"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_miss'}"; } else { $cl = "spam"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_spam'}"; } } elsif ($class eq "W") { $cl = "whitelisted"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_whitelist'}"; } elsif ($class eq "V") { $cl = "virus"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_virus'}"; } elsif ($class eq "A") { $cl = "blacklisted"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_rbl'}"; } elsif ($class eq "O") { $cl = "blocklisted"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_block'}"; } elsif ($class eq "N") { $cl = "inoculation"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_spam'}"; } elsif ($class eq "C") { $cl = "corpus"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_corpus'}"; } elsif ($class eq "U") { $cl = "unknown"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_unknown'}"; } elsif ($class eq "E") { $cl = "error"; $cllabel="$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_error'}"; } if ($messageid ne "" && $messageid ne "1") { if ($rec{$messageid}->{'resend'} ne "") { $cl = "relay"; $cllabel = "$CONFIG{'LANG'}->{$LANGUAGE}->{'history_label_resend'}"; } $rec{$messageid}->{'resend'} = $signature; } $info = $rec{$signature}->{'info'} if ($rec{$signature}->{'info'} ne ""); $from = substr($from, 0, $CONFIG{'MAX_COL_LEN'} - 3) . "..." if (length($from)>$CONFIG{'MAX_COL_LEN'}); $subject = substr($subject, 0, $CONFIG{'MAX_COL_LEN'} - 3) . "..." if (length($subject)>$CONFIG{'MAX_COL_LEN'}); $from =~ s/&/&/g; $from =~ s//>/g; $from =~ s/"/"/g; $from =~ s/'/'/g; # MSIE doesn't know "'" $subject =~ s/&/&/g; $subject =~ s//>/g; $subject =~ s/"/"/g; $subject =~ s/'/'/g; # MSIE doesn't know "'" my($rclass); $rclass = "spam" if ($class eq "I" || $class eq "W" || $class eq "F"); $rclass = "innocent" if ($class eq "S" || $class eq "M" || $class eq "V" || $class eq "A" || $class eq "O"); my($retrain); if ($rec{$signature}->{'class'} =~ /^(M|F)$/ && $rec{$signature}->{'count'} % 2 != 0) { $retrain = "$CONFIG{'LANG'}->{$LANGUAGE}->{'history_retrained'}"; } if ($retrain eq "") { $retrain = qq!$CONFIG{'LANG'}->{$LANGUAGE}->{'history_retrain_as'} ! . ucfirst($CONFIG{'LANG'}->{$LANGUAGE}->{'history_retrain_as_'.$rclass}) . ""; } else { $retrain .= qq! ($CONFIG{'LANG'}->{$LANGUAGE}->{'history_retrain_undo'})!; } my($path) = "$USER.frag/$signature.frag"; if (-e $path) { my(%pairs); $pairs{'template'} = "fragment"; $pairs{'signatureID'} = $signature; my($sub) = $subject; $sub =~ s/#//g; $sub =~ s/(['])/\\$1/g; $pairs{'subject'} = $sub; $pairs{'from'} = $from; $pairs{'info'} = $info; $pairs{'time'} = $ctime; $pairs{'user'} = $FORM{'user'}; my($url) = &SafeVars(%pairs); $from = qq!$from!; } my $retrain_action = ""; if ( $class eq "V" || $class eq "A" || $class eq "O" || $class eq "U" || $class eq "") { $retrain_action = qq! !; } else { $retrain_action = qq!$retrain!; } # HTMLize special characters if ($CONFIG{'HISTORY_HTMLIZE'} eq "yes") { $from=htmlize($from); $subject=htmlize($subject); } my($entry) = <<_END; $cllabel $retrain_action $ctime $from $subject $info _END $retrain_checked_msg_no++; push(@history, $entry); if ($rowclass eq "rowEven") { $rowclass = "rowOdd"; } else { $rowclass = "rowEven"; } } while($line = pop(@history)) { $DATA{'HISTORY'} .= $line; } $DATA{'HISTORYPAGES'} = qq!!; if ($CONFIG{'HISTORY_PER_PAGE'} > 0) { $DATA{'HISTORYPAGES'} .= "
"; $DATA{'HISTORYPAGES'} .= "[" if ($history_pages > 0); if (($history_pages > 1) && ($history_page > 1)) { my $i = $history_page-1; $DATA{'HISTORYPAGES'} .= " < "; } for(my $i = 1; $i <= $history_pages; $i++) { $DATA{'HISTORYPAGES'} .= ""; $DATA{'HISTORYPAGES'} .= "" if ($i == $history_page); $DATA{'HISTORYPAGES'} .= " $i "; $DATA{'HISTORYPAGES'} .= "" if ($i == $history_page); $DATA{'HISTORYPAGES'} .= ""; } if (($history_pages > 1) && ($history_page < $history_pages)) { my $i = $history_page+1; $DATA{'HISTORYPAGES'} .= " > "; } $DATA{'HISTORYPAGES'} .= "]" if ($history_pages > 0); $DATA{'HISTORYPAGES'} .= "
"; } $DATA{'SHOW'} = $show; $DATA{'SHOW_SELECTOR'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'history_show'}: "; if ($show eq "all") { $DATA{'SHOW_SELECTOR'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'history_show_all'}"; } else { $DATA{'SHOW_SELECTOR'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'history_show_all'}"; } $DATA{'SHOW_SELECTOR'} .= " | "; if ($show eq "spam") { $DATA{'SHOW_SELECTOR'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'history_show_spam'}"; } else { $DATA{'SHOW_SELECTOR'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'history_show_spam'}"; } $DATA{'SHOW_SELECTOR'} .= " | "; if ($show eq "innocent") { $DATA{'SHOW_SELECTOR'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'history_show_innocent'}"; } else { $DATA{'SHOW_SELECTOR'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'history_show_innocent'}"; } $DATA{'SHOW_SELECTOR'} .= " | "; if ($show eq "whitelisted") { $DATA{'SHOW_SELECTOR'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'history_show_whitelisted'}"; } else { $DATA{'SHOW_SELECTOR'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'history_show_whitelisted'}"; } $DATA{'SHOW_SELECTOR'} .= ""; &output(%DATA); } # # Analysis Functions # sub DisplayAnalysis { my($LOG) = "$USER.log"; my %Stats=( daily => {}, weekly => {}, ); my ($min, $hour, $mday, $mon, $year) = (localtime(time))[1,2,3,4,5]; my ($daystart) = timelocal(0, 0, 0, $mday, $mon, $year); my ($periodstart) = $daystart - (3600*24*13); # 2 Weeks ago my ($dailystart) = time - (3600*23); if (! -e $LOG) { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_no_historic'}"); } open(LOG, "<$LOG") || &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_cannot_open_log'}: $!"); while() { my($t_log, $c_log) = split(/\t/); # Only Parse Log Data in our Time Period if ($t_log>=$periodstart) { my($tmin, $thour, $tday, $tmon) = (localtime($t_log))[1,2,3,4]; $tmon++; foreach my $period (qw( weekly daily )) { my $idx; if ($period eq "weekly") { $idx="$tmon/$tday"; } else { ($t_log>=$dailystart) || next; $idx=To12Hour($thour); } if (!exists $Stats{$period}->{$idx}) { $Stats{$period}->{$idx}={ nonspam => 0, spam => 0, title => $idx, idx => $t_log, }; } my $hr=$Stats{$period}->{$idx}; if ($c_log eq "S" || $c_log eq "V" || $c_log eq "A" || $c_log eq "O") { $hr->{spam}++; } if ($c_log eq "I" || $c_log eq "W") { $hr->{nonspam}++; } if ($c_log eq "F") { $hr->{spam}--; ($hr->{spam}<0) && ($hr->{spam}=0); $hr->{nonspam}++; } if ($c_log eq "M") { $hr->{nonspam}--; ($hr->{nonspam}<0) && ($hr->{nonspam}=0); $hr->{spam}++; } } } } close(LOG); foreach my $period (qw( daily weekly )) { my $uc_period=uc($period); my $hk="DATA_$uc_period"; my %lst=(spam => [], nonspam => [], title => []); foreach my $hr (sort {$a->{idx}<=>$b->{idx}} (values %{$Stats{$period}})) { foreach my $type (qw( spam nonspam title )) { push(@{$lst{$type}},$hr->{$type}); my $totk=""; if ($type eq "spam") { $totk="S"; } elsif ($type eq "nonspam") { $totk="I"; } ($totk eq "") && next; my $sk="T${totk}_$uc_period"; (exists $DATA{$sk}) || ($DATA{$sk}=0); $DATA{$sk}+=$hr->{$type}; } } foreach my $type (qw( spam nonspam title )) { (exists $lst{$type}) || ($lst{$type}=[]); @{$lst{$type}} = (0) if (scalar(@{$lst{$type}}) == 0); } $DATA{$hk}=join("_", join(",",@{$lst{spam}}), join(",",@{$lst{nonspam}}), join(",",@{$lst{title}}), ); } &output(%DATA); } # # Preferences Functions # sub DisplayPreferences { my(%PREFS); my($FILE) = "$USER.prefs"; my $username = $CURRENT_USER; if ($FORM{'submit'} ne "") { if ($FORM{'enableBNR'} ne "on") { $FORM{'enableBNR'} = "off"; } if ($FORM{'optIn'} ne "on") { $FORM{'optIn'} = "off"; } if ($FORM{'optOut'} ne "on") { $FORM{'optOut'} = "off"; } if ($FORM{'showFactors'} ne "on") { $FORM{'showFactors'} = "off"; } if ($FORM{'enableWhitelist'} ne "on") { $FORM{'enableWhitelist'} = "off"; } if ($FORM{'dailyQuarantineSummary'} ne "on") { $FORM{'dailyQuarantineSummary'} = "off"; } if ($CONFIG{'PREFERENCES_EXTENSION'} == 1) { if ($FORM{'spamSubject'} eq "") { $FORM{'spamSubject'} = "''"; } else { $FORM{'spamSubject'} = quotemeta($FORM{'spamSubject'}); } system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref ".quotemeta($CURRENT_USER). " trainingMode " . quotemeta($FORM{'trainingMode'}) . " > /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref ".quotemeta($CURRENT_USER). " spamAction " . quotemeta($FORM{'spamAction'}) . " > /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref ".quotemeta($CURRENT_USER). " signatureLocation " . quotemeta($FORM{'signatureLocation'}) . " > /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref ".quotemeta($CURRENT_USER). " spamSubject " . $FORM{'spamSubject'} . " > /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref ".quotemeta($CURRENT_USER). " statisticalSedation " . quotemeta($FORM{'statisticalSedation'}) . " > /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref ".quotemeta($CURRENT_USER). " enableBNR " . quotemeta($FORM{'enableBNR'}) . "> /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref ".quotemeta($CURRENT_USER). " optOut " . quotemeta($FORM{'optOut'}) . ">/dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref ".quotemeta($CURRENT_USER). " optIn " . quotemeta($FORM{'optIn'}) . ">/dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref ".quotemeta($CURRENT_USER). " showFactors " . quotemeta($FORM{'showFactors'}) . "> /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref ".quotemeta($CURRENT_USER). " enableWhitelist " . quotemeta($FORM{'enableWhitelist'}) . "> /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref ".quotemeta($CURRENT_USER). " dailyQuarantineSummary " . quotemeta($FORM{'dailyQuarantineSummary'}) . "> /dev/null"); } else { open(FILE, ">$FILE") || do { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_cannot_write_prefs'}: $!"); }; print FILE <<_END; trainingMode=$FORM{'trainingMode'} spamAction=$FORM{'spamAction'} spamSubject=$FORM{'spamSubject'} statisticalSedation=$FORM{'statisticalSedation'} enableBNR=$FORM{'enableBNR'} optIn=$FORM{'optIn'} optOut=$FORM{'optOut'} showFactors=$FORM{'showFactors'} enableWhitelist=$FORM{'enableWhitelist'} signatureLocation=$FORM{'signatureLocation'} dailyQuarantineSummary=$FORM{'dailyQuarantineSummary'} _END close(FILE); } redirect("$CONFIG{'ME'}?user=$FORM{'user'}&template=preferences&language=$LANGUAGE"); } %PREFS = GetPrefs(); $DATA{"SEDATION_$PREFS{'statisticalSedation'}"} = "CHECKED"; $DATA{"S_".$PREFS{'trainingMode'}} = "CHECKED"; $DATA{"S_ACTION_".uc($PREFS{'spamAction'})} = "CHECKED"; $DATA{"S_LOC_".uc($PREFS{'signatureLocation'})} = "CHECKED"; $DATA{"SPAM_SUBJECT"} = $PREFS{'spamSubject'}; if ($PREFS{'optIn'} eq "on") { $DATA{'C_OPTIN'} = "CHECKED"; } if ($PREFS{'optOut'} eq "on") { $DATA{'C_OPTOUT'} = "CHECKED"; } if ($PREFS{"enableBNR"} eq "on") { $DATA{"C_BNR"} = "CHECKED"; } if ($PREFS{"showFactors"} eq "on") { $DATA{"C_FACTORS"} = "CHECKED"; } if ($PREFS{"enableWhitelist"} eq "on") { $DATA{"C_WHITELIST"} = "CHECKED"; } if ($PREFS{"dailyQuarantineSummary"} eq "on") { $DATA{"C_SUMMARY"} = "CHECKED"; } if ($CONFIG{'OPTMODE'} eq "OUT") { $DATA{"OPTION"} = "$CONFIG{'LANG'}->{$LANGUAGE}->{'option_disable_filtering'}
"; } elsif ($CONFIG{'OPTMODE'} eq "IN") { $DATA{"OPTION"} = "$CONFIG{'LANG'}->{$LANGUAGE}->{'option_enable_filtering'}
"; } else { $DATA{"OPTION"} = ""; } &output(%DATA); } # # Quarantine Functions # sub ProcessQuarantine { if ($FORM{'manyNotSpam'} ne "") { &Quarantine_ManyNotSpam; } else { &Quarantine_DeleteSpam; } &CheckQuarantine; return; } sub ProcessFalsePositive { my(@buffer, %head, $found); if ($FORM{'signatureID'} eq "") { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_no_sigid'}"); } open(FILE, "<$MAILBOX"); while() { s/\r?\n$//; push(@buffer, $_); } close(FILE); while($#buffer>=0) { my($buff, $mode, @temp); $mode = 0; @temp = (); while(($buff !~ /^From /) && ($#buffer>=0)) { $buff = $buffer[0]; if ($buff =~ /^From /) { if ($mode == 0) { $mode = 1; } else { next; } } $buff = shift(@buffer); if ($buff !~ /^From /) { push(@temp, $buff); } next; } foreach(@temp) { last if ($_ eq ""); my($key, $val) = split(/\: ?/, $_, 2); $head{$key} = $val; } if ($head{'X-DSPAM-Signature'} eq $FORM{'signatureID'}) { $found = 1; open(PIPE, "|$CONFIG{'DSPAM'} $CONFIG{'DSPAM_ARGS'} >$TMPFILE 2>&1") || &error($!); foreach(@temp) { print PIPE "$_\n"; } close(PIPE); } } # Couldn't find the message, so just retrain on signature if (!$found) { system("$CONFIG{'DSPAM'} --source=error --class=innocent --signature=" . quotemeta($FORM{'signatureID'}) . " --user " . quotemeta("$CURRENT_USER")); } if ($?) { my(@log); open(LOG, "<$TMPFILE"); @log = ; close(LOG); unlink("$TMPFILE"); &error("
".join('', @log)."
"); } unlink("$TMPFILE"); $FORM{$FORM{'signatureID'}} = "on"; &Quarantine_DeleteSpam(); return; } sub Quarantine_ManyNotSpam { my(@buffer, @errors); open(FILE, "<$MAILBOX"); while() { s/\r?\n$//; push(@buffer, $_); } close(FILE); open(FILE, ">$MAILBOX") || &error($!); open(RETRAIN, ">>$USER.retrain.log"); while($#buffer>=0) { my($buff, $mode, @temp, %head, $delivered); $mode = 0; while(($buff !~ /^From /) && ($#buffer>=0)) { $buff = $buffer[0]; if ($buff =~ /^From /) { if ($mode == 0) { $mode = 1; $buff = shift(@buffer); push(@temp, $buff); $buff = ""; next; } else { next; } } $buff = shift(@buffer); push(@temp, $buff); next; } foreach(@temp) { last if ($_ eq ""); my($key, $val) = split(/\: ?/, $_, 2); $head{$key} = $val; } $delivered = 0; if ($FORM{$head{'X-DSPAM-Signature'}} ne "") { my($err); $err = &Deliver(@temp); if ($err eq "") { $delivered = 1; } else { push(@errors, $err); } } if (!$delivered) { foreach(@temp) { print FILE "$_\n"; } } else { print RETRAIN time . "\t$head{'X-DSPAM-Signature'}\tinnocent\n"; } } close(RETRAIN); close(FILE); if (@errors > 0) { &error(join("
", @errors)); } return; } sub Deliver { my(@temp) = @_; open(PIPE, "|$CONFIG{'DSPAM'} $CONFIG{'DSPAM_ARGS'}") || return $!; foreach(@temp) { print PIPE "$_\n" || return $!; } close(PIPE) || return $!; return ""; } sub Quarantine_ViewMessage { my(@buffer); if ($FORM{'signatureID'} eq "") { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_no_sigid'}"); } $DATA{'MESSAGE_ID'} = $FORM{'signatureID'}; open(FILE, "<$MAILBOX"); while() { s/\r?\n//; push(@buffer, $_); } close(FILE); while($#buffer>=0) { my($buff, $mode, @temp, %head); $mode = 0; @temp = (); while(($buff !~ /^From /) && ($#buffer>=0)) { $buff = $buffer[0]; if ($buff =~ /^From /) { if ($mode == 0) { $mode = 1; } else { next; } } $buff = shift(@buffer); if ($buff !~ /^From /) { push(@temp, $buff); } next; } foreach(@temp) { last if ($_ eq ""); my($key, $val) = split(/\: ?/, $_, 2); $head{$key} = $val; } if ($head{'X-DSPAM-Signature'} eq $FORM{'signatureID'}) { foreach(@temp) { s//\>\;/g; $DATA{'MESSAGE'} .= "$_\n"; } } } $FORM{'template'} = "viewmessage"; &output(%DATA); } sub Quarantine_DeleteSpam { my(@buffer); if ($FORM{'deleteAll'} ne "") { my($sz); my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat("$USER.mbox"); open(FILE, "<$USER.mbox.size"); $sz = ; close(FILE); chomp($sz); if ($sz == $size) { open(FILE, ">$MAILBOX"); close(FILE); unlink("$USER.mbox.size"); unlink("$USER.mboxwarn"); } else { return; } $FORM{'template'} = "performance"; &CheckQuarantine; redirect("$CONFIG{'ME'}?user=$FORM{'user'}&template=$FORM{'template'}&language=$LANGUAGE"); return; } open(FILE, "<$MAILBOX"); while() { s/\r?\n//; push(@buffer, $_); } close(FILE); open(FILE, ">$MAILBOX"); while($#buffer>=0) { my($buff, $mode, @temp, %head); $mode = 0; while(($buff !~ /^From /) && ($#buffer>=0)) { $buff = $buffer[0]; if ($buff =~ /^From /) { if ($mode == 0) { $mode = 1; $buff = shift(@buffer); push(@temp, $buff); $buff = ""; next; } else { next; } } $buff = shift(@buffer); push(@temp, $buff); next; } foreach(@temp) { last if ($_ eq ""); my($key, $val) = split(/\: ?/, $_, 2); $head{$key} = $val; } if ($FORM{$head{'X-DSPAM-Signature'}} eq "") { foreach(@temp) { print FILE "$_\n"; } } } close(FILE); return; } sub by_rating { $a->{'rating'} <=> $b->{'rating'} } sub by_subject { lc($a->{'Subject'}) cmp lc($b->{'Subject'}) } sub by_from { lc($a->{'From'}) cmp lc($b->{'From'}) } sub DisplayQuarantine { my(@alerts); my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat("$USER.mbox"); open(FILE, ">$USER.mbox.size"); print(FILE "$size"); close(FILE); open(FILE, ">$MAILBOX.stamp"); close(FILE); chmod 0660, "$MAILBOX.stamp"; open(FILE, "<$USER.alerts"); while() { chomp; push(@alerts, $_); } close(FILE); my($next, @buffer, $rowclass, $mode, $markclass, $marklabel, @headings); $rowclass="rowEven"; open(FILE, "<$MAILBOX"); while() { s/\r?\n//; if ($_ ne "") { if ($mode eq "") { if ($_ =~ /^From /) { $mode = 1; } else { next; } } push(@buffer, $_); next; } next if ($mode eq ""); my($new, $start, $alert); $alert = 0; $new = {}; foreach(@buffer) { my($al); foreach $al (@alerts) { if (/$al/i) { $alert = 1; } } if ($_ =~ /^From /) { my(@a) = split(/ /, $_); my($x) = 2; for (0..$#a) { if (($a[$_] =~ /\@|>/) && ($_>$x)) { $x = $_ + 1; } } for(1..$x) { shift(@a); } $start = join(" ", @a); } else { my($key, $val) = split(/\: ?/, $_, 2); $new->{$key} = $val; } } if ($rowclass eq "rowEven") { $rowclass = "rowOdd"; } else { $rowclass = "rowEven"; } $new->{'alert'} = $alert; if ($alert) { $rowclass="rowAlert"; } # HTMLize special characters if ($CONFIG{'QUARANTINE_HTMLIZE'} eq "yes") { $new->{'Subject'} = htmlize($new->{'Subject'}); $new->{'From'} = htmlize($new->{'From'}); } $new->{'Sub2'} = $new->{'X-DSPAM-Signature'}; if (length($new->{'Subject'})>$CONFIG{'MAX_COL_LEN'}) { $new->{'Subject'} = substr($new->{'Subject'}, 0, $CONFIG{'MAX_COL_LEN'} - 3) . "..."; } if (length($new->{'From'})>$CONFIG{'MAX_COL_LEN'}) { $new->{'From'} = substr($new->{'From'}, 0, $CONFIG{'MAX_COL_LEN'} - 3) . "..."; } if ($new->{'Subject'} eq "") { $new->{'Subject'} = ""; } # $new->{'rating'} = $new->{'X-DSPAM-Probability'} * $new->{'X-DSPAM-Confidence'}; $new->{'rating'} = $new->{'X-DSPAM-Confidence'}; foreach(keys(%$new)) { next if ($_ eq "X-DSPAM-Signature"); $new->{$_} =~ s/{$_} =~ s/>/\>\;/g; } push(@headings, $new); @buffer = (); $mode = ""; next; } my($sortBy) = $FORM{'sortby'}; if ($sortBy eq "") { $sortBy = $CONFIG{'SORT_DEFAULT'}; } if ($sortBy eq "Rating") { @headings = sort by_rating @headings; } if ($sortBy eq "Subject") { @headings = sort by_subject @headings; } if ($sortBy eq "From") { @headings = sort by_from @headings; } if ($sortBy eq "Date") { @headings = reverse @headings; } $DATA{'SORTBY'} = $sortBy; $DATA{'SORT_QUARANTINE'} .= ""; if ($sortBy eq "Rating") { $DATA{'SORT_QUARANTINE'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'quarantine_rating'}"; } else { $DATA{'SORT_QUARANTINE'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'quarantine_rating'}"; } $DATA{'SORT_QUARANTINE'} .= "\n\t"; if ($sortBy eq "Date") { $DATA{'SORT_QUARANTINE'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'quarantine_date'}"; } else { $DATA{'SORT_QUARANTINE'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'quarantine_date'}"; } $DATA{'SORT_QUARANTINE'} .= "\n\t"; if ($sortBy eq "From") { $DATA{'SORT_QUARANTINE'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'quarantine_from'}"; } else { $DATA{'SORT_QUARANTINE'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'quarantine_from'}"; } $DATA{'SORT_QUARANTINE'} .= "\n\t"; if ($sortBy eq "Subject") { $DATA{'SORT_QUARANTINE'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'quarantine_subject'}"; } else { $DATA{'SORT_QUARANTINE'} .= "$CONFIG{'LANG'}->{$LANGUAGE}->{'quarantine_subject'}"; } $DATA{'SORT_QUARANTINE'} .= ""; my($row, $rowclass, $counter); $rowclass = "rowEven"; $counter = 0; for $row (@headings) { $counter++; my($rating, $url, $markclass, $outclass); $rating = sprintf("%3.0f%%", $row->{'rating'} * 100.0); if ($row->{'rating'} > 0.8) { $markclass = "high"; } else { if ($row->{'rating'} < 0.7) { $markclass = "low"; } else { $markclass = "medium"; } } my(%PAIRS); $PAIRS{'signatureID'} = $row->{'X-DSPAM-Signature'}; $PAIRS{'command'} = "viewMessage"; $PAIRS{'user'} = $CURRENT_USER; $PAIRS{'template'} = "quarantine"; $url = &SafeVars(%PAIRS); if ($row->{'alert'}) { $outclass = "rowAlert"; } else { $outclass = $rowclass; } my(@ptfields) = split(/\s+/, $row->{'X-DSPAM-Processed'}); my(@times) = split(/\:/, $ptfields[3]); my($ptime); if($CONFIG{"DATE_FORMAT"}) { my($month); $month->{'Jan'}=0; $month->{'Feb'}=1; $month->{'Mar'}=2; $month->{'Apr'}=3; $month->{'May'}=4; $month->{'Jun'}=5; $month->{'Jul'}=6; $month->{'Aug'}=7; $month->{'Sep'}=8; $month->{'Oct'}=9; $month->{'Nov'}=10; $month->{'Dec'}=11; $ptime = strftime($CONFIG{"DATE_FORMAT"}, $times[2],$times[1],$times[0],$ptfields[2],$month->{$ptfields[1]},$ptfields[4]-1900); } else { my($mer) = "a"; if ($times[0] > 12) { $times[0] -= 12; $mer = "p"; } if ($times[0] == 0) { $times[0] = "12"; } $ptime = "$ptfields[1] $ptfields[2] $times[0]:$times[1]$mer"; } $DATA{'QUARANTINE'} .= <<_END; $rating $ptime $row->{'From'} $row->{'Subject'} _END if ($rowclass eq "rowEven") { $rowclass = "rowOdd"; } else { $rowclass = "rowEven"; } } &output(%DATA); } # # Performance Functions # sub ResetStats { my($ts, $ti, $tm, $fp, $sc, $ic); my($group); open(FILE, "<$USER.stats"); chomp($ts = ); chomp($group = ); close(FILE); ($ts, $ti, $tm, $fp, $sc, $ic) = split(/\,/, $ts); if ($group ne "") { my($GROUP) = GetPath($group) . ".stats"; my($gts, $gti, $gtm, $gfp, $gsc, $gic); open(FILE, "<$GROUP"); chomp($gts = ); close(FILE); ($gts, $gti, $gtm, $gfp, $gsc, $gic) = split(/\,/, $gts); $ts -= $gts; $ti -= $gti; $tm -= $gtm; $fp -= $gfp; $sc -= $gsc; $ic -= $gic; } open(FILE, ">$USER.rstats"); print FILE "$ts" . "," . "$ti" . "," . "$tm" . "," . "$fp" . "," . "$sc" . "," . "$ic\n"; close(FILE); } sub Tweak { my($ts, $ti, $tm, $fp, $sc, $ic); open(FILE, "<$USER.rstats"); chomp($ts = ); close(FILE); ($ts, $ti, $tm, $fp, $sc, $ic) = split(/\,/, $ts); $tm++; open(FILE, ">$USER.rstats"); print FILE "$ts,$ti,$tm,$fp,$sc,$ic\n"; close(FILE); } sub DisplayIndex { my($spam, $innocent, $ratio, $fp, $misses); my($rts, $rti, $rtm, $rfp, $sc, $ic, $overall, $fpratio, $monthly, $real_missed, $real_caught, $real_fp, $real_innocent); my($time) = ctime(time); my($group); open(FILE, "<$USER.stats"); chomp($spam = ); chomp($group = ); close(FILE); ($spam, $innocent, $misses, $fp, $sc, $ic) = split(/\,/, $spam); if ($group ne "") { my($GROUP) = GetPath($group) . ".stats"; my($gspam, $ginnocent, $gmisses, $gfp, $gsc, $gic); open(FILE, "<$GROUP"); chomp($gspam = ); close(FILE); ($gspam, $ginnocent, $gmisses, $gfp, $gsc, $gic) = split(/\,/, $gspam); $spam -= $gspam; $innocent -= $ginnocent; $misses -= $gmisses; $fp -= $gfp; $sc -= $gsc; $ic -= $gic; } if ($spam+$innocent>0) { $ratio = sprintf("%2.3f", (($spam+$misses)/($spam+$misses+$fp+$innocent)*100)); } else { $ratio = 0; } if (open(FILE, "<$USER.rstats")) { my($rstats); chomp($rstats = ); ($rts, $rti, $rtm, $rfp) = split(/\,/, $rstats); close(FILE); $real_missed = $misses-$rtm; $real_caught = $spam-$rts; $real_fp = $fp-$rfp; if ($real_fp < 0) { $real_fp = 0; } $real_innocent = $innocent-$rti; if (($spam-$rts > 0) && ($spam-$rts + $misses-$rtm != 0) && ($real_caught+$real_missed>0) && ($real_fp+$real_innocent>0)) { $monthly = sprintf("%2.3f", (100.0-(($real_missed)/($real_caught+$real_missed))*100.0)); $overall = sprintf("%2.3f", (100.0-(($real_missed+$real_fp) / ($real_fp+$real_innocent+$real_caught+$real_missed))*100.0)); } else { if ($real_caught == 0 && $real_missed > 0) { $monthly = 0; $overall = 0; } else { $monthly = 100; $overall = 100; } } if ($real_fp+$real_innocent>0) { $fpratio = sprintf("%2.3f", ($real_fp/($real_fp+$real_innocent)*100)); } else { $fpratio = 0; } } else { $rts = $spam+$misses; $rti = $innocent; $rtm = $misses; $rfp = $fp; open(FILE, ">$USER.rstats"); print FILE "$rts,$rti,$rtm,$rfp\n"; close(FILE); $monthly = "N/A"; $fpratio = "N/A"; $overall = "N/A"; } $DATA{'TIME'} = $time; $DATA{'TOTAL_SPAM_SCANNED'} = $spam; $DATA{'TOTAL_SPAM_LEARNED'} = $misses; $DATA{'TOTAL_NONSPAM_SCANNED'} = $innocent; $DATA{'TOTAL_NONSPAM_LEARNED'} = $fp; $DATA{'SPAM_RATIO'} = $ratio; $DATA{'SPAM_ACCURACY'} = $monthly; $DATA{'NONSPAM_ERROR_RATE'} = $fpratio; $DATA{'OVERALL_ACCURACY'} = $overall; $DATA{'TOTAL_SPAM_CORPUSFED'} = $sc; $DATA{'TOTAL_NONSPAM_CORPUSFED'} = $ic; $DATA{'TOTAL_SPAM_MISSED'} = $real_missed; $DATA{'TOTAL_SPAM_CAUGHT'} = $real_caught; $DATA{'TOTAL_NONSPAM_MISSED'} = $real_fp; $DATA{'TOTAL_NONSPAM_CAUGHT'} = $real_innocent; if ($CURRENT_USER !~ /\@/) { $DATA{'LOCAL_DOMAIN'} = "\@$CONFIG{'LOCAL_DOMAIN'}"; } &output(%DATA); } # # Alert Functions # sub AddAlert { if ($FORM{'ALERT'} eq "") { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_no_alert_specified'}"); } open(FILE, ">>$USER.alerts"); print FILE "$FORM{'ALERT'}\n"; close(FILE); return; } sub DeleteAlert { my($line, @alerts); $line = 0; if ($FORM{'line'} eq "") { &Error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_no_alert_specified'}"); } open(FILE, "<$USER.alerts"); while() { if ($line != $FORM{'line'}) { push(@alerts, $_); } $line++; } close(FILE); open(FILE, ">$USER.alerts"); foreach(@alerts) { print FILE $_; } close(FILE); return; } sub DisplayAlerts { my($supp); $DATA{'ALERTS'} = <<_end; _end my($rowclass); $rowclass = "rowEven"; do { my($line) = 0; open(FILE, "<$USER.alerts"); while() { s//>/g; $DATA{'ALERTS'} .= qq!\n!; $line++; if ($rowclass eq "rowEven") { $rowclass = "rowOdd"; } else { $rowclass = "rowEven"; } } }; $DATA{'ALERTS'} .= <<_end;
$CONFIG{'LANG'}->{$LANGUAGE}->{'alert_name'}  
$_[$CONFIG{'LANG'}->{$LANGUAGE}->{'remove_alert'}]
_end &output(%DATA); exit; } # # Global Functions # sub is_utf8 { my $s = "\x80" . $_[0]; my $internal = unpack "p", pack "p", $s; return $s ne $internal; } sub htmlize { # # Replace some characters # to be HTML characters # my($text) = @_; my $has_encode = eval{require Encode;}; my $has_html_entities = eval{require HTML::Entities;}; if ($text =~ /^(.*?)=\?([^?]+)\?([qb])\?([^?]*)\?=(.*)$/is) { if ($has_encode) { $text = Encode::decode($2, Encode::decode('MIME-Header', $text)); } } elsif ($text =~ /([\xC2-\xDF][\x80-\xBF] | \xE0[\xA0-\xBF][\x80-\xBF] |[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} | \xED[\x80-\x9F][\x80-\xBF] | \xF0[\x90-\xBF][\x80-\xBF]{2} |[\xF1-\xF3][\x80-\xBF]{3} | \xF4[\x80-\x8F][\x80-\xBF]{2})/x) { if ($has_encode) { $text = Encode::decode("utf8", $text); } } if ($has_html_entities) { $text = HTML::Entities::encode_entities(HTML::Entities::decode_entities($text)); } if ($text =~ /[\xC2-\xDF][\x80-\xBF]/) { if ((-e "htmlize.pl") && (-r "htmlize.pl")) { require "htmlize.pl"; $text = htmlize_chars($text); } } return $text; } sub redirect { my($loc) = @_; $loc =~ s/&\;/&/g; print "Expires: now\n"; print "Pragma: no-cache\n"; print "Cache-control: no-cache\n"; print "Location: $loc\n\n"; exit(0); } sub htmlheader { print "Expires: now\n"; print "Pragma: no-cache\n"; print "Cache-control: no-cache\n"; print "Content-type: text/html\n\n"; } sub output { if ($FORM{'template'} eq "" || $FORM{'template'} !~ /^([A-Z0-9]*)$/i) { $FORM{'template'} = "performance"; } &htmlheader; my(%DATA) = @_; $DATA{'WEB_ROOT'} = $CONFIG{'WEB_ROOT'}; $DATA{'LANG'} = $LANGUAGE; # Check admin permissions do { if ($CONFIG{'ADMIN'} == 1) { $DATA{'NAV_ADMIN'} = qq!
  • $CONFIG{'LANG'}->{$LANGUAGE}->{'admin_suite'}
  • !; $DATA{'FORM_USER'} = qq!
    $CONFIG{'LANG'}->{$LANGUAGE}->{'user_form'} $USERSELECT    $CONFIG{'LANG'}->{$LANGUAGE}->{'lang_select'}$CONFIG{'LANGUAGES'}  
    !; } elsif ($CONFIG{'SUBADMIN'} == 1) { $DATA{'FORM_USER'} = qq!
    $CONFIG{'LANG'}->{$LANGUAGE}->{'user_form'} $USERSELECT    $CONFIG{'LANG'}->{$LANGUAGE}->{'lang_select'}$CONFIG{'LANGUAGES'}  
    !; } else { $DATA{'NAV_ADMIN'} = ''; $DATA{'FORM_USER'} = qq!
    $CONFIG{'LANG'}->{$LANGUAGE}->{'user_form'} $CURRENT_USER    $CONFIG{'LANG'}->{$LANGUAGE}->{'lang_select'}$CONFIG{'LANGUAGES'}  
    !; } }; open(FILE, "<$CONFIG{'TEMPLATES'}/nav_$FORM{'template'}.html"); while() { s/\$CGI\$/$CONFIG{'ME'}/g; if($FORM{'user'}) { if($CONFIG{'ADMIN'} == 1) { s/\$USER\$/user=$FORM{'user'}&/g; } elsif ($CONFIG{'SUBADMIN'} == 1) { my $form_user_domain = (split(/@/, $FORM{'user'}))[1]; if($CONFIG{'SUBADMIN_USERS'}->{ $FORM{'user'} } == 1 || ($form_user_domain ne "" && $CONFIG{'SUBADMIN_USERS'}->{ "*@" . $form_user_domain } == 1)) { s/\$USER\$/user=$FORM{'user'}&/g; } else { s/\$USER\$//g; } } else { s/\$USER\$//g; } } else { s/\$USER\$//g; } s/\$([A-Z0-9_]*)\$/$DATA{$1}/g; print; } close(FILE); exit(0); } sub SafeVars { my(%PAIRS) = @_; my($url, $key); foreach $key (keys(%PAIRS)) { my($value) = $PAIRS{$key}; $value =~ s/([^A-Z0-9])/sprintf("%%%x", ord($1))/gie; $url .= "$key=$value&"; } $url =~ s/\&$//; return $url; } sub error { my($error) = @_; $FORM{'template'} = "error"; $DATA{'MESSAGE'} = <<_end; $CONFIG{'LANG'}->{$LANGUAGE}->{'error_message_part1'}
    $error

    $CONFIG{'LANG'}->{$LANGUAGE}->{'error_message_part2'} _end &output(%DATA); exit; } sub ReadParse { my(@pairs, %FORM); if ($ENV{'REQUEST_METHOD'} =~ /GET/i) { @pairs = split(/&/, $ENV{'QUERY_STRING'}); } else { my($buffer); read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/\&/, $buffer); } foreach(@pairs) { my($name, $value) = split(/\=/, $_); $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s///g; if ($name =~ /^msgid[\d]+$/) { push(@{ $FORM{retrain_checked} }, $value); } else { $FORM{$name} = $value; } } return %FORM; } sub CheckQuarantine { my($f)=0; open(FILE, "<$MAILBOX"); while() { next unless (/^From /); $f++; } close(FILE); if ($f == 0) { $f = "$CONFIG{'LANG'}->{$LANGUAGE}->{'empty'}"; } $DATA{'TOTAL_QUARANTINED_MESSAGES'} = $f; } sub To12Hour { my($h) = @_; if ($h < 0) { $h += 24; } if ($h>11) { $h -= 12 if ($h>12) ; $h .= "p"; } else { $h = "12" if ($h == 0); $h .= "a"; } return $h; } sub GetPath { my($USER) = @_; my($PATH); # Domain-scale if ($CONFIG{'DOMAIN_SCALE'} == 1) { my($VPOPUSERNAME, $VPOPDOMAIN); $VPOPUSERNAME = (split(/@/, $USER))[0]; $VPOPDOMAIN = (split(/@/, $USER))[1]; $VPOPDOMAIN = "local" if ($VPOPDOMAIN eq ""); ($VPOPUSERNAME = $VPOPDOMAIN, $VPOPDOMAIN = "local") if ($VPOPUSERNAME eq "" && $VPOPDOMAIN ne ""); $PATH = "$CONFIG{'DSPAM_HOME'}/data/$VPOPDOMAIN/$VPOPUSERNAME/" . "$VPOPUSERNAME"; return $PATH; # Normal scale } elsif ($CONFIG{'LARGE_SCALE'} == 0) { $PATH = "$CONFIG{'DSPAM_HOME'}/data/$USER/$USER"; return $PATH; # Large-scale } else { if (length($USER)>1) { $PATH = "$CONFIG{'DSPAM_HOME'}/data/" . substr($USER, 0, 1) . "/". substr($USER, 1, 1) . "/$USER/$USER"; } else { $PATH = "$CONFIG{'DSPAM_HOME'}/data/$USER/$USER/$USER"; } return $PATH; } &error("Unable to determine filesystem scale"); } sub GetPrefs { my(%PREFS); my($FILE) = "$USER.prefs"; if ($CONFIG{'PREFERENCES_EXTENSION'} == 1) { my $PREF_USER = $CURRENT_USER; $PREF_USER = "default" if($CURRENT_USER eq ""); open(PIPE, "$CONFIG{'DSPAM_BIN'}/dspam_admin agg pref " . quotemeta($PREF_USER) . "|"); while() { chomp; my($directive, $value) = split(/\=/); $PREFS{$directive} = $value; } close(PIPE); } if (keys(%PREFS) eq "0" || $CONFIG{'PREFERENCES_EXTENSION'} != 1) { if (! -e "./default.prefs") { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_load_default_prefs'}"); } open(FILE, "<./default.prefs"); while() { chomp; my($directive, $value) = split(/\=/); $PREFS{$directive} = $value; } close(FILE); if( -e $FILE) { open(FILE, "<$FILE"); while() { chomp; my($directive, $value) = split(/\=/); $PREFS{$directive} = $value; } close(FILE); } } return %PREFS } dspam-3.10.2+dfsg/webui/cgi-bin/default.prefs0000644000175000017500000000256211622570546020303 0ustar julienjulien# $Id: default.prefs,v 1.2 2011/04/19 07:17:03 sbajic Exp $ # default.prefs v3.2 # Default preferences for DSPAM # This file serves two purposes. First, it sets the default preferences each # user will see when using the preferences section of the DSPAM Control # Center. Second, it may be symbolically linked (or copied) into DSPAM_HOME to # set the system-wide default preferences, overriding any commandline or # dspam.conf parameters. If symlinked, an administrator can edit these options # in the DSPAM Administrative Suite. # Training Mode: TEFT, TOE, TUM, NOTRAIN trainingMode=TEFT # Spam Action: quarantine, tag, deliver spamAction=quarantine # Spam Subject: the text to be prepended onto the subject line of tagged spams spamSubject=[SPAM] # Bayesian Noise Reduction: on/off enableBNR=on # Automatic Whitelisting: on/off enableWhitelist=on # Statistical Sedation: 0-10 statisticalSedation=5 # Signature Location: message, headers, attachment signatureLocation=message # Whitelist Threshold: the minimum number of innocent hits from a recipient to # be automatically whitelisted. Do not set this value too low! whitelistThreshold=10 # showFactors: when set to on, the determining factors for each message will # be added to a X-DSPAM-Factors message header. showFactors=off # optIn/optOut: Depending on the opt mode set, you can also use one of these. #optIn=on #optOut=off dspam-3.10.2+dfsg/webui/cgi-bin/admins0000644000175000017500000000000511622570546017002 0ustar julienjulienroot dspam-3.10.2+dfsg/webui/cgi-bin/rgb.txt0000644000175000017500000004142011622570546017125 0ustar julienjulien199 21 133 medium violet red 176 196 222 light steel blue 102 139 139 paleturquoise4 159 121 238 mediumpurple2 141 182 205 lightskyblue3 0 238 118 springgreen2 255 160 122 light salmon 154 205 50 yellowgreen 178 58 238 darkorchid2 69 139 116 aquamarine4 71 60 139 slateblue4 131 111 255 slateblue1 192 255 62 olivedrab1 139 105 20 goldenrod4 205 155 29 goldenrod3 142 229 238 cadetblue2 255 211 155 burlywood1 112 128 144 slategrey 255 228 225 mistyrose 50 205 50 limegreen 224 255 255 lightcyan 218 165 32 goldenrod 220 220 220 gainsboro 135 206 255 skyblue1 240 255 240 honeydew 238 238 0 yellow2 205 79 57 tomato3 135 206 235 skyblue 85 26 139 purple4 205 133 0 orange3 205 183 158 bisque3 238 213 183 bisque2 87 87 87 grey34 252 252 252 gray99 161 161 161 gray63 112 112 112 gray44 94 94 94 gray37 84 84 84 gray33 66 66 66 gray26 240 255 255 azure1 139 137 137 snow4 205 133 63 peru 219 112 147 pale violet red 139 129 76 lightgoldenrod4 60 179 113 mediumseagreen 255 240 245 lavender blush 209 95 238 mediumorchid2 176 226 255 lightskyblue1 72 61 139 darkslateblue 25 25 112 midnightblue 255 160 122 lightsalmon1 255 250 205 lemonchiffon 173 255 47 green yellow 255 160 122 lightsalmon 240 128 128 light coral 24 116 205 dodgerblue3 139 69 0 darkorange4 106 90 205 slate blue 39 64 139 royalblue4 255 69 0 orange red 50 205 50 lime green 224 255 255 light cyan 148 0 211 darkviolet 233 150 122 darksalmon 255 140 0 darkorange 95 158 160 cadet blue 255 20 147 deep pink 238 0 238 magenta2 139 71 38 sienna4 238 230 133 khaki2 191 191 191 grey75 189 189 189 grey74 186 186 186 grey73 176 176 176 grey69 173 173 173 grey68 89 89 89 grey35 33 33 33 grey13 229 229 229 gray90 207 207 207 gray81 140 140 140 gray55 130 130 130 gray51 79 79 79 gray31 238 233 233 snow2 205 145 158 pink3 18 18 18 grey7 3 3 3 gray1 139 0 0 red4 205 0 0 red3 210 180 140 tan 255 0 0 red 199 21 133 mediumvioletred 119 136 153 lightslategrey 135 206 250 lightskyblue 139 87 66 lightsalmon4 34 139 34 forestgreen 16 78 139 dodgerblue4 153 50 204 dark orchid 188 143 143 rosy brown 205 175 149 peachpuff3 124 205 124 palegreen3 238 64 0 orangered2 122 139 139 lightcyan4 139 58 58 indianred4 205 85 85 indianred3 0 0 128 navyblue 105 105 105 dim grey 255 20 147 deeppink 139 76 57 salmon4 205 112 84 salmon3 196 196 196 grey77 145 145 145 gray57 28 28 28 gray11 205 150 205 plum3 23 23 23 gray9 20 20 20 gray8 0 0 139 blue4 245 245 220 beige 250 250 210 light goldenrod yellow 139 131 134 lavenderblush4 0 206 209 dark turquoise 0 206 209 darkturquoise 47 79 79 darkslategrey 205 129 98 lightsalmon3 139 105 105 rosybrown4 255 228 225 misty rose 78 238 148 seagreen2 205 92 92 indianred 255 20 147 deeppink1 0 0 139 dark blue 230 230 250 lavender 253 245 230 oldlace 199 199 199 grey78 138 138 138 grey54 115 115 115 grey45 54 54 54 grey21 247 247 247 gray97 245 245 245 gray96 242 242 242 gray95 224 224 224 gray88 222 222 222 gray87 219 219 219 gray86 179 179 179 gray70 97 97 97 gray38 31 31 31 gray12 250 240 230 linen 72 209 204 medium turquoise 72 61 139 dark slate blue 139 137 112 lemonchiffon4 193 255 193 darkseagreen1 205 192 176 antiquewhite3 186 85 211 mediumorchid 0 255 127 springgreen 0 134 139 turquoise4 79 148 205 steelblue3 238 213 210 mistyrose2 209 238 238 lightcyan2 205 92 92 indian red 238 44 44 firebrick2 65 105 225 royalblue 95 158 160 cadetblue 108 166 205 skyblue3 205 205 0 yellow3 255 140 105 salmon1 139 90 0 orange4 255 105 180 hotpink 229 229 229 grey90 143 143 143 gray56 99 99 99 gray39 46 46 46 gray18 36 36 36 gray14 139 102 139 plum4 15 15 15 grey6 15 15 15 gray6 205 173 0 gold3 255 215 0 gold1 0 0 238 blue2 238 154 73 tan2 0 255 255 cyan 0 250 154 mediumspringgreen 188 238 104 darkolivegreen2 238 232 170 pale goldenrod 176 196 222 lightsteelblue 244 164 96 sandy brown 255 239 213 papaya whip 102 205 0 chartreuse3 139 34 82 violetred4 67 110 238 royalblue2 72 118 255 royalblue1 255 239 213 papayawhip 205 183 181 mistyrose3 224 255 255 lightcyan1 127 255 212 aquamarine 74 112 139 skyblue4 139 58 98 hotpink4 205 96 144 hotpink3 238 106 167 hotpink2 169 169 169 darkgrey 105 105 105 dimgray 255 99 71 tomato 168 168 168 grey66 166 166 166 grey65 163 163 163 grey64 84 84 84 grey33 69 69 69 grey27 194 194 194 gray76 176 176 176 gray69 173 173 173 gray68 0 0 0 grey0 240 255 255 azure 0 250 154 medium spring green 139 101 8 darkgoldenrod4 205 149 12 darkgoldenrod3 238 173 14 darkgoldenrod2 184 134 11 darkgoldenrod 139 69 19 saddle brown 238 149 114 lightsalmon2 0 104 139 deepskyblue4 0 154 205 deepskyblue3 0 178 238 deepskyblue2 0 191 255 deepskyblue 255 127 0 darkorange1 205 50 120 violetred3 238 58 140 violetred2 255 62 150 violetred1 105 89 205 slateblue3 122 103 238 slateblue2 107 142 35 olive drab 255 106 106 indianred1 255 48 48 firebrick1 83 134 139 cadetblue4 208 32 144 violetred 188 143 143 rosybrown 0 0 128 navy blue 178 34 34 firebrick 139 0 0 dark red 255 255 255 grey100 139 126 102 wheat4 201 201 201 grey79 194 194 194 grey76 156 156 156 grey61 237 237 237 gray93 214 214 214 gray84 166 166 166 gray65 92 92 92 gray36 82 82 82 gray32 33 33 33 gray13 26 26 26 gray10 193 205 205 azure3 255 250 250 snow1 255 165 79 tan1 119 136 153 light slate gray 202 255 112 darkolivegreen1 100 149 237 cornflower blue 255 235 205 blanched almond 205 193 197 lavenderblush3 238 224 229 lavenderblush2 255 240 245 lavenderblush1 85 107 47 darkolivegreen 255 240 245 lavenderblush 118 238 198 aquamarine2 208 32 144 violet red 179 238 58 olivedrab2 139 125 123 mistyrose4 255 228 225 mistyrose1 180 205 205 lightcyan3 240 128 128 lightcoral 127 255 0 chartreuse 255 218 185 peachpuff 152 251 152 palegreen 245 255 250 mintcream 126 192 238 skyblue2 255 228 181 moccasin 255 99 71 tomato1 205 105 201 orchid3 205 41 144 maroon3 250 128 114 salmon 207 207 207 grey81 158 158 158 grey62 99 99 99 grey39 97 97 97 grey38 94 94 94 grey37 235 235 235 gray92 212 212 212 gray83 168 168 168 gray66 138 138 138 gray54 127 127 127 gray50 77 77 77 gray30 48 48 48 gray19 38 38 38 gray15 131 139 139 azure4 8 8 8 grey3 205 133 63 tan3 255 192 203 pink 190 190 190 gray 0 0 255 blue 188 210 238 lightsteelblue2 202 225 255 lightsteelblue1 32 178 170 light sea green 119 136 153 lightslategray 238 233 191 lemonchiffon2 0 255 127 springgreen1 173 255 47 greenyellow 118 238 0 chartreuse2 112 128 144 slate grey 58 95 205 royalblue3 176 224 230 powderblue 238 203 173 peachpuff2 144 238 144 palegreen2 245 255 250 mint cream 106 90 205 slateblue 238 229 222 seashell2 238 18 137 deeppink2 189 183 107 darkkhaki 139 28 98 maroon4 160 82 45 sienna 181 181 181 grey71 171 171 171 grey67 46 46 46 grey18 150 150 150 gray59 110 110 110 gray43 64 64 64 gray25 255 228 196 bisque 255 0 0 red1 123 104 238 mediumslateblue 255 236 139 lightgoldenrod1 238 221 130 light goldenrod 150 205 205 paleturquoise3 96 123 139 lightskyblue4 0 255 127 spring green 255 255 224 light yellow 245 245 245 white smoke 0 0 205 medium blue 248 248 255 ghost white 54 100 139 steelblue4 205 155 155 rosybrown3 255 218 185 peachpuff1 154 255 154 palegreen1 138 43 226 blueviolet 139 134 130 seashell4 169 169 169 darkgray 205 104 57 sienna3 102 102 102 grey40 232 232 232 gray91 209 209 209 gray82 13 13 13 gray5 0 238 238 cyan2 0 255 255 cyan1 0 0 255 blue1 255 250 250 snow 238 220 130 lightgoldenrod2 132 112 255 lightslateblue 180 82 205 mediumorchid3 105 139 105 darkseagreen4 0 205 102 springgreen3 34 139 34 forest green 108 123 139 slategray4 159 182 205 slategray3 185 211 238 slategray2 65 105 225 royal blue 139 119 101 peachpuff4 84 139 84 palegreen4 152 251 152 pale green 205 55 0 orangered3 255 193 37 goldenrod1 248 248 255 ghostwhite 139 26 26 firebrick4 205 38 38 firebrick3 122 197 205 cadetblue3 112 128 144 slategray 205 197 191 seashell3 193 205 193 honeydew3 139 136 120 cornsilk4 238 232 205 cornsilk2 155 48 255 purple1 105 105 105 dimgrey 139 0 0 darkred 210 0 0 mediumred 255 246 143 khaki1 205 205 193 ivory3 179 179 179 grey70 153 153 153 grey60 82 82 82 grey32 56 56 56 grey22 31 31 31 grey12 250 250 250 gray98 227 227 227 gray89 181 181 181 gray71 163 163 163 gray64 153 153 153 gray60 125 125 125 gray49 224 238 238 azure2 8 8 8 gray3 187 255 255 paleturquoise1 171 130 255 mediumpurple1 147 112 219 medium purple 255 250 205 lemonchiffon1 0 191 255 deep sky blue 205 179 139 navajowhite3 191 62 255 darkorchid1 255 140 0 dark orange 238 180 34 goldenrod2 189 183 107 dark khaki 238 118 33 chocolate2 238 197 145 burlywood2 240 255 240 honeydew1 0 100 0 darkgreen 0 230 0 mediumgreen 205 181 205 thistle3 238 210 238 thistle2 255 225 255 thistle1 0 0 139 darkblue 216 191 216 thistle 238 48 167 maroon2 255 52 179 maroon1 135 135 135 grey53 112 112 112 grey44 64 64 64 grey25 189 189 189 gray74 115 115 115 gray45 105 105 105 gray41 89 89 89 gray35 69 69 69 gray27 59 59 59 gray23 41 41 41 gray16 139 35 35 brown4 245 222 179 wheat 255 127 80 coral 139 90 43 tan4 250 250 210 lightgoldenrodyellow 132 112 255 light slate blue 85 107 47 dark olive green 47 79 79 dark slate gray 205 104 137 palevioletred3 93 71 139 mediumpurple4 137 104 205 mediumpurple3 139 69 19 saddlebrown 176 224 230 powder blue 104 34 139 darkorchid4 154 50 205 darkorchid3 255 218 185 peach puff 105 139 34 olivedrab4 104 131 139 lightblue4 255 182 193 lightpink 211 211 211 lightgray 224 238 224 honeydew2 255 248 220 cornsilk1 253 245 230 old lace 255 130 71 sienna1 139 125 107 bisque4 218 112 214 orchid 205 198 115 khaki3 214 214 214 grey84 212 212 212 grey83 209 209 209 grey82 184 184 184 grey72 133 133 133 grey52 110 110 110 grey43 66 66 66 grey26 36 36 36 grey14 26 26 26 grey10 191 191 191 gray75 135 135 135 gray53 54 54 54 gray21 51 51 51 gray20 205 51 51 brown3 20 20 20 grey8 238 0 0 red2 0 0 128 navy 190 190 190 grey 255 215 0 gold 102 205 170 mediumaquamarine 238 221 130 lightgoldenrod 82 139 139 darkslategray4 155 205 155 darkseagreen3 180 238 180 darkseagreen2 139 131 120 antiquewhite4 250 235 215 antique white 0 139 69 springgreen4 139 139 122 lightyellow4 255 250 240 floral white 127 255 212 aquamarine1 0 197 205 turquoise3 92 172 238 steelblue2 238 180 180 rosybrown2 255 182 193 light pink 211 211 211 light gray 238 99 99 indianred2 30 144 255 dodgerblue 0 100 0 dark green 84 255 159 seagreen1 139 10 80 deeppink4 240 248 255 aliceblue 255 0 255 magenta1 255 105 180 hot pink 238 121 66 sienna2 255 131 250 orchid1 255 255 255 gray100 247 247 247 grey97 240 240 240 grey94 222 222 222 grey87 219 219 219 grey86 130 130 130 grey51 107 107 107 grey42 48 48 48 grey19 240 240 240 gray94 217 217 217 gray85 156 156 156 gray61 238 59 59 brown2 240 230 140 khaki 3 3 3 grey1 139 117 0 gold4 123 104 238 medium slate blue 60 179 113 medium sea green 47 79 79 dark slate grey 175 238 238 pale turquoise 175 238 238 paleturquoise 122 55 139 mediumorchid4 238 223 204 antiquewhite2 238 238 209 lightyellow2 144 238 144 light green 148 0 211 dark violet 233 150 122 dark salmon 127 255 0 chartreuse1 0 245 255 turquoise1 244 164 96 sandybrown 255 69 0 orangered1 255 174 185 lightpink1 178 223 238 lightblue2 191 239 255 lightblue1 211 211 211 light grey 46 139 87 seagreen4 67 205 128 seagreen3 173 216 230 lightblue 205 16 118 deeppink3 169 169 169 dark grey 0 139 139 dark cyan 222 184 135 burlywood 255 245 238 seashell 255 110 180 hotpink1 105 105 105 dim gray 0 139 139 darkcyan 139 139 0 yellow4 255 255 0 yellow 160 32 240 purple 255 165 0 orange 139 139 131 ivory4 252 252 252 grey99 227 227 227 grey89 161 161 161 grey63 148 148 148 grey58 125 125 125 grey49 79 79 79 grey31 61 61 61 grey24 51 51 51 grey20 0 139 0 green4 0 255 0 green1 186 186 186 gray73 171 171 171 gray67 205 91 69 coral3 238 106 80 coral2 238 174 238 plum2 139 99 108 pink4 255 255 240 ivory 10 10 10 gray4 5 5 5 gray2 238 201 0 gold2 102 205 170 medium aquamarine 119 136 153 light slate grey 205 190 112 lightgoldenrod3 162 205 90 darkolivegreen3 255 185 15 darkgoldenrod1 184 134 11 dark goldenrod 186 85 211 medium orchid 255 250 205 lemon chiffon 139 121 94 navajowhite4 0 191 255 deepskyblue1 255 255 224 lightyellow 255 250 240 floralwhite 30 144 255 dodger blue 0 0 205 mediumblue 144 238 144 lightgreen 139 69 19 chocolate4 205 102 29 chocolate3 139 115 85 burlywood4 64 224 208 turquoise 70 130 180 steelblue 46 139 87 sea green 124 252 0 lawngreen 131 139 131 honeydew4 169 169 169 dark gray 46 139 87 seagreen 139 71 137 orchid4 255 231 186 wheat1 238 130 238 violet 255 255 240 ivory1 224 224 224 grey88 217 217 217 grey85 145 145 145 grey57 143 143 143 grey56 140 140 140 grey55 122 122 122 grey48 120 120 120 grey47 117 117 117 grey46 77 77 77 grey30 43 43 43 grey17 120 120 120 gray47 74 74 74 gray29 238 169 184 pink2 13 13 13 grey5 10 10 10 grey4 0 255 0 green 0 0 0 gray0 165 42 42 brown 110 123 139 lightsteelblue4 110 139 61 darkolivegreen4 139 71 93 palevioletred4 135 206 250 light sky blue 121 205 205 darkslategray3 141 238 238 darkslategray2 151 255 255 darkslategray1 255 235 205 blanchedalmond 238 232 170 palegoldenrod 25 25 112 midnight blue 32 178 170 lightseagreen 205 201 165 lemonchiffon3 47 79 79 darkslategray 154 205 50 yellow green 143 188 143 darkseagreen 250 235 215 antiquewhite 238 118 0 darkorange2 69 139 0 chartreuse4 70 130 180 steel blue 255 193 193 rosybrown1 154 205 50 olivedrab3 238 162 173 lightpink2 255 69 0 orangered 139 123 139 thistle4 135 206 235 sky blue 255 248 220 cornsilk 238 130 98 salmon2 238 122 233 orchid2 238 238 224 ivory2 237 237 237 grey93 235 235 235 grey92 232 232 232 grey91 92 92 92 grey36 74 74 74 grey29 71 71 71 grey28 41 41 41 grey16 201 201 201 gray79 199 199 199 gray78 196 196 196 gray77 122 122 122 gray48 43 43 43 gray17 139 62 47 coral4 255 114 86 coral1 255 187 255 plum1 255 181 197 pink1 23 23 23 grey9 5 5 5 grey2 18 18 18 gray7 0 139 139 cyan4 0 0 205 blue3 221 160 221 plum 100 149 237 cornflowerblue 164 211 238 lightskyblue2 255 239 219 antiquewhite1 238 207 161 navajowhite2 255 222 173 navajowhite1 205 205 180 lightyellow3 139 0 139 dark magenta 255 222 173 navajowhite 205 102 0 darkorange3 245 245 245 whitesmoke 0 229 238 turquoise2 99 184 255 steelblue1 139 95 101 lightpink4 154 192 205 lightblue3 124 252 0 lawn green 255 127 36 chocolate1 240 248 255 alice blue 107 142 35 olivedrab 211 211 211 lightgrey 210 105 30 chocolate 139 0 139 magenta4 205 0 205 magenta3 255 255 0 yellow1 125 38 205 purple3 145 44 238 purple2 238 154 0 orange2 255 165 0 orange1 255 0 255 magenta 255 228 196 bisque1 238 216 174 wheat2 176 48 96 maroon 139 134 78 khaki4 245 245 245 grey96 242 242 242 grey95 204 204 204 grey80 127 127 127 grey50 105 105 105 grey41 38 38 38 grey15 28 28 28 grey11 204 204 204 gray80 148 148 148 gray58 102 102 102 gray40 87 87 87 gray34 56 56 56 gray22 255 64 64 brown1 205 201 201 snow3 72 209 204 mediumturquoise 162 181 205 lightsteelblue3 238 121 159 palevioletred2 255 130 171 palevioletred1 174 238 238 paleturquoise2 143 188 143 dark sea green 219 112 147 palevioletred 224 102 255 mediumorchid1 255 222 173 navajo white 147 112 219 mediumpurple 255 255 224 lightyellow1 28 134 238 dodgerblue2 30 144 255 dodgerblue1 139 0 139 darkmagenta 138 43 226 blue violet 102 205 170 aquamarine3 198 226 255 slategray1 112 128 144 slate gray 139 37 0 orangered4 205 140 149 lightpink3 173 216 230 light blue 153 50 204 darkorchid 152 245 255 cadetblue1 205 170 125 burlywood3 255 245 238 seashell1 205 200 177 cornsilk3 139 54 38 tomato4 238 92 66 tomato2 205 186 150 wheat3 250 250 250 grey98 150 150 150 grey59 59 59 59 grey23 0 205 0 green3 0 238 0 green2 184 184 184 gray72 158 158 158 gray62 133 133 133 gray52 117 117 117 gray46 107 107 107 gray42 71 71 71 gray28 61 61 61 gray24 255 255 255 white 0 205 205 cyan3 0 0 0 black dspam-3.10.2+dfsg/webui/cgi-bin/templates/0000755000175000017500000000000011745313530017601 5ustar julienjuliendspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/0000755000175000017500000000000011745313531020207 5ustar julienjuliendspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/nav_fragment.html0000644000175000017500000000130611622570546023551 0ustar julienjulien DSPAM v3 Řídící centrum: $SUBJECT$
     
    $SUBJECT$
    $FROM$
    $TIME$ ($INFO$)


     
    $MESSAGE$
    
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/nav_quarantine.html0000644000175000017500000001014511622570546024116 0ustar julienjulien DSPAM v3 Řídící centrum

    Zprávy níže nebyly doručeny vaší běžné e-mailové aplikaci, protože se zdají být spamem. Kliknutím na řádku Subjekt zobrazíte zprávu, nebo můžete vybrat podle čeho jsou zprávy tříděné. Použijte zaškrtávací políčka a Doruč zaškrtnuté k doručení zpráv kreré chcete přečíst, nebo použijte Smazat všel k vyprázdnění karantény.

         

    $SORT_QUARANTINE$ $QUARANTINE$
     

         

    Stupnice barev: Spodní ohodnocení SPAMu, Střední ohodnocení SPAMu, Vysoké ohodnocení SPAMu

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/nav_admin_error.html0000644000175000017500000000200511622570546024244 0ustar julienjulien DSPAM v3 Administrace

    Vyskytla se chyba

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/nav_history.html0000644000175000017500000000561311622570546023454 0ustar julienjulien DSPAM v3 Řídící centrum

    Zprávy které byly zpracovány filtrem jsou ukázány níže. Nejnovější zprávy jsou vypsány první. Pomocí voleb přeškolení opravte chyby určení a doručte všechny omylem zadržené (false positives) které jsou ještě v karanténě.

      $SHOW_SELECTOR$ $HISTORY$
    Typ Rekvalif. Den/čas Od Subjekt Dodatečné informace
    $HISTORYPAGES$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/nav_admin_user.html0000644000175000017500000000305411622570546024076 0ustar julienjulien DSPAM v3 Administrace

    Následující tabulka ukazuje počet zpracovaných zpráv pro každého uživatele a jejich současné nastavení voleb.

    $TABLE$
    Jméno Q.Size TP TN FP FN SC IC Mód Při SPAMu BNR Whitelist Sed Sig Loc
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/nav_performance.html0000644000175000017500000001040711622570546024251 0ustar julienjulien DSPAM v3 Řídící centrum

    Pokud s vaším e-mailovým programem obdržíte zprávu - spam, který nebyl zachycen DSPAM filtrem, přepošlete ji prosím na spam-$REMOTE_USER$$LOCAL_DOMAIN$ takže bude moci být analyzována a filtr přeučen že šlo o spam. To zlepší přesnost filtru v budoucnosti.

    Výkonnostní statistiky - $TIME$

    Metrika   Kalkulováno jako
    Celková přesnost (od posledního vynulování) $OVERALL_ACCURACY$% (SPAM zpráv zachyceno + OK zpráv doručeno) / Celkový počet zpráv
    Identifikace SPAMu (od posledního vynulování) $SPAM_ACCURACY$% (Pouze míra zachycení SPAMu)
    Podíl SPAMu (z celkem zpracovaných) $SPAM_RATIO$% Celkem SPAM zpráv (chycených & proklouzlých) / Celkový počet zpráv
      SPAM zpráv Dobrých zpráv
    od posledního vynulování $TOTAL_SPAM_MISSED$ proklouzlých $TOTAL_NONSPAM_MISSED$ proklouzlých
    $TOTAL_SPAM_CAUGHT$ lapeno $TOTAL_NONSPAM_CAUGHT$ doručeno
    $SPAM_ACCURACY$% lapeno $NONSPAM_ERROR_RATE$% proklouzlo
    Celkem zpracováno filtrem $TOTAL_SPAM_LEARNED$ omylů $TOTAL_NONSPAM_LEARNED$ omylů
    $TOTAL_SPAM_SCANNED$ lapeno $TOTAL_NONSPAM_SCANNED$ doručeno
    Z hromady $TOTAL_SPAM_CORPUSFED$ naládováno $TOTAL_NONSPAM_CORPUSFED$ naládováno

    Vynulování | Vylepši -1

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/Makefile.am0000644000175000017500000000073611622570546022256 0ustar julienjulien# $Id: Makefile.am,v 1.31 2009/11/04 01:44:50 sbajic Exp $ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/nav_preferences.html0000644000175000017500000001237611622570546024260 0ustar julienjulien DSPAM v3 Řídící centrum

    Tato stránka vám umožní nastavit, jak bude filtr zpracovávat vaše zprávy.

    Trénink - nastavte, jak se filtr má učit během zpracování zpráv

    DSPAM by se měl učit:

    Z každé zprávy zkoumané filtrem
    Pouze když se filtr splete
    Pouze na zprávách s novými vzorky nebo když se filtr splete
      Při trénování DSPAMu preferuji:

    Přeposílání mých spamů (signatura bude uložena v těle zprávy)
    Odrážení mých spamů (signatura bude uložena v hlavičce zprávy)

    Citlivost filtru během období tréninku:
    Lapej SPAM (více v karanténě) | | Předpokládej OK (méně v karanténě)

    Obsluha zpráv - nastavení zacházení s SPAMem

    Pokud je identifikována SPAM zpráva:

    Přesuň zprávu do karantény
    Označ hlavičku Subjekt řetězcem
    Normálně doruč zprávu s X-DSPAM-Result hlavičkou

    Vlastnosti - upřesnění filtrace SPAMu

    $OPTION$ Povolení redukce šumu, což obyčejně zlepší přesnost filtrování
    Povolení automatického whitelistingu k zapamatování časté korespondence
    Přidání souhrnu tokenů každého mailu do jeho úplné hlavičky

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/Makefile.in0000644000175000017500000002623411745313453022266 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.31 2009/11/04 01:44:50 sbajic Exp $ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = webui/cgi-bin/templates/cs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign webui/cgi-bin/templates/cs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign webui/cgi-bin/templates/cs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/nav_analysis.html0000644000175000017500000000345611622570546023601 0ustar julienjulien DSPAM v3 Řídící centrum

    Grafy ukazující počet zpracovaných zpráv jsou zobrazeny níže.

    24 hodinová aktivita - $TS_DAILY$ SPAMů, $TI_DAILY$ dobrých

    14 denní aktivita - $TS_WEEKLY$ SPAMů, $TI_WEEKLY$ dobrých

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/nav_admin_status.html0000644000175000017500000001060711622570546024445 0ustar julienjulien DSPAM v3 Administrace

    Následující grafy a tabulky sumarizují filtrem provedené zpracování.

    Přehled

    Zpráv Dnes Tuto hodinu
    Spam $SPAM_TODAY$ $SPAM_THIS_HOUR$
    Dobré $NONSPAM_TODAY$ $NONSPAM_THIS_HOUR$
    Nezachycení Spamu $SM_TODAY$ $SM_THIS_HOUR$
    Omylem zachycené dobré $FP_TODAY$ $FP_THIS_HOUR$
    Očkování $INOC_TODAY$ $INOC_THIS_HOUR$
    Hromadné ládování $CORPUS_TODAY$ $CORPUS_THIS_HOUR$
    Na Whitelistu $WHITE_TODAY$ $WHITE_THIS_HOUR$
    Infikováno virem $VIRUS_TODAY$ $VIRUS_THIS_HOUR$
    Na Blacklistu $BLACK_TODAY$ $BLACK_THIS_HOUR$
    Na Bloklistu $BLOCK_TODAY$ $BLOCK_THIS_HOUR$
    Celkem $TOTAL_TODAY$ $TOTAL_THIS_HOUR$
    Stav Současná hodnota
    Průměrná doba zpracování zprávy $AVG_PROCESSING_TIME$ sec.
    Průměrná propustnost $AVG_MSG_PER_SECOND$ zpráv/sec.
    DSPAM instance $DSPAM_PROCESSES$ procesy
    Systémový uptime $UPTIME$
    Délka mailové fronty $MAIL_QUEUE$ zpráv

    24 hodinová aktivita - $TS_DAILY$ SPAM, $TI_DAILY$ Dobrých, $SM_DAILY$ Spamů prošlo, $FP_DAILY$ dobrých zachyceno, $INOC_DAILY$ očkování, $CORPUS_DAILY$ hromadných ládování, $WHITE_DAILY$ Whitelist-ovaných, $VIRUS_DAILY$ Virů, $BLACK_DAILY$ Blacklist-ovaných, $BLOCK_DAILY$ Blocklist-ovaných

    Denní aktivita - $TS_WEEKLY$ SPAMů, $TI_WEEKLY$ dobrých, $SM_WEEKLY$ Spamů prošlo, $FP_WEEKLY$ dobrých zachyceno, $INOC_WEEKLY$ očkování, $CORPUS_WEEKLY$ hromadných ládování, $WHITE_WEEKLY$ Whitelist-ovaných, $VIRUS_WEEKLY$ Virů, $BLACK_WEEKLY$ Blacklist-ovaných, $BLOCK_WEEKLY$ Blocklist-ovaných

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/nav_viewmessage.html0000644000175000017500000000340711622570546024271 0ustar julienjulien DSPAM v3 Control Center

    Obsah zprávy v karanténě je ukázán níže.

    protože to není SPAM

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/strings.pl0000755000175000017500000001051011741351001022223 0ustar julienjulien#!/usr/bin/perl # $Id: strings.pl,v 1.04 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . $LANG{'lang_name'} = "Česky"; $LANG{'lang_select'} = "Jazyk"; $LANG{'empty'} = "Prázdný"; $LANG{'admin_suite'} = "Administrace"; $LANG{'alert_name'} = "Jméno výstrahy"; $LANG{'remove_alert'} = "Vyjmout"; $LANG{'user_form'} = "Statistická ochrana proti SPAMu pro"; $LANG{'user_form_submit'} = "Změnit"; $LANG{'admin_form'} = "Statistická ochrana proti SPAMu pro Administrator"; $LANG{'admin_form_submit'} = "Změnit"; $LANG{'option_disable_filtering'} = "Zakaž filtrování DSPAMem"; $LANG{'option_enable_filtering'} = "Povol filtrování DSPAMem"; $LANG{'quarantine_rating'} = "Ohodnocení"; $LANG{'quarantine_date'} = "Datum"; $LANG{'quarantine_from'} = "Od"; $LANG{'quarantine_subject'} = "Subjekt"; $LANG{'history_show'} = "Ukaž"; $LANG{'history_show_all'} = "vše"; $LANG{'history_show_spam'} = "spam"; $LANG{'history_show_innocent'} = "v pořádku"; $LANG{'history_show_whitelisted'} = "na Whitelistu"; $LANG{'history_retrain_as_spam'} = "spam"; $LANG{'history_retrain_as_innocent'} = "v pořádku"; $LANG{'history_retrain_as'} = "Jako"; $LANG{'history_retrain_undo'} = "Zpět"; $LANG{'history_retrained'} = "Rekvalifikováno"; $LANG{'history_label_resend'} = "Přeposláno"; $LANG{'history_label_whitelist'} = "Whitelist"; $LANG{'history_label_spam'} = "SPAM"; $LANG{'history_label_innocent'} = "Dobré"; $LANG{'history_label_miss'} = "Omyl"; $LANG{'history_label_virus'} = "Virus"; $LANG{'history_label_RBL'} = "RBL"; $LANG{'history_label_block'} = "BLOCK"; $LANG{'history_label_corpus'} = "Hromadné"; $LANG{'history_label_unknown'} = "NEZNÁMÝ"; $LANG{'history_label_error'} = "Chyba"; $LANG{'error_no_historic'} = "Historie nemá žádná data."; $LANG{'error_cannot_open_log'} = "Nelze otevřít logovací soubor"; $LANG{'error_no_identity'} = "Systémová chyba. Nemohl jsem určit vaši identitu."; $LANG{'error_invalid_command'} = "Neplatný příkaz"; $LANG{'error_cannot_write_prefs'} = "Nelze zapsat předvolby"; $LANG{'error_no_sigid'} = "Nespecifikováno ID zprávy"; $LANG{'error_no_alert_specified'} = "Nespecifikována výstraha."; $LANG{'error_message_part1'} = "Během zpracování vašeho požadavku se vyskytla tato chyba"; $LANG{'error_message_part2'} = "Pokud tento problém přetrvává, kontaktujte prosím vašeho správce."; $LANG{'error_filesystem_scale'} = "Nelze zjistit škálování vašeho filesystému"; $LANG{'error_load_default_prefs'} = "Nelze načíst defaultní volby"; $LANG{'error_access_denied'} = "Přístup zakázán"; $LANG{'graph_legend_x_label_hour'} = "Hodina dne"; $LANG{'graph_legend_x_label_date'} = "Datum"; $LANG{'graph_legend_nb_messages'} = "Pocet zprav"; $LANG{'graph_legend_spam'} = "SPAM"; $LANG{'graph_legend_good'} = "OK"; $LANG{'graph_legend_inoculations'} = "Ockovani"; $LANG{'graph_legend_corpusfeds'} = "Hromadne ladovani"; $LANG{'graph_legend_virus'} = "Virus"; $LANG{'graph_legend_RBL'} = "Na Blacklistu (RBL)"; $LANG{'graph_legend_blocklisted'} = "Na Blocklistu"; $LANG{'graph_legend_whitelisted'} = "Na Auto-Whitelistu"; $LANG{'graph_legend_nonspam'} = "Ne-spam"; $LANG{'graph_legend_spam_misses'} = "Spam proklouzl"; $LANG{'graph_legend_falsepositives'} = "Zadrzen dobry"; 1; dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/nav_error.html0000644000175000017500000000235111622570546023100 0ustar julienjulien DSPAM v3 Control Center

    Vyskytla se chyba

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/nav_alerts.html0000644000175000017500000000362111622570546023242 0ustar julienjulien DSPAM v3 Řídící centrum

    Výstrahy vám pomohou najít zprávy v karanténním seznamu. Pokud je text výstrahy nalezen ve zprávě, její řádek bude vysvícen. To vám pomůže identifikovat zprávu, jež nemusí být SPAM.

    $ALERTS$

     

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/cs/nav_admin_preferences.html0000644000175000017500000001244411622570546025424 0ustar julienjulien DSPAM v3 Administrace

    Tato stránka vám umožní upravit předvolby pro libovolného uživatele. Také můžete upravit defaultní volby DSPAMu tak, že necháte vstupní pole prázdné.

    Zadejte jméno uživatele:

    $ERROR$

    Trénink - Nastavte jak se filtr učí ze zpracovávaných zpráv

    DSPAM by se měl učit:

    Z každé zprávy, která skrz něj projde
    Pouze když se filtr splete
    Pouze na zprávách s novými vzorky nebo když se filtr splete
      Při učení DSPAMu preferuji:

    Přeposílání mých spamů (signatura je v těle zprávy)
    Odmítání mých spamů (signatura je v hlavičce zprávy)
    Aby DSPAM přidal signaturu jako přílohu

    Citlivost filtru během období tréninku:
    Lapej SPAM (více v karanténě) | | Předpokládej OK (méně v karanténě)

    Obsluha zpráv - nastavení zacházení s SPAMem

    Pokud je identifikována SPAM zpráva:

    Dej ji do karantény
    Označ hlavičku Subject řetězcem
    Normálně doruč zprávu s X-DSPAM-Result hlavičkou

    Vlastnosti - upřesnění filtrace SPAMu

    Povolení redukce šumu, což obyčejně zlepší přesnost filtrování
    Povolení automatického whitelistingu k zapamatování časté korespondence
    Přidání souhrnu tokenů každého mailu do jeho úplné hlavičky

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/nav_fragment.html0000644000175000017500000000144711741353010023135 0ustar julienjulien DSPAM v3 Control Center: $SUBJECT$
     
    $SUBJECT$
    $FROM$
    $TIME$ ($INFO$)


     
    $MESSAGE$
    
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/nav_quarantine.html0000644000175000017500000000740611741353010023502 0ustar julienjulien DSPAM v3 Control Center

    The messages below have not been been delivered to your normal e-mail application because they are believed to be spam. Click on the Subject line to view the message or choose a sort option to change how messages are sorted. Use the checkboxes and Deliver Checked to deliver messages you want to read, or use Delete All to empty the quarantine.

         

    $SORT_QUARANTINE$ $QUARANTINE$
     

         

    Color key: Lower SPAM rating, Medium SPAM rating, Higher SPAM rating

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/nav_admin_error.html0000644000175000017500000000224111741353010023624 0ustar julienjulien DSPAM v3 Administrative Suite

    An Error Has Occured

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/nav_history.html0000644000175000017500000000550611741353010023033 0ustar julienjulien DSPAM v3 Control Center

    The messages that have been processed by the filter are shown below. The most recent messages are shown first. Use the retrain options to correct errors and deliver any false positives that are still in your quarantine.

      $SHOW_SELECTOR$ $HISTORY$
    Type Retrain Day/Time From Subject Additional Info
    $HISTORYPAGES$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/nav_admin_user.html0000644000175000017500000000315511741353010023456 0ustar julienjulien DSPAM v3 Administrative Suite

    The following table shows the number of messages processed for each user along with their current preference settings.

    $TABLE$
    Name Q.Size TP TN FP FN SC IC Mode On Spam BNR Whitelist Sed Sig Loc
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/0000755000175000017500000000000011745313534020233 5ustar julienjuliendspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/nav_fragment.html0000644000175000017500000000140311741353010023553 0ustar julienjulien DSPAM v3 Центр Управления: $SUBJECT$
     
    $SUBJECT$
    $FROM$
    $TIME$ ($INFO$)


     
    $MESSAGE$
    
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/nav_quarantine.html0000644000175000017500000001676111741353010024134 0ustar julienjulien DSPAM v3 Control Center

    Письма, указанные ниже, не были доставлены в Ваш почтовый ящик, так как фильтр расценил их, как спам. Щелкните по теме письма, чтобы просмотреть его или выберите порядок сортировки писем. Также Вы можете выбрать интересующие Вас письма и нажать кнопку Доставить выбранные, чтобы доставить их в почтовый ящик, или нажмите Удалить все, чтобы очистить карантин.

      Выбрать 200.  

    $SORT_QUARANTINE$ $QUARANTINE$
     

      Выбрать 200.  

    Цветовые ключи: Низкий рейтинг, Средний рейтинг, Высокий рейтинг

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/nav_admin_error.html0000644000175000017500000000325311741353010024256 0ustar julienjulien DSPAM v3 Администрирование

    Возникла ошибка

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/nav_history.html0000644000175000017500000001074211741353010023457 0ustar julienjulien DSPAM v3 Центр Управления

    Ниже приведен список писем, обработанных фильтром. Последние письма появляются в списке первыми. Используйте переобучение, чтобы исправить ошибки, и доставить ошибочно отфильтрованные письма из карантина.

      $SHOW_SELECTOR$ $HISTORY$
    Тип Переобучение День/Время Отправитель Тема Дополнительная информация
    $HISTORYPAGES$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/nav_admin_user.html0000644000175000017500000000501311741353010024077 0ustar julienjulien DSPAM v3 Администрирование

    Количество сообщений, обрабатываемых для каждого пользователя (с учетом индивидуальных настроек).

    $TABLE$
    Name Q.Size TP TN FP FN SC IC Mode On Spam BNR Whitelist Sed Sig Loc
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/nav_performance.html0000644000175000017500000002027311741353010024257 0ustar julienjulien DSPAM v3 Центр Управления

    Если фильтр пропустил спам, и Вы получили его с помощью своей почтовой программы, то Вы можете переслать его на адрес spam-$REMOTE_USER$$LOCAL_DOMAIN$, что позволит проанализировать его и переучить, как спам. Это улучшит точность фильтрации в будущем.

    Статистика производительности - $TIME$

    Показатель   Вычисляется как
    Общая точность (после последнего сброса) $OVERALL_ACCURACY$% (Выявленный спам + Доставлено хороших) / Общее количество писем
    Выявлено спама (после последнего сброса) $SPAM_ACCURACY$% (Процент выявленного спама)
    Доля спама (от общего числа обработанных писем) $SPAM_RATIO$% Общее количество спама (выявлено и пропущено) / Общее количество писем
      Спам Хорошие
    После последнего сброса $TOTAL_SPAM_MISSED$ пропущено $TOTAL_NONSPAM_MISSED$ пропущено
    $TOTAL_SPAM_CAUGHT$ выявлено $TOTAL_NONSPAM_CAUGHT$ доставлено
    $SPAM_ACCURACY$% выявлено $NONSPAM_ERROR_RATE$% пропущено
    Всего обработано фильтром $TOTAL_SPAM_LEARNED$ пропущено $TOTAL_NONSPAM_LEARNED$ пропущено
    $TOTAL_SPAM_SCANNED$ выявлено $TOTAL_NONSPAM_SCANNED$ доставлено
    Из подборки писем $TOTAL_SPAM_CORPUSFED$ передано $TOTAL_NONSPAM_CORPUSFED$ передано

    Сброс | Поправка-1

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/Makefile.am0000644000175000017500000000057611622570546022301 0ustar julienjulien# $Id: Makefile.am,v 1.0 2010/02/05 23:52:36 sbajic Exp $ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/nav_preferences.html0000644000175000017500000002435411741353010024263 0ustar julienjulien DSPAM v3 Центр Управления

    Настройки фильтра, влияющие на обработку писем.

    Обучение - Настройки, влияющие на то, как фильтр обучается при обработке писем

    Фильтр должен обучаться:

    При обработке каждого письма
    Только, когда фильтр допускает ошибку
    Только при появлении новых данных или по ошибке
      При обучении фильтра я предпочитаю:

    Пересылать спам (сигнатура появляется в теле письма)
    Не пересылать спам (сигнатура появляется в заголовках письма)

    Чувствительность фильтра в течение периода обучения:
    Выявлять спам (больше в карантине) | | Считать хорошими (меньше в карантине)

    Обработка писем - Настройки, определяющие, как поступать со спамом

    Когда фильтр считает письмо спамом:

    Поместить письмо в карантин
    Добавить к теме письма префикс
    Доставить письмо, добавив служебный заголовок X-DSPAM-Result

    Дополнительно - Тонкая настройка фильтра

    $OPTION$ Разрешить подавление шума, что обычно улучшает точность фильтрации
    Разрешить автоматическое добавление в белый список тех, с кем ведется постоянная переписка
    Добавлять признаки в служебные заголовки письма

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/Makefile.in0000644000175000017500000002610711745313453022306 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.0 2010/02/05 23:52:36 sbajic Exp $ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = webui/cgi-bin/templates/ru DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign webui/cgi-bin/templates/ru/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign webui/cgi-bin/templates/ru/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/nav_analysis.html0000644000175000017500000000472211741353010023602 0ustar julienjulien DSPAM v3 Центр Управления

    Количество обработанных писем

    24-часовая активность - $TS_DAILY$ Спам, $TI_DAILY$ Хорошие

    14-дневная активность - $TS_WEEKLY$ Спам, $TI_WEEKLY$ Хорошие

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/nav_admin_status.html0000644000175000017500000001716711741353010024461 0ustar julienjulien DSPAM v3 Администрирование

    Суммарная статистика использования фильтра.

    Обзор

    Писем Сегодня Час
    Спам $SPAM_TODAY$ $SPAM_THIS_HOUR$
    Хорошие $NONSPAM_TODAY$ $NONSPAM_THIS_HOUR$
    Пропущено спама $SM_TODAY$ $SM_THIS_HOUR$
    Ложные срабатывания $FP_TODAY$ $FP_THIS_HOUR$
    Инъекции $INOC_TODAY$ $INOC_THIS_HOUR$
    Подборки $CORPUS_TODAY$ $CORPUS_THIS_HOUR$
    В белом списке $WHITE_TODAY$ $WHITE_THIS_HOUR$
    Вирусы $VIRUS_TODAY$ $VIRUS_THIS_HOUR$
    В черном списке $BLACK_TODAY$ $BLACK_THIS_HOUR$
    Заблокировано $BLOCK_TODAY$ $BLOCK_THIS_HOUR$
    Всего $TOTAL_TODAY$ $TOTAL_THIS_HOUR$
    Статус Текущее значение
    Среднее время обработки одного письма $AVG_PROCESSING_TIME$ сек.
    Средняя производительность $AVG_MSG_PER_SECOND$ писем/сек.
    Процессов DSPAM $DSPAM_PROCESSES$ процессов
    Рабочее время $UPTIME$
    Длина очереди писем $MAIL_QUEUE$ писем

    24-часовая активность - $TS_DAILY$ SPAM, $TI_DAILY$ хорошие, $SM_DAILY$ спама пропущено, $FP_DAILY$ ложных срабатываний, $INOC_DAILY$ инъекций, $CORPUS_DAILY$ подборок, $WHITE_DAILY$ в белом списке, $VIRUS_DAILY$ вирусы, $BLACK_DAILY$ в черном списке, $BLOCK_DAILY$ заблокировано

    Активность по дням - $TS_WEEKLY$ SPAM, $TI_WEEKLY$ хорошие, $SM_WEEKLY$ спама пропущено, $FP_WEEKLY$ ложных срабатываний, $INOC_WEEKLY$ инъекций, $CORPUS_WEEKLY$ подборок, $WHITE_WEEKLY$ в белом списке, $VIRUS_WEEKLY$ вирусы, $BLACK_WEEKLY$ в черном списке, $BLOCK_WEEKLY$ заблокировано

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/nav_viewmessage.html0000644000175000017500000000474211741353010024300 0ustar julienjulien DSPAM v3 Центр Управления

    Содержимое письма.

    , потому что оно не спам

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/strings.pl0000755000175000017500000002043711741351001022255 0ustar julienjulien#!/usr/bin/perl # $Id: strings.pl,v 1.01 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . $LANG{'empty'} = "Пусто"; $LANG{'admin_suite'} = "Администрирование"; $LANG{'alert_name'} = "Название предупреждения"; $LANG{'remove_alert'} = "Удалить"; $LANG{'user_form'} = "Статистический спам-фильтр для"; $LANG{'user_form_submit'} = "Изменить"; $LANG{'option_disable_filtering'} = "Отключить фильтр"; $LANG{'option_enable_filtering'} = "Включить фильтр"; $LANG{'quarantine_rating'} = "Рейтинг"; $LANG{'quarantine_date'} = "Дата"; $LANG{'quarantine_from'} = "Отправитель"; $LANG{'quarantine_subject'} = "Тема"; $LANG{'history_show'} = "Показать"; $LANG{'history_show_all'} = "все"; $LANG{'history_show_spam'} = "спам"; $LANG{'history_show_innocent'} = "хорошие"; $LANG{'history_show_whitelisted'} = "в белом списке"; $LANG{'history_retrain_as_spam'} = "спам"; $LANG{'history_retrain_as_innocent'} = "хорошее"; $LANG{'history_retrain_as'} = "Как"; $LANG{'history_retrain_undo'} = "Отмена"; $LANG{'history_retrained'} = "Переучено"; $LANG{'history_label_resend'} = "Повторно"; $LANG{'history_label_whitelist'} = "В белом списке"; $LANG{'history_label_spam'} = "Спам"; $LANG{'history_label_innocent'} = "Хорошее"; $LANG{'history_label_miss'} = "Пропущено"; $LANG{'history_label_virus'} = "Вирус"; $LANG{'history_label_RBL'} = "RBL"; $LANG{'history_label_block'} = "Заблокировано"; $LANG{'history_label_corpus'} = "Подборка"; $LANG{'history_label_unknown'} = "НЕИЗВ"; $LANG{'history_label_error'} = "Ошибка"; $LANG{'error_no_historic'} = "Нет данных по истории писем."; $LANG{'error_cannot_open_log'} = "Невозможно открыть журнальный файл"; $LANG{'error_no_identity'} = "Системная ошибка. Невозможно определить пользователя."; $LANG{'error_invalid_command'} = "Неправильная команда"; $LANG{'error_cannot_write_prefs'} = "Невозможно записать настройки"; $LANG{'error_no_sigid'} = "Не указан ID письма"; $LANG{'error_no_alert_specified'} = "Не указано предупреждения."; $LANG{'error_message_part1'} = "При обработке Вашего запроса возникла следующая ошибка:"; $LANG{'error_message_part2'} = "Если проблема сохраняется, обратитесь, пожалуйста, к администратору"; $LANG{'error_filesystem_scale'} = "Невозможно определить масштабирование файловой системы"; $LANG{'error_load_default_prefs'} = "Невозможно загрузить настройки по умолчанию"; $LANG{'error_access_denied'} = "Доступ закрыт"; $LANG{'graph_legend_nb_messages'} = "Количество писем"; $LANG{'graph_legend_spam'} = "Спам"; $LANG{'graph_legend_good'} = "Хорошие"; $LANG{'graph_legend_inoculations'} = "Инъекции"; $LANG{'graph_legend_corpusfeds'} = "Подборки"; $LANG{'graph_legend_virus'} = "Вирус"; $LANG{'graph_legend_RBL'} = "В черном списке (RBL)"; $LANG{'graph_legend_blocklisted'} = "Заблокировано"; $LANG{'graph_legend_whitelisted'} = "В белом списке"; $LANG{'graph_legend_nonspam'} = "Не спам"; $LANG{'graph_legend_spam_misses'} = "Пропущено спама"; $LANG{'graph_legend_falsepositives'} = "Ложные срабатывания"; 1; dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/nav_error.html0000644000175000017500000000350511741353010023106 0ustar julienjulien DSPAM v3 Центр Управления

    Возникла ошибка

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/nav_alerts.html0000644000175000017500000000573311741353010023254 0ustar julienjulien DSPAM v3 Центр Управления

    Предупреждения помогут Вам находить хорошие письма, попавшие в карантин. Если текст предупреждения появляется в письме, то строчка в карантине, соответствующая этому письму, будет выделена.

    $ALERTS$

     

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ru/nav_admin_preferences.html0000644000175000017500000002650411741353010025432 0ustar julienjulien DSPAM v3 Администрирование

    Редактирование настроек фильтра для каждого пользователя в отдельности, а также настроек по умолчанию, если оставить поле ввода пустым.

    Имя пользователя:

    $ERROR$

    Обучение - Настройки, влияющие на то, как фильтр обучается при обработке писем

    Фильтр должен обучаться:

    При обработке каждого письма
    Только, когда фильтр допускает ошибку
    Только при появлении новых данных или по ошибке
      При обучении фильтра я предпочитаю:

    Пересылать спам (сигнатура появляется в теле письма)
    Не пересылать спам (сигнатура появляется в заголовках письма)
    Добавлять сигнатуру вложением

    Чувствительность фильтра в течение периода обучения:
    Выявлять спам (больше в карантине) | | Считать хорошими (меньше в карантине)

    Обработка писем - Настройки, определяющие, как поступать со спамом

    Когда фильтр считает письмо спамом:

    Поместить письмо в карантин
    Добавить к теме письма префикс
    Доставить письмо, добавив служебный заголовок X-DSPAM-Result

    Дополнительно - Тонкая настройка фильтра

    Разрешить подавление шума, что обычно улучшает точность фильтрации
    Разрешить автоматическое добавление в белый список тех, с кем ведется постоянная переписка
    Добавлять признаки в служебные заголовки письма

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/0000755000175000017500000000000011745313534020225 5ustar julienjuliendspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/nav_fragment.html0000644000175000017500000000125711622570546023571 0ustar julienjulien DSPAM v3 Centru de Control: $SUBJECT$
     
    $SUBJECT$
    $FROM$
    $TIME$ ($INFO$)


     
    $MESSAGE$
    
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/nav_quarantine.html0000644000175000017500000000756711622570546024147 0ustar julienjulien DSPAM v3 - Centru de Control

    Mesajele de mai jos nu au fost livrate aplicației de mail pentru că sunt suspecte de a fi spam. Click pe linia 'Subiect' pentru a vedea mesajul sau alege o opțiune de sortare pentru a schimba modul de ordonare a mesajelor. Folosește Căsuţele de bifare și Livreaza Mesajele Bifate pentru a livra mesajele pe care vrei să le citești sau Șterge Tot pentru a goli carantina.

         

    $SORT_QUARANTINE$ $QUARANTINE$
     

         

    Legenda culorilor: Probabilitate SPAM: mică, Probabilitate SPAM: medie, Probabilitate SPAM: mare

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/nav_admin_error.html0000644000175000017500000000177211622570546024271 0ustar julienjulien DSPAM v3 Suita Administrativă

    A avut loc o eroare

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/nav_history.html0000644000175000017500000000536711622570546023475 0ustar julienjulien DSPAM v3 Centru de Control

    Mesajele care au fost procesate de filtru sunt afișate mai jos. Cele mai recente mesaje sunt afișate primele. folosește optiunea de reînvăț pentru a coresta erorile și a livra mesajel e buna identificate ca spam care sunt incă in carantină

      $SHOW_SELECTOR$ $HISTORY$
    Tip Reînvățare Dată/Oră De la Subiect Informații adiționale
    $HISTORYPAGES$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/nav_admin_user.html0000644000175000017500000000272211622570546024112 0ustar julienjulien DSPAM v3 Centru de Control

    Următorul table arată numarul de mesaje procesate pentru fiecare utilizator si preferințele utilizatorilor

    $TABLE$
    Nume Dimens.Carant. TP TN FP FN SC IC Mod On Spam BNR Whitelist Sed Sig Loc
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/nav_performance.html0000644000175000017500000000762611622570546024275 0ustar julienjulien DSPAM v3 Centru de Control

    Dacă primești un mesaj în aplicația de email care nu a fost prins de filtru înaintează-l (forward) la: 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.

    Statistici de performanță - $TIME$

    Măsurătoare   Calculată ca
    Acuratețea globală (de la ultima resetare) $OVERALL_ACCURACY$% (mesaje SPAM prinse + mesaje non-spam livrate) / Numărul totat de mesaje
    Identificarea spam-ului (de la ultima resetare) $SPAM_ACCURACY$% (Numai rata de prindere a spam-ului)
    Spam ratio (of total processed) $SPAM_RATIO$% Numărul total de mesaje spam (prinse și scăpate) / Numărul total de mesaje
      Mesaje SPAM Mesaje bune
    De la ultima resetare $TOTAL_SPAM_MISSED$ scăpate $TOTAL_NONSPAM_MISSED$ scăpate
    $TOTAL_SPAM_CAUGHT$ prinse $TOTAL_NONSPAM_CAUGHT$ livrate
    $SPAM_ACCURACY$% prinse $NONSPAM_ERROR_RATE$% scăpate
    Total procesate de filtru $TOTAL_SPAM_LEARNED$ scăpate $TOTAL_NONSPAM_LEARNED$ scăpate
    $TOTAL_SPAM_SCANNED$ prinse $TOTAL_NONSPAM_SCANNED$ livrate
    Din corpus $TOTAL_SPAM_CORPUSFED$ fed $TOTAL_NONSPAM_CORPUSFED$ fed

    Reset | Tweak -1

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/Makefile.am0000644000175000017500000000072011622570546022262 0ustar julienjulien# $Id: Makefile.am,v 1.00 2009/12/22 12:25:59 sbajic Exp $ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/nav_preferences.html0000644000175000017500000001206611622570546024267 0ustar julienjulien DSPAM v3 Centru de Control

    În aceast a pagină poți configura cum să gestioneze filtrul mesajele.

    Învățare - Configurează cum învața filtrul din procesarea mesajelor

    DSPAM învață:

    Fiecare mesaj scanat de filtru
    Numai când filtrul a greșit
    Numai datele noi sau dacă filtrul a greșit
      Cand îl învăț pe DSPAM prefer:

    înaintez (forward) spam-ul (semnătura apare în corpul mesajului)
    bounce spam-ul (semnătura apare în antetul mailului)

    Sensibilitatea filtruluiîn timpul perioadei de învățare:
    Oprește SPAM-ul (Mai multe in Carantiă) | | Presupuna Bun (Mai puține în Carantină)

    Gestionarea Mesajelor - Configurează cum este destionat SPAM-ul

    Atunci când este ideintificat un mesaj ca SPAM:

    Pune-l în Carantină
    Marcheză Subiectul cu
    Livrează normal mesajul, cu un antet (header) X-DSPAM-Result

    Funcționalități - reglarea filtrării SPAM-ului

    $OPTION$ Activează reducerea zgomotului, ceea ce, de obicei, îmbunătățește acuratețea filtrării
    Activează automatic whitelisting pentru înregistrarea corespondeinților frecvenți
    Add the factoring tokens din fiecare mail in antetele (headers) emailului

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/Makefile.in0000644000175000017500000002621611745313453022301 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.00 2009/12/22 12:25:59 sbajic Exp $ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = webui/cgi-bin/templates/ro DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign webui/cgi-bin/templates/ro/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign webui/cgi-bin/templates/ro/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/nav_analysis.html0000644000175000017500000000323511622570546023607 0ustar julienjulien DSPAM v3 Control Center

    Graphs showing the number of messages that have been processed are shown below.

    24 Hour Activity - $TS_DAILY$ SPAM, $TI_DAILY$ Good

    14 Day Activity - $TS_WEEKLY$ SPAM, $TI_WEEKLY$ Good

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/nav_admin_status.html0000644000175000017500000000763411622570546024466 0ustar julienjulien DSPAM v3 Suita Administrativă

    Graficele și tabelele de mai jos rezumă procesarea făcută de filtru.

    Ansamblu

    Mesaje Azi Aceată Ora
    Spam $SPAM_TODAY$ $SPAM_THIS_HOUR$
    Bune $NONSPAM_TODAY$ $NONSPAM_THIS_HOUR$
    Spam scăpat $SM_TODAY$ $SM_THIS_HOUR$
    False Positives $FP_TODAY$ $FP_THIS_HOUR$
    Inoculări $INOC_TODAY$ $INOC_THIS_HOUR$
    Corpusfeds $CORPUS_TODAY$ $CORPUS_THIS_HOUR$
    Whitelisted $WHITE_TODAY$ $WHITE_THIS_HOUR$
    Infectate cu viruși $VIRUS_TODAY$ $VIRUS_THIS_HOUR$
    Blacklisted $BLACK_TODAY$ $BLACK_THIS_HOUR$
    Blocklisted $BLOCK_TODAY$ $BLOCK_THIS_HOUR$
    Total $TOTAL_TODAY$ $TOTAL_THIS_HOUR$
    Status Valuare Curentă
    Timpul mediu de procesate pentru un mesaj $AVG_PROCESSING_TIME$ sec.
    Average throughput $AVG_MSG_PER_SECOND$ messages/sec.
    Instanțe DSPAM $DSPAM_PROCESSES$ processes
    Uptime $UPTIME$
    Lungimea cozii de mail $MAIL_QUEUE$ messages

    24 Hour Activity - $TS_DAILY$ SPAM, $TI_DAILY$ Good, $SM_DAILY$ Spam Misses, $FP_DAILY$ False Positives, $INOC_DAILY$ Inoculations, $CORPUS_DAILY$ Corpusfeds, $WHITE_DAILY$ Whitelisted, $VIRUS_DAILY$ Virus, $BLACK_DAILY$ Blacklisted, $BLOCK_DAILY$ Blocklisted

    Daily Activity - $TS_WEEKLY$ SPAM, $TI_WEEKLY$ Good, $SM_WEEKLY$ Spam Misses, $FP_WEEKLY$ False Positives, $INOC_WEEKLY$ Inoculations, $CORPUS_WEEKLY$ Corpusfeds, $WHITE_WEEKLY$ Whitelisted, $VIRUS_WEEKLY$ Virus, $BLACK_WEEKLY$ Blacklisted, $BLOCK_WEEKLY$ Blocklisted

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/nav_viewmessage.html0000644000175000017500000000337311622570546024306 0ustar julienjulien DSPAM v3 Centru de Control

    Conținutul mesajelor din carantină este afișat mai jos.

    pentru că nu este SPAM

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/nav_error.html0000644000175000017500000000235511622570546023117 0ustar julienjulien DSPAM v3 Centru de Control

    A avut loc o eroare

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/nav_alerts.html0000644000175000017500000000346011622570546023256 0ustar julienjulien DSPAM v3 Centru de Control

    Alertele te vor ajuta sa găsești mesajele in lista Carantinei. Dacă textul din alertă este găsit intr-un mesaj, răndul va fi evidențiat, ajutându-te să identifici mesajele care ar putea să nu fie spam.

    $ALERTS$

     

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/ro/nav_admin_preferences.html0000644000175000017500000001211011622570546025425 0ustar julienjulien DSPAM v3 Suita Administrativă

    Această pagine permite editarea preferințelor oricărui utilizator. Pentru editarea preferințelor implicite lasă câmpurile goale.

    introduce numele de utilizator:

    $ERROR$

    Învățare - Configurează cum învață filtrul din procesarea mesajelor

    DSPAM învață:

    Din fiecare mesaj scanat de filtru
    Numai când filtrul a făcut o greșeală
    Numai cu date noi și când filtrul a făcut o greșeală
      Cănd îl învaț prefer:

    șă înaintez (forward) spam-ul (semnătura apare in corpul mesajului)
    bounce spam-ul (semnătura apare in antetele mesajului)
    DSPAM să își adauge semnătura ca atașament

    Senzitivitatea filtrului în timpul perioadei de învătare:
    Oprește SPAM-ul (Mai mult în Carantină) | | Presupune bun (mai puțin in Carantină)

    Gestionarea Mesajelor - Configurare gestionarii SPAM-ului

    Cand un mesaj e clasificat ca SPAM :

    Pune-l in Carantină
    Adaugă la Subiect
    Livrează mesajul normal cu un antet (header) X-DSPAM-Result

    Funcționalitate - Reglarea filtrării SPAM-ului

    Activează reducerea zgomotului (de obicei îmbunătățește acuratețea)
    Activează adăugarea automată la lista albă a corespondenții frecvenți
    Adaugă factoring tokens in antetul (header) fiecărui mesaj

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/nav_performance.html0000644000175000017500000000755111741353010023635 0ustar julienjulien DSPAM v3 Control Center

    If you receive a message in your e-mail application that was not caught by the filter, please forward it to 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.

    Performance Statistics - $TIME$

    Metric   Calculated as
    Overall accuracy (since last reset) $OVERALL_ACCURACY$% (SPAM messages caught + Good messages delivered) / Total number of messages
    Spam identification (since last reset) $SPAM_ACCURACY$% (Spam catch rate only)
    Spam ratio (of total processed) $SPAM_RATIO$% Total SPAM messages (both caught & missed) / Total number of messages
      SPAM messages Good messages
    Since last reset $TOTAL_SPAM_MISSED$ missed $TOTAL_NONSPAM_MISSED$ missed
    $TOTAL_SPAM_CAUGHT$ caught $TOTAL_NONSPAM_CAUGHT$ delivered
    $SPAM_ACCURACY$% caught $NONSPAM_ERROR_RATE$% missed
    Total processed by filter $TOTAL_SPAM_LEARNED$ missed $TOTAL_NONSPAM_LEARNED$ missed
    $TOTAL_SPAM_SCANNED$ caught $TOTAL_NONSPAM_SCANNED$ delivered
    From corpus $TOTAL_SPAM_CORPUSFED$ fed $TOTAL_NONSPAM_CORPUSFED$ fed

    Reset | Tweak -1

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/Makefile.am0000644000175000017500000000061211622570546021642 0ustar julienjulien# $Id: Makefile.am,v 1.32 2010/02/05 23:53:42 sbajic Exp $ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl dspam-3.10.2+dfsg/webui/cgi-bin/templates/nav_preferences.html0000644000175000017500000001221611741353010023627 0ustar julienjulien DSPAM v3 Control Center

    This page lets you configure how the filter will handle your messages.

    Training - Configure how the filter learns as it processes messages

    DSPAM should train:

    On every new message scanned by the filter
    Only when the filter makes a mistake
    Only with new data or if the filter makes a mistake
      When I train DSPAM, I prefer:

    To forward my spams (signature appears in message body)
    To bounce my spams (signature appears in message headers)

    Filter sensitivity during the training period:
    Catch SPAM (More in Quarantine) | | Assume Good (Fewer in Quarantine)

    Message Handling - Configure how SPAM is handled

    When a SPAM message is identified:

    Quarantine the message
    Tag the Subject header with
    Deliver the message normally with a X-DSPAM-Result header

    Features - Tuning SPAM filtering

    $OPTION$ Enable noise reduction, which usually improves filtering accuracy
    Enable automatic whitelisting to record frequent correspondence
    Add the factoring tokens in each email into the message's full headers

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/0000755000175000017500000000000011745313531020172 5ustar julienjuliendspam-3.10.2+dfsg/webui/cgi-bin/templates/de/nav_fragment.html0000644000175000017500000000151211741353010023516 0ustar julienjulien DSPAM v3 Verwaltungsbereich
     
    $SUBJECT$
    $FROM$
    $TIME$ ($INFO$)


     
    $MESSAGE$
    
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/nav_quarantine.html0000644000175000017500000001003111741353010024056 0ustar julienjulien DSPAM v3 Verwaltungsbereich

    Die unten aufgeführten Nachrichten wurden nicht an ihre Mailanwendung weitergeleitet weil sie als SPAM verdächtigt werden. Drücken sie auf den Betreff, um die Nachricht anzuzeigen oder wählen sie eine Sortierungsoption um die Auflistung zu beeinflussen.
    Benutzen sie die Schalter geprüfte Zustellen um Nachrichten zuzustellen die sie lesen möchten, oder Alle Löschen um die Quarantäne vollständig zu löschen.

         

    $SORT_QUARANTINE$ $QUARANTINE$
     

         

    Farblegende: Tiefe SPAM Bewertung, Mittlere SPAM Bewertung, Hohe SPAM Bewertung

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/nav_admin_error.html0000644000175000017500000000217511741353010024222 0ustar julienjulien DSPAM v3 Verwaltungsbereich

    Ein Fehler ist aufgetreten

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/nav_history.html0000644000175000017500000000552211741353010023421 0ustar julienjulien DSPAM v3 Verwaltungsbereich

    Die Nachrichten die vom Filter verarbeitet wurden sind unten aufgelistet. Die neuesten Nachrichten werden zuerst aufgeführt.
    Benützen sie die Retrain Option, um Fehler zu korrigieren und Falsch positive Ergebnise aus ihrer Quarantäne auszuliefern.

      $SHOW_SELECTOR$ $HISTORY$
    Typ Umtrainieren Tag/Zeit Absender Betreff Zusätzliche Info
    $HISTORYPAGES$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/nav_admin_user.html0000644000175000017500000000306211741353010024043 0ustar julienjulien DSPAM v3 Verwaltungsbereich

    Die folgenden Grafiken und Tabellen zeigen die Anzahl der verarbeiteten Nachrichten für jeden Benutzer nebst seinen aktuellen Einstellungen.

    $TABLE$
    Name Q.Size TP TN FP FN SC IC Mode On Spam BNR Whitelist Sed Sig Loc
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/nav_performance.html0000644000175000017500000001004311741353010024213 0ustar julienjulien DSPAM v3 Verwaltungsbereich

    Wenn sie eine E-Mail in ihrer Mailanwendung erhalten welche nicht durch den Filter erfasst wurde, dann leiten sie die Nachricht an spam-$REMOTE_USER$$LOCAL_DOMAIN$ weiter, so dass die Nachricht analysiert und als Spam gelernt werden kann. Dies steigert in Zukunft die Erkennungsrate.

    Statistik der Leistungsmerkmale - $TIME$

    Metrik   Berechnung als
    Gesamt-Präzision (seit letzter Rückstellung) $OVERALL_ACCURACY$% (SPAM Mails erkannt + Gute Mails zugestellt) / Anzahl der Nachrichten
    Spam Erkennung (seit letzter Rückstellung) $SPAM_ACCURACY$% (Spam Erkennungsrate einzeln)
    Spam Anteil (der verarbeiteten Nachrichten) $SPAM_RATIO$% Alle SPAM Mails (erkannt + nicht erkannt) / Anzahl der Nachrichten
      SPAM Mails Nicht SPAM Mails
    Seit letzter Rückstellung $TOTAL_SPAM_MISSED$ nicht erkannt $TOTAL_NONSPAM_MISSED$ nicht erkannt
    $TOTAL_SPAM_CAUGHT$ erkannt $TOTAL_NONSPAM_CAUGHT$ zugestellt
    $SPAM_ACCURACY$% erkannt $NONSPAM_ERROR_RATE$% nicht erkannt
    Durch Filter verarbeitete Mails $TOTAL_SPAM_LEARNED$ nicht erkannt $TOTAL_NONSPAM_LEARNED$ nicht erkannt
    $TOTAL_SPAM_SCANNED$ erkannt $TOTAL_NONSPAM_SCANNED$ zugestellt
    Korpuszufuhr $TOTAL_SPAM_CORPUSFED$ Einspeisungen $TOTAL_NONSPAM_CORPUSFED$ Einspeisungen

    Zurücksetzen | Optimiere -1

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/Makefile.am0000644000175000017500000000057611622570546022243 0ustar julienjulien# $Id: Makefile.am,v 1.0 2009/11/05 20:22:56 sbajic Exp $ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/nav_preferences.html0000644000175000017500000001331011741353010024213 0ustar julienjulien DSPAM v3 Verwaltungsbereich

    Auf dieser Seite können sie einstellen wie der Filter Nachrichten verarbeiten soll.

    Training - Konfiguration wie der Filter lernen soll, wenn er Mails verarbeitet

    DSPAM soll lernen:

    Bei jeder Nachricht die vom Filter verarbeitet wird
    Nur wenn DSPAM Fehler macht
    Nur bei neuen Nachrichten oder wenn der Filter Fehler macht
      Wenn DSPAM lernt, bevorzueg ich:

    Mails weiter zu leiten die Spam sind (Signatur erscheint in der Mail Nachricht)
    Mails abprallen die Spam sind (Signatur erscheint in den Mail Kopfzeilen)
    DSPAM soll seine Signatur als Dateianhang anhängen

    Filter sensibiltät während der Training Periode:
    SPAM Filtern (mehr Mails in Quarantäne) | | Gut annehmen (weniger Mails in der Quarantäne)

    Nachrichten Abfertigung - Konfiguration wie Spam behandelt wird

    Wenn eine Spam-Nachricht indentifiziert ist:

    Nachricht in Quarantäne verschieben
    Etikettiere den Betreff mit
    Nachricht normal zustellen mit X-DSPAM-Resultat in den Kopfzeilen der Nachricht

    Funktionen - Feinabstimmung der SPAM Filterung

    Aktiviere Geräuschreduzierung, wleche möglicherweise die Filter Genauigkeit anhebt
    Automatisches «Whitelisting» aktivieren um häufige Korrespondenz zu merken
    Die ausschlaggebenden Merkmale der Nachricht in den Mail Kopfzeilen eintragen

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/Makefile.in0000644000175000017500000002610711745313453022250 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.0 2009/11/05 20:22:56 sbajic Exp $ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = webui/cgi-bin/templates/de DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign webui/cgi-bin/templates/de/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign webui/cgi-bin/templates/de/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/nav_analysis.html0000644000175000017500000000354211741353010023543 0ustar julienjulien DSPAM v3 Verwaltungsbereich

    Die Grafiken unten zeigen die Anzahl der verarbeiteten Nachrichten.

    24 Stunden Aktivität - $TS_DAILY$ SPAM, $TI_DAILY$ Gut

    tag

    14 Tage Aktivität - $TS_WEEKLY$ SPAM, $TI_WEEKLY$ Gut

    woche
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/nav_admin_status.html0000644000175000017500000001021111741353010024402 0ustar julienjulien DSPAM v3 Verwaltungsbereich

    Die folgenden Grafiken und Tabellen fassen die Verarbeitung des Filters zusammen.

    Übersicht

    Nachrichten Heute Diese Stunde
    Spam $SPAM_TODAY$ $SPAM_THIS_HOUR$
    Gut $NONSPAM_TODAY$ $NONSPAM_THIS_HOUR$
    Übersehener Spam $SM_TODAY$ $SM_THIS_HOUR$
    Falsch positives Ergebnis $FP_TODAY$ $FP_THIS_HOUR$
    Einimpfungen $INOC_TODAY$ $INOC_THIS_HOUR$
    Korpuszufuhr $CORPUS_TODAY$ $CORPUS_THIS_HOUR$
    Whitelisted $WHITE_TODAY$ $WHITE_THIS_HOUR$
    Virus infiziert $VIRUS_TODAY$ $VIRUS_THIS_HOUR$
    Blacklisted $BLACK_TODAY$ $BLACK_THIS_HOUR$
    Blocklisted $BLOCK_TODAY$ $BLOCK_THIS_HOUR$
    Total $TOTAL_TODAY$ $TOTAL_THIS_HOUR$
    Status Aktueller Wert
    Durchschnittliche Zeit für Nachrichtenverarbeitung $AVG_PROCESSING_TIME$ Sek.
    Durchschnittlicher Durchsatz $AVG_MSG_PER_SECOND$ Nachrichten/Sek.
    DSPAM Instanzen $DSPAM_PROCESSES$ Prozesse
    System Laufzeit $UPTIME$
    Läge der Mail Warteschlange $MAIL_QUEUE$ Nachrichten

    24 Std. Aktivität - $TS_DAILY$ SPAM, $TI_DAILY$ Gut, $SM_DAILY$ Übersehener Spam, $FP_DAILY$ Falsch positives Ergebnis, $INOC_DAILY$ Einimpfungen, $CORPUS_DAILY$ Korpuszufuhr, $WHITE_DAILY$ Whitelisted, $VIRUS_DAILY$ Virus, $BLACK_DAILY$ Blacklisted, $BLOCK_DAILY$ Blocklisted

    tag

    Tages Aktivität - $TS_WEEKLY$ SPAM, $TI_WEEKLY$ Gut, $SM_WEEKLY$ Übersehener Spam, $FP_WEEKLY$ Falsch positives Ergebnis, $INOC_WEEKLY$ Einimpfungen, $CORPUS_WEEKLY$ Korpuszufuhr, $WHITE_WEEKLY$ Whitelisted, $VIRUS_WEEKLY$ Virus, $BLACK_WEEKLY$ Blacklisted, $BLOCK_WEEKLY$ Blocklisted

    woche
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/nav_viewmessage.html0000644000175000017500000000362511741353010024241 0ustar julienjulien DSPAM v3 Verwaltungsbereich

    Weiter unten sehen sie den Inhalt der Nachricht aus der Quarantäne.

    weil sie nicht SPAM ist

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/strings.pl0000755000175000017500000001011611741351001022210 0ustar julienjulien#!/usr/bin/perl # $Id: strings.pl,v 1.03 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . $LANG{'lang_name'} = "Deutsch"; $LANG{'lang_select'} = "Sprache"; $LANG{'empty'} = "Leer"; $LANG{'admin_suite'} = "Administrativer Verwaltungsbereich"; $LANG{'alert_name'} = "Alarm Name"; $LANG{'remove_alert'} = "Entfehrne"; $LANG{'user_form'} = "Statistischer SPAM Schutz für"; $LANG{'user_form_submit'} = "Ändern"; $LANG{'admin_form'} = "Statistischer SPAM Schutz für Administrator"; $LANG{'admin_form_submit'} = "Ändern"; $LANG{'option_disable_filtering'} = "Ausdrückliche Ablehnung der DSPAM Filterung"; $LANG{'option_enable_filtering'} = "Ausdrückliche Zustimmung der DSPAM Filterung"; $LANG{'quarantine_rating'} = "Bewertung"; $LANG{'quarantine_date'} = "Datum"; $LANG{'quarantine_from'} = "Von"; $LANG{'quarantine_subject'} = "Betreff"; $LANG{'history_show'} = "Anzeigen"; $LANG{'history_show_all'} = "alle"; $LANG{'history_show_spam'} = "spam"; $LANG{'history_show_innocent'} = "unschuldig"; $LANG{'history_show_whitelisted'} = "whitelisted"; $LANG{'history_retrain_as_spam'} = "spam"; $LANG{'history_retrain_as_innocent'} = "unschuldig"; $LANG{'history_retrain_as'} = "Als"; $LANG{'history_retrain_undo'} = "Rückgängig"; $LANG{'history_retrained'} = "Umtrainiert"; $LANG{'history_label_resend'} = "Resend"; $LANG{'history_label_whitelist'} = "Whitelist"; $LANG{'history_label_spam'} = "SPAM"; $LANG{'history_label_innocent'} = "Gut"; $LANG{'history_label_miss'} = "Verfehlt"; $LANG{'history_label_virus'} = "Virus"; $LANG{'history_label_RBL'} = "RBL"; $LANG{'history_label_block'} = "BLOCK"; $LANG{'history_label_corpus'} = "Korpus"; $LANG{'history_label_unknown'} = "UNKN"; $LANG{'history_label_error'} = "Fehler"; $LANG{'error_no_historic'} = "Keine historischen Daten vorhanden."; $LANG{'error_cannot_open_log'} = "Kann Protokolldatei nicht öffnen"; $LANG{'error_no_identity'} = "System Fehler. Kann ihre Identität nicht ermitteln."; $LANG{'error_invalid_command'} = "Ungültiger Befehl"; $LANG{'error_cannot_write_prefs'} = "Kann Einstellungen nicht speichern"; $LANG{'error_no_sigid'} = "Keine Nachrichtenkennung angegeben"; $LANG{'error_no_alert_specified'} = "Kein Alarm spezifiziert."; $LANG{'error_message_part1'} = "Der folgende Fehler ist aufgetreten, während versucht wurde ihre Anfrage zu verarbeiten:"; $LANG{'error_message_part2'} = "Wenn dieser Fehler bestehen bleibt, dann kontaktieren sie ihren Administrator."; $LANG{'error_filesystem_scale'} = "Kann nicht Dateisystemskalierung festzustellen"; $LANG{'error_load_default_prefs'} = "Kann vorgabe Werte nicht laden"; $LANG{'error_access_denied'} = "Zugriff verweigert"; $LANG{'graph_legend_x_label_hour'} = "Stunde des Tages"; $LANG{'graph_legend_x_label_date'} = "Datum"; $LANG{'graph_legend_nb_messages'} = "Anzahl der Nachrichten"; $LANG{'graph_legend_spam'} = "SPAM"; $LANG{'graph_legend_good'} = "Gut"; $LANG{'graph_legend_inoculations'} = "Impfungen"; $LANG{'graph_legend_corpusfeds'} = "Korpuszufuhr"; $LANG{'graph_legend_virus'} = "Virus"; $LANG{'graph_legend_RBL'} = "Blacklisted (RBL)"; $LANG{'graph_legend_blocklisted'} = "Blocklisted"; $LANG{'graph_legend_whitelisted'} = "Auto-Whitelisted"; $LANG{'graph_legend_nonspam'} = "Kein Spam"; $LANG{'graph_legend_spam_misses'} = "Spam Verfehlungen"; $LANG{'graph_legend_falsepositives'} = "Falsch positives Ergebnis"; 1; dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/nav_error.html0000644000175000017500000000256411741353010023054 0ustar julienjulien DSPAM v3 Verwaltungsbereich

    Ein Fehler ist aufgetreten

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/nav_alerts.html0000644000175000017500000000370111741353010023207 0ustar julienjulien DSPAM v3 Verwaltungsbereich

    Alarme helfen ihnen Nachrichten in der Quarantänen-Liste zu finden. Wird der Text eines Alarmes in einer Nachricht gefunden, so wird die Spalte hervorgehoben. Dies soll ihnen helfen Nachrichten leicher zu finden die möglicherweise nicht SPAM sind.

    $ALERTS$
     
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/de/nav_admin_preferences.html0000644000175000017500000001330311741353010025365 0ustar julienjulien DSPAM v3 Verwaltungsbereich

    Auf dieser Seite erlaubt ihnen die Einstellungen für jeden Benutzer zu ändern. Sie können auch DSPAM's standard Einstellungen verändern in dem sie das Eingabefeld für den Benutzernamen leer lassen.

    Benutzername:

    $ERROR$

    Training - Konfiguration wie der Filter lernen soll, wenn er Mails verarbeitet

    DSPAM soll lernen:

    Bei jeder Nachricht die vom Filter verarbeitet wird
    Nur wenn DSPAM Fehler macht
    Nur bei neuen Nachrichten oder wenn der Filter Fehler macht
      Wenn DSPAM lernt, bevorzueg ich:

    Mails weiter zu leiten die Spam sind (Signatur erscheint in der Mail Nachricht)
    Mails abprallen die Spam sind (Signatur erscheint in den Mail Kopfzeilen)
    DSPAM soll seine Signatur als Dateianhang anhängen

    Filter sensibiltät während der Training Periode:
    SPAM Filtern (mehr Mails in Quarantäne) | | Davon ausgehen das Mails kein Spam sind (weniger Mails in der Quarantäne)

    Nachrichten Abfertigung - Konfiguration wie Spam behandelt wird

    Wenn eine Spam-Nachricht indentifiziert ist:

    Nachricht in Quarantäne verschieben
    Etikettiere den Betreff mit
    Nachricht normal zustellen mit X-DSPAM-Resultat in den Kopfzeilen der Nachricht

    Funktionen - Feinabstimmung der SPAM Filterung

    Aktiviere Geräuschreduzierung, wleche möglicherweise die Filter Genauigkeit anhebt
    Automatisches «Whitelisting» aktivieren um häufige Korrespondenz zu merken
    Die ausschlaggebenden Merkmale der Nachricht in den Mail Kopfzeilen eintragen

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/Makefile.in0000644000175000017500000002607711745313453021666 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.32 2010/02/05 23:53:42 sbajic Exp $ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = webui/cgi-bin/templates DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign webui/cgi-bin/templates/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign webui/cgi-bin/templates/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/0000755000175000017500000000000011745313533020200 5ustar julienjuliendspam-3.10.2+dfsg/webui/cgi-bin/templates/he/nav_fragment.html0000644000175000017500000000167111622570546023545 0ustar julienjulien DSPAM v3 îøëæ äá÷øä: $SUBJECT$
     
    $SUBJECT$
    $FROM$
    $TIME$ ($INFO$)


     
    $MESSAGE$
    
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/nav_quarantine.html0000644000175000017500000000713511622570546024112 0ustar julienjulien DSPAM v3 îøëæ äá÷øä

    ääåãòåú äðøàåú ìîèä ìà ðùìçå ìúéáú äãåàø ùìê îëéååï ùäï çùåãåú ëãåàø æáì. ìçõ òì ùåøú äðåùà òì îðú ìøàåú àú ääåãòä, àå áçø àôùøåú îéåï. äùúîù áúéáåú äñéîåï åìçöï ùçøø îñåîðéí òì îðú ìùçøø äåãòåú îääñâø, àå äùúîù áìçöï îç÷ äëì òì îðú ìøå÷ï àú ääñâø.

         

    $SORT_QUARANTINE$ $QUARANTINE$
     

         

    îôúç öáòéí: ðé÷åã ðîåê, ðé÷åã áéðåðé, ðé÷åã âáåä

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/nav_admin_error.html0000644000175000017500000000227111622570546024240 0ustar julienjulien DSPAM v3 îòøëú ðéäåì

    àøòä ùâéàä

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/nav_history.html0000644000175000017500000000532511622570546023443 0ustar julienjulien DSPAM v3 îøëæ äá÷øä

    ääåãòåú ùòåáãå áîòøëú ðøàåú ëàï ìîèä. ääåãòåú äàçøåðåú ðøàåú øàùåðåú áøùéîä. äùúîù áàôùøåéåú äìéîåã ìúé÷åï ùâéàåú åìùçøø äåãòåú ùâåéåú îääñâø.

      $SHOW_SELECTOR$ $HISTORY$
    ñåâ ìîã úàøéê/ùòä îàú ðåùà îéãò ðåñó
    $HISTORYPAGES$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/nav_admin_user.html0000644000175000017500000000313711622570546024067 0ustar julienjulien DSPAM v3 îòøëú ðéäåì

    äèáìä äáàä îöéâä àú îñôø ääåãòåú ùòåáãå òáåø ëì îùúîù éçã òí äòãôåú äîùúîù.

    $TABLE$
    ùí áäñâø TP TN FP FN SC IC ùéèä ãåàø æáì BNR çéñåï øâéùåú îé÷åí
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/nav_performance.html0000644000175000017500000000734611622570546024250 0ustar julienjulien DSPAM v3 îøëæ äá÷øä

    àí ÷éáìú äåãòä ùìà æåäúä ðëåï òì éãé äîòøëú ðà äòáø àú ääåãòä àì spam-$REMOTE_USER$$LOCAL_DOMAIN$ òì îðú ùäîòøëú úåëì ììîåã îäùâéàä. äãáø éùôø àú ãéå÷ äîòøëú áòúéã.

    ñèèéñèé÷ú áéöåòéí - $TIME$

    äðãåï   ùéèú çéùåá
    ãéå÷ ëåìì (îäàéôåñ äàçøåï) $OVERALL_ACCURACY$% (äåãòåú æáì ùðòöøå + äåãòåú ú÷éðåú) / îñôø ëåìì ùì ääåãòåú
    æäåé ãåàø æáì (îäàéôåñ äàçøåï) $SPAM_ACCURACY$% (æéäåé ãåàø æáì áìáã)
    éçñ ãåàø æáì (îúåê ñä"ë ùòåáãå) $SPAM_RATIO$% ñä"ë ääåãòåú ãåàø æáì / ñä"ë ääåãòåú
      äåãòåú ãåàø æáì äåãòåú ú÷éðåú
    îäàéôåñ äàçøåï $TOTAL_SPAM_MISSED$ äçèàåú $TOTAL_NONSPAM_MISSED$ äçèàåú
    $TOTAL_SPAM_CAUGHT$ ðòöøå $TOTAL_NONSPAM_CAUGHT$ äåòáøå
    $SPAM_ACCURACY$% ðòöøå $NONSPAM_ERROR_RATE$% äçèàåú
    ñä"ë òåáãå ò"é äîòøëú $TOTAL_SPAM_LEARNED$ äçèàåú $TOTAL_NONSPAM_LEARNED$ äçèàåú
    $TOTAL_SPAM_SCANNED$ ðòöøå $TOTAL_NONSPAM_SCANNED$ äåòáøå
    îîàâø $TOTAL_SPAM_CORPUSFED$ äåæðå $TOTAL_NONSPAM_CORPUSFED$ äåæðå

    àéôåñ | ú÷ï -1

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/Makefile.am0000644000175000017500000000073511622570546022244 0ustar julienjulien# $Id: Makefile.am,v 1.1 2010/07/19 21:15:01 sbajic Exp $ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/nav_preferences.html0000644000175000017500000001106511622570546024241 0ustar julienjulien DSPAM v3 îøëæ äá÷øä

    ëàï ðéúï ìäâãéø ëéöã äîòøëú úèôì áäåãòåú ùìê.

    ìéîåã - äâãø ëéöã äîòøëú ìåîãú úåê ëãé èéôåì áäåãòåú

    DSPAM éìîã:

    îëì äåãòä çãùä äðëðñú ìîòøëú
    ø÷ áî÷øä ùì ùâéàä
    ø÷ áî÷øä ùì ùâéàä àå îéãò çãù
      áæîï äìéîåã àðé îòãéó:

    ìäòáéø àú ääåãòåú (äçúéîä úäéä áâåó ääåãòä)
    ìäçæéø àú ääåãòåú (äçúéîä úäéä áëåúøåú ääåãòä)

    øâéùåú äîòøëú áæîï äìéîåã:
    òöåø ãåàø æáì (éåúø áäñâø) | | ÷ùåç ôçåú (ôçåú áäñâø)

    èéôåì áäåãòåú - äâãø ëéöã ìèôì áãåàø æáì

    ëàùø îæåää ãåàø æáì:

    äëðñ ìäñâø
    ñîï àú ðåùà ääåãòä á-
    ùìç àú ääåãòä ëøâéì åäåñó ëåúøú X-DSPAM-Result header

    úëåðåú - ëéååðåï äîñðï

    $OPTION$ àôùø ñéðåï øòù, äãáø îùôø áãøê ëìì àú éòéìåú äîñðï
    àôùø çéñåï àåèåîèé ùì îëåúáéí úëåôéí
    äåñó àú îàôééðé äñéðåï ùì ëì äåãòä ìëåúøåú ääåãòä

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/Makefile.in0000644000175000017500000002623311745313453022254 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.1 2010/07/19 21:15:01 sbajic Exp $ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = webui/cgi-bin/templates/he DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign webui/cgi-bin/templates/he/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign webui/cgi-bin/templates/he/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/nav_analysis.html0000644000175000017500000000365511622570546023571 0ustar julienjulien DSPAM v3 îøëæ äá÷øä

    âøôéí äîöéâéí àú îñôø ääåãòåú ùòåáãå òì éãé äîòøëú îåöâéí ìîèä.

    ôòéìåú 24 ùòåú - $TS_DAILY$ ãåàø æáì, $TI_DAILY$ ú÷éï

    ôòéìåú 24 ùòåú

    ôòéìåú 14 éåí - $TS_WEEKLY$ ãåàø æáì, $TI_WEEKLY$ ú÷éï

    ôòéìåú 14 éåí
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/nav_admin_status.html0000644000175000017500000000627611622570546024443 0ustar julienjulien DSPAM v3 îòøëú ðéäåì

    äâøôéí åäèáìàåú îöéâéí øéëåæ ùì ôòéìåú äôéìèø

    ëììé

    äåãòåú äéåí áùòä æå
    ãåàø æáì $SPAM_TODAY$ $SPAM_THIS_HOUR$
    ãåàø èåá $NONSPAM_TODAY$ $NONSPAM_THIS_HOUR$
    äçèàåú ãåàø æáì $SM_TODAY$ $SM_THIS_HOUR$
    äçèàåú ãåàø èåá $FP_TODAY$ $FP_THIS_HOUR$
    çéñåðéí $INOC_TODAY$ $INOC_THIS_HOUR$
    ñä"ë $TOTAL_TODAY$ $TOTAL_THIS_HOUR$
    îöá òøê ðåëçé
    æîï òéáåã îîåöò ìäåãòä $AVG_PROCESSING_TIME$ ùðéä
    äñô÷ îîåöò $AVG_MSG_PER_SECOND$ äåãòåú/ù'
    úäìéëé DSPAM $DSPAM_PROCESSES$ úäìéëéí
    æîï ôòéìåú $UPTIME$
    úåø äãåàø $MAIL_QUEUE$ äåãòåú

    ôòéìåú 24 ùòåú - $TS_DAILY$ æáì, $TI_DAILY$ èåá, $SM_DAILY$ äçèàåú æáì, $FP_DAILY$ äçèàåú ãåàø èåá, $INOC_DAILY$ çéñåðéí

    ôòéìåú 24 ùòåú

    ôòéìåú éåîéú - $TS_WEEKLY$ æáì, $TI_WEEKLY$ èåá, $SM_WEEKLY$ äçèàåú æáì, $FP_WEEKLY$ äçèàåú ãåàø èåá, $INOC_WEEKLY$ çéñåðéí

    ôòéìåú éåîéú
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/nav_viewmessage.html0000644000175000017500000000361311622570546024257 0ustar julienjulien DSPAM v3 îøëæ äá÷øä

    ãó æä îöéâ àú úåëï ääñâø.

    îëéååï ùàéðä ãàø æáì

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/strings.pl0000755000175000017500000001164311741351001022222 0ustar julienjulien#!/usr/bin/perl # $Id: strings.pl,v 1.07 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . $LANG{'lang_name'} = "עברית"; $LANG{'lang_select'} = "ùôä"; $LANG{'empty'} = "øé÷"; $LANG{'admin_suite'} = "òøëú ðéäåì"; $LANG{'alert_name'} = "ùí ääúøàä"; $LANG{'remove_alert'} = "äñø"; $LANG{'user_form'} = "îòøëú äâðä ñèèéñèéú òáåø"; $LANG{'user_form_submit'} = "äçìó"; $LANG{'admin_form'} = "îòøëú äâðä ñèèéñèéú òáåø îðäì äîòøëú"; $LANG{'admin_form_submit'} = "äçìó"; $LANG{'option_disable_filtering'} = "äôñ÷ ùéîåù á-DSPAM"; $LANG{'option_enable_filtering'} = "àôùø ùéîåù á-DSPAM"; $LANG{'quarantine_rating'} = "ðé÷åã"; $LANG{'quarantine_date'} = "úàøéê"; $LANG{'quarantine_from'} = "îàú"; $LANG{'quarantine_subject'} = "ðåùà"; $LANG{'history_show'} = "äöâ"; $LANG{'history_show_all'} = "äëì"; $LANG{'history_show_spam'} = "æáì"; $LANG{'history_show_innocent'} = "ú÷éï"; $LANG{'history_show_whitelisted'} = "îçåñï"; $LANG{'history_retrain_as_spam'} = "æáì"; $LANG{'history_retrain_as_innocent'} = "ú÷éï"; $LANG{'history_retrain_as'} = "ë-"; $LANG{'history_retrain_undo'} = "áèì"; $LANG{'history_retrained'} = "ðìîã"; $LANG{'history_label_resend'} = "ðùìç ùåá"; $LANG{'history_label_whitelist'} = "îçåñï"; $LANG{'history_label_spam'} = "ãåàø æáì"; $LANG{'history_label_innocent'} = "ú÷éï"; $LANG{'history_label_miss'} = "äçèàä"; $LANG{'history_label_virus'} = "åéøåñ"; $LANG{'history_label_RBL'} = "øùéîä ùçåøä"; $LANG{'history_label_block'} = "çñåí"; $LANG{'history_label_corpus'} = "îîàâø"; $LANG{'history_label_unknown'} = "ìà éãåò"; $LANG{'history_label_error'} = "ùâéàä"; $LANG{'error_no_historic'} = "ìà ðîöà îéãò äéñèåøé."; $LANG{'error_cannot_open_log'} = "ìà ðéúï ìôúåç àú ÷åáõ ä-ìåâ"; $LANG{'error_no_identity'} = "ùâéàú îòøëú. ìà ðéúï ì÷áåò àú æäåúê."; $LANG{'error_invalid_command'} = "ô÷åãä ìà çï÷éú"; $LANG{'error_cannot_write_prefs'} = "ìà ðéúï ìëúåá àú ääòãôåú"; $LANG{'error_no_sigid'} = "ìà öåééï îöééï äïãòä )MSG ID("; $LANG{'error_no_alert_specified'} = "ìà öåééðä äúøàä."; $LANG{'error_message_part1'} = "äùâéàä äáàä àøòä áæîï òéáåã á÷ùúê:"; $LANG{'error_message_part2'} = "àí áòéä ìà ìà ðòìîú, ðà ôðä ìîðäì äîòøëú."; $LANG{'error_filesystem_scale'} = "ìà ðéúï ì÷áåò àú äâãøú äîòøëú"; $LANG{'error_load_default_prefs'} = "ìà ðéúï ìèòåï àú äòãôåú áøéøú äîçãì"; $LANG{'error_access_denied'} = "äâéùä ðùçúä"; # The text for the legend should be encoded in HTML character entities in order # to be displayed correctly by GD. You should as well set GRAPHS_X_LABEL_FONT, # GRAPHS_Y_LABEL_FONT and GRAPHS_LEGEND_FONT in configure.pl to a TTF font that # is capable to display Hebrew characters. Unfortunately U+202B and U+202C don't # work with GD and you NEED to write all the text backwards since GD does not # know anything about right-to-left page direction. # If you don't know how to convert the characters to be HTML charater entities # then use something like recode (http://recode.progiciels-bpi.ca/) and/or # htmlrecode (http://bisqwit.iki.fi/source/htmlrecode.html). $LANG{'graph_legend_x_label_hour'} = "העש"; $LANG{'graph_legend_x_label_date'} = "ךיראת"; $LANG{'graph_legend_nb_messages'} = "תועדוהה רפסמ"; $LANG{'graph_legend_spam'} = "לבז ראוד"; $LANG{'graph_legend_good'} = "ןיקת"; $LANG{'graph_legend_inoculations'} = "םינוסיח"; $LANG{'graph_legend_corpusfeds'} = "רגאממ"; $LANG{'graph_legend_virus'} = "סוריו"; $LANG{'graph_legend_RBL'} = "הרוחש המישרב"; $LANG{'graph_legend_blocklisted'} = "וםסחנ"; $LANG{'graph_legend_whitelisted'} = "םינסוחמ"; $LANG{'graph_legend_nonspam'} = "ןיקת"; $LANG{'graph_legend_spam_misses'} = "לבז ראוד תואטחה"; $LANG{'graph_legend_falsepositives'} = "ןיקת ראוד תואטחה"; 1; dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/nav_error.html0000644000175000017500000000265311622570546023074 0ustar julienjulien DSPAM v3 îøëæ äá÷øä

    àøòä ùâéàä

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/nav_alerts.html0000644000175000017500000000352111622570546023230 0ustar julienjulien DSPAM v3 îøëæ äá÷øä

    äúøàåú éòæøå ìê ìàúø äåãòåú áäñâø. àí úåëï ääúøàä éîöà áäåãòä, ùåøú ääåãòä úñåîï.

    $ALERTS$

     

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/he/nav_admin_preferences.html0000644000175000017500000001112511622570546025406 0ustar julienjulien DSPAM v3 îòøëú ðéäåì

    ãó æä îàôùø òøéëú äòãôåú òáåø ëì îùúîù. ðéúï ìòøåê àú äòãôåú áøéøú äîçãì òì éãé ðé÷åé ùãä ùí äîùúîù.

    ä÷ù ùí îùúîù:

    $ERROR$

    ìéîåã - äâãø ëéöã äîòøëú ìåîãú úåê ëãé òéáåã äåãòåú

    DSPAM éìîã:

    îëì äåãòä çãùä äðëðñú ìîòøëú
    ø÷ áî÷øä ùì ùâéàä
    ø÷ áî÷øä ùì ùâéàä àå îéãò çãù
      áæîï ìéîåã àðé îòãéó:

    ìäòáéø àú ãåàø äæáì (äçúéîä úåôéò áâåó ääåãòä)
    ìäçæéø àú ãåàø äæáì (äçúéîä úåôéò áëåúøåú ääåãòä)
    ìäåøåú ì-DSPAM ìäåñéó àú äçúéîä ë-öøåôä

    øâéùåú äîòøëú áæîï äìéîåã:
    òöåø ãåàø æáì (éåúø áäñâø) | | ÷ùåç ôçåú (ôçåú áäñâø)

    èéôåì áäåãòåú - äâãø ëéöã ìèôì áãåàø æáì

    When a SPAM message is identified:

    äëðñ ìäñâø
    ñîï àú ðåùà ääåãòä á-
    îñåø àú ääåãòä ëøâéì, äåñó ëåúøú X-DSPAM-Result

    úëåðåú - äâãøú ñéðåï ãåàø æáì

    àôùø ñéðåï øòù, äãáø áãøê ëìì îùôø àú ãéå÷ äñéðåï
    àôùø àéùåø àåèåîèé ùì îëåúáéí úëåôéí
    äåñó àú ëì îàôééðé äñéðåï áëì äåãòä ìëåúøåú äîìàåú ùì ääåãòä

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/nav_analysis.html0000644000175000017500000000364011741353010023152 0ustar julienjulien DSPAM v3 Control Center

    Graphs showing the number of messages that have been processed are shown below.

    24 Hour Activity - $TS_DAILY$ SPAM, $TI_DAILY$ Good

    24 hour activity graph

    14 Day Activity - $TS_WEEKLY$ SPAM, $TI_WEEKLY$ Good

    14 day activity graph
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/nav_admin_status.html0000644000175000017500000001010411741353010024013 0ustar julienjulien DSPAM v3 Administrative Suite

    The following graphs and tables summarize the processing done by the filter.

    Overview

    Messages Today This Hour
    Spam $SPAM_TODAY$ $SPAM_THIS_HOUR$
    Good $NONSPAM_TODAY$ $NONSPAM_THIS_HOUR$
    Spam Misses $SM_TODAY$ $SM_THIS_HOUR$
    False Positives $FP_TODAY$ $FP_THIS_HOUR$
    Inoculations $INOC_TODAY$ $INOC_THIS_HOUR$
    Corpusfeds $CORPUS_TODAY$ $CORPUS_THIS_HOUR$
    Whitelisted $WHITE_TODAY$ $WHITE_THIS_HOUR$
    Virus Infected $VIRUS_TODAY$ $VIRUS_THIS_HOUR$
    Blacklisted $BLACK_TODAY$ $BLACK_THIS_HOUR$
    Blocklisted $BLOCK_TODAY$ $BLOCK_THIS_HOUR$
    Total $TOTAL_TODAY$ $TOTAL_THIS_HOUR$
    Status Current Value
    Average message processing time $AVG_PROCESSING_TIME$ sec.
    Average throughput $AVG_MSG_PER_SECOND$ messages/sec.
    DSPAM instances $DSPAM_PROCESSES$ processes
    System uptime $UPTIME$
    Mail queue length $MAIL_QUEUE$ messages

    24 Hour Activity - $TS_DAILY$ SPAM, $TI_DAILY$ Good, $SM_DAILY$ Spam Misses, $FP_DAILY$ False Positives, $INOC_DAILY$ Inoculations, $CORPUS_DAILY$ Corpusfeds, $WHITE_DAILY$ Whitelisted, $VIRUS_DAILY$ Virus, $BLACK_DAILY$ Blacklisted, $BLOCK_DAILY$ Blocklisted

    24 hour activity graph

    Daily Activity - $TS_WEEKLY$ SPAM, $TI_WEEKLY$ Good, $SM_WEEKLY$ Spam Misses, $FP_WEEKLY$ False Positives, $INOC_WEEKLY$ Inoculations, $CORPUS_WEEKLY$ Corpusfeds, $WHITE_WEEKLY$ Whitelisted, $VIRUS_WEEKLY$ Virus, $BLACK_WEEKLY$ Blacklisted, $BLOCK_WEEKLY$ Blocklisted

    daily activity graph
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/nav_viewmessage.html0000644000175000017500000000357711741353010023657 0ustar julienjulien DSPAM v3 Control Center

    The contents of the message in the quarantine is shown below.

    because it is not SPAM

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/strings.pl0000755000175000017500000000752711741351001021634 0ustar julienjulien#!/usr/bin/perl # $Id: strings.pl,v 1.03 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . $LANG{'lang_name'} = "English"; $LANG{'lang_select'} = "Language"; $LANG{'empty'} = "Empty"; $LANG{'admin_suite'} = "Administrative Suite"; $LANG{'alert_name'} = "Alert Name"; $LANG{'remove_alert'} = "Remove"; $LANG{'user_form'} = "Statistical SPAM Protection for"; $LANG{'user_form_submit'} = "Change"; $LANG{'admin_form'} = "Statistical SPAM Protection for Administrator"; $LANG{'admin_form_submit'} = "Change"; $LANG{'option_disable_filtering'} = "Disable DSPAM filtering"; $LANG{'option_enable_filtering'} = "Enable DSPAM filtering"; $LANG{'quarantine_rating'} = "Rating"; $LANG{'quarantine_date'} = "Date"; $LANG{'quarantine_from'} = "From"; $LANG{'quarantine_subject'} = "Subject"; $LANG{'history_show'} = "Show"; $LANG{'history_show_all'} = "all"; $LANG{'history_show_spam'} = "spam"; $LANG{'history_show_innocent'} = "innocent"; $LANG{'history_show_whitelisted'} = "whitelisted"; $LANG{'history_retrain_as_spam'} = "spam"; $LANG{'history_retrain_as_innocent'} = "innocent"; $LANG{'history_retrain_as'} = "As"; $LANG{'history_retrain_undo'} = "Undo"; $LANG{'history_retrained'} = "Retrained"; $LANG{'history_label_resend'} = "Resend"; $LANG{'history_label_whitelist'} = "Whitelist"; $LANG{'history_label_spam'} = "SPAM"; $LANG{'history_label_innocent'} = "Good"; $LANG{'history_label_miss'} = "Miss"; $LANG{'history_label_virus'} = "Virus"; $LANG{'history_label_RBL'} = "RBL"; $LANG{'history_label_block'} = "BLOCK"; $LANG{'history_label_corpus'} = "Corpus"; $LANG{'history_label_unknown'} = "UNKN"; $LANG{'history_label_error'} = "Error"; $LANG{'error_no_historic'} = "No historical data is available."; $LANG{'error_cannot_open_log'} = "Unable to open logfile"; $LANG{'error_no_identity'} = "System Error. I was unable to determine your identity."; $LANG{'error_invalid_command'} = "Invalid Command"; $LANG{'error_cannot_write_prefs'} = "Unable to write preferences"; $LANG{'error_no_sigid'} = "No Message ID Specified"; $LANG{'error_no_alert_specified'} = "No Alert Specified."; $LANG{'error_message_part1'} = "The following error occured while trying to process your request:"; $LANG{'error_message_part2'} = "If this problem persists, please contact your administrator."; $LANG{'error_filesystem_scale'} = "Unable to determine filesystem scale"; $LANG{'error_load_default_prefs'} = "Unable to load default preferences"; $LANG{'error_access_denied'} = "Access Denied"; $LANG{'graph_legend_x_label_hour'} = "Hour of the day"; $LANG{'graph_legend_x_label_date'} = "Date"; $LANG{'graph_legend_nb_messages'} = "Number of Messages"; $LANG{'graph_legend_spam'} = "SPAM"; $LANG{'graph_legend_good'} = "Good"; $LANG{'graph_legend_inoculations'} = "Inoculations"; $LANG{'graph_legend_corpusfeds'} = "Corpusfeds"; $LANG{'graph_legend_virus'} = "Virus"; $LANG{'graph_legend_RBL'} = "Blacklisted (RBL)"; $LANG{'graph_legend_blocklisted'} = "Blocklisted"; $LANG{'graph_legend_whitelisted'} = "Auto-Whitelisted"; $LANG{'graph_legend_nonspam'} = "Nonspam"; $LANG{'graph_legend_spam_misses'} = "Spam Misses"; $LANG{'graph_legend_falsepositives'} = "False Positives"; 1; dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/0000755000175000017500000000000011745313533020630 5ustar julienjuliendspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/nav_fragment.html0000644000175000017500000000126011622570546024167 0ustar julienjulien DSPAM v3 Centro de Controle: $SUBJECT$
     
    $SUBJECT$
    $FROM$
    $TIME$ ($INFO$)


     
    $MESSAGE$
    
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/nav_quarantine.html0000644000175000017500000000734011622570546024540 0ustar julienjulien DSPAM v3 Control Center

    As mensagens abaixo não foram entregues em sua caixa postal normal porque foram classificadas como spam. Clique no Assunto para ver a mensagem ou escolha uma forma de ordenamento diferente (clicando no nome de cada coluna). Use as caixas de seleção e o botão Deliver Checked para despachar as mensagens que você quer ler, ou use Delete All para esvaziar a quarentena.

         

    $SORT_QUARANTINE$ $QUARANTINE$
     

         

    Classificação do SPAM de acordo com as cores: Baixo Índice, Médio Índice, Alto Índice

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/nav_admin_error.html0000644000175000017500000000201611622570546024665 0ustar julienjulien DSPAM v3 Suite Administrativa

    Ocorreu um Erro

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/nav_history.html0000644000175000017500000000525311622570546024073 0ustar julienjulien DSPAM v3 Centro de Controle

    As mensagens que foram processadas pelo filtro são exibidas abaixo. As mais recentes são mostradas primeiro.
    Use a opção retreinar para corrigir erros e despachar qualquer falso positivo que ainda esteja na quarentena.

      $SHOW_SELECTOR$ $HISTORY$
    Tipo Retreinar Dia/Hora De Assunto Informação Adicional
    $HISTORYPAGES$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/nav_admin_user.html0000644000175000017500000000275611622570546024525 0ustar julienjulien DSPAM v3 Suite Administrativa

    A tabela abaixo mostra o número de mensagens processadas para cada usuário com suas preferências atuais.

    $TABLE$
    Nome Tam.Fila TP TN FP FN SC IC Modo Qdo.Spam BNR Lista Branca Sed. Loc. Ass.
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/nav_performance.html0000644000175000017500000000751211622570546024673 0ustar julienjulien DSPAM v3 Centro de Controle

    Se você recebeu um e-mail que nã foi capturado pelo filtro, por favor encaminhe para spam-$REMOTE_USER$$LOCAL_DOMAIN$ para que ele seja analisado e aprendido como SPAM. Isso irá melhorar a precisão do filtro no futuro.

    Estatísticas de Performance - $TIME$

    Métrica   Calculado como
    Precisão Geral (desde o último reset) $OVERALL_ACCURACY$% (SPAMs capturados + mensagens Inocentes entregues) / Número total de mensagens
    Spams identificados (desde o último reset) $SPAM_ACCURACY$% (Apenas taxa de captura de SPAM)
    Taxa de spam (do total processado) $SPAM_RATIO$% Total de SPAMs (caputados & perdidos) / Número total de mensagens
      SPAMs E-mails Inocentes
    Desde o último reset $TOTAL_SPAM_MISSED$ perdidos $TOTAL_NONSPAM_MISSED$ perdidos
    $TOTAL_SPAM_CAUGHT$ capturados $TOTAL_NONSPAM_CAUGHT$ entregues
    $SPAM_ACCURACY$% capturados $NONSPAM_ERROR_RATE$% perdidos
    Total processado pelo filtro $TOTAL_SPAM_LEARNED$ perdidos $TOTAL_NONSPAM_LEARNED$ perdidos
    $TOTAL_SPAM_SCANNED$ capturados $TOTAL_NONSPAM_SCANNED$ entregues
    Da Ger. Corpus $TOTAL_SPAM_CORPUSFED$ alimentados $TOTAL_NONSPAM_CORPUSFED$ alimentados

    Reset | Tweak -1

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/Makefile.am0000644000175000017500000000057611622570546022677 0ustar julienjulien# $Id: Makefile.am,v 1.0 2009/11/05 20:22:56 sbajic Exp $ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/nav_preferences.html0000644000175000017500000001136611622570546024675 0ustar julienjulien DSPAM v3 Centro de Controle

    Esta página permite que você configure como o filtro trata suas mensagens.

    Treinamento - Configura como o filtro aprende e processa suas mensagens

    DSPAM deve aprender:

    Com cada nova mensagem processada pelo filtro
    Apenas quando o filtro comete um engano
    Com algumas novas mensagens ou quando o filtro comete um engano
      Para treinar o DSPAM, eu prefiro:

    Encaminhar meus spams (assinatura no corpo da mensgem)
    Colocar meus spams em quarentena (assinatura no cabeçalho da mensagem)

    Sensibilidade do filtro durante o período de treinamento:
    Captura SPAM (Mais em Quarentena) | | Presume Inocente (Poucos em Quarentena)

    Tratamento de mensagens - Configura como o SPAM é tratado

    Quando um SPAM é identificado:

    Colocar a mensagem em quarentena
    Etiquetar o campo Assunto com:
    Entregar a mensagem normalmente adicionando X-DSPAM-Result no cabeçalho

    Características - Ajustando filtragem de SPAM

    $OPTION$ Habilita redução de ruído, que geralmente melhora a precisão do filtro
    Habilita listas brancas automáticas para correspondências freqüentes
    Adiciona tokens no cabeçalho de cada mensagem

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/Makefile.in0000644000175000017500000002612011745313453022677 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.0 2009/11/05 20:22:56 sbajic Exp $ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = webui/cgi-bin/templates/pt-br DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign webui/cgi-bin/templates/pt-br/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign webui/cgi-bin/templates/pt-br/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/nav_analysis.html0000644000175000017500000000330411622570546024210 0ustar julienjulien DSPAM v3 Centro de Controle

    Gráficos mostrando o número de mensagens processadas.

    Atividade em 24 horas - $TS_DAILY$ SPAM, $TI_DAILY$ Good

    Atividade em 14 dias - $TS_WEEKLY$ SPAM, $TI_WEEKLY$ Good

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/nav_admin_status.html0000644000175000017500000000777311622570546025076 0ustar julienjulien DSPAM v3 Suite Administrativa

    Os gráficos e tables abaixo resumem o processamento feito pelo filtro.

    Visão Geral

    Mensagens Hoje Esta hora
    Spam $SPAM_TODAY$ $SPAM_THIS_HOUR$
    Inocentes $NONSPAM_TODAY$ $NONSPAM_THIS_HOUR$
    Spams Perdidos $SM_TODAY$ $SM_THIS_HOUR$
    Falsos Positivos $FP_TODAY$ $FP_THIS_HOUR$
    Inoculações $INOC_TODAY$ $INOC_THIS_HOUR$
    Ger. Corpus $CORPUS_TODAY$ $CORPUS_THIS_HOUR$
    Lista Branca $WHITE_TODAY$ $WHITE_THIS_HOUR$
    Vírus $VIRUS_TODAY$ $VIRUS_THIS_HOUR$
    Lista Negra $BLACK_TODAY$ $BLACK_THIS_HOUR$
    Bloqueados $BLOCK_TODAY$ $BLOCK_THIS_HOUR$
    Total $TOTAL_TODAY$ $TOTAL_THIS_HOUR$
    Status Valor Atual
    Tempo médio de processamento por mensagem $AVG_PROCESSING_TIME$ sec.
    Vazão média $AVG_MSG_PER_SECOND$ mensagens/sec.
    Instâncias do DSPAM $DSPAM_PROCESSES$ processos
    Tempo ativo $UPTIME$
    Tamanho das filas de e-mail $MAIL_QUEUE$ mensagens

    Atividade em 24 horas - $TS_DAILY$ SPAM, $TI_DAILY$ Bons, $SM_DAILY$ Spams Perdidos, $FP_DAILY$ Falsos Positivos, $INOC_DAILY$ Inoculações, $CORPUS_DAILY$ Ger. Corpus, $WHITE_DAILY$ Lista Branca, $VIRUS_DAILY$ Vírus, $BLACK_DAILY$ Lista Negra, $BLOCK_DAILY$ Bloqueados

    Atividade diária - $TS_WEEKLY$ SPAM, $TI_WEEKLY$ Bons, $SM_WEEKLY$ Spam Perdidos, $FP_WEEKLY$ Falsos Positivos, $INOC_WEEKLY$ Inoculações, $CORPUS_WEEKLY$ Ger. Corpus, $WHITE_WEEKLY$ Lista Branca, $VIRUS_WEEKLY$ Vírus, $BLACK_WEEKLY$ Lista Negra, $BLOCK_WEEKLY$ Bloqueados

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/nav_viewmessage.html0000644000175000017500000000343611622570546024712 0ustar julienjulien DSPAM v3 Control Center

    O conteúdo da mensagem em quarentena é mostrado abaixo.

    Clique no botão ao lado para entregar a mensagem se ela não for SPAM.

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/strings.pl0000755000175000017500000000773411741351001022660 0ustar julienjulien#!/usr/bin/perl # $Id: strings.pl,v 1.03 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . $LANG{'lang_name'} = "Português brasileiro"; $LANG{'lang_select'} = "Língua"; $LANG{'empty'} = "Vazio"; $LANG{'admin_suite'} = "Suite Administrativa"; $LANG{'alert_name'} = "Nome em Alerta"; $LANG{'remove_alert'} = "Remover"; $LANG{'user_form'} = "Proteção Estatística para"; $LANG{'user_form_submit'} = "Trocar"; $LANG{'admin_form'} = "Proteção Estatística para Administrador"; $LANG{'admin_form_submit'} = "Trocar"; $LANG{'option_disable_filtering'} = " Desabilita DSPAM"; $LANG{'option_enable_filtering'} = " Habilita DSPAM"; $LANG{'quarantine_rating'} = "Índice"; $LANG{'quarantine_date'} = "Data"; $LANG{'quarantine_from'} = "De"; $LANG{'quarantine_subject'} = "Assunto"; $LANG{'history_show'} = "Mostrar"; $LANG{'history_show_all'} = "todas"; $LANG{'history_show_spam'} = "spam"; $LANG{'history_show_innocent'} = "inocente"; $LANG{'history_show_whitelisted'} = "lista branca"; $LANG{'history_retrain_as_spam'} = "spam"; $LANG{'history_retrain_as_innocent'} = "inocente"; $LANG{'history_retrain_as'} = "Como"; $LANG{'history_retrain_undo'} = "Desfazer"; $LANG{'history_retrained'} = "Retreinado"; $LANG{'history_label_resend'} = "Reenviado"; $LANG{'history_label_whitelist'} = "Lista Branca"; $LANG{'history_label_spam'} = "SPAM"; $LANG{'history_label_innocent'} = "Inocente"; $LANG{'history_label_miss'} = "Perdido"; $LANG{'history_label_virus'} = "Vírus"; $LANG{'history_label_RBL'} = "RBL"; $LANG{'history_label_block'} = "BLOQUEADO"; $LANG{'history_label_corpus'} = "Ger. Corpus"; $LANG{'history_label_unknown'} = "DESC"; $LANG{'history_label_error'} = "Erro"; $LANG{'error_no_historic'} = "Nenhum dado historico dispoiível"; $LANG{'error_cannot_open_log'} = "Incapaz de abrir log"; $LANG{'error_no_identity'} = "Erro de Sistema. Nao fui capaz de identifiaá-lo."; $LANG{'error_invalid_command'} = "Comando Invalido"; $LANG{'error_cannot_write_prefs'} = "Incapaz de salvar preferencias"; $LANG{'error_no_sigid'} = "ID da Mensagem nao especificado"; $LANG{'error_no_alert_specified'} = "Nenhum Alerta especificado."; $LANG{'error_message_part1'} = "Ocorreu o seguinte erro enquanto tentava processar sua requisicaão:"; $LANG{'error_message_part2'} = "Se este problema persistir, contate seu administrador."; $LANG{'error_filesystem_scale'} = "Incapaz de determinar o tamanho do sistema de arquivos"; $LANG{'error_load_default_prefs'} = "Incapaz de carregar preferencias padrao"; $LANG{'error_access_denied'} = "Acesso Negado"; $LANG{'graph_legend_x_label_hour'} = "Hora do dia"; $LANG{'graph_legend_x_label_date'} = "Data"; $LANG{'graph_legend_nb_messages'} = "Numero de Mensagens"; $LANG{'graph_legend_spam'} = "SPAM"; $LANG{'graph_legend_good'} = "Inocentes"; $LANG{'graph_legend_inoculations'} = "Inoculacoes"; $LANG{'graph_legend_corpusfeds'} = "Treino Base"; $LANG{'graph_legend_virus'} = "Virus"; $LANG{'graph_legend_RBL'} = "Lista Negra (RBL)"; $LANG{'graph_legend_blocklisted'} = "Bloqueadas"; $LANG{'graph_legend_whitelisted'} = "Auto-Lista Branca"; $LANG{'graph_legend_nonspam'} = "Nao spam"; $LANG{'graph_legend_spam_misses'} = "Spams Perdidos"; $LANG{'graph_legend_falsepositives'} = "Falsos Positivos"; 1; dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/nav_error.html0000644000175000017500000000235011622570546023516 0ustar julienjulien DSPAM v3 Centro de Controle

    Ocorreu um Erro

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/nav_alerts.html0000644000175000017500000000342011622570546023656 0ustar julienjulien DSPAM v3 Centro de Controle

    Alertas auxilíam na localização de mensagens em quarentena. Se o texto do alerta for encontrado na mensagem, sua coluna será destacada, ajudando a identificar aquelas que podem não ser SPAM.

    $ALERTS$

     

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/pt-br/nav_admin_preferences.html0000644000175000017500000001153711622570546026045 0ustar julienjulien DSPAM v3 Suite Administrativa

    Esta página permite a edição de preferências para qualquer usuário. Também é possível editar as preferências padrão deixando os campos vazios.

    Nome do usuário:

    $ERROR$

    Treinamento - Configura como o filtro aprende e processa mensagens

    DSPAM deve aprender:

    Com cada nova mensagem processada pelo filtro
    Apenas quando o filtro comete um engano
    Apenas com novas mensagens ou quando o filtro comete um engano
      Quando treinar o DSPAM, eu prefiro:

    Encaminhar meus spams (assinatura no corpo da mensgem)
    Colocar meus spams em quarentena (assinatura no cabeçalho da mensagem)
    Que o DSPAM adicione a assinatura como um anexo

    Sensibilidade do filtro durante o período de treinamento:
    Captura SPAM (Mais em Quarentena) | | Presume Inocente (Poucos em Quarentena)

    Tratamento de mensagens - Configura como o SPAM é tratado

    Quando um SPAM é identificado:

    Colocar a mensagem em quarentena
    Etiquetar o campo Assunto com:
    Entregar a mensagem normalmente adicionando X-DSPAM-Result no cabeçalho

    Características - Ajustando filtragem de SPAM

    Habilita redução de ruído, que geralmente melhora a precisão do filtro
    Habilita listas brancas automáticas para correspondências freqüentes
    Adiciona tokens no cabeçalho de cada mensagem

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/nav_error.html0000644000175000017500000000261711741353010022463 0ustar julienjulien DSPAM v3 Control Center

    An Error Has Occured

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/0000755000175000017500000000000011745313532020212 5ustar julienjuliendspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/nav_fragment.html0000644000175000017500000000161511741353010023541 0ustar julienjulien DSPAM v3 - Centre de contrôle: $SUBJECT$
     
    $SUBJECT$
    $FROM$
    $TIME$ ($INFO$)


     
    $MESSAGE$
    
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/nav_quarantine.html0000644000175000017500000001071111741353010024102 0ustar julienjulien DSPAM v3 - Centre de contrôle

    Les messages ci-dessous n'ont pas été distribués version votre application de messagerie car ils ont étés considérés comme pourriels probables. Cliquez sur l'object pour voir un message, ou choisissez une option de tri pour modifier la façon sont sont triés les messages. Utilisez les case à cocher Distribuer les messages sélectionnés pour distribuer les messages que vous souhaitez lire, ou utilisez Supprimer tous les messages pour vider la zone de quarantaine.

         

    $SORT_QUARANTINE$ $QUARANTINE$
     

         

    Code couleurs : Score faible, Score moyen, Score élevé

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/nav_admin_error.html0000644000175000017500000000237611741353010024244 0ustar julienjulien DSPAM v3 - Administration

    Une erreur s'est produite

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/nav_history.html0000644000175000017500000000615111741353010023437 0ustar julienjulien DSPAM v3 - Centre de contrôle

    Les messages analysés par le filtre sont affichés ci-dessous. Les messages les plus récents sont affichés en premier. Utilisez les options d'apprentissage pour corriger les erreurs et distribuer les faux positifs qui sont placés en zone de quarantaine.

      $SHOW_SELECTOR$ $HISTORY$
    Type Apprentissage Date/Heure Expéditeur Objet Informations complémentaires
    $HISTORYPAGES$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/nav_admin_user.html0000644000175000017500000000337011741353010024064 0ustar julienjulien DSPAM v3 - Administration

    Le tableau ci-dessous montre le nombre de messages analysés pour chaque utilisateur, ainsi que leurs préférences acutelles.

    $TABLE$
    Nom d'utilisateur Taille quarantaine TP TN FP FN SC IC Mode On Spam BNR Whitelist Sed Sig Loc
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/nav_performance.html0000644000175000017500000001055511741353010024242 0ustar julienjulien DSPAM v3 - Centre de contrôle

    Si vous recevez un message dans votre application de messagerie qui n'a pas été intercepté par le filtre, transférez le à spam-$REMOTE_USER$$LOCAL_DOMAIN$ de façon à ce que le filtre l'analyse. Cela améliorera les performances du filtre dans le futur.

    Statistiques des performances - $TIME$

    Données   Méthode de calcul
    Performance générale (depuis la dernière réinitialisation) $OVERALL_ACCURACY$% (Nombre de pourriels filtrés + Nombre de messages légitime distribués) / Nombre total de messages
    Identification des pourriels (depuis la dernière réinitialisation) $SPAM_ACCURACY$% (Taux de filtrage des pourriels uniquement)
    Ratio de pourriels (sur le total analysé) $SPAM_RATIO$% Total de pourriels (attrapés et manqués) / Nombre total de messages
      Pourriels Messages légitimes
    Depuis la dernière réinitialisation $TOTAL_SPAM_MISSED$ manqués $TOTAL_NONSPAM_MISSED$ manqués
    $TOTAL_SPAM_CAUGHT$ attrapés $TOTAL_NONSPAM_CAUGHT$ distribués
    $SPAM_ACCURACY$% attrapés $NONSPAM_ERROR_RATE$% manqués
    Total analysé par le filtre $TOTAL_SPAM_LEARNED$ manqués $TOTAL_NONSPAM_LEARNED$ manqués
    $TOTAL_SPAM_SCANNED$ attrapés $TOTAL_NONSPAM_SCANNED$ distribués
    Depuis le corpus $TOTAL_SPAM_CORPUSFED$ envoyés $TOTAL_NONSPAM_CORPUSFED$ envoyés

    Réinitalisation | Ajustement -1

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/Makefile.am0000644000175000017500000000073611622570546022260 0ustar julienjulien# $Id: Makefile.am,v 1.01 2009/11/04 01:45:35 sbajic Exp $ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/nav_preferences.html0000644000175000017500000001275311741353010024244 0ustar julienjulien DSPAM v3 - Centre de contrôle

    Cette page vous permet de configurer la façon dont le filtre gère vos messages.

    Apprentissage - Configure la façon dont le filtre apprend lors de l'analyse des messages

    DSPAM doit apprendre :

    À chaque message analysé par le filtre
    Seulement lorsque le filtre commet une erreur
    Seulement lors de nouvelles données ou lorsque le filtre commet une erreur
      Lorsque j'entraine DSPAM, je préfère :

    transférer les pourriels reçus (la signature apperaît dans le corps du message)
    transférer les pourriels reçus en tant que pièce jointe (la signature apparaît dans les en-têtes du messages)

    Sensibilité du filtre pendant la période d'apprentissage :
    Haute sensibilité (plus de pourriels seront placé en quarantaine) | | Faible sensibilité (plus de messages seront considérés comme légitimes et moins seront placés en quarantaine)

    Gestion des messages - Configure la façon dont sont gérés les pourriels

    Lorsqu'un pourriel est identifié :

    Mettre le message en quarantaine
    Ajouter l'étiquette à l'objet du message
    Distribuer le message normalement en ajoutant une en-tête X-DSPAM-Result

    Fonctionnalités - Ajustement du filtrage

    $OPTION$ Activer la réduction du bruit, qui améliore généralement les performances de filtrage
    Activer la mise en liste blanche automatique des correspondants réguliers
    Ajouter les jetons de factorisation dans les en-têtes des messages

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/Makefile.in0000644000175000017500000002623411745313453022270 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.01 2009/11/04 01:45:35 sbajic Exp $ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = webui/cgi-bin/templates/fr DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign webui/cgi-bin/templates/fr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign webui/cgi-bin/templates/fr/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/nav_analysis.html0000644000175000017500000000422711741353010023563 0ustar julienjulien DSPAM v3 - Centre de contrôle

    Des graphiques montrant le nombre de messages analysé sont affichés ci-dessous.

    Activité sur 24 heures - $TS_DAILY$ pourriels, $TI_DAILY$ légitimes

    Graphique de l'activité sur 24 heures

    Activité sur 14 jours - $TS_WEEKLY$ pourriels, $TI_WEEKLY$ légitimes

    Graphique de l'activité sur 14 jours
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/nav_admin_status.html0000644000175000017500000001071311741353010024430 0ustar julienjulien DSPAM v3 - Administration

    Les graphiques et les tableaux ci-dessous résument les analyses effectuées par le filtre.

    Vue d'ensemble

    Messages Aujourd'hui Cette heure
    Pourriels $SPAM_TODAY$ $SPAM_THIS_HOUR$
    Lessages légitimes $NONSPAM_TODAY$ $NONSPAM_THIS_HOUR$
    Pourriels manqués $SM_TODAY$ $SM_THIS_HOUR$
    Faux positifs $FP_TODAY$ $FP_THIS_HOUR$
    Inoculations $INOC_TODAY$ $INOC_THIS_HOUR$
    Depuis le corpus $CORPUS_TODAY$ $CORPUS_THIS_HOUR$
    Mis en liste blanche $WHITE_TODAY$ $WHITE_THIS_HOUR$
    Messages infectés $VIRUS_TODAY$ $VIRUS_THIS_HOUR$
    Mis en liste noire $BLACK_TODAY$ $BLACK_THIS_HOUR$
    RBL $BLOCK_TODAY$ $BLOCK_THIS_HOUR$
    Total $TOTAL_TODAY$ $TOTAL_THIS_HOUR$
    État Valeur actuelle
    Temps moyen d'analyse par message $AVG_PROCESSING_TIME$ sec.
    Débit moyen $AVG_MSG_PER_SECOND$ messages/sec.
    Nombre d'instances DSPAM $DSPAM_PROCESSES$ processus
    Uptime système $UPTIME$
    Taille de la file d'attente $MAIL_QUEUE$ message(s)

    Activité sur 24 heures - $TS_DAILY$ pourriel(s), $TI_DAILY$ message(s) légitime(s), $SM_DAILY$ pourriel(s) manqué(s), $FP_DAILY$ faux positif(s), $INOC_DAILY$ inoculation(s), $CORPUS_DAILY$ depuis le corpus, $WHITE_DAILY$ mis en liste de blanche, $VIRUS_DAILY$ infecté(s), $BLACK_DAILY$ mis en liste noire, $BLOCK_DAILY$ RBL

    Graphique de l'activité sur 24 heures

    Activité journalière - $TS_DAILY$ pourriel(s), $TI_DAILY$ message(s) légitime(s), $SM_DAILY$ pourriel(s) manqué(s), $FP_DAILY$ faux positif(s), $INOC_DAILY$ inoculation(s), $CORPUS_DAILY$ depuis le corpus, $WHITE_DAILY$ mis en liste de blanche, $VIRUS_DAILY$ infecté(s), $BLACK_DAILY$ mis en liste noire, $BLOCK_DAILY$ RBL

    Graphique de l'activité journaliè
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/nav_viewmessage.html0000644000175000017500000000361311741353010024255 0ustar julienjulien DSPAM v3 - Centre de contrôle

    The contents of the message in the quarantine is shown below.

    because it is not SPAM

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/strings.pl0000755000175000017500000001171511741351001022235 0ustar julienjulien#!/usr/bin/perl # $Id: strings.pl,v 1.03 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . $LANG{'lang_name'} = "Français"; $LANG{'lang_select'} = "Langue"; $LANG{'empty'} = "Vide"; $LANG{'admin_suite'} = "Administration"; $LANG{'alert_name'} = "Nom de l'alerte"; $LANG{'remove_alert'} = "Supprimer"; $LANG{'user_form'} = "Centre de contrôle DSPAM pour"; $LANG{'user_form_submit'} = "Changer"; $LANG{'admin_form'} = "Centre de contrôle DSPAM pour Administrateur"; $LANG{'admin_form_submit'} = "Changer"; $LANG{'option_disable_filtering'} = "Désactiver le filtre DSPAM"; $LANG{'option_enable_filtering'} = "Activer le filtre DSPAM"; $LANG{'quarantine_rating'} = "Score"; $LANG{'quarantine_date'} = "Date"; $LANG{'quarantine_from'} = "Expéditeur"; $LANG{'quarantine_subject'} = "Objet"; $LANG{'history_show'} = "Afficher "; $LANG{'history_show_all'} = "tous"; $LANG{'history_show_spam'} = "pourriels"; $LANG{'history_show_innocent'} = "légitimes"; $LANG{'history_show_virus'} = "virus"; $LANG{'history_show_whitelisted'} = "mis en liste blanche"; $LANG{'history_retrain_as_spam'} = "pourriel"; $LANG{'history_retrain_as_innocent'} = "légitime"; $LANG{'history_retrain_as'} = "comme"; $LANG{'history_retrained'} = "Ré-analysé"; $LANG{'history_retrain_undo'} = "défaire"; $LANG{'history_label_resend'} = "Renvoi"; $LANG{'history_label_whitelist'} = "Liste blanche"; $LANG{'history_label_spam'} = "Pourriel"; $LANG{'history_label_innocent'} = "Légitime"; $LANG{'history_label_miss'} = "Manqué"; $LANG{'history_label_virus'} = "Virus"; $LANG{'history_label_RBL'} = "RBL"; $LANG{'history_label_block'} = "Bloqué"; $LANG{'history_label_corpus'} = "Corpus"; $LANG{'history_label_unknown'} = "Inconnu"; $LANG{'history_label_error'} = "Erreur"; $LANG{'error_no_historic'} = "Aucune donnée d'historique n'est disponible."; $LANG{'error_cannot_open_log'} = "Impossible d'ouvrir le journal"; $LANG{'error_no_identity'} = "Erreur système. Impossible de déterminer votre identité."; $LANG{'error_invalid_command'} = "Commande invalide"; $LANG{'error_cannot_write_prefs'} = "Impossible d'enregistrer les préférences"; $LANG{'error_no_sigid'} = "Aucun identifiant de message n'a été spécifié"; $LANG{'error_no_alert_specified'} = "Aucune alerte spécifiée."; $LANG{'error_message_part1'} = "L'erreur suivante s'est produite pendant le traitement de votre requête :"; $LANG{'error_message_part2'} = "Si le problème persiste, contactez votre administrateur."; $LANG{'error_filesystem_scale'} = "Impossible de déterminer l'organisation du système de fichiers"; $LANG{'error_load_default_prefs'} = "Impossible de charger les préférences par défaut."; $LANG{'error_access_denied'} = "Accès interdit"; $LANG{'graph_legend_x_label_hour'} = "Heure du jour"; $LANG{'graph_legend_x_label_date'} = "Date"; $LANG{'graph_legend_nb_messages'} = "Nombre de messages"; $LANG{'graph_legend_spam'} = "Pourriels"; $LANG{'graph_legend_good'} = "Messages legitimes"; $LANG{'graph_legend_inoculations'} = "Inoculations"; $LANG{'graph_legend_corpusfeds'} = "Depuis le corpus"; $LANG{'graph_legend_virus'} = "Virus"; $LANG{'graph_legend_RBL'} = "RBL"; $LANG{'graph_legend_blocklisted'} = "Mis en liste noire"; $LANG{'graph_legend_whitelisted'} = "Mis en liste blanche"; $LANG{'graph_legend_nonspam'} = "Messages legitimes"; $LANG{'graph_legend_spam_misses'} = "Pourriels manques"; $LANG{'graph_legend_falsepositives'} = "Faux positifs"; 1; dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/nav_error.html0000644000175000017500000000302611741353010023065 0ustar julienjulien DSPAM v3 - Centre de contrôle

    Une erreur s'est produite

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/nav_alerts.html0000644000175000017500000000414211741353010023226 0ustar julienjulien DSPAM v3 - Centre de contrôle

    Les alertes vous aident à localiser les messages dans la zone de quarantaine. Si le texte d'une alerte est repéré dans un message, la ligne correspondante sera mise en valeur, vous aidant à identifier les messages qui pourraient ne pas être des pourriels.

    $ALERTS$
     
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/fr/nav_admin_preferences.html0000644000175000017500000001322211741353010025404 0ustar julienjulien DSPAM v3 - Administration

    Cette page vous permet d'éditer les préférences de n'importe quel utilisateur. Vous avez également la possibilité d'éditer les préférences par défaut de DSPAM en laissant le champ de saisie vide.

    Nom d'utilisateur :

    $ERROR$

    Apprentissage - Configure la façon dont le filtre apprend lors de l'analyse des messages

    DSPAM doit apprendre :

    À chaque message analysé par le filtre
    Seulement lorsque le filtre commet une erreur
    Seulement lors de nouvelles données ou lorsque le filtre commet une erreur
      Lorsque j'entraine DSPAM, je préfère :

    transférer les pourriels reçus (la signature apperaît dans le corps du message)
    transférer les pourriels reçus en tant que pièce jointe (la signature apparaît dans les en-têtes du messages)
    laisser DSPAM joindre sa signature en tant que pièce jointe

    Sensibilité du filtre pendant la période d'apprentissage :
    Haute sensibilité (plus de pourriels seront placé en quarantaine) | | Faible sensibilité (plus de messages seront considérés comme légitimes et moins seront placés en quarantaine)

    Gestion des messages - Configure la façon dont sont gérés les pourriels

    Lorsqu'un pourriel est identifié :

    Mettre le message en quarantaine
    Ajouter l'étiquette à l'objet du message
    Distribuer le message normalement en ajoutant une en-tête X-DSPAM-Result

    Fonctionnalités - Ajustement du filtrage

    Activer la réduction du bruit, qui améliore généralement les performances de filtrage
    Activer la mise en liste blanche automatique des correspondants réguliers
    Ajouter les jetons de factorisation dans les en-têtes des messages

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/nav_alerts.html0000644000175000017500000000362011741353010022617 0ustar julienjulien DSPAM v3 Control Center

    Alerts will help you locate messages in the Quarantine list. If the text of the alert is found in a message, its row will be highlighted, helping you to identify messages that might not be SPAM.

    $ALERTS$
     
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/nav_admin_preferences.html0000644000175000017500000001225411741353010025001 0ustar julienjulien DSPAM v3 Administrative Suite

    This page lets you edit the preferences for any user. You can also edit DSPAM's default preferences by leaving the input field empty.

    Enter user name:

    $ERROR$

    Training - Configure how the filter learns as it processes messages

    DSPAM should train:

    On every new message scanned by the filter
    Only when the filter makes a mistake
    Only with new data or if the filter makes a mistake
      When I train DSPAM, I prefer:

    To forward my spams (signature appears in message body)
    To bounce my spams (signature appears in message headers)
    To have DSPAM add its signature as an attachment

    Filter sensitivity during the training period:
    Catch SPAM (More in Quarantine) | | Assume Good (Fewer in Quarantine)

    Message Handling - Configure how SPAM is handled

    When a SPAM message is identified:

    Quarantine the message
    Tag the Subject header with
    Deliver the message normally with a X-DSPAM-Result header

    Features - Tuning SPAM filtering

    Enable noise reduction, which usually improves filtering accuracy
    Enable automatic whitelisting to record frequent correspondence
    Add the factoring tokens in each email into the message's full headers

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/0000755000175000017500000000000011745313532020617 5ustar julienjuliendspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/nav_fragment.html0000644000175000017500000000125711622570546024165 0ustar julienjulien DSPAM v3 Centro de Control: $SUBJECT$
     
    $SUBJECT$
    $FROM$
    $TIME$ ($INFO$)


     
    $MESSAGE$
    
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/nav_quarantine.html0000644000175000017500000000740411622570546024531 0ustar julienjulien DSPAM v3 Centro de Control

    Los mensajes siguientes no se han entregado al cliente de email final porque el filtro los ha identificado como spam. Pincha en el asunto para ver el contenido o elige un criterio para ordenar los mensajes. Marca los mensajes y luego usa las opciones para entregar los mensajes al cliente final, o Eliminar TODOS para vaciar la cuarentena.

         

    $SORT_QUARANTINE$ $QUARANTINE$
     

         

    Llave de color: Menor probabilidad de que sea spam, Probabilidad intermedia, Muy alta probabilidad

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/nav_admin_error.html0000644000175000017500000000176411622570546024666 0ustar julienjulien Suite Administrativa de DSPAM v3

    Ha ocurrido un error

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/nav_history.html0000644000175000017500000000532111622570546024057 0ustar julienjulien DSPAM v3 Centro de Control

    Los mensajes que han sido procesados por el filtro se muestran a continuación.Los más recientes se muestran primero. Usa las opciones de aprendizaje y entrega de falsos positivos para procesar los mensajes que tengas en cuarentena.

      $SHOW_SELECTOR$ $HISTORY$
    Tipo Re-enseñar Dia/hora Remitente Asunto Información adicional
    $HISTORYPAGES$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/nav_admin_user.html0000644000175000017500000000272211622570546024506 0ustar julienjulien Suite Administrativa de DSPAM v3

    La tabla siguiente muestra el número de mensajes procesados para cada usuario junto a sus preferencias.

    $TABLE$
    Nombre Tamaño Cuarentena TP TN FP FN SC IC Modo Si es spam BNR Lista blanca Sed Sig Loc
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/nav_performance.html0000644000175000017500000000751411622570546024665 0ustar julienjulien DSPAM v3 Centro de Control

    Si recibes un mensaje en tu buzón que es spam y que el filtro no ha marcado, por favor reenvíalo a spam-$REMOTE_USER$$LOCAL_DOMAIN$ para que pueda ser analizado y el filtro aprenda que es spam. Esto mejorará la fiabilidad del filtro para el futuro

    Estadísticas de rendimiento - $TIME$

    Metrica   Calculado como
    Precisión general (desde el ultimo reset) $OVERALL_ACCURACY$% (Mensajes cazados + Mensajes validos entregados) / Número total de mensajes
    Identificación de spam (desde el ultimo reset) $SPAM_ACCURACY$% (Solo filtro spam)
    Ratio de spam (del total de procesados) $SPAM_RATIO$% Total de mensajes SPAM (cazados + fallados) / Número total de mensajes
      Mensajes SPAM Mensajes válidos
    Desde el último reset $TOTAL_SPAM_MISSED$ fallados $TOTAL_NONSPAM_MISSED$ fallados
    $TOTAL_SPAM_CAUGHT$ cazados $TOTAL_NONSPAM_CAUGHT$ entregados
    $SPAM_ACCURACY$% cazados $NONSPAM_ERROR_RATE$% fallados
    Total procesados por el filtro $TOTAL_SPAM_LEARNED$ fallados $TOTAL_NONSPAM_LEARNED$ fallados
    $TOTAL_SPAM_SCANNED$ cazados $TOTAL_NONSPAM_SCANNED$ entregados
    De corpus $TOTAL_SPAM_CORPUSFED$ alimentados $TOTAL_NONSPAM_CORPUSFED$ alimentados

    Resetear | Tweak -1

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/Makefile.am0000644000175000017500000000057611622570546022667 0ustar julienjulien# $Id: Makefile.am,v 1.0 2009/12/03 02:50:42 sbajic Exp $ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/nav_preferences.html0000644000175000017500000001154311622570546024662 0ustar julienjulien DSPAM v3 Centro de Control

    Esta página te permite configurar cómo se comportará el filtro.

    Aprendizaje - Configura cómo el filtro aprende conforme va procesando mensajes

    DSPAM debería aprender:

    Con todos los mensajes que procese
    Sólo cuando se equivoque
    Sólo si hay datos nuevos o si el filtro se equivoca
      Cuando enseño a DSPAM, prefiero:

    Reenviar mis mensajes de spam (la firma aparece en el cuerpo del mensaje)
    Responder a mis mensajes de spam (la firma aparece en las cabeceras del mensaje)

    Sensibilidad del filtro durante el preiodo de aprendizaje:
    Cazar más SPAM (Habrá más mensajes en la cuarentena) | | Dar por buenos más mensajes (Habrá menos mensajes en cuarentena)

    Gestión de mensajes - Configura cómo se gestiona el spam

    Cuando un mensaje es identificado como SPAM:

    Poner el mensaje en cuarentena
    Marcar el asunto del mensaje con
    Entregar el mensaje transparentemente pero con una cabecera de X-DSPAM

    Características - Ajustando el filtro

    $OPTION$ Activar la reduccion de ruido - Normalmente mejora la efectividad del filtro
    Activar las listas blancas automáticas para que los remitentes habituales no sean bloqueados
    Añadir los factores de Dspam en las cabeceras de cada mensaje

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/Makefile.in0000644000175000017500000002612011745313453022667 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.0 2009/12/03 02:50:42 sbajic Exp $ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = webui/cgi-bin/templates/es-es DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ nav_preferences.html \ nav_quarantine.html \ nav_viewmessage.html \ nav_analysis.html \ nav_history.html \ nav_admin_error.html \ nav_admin_status.html \ nav_admin_user.html \ nav_admin_preferences.html \ nav_fragment.html \ strings.pl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign webui/cgi-bin/templates/es-es/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign webui/cgi-bin/templates/es-es/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/nav_analysis.html0000644000175000017500000000337211622570546024205 0ustar julienjulien DSPAM v3 Centro de Control

    Debajo podrás ver los gráficos que muestran los mensajes que han sido procesados por el filtro.

    Gráficas de 24 horas - $TS_DAILY$ SPAM, $TI_DAILY$ Validos

    Gráficas de 14 días - $TS_WEEKLY$ SPAM, $TI_WEEKLY$ Validos

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/nav_admin_status.html0000644000175000017500000001004011622570546025043 0ustar julienjulien Suite Administrativa de DSPAM v3

    La tabla y gráficos siguientes resumen el trabajo realizado por el filtro.

    Resumen

    Mensajes Hoy Esta hora
    Spam $SPAM_TODAY$ $SPAM_THIS_HOUR$
    Validos $NONSPAM_TODAY$ $NONSPAM_THIS_HOUR$
    Mensajes no cazados $SM_TODAY$ $SM_THIS_HOUR$
    Falsos positivos $FP_TODAY$ $FP_THIS_HOUR$
    Inoculaciones $INOC_TODAY$ $INOC_THIS_HOUR$
    Corpusfeds $CORPUS_TODAY$ $CORPUS_THIS_HOUR$
    Añadidos a lista blanca $WHITE_TODAY$ $WHITE_THIS_HOUR$
    Infectados $VIRUS_TODAY$ $VIRUS_THIS_HOUR$
    Añadidos a lista negra $BLACK_TODAY$ $BLACK_THIS_HOUR$
    Blocklisted $BLOCK_TODAY$ $BLOCK_THIS_HOUR$
    Total $TOTAL_TODAY$ $TOTAL_THIS_HOUR$
    Estado Valor actual
    Tiempo medio de procesamiento de mensajes $AVG_PROCESSING_TIME$ segs.
    Mensajes por segundo $AVG_MSG_PER_SECOND$
    Procesos de DSPAM ejecutandose $DSPAM_PROCESSES$ procesos
    Tiempo online $UPTIME$
    Tamaño de la cola de mensajes $MAIL_QUEUE$ mensajes

    Actividad en las últimas 24 horas - $TS_DAILY$ SPAM, $TI_DAILY$ Validos, $SM_DAILY$ Mensajes no cazados, $FP_DAILY$ Falsos positivos, $INOC_DAILY$ Inoculaciones, $CORPUS_DAILY$ Corpusfeds, $WHITE_DAILY$ Añadidos a lista blanca, $VIRUS_DAILY$ Virus, $BLACK_DAILY$ Añadidos a lista negra, $BLOCK_DAILY$ Blocklisted

    Actividad Diaria - $TS_WEEKLY$ SPAM, $TI_WEEKLY$ Validos, $SM_WEEKLY$ Mensajes no cazados, $FP_WEEKLY$ Falsos positivos, $INOC_WEEKLY$ Inoculaciones, $CORPUS_WEEKLY$ Corpusfeds, $WHITE_WEEKLY$ Añadidos a lista blanca, $VIRUS_WEEKLY$ Virus, $BLACK_WEEKLY$ Añadidos a lista negra, $BLOCK_WEEKLY$ Blocklisted

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/nav_viewmessage.html0000644000175000017500000000334111622570546024675 0ustar julienjulien DSPAM v3 Centro de Control

    Los mensajes que han sido puestos en cuarentena son mostrados a continuación

    porque no es SPAM

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/strings.pl0000755000175000017500000001004711741351001022637 0ustar julienjulien#!/usr/bin/perl # $Id: strings.pl,v 1.03 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . $LANG{'lang_name'} = "Español"; $LANG{'lang_select'} = "Lengua"; $LANG{'empty'} = "Vacio"; $LANG{'admin_suite'} = "Suite Administrativa"; $LANG{'alert_name'} = "Nombre de alerta"; $LANG{'remove_alert'} = "Eliminar"; $LANG{'user_form'} = "Proteccion estadistica de SPAM para"; $LANG{'user_form_submit'} = "Cambiar"; $LANG{'admin_form'} = "Proteccion estadistica de SPAM para Administrador"; $LANG{'admin_form_submit'} = "Cambiar"; $LANG{'option_disable_filtering'} = "Desactivar filtro DSPAM"; $LANG{'option_enable_filtering'} = "Activar filtro DSPAM"; $LANG{'quarantine_rating'} = "probabilidad"; $LANG{'quarantine_date'} = "Fecha"; $LANG{'quarantine_from'} = "Remitente"; $LANG{'quarantine_subject'} = "Asunto"; $LANG{'history_show'} = "Mostrar"; $LANG{'history_show_all'} = "todos"; $LANG{'history_show_spam'} = "spam"; $LANG{'history_show_innocent'} = "inocente"; $LANG{'history_show_whitelisted'} = "lista blanca"; $LANG{'history_retrain_as_spam'} = "spam"; $LANG{'history_retrain_as_innocent'} = "inocente"; $LANG{'history_retrain_as'} = "Como"; $LANG{'history_retrain_undo'} = "Deshacer"; $LANG{'history_retrained'} = "Re-enseñado"; $LANG{'history_label_resend'} = "Reenviar"; $LANG{'history_label_whitelist'} = "lista blanca"; $LANG{'history_label_spam'} = "SPAM"; $LANG{'history_label_innocent'} = "Bueno"; $LANG{'history_label_miss'} = "Fallo"; $LANG{'history_label_virus'} = "Virus"; $LANG{'history_label_RBL'} = "RBL"; $LANG{'history_label_block'} = "BLOQUEAR"; $LANG{'history_label_corpus'} = "Corpus"; $LANG{'history_label_unknown'} = "UNKN"; $LANG{'history_label_error'} = "Error"; $LANG{'error_no_historic'} = "No hay información del historial."; $LANG{'error_cannot_open_log'} = "No es posible abrir el archivo de errores"; $LANG{'error_no_identity'} = "Error de sistema. No se ha podido determinar su identidad."; $LANG{'error_invalid_command'} = "Comando no valido"; $LANG{'error_cannot_write_prefs'} = "No se han podido guardar los ajustes"; $LANG{'error_no_sigid'} = "No se ha especificado ID del mensaje"; $LANG{'error_no_alert_specified'} = "No se ha especificado una alerta."; $LANG{'error_message_part1'} = "El siguiente error ha ocurrido al intentar procesar tu peticion:"; $LANG{'error_message_part2'} = "Si este problema continua, ponte en contacto con tu administrador."; $LANG{'error_filesystem_scale'} = "No se ha podido determinar la escala del sistema de archivos"; $LANG{'error_load_default_prefs'} = "No se han podido cargar los ajustes por defecto"; $LANG{'error_access_denied'} = "Acceso denegado"; $LANG{'graph_legend_x_label_hour'} = "Hora del día"; $LANG{'graph_legend_x_label_date'} = "Fecha"; $LANG{'graph_legend_nb_messages'} = "Numero de mensajes"; $LANG{'graph_legend_spam'} = "SPAM"; $LANG{'graph_legend_good'} = "Buenos"; $LANG{'graph_legend_inoculations'} = "Inoculaciones"; $LANG{'graph_legend_corpusfeds'} = "Corpusfeds"; $LANG{'graph_legend_virus'} = "Virus"; $LANG{'graph_legend_RBL'} = "En lista negra (RBL)"; $LANG{'graph_legend_blocklisted'} = "Blocklisted"; $LANG{'graph_legend_whitelisted'} = "Lista blanca automatica"; $LANG{'graph_legend_nonspam'} = "No spam"; $LANG{'graph_legend_spam_misses'} = "Mensajes spam no cazados"; $LANG{'graph_legend_falsepositives'} = "Falsos positivos"; 1; dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/nav_error.html0000644000175000017500000000234111622570546023506 0ustar julienjulien DSPAM v3 Centro de Control

    Ha ocurrido un error:

    $MESSAGE$
    dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/nav_alerts.html0000644000175000017500000000344611622570546023656 0ustar julienjulien DSPAM v3 Centro de Control

    Las alertas te ayudarán a localizar mensajes en la cuarentena. Si el texto de la alerta se encuentra en el mensaje en cuarentena, éste destacará sobre el resto, ayudándote a identificar mensajes que a lo mejor no son spam

    $ALERTS$

     

    dspam-3.10.2+dfsg/webui/cgi-bin/templates/es-es/nav_admin_preferences.html0000644000175000017500000001175311622570546026035 0ustar julienjulien Suite Administrativa de DSPAM v3

    Esta página te permite cambiar las preferencias para cualquier usuario. También puedes cambiar el comportamiento por defecto de DSPAM dejando el campo de nombre en blanco.

    Nombre de usuario:

    $ERROR$

    Aprendizaje - Configura el modo de aprendizaje conforme el filtro procesa mensajes

    DSPAM debería aprender:

    En cada mensaje procesado por el filtro
    Sólo cuando el filtro se equivoque
    Sólo con nueva información o cuando el filtro se equivoque
      Cuando corrijo a DSPAM, prefiero:

    Reenviar mis mensajes (la firma aparece en cuerpo)
    Rebotar mis mensajes (la firma aparece en las cabeceras)
    Que DSPAM añada su firma como un adjunto

    Sensibilidad del filtro durante el periodo de aprendizaje:
    Cazar más SPAM (Más mensajes irán inicialmente a la cuarentena) | | Dar por buenos más mensajes (Habrá menos mensajes en la cuarentena)

    Gestión de mensajes - Configura qué pasará cuando el filtro identifique un mensaje como spam

    Cuando un mensaje es identificado como spam:

    Poner el mensaje en cuarentena
    Añadir el siguiente mensaje en el Asunto
    Entregar el mensaje normalmente, pero añadirle una cabecera deX-DSPAM-Result

    Características - Ajustando el filtro

    $OPTION$ Activar la reduccion de ruido - Normalmente mejora la efectividad del filtro
    Activar las listas blancas automáticas para que los remitentes habituales no sean bloqueados
    Añadir los factores de Dspam en las cabeceras de cada mensaje

    dspam-3.10.2+dfsg/webui/cgi-bin/Makefile.am0000644000175000017500000000130111622570546017640 0ustar julienjulien# $Id: Makefile.am,v 1.29 2010/01/06 00:25:05 sbajic Exp $ # bin_SCRIPTS = configure_pl CLEANFILES = configure.pl EXTRA_DIST = \ dspam.cgi \ graph.cgi \ default.prefs \ rgb.txt \ admin.cgi \ admingraph.cgi \ admins \ subadmins \ configure.pl.in \ htmlize.pl SUBDIRS = \ templates \ templates/cs \ templates/de \ templates/es-es \ templates/fr \ templates/he \ templates/pt-br \ templates/ro \ templates/ru sed_substitute_variables = \ dspam_transformed=`echo dspam | sed '$(transform)'`; \ sed -e 's,@dspam_home\@,$(dspam_home),g' \ -e 's,@bindir\@,$(bindir),g' configure_pl: configure.pl.in Makefile ${sed_substitute_variables} < $(srcdir)/configure.pl.in > configure.pl dspam-3.10.2+dfsg/webui/cgi-bin/htmlize.pl0000755000175000017500000016771611741351001017630 0ustar julienjulien#!/usr/bin/perl # $Id: dspam.cgi,v 1.02 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . sub htmlize_chars { # # Replace some characters to HTML entities # my($text)=@_; my %html=(); $html{'A0'}=' '; $html{'A1'}='¡'; $html{'A2'}='¢'; $html{'A3'}='£'; $html{'A4'}='¤'; $html{'A5'}='¥'; $html{'A6'}='¦'; $html{'A7'}='§'; $html{'A8'}='¨'; $html{'A9'}='©'; $html{'AA'}='ª'; $html{'AB'}='«'; $html{'AC'}='¬'; $html{'AD'}='­'; $html{'AE'}='®'; $html{'AF'}='¯'; $html{'B0'}='°'; $html{'B1'}='±'; $html{'B2'}='²'; $html{'B3'}='³'; $html{'B4'}='´'; $html{'B5'}='µ'; $html{'B6'}='¶'; $html{'B7'}='·'; $html{'B8'}='¸'; $html{'B9'}='¹'; $html{'BA'}='º'; $html{'BB'}='»'; $html{'BC'}='¼'; $html{'BD'}='½'; $html{'BE'}='¾'; $html{'BF'}='¿'; $html{'C0'}='À'; $html{'C1'}='Á'; $html{'C2'}='Â'; $html{'C3'}='Ã'; $html{'C4'}='Ä'; $html{'C5'}='Å'; $html{'C6'}='Æ'; $html{'C7'}='Ç'; $html{'C8'}='È'; $html{'C9'}='É'; $html{'CA'}='Ê'; $html{'CB'}='Ë'; $html{'CC'}='Ì'; $html{'CD'}='Í'; $html{'CE'}='Î'; $html{'CF'}='Ï'; $html{'D0'}='Ð'; $html{'D1'}='Ñ'; $html{'D2'}='Ò'; $html{'D3'}='Ó'; $html{'D4'}='Ô'; $html{'D5'}='Õ'; $html{'D6'}='Ö'; $html{'D7'}='×'; $html{'D8'}='Ø'; $html{'D9'}='Ù'; $html{'DA'}='Ú'; $html{'DB'}='Û'; $html{'DC'}='Ü'; $html{'DD'}='Ý'; $html{'DE'}='Þ'; $html{'DF'}='ß'; $html{'E0'}='à'; $html{'E1'}='á'; $html{'E2'}='â'; $html{'E3'}='ã'; $html{'E4'}='ä'; $html{'E5'}='å'; $html{'E6'}='æ'; $html{'E7'}='ç'; $html{'E8'}='è'; $html{'E9'}='é'; $html{'EA'}='ê'; $html{'EB'}='ë'; $html{'EC'}='ì'; $html{'ED'}='í'; $html{'EE'}='î'; $html{'EF'}='ï'; $html{'F0'}='ð'; $html{'F1'}='ñ'; $html{'F2'}='ò'; $html{'F3'}='ó'; $html{'F4'}='ô'; $html{'F5'}='õ'; $html{'F6'}='ö'; $html{'F7'}='÷'; $html{'F8'}='ø'; $html{'F9'}='ù'; $html{'FA'}='ú'; $html{'FB'}='û'; $html{'FC'}='ü'; $html{'FD'}='ý'; $html{'FE'}='þ'; $html{'FF'}='ÿ'; my %map=(); $map{'\\xC4\\x80'}='Ā'; $map{'\\xC4\\x81'}='ā'; $map{'\\xC4\\x82'}='Ă'; $map{'\\xC4\\x83'}='ă'; $map{'\\xC4\\x84'}='Ą'; $map{'\\xC4\\x85'}='ą'; $map{'\\xC4\\x86'}='Ć'; $map{'\\xC4\\x87'}='ć'; $map{'\\xC4\\x88'}='Ĉ'; $map{'\\xC4\\x89'}='ĉ'; $map{'\\xC4\\x8A'}='Ċ'; $map{'\\xC4\\x8B'}='ċ'; $map{'\\xC4\\x8C'}='Č'; $map{'\\xC4\\x8D'}='č'; $map{'\\xC4\\x8E'}='Ď'; $map{'\\xC4\\x8F'}='ď'; $map{'\\xC4\\x90'}='Đ'; $map{'\\xC4\\x91'}='đ'; $map{'\\xC4\\x92'}='Ē'; $map{'\\xC4\\x93'}='ē'; $map{'\\xC4\\x94'}='Ĕ'; $map{'\\xC4\\x95'}='ĕ'; $map{'\\xC4\\x96'}='Ė'; $map{'\\xC4\\x97'}='ė'; $map{'\\xC4\\x98'}='Ę'; $map{'\\xC4\\x99'}='ę'; $map{'\\xC4\\x9A'}='Ě'; $map{'\\xC4\\x9B'}='ě'; $map{'\\xC4\\x9C'}='Ĝ'; $map{'\\xC4\\x9D'}='ĝ'; $map{'\\xC4\\x9E'}='Ğ'; $map{'\\xC4\\x9F'}='ğ'; $map{'\\xC4\\xA0'}='Ġ'; $map{'\\xC4\\xA1'}='ġ'; $map{'\\xC4\\xA2'}='Ģ'; $map{'\\xC4\\xA3'}='ģ'; $map{'\\xC4\\xA4'}='Ĥ'; $map{'\\xC4\\xA5'}='ĥ'; $map{'\\xC4\\xA6'}='Ħ'; $map{'\\xC4\\xA7'}='ħ'; $map{'\\xC4\\xA8'}='Ĩ'; $map{'\\xC4\\xA9'}='ĩ'; $map{'\\xC4\\xAA'}='Ī'; $map{'\\xC4\\xAB'}='ī'; $map{'\\xC4\\xAC'}='Ĭ'; $map{'\\xC4\\xAD'}='ĭ'; $map{'\\xC4\\xAE'}='Į'; $map{'\\xC4\\xAF'}='į'; $map{'\\xC4\\xB0'}='İ'; $map{'\\xC4\\xB1'}='ı'; $map{'\\xC4\\xB2'}='IJ'; $map{'\\xC4\\xB3'}='ij'; $map{'\\xC4\\xB4'}='Ĵ'; $map{'\\xC4\\xB5'}='ĵ'; $map{'\\xC4\\xB6'}='Ķ'; $map{'\\xC4\\xB7'}='ķ'; $map{'\\xC4\\xB8'}='ĸ'; $map{'\\xC4\\xB9'}='Ĺ'; $map{'\\xC4\\xBA'}='ĺ'; $map{'\\xC4\\xBB'}='Ļ'; $map{'\\xC4\\xBC'}='ļ'; $map{'\\xC4\\xBD'}='Ľ'; $map{'\\xC4\\xBE'}='ľ'; $map{'\\xC4\\xBF'}='Ŀ'; $map{'\\xC5\\x80'}='ŀ'; $map{'\\xC5\\x81'}='Ł'; $map{'\\xC5\\x82'}='ł'; $map{'\\xC5\\x83'}='Ń'; $map{'\\xC5\\x84'}='ń'; $map{'\\xC5\\x85'}='Ņ'; $map{'\\xC5\\x86'}='ņ'; $map{'\\xC5\\x87'}='Ň'; $map{'\\xC5\\x88'}='ň'; $map{'\\xC5\\x89'}='ʼn'; $map{'\\xC5\\x8A'}='Ŋ'; $map{'\\xC5\\x8B'}='ŋ'; $map{'\\xC5\\x8C'}='Ō'; $map{'\\xC5\\x8D'}='ō'; $map{'\\xC5\\x8E'}='Ŏ'; $map{'\\xC5\\x8F'}='ŏ'; $map{'\\xC5\\x90'}='Ő'; $map{'\\xC5\\x91'}='ő'; $map{'\\xC5\\x92'}='Œ'; $map{'\\xC5\\x93'}='œ'; $map{'\\xC5\\x94'}='Ŕ'; $map{'\\xC5\\x95'}='ŕ'; $map{'\\xC5\\x96'}='Ŗ'; $map{'\\xC5\\x97'}='ŗ'; $map{'\\xC5\\x98'}='Ř'; $map{'\\xC5\\x99'}='ř'; $map{'\\xC5\\x9A'}='Ś'; $map{'\\xC5\\x9B'}='ś'; $map{'\\xC5\\x9C'}='Ŝ'; $map{'\\xC5\\x9D'}='ŝ'; $map{'\\xC5\\x9E'}='Ş'; $map{'\\xC5\\x9F'}='ş'; $map{'\\xC5\\xA0'}='Š'; $map{'\\xC5\\xA1'}='š'; $map{'\\xC5\\xA2'}='Ţ'; $map{'\\xC5\\xA3'}='ţ'; $map{'\\xC5\\xA4'}='Ť'; $map{'\\xC5\\xA5'}='ť'; $map{'\\xC5\\xA6'}='Ŧ'; $map{'\\xC5\\xA7'}='ŧ'; $map{'\\xC5\\xA8'}='Ũ'; $map{'\\xC5\\xA9'}='ũ'; $map{'\\xC5\\xAA'}='Ū'; $map{'\\xC5\\xAB'}='ū'; $map{'\\xC5\\xAC'}='Ŭ'; $map{'\\xC5\\xAD'}='ŭ'; $map{'\\xC5\\xAE'}='Ů'; $map{'\\xC5\\xAF'}='ů'; $map{'\\xC5\\xB0'}='Ű'; $map{'\\xC5\\xB1'}='ű'; $map{'\\xC5\\xB2'}='Ų'; $map{'\\xC5\\xB3'}='ų'; $map{'\\xC5\\xB4'}='Ŵ'; $map{'\\xC5\\xB5'}='ŵ'; $map{'\\xC5\\xB6'}='Ŷ'; $map{'\\xC5\\xB7'}='ŷ'; $map{'\\xC5\\xB8'}='Ÿ'; $map{'\\xC5\\xB9'}='Ź'; $map{'\\xC5\\xBA'}='ź'; $map{'\\xC5\\xBB'}='Ż'; $map{'\\xC5\\xBC'}='ż'; $map{'\\xC5\\xBD'}='Ž'; $map{'\\xC5\\xBE'}='ž'; $map{'\\xC5\\xBF'}='ſ'; $map{'\\xC6\\x80'}='ƀ'; $map{'\\xC6\\x81'}='Ɓ'; $map{'\\xC6\\x82'}='Ƃ'; $map{'\\xC6\\x83'}='ƃ'; $map{'\\xC6\\x84'}='Ƅ'; $map{'\\xC6\\x85'}='ƅ'; $map{'\\xC6\\x86'}='Ɔ'; $map{'\\xC6\\x87'}='Ƈ'; $map{'\\xC6\\x88'}='ƈ'; $map{'\\xC6\\x89'}='Ɖ'; $map{'\\xC6\\x8A'}='Ɗ'; $map{'\\xC6\\x8B'}='Ƌ'; $map{'\\xC6\\x8C'}='ƌ'; $map{'\\xC6\\x8D'}='ƍ'; $map{'\\xC6\\x8E'}='Ǝ'; $map{'\\xC6\\x8F'}='Ə'; $map{'\\xC6\\x90'}='Ɛ'; $map{'\\xC6\\x91'}='Ƒ'; $map{'\\xC6\\x92'}='ƒ'; $map{'\\xC6\\x93'}='Ɠ'; $map{'\\xC6\\x94'}='Ɣ'; $map{'\\xC6\\x95'}='ƕ'; $map{'\\xC6\\x96'}='Ɩ'; $map{'\\xC6\\x97'}='Ɨ'; $map{'\\xC6\\x98'}='Ƙ'; $map{'\\xC6\\x99'}='ƙ'; $map{'\\xC6\\x9A'}='ƚ'; $map{'\\xC6\\x9B'}='ƛ'; $map{'\\xC6\\x9C'}='Ɯ'; $map{'\\xC6\\x9D'}='Ɲ'; $map{'\\xC6\\x9E'}='ƞ'; $map{'\\xC6\\x9F'}='Ɵ'; $map{'\\xC6\\xA0'}='Ơ'; $map{'\\xC6\\xA1'}='ơ'; $map{'\\xC6\\xA2'}='Ƣ'; $map{'\\xC6\\xA3'}='ƣ'; $map{'\\xC6\\xA4'}='Ƥ'; $map{'\\xC6\\xA5'}='ƥ'; $map{'\\xC6\\xA6'}='Ʀ'; $map{'\\xC6\\xA7'}='Ƨ'; $map{'\\xC6\\xA8'}='ƨ'; $map{'\\xC6\\xA9'}='Ʃ'; $map{'\\xC6\\xAA'}='ƪ'; $map{'\\xC6\\xAB'}='ƫ'; $map{'\\xC6\\xAC'}='Ƭ'; $map{'\\xC6\\xAD'}='ƭ'; $map{'\\xC6\\xAE'}='Ʈ'; $map{'\\xC6\\xAF'}='Ư'; $map{'\\xC6\\xB0'}='ư'; $map{'\\xC6\\xB1'}='Ʊ'; $map{'\\xC6\\xB2'}='Ʋ'; $map{'\\xC6\\xB3'}='Ƴ'; $map{'\\xC6\\xB4'}='ƴ'; $map{'\\xC6\\xB5'}='Ƶ'; $map{'\\xC6\\xB6'}='ƶ'; $map{'\\xC6\\xB7'}='Ʒ'; $map{'\\xC6\\xB8'}='Ƹ'; $map{'\\xC6\\xB9'}='ƹ'; $map{'\\xC6\\xBA'}='ƺ'; $map{'\\xC6\\xBB'}='ƻ'; $map{'\\xC6\\xBC'}='Ƽ'; $map{'\\xC6\\xBD'}='ƽ'; $map{'\\xC6\\xBE'}='ƾ'; $map{'\\xC6\\xBF'}='ƿ'; $map{'\\xC7\\x80'}='ǀ'; $map{'\\xC7\\x81'}='ǁ'; $map{'\\xC7\\x82'}='ǂ'; $map{'\\xC7\\x83'}='ǃ'; $map{'\\xC7\\x84'}='DŽ'; $map{'\\xC7\\x85'}='Dž'; $map{'\\xC7\\x86'}='dž'; $map{'\\xC7\\x87'}='LJ'; $map{'\\xC7\\x88'}='Lj'; $map{'\\xC7\\x89'}='lj'; $map{'\\xC7\\x8A'}='NJ'; $map{'\\xC7\\x8B'}='Nj'; $map{'\\xC7\\x8C'}='nj'; $map{'\\xC7\\x8D'}='Ǎ'; $map{'\\xC7\\x8E'}='ǎ'; $map{'\\xC7\\x8F'}='Ǐ'; $map{'\\xC7\\x90'}='ǐ'; $map{'\\xC7\\x91'}='Ǒ'; $map{'\\xC7\\x92'}='ǒ'; $map{'\\xC7\\x93'}='Ǔ'; $map{'\\xC7\\x94'}='ǔ'; $map{'\\xC7\\x95'}='Ǖ'; $map{'\\xC7\\x96'}='ǖ'; $map{'\\xC7\\x97'}='Ǘ'; $map{'\\xC7\\x98'}='ǘ'; $map{'\\xC7\\x99'}='Ǚ'; $map{'\\xC7\\x9A'}='ǚ'; $map{'\\xC7\\x9B'}='Ǜ'; $map{'\\xC7\\x9C'}='ǜ'; $map{'\\xC7\\x9D'}='ǝ'; $map{'\\xC7\\x9E'}='Ǟ'; $map{'\\xC7\\x9F'}='ǟ'; $map{'\\xC7\\xA0'}='Ǡ'; $map{'\\xC7\\xA1'}='ǡ'; $map{'\\xC7\\xA2'}='Ǣ'; $map{'\\xC7\\xA3'}='ǣ'; $map{'\\xC7\\xA4'}='Ǥ'; $map{'\\xC7\\xA5'}='ǥ'; $map{'\\xC7\\xA6'}='Ǧ'; $map{'\\xC7\\xA7'}='ǧ'; $map{'\\xC7\\xA8'}='Ǩ'; $map{'\\xC7\\xA9'}='ǩ'; $map{'\\xC7\\xAA'}='Ǫ'; $map{'\\xC7\\xAB'}='ǫ'; $map{'\\xC7\\xAC'}='Ǭ'; $map{'\\xC7\\xAD'}='ǭ'; $map{'\\xC7\\xAE'}='Ǯ'; $map{'\\xC7\\xAF'}='ǯ'; $map{'\\xC7\\xB0'}='ǰ'; $map{'\\xC7\\xB1'}='DZ'; $map{'\\xC7\\xB2'}='Dz'; $map{'\\xC7\\xB3'}='dz'; $map{'\\xC7\\xB4'}='Ǵ'; $map{'\\xC7\\xB5'}='ǵ'; $map{'\\xC7\\xB6'}='Ƕ'; $map{'\\xC7\\xB7'}='Ƿ'; $map{'\\xC7\\xB8'}='Ǹ'; $map{'\\xC7\\xB9'}='ǹ'; $map{'\\xC7\\xBA'}='Ǻ'; $map{'\\xC7\\xBB'}='ǻ'; $map{'\\xC7\\xBC'}='Ǽ'; $map{'\\xC7\\xBD'}='ǽ'; $map{'\\xC7\\xBE'}='Ǿ'; $map{'\\xC7\\xBF'}='ǿ'; $map{'\\xC8\\x80'}='Ȁ'; $map{'\\xC8\\x81'}='ȁ'; $map{'\\xC8\\x82'}='Ȃ'; $map{'\\xC8\\x83'}='ȃ'; $map{'\\xC8\\x84'}='Ȅ'; $map{'\\xC8\\x85'}='ȅ'; $map{'\\xC8\\x86'}='Ȇ'; $map{'\\xC8\\x87'}='ȇ'; $map{'\\xC8\\x88'}='Ȉ'; $map{'\\xC8\\x89'}='ȉ'; $map{'\\xC8\\x8a'}='Ȋ'; $map{'\\xC8\\x8b'}='ȋ'; $map{'\\xC8\\x8c'}='Ȍ'; $map{'\\xC8\\x8d'}='ȍ'; $map{'\\xC8\\x8e'}='Ȏ'; $map{'\\xC8\\x8f'}='ȏ'; $map{'\\xC8\\x90'}='Ȑ'; $map{'\\xC8\\x91'}='ȑ'; $map{'\\xC8\\x92'}='Ȓ'; $map{'\\xC8\\x93'}='ȓ'; $map{'\\xC8\\x94'}='Ȕ'; $map{'\\xC8\\x95'}='ȕ'; $map{'\\xC8\\x96'}='Ȗ'; $map{'\\xC8\\x97'}='ȗ'; $map{'\\xC8\\x98'}='Ș'; $map{'\\xC8\\x99'}='ș'; $map{'\\xC8\\x9A'}='Ț'; $map{'\\xC8\\x9B'}='ț'; $map{'\\xC8\\x9C'}='Ȝ'; $map{'\\xC8\\x9D'}='ȝ'; $map{'\\xC8\\x9E'}='Ȟ'; $map{'\\xC8\\x9F'}='ȟ'; $map{'\\xC8\\xA0'}='Ƞ'; $map{'\\xC8\\xA1'}='ȡ'; $map{'\\xC8\\xA2'}='Ȣ'; $map{'\\xC8\\xA3'}='ȣ'; $map{'\\xC8\\xA4'}='Ȥ'; $map{'\\xC8\\xA5'}='ȥ'; $map{'\\xC8\\xA6'}='Ȧ'; $map{'\\xC8\\xA7'}='ȧ'; $map{'\\xC8\\xA8'}='Ȩ'; $map{'\\xC8\\xA9'}='ȩ'; $map{'\\xC8\\xAA'}='Ȫ'; $map{'\\xC8\\xAB'}='ȫ'; $map{'\\xC8\\xAC'}='Ȭ'; $map{'\\xC8\\xAD'}='ȭ'; $map{'\\xC8\\xAE'}='Ȯ'; $map{'\\xC8\\xAF'}='ȯ'; $map{'\\xC8\\xB0'}='Ȱ'; $map{'\\xC8\\xB1'}='ȱ'; $map{'\\xC8\\xB2'}='Ȳ'; $map{'\\xC8\\xB3'}='ȳ'; $map{'\\xC8\\xB4'}='ȴ'; $map{'\\xC8\\xB5'}='ȵ'; $map{'\\xC8\\xB6'}='ȶ'; $map{'\\xC8\\xB7'}='ȷ'; $map{'\\xC8\\xB8'}='ȸ'; $map{'\\xC8\\xB9'}='ȹ'; $map{'\\xC8\\xBA'}='Ⱥ'; $map{'\\xC8\\xBB'}='Ȼ'; $map{'\\xC8\\xBC'}='ȼ'; $map{'\\xC8\\xBD'}='Ƚ'; $map{'\\xC8\\xBE'}='Ⱦ'; $map{'\\xC8\\xBF'}='ȿ'; $map{'\\xC9\\x80'}='ɀ'; $map{'\\xC9\\x81'}='Ɂ'; $map{'\\xC9\\x82'}='ɂ'; $map{'\\xC9\\x83'}='Ƀ'; $map{'\\xC9\\x84'}='Ʉ'; $map{'\\xC9\\x85'}='Ʌ'; $map{'\\xC9\\x86'}='Ɇ'; $map{'\\xC9\\x87'}='ɇ'; $map{'\\xC9\\x88'}='Ɉ'; $map{'\\xC9\\x89'}='ɉ'; $map{'\\xC9\\x8A'}='Ɋ'; $map{'\\xC9\\x8B'}='ɋ'; $map{'\\xC9\\x8C'}='Ɍ'; $map{'\\xC9\\x8D'}='ɍ'; $map{'\\xC9\\x8E'}='Ɏ'; $map{'\\xC9\\x8F'}='ɏ'; $map{'\\xC9\\x90'}='ɐ'; $map{'\\xC9\\x91'}='ɑ'; $map{'\\xC9\\x92'}='ɒ'; $map{'\\xC9\\x93'}='ɓ'; $map{'\\xC9\\x94'}='ɔ'; $map{'\\xC9\\x95'}='ɕ'; $map{'\\xC9\\x96'}='ɖ'; $map{'\\xC9\\x97'}='ɗ'; $map{'\\xC9\\x98'}='ɘ'; $map{'\\xC9\\x99'}='ə'; $map{'\\xC9\\x9A'}='ɚ'; $map{'\\xC9\\x9B'}='ɛ'; $map{'\\xC9\\x9C'}='ɜ'; $map{'\\xC9\\x9D'}='ɝ'; $map{'\\xC9\\x9E'}='ɞ'; $map{'\\xC9\\x9F'}='ɟ'; $map{'\\xC9\\xA0'}='ɠ'; $map{'\\xC9\\xA1'}='ɡ'; $map{'\\xC9\\xA2'}='ɢ'; $map{'\\xC9\\xA3'}='ɣ'; $map{'\\xC9\\xA4'}='ɤ'; $map{'\\xC9\\xA5'}='ɥ'; $map{'\\xC9\\xA6'}='ɦ'; $map{'\\xC9\\xA7'}='ɧ'; $map{'\\xC9\\xA8'}='ɨ'; $map{'\\xC9\\xA9'}='ɩ'; $map{'\\xC9\\xAA'}='ɪ'; $map{'\\xC9\\xAB'}='ɫ'; $map{'\\xC9\\xAC'}='ɬ'; $map{'\\xC9\\xAD'}='ɭ'; $map{'\\xC9\\xAE'}='ɮ'; $map{'\\xC9\\xAF'}='ɯ'; $map{'\\xC9\\xB0'}='ɰ'; $map{'\\xC9\\xB1'}='ɱ'; $map{'\\xC9\\xB2'}='ɲ'; $map{'\\xC9\\xB3'}='ɳ'; $map{'\\xC9\\xB4'}='ɴ'; $map{'\\xC9\\xB5'}='ɵ'; $map{'\\xC9\\xB6'}='ɶ'; $map{'\\xC9\\xB7'}='ɷ'; $map{'\\xC9\\xB8'}='ɸ'; $map{'\\xC9\\xB9'}='ɹ'; $map{'\\xC9\\xBA'}='ɺ'; $map{'\\xC9\\xBB'}='ɻ'; $map{'\\xC9\\xBC'}='ɼ'; $map{'\\xC9\\xBD'}='ɽ'; $map{'\\xC9\\xBE'}='ɾ'; $map{'\\xC9\\xBF'}='ɿ'; $map{'\\xCA\\x80'}='ʀ'; $map{'\\xCA\\x81'}='ʁ'; $map{'\\xCA\\x82'}='ʂ'; $map{'\\xCA\\x83'}='ʃ'; $map{'\\xCA\\x84'}='ʄ'; $map{'\\xCA\\x85'}='ʅ'; $map{'\\xCA\\x86'}='ʆ'; $map{'\\xCA\\x87'}='ʇ'; $map{'\\xCA\\x88'}='ʈ'; $map{'\\xCA\\x89'}='ʉ'; $map{'\\xCA\\x8A'}='ʊ'; $map{'\\xCA\\x8B'}='ʋ'; $map{'\\xCA\\x8C'}='ʌ'; $map{'\\xCA\\x8D'}='ʍ'; $map{'\\xCA\\x8E'}='ʎ'; $map{'\\xCA\\x8F'}='ʏ'; $map{'\\xCA\\x90'}='ʐ'; $map{'\\xCA\\x91'}='ʑ'; $map{'\\xCA\\x92'}='ʒ'; $map{'\\xCA\\x93'}='ʓ'; $map{'\\xCA\\x94'}='ʔ'; $map{'\\xCA\\x95'}='ʕ'; $map{'\\xCA\\x96'}='ʖ'; $map{'\\xCA\\x97'}='ʗ'; $map{'\\xCA\\x98'}='ʘ'; $map{'\\xCA\\x99'}='ʙ'; $map{'\\xCA\\x9A'}='ʚ'; $map{'\\xCA\\x9B'}='ʛ'; $map{'\\xCA\\x9C'}='ʜ'; $map{'\\xCA\\x9D'}='ʝ'; $map{'\\xCA\\x9E'}='ʞ'; $map{'\\xCA\\x9F'}='ʟ'; $map{'\\xCA\\xA0'}='ʠ'; $map{'\\xCA\\xA1'}='ʡ'; $map{'\\xCA\\xA2'}='ʢ'; $map{'\\xCA\\xA3'}='ʣ'; $map{'\\xCA\\xA4'}='ʤ'; $map{'\\xCA\\xA5'}='ʥ'; $map{'\\xCA\\xA6'}='ʦ'; $map{'\\xCA\\xA7'}='ʧ'; $map{'\\xCA\\xA8'}='ʨ'; $map{'\\xCA\\xA9'}='ʩ'; $map{'\\xCA\\xAA'}='ʪ'; $map{'\\xCA\\xAB'}='ʫ'; $map{'\\xCA\\xAC'}='ʬ'; $map{'\\xCA\\xAD'}='ʭ'; $map{'\\xCA\\xAE'}='ʮ'; $map{'\\xCA\\xAF'}='ʯ'; $map{'\\xCA\\xB0'}='ʰ'; $map{'\\xCA\\xB1'}='ʱ'; $map{'\\xCA\\xB2'}='ʲ'; $map{'\\xCA\\xB3'}='ʳ'; $map{'\\xCA\\xB4'}='ʴ'; $map{'\\xCA\\xB5'}='ʵ'; $map{'\\xCA\\xB6'}='ʶ'; $map{'\\xCA\\xB7'}='ʷ'; $map{'\\xCA\\xB8'}='ʸ'; $map{'\\xCA\\xB9'}='ʹ'; $map{'\\xCA\\xBA'}='ʺ'; $map{'\\xCA\\xBB'}='ʻ'; $map{'\\xCA\\xBC'}='ʼ'; $map{'\\xCA\\xBD'}='ʽ'; $map{'\\xCA\\xBE'}='ʾ'; $map{'\\xCA\\xBF'}='ʿ'; $map{'\\xCB\\x80'}='ˀ'; $map{'\\xCB\\x81'}='ˁ'; $map{'\\xCB\\x82'}='˂'; $map{'\\xCB\\x83'}='˃'; $map{'\\xCB\\x84'}='˄'; $map{'\\xCB\\x85'}='˅'; $map{'\\xCB\\x86'}='ˆ'; $map{'\\xCB\\x87'}='ˇ'; $map{'\\xCB\\x88'}='ˈ'; $map{'\\xCB\\x89'}='ˉ'; $map{'\\xCB\\x8A'}='ˊ'; $map{'\\xCB\\x8B'}='ˋ'; $map{'\\xCB\\x8C'}='ˌ'; $map{'\\xCB\\x8D'}='ˍ'; $map{'\\xCB\\x8E'}='ˎ'; $map{'\\xCB\\x8F'}='ˏ'; $map{'\\xCB\\x90'}='ː'; $map{'\\xCB\\x91'}='ˑ'; $map{'\\xCB\\x92'}='˒'; $map{'\\xCB\\x93'}='˓'; $map{'\\xCB\\x94'}='˔'; $map{'\\xCB\\x95'}='˕'; $map{'\\xCB\\x96'}='˖'; $map{'\\xCB\\x97'}='˗'; $map{'\\xCB\\x98'}='˘'; $map{'\\xCB\\x99'}='˙'; $map{'\\xCB\\x9A'}='˚'; $map{'\\xCB\\x9B'}='˛'; $map{'\\xCB\\x9C'}='˜'; $map{'\\xCB\\x9D'}='˝'; $map{'\\xCB\\x9E'}='˞'; $map{'\\xCB\\x9F'}='˟'; $map{'\\xCB\\xA0'}='ˠ'; $map{'\\xCB\\xA1'}='ˡ'; $map{'\\xCB\\xA2'}='ˢ'; $map{'\\xCB\\xA3'}='ˣ'; $map{'\\xCB\\xA4'}='ˤ'; $map{'\\xCB\\xA5'}='˥'; $map{'\\xCB\\xA6'}='˦'; $map{'\\xCB\\xA7'}='˧'; $map{'\\xCB\\xA8'}='˨'; $map{'\\xCB\\xA9'}='˩'; $map{'\\xCB\\xAA'}='˪'; $map{'\\xCB\\xAB'}='˫'; $map{'\\xCB\\xAC'}='ˬ'; $map{'\\xCB\\xAD'}='˭'; $map{'\\xCB\\xAE'}='ˮ'; $map{'\\xCB\\xAF'}='˯'; $map{'\\xCB\\xB0'}='˰'; $map{'\\xCB\\xB1'}='˱'; $map{'\\xCB\\xB2'}='˲'; $map{'\\xCB\\xB3'}='˳'; $map{'\\xCB\\xB4'}='˴'; $map{'\\xCB\\xB5'}='˵'; $map{'\\xCB\\xB6'}='˶'; $map{'\\xCB\\xB7'}='˷'; $map{'\\xCB\\xB8'}='˸'; $map{'\\xCB\\xB9'}='˹'; $map{'\\xCB\\xBA'}='˺'; $map{'\\xCB\\xBB'}='˻'; $map{'\\xCB\\xBC'}='˼'; $map{'\\xCB\\xBD'}='˽'; $map{'\\xCB\\xBE'}='˾'; $map{'\\xCB\\xBF'}='˿'; $map{'\\xCC\\x80'}='̀'; $map{'\\xCC\\x81'}='́'; $map{'\\xCC\\x82'}='̂'; $map{'\\xCC\\x83'}='̃'; $map{'\\xCC\\x84'}='̄'; $map{'\\xCC\\x85'}='̅'; $map{'\\xCC\\x86'}='̆'; $map{'\\xCC\\x87'}='̇'; $map{'\\xCC\\x88'}='̈'; $map{'\\xCC\\x89'}='̉'; $map{'\\xCC\\x8A'}='̊'; $map{'\\xCC\\x8B'}='̋'; $map{'\\xCC\\x8C'}='̌'; $map{'\\xCC\\x8D'}='̍'; $map{'\\xCC\\x8E'}='̎'; $map{'\\xCC\\x8F'}='̏'; $map{'\\xCC\\x90'}='̐'; $map{'\\xCC\\x91'}='̑'; $map{'\\xCC\\x92'}='̒'; $map{'\\xCC\\x93'}='̓'; $map{'\\xCC\\x94'}='̔'; $map{'\\xCC\\x95'}='̕'; $map{'\\xCC\\x96'}='̖'; $map{'\\xCC\\x97'}='̗'; $map{'\\xCC\\x98'}='̘'; $map{'\\xCC\\x99'}='̙'; $map{'\\xCC\\x9A'}='̚'; $map{'\\xCC\\x9B'}='̛'; $map{'\\xCC\\x9C'}='̜'; $map{'\\xCC\\x9D'}='̝'; $map{'\\xCC\\x9E'}='̞'; $map{'\\xCC\\x9F'}='̟'; $map{'\\xCC\\xA0'}='̠'; $map{'\\xCC\\xA1'}='̡'; $map{'\\xCC\\xA2'}='̢'; $map{'\\xCC\\xA3'}='̣'; $map{'\\xCC\\xA4'}='̤'; $map{'\\xCC\\xA5'}='̥'; $map{'\\xCC\\xA6'}='̦'; $map{'\\xCC\\xA7'}='̧'; $map{'\\xCC\\xA8'}='̨'; $map{'\\xCC\\xA9'}='̩'; $map{'\\xCC\\xAA'}='̪'; $map{'\\xCC\\xAB'}='̫'; $map{'\\xCC\\xAC'}='̬'; $map{'\\xCC\\xAD'}='̭'; $map{'\\xCC\\xAE'}='̮'; $map{'\\xCC\\xAF'}='̯'; $map{'\\xCC\\xB0'}='̰'; $map{'\\xCC\\xB1'}='̱'; $map{'\\xCC\\xB2'}='̲'; $map{'\\xCC\\xB3'}='̳'; $map{'\\xCC\\xB4'}='̴'; $map{'\\xCC\\xB5'}='̵'; $map{'\\xCC\\xB6'}='̶'; $map{'\\xCC\\xB7'}='̷'; $map{'\\xCC\\xB8'}='̸'; $map{'\\xCC\\xB9'}='̹'; $map{'\\xCC\\xBA'}='̺'; $map{'\\xCC\\xBB'}='̻'; $map{'\\xCC\\xBC'}='̼'; $map{'\\xCC\\xBD'}='̽'; $map{'\\xCC\\xBE'}='̾'; $map{'\\xCC\\xBF'}='̿'; $map{'\\xCD\\x80'}='̀'; $map{'\\xCD\\x81'}='́'; $map{'\\xCD\\x82'}='͂'; $map{'\\xCD\\x83'}='̓'; $map{'\\xCD\\x84'}='̈́'; $map{'\\xCD\\x85'}='ͅ'; $map{'\\xCD\\x86'}='͆'; $map{'\\xCD\\x87'}='͇'; $map{'\\xCD\\x88'}='͈'; $map{'\\xCD\\x89'}='͉'; $map{'\\xCD\\x8A'}='͊'; $map{'\\xCD\\x8B'}='͋'; $map{'\\xCD\\x8C'}='͌'; $map{'\\xCD\\x8D'}='͍'; $map{'\\xCD\\x8E'}='͎'; $map{'\\xCD\\x8F'}='͏'; $map{'\\xCD\\x90'}='͐'; $map{'\\xCD\\x91'}='͑'; $map{'\\xCD\\x92'}='͒'; $map{'\\xCD\\x93'}='͓'; $map{'\\xCD\\x94'}='͔'; $map{'\\xCD\\x95'}='͕'; $map{'\\xCD\\x96'}='͖'; $map{'\\xCD\\x97'}='͗'; $map{'\\xCD\\x98'}='͘'; $map{'\\xCD\\x99'}='͙'; $map{'\\xCD\\x9A'}='͚'; $map{'\\xCD\\x9B'}='͛'; $map{'\\xCD\\x9C'}='͜'; $map{'\\xCD\\x9D'}='͝'; $map{'\\xCD\\x9E'}='͞'; $map{'\\xCD\\x9F'}='͟'; $map{'\\xCD\\xA0'}='͠'; $map{'\\xCD\\xA1'}='͡'; $map{'\\xCD\\xA2'}='͢'; $map{'\\xCD\\xA3'}='ͣ'; $map{'\\xCD\\xA4'}='ͤ'; $map{'\\xCD\\xA5'}='ͥ'; $map{'\\xCD\\xA6'}='ͦ'; $map{'\\xCD\\xA7'}='ͧ'; $map{'\\xCD\\xA8'}='ͨ'; $map{'\\xCD\\xA9'}='ͩ'; $map{'\\xCD\\xAA'}='ͪ'; $map{'\\xCD\\xAB'}='ͫ'; $map{'\\xCD\\xAC'}='ͬ'; $map{'\\xCD\\xAD'}='ͭ'; $map{'\\xCD\\xAE'}='ͮ'; $map{'\\xCD\\xAF'}='ͯ'; $map{'\\xCD\\xB0'}='Ͱ'; $map{'\\xCD\\xB1'}='ͱ'; $map{'\\xCD\\xB2'}='Ͳ'; $map{'\\xCD\\xB3'}='ͳ'; $map{'\\xCD\\xB4'}='ʹ'; $map{'\\xCD\\xB5'}='͵'; $map{'\\xCD\\xB6'}='Ͷ'; $map{'\\xCD\\xB7'}='ͷ'; $map{'\\xCD\\xB8'}='͸'; $map{'\\xCD\\xB9'}='͹'; $map{'\\xCD\\xBA'}='ͺ'; $map{'\\xCD\\xBB'}='ͻ'; $map{'\\xCD\\xBC'}='ͼ'; $map{'\\xCD\\xBD'}='ͽ'; $map{'\\xCD\\xBE'}=';'; $map{'\\xCD\\xBF'}='Ϳ'; $map{'\\xCE\\x80'}='΀'; $map{'\\xCE\\x81'}='΁'; $map{'\\xCE\\x82'}='΂'; $map{'\\xCE\\x83'}='΃'; $map{'\\xCE\\x84'}='΄'; $map{'\\xCE\\x85'}='΅'; $map{'\\xCE\\x86'}='Ά'; $map{'\\xCE\\x87'}='·'; $map{'\\xCE\\x88'}='Έ'; $map{'\\xCE\\x89'}='Ή'; $map{'\\xCE\\x8A'}='Ί'; $map{'\\xCE\\x8B'}='΋'; $map{'\\xCE\\x8C'}='Ό'; $map{'\\xCE\\x8D'}='΍'; $map{'\\xCE\\x8E'}='Ύ'; $map{'\\xCE\\x8F'}='Ώ'; $map{'\\xCE\\x90'}='ΐ'; $map{'\\xCE\\x91'}='Α'; $map{'\\xCE\\x92'}='Β'; $map{'\\xCE\\x93'}='Γ'; $map{'\\xCE\\x94'}='Δ'; $map{'\\xCE\\x95'}='Ε'; $map{'\\xCE\\x96'}='Ζ'; $map{'\\xCE\\x97'}='Η'; $map{'\\xCE\\x98'}='Θ'; $map{'\\xCE\\x99'}='Ι'; $map{'\\xCE\\x9A'}='Κ'; $map{'\\xCE\\x9B'}='Λ'; $map{'\\xCE\\x9C'}='Μ'; $map{'\\xCE\\x9D'}='Ν'; $map{'\\xCE\\x9E'}='Ξ'; $map{'\\xCE\\x9F'}='Ο'; $map{'\\xCE\\xA0'}='Π'; $map{'\\xCE\\xA1'}='Ρ'; $map{'\\xCE\\xA2'}='΢'; $map{'\\xCE\\xA3'}='Σ'; $map{'\\xCE\\xA4'}='Τ'; $map{'\\xCE\\xA5'}='Υ'; $map{'\\xCE\\xA6'}='Φ'; $map{'\\xCE\\xA7'}='Χ'; $map{'\\xCE\\xA8'}='Ψ'; $map{'\\xCE\\xA9'}='Ω'; $map{'\\xCE\\xAA'}='Ϊ'; $map{'\\xCE\\xAB'}='Ϋ'; $map{'\\xCE\\xAC'}='ά'; $map{'\\xCE\\xAD'}='έ'; $map{'\\xCE\\xAE'}='ή'; $map{'\\xCE\\xAF'}='ί'; $map{'\\xCE\\xB0'}='ΰ'; $map{'\\xCE\\xB1'}='α'; $map{'\\xCE\\xB2'}='β'; $map{'\\xCE\\xB3'}='γ'; $map{'\\xCE\\xB4'}='δ'; $map{'\\xCE\\xB5'}='ε'; $map{'\\xCE\\xB6'}='ζ'; $map{'\\xCE\\xB7'}='η'; $map{'\\xCE\\xB8'}='θ'; $map{'\\xCE\\xB9'}='ι'; $map{'\\xCE\\xBA'}='κ'; $map{'\\xCE\\xBB'}='λ'; $map{'\\xCE\\xBC'}='μ'; $map{'\\xCE\\xBD'}='ν'; $map{'\\xCE\\xBE'}='ξ'; $map{'\\xCE\\xBF'}='ο'; $map{'\\xCF\\x80'}='π'; $map{'\\xCF\\x81'}='ρ'; $map{'\\xCF\\x82'}='ς'; $map{'\\xCF\\x83'}='σ'; $map{'\\xCF\\x84'}='τ'; $map{'\\xCF\\x85'}='υ'; $map{'\\xCF\\x86'}='φ'; $map{'\\xCF\\x87'}='χ'; $map{'\\xCF\\x88'}='ψ'; $map{'\\xCF\\x89'}='ω'; $map{'\\xCF\\x8A'}='ϊ'; $map{'\\xCF\\x8B'}='ϋ'; $map{'\\xCF\\x8C'}='ό'; $map{'\\xCF\\x8D'}='ύ'; $map{'\\xCF\\x8E'}='ώ'; $map{'\\xCF\\x8F'}='Ϗ'; $map{'\\xCF\\x90'}='ϐ'; $map{'\\xCF\\x91'}='ϑ'; $map{'\\xCF\\x92'}='ϒ'; $map{'\\xCF\\x93'}='ϓ'; $map{'\\xCF\\x94'}='ϔ'; $map{'\\xCF\\x95'}='ϕ'; $map{'\\xCF\\x96'}='ϖ'; $map{'\\xCF\\x97'}='ϗ'; $map{'\\xCF\\x98'}='Ϙ'; $map{'\\xCF\\x99'}='ϙ'; $map{'\\xCF\\x9A'}='Ϛ'; $map{'\\xCF\\x9B'}='ϛ'; $map{'\\xCF\\x9C'}='Ϝ'; $map{'\\xCF\\x9D'}='ϝ'; $map{'\\xCF\\x9E'}='Ϟ'; $map{'\\xCF\\x9F'}='ϟ'; $map{'\\xCF\\xA0'}='Ϡ'; $map{'\\xCF\\xA1'}='ϡ'; $map{'\\xCF\\xA2'}='Ϣ'; $map{'\\xCF\\xA3'}='ϣ'; $map{'\\xCF\\xA4'}='Ϥ'; $map{'\\xCF\\xA5'}='ϥ'; $map{'\\xCF\\xA6'}='Ϧ'; $map{'\\xCF\\xA7'}='ϧ'; $map{'\\xCF\\xA8'}='Ϩ'; $map{'\\xCF\\xA9'}='ϩ'; $map{'\\xCF\\xAA'}='Ϫ'; $map{'\\xCF\\xAB'}='ϫ'; $map{'\\xCF\\xAC'}='Ϭ'; $map{'\\xCF\\xAD'}='ϭ'; $map{'\\xCF\\xAE'}='Ϯ'; $map{'\\xCF\\xAF'}='ϯ'; $map{'\\xCF\\xB0'}='ϰ'; $map{'\\xCF\\xB1'}='ϱ'; $map{'\\xCF\\xB2'}='ϲ'; $map{'\\xCF\\xB3'}='ϳ'; $map{'\\xCF\\xB4'}='ϴ'; $map{'\\xCF\\xB5'}='ϵ'; $map{'\\xCF\\xB6'}='϶'; $map{'\\xCF\\xB7'}='Ϸ'; $map{'\\xCF\\xB8'}='ϸ'; $map{'\\xCF\\xB9'}='Ϲ'; $map{'\\xCF\\xBA'}='Ϻ'; $map{'\\xCF\\xBB'}='ϻ'; $map{'\\xCF\\xBC'}='ϼ'; $map{'\\xCF\\xBD'}='Ͻ'; $map{'\\xCF\\xBE'}='Ͼ'; $map{'\\xCF\\xBF'}='Ͽ'; $map{'\\xD0\\x80'}='Ѐ'; $map{'\\xD0\\x81'}='Ё'; $map{'\\xD0\\x82'}='Ђ'; $map{'\\xD0\\x83'}='Ѓ'; $map{'\\xD0\\x84'}='Є'; $map{'\\xD0\\x85'}='Ѕ'; $map{'\\xD0\\x86'}='І'; $map{'\\xD0\\x87'}='Ї'; $map{'\\xD0\\x88'}='Ј'; $map{'\\xD0\\x89'}='Љ'; $map{'\\xD0\\x8A'}='Њ'; $map{'\\xD0\\x8B'}='Ћ'; $map{'\\xD0\\x8C'}='Ќ'; $map{'\\xD0\\x8D'}='Ѝ'; $map{'\\xD0\\x8E'}='Ў'; $map{'\\xD0\\x8F'}='Џ'; $map{'\\xD0\\x90'}='А'; $map{'\\xD0\\x91'}='Б'; $map{'\\xD0\\x92'}='В'; $map{'\\xD0\\x93'}='Г'; $map{'\\xD0\\x94'}='Д'; $map{'\\xD0\\x95'}='Е'; $map{'\\xD0\\x96'}='Ж'; $map{'\\xD0\\x97'}='З'; $map{'\\xD0\\x98'}='И'; $map{'\\xD0\\x99'}='Й'; $map{'\\xD0\\x9A'}='К'; $map{'\\xD0\\x9B'}='Л'; $map{'\\xD0\\x9C'}='М'; $map{'\\xD0\\x9D'}='Н'; $map{'\\xD0\\x9E'}='О'; $map{'\\xD0\\x9F'}='П'; $map{'\\xD0\\xA0'}='Р'; $map{'\\xD0\\xA1'}='С'; $map{'\\xD0\\xA2'}='Т'; $map{'\\xD0\\xA3'}='У'; $map{'\\xD0\\xA4'}='Ф'; $map{'\\xD0\\xA5'}='Х'; $map{'\\xD0\\xA6'}='Ц'; $map{'\\xD0\\xA7'}='Ч'; $map{'\\xD0\\xA8'}='Ш'; $map{'\\xD0\\xA9'}='Щ'; $map{'\\xD0\\xAA'}='Ъ'; $map{'\\xD0\\xAB'}='Ы'; $map{'\\xD0\\xAC'}='Ь'; $map{'\\xD0\\xAD'}='Э'; $map{'\\xD0\\xAE'}='Ю'; $map{'\\xD0\\xAF'}='Я'; $map{'\\xD0\\xB0'}='а'; $map{'\\xD0\\xB1'}='б'; $map{'\\xD0\\xB2'}='в'; $map{'\\xD0\\xB3'}='г'; $map{'\\xD0\\xB4'}='д'; $map{'\\xD0\\xB5'}='е'; $map{'\\xD0\\xB6'}='ж'; $map{'\\xD0\\xB7'}='з'; $map{'\\xD0\\xB8'}='и'; $map{'\\xD0\\xB9'}='й'; $map{'\\xD0\\xBA'}='к'; $map{'\\xD0\\xBB'}='л'; $map{'\\xD0\\xBC'}='м'; $map{'\\xD0\\xBD'}='н'; $map{'\\xD0\\xBE'}='о'; $map{'\\xD0\\xBF'}='п'; $map{'\\xD1\\x80'}='р'; $map{'\\xD1\\x81'}='с'; $map{'\\xD1\\x82'}='т'; $map{'\\xD1\\x83'}='у'; $map{'\\xD1\\x84'}='ф'; $map{'\\xD1\\x85'}='х'; $map{'\\xD1\\x86'}='ц'; $map{'\\xD1\\x87'}='ч'; $map{'\\xD1\\x88'}='ш'; $map{'\\xD1\\x89'}='щ'; $map{'\\xD1\\x8A'}='ъ'; $map{'\\xD1\\x8B'}='ы'; $map{'\\xD1\\x8C'}='ь'; $map{'\\xD1\\x8D'}='э'; $map{'\\xD1\\x8E'}='ю'; $map{'\\xD1\\x8F'}='я'; $map{'\\xD1\\x90'}='ѐ'; $map{'\\xD1\\x91'}='ё'; $map{'\\xD1\\x92'}='ђ'; $map{'\\xD1\\x93'}='ѓ'; $map{'\\xD1\\x94'}='є'; $map{'\\xD1\\x95'}='ѕ'; $map{'\\xD1\\x96'}='і'; $map{'\\xD1\\x97'}='ї'; $map{'\\xD1\\x98'}='ј'; $map{'\\xD1\\x99'}='љ'; $map{'\\xD1\\x9A'}='њ'; $map{'\\xD1\\x9B'}='ћ'; $map{'\\xD1\\x9C'}='ќ'; $map{'\\xD1\\x9D'}='ѝ'; $map{'\\xD1\\x9E'}='ў'; $map{'\\xD1\\x9F'}='џ'; $map{'\\xD1\\xA0'}='Ѡ'; $map{'\\xD1\\xA1'}='ѡ'; $map{'\\xD1\\xA2'}='Ѣ'; $map{'\\xD1\\xA3'}='ѣ'; $map{'\\xD1\\xA4'}='Ѥ'; $map{'\\xD1\\xA5'}='ѥ'; $map{'\\xD1\\xA6'}='Ѧ'; $map{'\\xD1\\xA7'}='ѧ'; $map{'\\xD1\\xA8'}='Ѩ'; $map{'\\xD1\\xA9'}='ѩ'; $map{'\\xD1\\xAA'}='Ѫ'; $map{'\\xD1\\xAB'}='ѫ'; $map{'\\xD1\\xAC'}='Ѭ'; $map{'\\xD1\\xAD'}='ѭ'; $map{'\\xD1\\xAE'}='Ѯ'; $map{'\\xD1\\xAF'}='ѯ'; $map{'\\xD1\\xB0'}='Ѱ'; $map{'\\xD1\\xB1'}='ѱ'; $map{'\\xD1\\xB2'}='Ѳ'; $map{'\\xD1\\xB3'}='ѳ'; $map{'\\xD1\\xB4'}='Ѵ'; $map{'\\xD1\\xB5'}='ѵ'; $map{'\\xD1\\xB6'}='Ѷ'; $map{'\\xD1\\xB7'}='ѷ'; $map{'\\xD1\\xB8'}='Ѹ'; $map{'\\xD1\\xB9'}='ѹ'; $map{'\\xD1\\xBA'}='Ѻ'; $map{'\\xD1\\xBB'}='ѻ'; $map{'\\xD1\\xBC'}='Ѽ'; $map{'\\xD1\\xBD'}='ѽ'; $map{'\\xD1\\xBE'}='Ѿ'; $map{'\\xD1\\xBF'}='ѿ'; $map{'\\xD2\\x80'}='Ҁ'; $map{'\\xD2\\x81'}='ҁ'; $map{'\\xD2\\x82'}='҂'; $map{'\\xD2\\x83'}='҃'; $map{'\\xD2\\x84'}='҄'; $map{'\\xD2\\x85'}='҅'; $map{'\\xD2\\x86'}='҆'; $map{'\\xD2\\x87'}='҇'; $map{'\\xD2\\x88'}='҈'; $map{'\\xD2\\x89'}='҉'; $map{'\\xD2\\x8A'}='Ҋ'; $map{'\\xD2\\x8B'}='ҋ'; $map{'\\xD2\\x8C'}='Ҍ'; $map{'\\xD2\\x8D'}='ҍ'; $map{'\\xD2\\x8E'}='Ҏ'; $map{'\\xD2\\x8F'}='ҏ'; $map{'\\xD2\\x90'}='Ґ'; $map{'\\xD2\\x91'}='ґ'; $map{'\\xD2\\x92'}='Ғ'; $map{'\\xD2\\x93'}='ғ'; $map{'\\xD2\\x94'}='Ҕ'; $map{'\\xD2\\x95'}='ҕ'; $map{'\\xD2\\x96'}='Җ'; $map{'\\xD2\\x97'}='җ'; $map{'\\xD2\\x98'}='Ҙ'; $map{'\\xD2\\x99'}='ҙ'; $map{'\\xD2\\x9A'}='Қ'; $map{'\\xD2\\x9B'}='қ'; $map{'\\xD2\\x9C'}='Ҝ'; $map{'\\xD2\\x9D'}='ҝ'; $map{'\\xD2\\x9E'}='Ҟ'; $map{'\\xD2\\x9F'}='ҟ'; $map{'\\xD2\\xA0'}='Ҡ'; $map{'\\xD2\\xA1'}='ҡ'; $map{'\\xD2\\xA2'}='Ң'; $map{'\\xD2\\xA3'}='ң'; $map{'\\xD2\\xA4'}='Ҥ'; $map{'\\xD2\\xA5'}='ҥ'; $map{'\\xD2\\xA6'}='Ҧ'; $map{'\\xD2\\xA7'}='ҧ'; $map{'\\xD2\\xA8'}='Ҩ'; $map{'\\xD2\\xA9'}='ҩ'; $map{'\\xD2\\xAA'}='Ҫ'; $map{'\\xD2\\xAB'}='ҫ'; $map{'\\xD2\\xAC'}='Ҭ'; $map{'\\xD2\\xAD'}='ҭ'; $map{'\\xD2\\xAE'}='Ү'; $map{'\\xD2\\xAF'}='ү'; $map{'\\xD2\\xB0'}='Ұ'; $map{'\\xD2\\xB1'}='ұ'; $map{'\\xD2\\xB2'}='Ҳ'; $map{'\\xD2\\xB3'}='ҳ'; $map{'\\xD2\\xB4'}='Ҵ'; $map{'\\xD2\\xB5'}='ҵ'; $map{'\\xD2\\xB6'}='Ҷ'; $map{'\\xD2\\xB7'}='ҷ'; $map{'\\xD2\\xB8'}='Ҹ'; $map{'\\xD2\\xB9'}='ҹ'; $map{'\\xD2\\xBA'}='Һ'; $map{'\\xD2\\xBB'}='һ'; $map{'\\xD2\\xBC'}='Ҽ'; $map{'\\xD2\\xBD'}='ҽ'; $map{'\\xD2\\xBE'}='Ҿ'; $map{'\\xD2\\xBF'}='ҿ'; $map{'\\xD3\\x80'}='Ӏ'; $map{'\\xD3\\x81'}='Ӂ'; $map{'\\xD3\\x82'}='ӂ'; $map{'\\xD3\\x83'}='Ӄ'; $map{'\\xD3\\x84'}='ӄ'; $map{'\\xD3\\x85'}='Ӆ'; $map{'\\xD3\\x86'}='ӆ'; $map{'\\xD3\\x87'}='Ӈ'; $map{'\\xD3\\x88'}='ӈ'; $map{'\\xD3\\x89'}='Ӊ'; $map{'\\xD3\\x8A'}='ӊ'; $map{'\\xD3\\x8B'}='Ӌ'; $map{'\\xD3\\x8C'}='ӌ'; $map{'\\xD3\\x8D'}='Ӎ'; $map{'\\xD3\\x8E'}='ӎ'; $map{'\\xD3\\x8F'}='ӏ'; $map{'\\xD3\\x90'}='Ӑ'; $map{'\\xD3\\x91'}='ӑ'; $map{'\\xD3\\x92'}='Ӓ'; $map{'\\xD3\\x93'}='ӓ'; $map{'\\xD3\\x94'}='Ӕ'; $map{'\\xD3\\x95'}='ӕ'; $map{'\\xD3\\x96'}='Ӗ'; $map{'\\xD3\\x97'}='ӗ'; $map{'\\xD3\\x98'}='Ә'; $map{'\\xD3\\x99'}='ә'; $map{'\\xD3\\x9A'}='Ӛ'; $map{'\\xD3\\x9B'}='ӛ'; $map{'\\xD3\\x9C'}='Ӝ'; $map{'\\xD3\\x9D'}='ӝ'; $map{'\\xD3\\x9E'}='Ӟ'; $map{'\\xD3\\x9F'}='ӟ'; $map{'\\xD3\\xA0'}='Ӡ'; $map{'\\xD3\\xA1'}='ӡ'; $map{'\\xD3\\xA2'}='Ӣ'; $map{'\\xD3\\xA3'}='ӣ'; $map{'\\xD3\\xA4'}='Ӥ'; $map{'\\xD3\\xA5'}='ӥ'; $map{'\\xD3\\xA6'}='Ӧ'; $map{'\\xD3\\xA7'}='ӧ'; $map{'\\xD3\\xA8'}='Ө'; $map{'\\xD3\\xA9'}='ө'; $map{'\\xD3\\xAA'}='Ӫ'; $map{'\\xD3\\xAB'}='ӫ'; $map{'\\xD3\\xAC'}='Ӭ'; $map{'\\xD3\\xAD'}='ӭ'; $map{'\\xD3\\xAE'}='Ӯ'; $map{'\\xD3\\xAF'}='ӯ'; $map{'\\xD3\\xB0'}='Ӱ'; $map{'\\xD3\\xB1'}='ӱ'; $map{'\\xD3\\xB2'}='Ӳ'; $map{'\\xD3\\xB3'}='ӳ'; $map{'\\xD3\\xB4'}='Ӵ'; $map{'\\xD3\\xB5'}='ӵ'; $map{'\\xD3\\xB6'}='Ӷ'; $map{'\\xD3\\xB7'}='ӷ'; $map{'\\xD3\\xB8'}='Ӹ'; $map{'\\xD3\\xB9'}='ӹ'; $map{'\\xD3\\xBA'}='Ӻ'; $map{'\\xD3\\xBB'}='ӻ'; $map{'\\xD3\\xBC'}='Ӽ'; $map{'\\xD3\\xBD'}='ӽ'; $map{'\\xD3\\xBE'}='Ӿ'; $map{'\\xD3\\xBF'}='ӿ'; $map{'\\xD4\\x80'}='Ԁ'; $map{'\\xD4\\x81'}='ԁ'; $map{'\\xD4\\x82'}='Ԃ'; $map{'\\xD4\\x83'}='ԃ'; $map{'\\xD4\\x84'}='Ԅ'; $map{'\\xD4\\x85'}='ԅ'; $map{'\\xD4\\x86'}='Ԇ'; $map{'\\xD4\\x87'}='ԇ'; $map{'\\xD4\\x88'}='Ԉ'; $map{'\\xD4\\x89'}='ԉ'; $map{'\\xD4\\x8A'}='Ԋ'; $map{'\\xD4\\x8B'}='ԋ'; $map{'\\xD4\\x8C'}='Ԍ'; $map{'\\xD4\\x8D'}='ԍ'; $map{'\\xD4\\x8E'}='Ԏ'; $map{'\\xD4\\x8F'}='ԏ'; $map{'\\xD4\\x90'}='Ԑ'; $map{'\\xD4\\x91'}='ԑ'; $map{'\\xD4\\x92'}='Ԓ'; $map{'\\xD4\\x93'}='ԓ'; $map{'\\xD4\\x94'}='Ԕ'; $map{'\\xD4\\x95'}='ԕ'; $map{'\\xD4\\x96'}='Ԗ'; $map{'\\xD4\\x97'}='ԗ'; $map{'\\xD4\\x98'}='Ԙ'; $map{'\\xD4\\x99'}='ԙ'; $map{'\\xD4\\x9A'}='Ԛ'; $map{'\\xD4\\x9B'}='ԛ'; $map{'\\xD4\\x9C'}='Ԝ'; $map{'\\xD4\\x9D'}='ԝ'; $map{'\\xD4\\x9E'}='Ԟ'; $map{'\\xD4\\x9F'}='ԟ'; $map{'\\xD4\\xA0'}='Ԡ'; $map{'\\xD4\\xA1'}='ԡ'; $map{'\\xD4\\xA2'}='Ԣ'; $map{'\\xD4\\xA3'}='ԣ'; $map{'\\xD4\\xA4'}='Ԥ'; $map{'\\xD4\\xA5'}='ԥ'; $map{'\\xD4\\xA6'}='Ԧ'; $map{'\\xD4\\xA7'}='ԧ'; $map{'\\xD4\\xA8'}='Ԩ'; $map{'\\xD4\\xA9'}='ԩ'; $map{'\\xD4\\xAA'}='Ԫ'; $map{'\\xD4\\xAB'}='ԫ'; $map{'\\xD4\\xAC'}='Ԭ'; $map{'\\xD4\\xAD'}='ԭ'; $map{'\\xD4\\xAE'}='Ԯ'; $map{'\\xD4\\xAF'}='ԯ'; $map{'\\xD4\\xB0'}='԰'; $map{'\\xD4\\xB1'}='Ա'; $map{'\\xD4\\xB2'}='Բ'; $map{'\\xD4\\xB3'}='Գ'; $map{'\\xD4\\xB4'}='Դ'; $map{'\\xD4\\xB5'}='Ե'; $map{'\\xD4\\xB6'}='Զ'; $map{'\\xD4\\xB7'}='Է'; $map{'\\xD4\\xB8'}='Ը'; $map{'\\xD4\\xB9'}='Թ'; $map{'\\xD4\\xBA'}='Ժ'; $map{'\\xD4\\xBB'}='Ի'; $map{'\\xD4\\xBC'}='Լ'; $map{'\\xD4\\xBD'}='Խ'; $map{'\\xD4\\xBE'}='Ծ'; $map{'\\xD4\\xBF'}='Կ'; $map{'\\xD5\\x80'}='Հ'; $map{'\\xD5\\x81'}='Ձ'; $map{'\\xD5\\x82'}='Ղ'; $map{'\\xD5\\x83'}='Ճ'; $map{'\\xD5\\x84'}='Մ'; $map{'\\xD5\\x85'}='Յ'; $map{'\\xD5\\x86'}='Ն'; $map{'\\xD5\\x87'}='Շ'; $map{'\\xD5\\x88'}='Ո'; $map{'\\xD5\\x89'}='Չ'; $map{'\\xD5\\x8A'}='Պ'; $map{'\\xD5\\x8B'}='Ջ'; $map{'\\xD5\\x8C'}='Ռ'; $map{'\\xD5\\x8D'}='Ս'; $map{'\\xD5\\x8E'}='Վ'; $map{'\\xD5\\x8F'}='Տ'; $map{'\\xD5\\x90'}='Ր'; $map{'\\xD5\\x91'}='Ց'; $map{'\\xD5\\x92'}='Ւ'; $map{'\\xD5\\x93'}='Փ'; $map{'\\xD5\\x94'}='Ք'; $map{'\\xD5\\x95'}='Օ'; $map{'\\xD5\\x96'}='Ֆ'; $map{'\\xD5\\x97'}='՗'; $map{'\\xD5\\x98'}='՘'; $map{'\\xD5\\x99'}='ՙ'; $map{'\\xD5\\x9A'}='՚'; $map{'\\xD5\\x9B'}='՛'; $map{'\\xD5\\x9C'}='՜'; $map{'\\xD5\\x9D'}='՝'; $map{'\\xD5\\x9E'}='՞'; $map{'\\xD5\\x9F'}='՟'; $map{'\\xD5\\xA0'}='ՠ'; $map{'\\xD5\\xA1'}='ա'; $map{'\\xD5\\xA2'}='բ'; $map{'\\xD5\\xA3'}='գ'; $map{'\\xD5\\xA4'}='դ'; $map{'\\xD5\\xA5'}='ե'; $map{'\\xD5\\xA6'}='զ'; $map{'\\xD5\\xA7'}='է'; $map{'\\xD5\\xA8'}='ը'; $map{'\\xD5\\xA9'}='թ'; $map{'\\xD5\\xAA'}='ժ'; $map{'\\xD5\\xAB'}='ի'; $map{'\\xD5\\xAC'}='լ'; $map{'\\xD5\\xAD'}='խ'; $map{'\\xD5\\xAE'}='ծ'; $map{'\\xD5\\xAF'}='կ'; $map{'\\xD5\\xB0'}='հ'; $map{'\\xD5\\xB1'}='ձ'; $map{'\\xD5\\xB2'}='ղ'; $map{'\\xD5\\xB3'}='ճ'; $map{'\\xD5\\xB4'}='մ'; $map{'\\xD5\\xB5'}='յ'; $map{'\\xD5\\xB6'}='ն'; $map{'\\xD5\\xB7'}='շ'; $map{'\\xD5\\xB8'}='ո'; $map{'\\xD5\\xB9'}='չ'; $map{'\\xD5\\xBA'}='պ'; $map{'\\xD5\\xBB'}='ջ'; $map{'\\xD5\\xBC'}='ռ'; $map{'\\xD5\\xBD'}='ս'; $map{'\\xD5\\xBE'}='վ'; $map{'\\xD5\\xBF'}='տ'; $map{'\\xD6\\x80'}='ր'; $map{'\\xD6\\x81'}='ց'; $map{'\\xD6\\x82'}='ւ'; $map{'\\xD6\\x83'}='փ'; $map{'\\xD6\\x84'}='ք'; $map{'\\xD6\\x85'}='օ'; $map{'\\xD6\\x86'}='ֆ'; $map{'\\xD6\\x87'}='և'; $map{'\\xD6\\x88'}='ֈ'; $map{'\\xD6\\x89'}='։'; $map{'\\xD6\\x8A'}='֊'; $map{'\\xD6\\x8B'}='֋'; $map{'\\xD6\\x8C'}='֌'; $map{'\\xD6\\x8D'}='֍'; $map{'\\xD6\\x8E'}='֎'; $map{'\\xD6\\x8F'}='֏'; # START: ISO-8859-8 -> Hebrew $map{'\\xD6\\x90'}='֐'; $map{'\\xD6\\x91'}='֑'; $map{'\\xD6\\x92'}='֒'; $map{'\\xD6\\x93'}='֓'; $map{'\\xD6\\x94'}='֔'; $map{'\\xD6\\x95'}='֕'; $map{'\\xD6\\x96'}='֖'; $map{'\\xD6\\x97'}='֗'; $map{'\\xD6\\x98'}='֘'; $map{'\\xD6\\x99'}='֙'; $map{'\\xD6\\x9A'}='֚'; $map{'\\xD6\\x9B'}='֛'; $map{'\\xD6\\x9C'}='֜'; $map{'\\xD6\\x9D'}='֝'; $map{'\\xD6\\x9E'}='֞'; $map{'\\xD6\\x9F'}='֟'; $map{'\\xD6\\xA0'}='֠'; $map{'\\xD6\\xA1'}='֡'; $map{'\\xD6\\xA2'}='֢'; $map{'\\xD6\\xA3'}='֣'; $map{'\\xD6\\xA4'}='֤'; $map{'\\xD6\\xA5'}='֥'; $map{'\\xD6\\xA6'}='֦'; $map{'\\xD6\\xA7'}='֧'; $map{'\\xD6\\xA8'}='֨'; $map{'\\xD6\\xA9'}='֩'; $map{'\\xD6\\xAA'}='֪'; $map{'\\xD6\\xAB'}='֫'; $map{'\\xD6\\xAC'}='֬'; $map{'\\xD6\\xAD'}='֭'; $map{'\\xD6\\xAE'}='֮'; $map{'\\xD6\\xAF'}='֯'; $map{'\\xD6\\xB0'}='ְ'; $map{'\\xD6\\xB1'}='ֱ'; $map{'\\xD6\\xB2'}='ֲ'; $map{'\\xD6\\xB3'}='ֳ'; $map{'\\xD6\\xB4'}='ִ'; $map{'\\xD6\\xB5'}='ֵ'; $map{'\\xD6\\xB6'}='ֶ'; $map{'\\xD6\\xB7'}='ַ'; $map{'\\xD6\\xB8'}='ָ'; $map{'\\xD6\\xB9'}='ֹ'; $map{'\\xD6\\xBA'}='ֺ'; $map{'\\xD6\\xBB'}='ֻ'; $map{'\\xD6\\xBC'}='ּ'; $map{'\\xD6\\xBD'}='ֽ'; $map{'\\xD6\\xBE'}='־'; $map{'\\xD6\\xBF'}='ֿ'; $map{'\\xD7\\x80'}='׀'; $map{'\\xD7\\x81'}='ׁ'; $map{'\\xD7\\x82'}='ׂ'; $map{'\\xD7\\x83'}='׃'; $map{'\\xD7\\x84'}='ׄ'; $map{'\\xD7\\x85'}='ׅ'; $map{'\\xD7\\x86'}='׆'; $map{'\\xD7\\x87'}='ׇ'; $map{'\\xD7\\x88'}='׈'; $map{'\\xD7\\x89'}='׉'; $map{'\\xD7\\x8A'}='׊'; $map{'\\xD7\\x8B'}='׋'; $map{'\\xD7\\x8C'}='׌'; $map{'\\xD7\\x8D'}='׍'; $map{'\\xD7\\x8E'}='׎'; $map{'\\xD7\\x8F'}='׏'; $map{'\\xD7\\x90'}='א'; $map{'\\xD7\\x91'}='ב'; $map{'\\xD7\\x92'}='ג'; $map{'\\xD7\\x93'}='ד'; $map{'\\xD7\\x94'}='ה'; $map{'\\xD7\\x95'}='ו'; $map{'\\xD7\\x96'}='ז'; $map{'\\xD7\\x97'}='ח'; $map{'\\xD7\\x98'}='ט'; $map{'\\xD7\\x99'}='י'; $map{'\\xD7\\x9A'}='ך'; $map{'\\xD7\\x9B'}='כ'; $map{'\\xD7\\x9C'}='ל'; $map{'\\xD7\\x9D'}='ם'; $map{'\\xD7\\x9E'}='מ'; $map{'\\xD7\\x9F'}='ן'; $map{'\\xD7\\xA0'}='נ'; $map{'\\xD7\\xA1'}='ס'; $map{'\\xD7\\xA2'}='ע'; $map{'\\xD7\\xA3'}='ף'; $map{'\\xD7\\xA4'}='פ'; $map{'\\xD7\\xA5'}='ץ'; $map{'\\xD7\\xA6'}='צ'; $map{'\\xD7\\xA7'}='ק'; $map{'\\xD7\\xA8'}='ר'; $map{'\\xD7\\xA9'}='ש'; $map{'\\xD7\\xAA'}='ת'; $map{'\\xD7\\xAB'}='׫'; $map{'\\xD7\\xAC'}='׬'; $map{'\\xD7\\xAD'}='׭'; $map{'\\xD7\\xAE'}='׮'; $map{'\\xD7\\xAF'}='ׯ'; $map{'\\xD7\\xB0'}='װ'; $map{'\\xD7\\xB1'}='ױ'; $map{'\\xD7\\xB2'}='ײ'; $map{'\\xD7\\xB3'}='׳'; $map{'\\xD7\\xB4'}='״'; $map{'\\xD7\\xB5'}='׵'; $map{'\\xD7\\xB6'}='׶'; $map{'\\xD7\\xB7'}='׷'; $map{'\\xD7\\xB8'}='׸'; $map{'\\xD7\\xB9'}='׹'; $map{'\\xD7\\xBA'}='׺'; $map{'\\xD7\\xBB'}='׻'; $map{'\\xD7\\xBC'}='׼'; $map{'\\xD7\\xBD'}='׽'; $map{'\\xD7\\xBE'}='׾'; $map{'\\xD7\\xBF'}='׿'; # END: ISO-8859-8, Hebrew $map{'\\xD8\\x80'}='؀'; $map{'\\xD8\\x81'}='؁'; $map{'\\xD8\\x82'}='؂'; $map{'\\xD8\\x83'}='؃'; $map{'\\xD8\\x84'}='؄'; $map{'\\xD8\\x85'}='؅'; $map{'\\xD8\\x86'}='؆'; $map{'\\xD8\\x87'}='؇'; $map{'\\xD8\\x88'}='؈'; $map{'\\xD8\\x89'}='؉'; $map{'\\xD8\\x8A'}='؊'; $map{'\\xD8\\x8B'}='؋'; $map{'\\xD8\\x8C'}='،'; $map{'\\xD8\\x8D'}='؍'; $map{'\\xD8\\x8E'}='؎'; $map{'\\xD8\\x8F'}='؏'; $map{'\\xD8\\x90'}='ؐ'; $map{'\\xD8\\x91'}='ؑ'; $map{'\\xD8\\x92'}='ؒ'; $map{'\\xD8\\x93'}='ؓ'; $map{'\\xD8\\x94'}='ؔ'; $map{'\\xD8\\x95'}='ؕ'; $map{'\\xD8\\x96'}='ؖ'; $map{'\\xD8\\x97'}='ؗ'; $map{'\\xD8\\x98'}='ؘ'; $map{'\\xD8\\x99'}='ؙ'; $map{'\\xD8\\x9A'}='ؚ'; $map{'\\xD8\\x9B'}='؛'; $map{'\\xD8\\x9C'}='؜'; $map{'\\xD8\\x9D'}='؝'; $map{'\\xD8\\x9E'}='؞'; $map{'\\xD8\\x9F'}='؟'; $map{'\\xD8\\xA0'}='ؠ'; $map{'\\xD8\\xA1'}='ء'; $map{'\\xD8\\xA2'}='آ'; $map{'\\xD8\\xA3'}='أ'; $map{'\\xD8\\xA4'}='ؤ'; $map{'\\xD8\\xA5'}='إ'; $map{'\\xD8\\xA6'}='ئ'; $map{'\\xD8\\xA7'}='ا'; $map{'\\xD8\\xA8'}='ب'; $map{'\\xD8\\xA9'}='ة'; $map{'\\xD8\\xAA'}='ت'; $map{'\\xD8\\xAB'}='ث'; $map{'\\xD8\\xAC'}='ج'; $map{'\\xD8\\xAD'}='ح'; $map{'\\xD8\\xAE'}='خ'; $map{'\\xD8\\xAF'}='د'; $map{'\\xD8\\xB0'}='ذ'; $map{'\\xD8\\xB1'}='ر'; $map{'\\xD8\\xB2'}='ز'; $map{'\\xD8\\xB3'}='س'; $map{'\\xD8\\xB4'}='ش'; $map{'\\xD8\\xB5'}='ص'; $map{'\\xD8\\xB6'}='ض'; $map{'\\xD8\\xB7'}='ط'; $map{'\\xD8\\xB8'}='ظ'; $map{'\\xD8\\xB9'}='ع'; $map{'\\xD8\\xBA'}='غ'; $map{'\\xD8\\xBB'}='ػ'; $map{'\\xD8\\xBC'}='ؼ'; $map{'\\xD8\\xBD'}='ؽ'; $map{'\\xD8\\xBE'}='ؾ'; $map{'\\xD8\\xBF'}='ؿ'; $map{'\\xD9\\x80'}='ـ'; $map{'\\xD9\\x81'}='ف'; $map{'\\xD9\\x82'}='ق'; $map{'\\xD9\\x83'}='ك'; $map{'\\xD9\\x84'}='ل'; $map{'\\xD9\\x85'}='م'; $map{'\\xD9\\x86'}='ن'; $map{'\\xD9\\x87'}='ه'; $map{'\\xD9\\x88'}='و'; $map{'\\xD9\\x89'}='ى'; $map{'\\xD9\\x8A'}='ي'; $map{'\\xD9\\x8B'}='ً'; $map{'\\xD9\\x8C'}='ٌ'; $map{'\\xD9\\x8D'}='ٍ'; $map{'\\xD9\\x8E'}='َ'; $map{'\\xD9\\x8F'}='ُ'; $map{'\\xD9\\x90'}='ِ'; $map{'\\xD9\\x91'}='ّ'; $map{'\\xD9\\x92'}='ْ'; $map{'\\xD9\\x93'}='ٓ'; $map{'\\xD9\\x94'}='ٔ'; $map{'\\xD9\\x95'}='ٕ'; $map{'\\xD9\\x96'}='ٖ'; $map{'\\xD9\\x97'}='ٗ'; $map{'\\xD9\\x98'}='٘'; $map{'\\xD9\\x99'}='ٙ'; $map{'\\xD9\\x9A'}='ٚ'; $map{'\\xD9\\x9B'}='ٛ'; $map{'\\xD9\\x9C'}='ٜ'; $map{'\\xD9\\x9D'}='ٝ'; $map{'\\xD9\\x9E'}='ٞ'; $map{'\\xD9\\x9F'}='ٟ'; $map{'\\xD9\\xA0'}='٠'; $map{'\\xD9\\xA1'}='١'; $map{'\\xD9\\xA2'}='٢'; $map{'\\xD9\\xA3'}='٣'; $map{'\\xD9\\xA4'}='٤'; $map{'\\xD9\\xA5'}='٥'; $map{'\\xD9\\xA6'}='٦'; $map{'\\xD9\\xA7'}='٧'; $map{'\\xD9\\xA8'}='٨'; $map{'\\xD9\\xA9'}='٩'; $map{'\\xD9\\xAA'}='٪'; $map{'\\xD9\\xAB'}='٫'; $map{'\\xD9\\xAC'}='٬'; $map{'\\xD9\\xAD'}='٭'; $map{'\\xD9\\xAE'}='ٮ'; $map{'\\xD9\\xAF'}='ٯ'; $map{'\\xD9\\xB0'}='ٰ'; $map{'\\xD9\\xB1'}='ٱ'; $map{'\\xD9\\xB2'}='ٲ'; $map{'\\xD9\\xB3'}='ٳ'; $map{'\\xD9\\xB4'}='ٴ'; $map{'\\xD9\\xB5'}='ٵ'; $map{'\\xD9\\xB6'}='ٶ'; $map{'\\xD9\\xB7'}='ٷ'; $map{'\\xD9\\xB8'}='ٸ'; $map{'\\xD9\\xB9'}='ٹ'; $map{'\\xD9\\xBA'}='ٺ'; $map{'\\xD9\\xBB'}='ٻ'; $map{'\\xD9\\xBC'}='ټ'; $map{'\\xD9\\xBD'}='ٽ'; $map{'\\xD9\\xBE'}='پ'; $map{'\\xD9\\xBF'}='ٿ'; $map{'\\xDA\\x80'}='ڀ'; $map{'\\xDA\\x81'}='ځ'; $map{'\\xDA\\x82'}='ڂ'; $map{'\\xDA\\x83'}='ڃ'; $map{'\\xDA\\x84'}='ڄ'; $map{'\\xDA\\x85'}='څ'; $map{'\\xDA\\x86'}='چ'; $map{'\\xDA\\x87'}='ڇ'; $map{'\\xDA\\x88'}='ڈ'; $map{'\\xDA\\x89'}='ډ'; $map{'\\xDA\\x8A'}='ڊ'; $map{'\\xDA\\x8B'}='ڋ'; $map{'\\xDA\\x8C'}='ڌ'; $map{'\\xDA\\x8D'}='ڍ'; $map{'\\xDA\\x8E'}='ڎ'; $map{'\\xDA\\x8F'}='ڏ'; $map{'\\xDA\\x90'}='ڐ'; $map{'\\xDA\\x91'}='ڑ'; $map{'\\xDA\\x92'}='ڒ'; $map{'\\xDA\\x93'}='ړ'; $map{'\\xDA\\x94'}='ڔ'; $map{'\\xDA\\x95'}='ڕ'; $map{'\\xDA\\x96'}='ږ'; $map{'\\xDA\\x97'}='ڗ'; $map{'\\xDA\\x98'}='ژ'; $map{'\\xDA\\x99'}='ڙ'; $map{'\\xDA\\x9A'}='ښ'; $map{'\\xDA\\x9B'}='ڛ'; $map{'\\xDA\\x9C'}='ڜ'; $map{'\\xDA\\x9D'}='ڝ'; $map{'\\xDA\\x9E'}='ڞ'; $map{'\\xDA\\x9F'}='ڟ'; $map{'\\xDA\\xA0'}='ڠ'; $map{'\\xDA\\xA1'}='ڡ'; $map{'\\xDA\\xA2'}='ڢ'; $map{'\\xDA\\xA3'}='ڣ'; $map{'\\xDA\\xA4'}='ڤ'; $map{'\\xDA\\xA5'}='ڥ'; $map{'\\xDA\\xA6'}='ڦ'; $map{'\\xDA\\xA7'}='ڧ'; $map{'\\xDA\\xA8'}='ڨ'; $map{'\\xDA\\xA9'}='ک'; $map{'\\xDA\\xAA'}='ڪ'; $map{'\\xDA\\xAB'}='ګ'; $map{'\\xDA\\xAC'}='ڬ'; $map{'\\xDA\\xAD'}='ڭ'; $map{'\\xDA\\xAE'}='ڮ'; $map{'\\xDA\\xAF'}='گ'; $map{'\\xDA\\xB0'}='ڰ'; $map{'\\xDA\\xB1'}='ڱ'; $map{'\\xDA\\xB2'}='ڲ'; $map{'\\xDA\\xB3'}='ڳ'; $map{'\\xDA\\xB4'}='ڴ'; $map{'\\xDA\\xB5'}='ڵ'; $map{'\\xDA\\xB6'}='ڶ'; $map{'\\xDA\\xB7'}='ڷ'; $map{'\\xDA\\xB8'}='ڸ'; $map{'\\xDA\\xB9'}='ڹ'; $map{'\\xDA\\xBA'}='ں'; $map{'\\xDA\\xBB'}='ڻ'; $map{'\\xDA\\xBC'}='ڼ'; $map{'\\xDA\\xBD'}='ڽ'; $map{'\\xDA\\xBE'}='ھ'; $map{'\\xDA\\xBF'}='ڿ'; $map{'\\xDB\\x80'}='ۀ'; $map{'\\xDB\\x81'}='ہ'; $map{'\\xDB\\x82'}='ۂ'; $map{'\\xDB\\x83'}='ۃ'; $map{'\\xDB\\x84'}='ۄ'; $map{'\\xDB\\x85'}='ۅ'; $map{'\\xDB\\x86'}='ۆ'; $map{'\\xDB\\x87'}='ۇ'; $map{'\\xDB\\x88'}='ۈ'; $map{'\\xDB\\x89'}='ۉ'; $map{'\\xDB\\x8A'}='ۊ'; $map{'\\xDB\\x8B'}='ۋ'; $map{'\\xDB\\x8C'}='ی'; $map{'\\xDB\\x8D'}='ۍ'; $map{'\\xDB\\x8E'}='ێ'; $map{'\\xDB\\x8F'}='ۏ'; $map{'\\xDB\\x90'}='ې'; $map{'\\xDB\\x91'}='ۑ'; $map{'\\xDB\\x92'}='ے'; $map{'\\xDB\\x93'}='ۓ'; $map{'\\xDB\\x94'}='۔'; $map{'\\xDB\\x95'}='ە'; $map{'\\xDB\\x96'}='ۖ'; $map{'\\xDB\\x97'}='ۗ'; $map{'\\xDB\\x98'}='ۘ'; $map{'\\xDB\\x99'}='ۙ'; $map{'\\xDB\\x9A'}='ۚ'; $map{'\\xDB\\x9B'}='ۛ'; $map{'\\xDB\\x9C'}='ۜ'; $map{'\\xDB\\x9D'}='۝'; $map{'\\xDB\\x9E'}='۞'; $map{'\\xDB\\x9F'}='۟'; $map{'\\xDB\\xA0'}='۠'; $map{'\\xDB\\xA1'}='ۡ'; $map{'\\xDB\\xA2'}='ۢ'; $map{'\\xDB\\xA3'}='ۣ'; $map{'\\xDB\\xA4'}='ۤ'; $map{'\\xDB\\xA5'}='ۥ'; $map{'\\xDB\\xA6'}='ۦ'; $map{'\\xDB\\xA7'}='ۧ'; $map{'\\xDB\\xA8'}='ۨ'; $map{'\\xDB\\xA9'}='۩'; $map{'\\xDB\\xAA'}='۪'; $map{'\\xDB\\xAB'}='۫'; $map{'\\xDB\\xAC'}='۬'; $map{'\\xDB\\xAD'}='ۭ'; $map{'\\xDB\\xAE'}='ۮ'; $map{'\\xDB\\xAF'}='ۯ'; $map{'\\xDB\\xB0'}='۰'; $map{'\\xDB\\xB1'}='۱'; $map{'\\xDB\\xB2'}='۲'; $map{'\\xDB\\xB3'}='۳'; $map{'\\xDB\\xB4'}='۴'; $map{'\\xDB\\xB5'}='۵'; $map{'\\xDB\\xB6'}='۶'; $map{'\\xDB\\xB7'}='۷'; $map{'\\xDB\\xB8'}='۸'; $map{'\\xDB\\xB9'}='۹'; $map{'\\xDB\\xBA'}='ۺ'; $map{'\\xDB\\xBB'}='ۻ'; $map{'\\xDB\\xBC'}='ۼ'; $map{'\\xDB\\xBD'}='۽'; $map{'\\xDB\\xBE'}='۾'; $map{'\\xDB\\xBF'}='ۿ'; $map{'\\xDC\\x80'}='܀'; $map{'\\xDC\\x81'}='܁'; $map{'\\xDC\\x82'}='܂'; $map{'\\xDC\\x83'}='܃'; $map{'\\xDC\\x84'}='܄'; $map{'\\xDC\\x85'}='܅'; $map{'\\xDC\\x86'}='܆'; $map{'\\xDC\\x87'}='܇'; $map{'\\xDC\\x88'}='܈'; $map{'\\xDC\\x89'}='܉'; $map{'\\xDC\\x8A'}='܊'; $map{'\\xDC\\x8B'}='܋'; $map{'\\xDC\\x8C'}='܌'; $map{'\\xDC\\x8D'}='܍'; $map{'\\xDC\\x8E'}='܎'; $map{'\\xDC\\x8F'}='܏'; $map{'\\xDC\\x90'}='ܐ'; $map{'\\xDC\\x91'}='ܑ'; $map{'\\xDC\\x92'}='ܒ'; $map{'\\xDC\\x93'}='ܓ'; $map{'\\xDC\\x94'}='ܔ'; $map{'\\xDC\\x95'}='ܕ'; $map{'\\xDC\\x96'}='ܖ'; $map{'\\xDC\\x97'}='ܗ'; $map{'\\xDC\\x98'}='ܘ'; $map{'\\xDC\\x99'}='ܙ'; $map{'\\xDC\\x9A'}='ܚ'; $map{'\\xDC\\x9B'}='ܛ'; $map{'\\xDC\\x9C'}='ܜ'; $map{'\\xDC\\x9D'}='ܝ'; $map{'\\xDC\\x9E'}='ܞ'; $map{'\\xDC\\x9F'}='ܟ'; $map{'\\xDC\\xA0'}='ܠ'; $map{'\\xDC\\xA1'}='ܡ'; $map{'\\xDC\\xA2'}='ܢ'; $map{'\\xDC\\xA3'}='ܣ'; $map{'\\xDC\\xA4'}='ܤ'; $map{'\\xDC\\xA5'}='ܥ'; $map{'\\xDC\\xA6'}='ܦ'; $map{'\\xDC\\xA7'}='ܧ'; $map{'\\xDC\\xA8'}='ܨ'; $map{'\\xDC\\xA9'}='ܩ'; $map{'\\xDC\\xAA'}='ܪ'; $map{'\\xDC\\xAB'}='ܫ'; $map{'\\xDC\\xAC'}='ܬ'; $map{'\\xDC\\xAD'}='ܭ'; $map{'\\xDC\\xAE'}='ܮ'; $map{'\\xDC\\xAF'}='ܯ'; $map{'\\xDC\\xB0'}='ܰ'; $map{'\\xDC\\xB1'}='ܱ'; $map{'\\xDC\\xB2'}='ܲ'; $map{'\\xDC\\xB3'}='ܳ'; $map{'\\xDC\\xB4'}='ܴ'; $map{'\\xDC\\xB5'}='ܵ'; $map{'\\xDC\\xB6'}='ܶ'; $map{'\\xDC\\xB7'}='ܷ'; $map{'\\xDC\\xB8'}='ܸ'; $map{'\\xDC\\xB9'}='ܹ'; $map{'\\xDC\\xBA'}='ܺ'; $map{'\\xDC\\xBB'}='ܻ'; $map{'\\xDC\\xBC'}='ܼ'; $map{'\\xDC\\xBD'}='ܽ'; $map{'\\xDC\\xBE'}='ܾ'; $map{'\\xDC\\xBF'}='ܿ'; $map{'\\xDD\\x80'}='݀'; $map{'\\xDD\\x81'}='݁'; $map{'\\xDD\\x82'}='݂'; $map{'\\xDD\\x83'}='݃'; $map{'\\xDD\\x84'}='݄'; $map{'\\xDD\\x85'}='݅'; $map{'\\xDD\\x86'}='݆'; $map{'\\xDD\\x87'}='݇'; $map{'\\xDD\\x88'}='݈'; $map{'\\xDD\\x89'}='݉'; $map{'\\xDD\\x8A'}='݊'; $map{'\\xDD\\x8B'}='݋'; $map{'\\xDD\\x8C'}='݌'; $map{'\\xDD\\x8D'}='ݍ'; $map{'\\xDD\\x8E'}='ݎ'; $map{'\\xDD\\x8F'}='ݏ'; $map{'\\xDD\\x90'}='ݐ'; $map{'\\xDD\\x91'}='ݑ'; $map{'\\xDD\\x92'}='ݒ'; $map{'\\xDD\\x93'}='ݓ'; $map{'\\xDD\\x94'}='ݔ'; $map{'\\xDD\\x95'}='ݕ'; $map{'\\xDD\\x96'}='ݖ'; $map{'\\xDD\\x97'}='ݗ'; $map{'\\xDD\\x98'}='ݘ'; $map{'\\xDD\\x99'}='ݙ'; $map{'\\xDD\\x9A'}='ݚ'; $map{'\\xDD\\x9B'}='ݛ'; $map{'\\xDD\\x9C'}='ݜ'; $map{'\\xDD\\x9D'}='ݝ'; $map{'\\xDD\\x9E'}='ݞ'; $map{'\\xDD\\x9F'}='ݟ'; $map{'\\xDD\\xA0'}='ݠ'; $map{'\\xDD\\xA1'}='ݡ'; $map{'\\xDD\\xA2'}='ݢ'; $map{'\\xDD\\xA3'}='ݣ'; $map{'\\xDD\\xA4'}='ݤ'; $map{'\\xDD\\xA5'}='ݥ'; $map{'\\xDD\\xA6'}='ݦ'; $map{'\\xDD\\xA7'}='ݧ'; $map{'\\xDD\\xA8'}='ݨ'; $map{'\\xDD\\xA9'}='ݩ'; $map{'\\xDD\\xAA'}='ݪ'; $map{'\\xDD\\xAB'}='ݫ'; $map{'\\xDD\\xAC'}='ݬ'; $map{'\\xDD\\xAD'}='ݭ'; $map{'\\xDD\\xAE'}='ݮ'; $map{'\\xDD\\xAF'}='ݯ'; $map{'\\xDD\\xB0'}='ݰ'; $map{'\\xDD\\xB1'}='ݱ'; $map{'\\xDD\\xB2'}='ݲ'; $map{'\\xDD\\xB3'}='ݳ'; $map{'\\xDD\\xB4'}='ݴ'; $map{'\\xDD\\xB5'}='ݵ'; $map{'\\xDD\\xB6'}='ݶ'; $map{'\\xDD\\xB7'}='ݷ'; $map{'\\xDD\\xB8'}='ݸ'; $map{'\\xDD\\xB9'}='ݹ'; $map{'\\xDD\\xBA'}='ݺ'; $map{'\\xDD\\xBB'}='ݻ'; $map{'\\xDD\\xBC'}='ݼ'; $map{'\\xDD\\xBD'}='ݽ'; $map{'\\xDD\\xBE'}='ݾ'; $map{'\\xDD\\xBF'}='ݿ'; $map{'\\xDE\\x80'}='ހ'; $map{'\\xDE\\x81'}='ށ'; $map{'\\xDE\\x82'}='ނ'; $map{'\\xDE\\x83'}='ރ'; $map{'\\xDE\\x84'}='ބ'; $map{'\\xDE\\x85'}='ޅ'; $map{'\\xDE\\x86'}='ކ'; $map{'\\xDE\\x87'}='އ'; $map{'\\xDE\\x88'}='ވ'; $map{'\\xDE\\x89'}='މ'; $map{'\\xDE\\x8A'}='ފ'; $map{'\\xDE\\x8B'}='ދ'; $map{'\\xDE\\x8C'}='ތ'; $map{'\\xDE\\x8D'}='ލ'; $map{'\\xDE\\x8E'}='ގ'; $map{'\\xDE\\x8F'}='ޏ'; $map{'\\xDE\\x90'}='ސ'; $map{'\\xDE\\x91'}='ޑ'; $map{'\\xDE\\x92'}='ޒ'; $map{'\\xDE\\x93'}='ޓ'; $map{'\\xDE\\x94'}='ޔ'; $map{'\\xDE\\x95'}='ޕ'; $map{'\\xDE\\x96'}='ޖ'; $map{'\\xDE\\x97'}='ޗ'; $map{'\\xDE\\x98'}='ޘ'; $map{'\\xDE\\x99'}='ޙ'; $map{'\\xDE\\x9A'}='ޚ'; $map{'\\xDE\\x9B'}='ޛ'; $map{'\\xDE\\x9C'}='ޜ'; $map{'\\xDE\\x9D'}='ޝ'; $map{'\\xDE\\x9E'}='ޞ'; $map{'\\xDE\\x9F'}='ޟ'; $map{'\\xDE\\xA0'}='ޠ'; $map{'\\xDE\\xA1'}='ޡ'; $map{'\\xDE\\xA2'}='ޢ'; $map{'\\xDE\\xA3'}='ޣ'; $map{'\\xDE\\xA4'}='ޤ'; $map{'\\xDE\\xA5'}='ޥ'; $map{'\\xDE\\xA6'}='ަ'; $map{'\\xDE\\xA7'}='ާ'; $map{'\\xDE\\xA8'}='ި'; $map{'\\xDE\\xA9'}='ީ'; $map{'\\xDE\\xAA'}='ު'; $map{'\\xDE\\xAB'}='ޫ'; $map{'\\xDE\\xAC'}='ެ'; $map{'\\xDE\\xAD'}='ޭ'; $map{'\\xDE\\xAE'}='ޮ'; $map{'\\xDE\\xAF'}='ޯ'; $map{'\\xDE\\xB0'}='ް'; $map{'\\xDE\\xB1'}='ޱ'; $map{'\\xDE\\xB2'}='޲'; $map{'\\xDE\\xB3'}='޳'; $map{'\\xDE\\xB4'}='޴'; $map{'\\xDE\\xB5'}='޵'; $map{'\\xDE\\xB6'}='޶'; $map{'\\xDE\\xB7'}='޷'; $map{'\\xDE\\xB8'}='޸'; $map{'\\xDE\\xB9'}='޹'; $map{'\\xDE\\xBA'}='޺'; $map{'\\xDE\\xBB'}='޻'; $map{'\\xDE\\xBC'}='޼'; $map{'\\xDE\\xBD'}='޽'; $map{'\\xDE\\xBE'}='޾'; $map{'\\xDE\\xBF'}='޿'; $map{'\\xDF\\x80'}='߀'; $map{'\\xDF\\x81'}='߁'; $map{'\\xDF\\x82'}='߂'; $map{'\\xDF\\x83'}='߃'; $map{'\\xDF\\x84'}='߄'; $map{'\\xDF\\x85'}='߅'; $map{'\\xDF\\x86'}='߆'; $map{'\\xDF\\x87'}='߇'; $map{'\\xDF\\x88'}='߈'; $map{'\\xDF\\x89'}='߉'; $map{'\\xDF\\x8A'}='ߊ'; $map{'\\xDF\\x8B'}='ߋ'; $map{'\\xDF\\x8C'}='ߌ'; $map{'\\xDF\\x8D'}='ߍ'; $map{'\\xDF\\x8E'}='ߎ'; $map{'\\xDF\\x8F'}='ߏ'; $map{'\\xDF\\x90'}='ߐ'; $map{'\\xDF\\x91'}='ߑ'; $map{'\\xDF\\x92'}='ߒ'; $map{'\\xDF\\x93'}='ߓ'; $map{'\\xDF\\x94'}='ߔ'; $map{'\\xDF\\x95'}='ߕ'; $map{'\\xDF\\x96'}='ߖ'; $map{'\\xDF\\x97'}='ߗ'; $map{'\\xDF\\x98'}='ߘ'; $map{'\\xDF\\x99'}='ߙ'; $map{'\\xDF\\x9A'}='ߚ'; $map{'\\xDF\\x9B'}='ߛ'; $map{'\\xDF\\x9C'}='ߜ'; $map{'\\xDF\\x9D'}='ߝ'; $map{'\\xDF\\x9E'}='ߞ'; $map{'\\xDF\\x9F'}='ߟ'; $map{'\\xDF\\xA0'}='ߠ'; $map{'\\xDF\\xA1'}='ߡ'; $map{'\\xDF\\xA2'}='ߢ'; $map{'\\xDF\\xA3'}='ߣ'; $map{'\\xDF\\xA4'}='ߤ'; $map{'\\xDF\\xA5'}='ߥ'; $map{'\\xDF\\xA6'}='ߦ'; $map{'\\xDF\\xA7'}='ߧ'; $map{'\\xDF\\xA8'}='ߨ'; $map{'\\xDF\\xA9'}='ߩ'; $map{'\\xDF\\xAA'}='ߪ'; $map{'\\xDF\\xAB'}='߫'; $map{'\\xDF\\xAC'}='߬'; $map{'\\xDF\\xAD'}='߭'; $map{'\\xDF\\xAE'}='߮'; $map{'\\xDF\\xAF'}='߯'; $map{'\\xDF\\xB0'}='߰'; $map{'\\xDF\\xB1'}='߱'; $map{'\\xDF\\xB2'}='߲'; $map{'\\xDF\\xB3'}='߳'; $map{'\\xDF\\xB4'}='ߴ'; $map{'\\xDF\\xB5'}='ߵ'; $map{'\\xDF\\xB6'}='߶'; $map{'\\xDF\\xB7'}='߷'; $map{'\\xDF\\xB8'}='߸'; $map{'\\xDF\\xB9'}='߹'; $map{'\\xDF\\xBA'}='ߺ'; $map{'\\xDF\\xBB'}='߻'; $map{'\\xDF\\xBC'}='߼'; $map{'\\xDF\\xBD'}='߽'; $map{'\\xDF\\xBE'}='߾'; $map{'\\xDF\\xBF'}='߿'; # First do the wide characters first while(my($hex_key_reg,$html_char)=each(%map) ) { $text =~ s!$hex_key_reg!$html_char!g; } # Then do our quick and dirty UTF-8 (it's wider then latin) while(my($hex_key,$html_char)=each(%html) ) { my $hex_utf8_reg; if (hex("0x$hex_key") >= 192) { $hex_utf8_reg='\\xC3\\x'.uc(sprintf("%x",hex("0x$hex_key")-64)); } else { $hex_utf8_reg='\\xC2\\x'.$hex_key; } $text =~ s!$hex_utf8_reg!$html_char!g; } # Then do the ther single byte characters while(my($hex_key,$html_char)=each(%html) ) { my $hex_latin_reg='\\x'.$hex_key; $text =~ s!$hex_latin_reg!$html_char!g; } return $text; } 1; dspam-3.10.2+dfsg/webui/cgi-bin/configure.pl.in0000755000175000017500000001537211741353010020532 0ustar julienjulien#!/usr/bin/perl # $Id: configure.pl,v 1.07 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # # This configuration file is read by all the CGI scripts to configure both the # environment that DSPAM is working in and the way it will display information # to the web user. # Default DSPAM enviroment $CONFIG{'DSPAM_HOME'} = "@dspam_home@"; $CONFIG{'DSPAM_BIN'} = "@bindir@"; $CONFIG{'DSPAM'} = $CONFIG{'DSPAM_BIN'} . "/dspam"; $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{'DSPAM_PROCESSES'} = "ps auxw | grep dspam | grep -v 'grep\|cgi\|sock' | wc -l"; # use ps -deaf for Solaris $CONFIG{'MAIL_QUEUE'} = "mailq | grep '^[0-9,A-F]\{10,12\}[\t ][\t ]*[1-9]' | wc -l"; $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 # if undefined use default DSPAM display format $CONFIG{'HISTORY_SIZE'} = 799; # Number of items in history $CONFIG{'HISTORY_PER_PAGE'} = 100; # Number of items per page $CONFIG{'HISTORY_DUPLICATES'} = "yes"; # Wether to show duplicate entries in history "yes" or "no" $CONFIG{'HISTORY_HTMLIZE'} = "no"; # Wether to HTML-ize sender and subject in history "yes" or "no" $CONFIG{'QUARANTINE_HTMLIZE'} = "no"; # Wether to HTML-ize sender and subject in quarantine "yes" or "no" $CONFIG{'MAX_COL_LEN'} = 50; # Max chars in list columns $CONFIG{'SORT_DEFAULT'} = "Rating"; # Show quarantine by "Date" or "Rating" $CONFIG{'3D_GRAPHS'} = 1; # 0=graphs in 2D, 1=graphs in 3D $CONFIG{'OPTMODE'} = "NONE"; # OUT=OptOut IN=OptIn NONE=not selectable # Full path to TTF font(s) used for legend, x and y labels in Graphs. GD must be compiled # with TTF support if you want to use this feature. #$CONFIG{'GRAPHS_X_LABEL_FONT'} = "/usr/share/fonts/dejavu/DejaVuSans.ttf"; #$CONFIG{'GRAPHS_Y_LABEL_FONT'} = "/usr/share/fonts/dejavu/DejaVuSans.ttf"; #$CONFIG{'GRAPHS_LEGEND_FONT'} = "/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf"; # Add customized settings below $CONFIG{'LOCAL_DOMAIN'} = "example.org"; $ENV{'PATH'} = "$ENV{'PATH'}:$CONFIG{'DSPAM_BIN'}"; # Autodetect filesystem layout and preference options $CONFIG{'AUTODETECT'} = 1; # 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{'LARGE_SCALE'} = 0; #$CONFIG{'DOMAIN_SCALE'}= 0; #$CONFIG{'PREFERENCES_EXTENSION'} = 0; # Get DSPAM version $CONFIG{'DSPAM_VERSION'} = "Unknown Version"; open(PIPE, $CONFIG{'DSPAM'} . " --version|"); while() { chomp; if (/^(DSPAM Anti\-Spam Suite .*)$/) { $CONFIG{'DSPAM_VERSION'} = $1; last; } } close(PIPE); # Make a list of available templates/languages my @dslanguages = (); undef %LANG; require "$CONFIG{'TEMPLATES'}/strings.pl"; while (($key, $value) = each(%LANG)) { $CONFIG{'LANG'}->{'en'}->{$key} = $value; } $CONFIG{'LANG'}->{'en'}->{'TEMPLATEDIR'} = $CONFIG{'TEMPLATES'}; $CONFIG{'LANG'}->{'en'}->{'NAME'} = 'en'; $CONFIG{'LANG'}->{'en'}->{'NAME'} = $LANG{'lang_name'} if (defined $LANG{'lang_name'}); push(@dslanguages, qq!!); # Do now the other languages opendir TEMPLDIR, $CONFIG{'TEMPLATES'} or die "Can not open template directory"; my @templatefiles = sort grep !/^\.\.?$/, readdir TEMPLDIR; closedir TEMPLDIR; foreach (@templatefiles) { my $langcode = $_; my $langname = $_; if ($langcode ne "" && -d "$CONFIG{'TEMPLATES'}/$langcode") { $CONFIG{'LANG'}->{$langcode}->{'TEMPLATEDIR'} = "$CONFIG{'TEMPLATES'}/$langcode"; $CONFIG{'LANG'}->{$langcode}->{'NAME'} = $langcode; undef %LANG; if (-s "$CONFIG{'TEMPLATES'}/$langcode/strings.pl") { require "$CONFIG{'TEMPLATES'}/$langcode/strings.pl"; } else { while (($key, $value) = each(%{$CONFIG{'LANG'}->{'en'}})) { $LANG{$key} = $value if($key ne "NAME" && $key ne "TEMPLATEDIR"); } delete($LANG{'lang_name'}); } $CONFIG{'LANG'}->{$langcode}->{'NAME'} = $LANG{'lang_name'} if (defined $LANG{'lang_name'}); while (($key, $value) = each(%LANG)) { $CONFIG{'LANG'}->{$langcode}->{$key} = $value; } push(@dslanguages, qq!!); } } if (scalar(@dslanguages) == 0) { $CONFIG{'LANGUAGES'} = ""; } else { unshift(@dslanguages, qq!  !); $CONFIG{'LANGUAGES'} = join("\n", @dslanguages); } @templatefiles=(); # Determine if templates are available for the current # HTTP_ACCEPT_LANGUAGE (see RFC 4646 for more info). my $langlist = lc($ENV{'HTTP_ACCEPT_LANGUAGE'})||''; my $langpat = qr'[a-zA-Z]{1,8}(\-[a-zA-Z]{1,8})?'; my $qvalpat = qr'(0(\.\d{0,3})?)|(1(\.0{0,3})?)'; my $q = -1.0; my $templates = ''; my $langused = ''; for my $langpref (split /,\s*/, $langlist) { $langpref =~ /^([^;]+)(;q=)?(.*)?/; my $lang = $1 || ''; my $qval = $3 || 1.0; my $langcode = ''; if ($lang =~ /^($langpat)|(x\-$langpat)|\*$/ && $qval =~ /^($qvalpat)$/) { if ($q lt $qval) { $lang =~ s/^x\-//; if ($lang =~ /^(.*)\-.+$/) { $langcode = $1; } if ($lang ne '' && $lang ne '*' && -e $CONFIG{'TEMPLATES'} . '/' . $lang . '/nav_performance.html') { $q = $qval; $templates = $CONFIG{'TEMPLATES'} . '/' . $lang; $langused = $lang; } elsif ($langcode eq 'en') { $q = $qval; $templates = $CONFIG{'TEMPLATES'}; $langused = 'en'; } elsif ($langcode ne '' && -e $CONFIG{'TEMPLATES'} . '/' . $langcode . '/nav_performance.html') { $q = $qval; $templates = $CONFIG{'TEMPLATES'} . '/' . $langcode; $langused = $langcode; } } } } if ($templates ne '') { $CONFIG{'TEMPLATES'} = $templates; $CONFIG{'LANGUAGE_USED'} = $langused; } else { $CONFIG{'LANGUAGE_USED'} = 'en'; } $CONFIG{'DSPAM_CGI'} = "dspam.cgi"; # Configuration was successful 1; dspam-3.10.2+dfsg/webui/cgi-bin/Makefile.in0000644000175000017500000005204711745313452017663 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.29 2010/01/06 00:25:05 sbajic Exp $ # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = webui/cgi-bin DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bin_SCRIPTS = configure_pl CLEANFILES = configure.pl EXTRA_DIST = \ dspam.cgi \ graph.cgi \ default.prefs \ rgb.txt \ admin.cgi \ admingraph.cgi \ admins \ subadmins \ configure.pl.in \ htmlize.pl SUBDIRS = \ templates \ templates/cs \ templates/de \ templates/es-es \ templates/fr \ templates/he \ templates/pt-br \ templates/ro \ templates/ru sed_substitute_variables = \ dspam_transformed=`echo dspam | sed '$(transform)'`; \ sed -e 's,@dspam_home\@,$(dspam_home),g' \ -e 's,@bindir\@,$(bindir),g' all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign webui/cgi-bin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign webui/cgi-bin/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(SCRIPTS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binSCRIPTS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binSCRIPTS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-binSCRIPTS configure_pl: configure.pl.in Makefile ${sed_substitute_variables} < $(srcdir)/configure.pl.in > configure.pl # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/webui/cgi-bin/graph.cgi0000755000175000017500000001075111741351001017366 0ustar julienjulien#!/usr/bin/perl # $Id: graph.cgi,v 1.45 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . use CGI ':standard'; use GD::Graph::lines3d; use GD::Graph::lines; use strict; use vars qw { %CONFIG %FORM %LANG $LANGUAGE @spam_day @nonspam_day @period @data }; # # Read configuration parameters common to all CGI scripts # if (!(-e "configure.pl") || !(-r "configure.pl")) { &htmlheader; print "Error!

    "; print "Missing file configure.pl"; print "

    \n"; exit; } require "configure.pl"; # # Parse form # %FORM = &ReadParse(); # # Configure languages # if ($FORM{'language'} ne "") { $LANGUAGE = $FORM{'language'}; } else { $LANGUAGE = $CONFIG{'LANGUAGE_USED'}; } if (! defined $CONFIG{'LANG'}->{$LANGUAGE}->{'NAME'}) { $LANGUAGE = $CONFIG{'LANGUAGE_USED'}; } GD::Graph::colour::read_rgb("rgb.txt"); do { my($spam, $nonspam, $period) = split(/\_/, $FORM{'data'}); @spam_day = split(/\,/, $spam); @nonspam_day = split(/\,/, $nonspam); @period = split(/\,/, $period); }; @data = ([@period], [@spam_day], [@nonspam_day]); my $mygraph; if ($CONFIG{'3D_GRAPHS'} == 1) { $mygraph = GD::Graph::lines3d->new(500, 200); } else { $mygraph = GD::Graph::lines->new(500, 200); } $mygraph->set( x_label => "$CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_x_label_'.$FORM{'x_label'}}", y_label => "$CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_nb_messages'}", # title => "$FORM{'title'}", line_width => 2, dclrs => [ qw(lred dgreen) ], fgclr => 'gray85', boxclr => 'gray95', textclr => 'black', legendclr => 'black', labelclr => 'gray60', axislabelclr => 'gray40', long_ticks => 1, show_values => 0 ) or warn $mygraph->error; # dclrs => [ qw( darkorchid2 mediumvioletred deeppink darkturquoise ) ], if (defined $CONFIG{'GRAPHS_X_LABEL_FONT'} && $CONFIG{'GRAPHS_X_LABEL_FONT'} ne "" && -r $CONFIG{'GRAPHS_X_LABEL_FONT'}) { $mygraph->set_x_label_font([$CONFIG{'GRAPHS_X_LABEL_FONT'}, GD::gdMediumBoldFont, 'verdana', 'arial'], 8); } else { $mygraph->set_x_label_font(GD::gdMediumBoldFont); } if (defined $CONFIG{'GRAPHS_Y_LABEL_FONT'} && $CONFIG{'GRAPHS_Y_LABEL_FONT'} ne "" && -r $CONFIG{'GRAPHS_Y_LABEL_FONT'}) { $mygraph->set_y_label_font([$CONFIG{'GRAPHS_Y_LABEL_FONT'}, GD::gdMediumBoldFont, 'verdana', 'arial'], 8); } else { $mygraph->set_y_label_font(GD::gdMediumBoldFont); } if (defined $CONFIG{'GRAPHS_LEGEND_FONT'} && $CONFIG{'GRAPHS_LEGEND_FONT'} ne "" && -r $CONFIG{'GRAPHS_LEGEND_FONT'}) { $mygraph->set_legend_font([$CONFIG{'GRAPHS_LEGEND_FONT'}, GD::gdMediumBoldFont, 'verdana', 'arial'], 8); } else { $mygraph->set_legend_font(GD::gdMediumBoldFont); } $mygraph->set_legend("$CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_spam'}","$CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_good'}"); my $myimage = $mygraph->plot(\@data) or die $mygraph->error; print "Content-type: image/png\n\n"; print $myimage->png; sub ReadParse { my(@pairs, %FORM); if ($ENV{'REQUEST_METHOD'} =~ /GET/i) { @pairs = split(/&/, $ENV{'QUERY_STRING'}); } else { my($buffer); read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/\&/, $buffer); } foreach(@pairs) { my($name, $value) = split(/\=/, $_); $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s///g; $FORM{$name} = $value; } return %FORM; } sub htmlheader { print "Expires: now\n"; print "Pragma: no-cache\n"; print "Cache-control: no-cache\n"; print "Content-type: text/html\n\n"; } dspam-3.10.2+dfsg/webui/cgi-bin/admingraph.cgi0000755000175000017500000001322711741351001020400 0ustar julienjulien#!/usr/bin/perl # $Id: admingraph.cgi,v 1.46 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . use CGI ':standard'; use GD::Graph::bars; use strict; use vars qw { %CONFIG %FORM %LANG $LANGUAGE @spam @nonspam @period @data @inoc @sm @fp @wh @corpus @virus @black @block }; # # Read configuration parameters common to all CGI scripts # if (!(-e "configure.pl") || !(-r "configure.pl")) { &htmlheader; print "Error!

    "; print "Missing file configure.pl"; print "

    \n"; exit; } require "configure.pl"; # # Parse form # %FORM = &ReadParse(); # # Configure languages # if ($FORM{'language'} ne "") { $LANGUAGE = $FORM{'language'}; } else { $LANGUAGE = $CONFIG{'LANGUAGE_USED'}; } if (! defined $CONFIG{'LANG'}->{$LANGUAGE}->{'NAME'}) { $LANGUAGE = $CONFIG{'LANGUAGE_USED'}; } GD::Graph::colour::read_rgb("rgb.txt"); do { my($spam, $nonspam, $sm, $fp, $inoc, $wh, $corpus, $virus, $black, $block, $period) = split(/\_/, $FORM{'data'}); @spam = split(/\,/, $spam); @nonspam = split(/\,/, $nonspam); @sm = split(/\,/, $sm); @fp = split(/\,/, $fp); @inoc = split(/\,/, $inoc); @wh = split(/\,/, $wh); @corpus = split(/\,/, $corpus); @virus = split(/\,/, $virus); @black = split(/\,/, $black); @block = split(/\,/, $block); @period = split(/\,/, $period); }; @data = ([@period], [@inoc], [@corpus], [@virus], [@black], [@block], [@wh], [@spam], [@nonspam], [@sm], [@fp]); my $mygraph = GD::Graph::bars->new(500, 250); $mygraph->set( x_label => "$CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_x_label_'.$FORM{'x_label'}}", y_label => "$CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_nb_messages'}", title => "$FORM{'title'}", legend_placement => 'RT', legend_spacing => 2, bar_width => 4, bar_spacing => 0, long_ticks => 1, legend_marker_height => 4, show_values => 0, boxclr => 'gray90', cumulate => 1, x_labels_vertical => 1, y_tick_number => 4, fgclr => 'gray85', boxclr => 'gray95', textclr => 'black', legendclr => 'black', labelclr => 'gray60', axislabelclr => 'gray40', borderclrs => [ undef ], dclrs => [ qw ( mediumblue orangered2 deeppink1 black darkturquoise purple red green yellow orange ) ] ) or warn $mygraph->error; if ($CONFIG{'3D_GRAPHS'} == 1) { $mygraph->set( shadowclr => 'darkgray', shadow_depth => 3, bar_width => 3, bar_spacing => 2, borderclrs => [ qw ( black ) ] ) or warn $mygraph->error; } if (defined $CONFIG{'GRAPHS_X_LABEL_FONT'} && $CONFIG{'GRAPHS_X_LABEL_FONT'} ne "" && -r $CONFIG{'GRAPHS_X_LABEL_FONT'}) { $mygraph->set_x_label_font([$CONFIG{'GRAPHS_X_LABEL_FONT'}, GD::gdMediumBoldFont, 'verdana', 'arial'], 8); } else { $mygraph->set_x_label_font(GD::gdMediumBoldFont); } if (defined $CONFIG{'GRAPHS_Y_LABEL_FONT'} && $CONFIG{'GRAPHS_Y_LABEL_FONT'} ne "" && -r $CONFIG{'GRAPHS_Y_LABEL_FONT'}) { $mygraph->set_y_label_font([$CONFIG{'GRAPHS_Y_LABEL_FONT'}, GD::gdMediumBoldFont, 'verdana', 'arial'], 8); } else { $mygraph->set_y_label_font(GD::gdMediumBoldFont); } if (defined $CONFIG{'GRAPHS_LEGEND_FONT'} && $CONFIG{'GRAPHS_LEGEND_FONT'} ne "" && -r $CONFIG{'GRAPHS_LEGEND_FONT'}) { $mygraph->set_legend_font([$CONFIG{'GRAPHS_LEGEND_FONT'}, GD::gdMediumBoldFont, 'verdana', 'arial'], 8); } else { $mygraph->set_legend_font(GD::gdMediumBoldFont); } $mygraph->set_legend(" $CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_inoculations'}"," $CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_corpusfeds'}"," $CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_virus'}"," $CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_RBL'}"," $CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_blocklisted'}"," $CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_whitelisted'}"," $CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_spam'}"," $CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_nonspam'}"," $CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_spam_misses'}"," $CONFIG{'LANG'}->{$LANGUAGE}->{'graph_legend_falsepositives'}"); my $myimage = $mygraph->plot(\@data) or die $mygraph->error; print "Content-type: image/png\n\n"; print $myimage->png; sub ReadParse { my(@pairs, %FORM); if ($ENV{'REQUEST_METHOD'} =~ /GET/i) { @pairs = split(/&/, $ENV{'QUERY_STRING'}); } else { my($buffer); read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/\&/, $buffer); } foreach(@pairs) { my($name, $value) = split(/\=/, $_); $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s///g; $FORM{$name} = $value; } return %FORM; } sub htmlheader { print "Expires: now\n"; print "Pragma: no-cache\n"; print "Cache-control: no-cache\n"; print "Content-type: text/html\n\n"; } dspam-3.10.2+dfsg/webui/cgi-bin/subadmins0000644000175000017500000000107611736402630017517 0ustar julienjulien# $Id: subadmins,v 1.00 2009/12/22 12:25:59 sbajic Exp $ # # Subadmins listed here can manage other users or a group of users, while still # not beeing real DSPAM admins. # # Format: # : , , *@ # : # : # : *@ # # Note: Lines starting with '#' are comments and are not processed # #subadmin@example.org: *@example.org, *@other.example.org, user1@second.example.org, user2@final.example.org dspam-3.10.2+dfsg/webui/cgi-bin/admin.cgi0000755000175000017500000007246111741351001017363 0ustar julienjulien#!/usr/bin/perl # $Id: admin.cgi,v 1.25 2011/06/28 00:13:48 sbajic Exp $ # DSPAM # COPYRIGHT (C) 2002-2012 DSPAM PROJECT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . use strict; use Time::Local; use vars qw { %CONFIG %DATA %FORM %LANG $LANGUAGE }; # # Read configuration parameters common to all CGI scripts # if (!(-e "configure.pl") || !(-r "configure.pl")) { &htmlheader; print "Error!

    "; print "Missing file configure.pl"; print "

    \n"; exit; } require "configure.pl"; # # The current CGI script # $CONFIG{'ME'} = "admin.cgi"; # # Parse form # %FORM = &ReadParse; # # Configure languages # if ($FORM{'language'} ne "") { $LANGUAGE = $FORM{'language'}; } else { $LANGUAGE = $CONFIG{'LANGUAGE_USED'}; } if (! defined $CONFIG{'LANG'}->{$LANGUAGE}->{'NAME'}) { $LANGUAGE = $CONFIG{'LANGUAGE_USED'}; } my @dslanguages = (); for (split(/\n/,$CONFIG{'LANGUAGES'})) { my $lang = $_; $lang =~ s/\s*selected>/>/; if ($lang =~ /value="([^"]+)"/) { $lang =~ s/>/ selected>/ if ($1 eq $LANGUAGE); } push(@dslanguages, $lang); } $CONFIG{'LANGUAGES'} = join("\n", @dslanguages); $CONFIG{'TEMPLATES'} = $CONFIG{'LANG'}->{$LANGUAGE}->{'TEMPLATEDIR'}; # # Check Permissions # do { my($admin) = 0; open(FILE, "<./admins"); while() { chomp; if ($_ eq $ENV{'REMOTE_USER'}) { $admin = 1; last; } } close(FILE); if (!$admin) { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_access_denied'}"); } }; $| = 1; # # Determine which extensions are available # if ($CONFIG{'AUTODETECT'} == 1 || $CONFIG{'AUTODETECT'} eq "") { $CONFIG{'PREFERENCES_EXTENSION'} = 0; $CONFIG{'LARGE_SCALE'} = 0; $CONFIG{'DOMAIN_SCALE'} = 0; do { my $x = `$CONFIG{'DSPAM'} --version`; if ($x =~ /--enable-preferences-extension/) { $CONFIG{'PREFERENCES_EXTENSION'} = 1; } if ($x =~ /--enable-large-scale/) { $CONFIG{'LARGE_SCALE'} = 1; } if ($x =~ /--enable-domain-scale/) { $CONFIG{'DOMAIN_SCALE'} = 1; } }; } if ($ENV{'REMOTE_USER'} eq "") { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_no_identity'}"); } if ($FORM{'template'} eq "" || $FORM{'template'} !~ /^([A-Z0-9]*)$/i) { $FORM{'template'} = "status"; } # # Set up initial display variables # $DATA{'REMOTE_USER'} = $ENV{'REMOTE_USER'}; # # Display DSPAM Version # $DATA{'DSPAMVERSION'} = $CONFIG{'DSPAM_VERSION'}; # # Process Commands # # Status if ($FORM{'template'} eq "status") { &DisplayStatus; # User Statistics } elsif ($FORM{'template'} eq "user") { &DisplayUserStatistics; # Preferences } elsif ($FORM{'template'} eq "preferences") { &DisplayPreferences; } &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_invalid_command'} $FORM{'COMMAND'}"); # # Preferences Functions # sub DisplayPreferences { my(%PREFS, $FILE, $USER); if ($FORM{'username'} eq "") { $USER = "default"; } else { $USER = $FORM{'username'}; } $DATA{'USERNAME'} = $USER; if ($FORM{'username'} eq "") { $FILE = "./default.prefs"; if ($CONFIG{'PREFERENCES_EXTENSION'} != 1 && ! -l "$CONFIG{'DSPAM_HOME'}/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"; } if ($FORM{'submit'} ne "") { if ($FORM{'enableBNR'} ne "on") { $FORM{'enableBNR'} = "off"; } if ($FORM{'optIn'} ne "on") { $FORM{'optIn'} = "off"; } if ($FORM{'optOut'} ne "on") { $FORM{'optOut'} = "off"; } if ($FORM{'enableWhitelist'} ne "on") { $FORM{'enableWhitelist'} = "off"; } if ($FORM{'showFactors'} ne "on") { $FORM{'showFactors'} = "off"; } if ($FORM{'dailyQuarantineSummary'} ne "on") { $FORM{'dailyQuarantineSummary'} = "off"; } if ($CONFIG{'PREFERENCES_EXTENSION'} == 1) { if ($FORM{'spamSubject'} eq "") { $FORM{'spamSubject'} = "''"; } else { $FORM{'spamSubject'} = quotemeta($FORM{'spamSubject'}); } system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref '".quotemeta($USER). "' trainingMode " . quotemeta($FORM{'trainingMode'}) . " > /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref '".quotemeta($USER). "' spamAction " . quotemeta($FORM{'spamAction'}) . " > /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref '".quotemeta($USER). "' signatureLocation " . quotemeta($FORM{'signatureLocation'}) . " > /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref '".quotemeta($USER). "' spamSubject " . $FORM{'spamSubject'} . " > /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref '".quotemeta($USER). "' statisticalSedation " . quotemeta($FORM{'statisticalSedation'}) . " > /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref '".quotemeta($USER). "' enableBNR " . quotemeta($FORM{'enableBNR'}) . "> /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref '".quotemeta($USER). "' optOut " . quotemeta($FORM{'optOut'}) . ">/dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref '".quotemeta($USER). "' optIn " . quotemeta($FORM{'optIn'}) . ">/dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref '".quotemeta($USER). "' showFactors " . quotemeta($FORM{'showFactors'}) . "> /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref '".quotemeta($USER). "' enableWhitelist " . quotemeta($FORM{'enableWhitelist'}) . "> /dev/null"); system("$CONFIG{'DSPAM_BIN'}/dspam_admin ch pref '".quotemeta($USER). "' dailyQuarantineSummary " . quotemeta($FORM{'dailyQuarantineSummary'}) . "> /dev/null"); } else { open(FILE, ">$FILE") || do { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_cannot_write_prefs'}: $!"); }; print FILE <<_END; trainingMode=$FORM{'trainingMode'} spamAction=$FORM{'spamAction'} spamSubject=$FORM{'spamSubject'} statisticalSedation=$FORM{'statisticalSedation'} enableBNR=$FORM{'enableBNR'} enableWhitelist=$FORM{'enableWhitelist'} signatureLocation=$FORM{'signatureLocation'} showFactors=$FORM{'showFactors'} dailyQuarantineSummary=$FORM{'dailyQuarantineSummary'} _END close(FILE); } } if (! -e $FILE) { %PREFS = GetPrefs($USER, "./default.prefs"); } else { %PREFS = GetPrefs($USER, $FILE); } $DATA{"SEDATION_$PREFS{'statisticalSedation'}"} = "CHECKED"; $DATA{"S_".$PREFS{'trainingMode'}} = "CHECKED"; $DATA{"S_LOC_".uc($PREFS{'signatureLocation'})} = "CHECKED"; $DATA{"S_ACTION_".uc($PREFS{'spamAction'})} = "CHECKED"; $DATA{"SPAM_SUBJECT"} = $PREFS{'spamSubject'}; if ($PREFS{'optIn'} eq "on") { $DATA{'C_OPTIN'} = "CHECKED"; } if ($PREFS{'optOut'} eq "on") { $DATA{'C_OPTOUT'} = "CHECKED"; } if ($PREFS{"enableBNR"} eq "on") { $DATA{"C_BNR"} = "CHECKED"; } if ($PREFS{"showFactors"} eq "on") { $DATA{"C_FACTORS"} = "CHECKED"; } if ($PREFS{"enableWhitelist"} eq "on") { $DATA{"C_WHITELIST"} = "CHECKED"; } if ($PREFS{"dailyQuarantineSummary"} eq "on") { $DATA{"C_SUMMARY"} = "CHECKED"; } &output(%DATA); } # # User Statistics # sub DisplayUserStatistics { my($b) = "rowEven"; my ($sl_total) = 0; my ($il_total) = 0; my ($sm_total) = 0; my ($fp_total) = 0; my ($sc_total) = 0; my ($ic_total) = 0; my ($mailbox_total) = 0; open(IN, "$CONFIG{'DSPAM_STATS'}|"); while() { chomp; if ($b eq "rowEven") { $b = "rowOdd"; } else { $b = "rowEven"; } s/:/ /g; # sl = Spam Learned = TP True Positives # il = Innocent Learned = TN True Negatives # fp = False Positive = FP False Positives # sm = Spam Missed = FN False Negatives # sc = Spam Corpusfed = SC Spam Corpusfed # ic = Innocent Corpusfed = NC Nonspam Corpusfed my($username, $sl, $il, $fp, $sm, $sc, $ic) = (split(/\s+/))[0,2,4,6,8,10,12]; if ($sl eq "") { $_ = ; s/:/ /g; ($sl, $il, $fp, $sm, $sc, $ic) = (split(/\s+/))[2,4,6,8,10,12]; } my(%PREFS) = GetPrefs($username, GetPath($username).".prefs"); $PREFS{'enableBNR'} = "OFF" if ($PREFS{'enableBNR'} ne "on"); $PREFS{'enableWhitelist'} = "OFF" if ($PREFS{'enableWhitelist'} ne "on"); $PREFS{'spamAction'} = ucfirst($PREFS{'spamAction'}); $PREFS{'enableBNR'} = uc($PREFS{'enableBNR'}); $PREFS{'enableWhitelist'} = uc($PREFS{'enableWhitelist'}); my($mailbox) = GetPath($username).".mbox"; my($mailbox_size, $mailbox_display); if ( -e $mailbox ) { $mailbox_size = -s $mailbox; $mailbox_display = sprintf("%2.1f KB", ($mailbox_size / 1024)); $mailbox_total += $mailbox_size; } else { $mailbox_display = "--"; } $sl_total += $sl; $il_total += $il; $sm_total += $sm; $fp_total += $fp; $sc_total += $sc; $ic_total += $ic; $DATA{'TABLE'} .= qq!$username!. " $mailbox_display". " $sl". " $il". " $fp". " $sm". " $sc". " $ic". " $PREFS{'trainingMode'}". " $PREFS{'spamAction'}". " $PREFS{'enableBNR'}". " $PREFS{'enableWhitelist'}". " $PREFS{'statisticalSedation'}". " $PREFS{'signatureLocation'}". "\n"; } close(IN); my($mailbox_total_display) = sprintf("%2.1f KB", ($mailbox_total / 1024)); $b = "rowHighlight"; $DATA{'TABLE'} .= "Total". " $mailbox_total_display". " $sl_total". " $il_total". " $fp_total". " $sm_total". " $sc_total". " $ic_total". "  ". "  ". "  ". "  ". "  ". "  ". "\n"; &output(%DATA); } # # Status Functions # sub DisplayStatus { my($LOG) = "$CONFIG{'DSPAM_HOME'}/system.log"; my(@spam_daily, @nonspam_daily, @period_daily, @fp_daily, @sm_daily, @inoc_daily, @whitelist_daily, @corpus_daily, @virus_daily, @black_daily, @block_daily); my(@spam_weekly, @nonspam_weekly, @period_weekly, @fp_weekly, @sm_weekly, @inoc_weekly, @whitelist_weekly, @corpus_weekly, @virus_weekly, @black_weekly, @block_weekly); my(%msgpersecond); my($keycount_exectime); my($last_message); my(%classes); my ($min, $hour, $mday, $mon, $year) = (localtime(time))[1,2,3,4,5]; my ($hmstart) = time - 60; my ($daystart) = timelocal(0, 0, 0, $mday, $mon, $year); my ($periodstart) = $daystart - (3600*24*24); # 2 Weeks ago my ($dailystart) = time - (3600*23); my ($c_weekly) = 0; # Cursor to most recent time slot my ($c_daily) = 0; if (! -e $LOG) { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_no_historic'}"); } # Initialize each individual time period for(0..23) { my($h) = To12Hour($hour-(23-$_)); $period_daily[$_] = $h; $spam_daily[$_] = 0; $nonspam_daily[$_] = 0; $sm_daily[$_] = 0; $fp_daily[$_] = 0; $inoc_daily[$_] = 0; $whitelist_daily[$_] = 0; $corpus_daily[$_] = 0; $virus_daily[$_] = 0; $black_daily[$_] = 0; $block_daily[$_] = 0; } for(0..24) { my($d) = $daystart - (3600*24*(24-$_)); my ($lday, $lmon, $lyear) = (localtime($d))[3,4,5]; $lmon++; $lyear += 1900; $period_weekly[$_] = "$lmon/$lday/$lyear"; $spam_weekly[$_] = 0; $nonspam_weekly[$_] = 0; $sm_weekly[$_] = 0; $fp_weekly[$_] = 0; $inoc_weekly[$_] = 0; $whitelist_weekly[$_] = 0; $corpus_weekly[$_] = 0; $virus_weekly[$_] = 0; $black_weekly[$_] = 0; $block_weekly[$_] = 0; } open(LOG, "<$LOG") || &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_cannot_open_log'}: $!"); while() { my($t_log, $c_log, $signature, $e_log) = (split(/\t/))[0,1,3,5]; next if ($t_log > time); $last_message = $t_log; # Only Parse Log Data in our Time Period if ($t_log>=$periodstart) { my($tmin, $thour, $tday, $tmon, $tyear) = (localtime($t_log))[1,2,3,4,5]; $tmon++; $tyear += 1900; # Weekly Graph $c_weekly = 0; while($period_weekly[$c_weekly] ne "$tmon/$tday/$tyear" && $c_weekly<24) { $c_weekly++; } if ($c_log eq "E") { if ($classes{$signature} eq "S") { $spam_weekly[$c_weekly]--; $spam_weekly[$c_weekly] = 0 if ($spam_weekly[$c_weekly]<0); } elsif ($classes{$signature} eq "I") { $nonspam_weekly[$c_weekly]--; $nonspam_weekly[$c_weekly] = 0 if ($nonspam_weekly[$c_weekly]<0); } elsif ($classes{$signature} eq "W") { $whitelist_weekly[$c_weekly]--; $whitelist_weekly[$c_weekly] = 0 if ($whitelist_weekly[$c_weekly]<0); } elsif ($classes{$signature} eq "F") { $spam_weekly[$c_weekly]++; $fp_weekly[$c_weekly]--; $fp_weekly[$c_weekly] = 0 if ($fp_weekly[$c_weekly]<0); } elsif ($classes{$signature} eq "M") { $sm_weekly[$c_weekly]--; $nonspam_weekly[$c_weekly]++; $sm_weekly[$c_weekly] = 0 if ($sm_weekly[$c_weekly]<0); } elsif ($classes{$signature} eq "N") { $inoc_weekly[$c_weekly]--; $inoc_weekly[$c_weekly] = 0 if ($inoc_weekly[$c_weekly]<0); } elsif ($classes{$signature} eq "C") { $corpus_weekly[$c_weekly]--; $corpus_weekly[$c_weekly] = 0 if ($corpus_weekly[$c_weekly]<0); } elsif ($classes{$signature} eq "V") { $virus_weekly[$c_weekly]--; $virus_weekly[$c_weekly] = 0 if ($virus_weekly[$c_weekly]<0); } elsif ($classes{$signature} eq "A") { $black_weekly[$c_weekly]--; $black_weekly[$c_weekly] = 0 if ($black_weekly[$c_weekly]<0); } elsif ($classes{$signature} eq "O") { $block_weekly[$c_weekly]--; $block_weekly[$c_weekly] = 0 if ($block_weekly[$c_weekly]<0); } } else { $classes{$signature} = $c_log; } if ($c_log eq "S") { $spam_weekly[$c_weekly]++; } if ($c_log eq "I") { $nonspam_weekly[$c_weekly]++; } if ($c_log eq "W") { $whitelist_weekly[$c_weekly]++; } if ($c_log eq "F") { $spam_weekly[$c_weekly]--; $fp_weekly[$c_weekly]++; $spam_weekly[$c_weekly] = 0 if ($spam_weekly[$c_weekly]<0); } if ($c_log eq "M") { $sm_weekly[$c_weekly]++; $nonspam_weekly[$c_weekly]--; $nonspam_weekly[$c_weekly] = 0 if ($nonspam_weekly[$c_weekly]<0); } if ($c_log eq "N") { $inoc_weekly[$c_weekly]++; } if ($c_log eq "C") { $corpus_weekly[$c_weekly]++; } if ($c_log eq "V") { $virus_weekly[$c_weekly]++; } if ($c_log eq "A") { $black_weekly[$c_weekly]++; } if ($c_log eq "O") { $block_weekly[$c_weekly]++; } # Daily Graph if ($t_log>=$dailystart) { while($period_daily[$c_daily] ne To12Hour($thour) && $c_daily<24) { $c_daily++; } if ($c_log eq "E") { if ($classes{$signature} eq "S") { $spam_daily[$c_daily]--; $spam_daily[$c_daily] = 0 if ($spam_daily[$c_daily]<0); } elsif ($classes{$signature} eq "I") { $nonspam_daily[$c_daily]--; $nonspam_daily[$c_daily] = 0 if ($nonspam_daily[$c_daily]<0); } elsif ($classes{$signature} eq "W") { $whitelist_daily[$c_daily]--; $whitelist_daily[$c_daily] = 0 if ($whitelist_daily[$c_daily]<0); } elsif ($classes{$signature} eq "F") { $spam_daily[$c_daily]++; $fp_daily[$c_daily]--; $fp_daily[$c_daily] = 0 if ($fp_daily[$c_daily]<0); } elsif ($classes{$signature} eq "M") { $sm_daily[$c_daily]--; $nonspam_daily[$c_daily]++; $sm_daily[$c_daily] = 0 if ($sm_daily[$c_daily]<0); } elsif ($classes{$signature} eq "N") { $inoc_daily[$c_daily]--; $inoc_daily[$c_daily] = 0 if ($inoc_daily[$c_daily]<0); } elsif ($classes{$signature} eq "C") { $corpus_daily[$c_daily]--; $corpus_daily[$c_daily] = 0 if ($corpus_daily[$c_daily]<0); } elsif ($classes{$signature} eq "V") { $virus_daily[$c_daily]--; $virus_daily[$c_daily] = 0 if ($virus_daily[$c_daily]<0); } elsif ($classes{$signature} eq "A") { $black_daily[$c_daily]--; $black_daily[$c_daily] = 0 if ($black_daily[$c_daily]<0); } elsif ($classes{$signature} eq "O") { $block_daily[$c_daily]--; $block_daily[$c_daily] = 0 if ($block_daily[$c_daily]<0); } } if ($c_log eq "S") { $spam_daily[$c_daily]++; } if ($c_log eq "I") { $nonspam_daily[$c_daily]++; } if ($c_log eq "W") { $whitelist_daily[$c_daily]++; } if ($c_log eq "F") { $spam_daily[$c_daily]--; $fp_daily[$c_daily]++; $spam_daily[$c_daily] = 0 if ($spam_daily[$c_daily]<0); } if ($c_log eq "M") { $sm_daily[$c_daily]++; $nonspam_daily[$c_daily]--; $nonspam_daily[$c_daily] = 0 if ($nonspam_daily[$c_daily]<0); } if ($c_log eq "N") { $inoc_daily[$c_daily]++; } if ($c_log eq "C") { $corpus_daily[$c_daily]++; } if ($c_log eq "V") { $virus_daily[$c_daily]++; } if ($c_log eq "A") { $black_daily[$c_daily]++; } if ($c_log eq "O") { $block_daily[$c_daily]++; } } # Last Half-Minute if ($t_log>=$hmstart) { $msgpersecond{$t_log}++; $DATA{'AVG_PROCESSING_TIME'} += $e_log; $keycount_exectime++; } } } close(LOG); # Calculate Avg. Messages Per Second foreach(values(%msgpersecond)) { $DATA{'AVG_MSG_PER_SECOND'} += $_; } $DATA{'AVG_MSG_PER_SECOND'} /= 60; $DATA{'AVG_MSG_PER_SECOND'} = sprintf("%2.2f", $DATA{'AVG_MSG_PER_SECOND'}); # Calculate Avg. Processing Time if ($keycount_exectime == 0) { $DATA{'AVG_PROCESSING_TIME'} = 0; } else { $DATA{'AVG_PROCESSING_TIME'} /= $keycount_exectime; } $DATA{'AVG_PROCESSING_TIME'} = sprintf("%01.6f", $DATA{'AVG_PROCESSING_TIME'}); # Calculate Number of processes, Uptime and Mail Queue length $DATA{'DSPAM_PROCESSES'} = `$CONFIG{'DSPAM_PROCESSES'}`; $DATA{'UPTIME'} = `uptime`; $DATA{'MAIL_QUEUE'} = `$CONFIG{'MAIL_QUEUE'}`; # Calculate Graphs $DATA{'SPAM_TODAY'} = $spam_weekly[24]; $DATA{'NONSPAM_TODAY'} = $nonspam_weekly[24]; $DATA{'SM_TODAY'} = $sm_weekly[24]; $DATA{'FP_TODAY'} = $fp_weekly[24]; $DATA{'INOC_TODAY'} = $inoc_weekly[24]; $DATA{'WHITE_TODAY'} = $whitelist_weekly[24]; $DATA{'CORPUS_TODAY'} = $corpus_weekly[24]; $DATA{'VIRUS_TODAY'} = $virus_weekly[24]; $DATA{'BLACK_TODAY'} = $black_weekly[24]; $DATA{'BLOCK_TODAY'} = $block_weekly[24]; $DATA{'TOTAL_TODAY'} = $DATA{'SPAM_TODAY'} + $DATA{'NONSPAM_TODAY'} + $DATA{'SM_TODAY'} + $DATA{'FP_TODAY'} + $DATA{'INOC_TODAY'} + $DATA{'WHITE_TODAY'} + $DATA{'CORPUS_TODAY'} + $DATA{'VIRUS_TODAY'} + $DATA{'BLACK_TODAY'} + $DATA{'BLOCK_TODAY'}; $DATA{'SPAM_THIS_HOUR'} = $spam_daily[23]; $DATA{'NONSPAM_THIS_HOUR'} = $nonspam_daily[23]; $DATA{'SM_THIS_HOUR'} = $sm_daily[23]; $DATA{'FP_THIS_HOUR'} = $fp_daily[23]; $DATA{'INOC_THIS_HOUR'} = $inoc_daily[23]; $DATA{'WHITE_THIS_HOUR'} = $whitelist_daily[23]; $DATA{'CORPUS_THIS_HOUR'} = $corpus_daily[23]; $DATA{'VIRUS_THIS_HOUR'} = $virus_daily[23]; $DATA{'BLACK_THIS_HOUR'} = $black_daily[23]; $DATA{'BLOCK_THIS_HOUR'} = $block_daily[23]; $DATA{'TOTAL_THIS_HOUR'} = $DATA{'SPAM_THIS_HOUR'} + + $DATA{'NONSPAM_THIS_HOUR'} + $DATA{'SM_THIS_HOUR'} + $DATA{'FP_THIS_HOUR'} + $DATA{'INOC_THIS_HOUR'} + $DATA{'WHITE_THIS_HOUR'} + $DATA{'CORPUS_THIS_HOUR'} + $DATA{'VIRUS_THIS_HOUR'} + $DATA{'BLACK_THIS_HOUR'} + $DATA{'BLOCK_THIS_HOUR'}; $DATA{'DATA_DAILY'} = join(",", @spam_daily) . "_" . join(",", @nonspam_daily) . "_" . join(",", @sm_daily) . "_" . join(",", @fp_daily) . "_" . join(",", @inoc_daily) . "_" . join(",", @whitelist_daily) . "_" . join(",", @corpus_daily) . "_" . join(",", @virus_daily) . "_" . join(",", @black_daily) . "_" . join(",", @block_daily) . "_" . join(",", @period_daily); $DATA{'DATA_WEEKLY'} = join(",", @spam_weekly) . "_" . join(",", @nonspam_weekly) . "_" . join(",", @sm_weekly) . "_" . join(",", @fp_weekly) . "_" . join(",", @inoc_weekly) . "_" . join(",", @whitelist_weekly) . "_" . join(",", @corpus_weekly) . "_" . join(",", @virus_weekly) . "_" . join(",", @black_weekly) . "_" . join(",", @block_weekly) . "_" . join(",", @period_weekly); foreach(@spam_daily) { $DATA{'TS_DAILY'} += $_; }; foreach(@nonspam_daily) { $DATA{'TI_DAILY'} += $_; } foreach(@sm_daily) { $DATA{'SM_DAILY'} += $_; } foreach(@fp_daily) { $DATA{'FP_DAILY'} += $_; } foreach(@inoc_daily) { $DATA{'INOC_DAILY'} += $_; } foreach(@whitelist_daily) { $DATA{'TI_DAILY'} += $_; $DATA{'WHITE_DAILY'} += $_; } foreach(@corpus_daily) { $DATA{'CORPUS_DAILY'} += $_; } foreach(@virus_daily) { $DATA{'TS_DAILY'} += $_; $DATA{'VIRUS_DAILY'} += $_; } foreach(@black_daily) { $DATA{'TS_DAILY'} += $_; $DATA{'BLACK_DAILY'} += $_; } foreach(@block_daily) { $DATA{'TS_DAILY'} += $_; $DATA{'BLOCK_DAILY'} += $_; } foreach(@spam_weekly) { $DATA{'TS_WEEKLY'} += $_; } foreach(@nonspam_weekly) { $DATA{'TI_WEEKLY'} += $_; } foreach(@sm_weekly) { $DATA{'SM_WEEKLY'} += $_; } foreach(@fp_weekly) { $DATA{'FP_WEEKLY'} += $_; } foreach(@inoc_weekly) { $DATA{'INOC_WEEKLY'} += $_; } foreach(@whitelist_weekly) { $DATA{'TI_WEEKLY'} += $_; $DATA{'WHITE_WEEKLY'} += $_; } foreach(@corpus_weekly) { $DATA{'CORPUS_WEEKLY'} += $_; } foreach(@virus_weekly) { $DATA{'TS_WEEKLY'} += $_; $DATA{'VIRUS_WEEKLY'} += $_; } foreach(@black_weekly) { $DATA{'TS_WEEKLY'} += $_; $DATA{'BLACK_WEEKLY'} += $_; } foreach(@block_weekly) { $DATA{'TS_WEEKLY'} += $_; $DATA{'BLOCK_WEEKLY'} += $_; } &output(%DATA); } # # Global Functions # sub htmlheader { print "Expires: now\n"; print "Pragma: no-cache\n"; print "Cache-control: no-cache\n"; print "Content-type: text/html\n\n"; } sub output { if ($FORM{'template'} eq "" || $FORM{'template'} !~ /^([A-Z0-9]*)$/i) { $FORM{'template'} = "performance"; } &htmlheader; my(%DATA) = @_; $DATA{'WEB_ROOT'} = $CONFIG{'WEB_ROOT'}; $DATA{'LANG'} = $LANGUAGE; $DATA{'FORM_ADMIN'} = qq!
    $CONFIG{'LANG'}->{$LANGUAGE}->{'admin_form'} ($ENV{'REMOTE_USER'})    $CONFIG{'LANG'}->{$LANGUAGE}->{'lang_select'}$CONFIG{'LANGUAGES'}  
    !; open(FILE, "<$CONFIG{'TEMPLATES'}/nav_admin_$FORM{'template'}.html"); while() { s/\$CGI\$/$CONFIG{'ME'}/g; s/\$([A-Z0-9_]*)\$/$DATA{$1}/g; print; } close(FILE); exit; } sub SafeVars { my(%PAIRS) = @_; my($url, $key); foreach $key (keys(%PAIRS)) { my($value) = $PAIRS{$key}; $value =~ s/([^A-Z0-9])/sprintf("%%%x", ord($1))/gie; $url .= "$key=$value&"; } $url =~ s/\&$//; return $url; } sub error { my($error) = @_; $FORM{'template'} = "error"; $DATA{'MESSAGE'} = <<_end; $CONFIG{'LANG'}->{$LANGUAGE}->{'error_message_part1'}
    $error

    $CONFIG{'LANG'}->{$LANGUAGE}->{'error_message_part2'} _end &output(%DATA); } sub ReadParse { my(@pairs, %FORM); if ($ENV{'REQUEST_METHOD'} =~ /GET/i) { @pairs = split(/&/, $ENV{'QUERY_STRING'}); } else { my($buffer); read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/\&/, $buffer); } foreach(@pairs) { my($name, $value) = split(/\=/, $_); $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s///g; $FORM{$name} = $value; } return %FORM; } sub To12Hour { my($h) = @_; if ($h < 0) { $h += 24; } if ($h>11) { $h -= 12 if ($h>12) ; $h .= ":00pm"; } else { $h = "12" if ($h == 0); $h .= ":00am"; } return $h; } sub GetPath { my($USER, $VPOPUSERNAME, $VPOPDOMAIN); my($UN) = @_; # Domain-scale if ($CONFIG{'DOMAIN_SCALE'} == 1) { $VPOPUSERNAME = (split(/@/, $UN))[0]; $VPOPDOMAIN = (split(/@/, $UN))[1]; $VPOPDOMAIN = "local" if ($VPOPDOMAIN eq ""); ($VPOPUSERNAME = $VPOPDOMAIN, $VPOPDOMAIN = "local") if ($VPOPUSERNAME eq "" && $VPOPDOMAIN ne ""); $USER = "$CONFIG{'DSPAM_HOME'}/data/$VPOPDOMAIN/$VPOPUSERNAME/$VPOPUSERNAME"; # Normal scale } elsif ($CONFIG{'LARGE_SCALE'} == 0) { $USER = "$CONFIG{'DSPAM_HOME'}/data/$UN/$UN"; # Large-scale } else { if (length($UN)>1) { $USER = "$CONFIG{'DSPAM_HOME'}/data/" . substr($UN, 0, 1) . "/". substr($UN, 1, 1) . "/$UN/$UN"; } else { $USER = "$CONFIG{'DSPAM_HOME'}/data/$UN/$UN/$UN"; } } return $USER; } sub GetPrefs { my(%PREFS); my($USER, $FILE) = @_; if ($CONFIG{'PREFERENCES_EXTENSION'} == 1) { if ($USER eq "") { $USER = "default"; } open(PIPE, "$CONFIG{'DSPAM_BIN'}/dspam_admin agg pref ".quotemeta($USER)."|"); while() { chomp; my($directive, $value) = split(/\=/); $PREFS{$directive} = $value; } close(PIPE); } else { if (! -e $FILE) { $FILE = "./default.prefs"; } if (! -e $FILE) { &error("$CONFIG{'LANG'}->{$LANGUAGE}->{'error_load_default_prefs'}"); } open(FILE, "<$FILE"); while() { chomp; my($directive, $value) = split(/\=/); $PREFS{$directive} = $value; } close(FILE); } return %PREFS; } dspam-3.10.2+dfsg/webui/Makefile.am0000644000175000017500000000015011622570546016331 0ustar julienjulien# $Id: Makefile.am,v 1.1 2005/07/02 03:59:52 jonz Exp $ # webui/Makefile.am # SUBDIRS = cgi-bin htdocs dspam-3.10.2+dfsg/webui/Makefile.in0000644000175000017500000004347711745313452016362 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.1 2005/07/02 03:59:52 jonz Exp $ # webui/Makefile.am # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = webui DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = cgi-bin htdocs all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign webui/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign webui/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/webui/htdocs/0000755000175000017500000000000011745313535015564 5ustar julienjuliendspam-3.10.2+dfsg/webui/htdocs/rtl.css0000644000175000017500000000111511622570546017076 0ustar julienjulien/* $Id: rtl.css,v 1.03 2010/01/03 04:05:05 sbajic Exp $ */ /* Used for languages that have a (r)ight-(t)o-(l)eft text page direction */ /* global */ th { text-align:right; } /* classes */ .rowDivider { border-left:0; border-right:1px solid black; } /* ids */ #logo { text-align:left; float:left; } #logo p{ clear:right; } #navcontainer { text-align:right; } #navcontainer li { float:right; } #navcontainer li a{ float:right; } #panel { clear:right; } /* classes */ .content { text-align:right; } .content table,img { float:right; } .content p { clear:right; } dspam-3.10.2+dfsg/webui/htdocs/dspam-logo-small.gif0000644000175000017500000001127011622570546021425 0ustar julienjulienGIF89a–,÷ÿÿÿ:)1624 üûüôóôòñòéèé°¯° 65:ññõ§§©ããåûûüõõöññòãã䯯°››œ‚‚ƒ'(3!)+./01ÇÈÉ 355PQQ÷øø©ªª+.,  *,*psp/0/565STSOPOKLK¾À¾±³±vwvtutopoklkfgf`a`[\[UVUýþýûüû÷ø÷ñòñÝÞÝÏÐÏÍÎͽ¾½¸¹¸µ¶µ³´³¬­¬¢£¢›œ›”•”Ž‹Œ‹‰Š‰…†…’•‘QSPËÍÊ  FGEWXV461UVR-- 33. TTPPPMuuqDDB##" **)__]..-ìì襥¢NNMIIH@@?êêè~~}ssrnnmiihYYXÿÿþÌÌ˸¸·®®­§§¦Ç¼tq?KI/’y‰~œš‰¥¤œ%$ÓÒÌSRMkWNMIèçã84%kiböõòÚÙÖ·²§I3('%@=8 ;" ÔÓÒ=5/5+& + ,   "!!433´³³¦¥¥þþþüüüûûûúúúøøø÷÷÷öööôôôóóóñññïïïîîîëëëêêêçççæææáááßßßÜÜÜÛÛÛÚÚÚØØØÖÖÖÔÔÔÓÓÓÒÒÒÊÊÊÈÈÈÆÆÆÄÄÄÂÂÂÀÀÀ¼¼¼¹¹¹´´´³³³²²²°°°¯¯¯«««¨¨¨¤¤¤¡¡¡ŸŸŸœœœššš˜˜˜———–––“““‘‘‘ŒŒŒˆˆˆ„„„ƒƒƒ|||{{{yyyxxxvvvqqqdddTTTSSSJJJ;;;777222,,,+++'''&&&$$$ÿÿÿ!ùÿ,–,ÿH° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠdÈŠUV=JŽ”ø ³fÌbRã¶mÛ5nºVê$$IW¯^µJ¹²$Ñ=Ž ¼‚)S¦H¥@À>$=vɱ[±ÂÆ‚õÊU«V*1¢<ëÊlWCVÕR`>ýò…Æ 4›¬½Ò:’•+VRÆÁÈ¡™°·hY–lY³C“žÝ¼Y³+mƒµPK—kmÜL›ëðÀaàíà 3^Žå˰Ȯr-!W퉛3QtS-Y1^ pÙ¢%K¬ëA¯kýJV·píÿFÄu<¨È8·¤È[°² Äõ‚vÕzÃêb-–o†¹b‚P-B!Ím& @+|!! ˜àP‚À"̈F†ñ®ä¢B€n‘ $ãèEäŒØB 3p8äÐ…´‚½ )¾€¾QˆÂ›È„&v˜‚LdŽ“xÄ;ÿ@à|Àý@¢?8Š| rˆ„$¼`NˆÂ)÷'t˜‰MX"á˜ÕÝve1d±ü`÷¶#Tø*@€†&Ô"X¼ 7°rÜÆ»xÁÈ ó€Çv!ìT@Ç;¾@&DC c=¢!Ÿ&ŒÃÚ3ð–€`È€£À(<‘ ûTâ•• JA JD(Àà±zœàPĉZNâúXb'–é‰}à•Ï Ô Œ^(@ À‚î€>èùÓ@ozá†QT/þè+f!KøÃ–À„?¨2†åâ_àUú¡ÿÏtÀ¯œx'?çéPBŸó¤#`‹p¨ƒ ‚q¡áT@pfŸ6êHPâuø#!‰I˜Tˆ`Dò JÐ0•¤fU«ÈHx¡‹&Ä (D‘ÊO4¦­Š'—‡2ByøÃGóð×:Ô! 0á frBeÍk˜ñ [ôT{0]ƱG¼½ñF'¨ò6T ½°€ .A3¬#¬ø„ 6«Ñ3ÿà TaÁ(»± ­~©àÇÒ1€Ü2íqE-†€†PÍkŸ4|á+¥" Ò:0‚‡UĨˆShb™@ ú˼ê€]– €OË Ù t¶¨ CUØÁ„´ALÀ; @¬áb­:øÁ Lð€ú J(¤Þjó  ?VÑOPåÍÏC”+„æà °t÷r/4 )ˆì`Ø:l×°vx‡:0 Sxá öÀ>T¼b¸ÁÁ¸…­æ[ßû‚6BÈU2á6á] AYIp@ÔpšQ q´áeý5*ÜÛÚh ÿÃÁ]…F ‹8¹üC(DÑ NàªO ðÃî‘ Oxâ ðÛW;pÀÆ;Å(Fá?° È}ª’q±dÌ6ùun’5¤ |‚èX@à“@t³PŒ&˜}3›µª0hXÎt¶sD”[ /|‚Í\±¸°Q\B À=FA¼Ã ’À\@yЧ BQi`ºÀϧ€Ÿ~:œ3KF;TL›tÀ‚¬À«½¬ëbì üÈÄ)Ú«k »Îžó‡C<ìZã œðDM¥«.øX>w€ðBùä19šb¡ÿÐÄ&¼ˆPœ;é^7“b_PǬ7·†žQNpUø.0¬Åºfoàƒ*©ØA¬×lð/ôú× ¯3Ã!¢Ü È À„t;A‚+¨ÀЇ(€é‚§*ê10ÐÃx¥Fš‰3¸ãåÐPw§3Ks'»­7F0 uT…3¨Åj |$˜æð9ÖÃo¦·ÙéöÂïÜV(€ì°D@óÊ wDa •˜©>Bñ‰O€•¦`AÚÁ†S\Ù8LÁ<3A8¯XHƺÛM_tÁ6gæŠX¦c§ø0Ÿo˜CT‘mÒ[w<Dßµÿ›}ç¨ "=ø¼„ügN˜.×Ä ½LNØ¿¡û¤³‡Q`²ü0OTn0U+ÆÐ |¶² ‚P % ‡0A€_Ë` Tqè} CeùF;€}0 ÑépUàx_¶fK y_ ò aÕаyáy€xU›`W Ð°Dh • P–p ûp^õ·)€D+f;ð+ ¸n¹x ñ°F´àTÑ  €Pl° AWj €©VÜpNDv»U Ü` 2H‡ÈÕ=0 »Py52À*Ø^˜KÐtnÿbpiyÅ1g+dX°i@}€Ãp ¶P C n ‚` :  ®@ 2 bag,àŒ´< O 0¡ œp æû šØ€ Ë”r š Œò° È=` µgàuŽ˜˜Vn€kµF wuqЂ ¦Ð,P>`ÐÖÐKAL Þ Âà´@eåȰ O0 A€ó1 á  ÈPÔ0Ñà ¬€ Í0«`½p &° H »À é ¼ðŒ9# ¸`t¶2à*¨(™W_pTØ'9PÁ°n®&&sÿ0ÒP“H ¶"@& `®0ù(€^° jU(Ñ® Àa%Ñ(ñ”n1°p Èg)°ñ’b)]›PhP(PÌ ñEưP ¼  ¡ Ç0¼`Ùp OUï@TÑ 0}ñ ·ð 2þï0–¹Qœ°g ™ Ëm O0:° ËÀÅpÕ° ÁH` ìpÎༀ Nç° ±pwTñ¿Ð&€Ì@ÈÐ s@:·Ð@? Êà q0 ×Ð « ŠWML` `ÝPK@´À M€ÁÙ YÿW»àýÀ:o‘¹žey–¦À³¢&ñ -’ `Ó@.è`O bp ÐðÛÀ é Æ°e´¹˜·É Aß <° 8 Kðë ÐàÏ`äÌ`ÖÀÏÓà9° Œ!Ý˰ r0&`Ç 0×ðIÑ ³°CÀ1 ˆ(› ù`{õ@.`ï 8×>Nú¤NêTðïðYàvœÐ†A}!B° kÔ G°MÀFäP%ÉPÄ` ë` Ù€ MðµÀ j° 70›±P™€›²° k è 5° á°b¼ÿ`º°ð l LÐÜ` xyj` î ØP»c ÊðLÐ `5ð¦Ó€¬ µ0 m/ ;°l@7j ä âgê K°ÝÀ KPÆJÆz¬ÚâOã kÐ<€ôàI019$®à à *Ýàjp ày Dð±9Ý0Ùp«0á t€ aú½À ³ <Ø¢ãð^0 PH±êÐʰµ07ÆàÓ  Oà ÁpèÔ Å@ç0 ÝP Ôð ¬ê ±p I`‰bÕÖ°²IP s)”b)â ÎpÏÿà F³:›³Ï`³" L2 “‘"IÀÞ0 ¯@¸ð µp  ½ ¸ þa±`¦S ³Ð EÙØ  Ü0¹·ê ¸²ð =еþñ k@A=и± d¼p7µ° ¬P ðC y ­ ‘·³` ¼@ Ç  D@Ë  Ê Çp Æ` p0$źÄ0º¤; ¤Kº¡[@CÆp È °k Å0A?Y ô@¤7iû'=ˆÜ!b¯ œg=  ® ´€ À À ¿÷Ê Ø» Ú» º°Þû½¸”¾â‹ ß뽺 ½€½½Að ¾Ðq ²€#ȉ,p ° ÷{ Ø€ B0;a°@á!·p µP @ ³0 ÕQc¡<Á, “a³@ |À X Ôqnõ×Á° °P”œ%!¶¯€eq=Ã)Q4 4l›¢‘•)œ/ÙÃ@¬; dspam-3.10.2+dfsg/webui/htdocs/dspam.js0000644000175000017500000000146611622570546017236 0ustar julienjulien// $Id: dspam.js,v 1.02 2009/12/25 03:00:40 sbajic Exp $ // Select intermediate checkboxes on shift-click var shifty = false; var lastcheckboxchecked = false; function checkboxclicked(checkbox) { var num = checkbox.id.split('-')[1]; if (lastcheckboxchecked && shifty) { var start = Math.min(num, lastcheckboxchecked) + 1; var end = Math.max(num, lastcheckboxchecked) - 1; var value = checkbox.checked; for (i=start; i <= end; ++i) { document.getElementById("checkbox-"+i).checked = value; } } lastcheckboxchecked = num; } function recordshiftiness(e) { if (!e) var e = window.event; shifty = e && ((typeof (e.shiftKey) != 'undefined' && e.shiftKey) || e.modifiers & event.SHIFT_MASK); } if (window.event) document.captureEvents (event.MOUSEDOWN); document.onmousedown = recordshiftiness; dspam-3.10.2+dfsg/webui/htdocs/Makefile.am0000644000175000017500000000026511622570546017624 0ustar julienjulien# $Id: Makefile.am,v 1.4 2010/01/02 04:03:18 sbajic Exp $ # webui/htdocs/Makefile.am # EXTRA_DIST = \ base.css \ rtl.css \ dspam-logo-small.gif \ dspam.js \ favicon.ico dspam-3.10.2+dfsg/webui/htdocs/favicon.ico0000644000175000017500000003663611622570546017724 0ustar julienjulien€€h(V@@h ¾(00h&3 èŽ9(v<(€(ÿÿÿ™™™333"#!""333333330!012"1!!"" !0!!1"2! !0! ! 30"""""""""#(@€ ÿÿÿ™™™fff"0""""0 1 !!     ! 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ! "    ! !1 1 !01 ""01 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2""""0(0`ÿÿÿfffÌÌÌ#0#0333211!111111111111111111111111111111311!111013211111111111111111""" ( @€ÿÿÿfffÌÌÌ#2#!!11111111111111!##233( Àÿÿÿ™™™ÌÌÌ3# 010!0!0!0!0010!0!0!0!0!0 dspam-3.10.2+dfsg/webui/htdocs/Makefile.in0000644000175000017500000002552211745313453017636 0ustar julienjulien# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.4 2010/01/02 04:03:18 sbajic Exp $ # webui/htdocs/Makefile.am # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = webui/htdocs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/dllibs.m4 \ $(top_srcdir)/m4/dspam_functions.m4 \ $(top_srcdir)/m4/external_lookup.m4 \ $(top_srcdir)/m4/gcc_build_options.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mysql_drv.m4 \ $(top_srcdir)/m4/netlibs.m4 $(top_srcdir)/m4/pgsql_drv.m4 \ $(top_srcdir)/m4/pthread.m4 \ $(top_srcdir)/m4/split_configuration.m4 \ $(top_srcdir)/m4/sqlite3_drv.m4 $(top_srcdir)/m4/sqlite_drv.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/auto-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ active_driver = @active_driver@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ delivery_agent = @delivery_agent@ docdir = @docdir@ dspam_group = @dspam_group@ dspam_home = @dspam_home@ dspam_home_group = @dspam_home_group@ dspam_home_mode = @dspam_home_mode@ dspam_home_owner = @dspam_home_owner@ dspam_mode = @dspam_mode@ dspam_owner = @dspam_owner@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ external_lookup_libs = @external_lookup_libs@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmysql_drv_cppflags = @libmysql_drv_cppflags@ libmysql_drv_ldflags = @libmysql_drv_ldflags@ libmysql_drv_libs = @libmysql_drv_libs@ libpgsql_drv_cppflags = @libpgsql_drv_cppflags@ libpgsql_drv_ldflags = @libpgsql_drv_ldflags@ libpgsql_drv_libs = @libpgsql_drv_libs@ libsqlite3_drv_cppflags = @libsqlite3_drv_cppflags@ libsqlite3_drv_ldflags = @libsqlite3_drv_ldflags@ libsqlite3_drv_libs = @libsqlite3_drv_libs@ libsqlite_drv_cppflags = @libsqlite_drv_cppflags@ libsqlite_drv_ldflags = @libsqlite_drv_ldflags@ libsqlite_drv_libs = @libsqlite_drv_libs@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgsql_pg_config = @pgsql_pg_config@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ storage_drv_subdirs = @storage_drv_subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ base.css \ rtl.css \ dspam-logo-small.gif \ dspam.js \ favicon.ico all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign webui/htdocs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign webui/htdocs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dspam-3.10.2+dfsg/webui/htdocs/base.css0000644000175000017500000000615311622570546017216 0ustar julienjulien/* $Id: base.css,v 1.01 2009/12/26 02:38:29 sbajic Exp $ */ /* global */ body, input, textarea, select { font-family:"Lucida Grande",Tahoma,Arial,Helvetica,sans-serif; font-size:11px; } table { border:1px solid black; } th { font-size:11px; background-color:black; color:white; font-weight:bold; text-align:left; } th a{ color:white; background-color:black; display:block; text-align:center; } td { font-size:11px; } em { color:red; font-weight:bold; font-style:normal; } /* classes */ .rowEven {background-color:#dddddd;} .rowOdd {background-color:#eeeeee;} .rowAlert {background-color:yellow;} .rowHighlight {background-color:white;font-weight:bold;} .rowDivider {border-left:1px solid black;} .innocent {color:limegreen;background-color:green;} .whitelisted {color:magenta;background-color:purple;} .spam {color:red;background-color:darkred;} .false {color:white;font-weight:bold;background-color:green;} .missed {color:white;font-weight:bold;background-color:darkred;} .inoculation {color:dodgerblue;background-color:darkblue;} .corpus {color:black;background-color:white;} .relay {color:white;background-color:#994400;} .virus {color:yellow;background-color:darkred;} .blocklisted {color:darkblue;background-color:darkred;} .blacklisted {color:black;background-color:darkred;} .unknown {color:darkred;background-color:white;} .error {color:red;background-color:white;} .low {color:darkblue;font-weight:bold;} .medium {color:steelblue;font-weight:bold;} .high {color:darkorange;font-weight:bold;} .small {font-size:9px;} .hollow {border:0px;} /* ids */ #header { padding:0; margin:0; height:25px; white-space:nowrap; } #logo *{margin:0;padding:0;} #logo { text-align:right; float:right; z-index:-1; } #logo img {border:none;} #logo p{ text-align:center; clear:left; font-size:80%; } #userinfo {} #navcontainer { margin:0; padding:0; white-space:nowrap; } #navcontainer ul {list-style:none;white-space:nowrap;display:inline;} #navcontainer li { margin:0 4px 0 0; background-color:lightgray; color:white; font-weight:bold; float:left; white-space:nowrap; } #navcontainer li a{ float:left; white-space:nowrap; } #navcontainer a:link, #navcontainer a:visited { background-color:lightgray; color:black; text-decoration:none; padding:4px; } #navcontainer a:hover { background-color:darkgray; color:white; } #navcontainerclear { display:none; } html>body #navcontainerclear { display:inline; clear:both; } #navcontainer li#active a { background-color:black; color:white; white-space:nowrap; } #panel { background-color:#f7f7f7; border:2px solid black; padding:8px; clear:left; } /* classes */ .content { text-align:left; display:table; width:100%; background-color:#dddddd; margin-bottom:8px; } .content h3 { font-size:11px; font-weight:normal; background-color:#bbbbbb; margin:0; padding:2px; } .content h3 strong { font-weight:bold; } .content table,img { margin:8px; display:block; float:left; } .content img { padding:4px; background-color:#ddd; } .content p { padding:8px; padding-top:0px; clear:left; float:none; } .historypages{ text-align:center; font-size:95%; } dspam-3.10.2+dfsg/README0000644000175000017500000030040711741351001014033 0ustar julienjulienDSPAM v3.10.2 COPYRIGHT (C) 2002-2012 DSPAM Project http://dspam.sourceforge.net/ LICENSE This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . CREDITS Original Work By Lead development till 3.8.0: Jonathan A. Zdziarski Lead development after 3.8.0: Stevan Bajic PostgreSQL driver: Rustam Aliyev External Lookup module: Hugo Monteiro Various: Feb/2006 Cove Schneider Jan/2006 Norman Maurer Your name is missing? Let us know with a reference to your commit, and we'll add you to the list. COPYRIGHT As of 12 January 2009 the copyright is owned by the DSPAM Project, represented by a team of people, including: Alexander Prinsier Dov Zamir Hugo Monteiro Ion-Mihai Tetcu Paul Cockings Stevan Bajic TABLE OF CONTENTS General DSPAM Information 1.0 About DSPAM 1.1 Installation and Configuration 1.2 Testing 1.3 Troubleshooting 1.4 DSPAM Tools 1.5 Agent Commandline Arguments Advanced DSPAM functionality 2.0 Linking with libdspam 2.1 Configuring groups 2.2 External Inoculation Theory 2.3 Client/Server Mode 2.4 LMTP 2.5 DSPAM User Preferences 2.6 Fallback Domains 2.7 External User Lookup Miscellaneous 3.0 Bugs, Feature Requests 3.1 Ports / Packages 3.2 GIT Access 1.0 ABOUT DSPAM DSPAM is an open-source, freely available anti-spam solution designed to combat unsolicited commercial email using advanced statistical analysis. In short, DSPAM filters spam by learning what spam is and isn't. It does this by learning each user's individual mail behavior. This allows DSPAM to provide highly-accurate, personalized filtering for each user on even a large system and provides an administratively maintenance free solution capable of learning each user's email behaviors with very few false positives. While DSPAM is focused around spam filtering, many have found alternative uses for all types of two-concept document classification. DSPAM is rapidly gaining a large support forum and being used in many large- scale implementations. Contributions to the project are welcome via the dspam-dev mailing list or in the form of financial contributions. Many of the foundational principles incorporated into this software were contributed by Paul Graham's white paper on combatting spam, which can be found at http://paulgraham.com/spam.html. Much research and development has resulted in many new approaches being added onto the DPSAM project as well, some of which are explained in white papers on the DSPAM home page. DSPAM can be implemented as a total solution, or as a library which developers may link their projects to the dspam core engine (libdspam) in accordance with the GPL license agreement. This enables developers to incorporate libdspam as a "drop-in" for instant spam filtering within their applications - such as mail clients, other anti-spam tools, and so on. PLEASE NOTE: DSPAM and libdspam are distributed under the AGPL license, not the LGPL. Commercial licensing is available for those who seek to redistribute DSPAM or some of DSPAM's components/libraries in their non-GPL products. Please contact us for more information about commercial licensing. The DSPAM package is split up into the following pieces: DSPAM AGENT The DSPAM agent is the command center for all shell and daemon operations. If you're using DSPAM as a filtering solution, this is the 'dspam' (or dspamc) binary you're likely going to be talking to via commandline. LIBDSPAM: CORE ENGINE The DSPAM core processing engine, also known as libdspam, provides all critical spam filtering functions. The engine is embedded into other dspam components (such as the agent) and is responsbile for the actual filtering logic. If you're not a developer, you don't need to be concerned with this component as it is automatically compiled in with the build. WEB UI The Web UI (User Interface) is designed to allow end-users to review their spam quarantine and history, graphs, and to delete their spam permanently. They can also optionally use the quarantine to perform all of their training. The UI also includes some basic administrative tools to change settings and manage user quarantines. TOOLS Some basic tools which have been provided to manage dictionaries, automate corpus feeding, and perform other diagnostic operations related to DSPAM. Some of these include dspam_train, dspam_stats, and dspam_dump. HISTORY OF COPYRIGHT Original work was done by Jonathan A. Zdziarski. In 2006 the copyright was handed over to Sensory Networks. In 2009 Sensory Networks handed over the full copyright to the DSPAM Project, represented by a team of people, including: Alexander Prinsier Dov Zamir Hugo Monteiro Ion-Mihai Tetcu Paul Cockings Stevan Bajic 1.1 INSTALLATION IMPLEMENTATION OPTIONS There are many different ways to deploy DSPAM onto an existing network. The most popular approaches are: 1. As a delivery agent proxy When your mail server gets ready to deliver mail to a user's mailbox it calls a delivery agent of some sort. On most UNIX systems, this is procmail, maildrop, mail.local, or a similar tool. When used as a delivery proxy, the DSPAM agent is called in place of your existing agent - or better put, it can masquerade as the local delivery agent. DSPAM then processes the message and will call the /real/ delivery agent to pass the good mail into the user's mailbox, quarantining the bad mail. DSPAM can optionally tag and deliver both spam and legitimate mail. In the diagram below, MTA refers to Mail Transfer Agent, or your mail server software: Postfix, Sendmail, Exim, etc. LDA refers to the Local Delivery Agent: Procmail, Maildrop, etc.. BEFORE: [MTA] ---> [LDA] ---> (User's Mailbox) AFTER: [MTA] ---> [DSPAM] ---> [LDA] ---> (User's Mailbox) \ \--> [Quarantine] [End User] ------> [Web UI] 2. As a POP3 Proxy If you don't want to tinker with your existing mail server setup, DSPAM can be combined with one of a few open source programs designed to act as a POP3 proxy. This means spam is filtered whenever the user checks their mail, rather than when it is delivered. The benefit to this is that you can set up a small machine on your network that will connect to your existing mail server, so no integration is needed. It also allows your users to arbitarily point their mail client at it if they desire filtering. The drawback to this approach is that the POP3 protocol has no way to tell the mail client that a message is spam, and so the user will have to download the spam (tagged, of course). BEFORE: [End User] ---> [POP3 Server] AFTER: [End User] ---> [POP3 Proxy] <--> [DSPAM] \ \--> [POP3 Server] 3. As an SMTP Relay Newer versions of DSPAM have seen features that allow it to function more easily as an SMTP relay. An SMTP relay sits in front of your existing mail server (requiring no integration). To use an SMTP relay, the MX records for your domains are repointed to the relay machine running DSPAM. DSPAM then relays the good (and optionally bad) mail to the existing SMTP server. This allows you to use DSPAM with even a Windows-based destination mail server as no integration is necessary. See doc/relay.txt for one example of how to do this with Postfix. BEFORE: { Internet } ---> [Company Mail Server] AFTER: { Internet } ---> [ Inbound SMTP Relay ] ---> [Company Mail Server] ( MTA <> DSPAM ) SMTP \ or \--> [Quarantine] LMTP [End User] ------> [Web UI] UPGRADING DSPAM Please see the file UPGRADING FRESH INSTALLATION 0. PREREQUISITES DSPAM can use one of many different backends to store its information, and you will need to decide on one and install the appropriate software before you can build DSPAM. The following storage backends are presently available: Driver Requirements ------------------------------------------------------------------------- T mysql_drv: MySQL client libraries (and a server to connect to) T pgsql_drv: PostgreSQL client libraries (and a server to connect to) sqlite_drv: SQLite v2.7.7 or above (scheduled for removal) sqlite3_drv: SQLite v3.x *T hash_drv: None (Self-Contained Hash-Based Driver) Legend: * Default storage driver T Thread-safe (Required for running DSPAM in server daemon mode) In general, MySQL is one of the faster solutions with a smaller storage footprint and is well suited for both small and large-scale implementations. The hash driver (inspired by Bill Yerazunis' CRM Sparse Spectra algorithm) is the fastest solution by far and requires no dependencies. It supports an auto-extend feature to grow the file size as needed and is very fast and compact. It does however lack some features (such as merged groups support) and uses a lot of memory to mmap() users. Also note that a database created with the hash driver is currently not safe to move between 32/64 bit systems or big/little endian systems. Documentation for any additional setup of your selected storage driver can be found in the doc/ directory. You'll need to follow any steps outlined in the storage driver documentation before continuing. You can download MySQL from http://www.mysql.com. You can download PostgreSQL from http://www.postgresql.com. You can download SQLite from http://www.sqlite.org. 1. CONFIGURATION DSPAM uses autoconf, so configuration is fairly standardised with other UNIX-based software: ./configure [options] DSPAM supports the configuration options below. Generally, the default configuration is more than acceptable, so it's a good idea not to tweak too many settings unless you know what you are doing. PATH SWITCHES --prefix=DIR Specify an alternative root prefix for installation. The default is /usr/local. This does not affect the location of dspam.conf (which defaults to /etc). Use --sysconfdir= for this. --sysconfdir=DIR Specify an alternative home for the dspam.conf file. The default is /etc. --with-dspam-home=DIR Specify an alternative DSPAM home for installation. This can alternatively be changed in dspam.conf, but is convenient to do on the configure line. The default is $prefix/var/dspam, or /usr/local/var/dspam. --with-logdir=DIR Specify an alternative log directory. The default is $dspam_home/log. Do not set this to /var/log unless DSPAM will have permissions to write to the directory. FILESYSTEM SCALE The default filesystem scale is "small-scale", and writes each user to its own directory in the top-level DSPAM home data directory. The following two switches allow the scale to be changed to be more suitable for larger installations. --enable-large-scale Switch for large-scale implementation. User data will be stored as $HOME/data/u/s/user instead of $HOME/data/user --enable-domain-scale Switch for domain-scale implementation. When used, DSPAM expects username@domain to be passed in as the user id and user data will be stored as $HOME/data/example.org/user and $HOME/opt-in/example.org/user.dspam instead of $HOME/data/user INTEGRATION SWITCHES --with-storage-driver=DRIVER[,DRIVER2[...,DRIVERN]] Specify your storage driver selection(s). A storage driver is a driver written specifically for DSPAM to store tokens, signature data, and perform other proprietary operations. The default driver is hash_drv. The following drivers have been provided: mysql_drv: MySQL Drivers pgsql_drv: PostgreSQL Drivers sqlite_drv: SQLite v2.x Drivers (scheduled for removal) sqlite3_drv: SQLite v3.x Drivers hash_drv: Self-Contained Hash Database If you are a packager, or wish to have multiple drivers built for any reason you may specify multiple drivers by separating them with commas. This will cause the storage driver specified in dspam.conf to be dynamically loaded at runtime rather than statically linked. If you wish to build only one driver, but dynamically, then specify it twice as in --with-storage-driver=mysql_drv,mysql_drv. If you will be compiling DSPAM to operate as a server daemon or to deliver via SMTP/LMTP, you will need to use a thread-safe driver (outlined in the chart earlier in this document). You may also need to use some of the driver-specific configure flags (discussed in the DRIVER SPECIFIC CONFIGURATION OPTIONS section below). --disable-trusted-user-security Administrators who wish to disable trusted user security may do so by using this configure flag. This will cause DSPAM to treat each user as if they were "trusted" which could allow them to potentially execute arbitrary commands on the server via DSPAM. Because of this, administrators should only use this option on either a closed server, or configure their DSPAM binary to be executable only by users who can be trusted. This option SHOULD NOT be used as a solution to your MTA dropping privileges prior to calling DSPAM. Instead, see the TRUSTED SECURITY section of this document. --enable-homedir When enabled, instead of checking for $HOME/$USER/opt-in/ $USER[.dspam|.nodspam], DSPAM will check for a .dspam|.nodspam file in the user's home directory. DSPAM will also store each user's data in ~/.dspam when this option is enabled. Because of this, DSPAM will automatically install and run setuid root so that it can read each user's home directory. Note: This function is incompatible with most implementations of the Web UI, since it requires access to read each user's home directory. Therefore, only use this option if you will not be using the Web UI or plan on doing something asinine like running it as root. --enable-daemon Builds DSPAM with support for daemon mode, and builds associated dspamc thin client. Pthreads is required to build for daemon mode and the storage driver used must be thread-safe. DRIVER SPECIFIC CONFIGURE SWITCHES Some storage drivers have their own custom configuration switches: mysql_drv: --with-mysql-includes=DIR Specify a path to the MySQL includes --with-mysql-libraries=DIR Specify a path to the MySQL libraries (Currently links to -lmysqlclient, also -lcrypto on some systems) --enable-virtual-users Tells DSPAM to create virtual user ids. Use this if your users don't actually exist on the system (e.g. in /etc/passwd if using a password file) --enable-preferences-extension MySQL supports the preferences extension, which stores user preferences in mysql instead of flat files (the built-in method) --disable-mysql4-initialization If you are compiling libdspam for use with a third party application, and the third party application makes its own calls to libmysqlclient, you should use this option to disable libdspam's initialization and cleanup of libmysqlclient, and allow the application to manage this. This option suppresses libdspam's calls to mysql_server_init and mysql_server_end. Note: Please see the file doc/mysql_drv.txt for more information about configuring the mysql_drv storage driver. pgsql_drv: --with-pgsql-includes=DIR Specify a path to the PgSQL includes --with-pgsql-libraries=DIR Specify a path to the PgSQL libraries (Currently links to -lpq, and netlibs on some systems) --enable-virtual-users Tells DSPAM to create virtual user ids. Use this if your users don't actually exist on the system (e.g. in /etc/passwd if using a password file) --enable-preferences-extension Postgres supports the preferences extension, which stores user preferences in pgsql instead of flat files (the built-in method) Note: Please see the file doc/pgsql_drv.txt for more information about configuring the pgsql_drv storage driver. sqlite_drv: sqlite3_drv: --with-sqlite-includes=DIR Specify a path to the SQLite includes --with-sqlite-libraries=DIR Specify a path to the SQLite libraries DEBUGGING SWITCHES --enable-debug Turns on support for debugging output. This option allows you to turn on debugging messages for all or some users by editing dspam.conf or setting --debug on the commandline. Enabling debug in configure only adds support for debug to be compiled in, it must still be activated using one of the options prescribed above. Debugging support itself doesn't use up very many additional resources, so it should be safe to leave enabled on non-enterprise class systems. --enable-verbose-debug Turns on extremely verbose debugging output. --enable-debug is implied. Never use this on production builds! Note: When verbose debug is compiled in, DSPAM performs many additional mathematical calculations regardless of whether or not it's been activated. You shouldn't use --enable-verbose-debug for production builds unless you have serious issues you can't resolve. FEATURE ACTIVATION --enable-clamav Enables support for Clam Antivirus. DSPAM can interface directly with clamd to perform virus scanning and can be configured to react in different ways to viruses. See dspam.conf for more information. ADDITIONAL CONFIGURATION OPTIONS The remainder of configuration options are located in dspam.conf, which is installed in sysconfdir (default: /usr/local/etc) upon a make install. It is generally a good idea to review dspam.conf and make any changes necessary prior to using DSPAM. 2. BUILDING AND INSTALLING After you have run configure with the correct options, build and install DSPAM by performing: make && make install Note: If you are a developer wanting to link to the core engine of dspam, libdspam will be built during this process. Please see the example.c file for examples of how to link to and use libdspam. Static and dynamic libraries are built in the .libs directory. Needed headers will be installed in $prefix$/include/dspam. 3. PERMISSIONS In the typical UNIX environment, you'll need to worry about the following permissions: The CGI User: This is the user your web server (most likely Apache) is running as. This is commonly 'nobody' or 'web'. You can find this in Apache's httpd.conf by searching for 'User'. The CGI user will need the ability to access the following components of DSPAM: - Ability to execute the dspam binary - Ability to read and write to dspam_home/data/ - Trusted user permissions in dspam.conf ("Trust [username]") - The execution 'Group' used must match the group dspam is running as (this is typically 'mail', 'dspam', or similar) The MTA User: This is the user your mail server software is running as when it executes DSPAM. This is usually daemon, mail, exim, etc. This is typically different from the user the MTA runs and polices itself as, to avoid security problems. Consult your MTA's documentation for more info. The MTA user will require: - The ability to execute the dspam binary - Trusted user permissions in dspam.conf ("Trust [username]") Systems Administrators: In order to perform administrative functions, systems administratiors will require: - The ability to execute dspam-related binaries - Trusted user permissions in dspam.conf ("Trust [username]") Note: If the MTA is communicating with DSPAM via LMTP (explained later), then execution permissions are not necessary Note about FreeBSD: FreeBSD's default MTA user is 'mailnull' FreeBSD's default delivery agent also changes its uid, and so in order to call it, dspam must be installed as setuid root to work on the commandline properly. This is done automatically on install. Understanding Trusted User Security DSPAM has tighter security for untrusted users on the system to prevent them from touching other user's data or passing arbitrary commands to the delivery agent DSPAM calls. "Trusted User Security" is a simple system whereby any unsafe functions are not available to a user calling dspam unless they are within dspam.conf's trusted user list. Local non-privileged users should be able to use DSPAM without any problems while remaining untrusted, as long as they behave. For example, an untrusted user cannot set their DSPAM username to any name other than their username. Untrusted users are also limited to the delivery options set by the system administrator, and cannot redirect how DSPAM delivers mail. A list of trusted users is maintained in dspam.conf. This file should include a list of trusted users who should be allowed to set the dspam user, passthru parameters, and other information that would be potentially dangerous for a malicious user to be able to set. You'll need to ensure that your CGI user, MTA user, and system administrators are on the list. 4. MAIL SERVER INTEGRATION As previously mentioned, there are three popular ways to implement DSPAM: As a delivery proxy: The default approach integrates DSPAM directly with the mail server and filters spam as mail comes in. Please see the appropriate instructions in doc/ pertaining to your MTA. As a POP3 proxy: This alternative approach implements a POP3 proxy where users connect to the proxy to check their email, and email is filtered when being downloaded. The POP3 proxy is a much easier approach, as it requires much less integration work with the mail server (and is ideal for implementing DSPAM on Exchange, etcetera). Please see the file doc/pop3filter.txt. As an SMTP Relay: DSPAM can be configured as an SMTP relay, a.k.a appliance. You can set it up to sit in front of your real mail server and then point your MX records at it. DSPAM will then pass along the good mail to your real SMTP server. See doc/relay.txt for more information. The example provided uses Postfix and MySQL. Trusted users and the MTA If you are using an MTA that changes its userid to match the destination user before calling DSPAM, you won't be able to provide pass-thru arguments to DSPAM (these are the commandline arguments that DSPAM in turn passed to the local delivery agent, in such a configuration). You will need to pre-configure the "default" pass-thru arguments in DSPAM. This can be done by declaring an untrusted delivery agent in dspam.conf. When DSPAM is called by an untrusted user, it will automatically force their DSPAM user id and passthru delivery agent arguments specified in dspam.conf. This information will override any passthru commandline parameters specified by the user. For example: UntrustedDeliveryAgent "/bin/mail -d $u" The variable $u informs DSPAM that you would like the destination username to be used in the position $u is specified, so when DSPAM calls your LDA for user 'bob', it will call it with: /bin/mail -d bob 5. ALIASES There are essentially two different ways a user might train DSPAM. The first is by using the Web UI, which allows them to retrain via the "History" tab. This works quite well, as users must visit the Web UI occasionally to review their quarantine anyway (and reverse any false positives). We'll discuss this shortly in section 1.1.8. The more common approach to training, discussed here, is to allow users to simply forward their spam to an email address where DSPAM can analyze and learn it. DSPAM uses a signature-based system, where a serial number of sorts is appended to each email processed by DSPAM. DSPAM reads this serial number when the user forwards (or bounced) a message to what is called their "spam email address". The serial number points to temporary information stored on the server (for 14 days by default) containing all of the information necessary for DSPAM to relearn the message. This is necessary in order to relearn the *exact* message DSPAM originally processed. Note: If you are using an IMAP based system, Web-based email, or other form of email management where the original messages are stored on the server in pristine format, you can turn this signature feature off by setting "TrainPristine on" in dspam.conf. DSPAM will then use the message itself that you provide it to train, which MUST be identical to the original message in order to retrain properly. Because DSPAM learns each user's specific email behavior, it's necessary to identify the user in order to program their specific filtering database. This can be done in one of three ways: The Simple Way: If you are using the MySQL or PgSQL storage drivers, the original numeric user id can be embedded in the signature, requiring only one central spam alias to be necessary for the entire system. To configure this, uncomment the appropriate UIDInSignature option in dspam.conf: # MySQLUIDInSignature on # PgSQLUIDInSignature on Now all you'll need is a single system-wide alias, and DSPAM will train the appropriate user when it sees the signature. An example of an alias might look like: spam:"|/usr/local/bin/dspam --user root --class=spam --source=error" Similarly, you may also wish to have a false-positive alias for users who prefer to tag spam rather than quarantine it: notspam:"|/usr/local/bin/dspam --user root --class=innocent --source=error" Note: The 'root' user represents any active dspam user. It is necessary to supply a username on the commandline or DSPAM will bail on an error, however the user will be changed internally once the signature is read. The Kind-of-Simple Way: If you're not using one of the above storage drivers, the next easiest way to configure aliases is to have DSPAM parse the 'To:' header of the message and use a catch-all subdomain to direct all mail into DSPAM for retraining. You can then instruct your users to email addresses like 'spam-bob@relearn.example.org'. The ParseToHeaders option (available in dspam.conf) will parse the To: header of forwarded messages and set the username to either 'bob' or 'bob@relearn.example.org', depending on how it is configured. DSPAM can also set the training mode to either "learn spam" or "learn notspam" depending on whether the user specified a spam- or notspam- address in the To: header. This is ideal if you don't want to set up a separate alias for each user on your system (The Hard Way). If you're fortunate enough to have a mail server that can perform regular expression matching, you can set up your system without a subdomain, and just use addresses like spam-bob@example.org. For the rest of us, it will be necessary to set up a subdomain catch-all directly into DSPAM. For example: @relearn.example.org "|/usr/local/bin/dspam" Don't forget to set the appropriate ParseToHeaders and related options in dspam.conf as well. More specific instructions can be found in dspam.conf itself. In most cases, the following will suffice: ParseToHeaders on ChangeUserOnParse user ChangeModeOnParse on The Old Way (A.K.A. The Hard Way) If neither of the easy ways are possible, you're stuck with doing it the hard way. This means you'll need a separate spam alias (and notspam alias, if users are tagging mail) for each user. To do this, you will need to create an email address for each user, so that DSPAM can analyze and learn for that specific user. For example: spam-bob: "|/usr/local/bin/dspam --user bob --class=spam --source=error" You will end up having one alias per mail user on the system, two if you do not use DSPAM's CGI quarantine (an additional one using notspam-). Be sure the aliases are unique and each username matches the name after the --user flag. A tool has been provided called dspam_genaliases. This tool will read the /etc/passwd file and write out a dspam aliases file that can be included in your master aliases table. To report spam, the user should be instructed to forward each spam to spam-user@yourhost It doesn't really matter what you name these aliases, so long as the flags being passed to dspam are correct for each user. It might be a good idea to create an alias custom to your network, so that spammers don't forward spam into it. For example, notspam-yourcompany-bob or something. Note About Security: You might be wondering if a user can forward a spam to another user's address, or whether a spammer can forward a spam to another user's notspam address. The answer is "no". The key to all mail-based retraining is the signature embedded in each email. The signature is stored with each user's own user id, and so not only does the incoming message have to bear a valid signature, but it also has to be stored on the system with the correct user id. This prevents any kind of alias abuse. 6. NIGHTLY MAINTENANCE AND HOUSEKEEPING CRONS Non-SQL Based Nightly Purge If you are NOT running a SQL-based solution, then you should configure dspam_clean to run under cron nightly. This clean tool will read all signature databases and purge signatures that are older than 14 days (configurable), purge abandoned tokens, and remove unimportant tokens. Without this tool, old signatures will continue to pile up. Be sure the user running cleanup has full read/write permissions on the DSPAM data files. 0 0 * * * /usr/local/bin/dspam_clean [options] See the dspam_clean description for more information SQL-Based Nightly Purge SQL-Based solutions include a nightly SQL script to perform the same basic tasks as dspam_clean, and it does it much faster and with more finesse. You can find instructions about each driver's purge functions in the driver's README (doc/[driver].txt) for performing nightly maintenance. Most SQL drivers will include a purge script in the src/tools.[driver] directory. For example: 0 0 * * * mysql --user=[user] --pass=[pass] [db] < /path/to/purge-4.1.sql Log Rotation The system log and user logs can fill up fairly quickly, when all that's really needed to generate graphs are the last two to three weeks of data. You can configure a nightly log cleanup using dspam_logrotate: 0 0 * * * dspam_logrotate -a 30 -d /usr/local/var/dspam/data 7. NOTIFICATIONS DSPAM is capable of sending three different notifications to users: - A "First Run" message sent to each user when they receive their first message through DSPAM. - A "First Spam" message sent to each user when they receive their first spam - A "Quarantine Full" message sent to each user when their quarantine box is > 2MB in size (note: the 2MB limit is hardcoded in DSPAM). These notifications can be activated by copying the txt/ directory from the distribution into DSPAM's home (by default /usr/local/var/dspam). You can alter the location of this directory by setting "TxtDirectory" in dspam.conf. Example: /usr/local/var/dspam/txt/firstrun.txt /usr/local/var/dspam/txt/firstspam.txt /usr/local/var/dspam/txt/quarantinefull.txt You will want to modify these templates prior to installing them to reflect the correct email addresses and URLs (look for 'example.org'). NOTE: The quarantine warning is reset when the user clicks 'Delete All', but is not reset if they use "Delete Selected". If the user doesn't wish to receive reminders, they should use the "Delete Selected" function instead of "Delete All". You'll need to also set "Notifications" to "on" in dspam.conf. 8. THE WEB UI The Web UI (CGI client) can be run from any executable location on a web server, and detects its user's identity from the REMOTE_USER environment variable. This means you'll need to use HTTP password authentication to access the CGI (Any type of authentication will work, so long as Apache supports the module). This is also convenient in that you can set up authentication using almost any existing system you have. The only catch is that you'll need the usernames to match the actual DSPAM usernames used the system. A copy of the shadow password file will suffice for most common installs. The accompanying files in the webui/ folder should be copied into your document root and cgi-bin, as specified. Note: Some authentication mechanisms are case insensitive and will authenticate the user regardless of the case they type it in. DSPAM, on the other hand, is case sensitive and the case of the username used will need to match the case on the system. If you suffer from this authentication problem, and are certain all of your users' usernames are in lowercase, you can add the following line of code to the CGI right after the call to &ReadParse... $ENV{'REMOTE_USER'} = lc($ENV{'REMOTE_USER'}); The CGI will need to function in the same group as the dspam agent in order to work with the files in dspam_home. The best way to do this is to create a separate virtualhost specifically for the CGI and assign it to run in the MTA group using Apache's suexec. If you are using procmail, additional configuration may also be necessary (see below). Note: Apache users do NOT take on the identity of the groups specified in /etc/group so you will need to specifically assign the group in httpd.conf. Note about Procmail: Because the DSPAM Web UI is a CGI script, DSPAM will not retain its setuid privileges when called. If you are running procmail, this will become a problem as procmail requires root privileges to deliver. The easiest hack around this is to create a procmail.dspam binary and make it setuid root, then make it executable only by the mail group (or whatever group DSPAM and the CGI run in). The DSPAM Web UI has a minimal configuration inside the configure.pl script. You'll want to check and make sure all of the settings are correct. In most cases, the only that will be necessary to change are the large-scale or domain-scale flags. BEFORE PROCEEDING: Check and make sure (Again) that the CGI user from Apache's httpd.conf is added as a trusted user in dspam.conf. Default Preferences Now would be a good time to set the system's default preferences. This can be done using the dspam_admin tool. For example: dspam_admin ch pref default trainingMode TEFT dspam_admin ch pref default spamAction quarantine dspam_admin ch pref default spamSubject "[SPAM]" dspam_admin ch pref default enableWhitelist on dspam_admin ch pref showFactors off The default preferences are used for any users who have not yet set their own preferences. You can also control which preferences the user may override by changing the "AllowOverride" settings in dspam.conf. By default, the parameters specified on the commandline will be used (if any). If, however, a preference is found for the particular user those preferences will override the commandline. GD Graphing Library If you plan on leaving DSPAM's logging function enabled, and would like to produce pretty graphs for your users, the graph.cgi script requires the following be installed on your machine: - GD Graphics Library (http://www.boutell.com/gd/) Compile with png support - The following PERL modules: (http://www.perl.com/CPAN/modules/by-module/GD/) . GD . GD-Graph3d . GDGraph . GDTextUtil . CGI Typically this can be accomplished on the commandline: perl -MCPAN -e 'install GD::Graph3d' Configuring Administrators Once you've configured the Web UI, you'll want to edit the 'admins' file to contain a list of users who are permitted to use the administration suite. Configuring Sub-Administrators / Domain Level Administrators It is possible to delegate the management of users to a list of sub-admins/ domain level admins. To accomplish that you should edit the 'subadmins' file to contain a list of sub-admins/domain level admins which are permitted to switch their username while using the DSPAM control center. Opt-In/Out If you would like your users to be able to opt in/out of DSPAM filtering, add the correct option to the nav_preferences.html template, depending on your configuration (for example, if you have an opt-in system, you'll want to add the opt-in option). Note: This currently only works with the preferences extension, and not drop files. Opt into DSPAM filtering Opt out of DSPAM filtering 1.2 TESTING If you've installed from an RPM, there's a good chance that the packager went to the trouble of testing already. If you're building from sources, however, you'll need to find a way to ensure your configuration isn't broken. Most software packages are supplied with a test suite to determine if the software is functioning properly. Since DSPAM's correct function relies primarily on having the correct permissions and mail server configuration, a test script fails to provide the level of testing required for such a package. The following exercise has been provided to test dspam's correct functioning on your system. This exercise does not test the Web UI, but only the core dspam agent. Before running the test, you should have completed section 1.1's instructions for compiling and installing dspam as well as configured your mail server to support dspam. 1. Create a new user account on your system. It is important that this be a new account to prevent any unrelated email from being delivered during testing. Be sure to configure a spam alias for the test account. 2. Send a short (10 words or less) email to the account, and pick it up using your favorite mail client. 3. Run dspam_stats [username] on the server. You should see a value of 1 for "TI" or "Total Innocent" as shown below: dspam-test 0 TP 1 TN 0 FN 0 FP If you receive an error such as "unable to open /usr/local/var/dspam... for reading", then the dspam agent is not configured correctly. The problem could exist in either your mail server configuration or one or more of the permissions on the directory or agent. Check your configuration and permissions, and repeat this step until the correct results are experienced. 4. Run dspam_dump [username] to get a complete list of tokens and their statistics. Each token should have an I: (innocent) hit count of 1. The tokens will be represented as 64-bit values, for example: 3126549390380922317 S: 0 I: 1 LH: Mon Aug 4 11:40:12 2003 13884833415944681423 S: 0 I: 1 LH: Mon Aug 4 11:40:12 2003 14519792632472852948 S: 0 I: 1 LH: Mon Aug 4 11:40:12 2003 8851970219880318167 S: 0 I: 1 LH: Mon Aug 4 11:40:12 2003 To view statistics for a particular token, run dspam_dump [username] [token] where token is the plain-text token value. For example: % dspam_dump bill FREE 7717766825815048192 S: 00265 I: 00068 P: 0.7358 5. Forward the test message to the spam alias you've created for the test account. Provide enough time for the message to have processed. 6. Run dspam_stats [username] on the server again. Now, the value for TN should be zero and the value for FN (false negatives) should be 1 as shown below: dspam-test 0 TP 0 TN 1 FN 0 FP If this is not the case, check the group permissions of the dspam agent as well as the permissions your MTA uses when piping to aliases. 7. Run dspam_dump [username] again. make sure that _EVERY_ token now has an I: of zero and a S: of 1: 3126549390380922317 S: 1 I: 0 LH: Mon Aug 4 11:44:29 2003 13884833415944681423 S: 1 I: 0 LH: Mon Aug 4 11:44:29 2003 14519792632472852948 S: 1 I: 0 LH: Mon Aug 4 11:44:29 2003 8851970219880318167 S: 1 I: 0 LH: Mon Aug 4 11:44:29 2003 If you have some tokens that do not have an S: of 1 or an I: of 0, the dspam signature was not found on the email, and this could be due to a lot of things. 1.3 TROUBLESHOOTING Problem: No files are being created in the user directory Solution: Check the directory permissions of the directory. The user directory must be writable by the user the dspam agent is running as as well as the CGI user. Problem: False positives are never being delivered Solution: Your CGI most likely doesn't have the privileges required by the LDA to deliver the messages. Make sure the CGI user is in the correct group. Also consider setting the dspam agent to setuid or setgid with the correct permissions. Problem: My database is getting huge! Solution: DSPAM's default training mode is TEFT. On top of this, the purging defaults are very lax. You might consider switching to TOE (Train-on-Error) mode training if you require a minimal database. If you are willing to sacrifice accuracy for disk space, disabling the 'chain' tokenizer from dspam.conf will prevent the use of multi-word (chained) tokens, which will also cut your database size considerably. You may also consider more frequent calls to dspam_clean -p to purge neutral data, which comprises a majority of most databases. For more help, please see the DSPAM FAQ at http://dspam.sourceforge.net. 1.4 DSPAM TOOLS A few useful tools have been provided to make DSPAM management a bit easier. These tools include: dspam_admin - A tool used to perform specific administrative functions. These functions are usually included as part of an extensions package (such as the preferences extension). Available functions are listed in the tool's usage output. dspam_train - Used to train and test a corpus of ham and spam (in maildir format). Syntax: dspam_train [username] [spam_dir] [nonspam_dir] where username is the username of the user to apply the training to, and the two dirs represent directories containing messages in individual files (e.g. maildir/corpus format). dspam_train can be used on an existing user's database, to further improve accuracy, or to train from scratch. it also provides a solid test jig for testing the efficiency and accuracy of a test corpus against the filter. NOTE: dspam_train will automatically balance training of the corpus to ensure both spam and nonspam are trained based on the ratio of spam/nonspam. this means if you have twice as much spam as nonspam, two spam will be trained for every nonspam. dspam_dump - Dumps a DSPAM dictionary. This can be used to view the entire contents of a user's dictionary, or used in combination with grep to view a subset of data. Syntax: dspam_dump [username] [token] where username is the DSPAM user's username. If a token is specified, statistics only for that token will be printed. dspam_clean - Performs nightly housecleaning by deleting old or useless data from user data. If using the hash driver (hash_drv) please use cssclean instead (see doc/README.cssclean) dspam_clean performs the following operations: 1. Using the -s flag, dspam_clean will continue to perform stale signature purging. If an age is specified, for example -s14, the age defined as the default will be overridden. Specifying an age of 0 will delete all signatures for the users processed. 2. Using the -p flag, dspam_clean will delete all tokens from a user's database whose probability is between 0.35 and 0.65 (fairly neutral, useless tokens) that fall beyond the default age. If an age is specified, for example -p30, the age defined as the default will be overridden. It is a good idea to use this type of clean with an age of 0 on users after a lot of corpus training. 3. Using the -u flag, dspam_clean will delete all unused tokens from a user's database. There are four different types of unused tokens: - Tokens which have not been used for a long time - Tokens which have a total hit count below 5 - Tokens which have only one spam hit - Tokens which have only one innocent hit Ages may be overridden by specifying a format such as -u30,15,10,10 where each number represents the respective age. Specifying an age of zero will delete all unused tokens in the category. Defaults are set in dspam.conf. Optionally, usernames may be specified to override the default behavior of processing all users. Examples: Process all users on the system using all clean operations: dspam_clean -s -p15 -u90,30,15,15 Delete all of user 'dick' and 'jane's signatures: dspam_clean -s0 dick jane Perform a post-corpus training clean on user 'spot': dspam_clean -p0 -u0,0,0,0 spot Run dspam_clean with all default options, all clean modes enabled, on all users on the system: dspam_clean -s -p -u NOTE: You may wish to only run certain cleaning modes depending on the type of storage driver you are using. For example, the MySQL storage driver includes a script which performs signature and unused token operations, leaving only probability operations as useful. If you are using a SQL-based storage driver, it is strongly recommended that you use the maintenance scripts wherever possible for optimum efficiency. dspam_stats - Displays the spam statistics for one or all users on the system. Syntax: dspam_stats [username]. If no username is provided, all users will be displayed. Displays TP (true positives), TN (true negatives), FN (false negatives), and FP (false positives). dspam_genaliases - Reads the /etc/passwd file and outputs a dspam aliases table which can be included in the master aliases table. You may try Art Sackett's generate_dspam_aliases tool at http://www.artsackett.com/freebies/generate_dspam_aliases/ if you need some better functionality. This will eventually be merged in as a replacement for the existing tool. dspam_merge - Merges multiple users' dictionaries together into one user's dictionary (does not affect the merge users). This can be used to create a seeded dictionary for a new user, or to copy a single user's dictionary to a new file. This is great for building global dictionaries, but crunches a lot of time and disk. 1.5 AGENT COMMANDLINE ARGUMENTS The DSPAM agent (dspam) recognizes the following commandline arguments: --user [user1 user2 ... userN] Specifies the destination user(s) of the incoming message. DSPAM then processes the message once for each user individually. If the message is to be delivered, the $u (or %u) parameters of the arguments string will be interpolated for the current user being processed. --class=[spam|innocent] Tells DSPAM that the message being presented has already been classified by the user. This flag should be used when a misclassification has occurred, when the user is corpus-feeding a message, or an inoculation is being presented. This flag must be used in conjunction with the --source flag. Providing no classification invokes the SOP of DSPAM, which is to determine the message's nature on its own. --source=[error|corpus|inoculation] Wherever --class is used, the source of the user-provided classification must also be provided. The source is very important and dramatically affects DSPAM's training behavior: 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. 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, not for correcting errors. 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 previously 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. --deliver=[spam,[innocent|nonspam],summary,stdout] Tells DSPAM to deliver the message if its result falls within the criteria specified. For example, --deliver=innocent or --deliver=nonspam will cause DSPAM to only deliver the message if its classification has been determined as innocent. Providing --deliver=innocent,spam or --deliver=nonspam,spam will cause DSPAM to deliver the message regardless of its classification. This flag provides a significant amount of flexibility for nonstandard implementations, where false positives may not be delivered but spam is, and etcetera. summary : Deliver (to stdout) a summary indentical to the output of message classification: X-DSPAM-Result: User; result="Innocent"; class="Innocent"; probability=0.0000; confidence=1.00; signature=4b11c532158749980119923 stdout : Is a shortcut for for --deliver=innocent,spam --stdout --stdout If the message is indeed deemed "deliverable" by the --deliver flag, this flag will cause DSPAM to deliver the message to stdout, rather than the configured delivery agent. --process Tells DSPAM to process the message. This is the default behavior, and the flag is implied unless --classify is used - but is a good idea to use to avoid ambiguity. --classify Tells DSPAM only to classify the message, and not make any writes to the user's metadata or attempt to deliver/quarantine the message. NOTE: The output of the classification is specific to the user, not including the output of any groups they might be affiliated with, so it is entirely possible that the message would be caught as spam by the group, even if it didn't appear in the classification. If you want to get the classification for the GROUP, use the group name as the user instead of an individual. --signature=[signature] For some implementations, the admin may wish to pass the signature in via commandline instead of allowing DSPAM to find it on its own. This is especially useful when front-ending the agent with other tools. Using this option will set the active signature and will also forego reading of stdin. --mode=[toe|tum|teft|notrain|unlearn] Configures the training mode to be used for this process: 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. NOTE: Until a user reaches 100 innocent messages in their metadata, train-on-error will also be teft-based, even if otherwise specified on the commandline. 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. 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 50 "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. It is a balance of resources as well, as only less-than-mature tokens are written to the database. NOTE: You should corpus train before using tum. 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. 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. RECOMMENDATIONS: In general, it is recommended that users begin with TEFT. If a user is experiencing between a 75-85% spam ratio, they may benefit from Train-on-Mature mode. If a user is experiencing over 90% spam, then Train-on-Error mode should make a noticeable improvement in accuracy. It eventually boils down to what works best for your users. There is no reason a system could not be configured (with a script) to analyze a user's *.stats file and determine the best training mode for that user. --feature=[no,wh,tb=N] 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: no: 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. BNR is not for everyone, and so users should try it out after they've trained to see if it helps improve accuracy. 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. This feature should be disabled if you're not paranoid about false positives, as it does increase the number of spam misses significantly during training. wh: 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 10 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 during initial training. NOTE: None of the present features are necessary when the source is "error", because the original training data is used from the signature to retrain, instantiating whatever features (such as whitelisting) were active at the time of the initial classification. Since BNR is only necessary when a message is being classified, the --feature flag can be safely omitted from error source calls. --daemon Puts DSPAM in daemon mode; e.g. DSPAM acts like a server when started with this parameter. See section 2.3 for more information about daemon mode. 2.0 LINKING WITH LIBDSPAM Developers are able to link to the DSPAM core engine (libdspam) to provide "drop-in" spam-filtering for their applications. Examples of the libdspam API can be found in the example.c file included with this distribution. IF YOUR PROJECT USES THE LIBDSPAM API, A GPL-COMPATIBLE OPEN SOURCE LICENSE IS REQUIRED IN ORDER TO REDISTRIBUTE. IF YOU ARE DEVELOPING A CLOSED-SOURCE APPLICATION OR APPLICATION THAT DOES NOT CONFORM TO GPL STANDARD, YOU MAY NOT REDISTRIBUTE ANY APPLICATIONS USING LIBDSPAM WITHOUT A COMMERCIAL LICENSE. Please contact project administrators paulcockings@users.sourceforge.net or sbajic@users.sourceforge.net for information about commercial licensing. To link to libdspam, follow the instructions for compiling and installing DSPAM. When compiled, the libdspam static and shared libraries are also built. This library contains all the functions necessary to use dspam's filtering in your application. Your application will also need to link to the correct storage driver libraries. If you are using libdspam in a multithreaded application, you will need to either use a thread-safe storage driver or control access to libdspam using a mutex lock. If you are using libdspam in a multithreaded environment, each thread will require its own DSPAM context. Fortunately, you can attach the same database handle to each context using dspam_attach(). See the man page for more information. To build with the dspam API, you will also need the header files from the distribution. You can copy these to /usr/include/dspam for ease of use, and then use -I/usr/include/dspam Please see example.c for API examples. If you are interested in linking libdspam with your project and have questions or concerns, please contact the dspam-devel@lists.sourceforge.net mailing list. 2.1 CONFIGURING GROUPS Groups enable a group of users to share information. To create groups, you'll want to create a group configuration file. The location of this file is defined as GroupConfig in dspam.conf, and defaults to /usr/local/var/dspam/group. The format of the file is: group1:type:user1,user2,user3 group2:type:*globaluser DSPAM will read this file upon startup and determine if the user fits into any particular group. DSPAM supports the following group types: SHARED Enables users with similar email behavior to share the same dictionary while still maintaining a private quarantine box. The benefits of this type of group are faster learning, and sharing a single spam alias. Shared groups can have both positive and negative effects on accuracy. If a shared group consists of users with similar, predictable email behavior, the users in the group can benefit from a larger dictionary of spam and faster learning (especially for newcomers in the group). If a group consists of users with different email behavior, however, the users in the group will experience poor spam filtering and a higher number of false positives. NOTE: The SQL-based storage drivers support shared groups, but has one caveat: If you are NOT enabling "virtual users" support, you will need to create an actual user on your system named after each group you create. On top of shared group support, a shared group can also be made to be 'managed'. Using the group type 'SHARED,MANAGED' will cause the group to share a single quarantine mailbox which could be managed by the group's administrator (aka: the group name). This would enable one individual to monitor quarantine for the entire group, however personal emails marked as false positives could potentially be viewed as well. For this reason, managed groups should only be used when this is not an issue. NOTE: Use the dspam_stats tool to keep an eye on the effectiveness of shared groups. If a shared group experiences poor performance, find the users whose email behavior is inconsistent with that of the group and remove them from the group. The format for a shared or shared,managed group is: group1:shared:user1,user2,userN group2:shared,managed:user1,user2,userN group3:shared:*@example.org group4:shared:* The group name (in the example above 'group1', 'group2', 'group3', 'group4') can be anything you like. If you set the shared group to be managed then the groupname (in the example above 'group2') will be used by DSPAM as the shared group administrator. The user/member list for shared group allows the following syntax: user1 : Exact match of user with the name "user1" * : Match any user *@example.org : Match any user having '@example.org' at the end of ther username. The matching only works for the '@' character. You can not use something like '*user' to include user 'infouser', 'testuser', 'dummyuser', etc. INOCULATION An inoculation group allows users to maintain their own private dictionaries with their own spam alias, but all members of the group will inoculate other members with spams they manually forward into their alias. This allows users to report spams to one another and maintain their own private dictionary. Another advantage to this is that users do not necessarily have to share the same email behavior. VERSATILE LANGUAGE INOCULATION MESSAGES A new Internet-Draft has been released to the public: http://tools.ietf.org/html/draft-spamfilt-inoculation-01 http://tools.ietf.org/html/draft-yerazunis-spamfilt-inoculation-03 To create a message format standard for sending inoculation data via email. This will allow users on different servers, and even using different anti-spam tools to share inoculation information with one-another. DSPAM presently implements support for this message standard with the following limitations: - Only inbound inoculation messages are supported. DSPAM does not yet send out inoculations using this message format. This should not be confused with local inoculation, which *is* supported. - The message/inoculation format is the only inoculation type presently supported. text/inoculation and multipart/inoculation coming soon. - The only supported authentication mechanism is presently md5 verification codes/checksums. Any unsupported inoculations will simply be dropped. A list of identifies and authentication information can be set up in the file [username].inoc or in the user's home directory in a .inoc file if homedir-dotfiles is enabled. The format of this file is: sender1:shared secret sender2:shared secret Each sender should specify the correct sender id when sending an inoculation, and should generate their checksum based on the shared secret established between both parties. NOTE: Users should only be added to an inoculation group after their initial learning period, to avoid potential false positives due to lack of data. The format for a innoculation group is: group1:inoculation:user1,user2,userN group2:inoculation:user3,user4,userN The group name (in the example above 'group1', 'group2') can be anything you like. It is not used by DSPAM and does even not have to be unique. The user/member list for inoculation group allows the following syntax: user1 : Exact match of user with the name "user1" CLASSIFICATION Classification groups allow a group of users to network their results together. If DSPAM is uncertain of whether a message is spam or nonspam for a group member, all other members of the group are queried. If another member believes the message to be spam, it will be marked as spam. DSPAM is querying the members one by one and stopps as soon as a member reports believes that the message is spam. The format for a classification group is: group1:classification:user1,user2,userN group2:classification:user3,user4,userN The group name (in the example above 'group1', 'group2') can be anything you like. It is not used by DSPAM and does even not have to be unique. The user/member list for inoculation group allows the following syntax: user1 : Exact match of user with the name "user1" GLOBAL Global groups allows DSPAM to provide a "SpamAssassin type out-of-the-box filtering" for all new users until they have built their own useful dictionaries. A global group can be created by adding a CLASSIFICATION group definition (see above) but prefix the group member/user with a '*'. The format for a global classification group is: groupname:classification:*globaluser This will automatically add user globaluser as a classification peer to all users. Any user who has less than 1000 innocent messages or 250 spam messages in their corpus, or whose filter is uncertain (confidence less than 0.65) about a particular message will consult the globaluser dictionary for an answer. The Global group user (in this case 'globaluser') will need to be trained using corpus, by using the dspam_merge tool, or other means. The Global group user (in this case 'globaluser') is treated just as any other user on the system. The group name (in the example above 'groupname') can be anything you like. It is not used by DSPAM and does even not have to be unique. NOTE: Be sure and set your global user's preferences so that trainingMode is set to TOE. This will prevent the purge tools you use from purging them empty in 90 days. MERGED Merged groups are similar to global groups in that the entire system uses a single global user as a parent. What's different is that the merged group is merged with the individual user's training data at run-time, instead of switching between the two. This allows the merged group to be treated like a base dataset for all users, and provides for quicker learning and correction than the previous approach. It is recommended merged groups are only used with TOE-mode training so that only corrective data is stored, but systems with ample amounts of disk may wish to run in TUM mode to learn the user's behavior dynamically. The group's data is merged with the user's data in real-time, so if you have: Group : Viagra = 10 Spam Hits, 0 Innocent Hits User1 : Viagra = 5 Spam Hits, 15 Innocent Hits User2 : Viagra = 20 Spam Hits, 1 Innocent Hits Then the token is loaded as: User1 : Viagra = 15 Spam Hits, 15 Innocent Hits = 0.50 (50%) = neutral User2 : Viagra = 30 Spam Hits, 1 Innocent Hits No data is written to the group by DSPAM; only the user's data. This then offsets the group's data without affecting other users. Because of the way this data is merged, it's not recommended that you update the merged group with more than a handful of messages periodically, as it affects how all stats are defined for each user. The format for a merged group is: group1:merged:user1,user2,userN group2:merged:user3,user4,userN The group name (in the example above 'group1', 'group2') can be anything you like and represents the name of the group user to merge with all members of the group. DSPAM will use that group name (in the example above 'group1', 'group2') and merge at run-time the tokens from that group name with the tokens of the user (if the user is member of the merged group). The user/member list for merged group allows the following syntax: user1 : exact match of user with the name "user1" -user1 : exclude user with the name "user1" * : match any user *@example.org : match users having "@example.org" at the end of ther username. The matching only works for the '@' character. You can not use something like '*user' to include user 'infouser', 'testuser', 'dummyuser', etc. -*@example.org : exclude users having "@example.org" at the end of their username. The matching only works for the '@' character. You can not use something like '-*user' to exclude user 'infouser', 'testuser', 'dummyuser', etc. NOTE: Merged Groups are great for providing out-of-the-box adaptive filtering, but allowing users to build their own data from scratch will still result in the best possible accuracy in the longrun. NOTE: Be sure and set your group user's preferences so that trainingMode is set to TOE. This will prevent the purge tools you use from purging them empty in 90 days. RESTRICTIONS! A user can simultaneously be a member of multiple classification / global group(s) and multiple inoculation group(s), but a user cannot be a member of both a classification / global group(s) or inoculation group(s) and a shared or shared,managed group. A user can not be member of: * both a classification group and a global group * multiple merged groups * multiple shared or shared,managed groups * both a shared group or shared,managed group and a merged group 2.2 EXTERNAL INOCULATION THEORY Bill Yerazunis recently expressed his theory of inoculation on an anti-spam development list, using the term "vaccination": "Part of the problem is that spam isn't stationary, it evolves. That pesky .1% error rate is in some part due to the base mutation rate of spam itself. Maybe the answer is "vaccination". Vaccination is using _one_ person's misery be used to generate some protective agent that protects the rest of the population; only the first person to get the spam actually has to read it. My expectation is this: say you have ten friends, and you all agree to share your training errors. Each of you will (statistically) expect to be the first to see a new mutation of spam about 9% of the time; the other ten friends in this group will have their bayesian filter trained preemptively to prevent this. Net result: you get a tenfold decrease in error rate - down to 99.99% accuracy. With a hundred such (trusted) friends, you may be down to 99.999% accuracy." DSPAM has taken this concept and rolled it into support for what we call "inoculation groups" providing the exact functionality Bill describes. This could be considered an "internal inoculation" practice. On top of this, DSPAM has been designed to support external inoculation as a complement to internal inoculation. This is where instead of your internal circle of friends inoculate you, you rely on external elements - namely spammers themselves - to inoculate you. The theory behind external inoculation is this: why put _anyone_ through the misery of being the first to receive a new spam when you can have the spammers themselves send it directly to you. On top of this, external inoculation can be combined with internal inoculation by taking the spam you received externally and inoculating your friends with it internally. Inoculation is a little different from learning, as inoculation causes tokens to be given additional hit counts in an attempt to learn from a single email. As a result, any form of inoculation should _only_ be attempted after an initial learning phase (perhaps when your filtering accuracy exceeds 99.0%). DSPAM inoculates like this: 1. Every token that doesn't already exist in the database, or have fewer than two hits will be hit five times. 2. All other tokens are hit twice. External inoculation is accomplished by creating a covert, external alias that is configured to automatically inoculate your dictionary from any messages it receives. The covert alias can then be published onto a series of public newsgroups and websites where it is sure to be harvested by a spammer's tools. One could even pro-actively subscribe one's self to several different opt-in spam lists, etcetera. The first step is to configure an alias. To do this you would use something like: bob_c: "|/path/to/dspam --process --class=spam --source=inoculation --user bob" The 'C' in bob is for 'Covert'. We must use a covert alias because if we use something obvious like 'bob-spam', harvester tools will automatically strip the -spam off and spam your real account. Once the alias is set up, make sure this alias gets out only on lists where harvesters will grab it, and nobody will send legitimate email to it. It may even be a good idea to put it at the bottom of your tagline in all your publicly archived emails, something like... Spammers, send me mail here: bob_c@example.org Finally, you can multiply the effects of this by sharing an inoculation group with your friends. If all of your friends have a public covert alias, then you will all be able to inoculate eachother should one of you receive a spam to the account. What a great way to train your filter! On top of this, should external inoculation become commonplace to the point where harvesters are picking up an equal amount of them as legitimate email addresses, spammers will start to realize that harvesters are just plain too dumb to tell the difference (the spammers themselves couldn't tell if mine was or not). This could, best case scenario, put an end to harvester bots, making them obsolete as counter-productive tools. 2.3 CLIENT/SERVER MODE DSPAM supports two different modes of operation. In standard operating mode, the DSPAM agent is called by the MTA (or proxy) and each agent process performs independently, establishing its own connection to a database and performs delivery on its own. The second operating mode, client/server mode, allows the DSPAM agent to act more like a thin client, connecting to the DSPAM server process which then does all the work of analyzing and delivering or quarantining the message. The advantages to using DSPAM in client/server mode are: - Maintaining a set of stateful database connections (within the server), which should enhance performance on some systems by eliminating the need to establish a new database connection for every message processed. - Providing a central point of processing. Having one server perform all processing and delivery, while having multiple thin clients on your mail servers may be more desirable than having multiple agents performing processing and delivery on all your servers. - The DSPAM server speaks LMTP, which some implementations may be able to take advantage of, eliminating the need for the DSPAM client all together. - Having a single multithreaded daemon should use less memory and other resources than having independently operating clients. If you've already got DSPAM set up, client/server mode won't require any changes to your mail server's configuration - it's completely transparent. The DSPAM agent can be compiled with client/server support by configuring with --enable-daemon. You will need to use a multithread-safe storage driver (presently mysql_drv, pgsql_drv and hash_drv are supported). Once you have compiled with daemon support, you'll need to modify your dspam.conf to provide the settings necessary for client/server mode: ServerHost 127.0.0.1 The host to listen on. The default is to comment this setting which will force DSPAM to listen on all available interfaces. ServerPort 24 The port to listen on. The default is 24, the LMTP port. ServerQueueSize 32 The maximum number of connections which may remain backlogged before they are accepted. ServerPass.Relay1 "secret" ServerPass.Relay2 "password" Each client server allowed to connect should have its own password. They can be defined here. The DSPAM server can listen on either a network socket or a local unix domain socket. If you're running the client and server on the same machine, a domain socket should be used as it eliminates additional overhead. To use a domain socket, you'll also need to add the following option: ServerDomainSocketPath "/tmp/dspam.sock" Once you've configured the server config, you'll want to set the client configuration on all client machines. If you are using network sockets, set the following to appropriate values: ClientHost 127.0.0.1 ClientPort 24 Or if using a domain socket: ClientHost /tmp/dspam.sock In both cases, you'll need to set the client's authentication ident: ClientIdent "secret@Relay1" Now you're ready to go. To start the DSPAM server, run: dspam --daemon & Or alternatively, if you have debugging enabled: dspam --debug --daemon & The DSPAM agent can then be called the same as if you were running in standard (non-client/server) mode and adding --client to the set of parameters. Running dspam without --client specified will cause DSPAM to revert to its normal non-daemon behavior and establish database connections on its own. The client settings will be loaded from dspam.conf, and the agent will act as a thin client instead. For example: dspam --client --user dick jane --deliver=innocent -d %u Alternatively, if you'd like to use a thinner client, dspamc is identical to the dspam binary in behavior, but has been stripped down to only include the lightweight client. dspamc --user dick jane --deliver=innocent -d %u The conversation that takes place between the client/server is LMTP-based, and will look like this: SERVER> 220 DSPAM DLMTP 3.10.0 Authentication Required CLIENT> LHLO Relay1 SERVER> 250-PIPELINING SERVER> 250-ENHANCEDSTATUSCODES SERVER> 250-DSPAMPROCESSMODE SERVER> 250 SIZE CLIENT> MAIL FROM: DSPAMPROCESSMODE="--deliver=innocent -d %u" SERVER> 250 2.1.0 OK CLIENT> RCPT TO: dick SERVER> 250 2.1.5 OK CLIENT> RCPT TO: jane SERVER> 250 2.1.5 OK CLIENT> DATA SERVER> 354 Enter mail, end with "." on a line by itself CLIENT> Subject: Cheap Viagra! CLIENT> CLIENT> Click Here: http://www.cheapviagra.example.org CLIENT> . SERVER> 250 2.0.0 Message accepted for delivery: INNOCENT SERVER> 250 2.0.0 Message accepted for delivery: SPAM Optionally, if you'd like the clients to perform delivery, you can use DSPAM's --stdout or --classify functionality to obtain a dump of the message or results, respectively. From there, it's up to you and your MTA to deliver the message. The DSPAM client will output the results to stdout in this case, just as it would in standard operating mode. Once the server is running, its configuration can be reloaded with a SIGHUP. When the daemon is reloaded, the following occurs: - The daemon stops listening for new requests - All threads are allowed to finish processing and exit - All connections to the database are closed - The dspam.conf configuration is reloaded - All connections to the database are re-opened - The daemon starts listening for new requests This allows database and listener configurations to also be reloaded from dspam.conf without the need to interrupt the process. NOTE: During the period of time the daemon is reloading, client connections will fail. Depending on how the MTA reacts, this may cause messages to fall back to queue or to bounce. 2.4 LMTP DSPAM supports LMTP both on the front-end and back-end (delivery). This section will briefly provide instructions for configuring either or both of these advanced options. LMTP (AND SMTP) DELIVERY DSPAM supports LMTP delivery for admins who would prefer to use this instead of local delivery. While LMTP delivery doesn't _require_ operating in daemon mode, it is necessary to compile DSPAM with --enable-daemon to take advantage of LMTP delivery. To configure LMTP delivery, perform the following steps: 1. Compile DSPAM with --enable-daemon to enable LMTP delivery code 2. Configure your DeliveryHost and DeliveryIdent in dspam.conf. Set DeliveryProto based on whether you would like to delivery via LMTP or SMTP. NOTE: If you would like to delivery to different hosts based on domain, specify DeliveryHost.example.org as the configuration directive. Use DeliveryPort.example.org to specify a port for the delivery. 3. Add the --lmtp-recipient flag to the arguments passed into DSPAM. This is used to specify the destination address for the message. For example, in postfix: --lmtp-recipient=${recipient} DSPAM will then connect to the specified host, and deliver using a standard LMTP looking like: LHLO [ident] MAIL FROM:<> SIZE=[message_length] RCPT TO: DATA [Message] . LMTP SERVER DSPAM supports a "daemon" mode where it will sit and listen for inbound connections. Depending on how the server is configured, DSPAM can speak either standard LMTP (for interaction with a mail server, such as postfix) or DLMTP (DSPAM LMTP) which is a proprietary implementation of LMTP between the DSPAM client and server. If you plan on calling DSPAM from the commandline via dspamc, but wish to have a stateful daemon perform processing, then you'll want to use the "dspam" server mode. If you want to call DSPAM by having your mail server connect to it via LMTP, then you'll need to specify the "standard" server mode. The ServerMode can be set in dspam.conf. Each mode has its own custom tweaks and configurations that will need to be set in dspam.conf. "dspam" mode settings. In "dspam" mode, you'll need to set up authentication for each dspam client relay. This involves configuring the relay ident and password. Examples are provided. "dspam" mode notes. In dspam mode, only the dspam client will be connecting to your LMTP server. This can be dspamc (a thin-client) or the dspam binary. In either case, you'll need to specify --client to tell DSPAM to act as a client. DLMTP allows the client to pass in any commandline arguments provided, so it should function identical to if you were running it as a dedicated (non-stateful) process. "standard" mode settings. In "standard" mode, you will need to configure the ServerParameters flag to reflect the commandline parameters you would normally want to pass to DSPAM. "standard" mode notes. One thing to watch out for is that the recipient you're sending via LMTP is unique to a specific user. This means that all of your aliases should be resolved before the MTA relays to DSPAM. Because DSPAM uses the addresses in the RCPT TO as usernames, _not_ resolving any aliases will result in multiple databases being created for one user. Since the signature will be different for each user, and since the message must be processed differently for each user, DSPAM demultiplexes a multi-recipient email. This means that while it can receive an email with multiple RCPT TO's specified, it will perform delivery individually. "auto" mode setting. If you would like to support both connecting MTAs and remote dspam client processes (such as for inoculations), you can set the server mode to auto, which will base its dialect on the ident supplied in the LHLO. If the LHLO ident matches an ident in dspam.conf's ServerPass section, the server will default to DLMTP. Otherwise, DSPAM will assume the client is a standard LMTP client and speak standard LMTP. LOCAL DELIVERY WITH LMTP FRONT-END In some circumstances, you may want to relay to DSPAM via LMTP, but have DSPAM deliver via LDA. In these cases, you may use the following conventions in your ServerParameters configuration: %r - The RCPT TO passed in via LMTP %s - The MAIL FROM passed in via LMTP In both cases, the content provided between < > is what is actually used. 2.5 DSPAM USER PREFERENCES Preferences are settings that can be configured globally in dspam.conf or for individual users via the dspam_admin command. trainingMode { TOE | TUM | TEFT | NOTRAIN } How DSPAM should train messages it analyzes. See section 1.5 --mode (default:teft, see dspam.conf) spamAction { quarantine | tag | deliver } What to do with spam. The tag and deliver options both deliver, but tag adds a special prefix to the subject, whereas deliver merely sets X-DSPAM-Result. (default:quarantine) spamSubject A customized subject to prefix when spamAction=tag. (default:[SPAM]) statisticalSedation { 0 - 10 } The level of dampening during training (0-10, 0 = no dampening, default:0) enableBNR { on | off } Enables or disables bayesian noise reduction (default:off) enableWhitelist { on | off } Enables or disables automatic whitelisting (default:on) signatureLocation { message | headers } Where to place the DSPAM signature. Placement affects forwarding approach. (default:message) tagSpam / tagNonspam { on | off } Adds a tagline to the end of a message based on its classification; useful for things such as "Scanned by your ISP example.org". If set to on, the file msgtag.spam and/or msgtag.nonspam will be looked for in "TxtDirectory" (see dspam.conf) and appended to appropriate messages. NOTE: Signed messages will not be tagged in this fashion showFactors { on | off } Whether to include an X-DSPAM-Factors header including decision-making factors (clues). NOTE: This can break RFC in some cases, and should only be used for debugging. (default:off) optIn / optOut { on | off } Depending on whether the system is opt-in or opt-out, sets the user's membership. If user is opted out (or not opted in), mail will be delivered by DSPAM without being processed. whitelistThreshold { Integer } Overrides the default number of times a From: header has been seen before it is automatically whitelisted. (default:10) makeCorpus { on | off } When activated, a maildir-style corpus is maintained in the user's data directory (DSPAM_HOME/DATA/USERNAME), suitable for future retraining or other analysis. (default:off) storeFragments { on | off } When activated, the first 1k of each message are temporarily stored on the server for reference via the webui's history function. (default:off) localStore { on | off } Overrides the directory name used for the user's dspam data directory. This is useful when using recipient addresses as usernames, as it will allow all addresses belonging to a specific user to be written to a single webui directory. (default:username) processorBias { on | off } Overrides the "bias" setting in dspam.conf, which biases mail as innocent. (default:on, see dspam.conf) fallbackDomain { on | off } Allows a dspam user ("@example.org") to be marked as a fallback user for the entire domain, so if the destination dspam user does not exist in the database, the fallback user's database will be used. The dspam.conf "FallbackDomains" setting must also be "on". (default:off) NOTE: You will need to set "FallbackDomains on" in dspam.conf to use this. trainPristine { on | off } Override's the default signature mode and treats messages as if they were in pristine format when retraining. This requires all retraining to use the original message that was processed as no dspam signature is stored for pristine training. (default:off) optOutClamAV { on | off } Opts out of ClamAV virus scanning (if ClamAV is directly integrated with dspam via dspam.conf). (default:off) ignoreRBLLookups { on | off } Overrides the "Lookup" setting in dspam.conf, which lookups senders IP addresses in a Realtime Blackhole List (RBL). (default:off) RBLInoculate { on | off } Overrides the "RBLInoculate" setting in dspam.conf, which inoculates mail as spam if lookup result is positive. (default: depending on dspam.conf) NOTE: This user preference has higher weight then the one set in dspam.conf. If you don't set this user preference to on/off then whatever is set in dspam.conf will be used for every user. 2.6 FALLBACK DOMAINS Fallback domains allow you to default some or all users for a particular domain to a single domain user; this allows you to set preferences (including opting out of filtering entirely) for users based on domain name. Any user who does not exist as a known user to DSPAM will be defaulted to the domain it belongs to if it is designated as a fallback domain. This means that you can create bob@example.org and alice@example.org with their own databases and preferences, but also default all other users to @example.org. Alternatively, you could create just the domain without any other users and default all users to @example.org To use fallback domains, you'll first need to activate this feature in dspam.conf: FallbackDomains on Next, you'll need to create a dspam user for each domain you wish to use as a fallback domain. For example, @example.org. Depending on your implementation, this may be a simple insert into dspam_virtual_uids or may be created automatically when setting a user's preferences. Finally, designate that special user as a fallback domain by setting a preference: dspam_admin ch pref @example.org fallbackDomain on Any mail coming in for that domain that does _not_ match a known user in dspam will now fall back to this user; you can then set specific preferences or even opt out the entire user. Alternatively, you can create a domain-based database for filtering mail specific to that domain, just as you would a normal user. 2.7 EXTERNAL USER LOOKUP External User Lookup has two major applications. It allows DSPAM to validate the supplied username in setups where users are Opt'ed-In by default, and there is no prior recipient checking from the MTA. In those cases, it can be configured not to automatically create the user entries in the DSPAM system and thus spare you from polute the DSPAM database with inexistent users. The other application is when you need username rewritting/mapping. That will happen when you need to map several email addresses (aliases) into a single user account or when you wish to integrate DSPAM into systems where the users email addresses or usernames can change. This will allow you to define alternate static identifiers while still keeping the users DSPAM dictionaries, across username/email address change, without dictionary maintenance. Currently, there are three different modes of operation and two backend lookup drivers. The mode can be set using the ExtLookupMode directive and the available possibilities are: verify - It will verify that the supplied username exists in lookup backend. In the event that it cannot be verified, DSPAM will not create the user entry in it's backend facilities. map - It will NOT verify that the supplied username exists in the lookup backend. It will, though, try to use the lookup backend to map (rewrite) the username. If There is a map/rewrite available, it will use the retrieved username, instead of the supplied one. On the other hand, if there is no map/rewrite available, DSPAM will use the supplied username and create the respective entries in it's backend. strict - It will enforce both verify AND map modes. Meaning that it will rewrite the username, if a rewrite is available, and will also only create that user entry in it's backend system if there was a successful map/rewrite. The backend lookup drivers available are only two at the moment, LDAP and Program. The LDAP drivers allows DSPAM to query an LDAP server for a custom attribute, defined by the ExtLookupLDAPAttribute directive. The query can be fine grained using the ExtLookupQuery directive to provide a standard LDAP filter, where %u will be replaced by the username provided to DSPAM. Literal percentage can used if escaped with another % sign, i.e., %% will match % in the query filter. The Program driver exists because this seemed a neat feature and not every one uses LDAP. In this case, the ExtLookupServer directive will be used to define the custom program/script call, with the respective arguments. Also here %u can be used to define the provided username and literal % can be achieved by escaping the percentage sign with another '%'. Using the program driver, DSPAM will use whatever was the first line output of the program/script execution. 3.0 BUGS, FEATURE REQUESTS Please use our Bug Tracker on the sourceforge project page at http://sourceforge.net/projects/dspam for the current known bugs list and proper reporting procedure. In the same place you can ask for new feature via the Feature Request Tracker. Please note that everything under contrib/ is not officially supported by the DSPAM Project but by the respective authors; however, in order to help the authors, facilitate integration with DSPAM and release procedures, we provide a bug tracker for each script/plugin at the same URL. 3.1 PORTS / PACKAGES The DSPAM Project does not provide binary packages of DSPAM. Each OS/distribution has its own contributors (they know perfectly their distribution's policy, their special guidelines, testing procedures, etc.). Take a look at the DSPAM Wiki for packages/ports for various distributions located at http://sourceforge.net/apps/mediawiki/dspam/index.php?title=Main_Page or read http://dspam.sourceforge.net If you wish to port DSPAM to an other OS/distro/platform and need help or have patches you would like to be merged in the repo please email dspam-devel@lists.sourceforge.net mailing list. Note: In order to keep DSPAM unencumbered by intellectual property abuses, all external contributors to the project are asked to release any rights to the submission. This keeps the DSPAM project a healthy, unencumbered GPL project. Please accompany your patch, code, or other submission with the following statement. By submitting a patch to the project, you agree to be bound by the terms of this statement whether it is specifically included in the submission or not, however we still require that it be attached to the submission: The author or authors of this submission hereby release any and all copyright interest in this code, documentation, or other materials included to the DSPAM project and its primary governors. We intend this relinquishment of copyright interest in perpetuity of all present and future rights to said submission under copyright law. 3.2 GIT ACCESS The DSPAM source tree can be downloaded via read-only git access using the following commands: git clone git://dspam.git.sourceforge.net/gitroot/dspam/dspam