+2006-04-05 10:59 Dan Nelson <dnelson@allantgroup.com>
+
+ * NEWS, configure.in:
+
+ 0.3.1
+
+2006-03-23 15:51 Dan Nelson <dnelson@allantgroup.com>
+
+ * NEWS:
+
+ news update (sa 3.1.1, better Received header)
+
+2006-03-23 15:41 Dan Nelson <dnelson@allantgroup.com>
+
+ * spamass-milter.cpp:
+
+ Spamassassin 3.1.1 now emits headers with CRLF if the incoming message
+ has CRLFs. Make sure that we strip the CR from wrapped headers when we
+ parse the returned message.
+
+2006-01-23 14:47 Dan Nelson <dnelson@allantgroup.com>
+
+ * Makefile.am:
+
+ .deps isn't created since we use no-dependencies
+
+2005-10-06 10:12 Dan Nelson <dnelson@allantgroup.com>
+
+ * configure.in:
+
+ Add /usr/sbin to the list of directories to look for sendmail in, just
+ in case the user doesn't have it in their $PATH. /usr/lib was the
+ historical location for sendmail, but most systems put the real binary
+ in /usr/sbin now.
+
+2005-08-15 10:10 Dan Nelson <dnelson@allantgroup.com>
+
+ * README:
+
+ Remove references to INSTALL, also mention autogen.sh.
+
+ http://savannah.nongnu.org/bugs/?func=detailitem&item_id=14090
+
+2005-06-02 13:30 Dan Nelson <dnelson@allantgroup.com>
+
+ * spamass-milter.cpp:
+
+ It turns out that mlfi_close /can/ be called without mlfi_connect, and
+ there is no guarantee that the context has been set. If it's NULL,
+ just return.
+
+2005-04-06 21:04 Dan Nelson <dnelson@allantgroup.com>
+
+ * README, spamass-milter.cpp, spamass-milter.h:
+
+
+ - Make our fake sendmail Received: header even better.
+
+ - Fix a silly bug in cmp_nocase_partial that made it return true if
+ either string was a prefix of the other (it should return true only
+ if s is a prefix of s2).
+
+ Thanks to Yoshitaka Tokugawa.
+
+2005-02-22 10:10 Dan Nelson <dnelson@allantgroup.com>
+
+ * spamass-milter.cpp:
+
+ Change 172.16 to 172.16.0.0 in the usage text. Partial IP addresses do
+ not parse correctly.
+
2005-02-05 01:34 Dan Nelson <dnelson@allantgroup.com>
* Makefile.am:
2004-09-06 20:19 Dan Nelson <dnelson@allantgroup.com>
* ac_cxx_exceptions.m4, ac_cxx_namespaces.m4,
- ac_cxx_verbose_terminate_handler.m4:
+ ac_cxx_verbose_terminate_handler.m4:
Update ac-archive scripts and add upstream version ids
2004-03-18 12:37 Dan Nelson <dnelson@allantgroup.com>
* configure.in, spamass-milter.1.in, spamass-milter.cpp,
- spamass-milter.h:
+ spamass-milter.h:
Document -p and -x
2003-10-24 01:55 Dan Nelson <dnelson@allantgroup.com>
* ac_cxx_exceptions.m4, ac_cxx_namespaces.m4,
- ac_cxx_verbose_terminate_handler.m4, configure.in,
- spamass-milter.cpp:
+ ac_cxx_verbose_terminate_handler.m4, configure.in,
+ spamass-milter.cpp:
Use gcc's verbose exception handler is possible. If this function is
unavailable, C++ will simply abort on any exception. Ugh.
2003-08-11 16:36 Dan Nelson <dnelson@allantgroup.com>
* configure.in, spamass-milter.1.in, spamass-milter.cpp,
- spamass-milter.h:
+ spamass-milter.h:
Preliminary work to support alias/virtusertable expansion.
sendmail -bv is called and its output is parsed, but all we do is log it
2003-06-03 01:24 Dan Nelson <dnelson@allantgroup.com>
* AUTHORS, spamass-milter.1.in, spamass-milter.cpp,
- spamass-milter.h:
+ spamass-milter.h:
Add -i to list netblocks to ignore (argument is a comma-delimited list
of ip addresses, ip/netmask, or ip/bits).
2003-03-06 15:37 Dan Nelson <dnelson@allantgroup.com>
* Makefile.am, configure.in, poll.c, spamass-milter.cpp,
- subst_poll.h:
+ subst_poll.h:
Provide a substitute poll() function for systems that are missing it.
2002-07-24 11:19 Dan Nelson <dnelson@allantgroup.com>
* Makefile.am, autogen.sh, configure.in, rhautogen.sh,
- contrib/spamass-milter, contrib/spamass-milter-redhat.rc,
- contrib/spamass-milter.spec.in:
+ contrib/spamass-milter, contrib/spamass-milter-redhat.rc,
+ contrib/spamass-milter.spec.in:
- Add RedHat .spec and .rc files
2002-07-22 21:02 Dan Nelson <dnelson@allantgroup.com>
* Makefile.am, acconfig.h, acinclude.m4, autogen.sh, configure.in,
- spamass-milter.cpp, spamass-milter.h:
+ spamass-milter.cpp, spamass-milter.h:
- Update to autoconf 2.53
2002-03-06 07:07 Georg C. F. Greve <greve@gnu.org>
* AUTHORS, ChangeLog, NEWS, configure.in, spamass-milter.cpp,
- spamass-milter.h, contrib/spamass-milter:
+ spamass-milter.h, contrib/spamass-milter:
Applied some patches. Rights assigned to FSF Europe. Appointed Michael as maintainer.
-# generated automatically by aclocal 1.9.4 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005 Free Software Foundation, Inc.
# This file 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.
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-# -*- Autoconf -*-
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-# Generated from amversion.in; do not edit by hand.
-
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.4])])
-
-# AM_AUX_DIR_EXPAND
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+ [AM_AUTOMAKE_VERSION([1.9.6])])
-# 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.
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# 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., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
am_aux_dir=`cd $ac_aux_dir && pwd`
])
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
-
-# 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.
+# AM_CONDITIONAL -*- Autoconf -*-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
-# serial 6
+# serial 7
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
Usually this means the macro was only invoked conditionally.]])
fi])])
-# serial 7 -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
+#
+# This file 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 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
+# serial 8
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
AC_SUBST([AMDEPBACKSLASH])
])
-# Generate code to set up dependency tracking. -*- Autoconf -*-
+# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
-# Free Software Foundation, Inc.
-
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
-#serial 2
+#serial 3
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
-# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
-
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
-# serial 7
+# serial 8
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-# Do all the work for Automake. -*- Autoconf -*-
+# Do all the work for Automake. -*- Autoconf -*-
-# This macro actually does too much some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
+#
+# This file 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 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# serial 12
-# serial 11
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
-# -*- Autoconf -*-
-# Copyright (C) 2003 Free Software Foundation, Inc.
-
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
-# serial 1
+# serial 2
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Check to see how 'make' treats includes. -*- Autoconf -*-
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
-# serial 2
+# serial 3
# AM_MAKE_INCLUDE()
# -----------------
rm -f confinc confmf
])
-# -*- Autoconf -*-
-
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
-
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
-# serial 3
+# serial 4
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
fi
])
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
# AM_PROG_MKDIR_P
# ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
+#
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
# created by `make install' are always world readable, even if the
# installer happens to have an overly restrictive umask (e.g. 077).
fi
AC_SUBST([mkdir_p])])
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Helper functions for option handling. -*- Autoconf -*-
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
-# serial 2
+# serial 3
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-#
-# Check to make sure that the build environment is sane.
-#
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
-# serial 3
+# serial 4
# AM_SANITY_CHECK
# ---------------
fi
AC_MSG_RESULT(yes)])
-# AM_PROG_INSTALL_STRIP
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+# AM_PROG_INSTALL_STRIP
+# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004 Free Software Foundation, Inc.
-
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 1
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+# serial 2
# _AM_PROG_TAR(FORMAT)
# --------------------
//
//
-// $Id: spamass-milter.cpp,v 1.86 2005/02/05 07:03:22 dnelson Exp $
+// $Id: spamass-milter.cpp,v 1.90 2006/03/23 21:41:36 dnelson Exp $
//
// SpamAss-Milter
// - a rather trivial SpamAssassin Sendmail Milter plugin
// }}}
-static const char Id[] = "$Id: spamass-milter.cpp,v 1.86 2005/02/05 07:03:22 dnelson Exp $";
+static const char Id[] = "$Id: spamass-milter.cpp,v 1.90 2006/03/23 21:41:36 dnelson Exp $";
struct smfiDesc smfilter =
{
bool flag_full_email = false; /* pass full email address to spamc */
bool flag_expand = false; /* alias/virtusertable expansion */
bool ignore_authenticated_senders = false;
+bool warnedmacro = false; /* have we logged that we couldn't fetch a macro? */
#if defined(__FreeBSD__) /* popen bug - see PR bin/50770 */
static pthread_mutex_t popen_mutex = PTHREAD_MUTEX_INITIALIZER;
" username. Uses 'defaultdomain' if there was none" << endl;
cout << " -f: fork into background" << endl;
cout << " -i: skip (ignore) checks from these IPs or netblocks" << endl;
- cout << " example: -i 192.168.12.5,10.0.0.0/8,172.16/255.255.0.0" << endl;
+ cout << " example: -i 192.168.12.5,10.0.0.0/8,172.16.0.0/255.255.0.0" << endl;
cout << " -I: skip (ignore) checks if sender is authenticated" << endl;
cout << " -m: don't modify body, Content-type: or Subject:" << endl;
cout << " -M: don't modify the message at all" << endl;
if (header[field_end-1] == '\r')
field_end--;
- // Maybe remove the whitespace picked up when a header wraps - this
- // might actually be a requirement
- return header.substr( field_start, field_end - field_start );
+ string data = header.substr( field_start, field_end - field_start );
+
+ /* Replace all CRLF pairs with LF */
+ idx = 0;
+ while ( (idx = data.find("\r\n", idx)) != string::npos )
+ {
+ data.replace(idx,2,"\n");
+ }
+
+ return data;
}
mlfi_connect(SMFICTX * ctx, char *hostname, _SOCK_ADDR * hostaddr)
{
struct context *sctx;
+ int rv;
debug(D_FUNC, "mlfi_connect: enter");
sctx->helo = NULL;
/* store a pointer to it with setpriv */
- smfi_setpriv(ctx, sctx);
+ rv = smfi_setpriv(ctx, sctx);
+ if (rv != MI_SUCCESS)
+ {
+ debug(D_ALWAYS, "smfi_setpriv failed!");
+ return SMFIS_TEMPFAIL;
+ }
+ /* debug(D_ALWAYS, "ZZZ set private context to %p", sctx); */
if (ip_in_networklist(sctx->connect_ip, &ignorenets))
{
struct context *sctx = (struct context *)smfi_getpriv(ctx);
char *queueid;
+ if (sctx == NULL)
+ {
+ debug(D_ALWAYS, "smfi_getpriv failed!");
+ return SMFIS_TEMPFAIL;
+ }
+ /* debug(D_ALWAYS, "ZZZ got private context %p", sctx); */
+
if (ignore_authenticated_senders)
{
char *auth_authen;
queueid=smfi_getsymval(ctx,"i");
if (!queueid)
- queueid="unk";
+ {
+ queueid="unknown";
+ warnmacro("i", "ENVFROM");
+ }
assassin->queueid = queueid;
debug(D_MISC, "queueid=%s", queueid);
(envelope-from $g)$.
*/
- const char *macro_b, *macro_s, *macro_j, *macro__;
+ const char *macro_b, *macro_i, *macro_j, *macro_r,
+ *macro_s, *macro_v, *macro_Z, *macro__;
+ char date[32];
- /* Failure to fetch {b} is not fatal. Without this date SA can't do
- future/past validation on the Date: header, but sendmail doesn't
- default to allow milters to see it.
- */
+ /* RFC 822 date. */
macro_b = smfi_getsymval(ctx, "b");
+ if (!macro_b)
+ {
+ time_t tval;
+ time(&tval);
+ strftime(date, sizeof(date), "%a, %d %b %Y %H:%M:%S %z", localtime(&tval));
+ macro_b = date;
+ warnmacro("b", "ENVRCPT");
+ }
+
+ /* queue ID */
+ macro_i = smfi_getsymval(ctx, "i");
+ if (!macro_i)
+ {
+ macro_i = "unknown";
+ warnmacro("i", "ENVRCPT");
+ }
+
+ /* FQDN of this site */
+ macro_j = smfi_getsymval(ctx, "j");
+ if (!macro_j)
+ {
+ macro_j = "localhost";
+ warnmacro("j", "ENVRCPT");
+ }
+
+ /* Protocol used to receive the message */
+ macro_r = smfi_getsymval(ctx, "r");
+ if (!macro_r)
+ {
+ macro_r = "SMTP";
+ warnmacro("r", "ENVRCPT");
+ }
/* Sendmail currently cannot pass us the {s} macro, but
I do not know why. Leave this in for the day sendmail is
if (!macro_s)
macro_s = "nohelo";
- /* FQDN of this site */
- macro_j = smfi_getsymval(ctx, "j");
- if (!macro_j)
- macro_j = "localhost";
+ /* Sendmail binary version */
+ macro_v = smfi_getsymval(ctx, "v");
+ if (!macro_v)
+ {
+ macro_v = "8.13.0";
+ warnmacro("v", "ENVRCPT");
+ }
- /* Sending site's address */
+ /* Sendmail .cf version */
+ macro_Z = smfi_getsymval(ctx, "Z");
+ if (!macro_Z)
+ {
+ macro_Z = "8.13.0";
+ warnmacro("Z", "ENVRCPT");
+ }
+
+ /* Validated sending site's address */
macro__ = smfi_getsymval(ctx, "_");
if (!macro__)
+ {
macro__ = "unknown";
+ warnmacro("_", "ENVRCPT");
+ }
assassin->output((string)"X-Envelope-From: "+assassin->from()+"\r\n");
assassin->output((string)"X-Envelope-To: "+envrcpt[0]+"\r\n");
- if (!macro_b)
- assassin->output((string)"Received: from "+macro_s+" ("+macro__+") by "+macro_j+";\r\n");
- else
- assassin->output((string)"Received: from "+macro_s+" ("+macro__+") by "+macro_j+"; "+macro_b+"\r\n");
+ assassin->output((string)
+ "Received: from "+macro_s+" ("+macro__+")\r\n\t"+
+ "by "+macro_j+"("+macro_v+"/"+macro_Z+") with "+macro_r+" id "+macro_i+"\r\n\t"+
+ macro_b+"\r\n\t"+
+ "(envelope-from "+assassin->from()+"\r\n");
} else
assassin->output((string)"X-Envelope-To: "+envrcpt[0]+"\r\n");
sctx = (struct context*)smfi_getpriv(ctx);
if (sctx == NULL)
- {
- /* the context should have been set in mlfi_connect */
- debug(D_ALWAYS, "NULL context in mlfi_close! Should not happen!");
return SMFIS_ACCEPT;
- }
+
if (sctx->helo)
free(sctx->helo);
free(sctx);
string::const_iterator p=s.begin();
string::const_iterator p2=s2.begin();
- while ( p != s.end() && p2 != s2.end() ) {
+ while ( p != s.end() && p2 <= s2.end() ) {
if (toupper(*p) != toupper(*p2))
{
debug(D_STR, "c_nc_p: <%s><%s> : miss", s.c_str(), s2.c_str());
return str;
}
+/* Log a message about missing milter macros, but only the first time */
+void warnmacro(char *macro, char *scope)
+{
+ if (warnedmacro)
+ return;
+ debug(D_ALWAYS, "Could not retrieve sendmail macro \"%s\"!. Please add it to confMILTER_MACROS_%s for better spamassassin results",
+ macro, scope);
+ warnedmacro = true;
+}
+
// }}}
// vim6:ai:noexpandtab