mlmmj-1.2.18.0/000755 000765 000120 00000000000 11761151616 012753 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/aclocal.m4000644 000765 000120 00000105306 11761151555 014622 0ustar00benadmin000000 000000 # generated automatically by aclocal 1.12 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 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. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2012 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 8 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.12' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.12], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.12])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2012 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 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2012 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 10 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2012 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 16 # 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, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [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". rm -rf conftest.dir 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_$1_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 m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [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 10 /bin/sh. echo '/* dummy */' > 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 ;; msvc7 | msvc7msys | 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_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2012 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 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # 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")` 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"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996-2012 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 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 -*- # Copyright (C) 1996-2012 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 18 # 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]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 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 AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _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"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2012 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 8 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 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 AC_SUBST([install_sh])]) # Copyright (C) 2003-2012 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 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [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 AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2012 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 5 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [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. AC_MSG_CHECKING([for style of include used by $am_make]) 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 AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2012 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 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl 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= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Copyright (C) 2003-2012 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_MKDIR_P # --------------- # Check for 'mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2012 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 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2012 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 9 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # 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]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2001-2012 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_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 # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # 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. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2012 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 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2012 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 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of '-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR mlmmj-1.2.18.0/AUTHORS000644 000765 000120 00000000170 11750345463 014024 0ustar00benadmin000000 000000 Mads Martin Joergensen Morten K. Poulsen Ben Schmidt mlmmj-1.2.18.0/ChangeLog000644 000765 000120 00000066357 11761151152 014541 0ustar00benadmin000000 000000 1.2.18.0 o New list texts (Ben Schmidt, Xuacu Saturio, Nino Novak, Sophie Gautier, Epaminondas Diamantopoulos, Valter Mura, Sérgio Marques, Milos Sramek, Dean Lee) o Add %nowrap% to facilitate more complex formatting o Add subscription ability to php-admin o Add ability to except characters from width reckoning (and be zero-width) to facilitate wrapping even more languages well o Add different width-reckoning modes to facilitate wrapping many languages o Add different wrapping modes to facilitate wrapping many languages o Fix backslash escaping mechanism so double backslash can't effectively recurse and form part of another escape sequence, other non-unicode escapes aren't ignored, and first lines of included files don't 'escape' escaping. o Add ability to subscribe to both (normal and digest). o Fix access logic so subonlypost doesn't override a send access rule. o Make +unsubscribe remove the requester from all versions of the list. o Make mlmmj-unsub default to removing the requester from all versions of the list. o Make mlmmj-sub and +subscribe[-digest|-nomail] switch existing subscriptions. o Add a switch to bypass notifying the owner on subscribe/unsubscribe. o Introduce \ to indicate non-breakable space, \= to mark other locations where breaks should not occur, and \/ to mark locations where breaks can occur o Add rejection of posts and obstruction of subscriptions. o Avoid bogus error messages when logging that the list address has been found in To: or CC: headers. o Escape dashes in man pages. o Remove 'bashisms' from mlmmj-make-ml script (patch from Dan forwarded by Thomas Goirand). o Automatically skip blank lines followed by unsatisfied conditionals with no else part in list texts o Automatically skip lines with only whitespace and directives in list texts o Add support for conditionals in list texts o Add %wrap% and %wrap W% formatting directives o Add %digestthreads%, %gatekeepers%, %listsubs%, %digestsubs%, %nomailsubs%, %moderators% and %bouncenumbers% o Deprecate various list text substitutions such as $newsub$, $oldsub$, $moderateaddr$ o Add $permitaddr$ and $releaseaddr$ substitutions o Make $subject$, $posteraddr$ and $subaddr$ more widely available o Fix potential crash when mail to the owner arrives with no From: header o Add %originalmail% and %originalmail N% directives o Allow more characters in control and text filenames for substitutions o Add %%, %^%, %comment%, %control C% and %text T% formatting directives o Improve algorithm for list text substitutions o Add $text T$ substitution o Add $$ substitution o Allow list texts to include real UTF-8 characters, as documented o Fix bug where the normal listtext would be sent when unsubscribing from the nomail version of the list o New listtext naming scheme o Avoid trailing whitespace in MAIL FROM line (Lukas Fleischer) o Better end-of-line handling and error reporting in php-admin (Franky Van Liedekerke) o Avoid losing mail when connecting to relayhost fails o Improved and more consistent closing of SMTP sessions in error cases o Check the relayhost gives a reply before reading it to avoid a crash o Avoid checking addresses multiple times for notmetoo and make it work even when delivering messages individually o Fixed small memory leaks when SMTP errors occur o Improved error logging when requeuing o Fix php-admin to work when topdir contains a symlink (e.g. on Mac) o Better techniques for locating support files in php-admin -- existing installations will need to have their conf/config.php altered to set the variable $confdir o Add $control C$ substitution o Fix theoretically possible memory corruption by chomp() o Remove .sh from mlmmj-make-ml.sh; symlink original name o Correct spelling of 'receive' and 'voodoo' throughout the code and documentation, making mlmmj-recieve a symlink to mlmmj-receive (Chris Webb) o Richer MIME list texts with inline messages o Add $random0$ through $random5$ substitutions o Add a $subject$ substitution for list texts o Allow arbitrary headers in list texts o Ensure digest listtext is always closed o Fix Content-Transfer-Encoding: header for digests and list texts o Fixed a bug that could cause a crash if $posteraddr$ appeared in the maxmailsize listtext o Documented listtexts o Makes the random strings produced always the same length rather than smaller random numbers producing shorter strings which could be problematic o Make random number generation more efficient by only seeding the generator once o Added feature to notify users when their posts are moderated o Fixed documentation regarding silent subscription, and added ability to silently subscribe o Added notmetoo feature where posts are not mirrored to their senders o Check return status in mlmmj-perl-admin when adding subscribers (Florian Streibelt, Bitmand) o Better validation of input in php-admin (Thomas Goirand) o Fixed security bug in mlmmj-php-admin (Florian Streibelt, Morten Shearman Kirkegaard) o Added README.postfix to distribution tarball o Added "send" keyword to control/access handling (Ben Schmidt) o Added contrib/amime-receive (Gerd v. Egidy) o Fixed memory leak in substitute_one() (Ben Schmidt) o Updated TUNABLES file (Ben Schmidt) 1.2.17 o Added ifmodsendonlymodmoderate tunable o Replaced class.FastTemplate.php with class.rFastTemplate.php in contrib/web/php-admin (Christoph Thiel) 1.2.17-RC1 o Added information about digest and nomail to listhelp (Robin H. Johnson) o Fixed bug in mlmmj-maintd which caused loss of archive files in some requeue cases (Robin H. Johnson) o Added README.postfix (Jeremy Hinegardner, Andreas Schneider) o Added support for digest and nomail to +list (Christoph Wilke) o Caseinsensitive string compare for owner addr when +list is invoked. Spotted by Pavel Kolar. o Added contrib/web/php-moderation (Thomas Goirand) 1.2.16 o Fixed injection in contrib/web/perl-user (Gerd von Egidy) 1.2.16-RC1 o Updated Dutch listtexts (Franky Van Liedekerke) o Updated Italian listtexts (Fabio Busatto) o Added Postfix pipe backend support (Niki Guldbrand) o PHP admin interface bugfix (Niki Guldbrand) o Added support for static bounce addresses (Thomas Jarosch) o Added a sanity check in mlmmj-receive-strip (Chris Webb) o Added miscellaneous sanity checks (Thomas Jarosch) o Disabled digest mails when 'noarchive' is set (Thomas Jarosch) o Added Russian listtexts (Nikolay Derkach) o Fixed mmap()ing of zero-sized files (Robin H. Johnson) o Fixed mlmmj-recieve [sic] for architectures where sizeof(int) and sizeof(char *) differ o Added support for the 'originalmail' keyword (Sascha Sommer) o Merged various changes to the web interface from Franky Van Liedekerke 1.2.15-RC1 o Added --enable-recieve-strip configure option (Ansgar Burchardt) o Added unicode support to listtexts o Fixed build outside the source directory (Ansgar Burchardt) o Moved English listtexts and install all languages (Ansgar Burchardt) o Fixed missing exit()s in case of failed execl() calls (Ansgar Burchardt) o Changed Message-ID headers to include FQDN (Ansgar Burchardt) o Added support for 'discard' keyword in access rules (Sascha Sommer) 1.2.14 o Updated Danish listtexts (Jesper Lund) 1.2.14-RC1 o Fixed a small memory leak in log_oper() log rotation o Fixed address parsing for cases with quotes and multiple addresses o Added contrib/recievestrip/ MIME processor (Sascha Sommer) o Fixed digest multipart boundary (Thanks to Ulrich Mueller) o Added support for mail size limit (Christoph Wilke) o Log the result of access rules in the operation log (Henne Vogelsang) o Ignore empty lines in control files 1.2.13 o Added Dutch listtexts (Raymond den Ouden) 1.2.13-RC1 o Added 'nonomailsub' tunable which will disable nomail subscriptions to a list (Henne Vogelsang) o Added 'nodigestsub' tunable which will disable subscription to the digest version of a list (Henne Vogelsang) o Added list FAQ feature (Henne Vogelsang) o Added support for default list text directory (Henne Vogelsang) o Fixed a Bourne Shell issue in mlmmj-make-ml.sh (Magnus Naeslund) o Fixed hostnamestr() for hosts that can't find themselves using gethostbyname() (Benoit Dolez) o Add 'modnonsubposts' tunable that when set will moderate all posts from non subscribers o Fixed requeue for lists with noarchive enabled 1.2.12 o Fixed memory corruption in cleanquotedp() o Fixed bug in gethdrline() introduced in 1.2.12-RC3 1.2.12-RC4 o Fixed memory leak in checkwait_smtpreply() o Changed mlmmj-process to look at environment variable DEFAULT instead of EXT for qmail (Fabio Busatto) o Added Frensh listtext unsub-confirm-digest (Christophe Gallienne) 1.2.12-RC3 o Fixed EOF handling in checkwait_smtpreply() o Fixed header unfolding in gethdrline() 1.2.12-RC2 o Changed German listtexts (Stefan Reinauer, Christian Lackas) o Changed English listtexts (Stefan Reinauer) o Changed chomp() to also remove CR from CRLF sequences 1.2.12-RC1 o Update web interface with new tunables o Add support for qmail (envelope from address in environment variable) o Add digest text part o Add subscriber moderation o Fix default subject in administrative mails o Add French listtexts (Christophe Gallienne) o Add search and pagination functionality to the perl-admin web interface o Only add To: header when sending out actual list mail o Close stdin, stdout and stderr in the child of mlmmj-receive after forking. This is neccesary on FreeBSD. o No need to check for subscribers in 0-sized files o Make sure chomp works with empty strings (Frank Denis) 1.2.11 o Previous fix to find_email_adr() was incomplete, so in some cases mails would get rejected due to the To: or Cc: rule. Thanks again lcars for finding this o Sanity check to make sure there's a '@' in listaddress 1.2.10 o Fix nasty bug in the new 1.2.9 find_email_adr() making comma in quoted text in From: being discarded as invalid o Simply make all addresses lowercase before doing anything else wrt. sub/unsub and bounce o Add czech listtexts (Lukas Hluze) o Make non list emails (subconf, moderation etc.) also honor relayhost and smtpport o Add tunable to be able to close for subscription only (closedlistsub) 1.2.9 o Make find_email_adr() more robust (BSD, Neale Pickett) o Make the email address check case-insensitive. (Neale Pickett) o Add spanish listtext translations (Enrique Matías Sánchez) o Make recipient delimiter configurable per list. SIC! (Joel Aelwyn) o Added italian list texts translation. A thanks to Andrea Barisani, he has checked italian texts. (Filippo F. Fadda) o Use is_subbed_in instead of find_subscriber when subscribing people (Christian Laursen) o Make it possible to confirm subscription even though it's a closedlist. It makes sense to be able to confirm a request submitted by the sysadmin on the commandline o Add 'subonlyget' tunable which makes +get-N only work for subscribers 1.2.8 o Don't closedir() before done (GOOD spotting Christian Laursen) o Make sure the resend of queue files will not loop indefinately o Make Date: header RFC2822 compliant (Jakob Hirsch) o Add -s switch to mlmmj-{,un}sub to control whether or not to send a mail telling about already subscribed, or not subscribed when trying to subscribe or unsubscribe (Christian Laursen) 1.2.7 o Remove old superflous cruft in the smtpreply reader function, making mlmmj-send not segfault in rare cases when SIGTERM was sent o Another printf had snuck in there printing a free'ed variable 1.2.6.1 o Make sure the fromaddr is correct on sub-subscribed mails o Don't add an empty subject if there was one present 1.2.6 o If prefix but no Subject: header is present, add one (Jakob Hirsch) o Add notification mail when subbed people try to sub (Jakob Hirsch) o Install SIGTERM handler in mlmmj-send to allow it to shut down gracefully o Also remove mails when it's a bounce from a person not subbed o Introduce read() wrapper (Stevens) o Bouncing confirmation mails of sub or unsub should be cleaned from the queue as well o Normally mails which doesn't have exactly one From: emailaddress are discarded but certain ISPs have bounce mails with no From: header, forcing us to allow bounce mails with no From: to make sure they're caught o In case of a succesful DSN parse, we werent deleting the mail, and thus littering the queue o When sending moderated mails, rename them so that they wont be moderated again while sending 1.2.5 o Make listname+list send the list of regular subscribers to the owner who requested it. o Michael Fleming corrected some spelling / grammatical errors and made occasional minor clarifications in the english list texts. o Add README.sendmail from Andrea Barisani o Add README.exim4 from Jakob Hirsch o Skip addresses without a @ when sending o Set SO_KEEPALIVE for our connection socket 1.2.4 o Spend some time making valgrind completely happy o Unlink totally harmless .lock files in subscribers dir. o Make it possible to specify more than one listaddress in LISTDIR/control/listaddress. The first one is the "real" one. o Make the port to connect to controlable with LISTDIR/control/smtpport 1.2.3 o Only allow subscription of addresses with '@' in them o Fix return value from unsubscribe function o Add extra lock layer when accessing subscribers files o In case of listname+bounces-INDEX use the DSN (RFC1891) report to extract the bouncing address o Fix usage of a zero sized control/verp string o Make the Date: header RFC2822 conformant 1.2.2 o Make mlmmj-send work allthough no subscribers exist o Bring webinterfaces up to speed (Christian Laursen) o Fix moderate tag in access o Make mlmmj-make-ml.sh default the listtext dir to where they were installed in the system (Stephan Kulow) 1.2.1 o Introduce switches to turn off mails about posts being denied. 1.2.0 o Remove debug info printing 1.2.0-RC2 o Fix uninitialized strlist o Add logging regular operation to mlmmj.operation.log o Fix the sending loop by not sending the rest of the batch in every iteration 1.2.0-RC1 o Add VERP support. http://cr.yp.to/proto/verp.txt For Postfix: http://www.postfix.org/VERP_README.html, add "postfix" to LISTDIR/control/verp $smtpd_authorized_verp_clients should be the only one needed to touch 1.1.1-RC2 o It's ok to log to a symbolic link to somewhere else o Add Message-Id: and Date: headers to mail from mlmmj o Make log_oper() varargs capable (Rob Holland) 1.1.1-RC1 o Never discard anything from LISTDIR/queue/, let the admin be able to judge o Grab the lock when sending a mail to make sure noone does bad things to it underneath us o Danish listtexts, thanks Jesper Lund o Add control/noget to turn off listname+get-INDEX o Rearrange envelope from to be listname+bounces-index-user=domain.tld@ instead of listname+bounces-user=domain.tld-index@ to prepare for VERP support 1.1.0 o If mlmmj-recieve was invoked with a uid not root or not the owner of listdir inform about the uid actually invoked with o Add German listtexts (Hendrik Norman Vogelsang) o Add hooks for installing listtexts into $(pkgdatadir) (Drake Wyrm) o Add mlmmj-list manual page o Make mlmmj-list be capable of listing owners, moderators too o Perl interface updates 1.1.0-RC3 o Add 'moderate' tag for usage in control/access when one wants to have the moderators moderate posts hitting this regexp. See README.access o Add a To: header with the recipient's address when sending digests 1.1.0-RC2 o Strip envelope from before resending to +owner o Make statctrl bail if it's not possible to stat() o Add mlmmj-list binary to list the subcribers (-count) of a list 1.1.0-RC1 o Rewrite the way listtexts are managed, and in the process move the Subject: out into the listtext file making mlmmj completely translateable o Enhance perl webinterface - including group writable patch o Add option control/nosubconfirm which makes it possible to subscribe without confirmation by just sending the mail. USE WITH CARE! o Make files discarded by maintd end in .by-maintd to make them distinct o Fix off-by-one error in the function cleaning quoted printable chars o Close the correct fd's in mlmmj-process o Be consistent when using To: or Delivered-To: o mlmmj-unsub should also change user id to the listdir owner o Add support for not archiving the list by touching listdir/control/noarchive o Add 'nomail' version of lists. Subscribers to the nomail version are subscribed, but does not get any mail o Don't talk about changing uid in mlmmj-sub when we're not really doing it o Add sanity checks to disallow denial mails going to the list o Add digest functionality o Implement -d option for mlmmj-maintd to be able to supply it with a directory containing several listdirs, where mlmmj-maintd then will run maintenance o Chown option and a fix for mlmmj-make-ml.sh. Thanks Ingo Lameter 1.0.0 o Replace index() with strchr() o Add parenthesis around realloc call to make sure we alloc correctly o Make header matching case insensitive o Fix dumping of addresses to requeue o Make the time an address can bounce before unsubscribed configurable with listdir/control/bouncelife o Correct mlmmj-make-ml.sh cronentry line to include -F o Add manual pages. Thanks Soeren Boll for the initial ones o Make random numbers lowercase hex since gmail is lowercasing the address it replies to. o Also make sanity check in mlmmj-maintd to ensure it's invoke either as root or as listdir owner 1.0.0-RC4 o Fix brown paper bag bug not allowing enough space for the new better random strings introduced in RC3 so subscribe and unsubscribe works again. 1.0.0-RC3 o NULL and 0 are not the same on 64-bit platforms, so fix execlp(..., 0); to be execlp(..., NULL); o Add web-interface (PHP). Thank you Christoph Thiel o Have the random numbers be somewhat longer everywhere and not just somewhere o Move free() to where it belongs fixing problems with mlmmj-process some people have been seen o Fix printing of cron entry in mlmmj-make-ml.sh 1.0.0-RC2 o Do not allow mails from <> going to the list o Fix mailing to +owner again by adding missing 'break;' to switch in mlmmj-send o perl-admin updates from Christian Laursen o php-user updates from Christoph Thiel o Use Delivered-To: instead of To: when available 1.0.0-RC1 o Add web-interface. Thanks Christian Laursen for new perl-admin o Dump the customheaders before any Mime headers o Implement +get-N functionality, so it's possible to send a mail to foolist+get-101@domain.tld to retrieve mail 101 from that list. It's deliberately only possible to request one mail at a time. o Make sure that only either root or the listdir owner can execute the binaries when it has something to do with lists. o Don't leave bounces-help@ mails lying around in queue/ o Remove unanchored ".*" from beginning of regexp 0.8.3 o Have mlmmj-make-ml.sh remind people about using cron if they want o Replying to the confirmation address is enough to sub/unsub, no matter what address is used the second time o Fix possible DoS wrt. unsubscribing. Thank you Erik Toubro Nielsen o Add 'notifysub' functionality to have owner know when people sub/unsub. Thank you Kenneth Vestergaard Schmidt o Use Return-Path: for envelope From. Thanks Anders Johansson o Specification of which relayhost to use can now be done in control/relayhost o Add configure check to link against libnsl if needed. o Implement our own daemon() function since we don't have daemon() on Solaris 0.8.2 o Make sure we don't cut of the first char of an emailaddress o Fix header value copying (thanks Anders Johansson) o Don't segfault if there's no email address in the To: header o Clean up the subconf and unsubconf directories for stale requests as well 0.8.1.1 o Fix bug with prepstdreply not opening correct file. Thanks Christian Laursen for spotting. 0.8.1 o Go through all open() calls and retry in case we (allthough it's extremely unlikely) did get EEXIST o Add the option to add a To: header including the recipient emailaddress. NOTE that this does not remove any existing To: headers, they should be removed in control/delheaders o Optimize mlmmj-send by preparing the mail in memory to reduce the amount of write syscalls. control/memmailsize (size in bytes) controls how big it can be. Default is 16k before it's send line by line. o Make sure we check if the Subject: prefix might be present in the de-quoted printable version of the Subject. If so, don't add it. o Fix bug with queuefilename not being correctly initialized when generating standard mails o Let mlmmj-send be capable of handling relayhost local users bounce probes bouncing. o Don't litter the queuedirectory with files when rejecting mails (the maintenance daemon would take care of it, but lets be nice) 0.8.0 o Added regular expression based access control. o Added wrappers for malloc(), realloc(), free() and strdup(), so we can bail out if any of them fail. 0.7.3 o Implement control/delheaders in where one can specify all the headers to delete in incoming mail to the list. o Add +owner functionality (control/owner). Several addresses possible. o Relicense the whole thing to be MIT instead of GPL 0.7.2 o Make it possible to only let subscribers post o Implement feature to deny posts where the listaddress is not in To: or Cc:. Enabled pr. default, but can be disabled by touching control/tocc o Make mlmmj-sub change uid to the owner of listdir to avoid permission problems. Disable with -U to mlmmj-sub. o More memory debugging 0.7.1 o Fix bug with .reciptto and .mailfrom getting swapped o Plug a few small memory leaks in mlmmj-maintd o Fix bug with maintenance logfile not being opened at the right spot 0.7.0 o Add a macro to make sure mlmmj binaries are invoked with full path o Add the function to mlmmj-maintd to unsubscribe people who've been bouncing for BOUNCELIFE (default 432000 sec, 5 days) time. This completes the bouncehandling of mlmmj. SIC! o Add logging to mlmmj-maintd. mlmmj-maintd.lastrun.log in the listdir always has the log of the last run. This is work in progress. o Make mlmmj-bounce capable of sending probes o Include a function for easy generation of standard mail replies 0.6.0 o Add several unlinks. No need to litter queue/ with useless files o Don't use moderation/queue for outgoing, just use queue/ o Christoph Thiel pointed out that listaddress and moderators belong in control/ so move them there o Get rid of all FILE * instances and replace them with fd's o Also mmap the subscribers file when reading subcribers o Do an mmap of the mail to send once, instead of reading the mail for each mail to send o Rip out the ability to fork to make more than one connection to relayhost. It turned out to not make any performance gain (tested with lists with more than 120000 subscribers), and thus only complicated things. KISS won, so it's gone. o mlmmj-maint now handles resends and cleanup o Fixed interrupted fgets() in write_mailbody_from_file() o Fixed leak of subfile in mlmmj-send 0.5.2 o footer and customheaders are now accessed from listdir/control/ where they belong o Discard mails that doesn't have one and only one From: address. Discard here means moving them to queue/discard o Make sure we retrieve info from all headers matching the token we want o Fixed error handling in mlmmj-send if we can not open subscribers.d/ o Make mlmmj-send a lot more robust with SMTP and handle bounces from the relayhost. o Fix BUG in mlmmj-bounce still using listdir/subscribers o Handle subconf/unsubconf bounces o Begin work on mlmmj-maintd--the mlmmj maintenance daemon o Make help consistent and up to date with all options o Make mlmmj-send print the replies from the mailserver o Send our hostname in the HELO instead of relayhost o Implement requeueing mechanism to be able to resend mail when relayhost trouble occur 0.5.1 o Add a file TUNABLES which documents the ways to tune mlmmj lists. o Add support for Subject: prefix o Added WAITTIME (time to sleep before checking if we should spawn another mlmmj-send process) option in mlmmj.h o Fixed error handling in mlmmj-unsub if we can not open subscribers.d/ 0.5.0 o Use a subscribers.d/ directory for several subscribers files. mlmmj-send will now fork for each file (up to MAX_CONNECTIONS) for faster delivery. mlmmj-unsub will search for subscribers in all of these files. mlmmj-sub will now add emailaddresses to the file in subscribers.d/ with the name of the first character in the emailaddress (foo@bar.com will be in subscribers.d/f). o Major cleanup of listcontrol() and in the process add closed list functionality (touch listdir/control/closedlist and it's closed) 0.4.0 o Add moderation functionality 0.3.4 o Fix handling of lines which start with a dot 0.3.3 o Add primitive bounce handling o mlmmj-recieve now forks before exec() o mlmmj-{,un}sub now uses mmap and friends for better performance 0.3.2 o Logging enhancement o Send on the full path to the binaries around in the program since execlp needs it. o Make mlmmj-make-ml.sh use /bin/sh not /bin/bash o Rename mlmmj-{subscribe,unsubscribe} to mlmmj-{sub,unsub} o Cleanup and reimplementation of several functions that needed it badly 0.3.1 o Add BINDIR (mortenp) o Fix retstruct->emaillist initialize (mortenp) o Log handling adjustments (mortenp) o Touch subscribers and index (mortenp) 0.3.0 o Footer addition. Make a file called /path/to/listname/footer and it will be added to all mails. o Implement the help function. Send a mail to listname+help to get help. Also address used as From: address when sending sub/unsub mails o Make find_subscriber more safe (mortenp) o Completely use EXIT_macro (mortenp) 0.2.2 o Add proper checks for the execpl (mortenp) o Use EXIT_ macros for exit (mortenp) o Try /dev/urandom before /dev/random o Make the random_int() function work without /dev/random, which is not present on DEC-Unix/Tru64 (mortenp) o Make -V print the version 0.2.1 o Make the From: header on sub/unsub mails be listname+help o Double check the subscription address before adding. o The From header should be generated according to archive in the list mails for proper bounce handling o Cannot specify both -c and -C to mlmmj-{unsub,sub}scribe o Small bugfixes 0.2.0 o Implement subscription and unsubscription by email o Remove the need for the -l switch by introducing a listaddress file in the mailinglist directory o Make use of a queue directory, and not move mails to the archive before they are processed by mlmmj-send. 0.1.4 o Properly handle the replies from the mailserver on our requests. Still need some kind of requeing mechanism though. o Use automake and autoconf o Use fcntl instead of flock o Add a script to make the mailinglist directories - thanks hennebird 0.1.3 o Make it write \r\n for each \n. o Convert everything possible to snprintf o Make valgrind (http://developer.kde.org/~sewardj/) find no error, leaks anything 0.1.2 o Made mlmmj-unsubscribe o Made mlmmj-subscribe o Fix the indexnumber in the From header. Was reversed. 0.1.1 o Custom headers. Add a file called 'customheaders' in the listdir and it will be added. Should be used for Reply-To: if God forbid someone wants to use that. o Cleanup a bit 0.1.0 o Initial version working with archiving and not much else apart from the same functionality as a list in /etc/aliases mlmmj-1.2.18.0/config.h.in000644 000765 000024 00000006677 11761151556 015037 0ustar00benstaff000000 000000 /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the `fcntl' function. */ #undef HAVE_FCNTL /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* 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 `nanosleep' function. */ #undef HAVE_NANOSLEEP /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the `regcomp' function. */ #undef HAVE_REGCOMP /* Define to 1 if you have the `regexec' function. */ #undef HAVE_REGEXEC /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* 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 `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME /* 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 `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `syslog' function. */ #undef HAVE_SYSLOG /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* 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_TYPES_H /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* 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 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `unsigned int' if does not define. */ #undef size_t mlmmj-1.2.18.0/configure000755 000765 000120 00000521523 11761151556 014675 0ustar00benadmin000000 000000 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for mlmmj 1.2.18.0. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 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 # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # 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 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+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} 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 test -x / || 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 \$(( 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 : export CONFIG_SHELL # 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 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+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 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 mmj@mmj.dk about $0: your system, including any error possibly output before $0: this message. Then install a modern shell, or manually $0: run 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_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_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; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # 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 -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' 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 as_test_x='test -x' as_executable_p=as_fn_executable_p # 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'" 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='mlmmj' PACKAGE_TARNAME='mlmmj' PACKAGE_VERSION='1.2.18.0' PACKAGE_STRING='mlmmj 1.2.18.0' PACKAGE_BUGREPORT='mmj@mmj.dk' PACKAGE_URL='' ac_unique_file="src/mlmmj-receive.c" # 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 WANT_RECEIVESTRIP_FALSE WANT_RECEIVESTRIP_TRUE textlibdir EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC 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 PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM VERSION 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_receive_strip ' 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 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 mlmmj 1.2.18.0 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/mlmmj] --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 _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of mlmmj 1.2.18.0:";; 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] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-receive-strip build mlmmj-receive-strip (default is no) 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 mlmmj configure 1.2.18.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _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 || 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_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_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 mmj@mmj.dk ## ## ------------------------- ##" ) | 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 # 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_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { 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 eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=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 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_type # 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 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 mlmmj $as_me 1.2.18.0, which was generated by GNU Autoconf 2.69. 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 VERSION=$PACKAGE_VERSION am__api_version='1.12' 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 as_fn_executable_p "$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; } # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file 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 as_fn_executable_p "$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 as_fn_executable_p "$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 as_fn_executable_p "$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 as_fn_executable_p "$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=mlmmj VERSION=$VERSION 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. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' ac_config_headers="$ac_config_headers config.h" # Checks for programs. 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 as_fn_executable_p "$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 as_fn_executable_p "$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 as_fn_executable_p "$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 as_fn_executable_p "$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 as_fn_executable_p "$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 as_fn_executable_p "$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 struct stat; /* 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='\' am__nodep='_no' 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". rm -rf conftest.dir 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 10 /bin/sh. echo '/* dummy */' > 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 ;; msvc7 | msvc7msys | 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 # Checks for libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $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 if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes else ac_cv_lib_socket_socket=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_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $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 gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=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_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" fi # Checks for header files. 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 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" as_fn_executable_p "$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" as_fn_executable_p "$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 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 arpa/inet.h fcntl.h netinet/in.h stddef.h stdlib.h string.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 for ac_header in sys/socket.h syslog.h unistd.h time.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 # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi savex=$exec_prefix test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix tmp=$datadir/$PACKAGE/text.skel while textlibdir=`eval echo "$tmp"`; test "x$textlibdir" != "x$tmp"; do tmp=$textlibdir; done exec_prefix=$savex # Check whether --enable-receive-strip was given. if test "${enable_receive_strip+set}" = set; then : enableval=$enable_receive_strip; fi if test x"$enable_receive_strip" = xyes; then WANT_RECEIVESTRIP_TRUE= WANT_RECEIVESTRIP_FALSE='#' else WANT_RECEIVESTRIP_TRUE='#' WANT_RECEIVESTRIP_FALSE= fi # Checks for library functions. for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "#define HAVE_MALLOC 1" >>confdefs.h else $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac $as_echo "#define malloc rpl_malloc" >>confdefs.h fi for ac_func in ftruncate memset socket strerror strncasecmp snprintf fcntl 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 nanosleep time strftime syslog regcomp regexec 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 ac_config_files="$ac_config_files Makefile" ac_config_files="$ac_config_files src/Makefile" ac_config_files="$ac_config_files src/mlmmj-make-ml" ac_config_files="$ac_config_files listtexts/Makefile" ac_config_files="$ac_config_files contrib/Makefile" ac_config_files="$ac_config_files contrib/receivestrip/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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } 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 "${WANT_RECEIVESTRIP_TRUE}" && test -z "${WANT_RECEIVESTRIP_FALSE}"; then as_fn_error $? "conditional \"WANT_RECEIVESTRIP\" 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 -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' 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 # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # 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 mlmmj $as_me 1.2.18.0, which was generated by GNU Autoconf 2.69. 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="\\ mlmmj config.status 1.2.18.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 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" _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 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/mlmmj-make-ml") CONFIG_FILES="$CONFIG_FILES src/mlmmj-make-ml" ;; "listtexts/Makefile") CONFIG_FILES="$CONFIG_FILES listtexts/Makefile" ;; "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;; "contrib/receivestrip/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/receivestrip/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"` # 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'`; 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 } ;; 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 mlmmj-1.2.18.0/configure.ac000644 000765 000120 00000003066 11727635243 015253 0ustar00benadmin000000 000000 # Process this file with autoconf to produce a configure script. AC_INIT(mlmmj, esyscmd([tr -d '\n' < VERSION]), mmj@mmj.dk) VERSION=$PACKAGE_VERSION AC_SUBST(VERSION) AM_INIT_AUTOMAKE(mlmmj, $VERSION) AC_CONFIG_SRCDIR([src/mlmmj-receive.c]) AM_CONFIG_HEADER([config.h]) # Checks for programs. AC_PROG_CC # Checks for libraries. AC_CHECK_LIB(socket,socket) AC_CHECK_LIB(nsl,gethostbyname) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stddef.h stdlib.h string.h]) AC_CHECK_HEADERS([sys/socket.h syslog.h unistd.h time.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T savex=$exec_prefix test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix tmp=$datadir/$PACKAGE/text.skel while textlibdir=`eval echo "$tmp"`; test "x$textlibdir" != "x$tmp"; do tmp=$textlibdir; done exec_prefix=$savex AC_SUBST(textlibdir) AC_ARG_ENABLE([receive-strip], AS_HELP_STRING([--enable-receive-strip], [build mlmmj-receive-strip (default is no)])) AM_CONDITIONAL(WANT_RECEIVESTRIP, test x"$enable_receive_strip" = xyes) # Checks for library functions. AC_FUNC_MALLOC AC_CHECK_FUNCS([ftruncate memset socket strerror strncasecmp snprintf fcntl]) AC_CHECK_FUNCS([nanosleep time strftime syslog regcomp regexec]) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([src/Makefile]) AC_CONFIG_FILES([src/mlmmj-make-ml]) AC_CONFIG_FILES([listtexts/Makefile]) AC_CONFIG_FILES([contrib/Makefile]) AC_CONFIG_FILES([contrib/receivestrip/Makefile]) AC_OUTPUT mlmmj-1.2.18.0/contrib/000755 000765 000120 00000000000 11761151616 014413 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/COPYING000644 000765 000120 00000002170 11414633667 014014 0ustar00benadmin000000 000000 The MIT License Copyright (c) 2002, 2003, 2004 Mads Martin Joergensen 2004 Morten K. Poulsen 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. mlmmj-1.2.18.0/depcomp000755 000765 000120 00000050552 11761151557 014343 0ustar00benadmin000000 000000 #! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2012-03-27.16; # UTC # Copyright (C) 1999-2012 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, 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 Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # A tabulation character. tab=' ' # A newline character. nl=' ' if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' "$nl" < "$tmpdepfile" | ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. # However on # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... # tcc 0.9.26 (FIXME still under development at the moment of writing) # will emit a similar output, but also prepend the continuation lines # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form 'foo.o: dependent.h', # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ < "$tmpdepfile" > "$depfile" sed ' s/[ '"$tab"'][ '"$tab"']*/ /g s/^ *// s/ *\\*$// s/^[^:]*: *// /^$/d /:$/d s/$/ :/ ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # 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: mlmmj-1.2.18.0/FAQ000644 000765 000120 00000001177 11414633667 013321 0ustar00benadmin000000 000000 Q: How does people subscribe/unsubscribe to mlmmj controlled mailinglists? A: They send a mail to listname+subscribe@domain.tld or listname+unsubscribe@domain.tld. So if we had a list called jokes@humour.org people would send a mail to jokes+subscribe@humour.org to subscribe and jokes+unsubscribe@humour.org to unsubscribe Q: Why is my queue/ in the listdirectory filled with files with cryptip names such as '4b35160eee7f63d' '287e3509509e4577' and '49123e175f68fcbc' A: mlmmj had a tendency of leaking files in the queue/ in the past. They're safe to delete as long as they're not accompanied by .from and .rcptto files mlmmj-1.2.18.0/include/000755 000765 000120 00000000000 11735524175 014403 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/install-sh000755 000765 000120 00000033255 11761151557 014773 0ustar00benadmin000000 000000 #!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # 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 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac 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 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac 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 do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 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 problematic for 'test' and other utilities. 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 # 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-writable 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 X"$d" = X && 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: mlmmj-1.2.18.0/LICENSE000644 000765 000120 00000002170 11414633667 013766 0ustar00benadmin000000 000000 The MIT License Copyright (c) 2002, 2003, 2004 Mads Martin Joergensen 2004 Morten K. Poulsen 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. mlmmj-1.2.18.0/listtexts/000755 000765 000120 00000000000 11761151616 015016 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/Makefile.am000644 000765 000120 00000001057 11727635243 015017 0ustar00benadmin000000 000000 ## Process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = foreign dist-bzip2 EXTRA_DIST = include VERSION LICENSE UPGRADE FAQ \ TUNABLES README.access README.archives README.listtexts man \ README.exim4 README.sendmail README.security README.qmail \ README.postfix CLEANFILES = *~ mlmmj-*.tar.* man1_MANS = man/mlmmj-bounce.1 man/mlmmj-make-ml.1 man/mlmmj-receive.1 \ man/mlmmj-sub.1 man/mlmmj-maintd.1 man/mlmmj-process.1 \ man/mlmmj-send.1 man/mlmmj-unsub.1 man/mlmmj-list.1 SUBDIRS = src listtexts contrib mlmmj-1.2.18.0/Makefile.in000644 000765 000120 00000066651 11761151557 015042 0ustar00benadmin000000 000000 # Makefile.in generated by automake 1.12 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } 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 = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog TODO depcomp \ install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = 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__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man1_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 \ cscope distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) 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" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best DIST_TARGETS = dist-bzip2 dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ 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@ 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_CC = @ac_ct_CC@ 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_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ textlibdir = @textlibdir@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign dist-bzip2 EXTRA_DIST = include VERSION LICENSE UPGRADE FAQ \ TUNABLES README.access README.archives README.listtexts man \ README.exim4 README.sendmail README.security README.qmail \ README.postfix CLEANFILES = *~ mlmmj-*.tar.* man1_MANS = man/mlmmj-bounce.1 man/mlmmj-make-ml.1 man/mlmmj-receive.1 \ man/mlmmj-sub.1 man/mlmmj-maintd.1 man/mlmmj-process.1 \ man/mlmmj-send.1 man/mlmmj-unsub.1 man/mlmmj-list.1 SUBDIRS = src listtexts contrib all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-man1: $(man1_MANS) @$(NORMAL_INSTALL) @list1='$(man1_MANS)'; \ list2=''; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | 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='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) # 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 cscopelist-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ 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) 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) 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) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) 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" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist-recursive cscopelist cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 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 $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @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 \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ 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 -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(MANS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man1dir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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 mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am 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-man 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-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ cscopelist-recursive ctags-recursive install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-cscope \ clean-generic cscope cscopelist cscopelist-recursive ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-lzip \ dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-tags distcleancheck \ distdir distuninstallcheck 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-man1 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 pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-man uninstall-man1 # 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: mlmmj-1.2.18.0/man/000755 000765 000120 00000000000 11734220454 013523 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/missing000755 000765 000120 00000023703 11761151557 014363 0ustar00benadmin000000 000000 #! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.18; # UTC # Copyright (C) 1996-2012 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 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. ;; *) 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 ;; *) 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: mlmmj-1.2.18.0/README000644 000765 000120 00000013147 11761151333 013635 0ustar00benadmin000000 000000 README mlmmj-1.2.18.0 May 29, 2012 This is an attempt at implementing a mailing list manager with the same functionality as the brilliant ezmlm, but with a decent license and mail server independence. The functionality: · Archive · Custom headers / footer · Fully automated bouncehandling (similar to ezmlm) · Complete requeueing functionality · Moderation functionality · Subject prefix · Subscribers only posting · Regular expression access control · Functionality to retrieve old posts · Web-interface · Digests · No mail delivery subscription · VERP support · Delivery Status Notification (RFC1891) support · Rich, customisable texts for automated operations To use mlmmj, do the following: 0) Compile it if you're not using a binary package such as dpkg, rpm or a ports collection from a BSD or Gentoo. To compile, untar the tar-ball and do: $ ./configure && make && make install If you want to filter multipart/mime messages, pass the option --enable-receive-strip to configure, and take a look at contrib/receivestrip/README. 1) Configure a recipient delimiter. The default is to use '+', and in Postfix it's done by adding recipient_delimiter = + to /etc/postfix/main.cf. In Exim it can be done by adding local_part_suffix = +* local_part_suffix_optional to the "userforward:" and the "localuser:" router in /etc/exim/exim.conf, and also add "local_part_suffix = +*" to the system_aliases function. Also make sure that exim will add the envelope from in the Return-Path: header. There is a nice FAQ explaining recipient delimiter configuration here: http://faqs.org/faqs/mail/addressing/ The mlmmj TUNABLE "delimiter" configures this on a per list basis NOTE: Using '-' as a delimiter is unlikely to work. Mlmmj uses '-' as its own kind of minor delimiter. Of course, you also cannot use the delimiter in your list names or you will encounter problems. 2) Create the mailinglist. There's a script, mlmmj-make-ml, that will make a mailinglist for mlmmj. It is highly recommended to use this script to make the lists! What is does is described here: In the case of a list called mlmmj-test below /var/spool/mlmmj it makes the following directories: /var/spool/mlmmj/mlmmj-test/incoming /var/spool/mlmmj/mlmmj-test/queue /var/spool/mlmmj/mlmmj-test/queue/discarded /var/spool/mlmmj/mlmmj-test/archive /var/spool/mlmmj/mlmmj-test/text /var/spool/mlmmj/mlmmj-test/subconf /var/spool/mlmmj/mlmmj-test/unsubconf /var/spool/mlmmj/mlmmj-test/bounce /var/spool/mlmmj/mlmmj-test/control /var/spool/mlmmj/mlmmj-test/moderation /var/spool/mlmmj/mlmmj-test/subscribers.d /var/spool/mlmmj/mlmmj-test/digesters.d /var/spool/mlmmj/mlmmj-test/nomailsubs.d /var/spool/mlmmj/mlmmj-test/requeue NOTE: The mailinglist directory (/var/spool/mlmmj/mlmmj-test in our example) have to be owned by the user the mailserver writes as. On some Postfix installations Postfix is run by the user postfix, but still writes files as nobody:nogroup or nobody:nobody 3) Make the changes to your mailserver aliases that came as output from mlmmj-make-ml. Following the example above they will look like this: mlmmj-test: "|/usr/bin/mlmmj-receive -L /var/spool/mlmmj/mlmmj-test" NOTE: Don't forget newaliases. 4) Start mlmmj-maintd (remember full path when starting it!) or add it to crontab with -F switch. The recommended way for now is to run it via cron: "0 */2 * * * /usr/bin/mlmmj-maintd -F -L /var/spool/mlmmj/mlmmj-test" It should be started as root, as mlmmj-maintd will become the user owning the listdir (/var/spool/mlmmj/mlmmj-test), and log it's last maintenance run to listdir/mlmmj-maintd.lastrun.log. If you have several lists below /var/spool/mlmmj you can use -d: /usr/bin/mlmmj-maintd -F -d /var/spool/mlmmj If you have lists more deeply nested below /var/spool/mlmmj, use something like: find /var/spool/mlmmj -mindepth 1 -maxdepth 1 -type d \ -exec /usr/bin/mlmmj-maintd -F -d {} \; That's it! You probably want to go through the next steps too. 5) Subscribe some people /usr/bin/mlmmj-sub -L /var/spool/mlmmj/mlmmj-test/ -a joe@domain.tld etc. 6) If you want custom headers like X-Mailinglist, Reply-To: etc. just add a file called 'customheaders' in the list control/ directory like this: $ cat /var/spool/mlmmj/mlmmj-test/control/customheaders X-Mailinglist: mlmmj-test Reply-To: mlmmj-test@domain.tld 7) If you want every mail to have something like: -- To unsubscribe send a mail to coollist+unsubscribe@lists.domain.net Just add what you want to a file named "footer" in the same dir as "customheader" (listdir/control/). 8) If you want a prefix on the subject, to make it look like this: Subject: [mlmmj-test] how are we doing? Simply do 'echo "[mlmmj-test]" > control/prefix 9) For having a moderated list, simply create a file called 'moderated' in the control/ directory. Moderators are added to a file called 'moderators' in the control/ dir as well. 10) Have a look at the file TUNABLES for runtime configurable things. Tunables in include/mlmmj.h: · There's some time intervals for how mlmmj-maintd operates. I've chosen non-strict defaults, so depending on your BOFH rate you might want to tweak. The defaults should be good for most people though. Have fun! Mads Martin Joergensen Morten K. Poulsen Ben Schmidt mlmmj-1.2.18.0/README.access000644 000765 000120 00000007322 11734220454 015074 0ustar00benadmin000000 000000 README.access present in mlmmj versions >= 0.8.0 (moderate tag since 1.1.0-RC3) Access control in mlmmj ======================= If the file listdir/control/access is present, access control is enabled. NOTE: the default action is to deny access (reject the mail), so an empty access control file will cause mlmmj to reject all posts, whereas a non- existant file will change nothing, and mlmmj will behave as usual. Each header in the mail is tested against each rule, rule by rule. That is, all headers are first tested against the first rule, then all headers are tested against the second rule, and so on. The first rule to match a header decides which action to take - allow, deny, discard or moderate the post. The syntax is quite simple: action[ [!]regexp] - "Action" can be "allow", "send", "deny", "discard" or "moderate". - The optional "!" makes the rule a match, if NO header matches the regular expression. - "Regexp" is a POSIX.2 extended regular expression. Matching is done case insensitive. The action "allow" will pass the mail on to the next step in processing. The mail may still be held for moderation, if it would have been so without access rules. The action "send" will send the mail unconditionally. It will not be moderated, nor subject to subonlypost, nor modnonsubposts. The action "deny" will not send the mail to the mailing list, but will send a rejection mail to the sender. The action "discard" will not send the mail to the list, and will not send a rejection mail. The action "moderate" will hold the mail for moderation. IMPORTANT: if "moderate" is used then don't forget to add people who should function as moderators in listdir/control/moderators The flow through the access system is something like this: deny +------+ +----------------->| deny | | +------+ | | discard +---------+ | +-------------->| discard | | | +---------+ | | ^ | | | expire +--------+ moderate +------+ +------+ --->| access |----------->| hold |---------->| send |---> +--------+ +------+ confirm +------+ | | ^ ^ ^ | | | yes | | | | allow +--------------+ no | | | +-------------->| moderation * |-----+ | | +--------------+ | | send | +------------------------------------------+ * modnonsubposts is also processed here, and subonlypost (the flow may be to deny or discard for subonlypost without modnonsubposts). First a simple example. This rule set will reject any mail that is NOT plain text, or has a subject that contains "BayStar", and allow anything else: deny !^Content-Type: text/plain deny ^Subject:.*BayStar allow To allow only text mails, but have the moderators moderate every html mail one would use this: allow ^Content-Type: text/plain moderate ^Content-Type: text/html deny Now on to a more advanced example. Morten can post anything, Mads Martin can post if the subject does not contain "SCO". Everything else is denied: allow ^From: Morten deny ^Subject:.*SCO allow ^From: Mads Martin deny The last rule (deny) can be left out, as deny is the default action. A third example. Deny any mails with "discount", "weightloss", or "bonus" in the subject. Allow PGP signed and plain text mails. Anything else is denied: deny ^Subject:.*discount deny ^Subject:.*weightloss deny ^Subject:.*bonus allow ^Content-Type: multipart/signed allow ^Content-Type: text/plain mlmmj-1.2.18.0/README.archives000644 000765 000120 00000001276 11734220454 015441 0ustar00benadmin000000 000000 README.archives Generating web-browseable archives of Mlmmj lists ================================================= There are a couple of options for making web-browseable archives of Mlmmj lists. mlmmj-webarchiver (mhonarc) --------------------------- Andreas Schneider has created mlmmj-webarchiver, based on mhonarc and perl. You can get it here: http://git.cryptomilk.org/projects/mlmmj-webarchiver.git/ And see the kind of output it gives here: http://www.libssh.org/archive/ hypermail --------- Wolf Bergenheim has written some scripts which use hypermail to create web-browseable archives. The scripts and details can be found here: http://mlmmj.org/archive/mlmmj/2010-08/1710.html mlmmj-1.2.18.0/README.exim4000644 000765 000120 00000007072 11727635243 014673 0ustar00benadmin000000 000000 README.exim4 May 7th 2005 This is a step-by-step guide to run mlmmj with Exim4. The most current version of this can be found on http://plonk.de/sw/mlmmj/README.exim4. Notes: - We assume that you have a user and group called mlmmj to use with mlmmj - The exim user needs rx access rights to mlmmj's spool directory. (If you don't want that, see below.) The easiest way is "chmod 755 /path/to/mlmmj/spool", if it's ok that local users can see which lists there are. Note that the owner of the mlmmj spool must still be the mlmmj user (and this user must have at least x rights to the directories below). - Existence of mailing lists is automatically checked ($listdir) and you don't need to put anything into your aliases file - If you want VERP to be done by your MTA, follow the instructions below and put an empty file named verp into the control directory of your lists 1. In the main configuration section: MLMMJ_HOME=/var/spool/mlmmj domainlist mlmmj_domains = list.example.net 2. Add +mlmmj_domains to relay_to_domains: domainlist relay_to_domains = other.domain : +mlmmj_domains 3. mlmmj is barely interested in delay warnings, so add this in the main configuration: delay_warning_condition = ${if match_domain{$domain}{+mlmmj_domains}{no}{yes}} 4. In the routers section (before the dnslookup router, preferably at the beginning): mlmmj_router: driver = accept domains = +mlmmj_domains require_files = MLMMJ_HOME/${lc::$local_part} # Use this instead, if you don't want to give Exim rx rights to mlmmj spool. # Exim will then spawn a new process running under the UID of "mlmmj". #require_files = mlmmj:MLMMJ_HOME/${lc::$local_part} local_part_suffix = +* local_part_suffix_optional headers_remove = Delivered-To headers_add = Delivered-To: $local_part$local_part_suffix@$domain transport = mlmmj_transport If you want VERP to be done by your MTA, also add this: verp_router: driver = dnslookup domains = !+mlmmj_domains # we only consider messages sent in through loopback condition = ${if eq{$sender_host_address}{127.0.0.1}{yes}{no}} ignore_target_hosts = <; 0.0.0.0; 127.0.0.0/8; ::1/128; fe80::/10; ff00::/8 # only the un-VERPed bounce addresses are handled senders = \N^.+\+bounces-\d+@.+\N transport = verp_smtp To prevent temporary errors for not-existing lists, add !+mlmmj_domains to the domains condition of the dnslookup router: dnslookup: driver = dnslookup domains = !+mlmmj_domains : !+local_domains [...] 5. Somewhere in the transports section. (Change the path of mlmmj-receive if you don't use the default location!): mlmmj_transport: driver = pipe return_path_add user = mlmmj group = mlmmj home_directory = MLMMJ_HOME current_directory = MLMMJ_HOME command = /usr/local/bin/mlmmj-receive -F -L MLMMJ_HOME/${lc:$local_part} If you want VERP to be done by your MTA, also add this: verp_smtp: driver = smtp # put recipient address into return_path return_path = ${quote_local_part:${local_part:$return_path}}-\ ${original_local_part}=${original_domain}@\ ${domain:$return_path} # must restrict to one recipient at a time max_rcpt = 1 # Errors-To: may carry old return_path headers_remove = Errors-To headers_add = Errors-To: $return_path 6. Test your setup with $ exim -bt mlmmj-test@your.list.domain mlmmj-test@your.list.domain router = mlmmj_router, transport = mlmmj_transport If you get different output, run it with -d to see what's going wrong. If not, you're done! Jakob Hirsch (jh at plonk dot de) mlmmj-1.2.18.0/README.listtexts000644 000765 000120 00000047472 11744130214 015703 0ustar00benadmin000000 000000 README.listtexts List texts in mlmmj =================== List texts are stored in listdir/text. They specify the content of various automatic emails that Mlmmj sends. They are provided in a number of different languages. The language to use for a list is chosen when you run the mlmmj-make-ml script and the appropriate files are copied into your listdir/text directory. This file documents the following aspects of list texts: - Naming scheme - Supported list texts - Format - Conditionals - Wrapping - Formatting and comments - Formatted substitutions - Unformatted substitutions - Escapes Naming scheme ------------- List texts are named following a scheme of: purpose-action-reason-type Mlmmj will look for the full four-part name first, then for files with shorter names obtained by dropping parts off the end, and finally for a file with a compatibility filename. It will use the first one it finds. (Note that use of the compatibility filename is DEPRECATED and will be removed in a future release.) So, the complete search order is: - purpose-action-reason-type - purpose-action-reason - purpose-action - purpose - compatibility filename (DEPRECATED) When using shortened names, the %ifaction%, %ifreason%, %iftype% and related conditionals can be used to customise the list text according to the values of the missing parts. Supported list texts -------------------- The following list texts are supported. The compatibility filename (DEPRECATED) is given in brackets. Those with asterisks (*) are not yet used. - help (listhelp) sent in response to an email to listname+help@domain.tld - faq (listfaq) sent in response to an email to listname+faq@domain.tld - confirm-sub-{request|admin}-normal (sub-confirm) - confirm-sub-{request|admin}-digest (sub-confirm-digest) - confirm-sub-{request|admin}-nomail (sub-confirm-nomail) - confirm-unsub-{request|admin}-normal (unsub-confirm) - confirm-unsub-{request|admin}-digest (unsub-confirm-digest) - confirm-unsub-{request|admin}-nomail (unsub-confirm-nomail) sent to a requester to allow them to confirm a (un-)subscription request - moderate-post-{modnonsubposts|access|moderated} (moderation) sent to the appropriate moderators when moderation is required because a user has submitted a post - gatekeep-sub-{request|admin|confirm}-{normal|digest|nomail} (submod-moderator) sent to the appropriate gatekeepers when gatekeeping is required because a subscription request has been received - wait-post-{modnonsubposts|access|moderated} (moderation-poster) sent to a person submitting a post when they need to wait for moderation before it is released to the list - wait-sub-{request|admin|confirm}-{normal|digest|nomail} (submod-requester) sent to a person requesting subscription when they need to wait for gatekeeping for permission to join - deny-sub-disabled-{digest|both} (sub-deny-digest) - deny-sub-disabled-nomail (sub-deny-nomail) - deny-sub-subbed-{normal|digest|nomail|both} (sub-subscribed) - deny-sub-closed * - deny-sub-expired * - deny-sub-obstruct * - deny-unsub-unsubbed-{normal|digest|nomail|all} (unsub-notsubscribed) - deny-post-subonlypost (subonlypost) - deny-post-access (access) - deny-post-maxmailsize (maxmailsize) - deny-post-tocc (notintocc) - deny-post-expired * - deny-post-reject * - deny-release-notfound * - deny-release-moderators * - deny-reject-notfound * - deny-reject-moderators * - deny-permit-notfound * - deny-permit-gatekeepers * - deny-obstruct-notfound * - deny-obstruct-gatekeepers * sent to the requestor when an action is denied or fails for some reason ('requestor' here means the person who requested the action, so e.g. for a reject action, deny-reject will go to the moderator requesting the rejection if the rejection fails; but deny-post-reject will go to the person requesting the post if the rejection succeeds, causing the post to fail) - finish-sub-{request|confirm|admin|permit|switch}-normal (sub-ok) - finish-sub-{request|confirm|admin|permit|switch}-digest (sub-ok-digest) - finish-sub-{request|confirm|admin|permit|switch}-nomail (sub-ok-nomail) - finish-unsub-{request|confirm|admin}-normal (unsub-ok) - finish-unsub-{request|confirm|admin}-digest (unsub-ok-digest) - finish-unsub-{request|confirm|admin}-nomail (unsub-ok-nomail) - finish-post-request * - finish-post-confirm * - finish-post-release * - finish-release * - finish-reject * - finish-permit * - finish-obstruct * sent to the requestor when an action completes successfully ('requestor' here means the person who requested the action, so e.g. for a release action, the moderator requesting the release will receive finish-release, and the person who submitted the released post will receive finish-post-release because the release action caused their post action to succeed) - notify-sub-{request|confirm|admin|permit}-normal (notifysub) - notify-sub-{request|confirm|admin|permit}-digest (notifysub-digest) - notify-sub-{request|confirm|admin|permit}-nomail (notifysub-nomail) - notify-unsub-{request|confirm|admin|bouncing}-normal (notifyunsub) - notify-unsub-{request|confirm|admin|bouncing}-digest (notifyunsub-digest) - notify-unsub-{request|confirm|admin|bouncing}-nomail (notifyunsub-nomail) sent to the list owner when somebody is (un-)subscribed - digest sent at the start of a digest (NOTE: the only header supported in this list text so far is a single-line 'Subject:' header; however, the contents of control/customheaders is included when digests are sent) - probe (bounce-probe) sent to a subscriber after an email to them bounced to inform them of the bounce and probe when the address is no longer bouncing - list---all (listsubs) - list---normal * - list---digest * - list---nomail * sent in response to an email to listname+list@domain.tld from the list owner (DEPRECATED: if none of %listsubs%, %digestsubs% and %nomailsubs% is encountered in the text, then they will be automatically added with some default formatting; this functionality is expected to be removed in the future) * Not yet used. Format ------ List texts have the following format: - Headers - Blank line - Body They are expected to be in UTF-8 encoding and have Unix line endings. The headers should be formatted as they should appear in the mail message. They will begin the mail message. Header continuation via lines beginning with linear whitespace is supported. Following the headers found in the list text, Mlmmj will output the following default headers, unless the same header is already provided in the list text. - From: - To: - Message-ID: - Date: - Subject: mlmmj administrivia - MIME-Version: 1.0 - Content-Type: text/plain; charset=utf-8 - Content-Transfer-Encoding: 8bit The Subject: header is treated specially: it may include UTF-8 characters, which will automatically be escaped using the =?utf-8?q?...?= quoting mechanism. (NOTE: the 'digest' list text is a bit different. See its description above.) Both headers and bodies of list texts may include conditionals, formatting directives and substitutions. These are explained in the following sections. Conditionals ------------ Conditionals allow text in list texts to be included or omitted based on conditions. The following are available: - %ifaction A ...% the action is one of those given - %ifreason R ...% the reason is one of those given - %iftype T ...% the type is one of those given - %ifcontrol C ...% one of the given control files exists - %ifnaction A% the action is not the one given - %ifnreason R% the reason is not the one given - %ifntype T% the type is not the one given - %ifncontrol C ...% at least one of the given control files does not exist The text after the %if...% directive is only included if the condition is satisfied, until an %else% or %endif% is encountered. These behave as you would expect. The %else% is optional. If a line with any of these conditional directives (%if...%, %else% or %endif%), after processing, contains only whitespace, the line does not appear at all in the output (the newline and any whitespace is omitted). Furthermore, if the preceding processed output ends with a blank line, when an unsatisfied conditional is encountered which has no %else% part, that preceding blank line is removed (unless it is the blank line that ends the headers). On the whole, this is what you would want and expect, so you probably don't need to worry about it. Note that when multiple parameters can be given for the directives, these have 'or' behaviour; to get 'and' behaviour, nest conditionals. Wrapping -------- There are various directives available to assist with wrapping and formatting. Wrapping needs to be enabled for each paragraph with: - %wrap% - %wrap W% concatenate and rewrap lines until the next empty line, whitespace-only line, or %nowrap% directive to a width of W (or 76 if W is omitted); second and later lines are preceded with as many spaces as the width preceding the directive; the width is reckoned including any text preceding the directive and any indentation preserved from a file which included the current one, so it is an absolute maximum width To turn off wrapping before the end of a paragraph, use: - %nowrap% stop wrapping; usually placed at the end of a line so the following line break is honoured but all preceding text is properly wrapped; if you want wrapping to continue after the break, you need to use %wrap% to turn it on again on the following line To cater for various languages, there are a number of different wrapping modes that can be set. These can be set either before or after wrapping is specified, and can even be changed part way through a paragraph if desired. The following directives control them: - %wordwrap% - %ww% use word-wrapping (this is the default; good for English, French, Greek and other languages that use an alphabet and spaces between words); lines have whitespace trimmed from both ends and are joined with a single space; lines are broken at spaces or at points marked for breaking with \/, but not at spaces escaped with a backslash - %charwrap% - %cw% use character-wrapping (good for Chinese, Japanese and Korean which use characters without spaces between words); lines have only leading whitespace trimmed and are joined without inserting anything at the joint; lines are broken at space or any non-ASCII character except where disallowed with \= - %userwrap% - %uw% use user-wrapping (for more complex languages or wherever complete manual control is desired); lines have only leading whitespace trimmed and are joined without inserting anything at the joint; lines are broken only where marked for breaking with \/ - %thin% assume non-ASCII characters are thin (equivalent to one unit, the same as ASCII characters) when reckoning the width for wrapping (this is the default; good for languages like Greek which use a non-Latin alphabet) - %wide% assume non-ASCII characters are wide (equivalent to two units, twice as wide as ASCII characters) when reckoning the width for wrapping (good for Chinese, Japanese, Korean) - %zero ABC% (ABC represents a sequence of non-ASCII characters) treat the listed characters as having zero-width when reckoning the width for wrapping (useful for ignoring combining characters such as accents so they don't affect the width calculation); usefully, the listed characters can be represented as unicode escapes (\uNNNN) If a line with any of the directives in this section, after processing, contains only whitespace, the line does not appear at all in the output (the newline and any whitespace is omitted). Formatting and comments ----------------------- The following directives are available to assist with formatting and readability: - %^% start the line here; anything preceding this directive is ignored (useful for using indentation for readability without ruining the formatting of the text when it is processed) - %comment% - %$% end the line here; anything following this directive is ignored/a comment If a line with any of these directives, after processing, contains only whitespace, the line does not appear at all in the output (the newline and any whitespace is omitted). Formatted substitutions ----------------------- These formatted substitutions work with multiple lines, so are generally not appropriate for use in headers. They are: - %text T% text from the file named T in the listdir/text directory; the name may only include letters, digits, underscore, dot and hyphen, and may not start with a dot; note that there is an unformatted version of this directive - %control C% the contents of the control file named C in listir/control; the name may only include letters, digits, underscore, dot and hyphen, and may not start with a dot; note that there is an unformatted version of this directive - %originalmail% - %originalmail N% (available only in moderate-post-*, wait-post-* and deny-post-{access|maxmailsize|tocc|subonlypost}) the email message being processed (usually a mail being moderated); N represents a number, which is how many lines of the message (including headers) to include: if omitted, the whole message will be included - %digestthreads% (available only in digest) the list of threads included in the digest - %gatekeepers% (available only in gatekeep-sub and wait-sub) the list of moderators to whom the moderation request has been sent - %listsubs% (available only in list---*) the list of normal subscribers - %digestsubs% (available only in list---*) the list of digest subscribers - %nomailsubs% (available only in list---*) the list of nomail subscribers - %moderators% (available only in moderate-post-* and wait-post-*) the list of moderators to whom the moderation request has been sent - %bouncenumbers% (available only in probe) the list of indexes of messages which may not have been received as they bounced Directives which include a list of items have the behaviour that each item is preceded and followed by the same text as preceded and followed the directive on its line; only one such directive is supported per line. Those which include a block of text have the behaviour that second and later lines are preceded with as many spaces as there were bytes preceding the directive; any text following such directives on the same line is omitted. If a line with any of these directives, after processing, contains only whitespace, the line does not appear at all in the output (the newline and any whitespace is omitted). Unformatted substitutions ------------------------- Unformatted substitutions that are available are: - $bouncenumbers$ (available only in probe) the formatted list of indexes of messages which may not have been received as they bounced DEPRECATED: use %bouncenumbers% - $confaddr$ - $confirmaddr$ (available only in confirm-[un]sub-*) the address to which to send mail to confirm the (un-)subscription in question NOTE: the short version of this substitution is DEPRECATED - $control C$ the contents of the control file named C in listdir/control, with its final newline stripped; the name may only include letters, digits, underscore, dot and hyphen, and may not start with a dot; note that there is a formatted version of this directive - $digestfirst$ (available only in digest) index of the first message included in a digest - $digestinterval$ (available only in digest) indexes of the first and last messages included in a digest (e.g. 1-5), or just the index if only a single message is included - $digestissue$ (available only in digest) the issue number of the digest - $digestlast$ (available only in digest) index of the last message included in a digest - $digestsubaddr$ listname+subscribe-digest@domain.tld DEPRECATED: use $list+$subscribe-digest@$domain$ instead - $digestthreads$ (available only in digest) the formatted list of threads included in the digest DEPRECATED: use %digestthreads% - $digestunsubaddr$ listname+unsubscribe-digest@domain.tld DEPRECATED: use $list+$unsubscribe-digest@$domain$ instead - $domain$ domain.tld - $faqaddr$ listname+faq@domain.tld DEPRECATED: use $list+$faq@$domain$ instead - $helpaddr$ listname+help@domain.tld DEPRECATED: use $list+$help@$domain$ instead - $list$ listname - $list+$ listname+ - $listaddr$ listname@domain.tld DEPRECATED: use $list$@$domain$ instead - $listgetN$ listname+get-N@domain.tld (the N here is nothing special, so this won't actually work, but is used to explain to users how to use the +get functionality) DEPRECATED: use $list+$get-N@$domain$ instead - $listowner$ listname+owner@domain.tld DEPRECATED: use $list+$owner@$domain$ instead - $listsubaddr$ listname+subscribe@domain.tld DEPRECATED: use $list+$subscribe@$domain$ instead - $listunsubaddr$ listname+unsubscribe@domain.tld DEPRECATED: use $list+$unsubscribe@$domain$ instead - $maxmailsize$ (available only in deny-post-maxmailsize) the maximum size of mail that Mlmmj will accept - $moderateaddr$ (available only in moderate-post-* and gatekeep-sub) the address to which to send mail to approve the post or subscription in question DEPRECATED: use $releaseaddr$ or $permitaddr$ instead - $moderators$ (available only in moderate-post-*, wait-post-*, gatekeep-sub and wait-sub) the formatted list of moderators to whom the moderation request has been sent DEPRECATED: use %moderators% or %gatekeepers% instead - $newsub$ (available only in notify-sub-*-*) the address that has been subscribed DEPRECATED: use $subaddr$ instead - $nomailsubaddr$ listname+subscribe-nomail@domain.tld DEPRECATED: use $list+$subscribe-nomail@$domain$ instead - $nomailunsubaddr$ listname+unsubscribe-nomail@domain.tld DEPRECATED: use $list+$unsubscribe-nomail@$domain$ instead - $oldsub$ (available only in notify-sub-*-*) the address that has been unsubscribed DEPRECATED: use $subaddr$ instead - $originalmail$ the same as %originalmail 100% preceded by a space DEPRECATED: use %originalmail% - $permitaddr$ (available only in gatekeep-sub) the address to which to send mail to permit the subscription in question - $posteraddr$ (available only in deny-post-{access|tocc|subonlypost|maxmailsize}, moderate-post-* and wait-post-*) the from address of the message that was received as determined by Mlmmj - $random0$ - $random1$ - $random2$ - $random3$ - $random4$ - $random5$ these are 6 distinct random strings; they allow list texts to be constructed that are MIME messages with attachments by creating boundaries that are unlikely to appear in the attached messages - $releaseaddr$ (available only in moderate-post-*) the address to which to send mail to release the post in question - $subaddr$ (available only in gatekeep-sub, confirm-[un]sub-*, finish-[un]sub-*, notify-[un]sub-* and deny-[un]sub-*) the address requested to be (un-)subscribed - $subject$ (available only in deny-post-{access|tocc|subonlypost|maxmailsize}, moderate-post-* and wait-post-*) the subject line of the message in question - $text T$ text from the file named T in the listdir/text directory, with its final newline stripped; the name may only include letters, digits, underscore, dot and hyphen, and may not start with a dot; note that there is a formatted version of this directive Escapes ------- These allow you to avoid special meanings of characters used for other purposes in list texts, as well as control the construction of the texts at a fairly low level. - $$ a single $ - %% a single % - \\ a single \ - \uNNNN (NNNN represents four hex digits) a Unicode character (this is not really appropriate for use in a header, except perhaps the Subject: header as Mlmmj does automatic quoting for that header as described above) - \ a space, but don't allow the line to be broken here when wrapping - \/ nothing, but allow the line to be broken here when wrapping - \= nothing, but don't allow the line to be broken here when wrapping mlmmj-1.2.18.0/README.postfix000644 000765 000120 00000020261 11734220454 015324 0ustar00benadmin000000 000000 README.postfix Jan 28th 2012 The main challenge to setting up Mlmmj with Postfix is that Mlmmj must be executed by root or the owner of the list directory, but by default Postfix will execute Mlmmj as 'nobody'[1]. There are a number of possible ways around this: - Making 'nobody' own your lists (insecure) [2] - Changing the Postfix default to an 'mlmmj' user (possibly insecure or impractical) [3] - .forward files (impractical) [4] - Using an :include: file owned by an 'mlmmj' user (possibly insecure and suboptimal) [5] - Adding an alias table owned by an 'mlmmj' user (suboptimal) [6] - Using a Postfix transport to run Mlmmj as an 'mlmmj' user (recommended) As you can see, the last option is recommended. Here is how to set it up using Postfix virtual domains (so you can host multiple domains on the same server). (It can also be done with regular non-virtual aliases[7].) 1) Add an 'mlmmj' user to your system (e.g. using 'useradd'). It usually makes sense to make this a 'system' user, with no password and no shell (/usr/false for the shell), and for its home directory to be /var/spool/mlmmj (or wherever you want to put your Mlmmj spool directory). 2) Create your Mlmmj spool directory (we'll assume it's /var/spool/mlmmj) and change its owner to the 'mlmmj' user. 3) Add an 'mlmmj' transport which uses the pipe(8) delivery agent to execute mlmmj-receive as the mlmmj user by adding something like the following to master.cf (often in /etc/postfix)[8]: # mlmmj mailing lists mlmmj unix - n n - - pipe flags=ORhu user=mlmmj argv=/usr/local/bin/mlmmj-receive -F -L /var/spool/mlmmj/$nexthop Note that $nexthop is used to specify the list directory. We will return to that later. 4) Integrate some necessary options in main.cf (also often in /etc/postfix): # Only deliver one message to Mlmmj at a time mlmmj_destination_recipient_limit = 1 # Consider the part after '+' but before '@' to be an address extension # i.e. addresses have the form user+extension@domain.tld recipient_delimiter = + # A map to forward mail to a dummy domain virtual_alias_maps = hash:/var/spool/mlmmj/virtual # Allow virtual alias maps to specify only the user part of the address # and have the +extension part preserved when forwarding, so that # list-name+subscribe, list-name+confsub012345678, etc. will all work propagate_unmatched_extensions = virtual # A map to forward mail for the dummy domain to the Mlmmj transport transport_maps = hash:/var/spool/mlmmj/transport Of course, you may need to merge these options with existing ones (e.g. you probably have existing virtual_alias_maps if you run a multi-domain server). It is probably unnecessary to change propagate_unmatched_extensions because it defaults to something including 'virtual'. You can check this with something like 'postconf | grep propagate'. 5) (For each list) Create a mailing list (e.g. by using mlmmj-make-ml). The list directory should be like /var/spool/mlmmj/list-dir for a flat structure, or /var/spool/mlmmj/domain.tld/list-name for a hierarchical structure (the -s option to mlmmj-make-ml may be useful to get the list created where you want it). Ensure the list directory and everything in it is owned by the mlmmj user (except you may want control files to be owned by your www server user in order to use web configuration interfaces; they must be readable by the mlmmj user though). 6) (For each list) Add entries to the Postfix tables to accept mail for the list and forward it to the Mlmmj transport: /var/spool/mlmmj/virtual: list-name@domain.tld domain.tld--list-name@localhost.mlmmj /var/spool/mlmmj/transport: # for a flat structure domain.tld--list-name@localhost.mlmmj mlmmj:list-dir # for a hierarchical structure domain.tld--list-name@localhost.mlmmj mlmmj:domain.tld/list-name Note that we have used a dummy domain 'localhost.mlmmj' to connect the virtual alias with the Mlmmj transport. This could be anything as long as it isn't a real domain. The user part of the address could also be anything; as long as the address matches in both tables it should work. Also note that the text after 'mlmmj:' becomes $nexthop which was mentioned earlier, so it is used to specify the list directory when executing mlmmj-receive. 7) Refresh your postfix tables and reload your configuration so it takes effect. postmap /var/spool/mlmmj/virtual postmap /var/spool/mlmmj/transport postfix reload Enjoy your new lists! [1] Actually, the standard local(8) delivery agent will execute external programs (such as Mlmmj) as the 'receiving user'. However, unless you direct your mail to Mlmmj using a .forward file (see local(8)) or an :include: file (see aliases(5)), or your aliases file is not owned by root, there is no 'receiving user'. Without a 'receiving user', Postfix uses the user from the configuration option 'default_privs', which defaults to 'nobody'. [2] Making 'nobody' own your lists is insecure because other programs and daemons rely on 'nobody' not owning any files or having access to anything; they use 'nobody' as a way of denying access and keeping all your files and system secure. Most notably, some NFS implementations use 'nobody' when somebody connects but fails to authenticate. Your mailing lists should not be accessible in such situations, but they may be if they are owned by 'nobody'. [3] Changing 'default_privs' to an 'mlmmj' user may open other security holes, and may not be appropriate if Postfix is used for other external programs besides Mlmmj. [4] Using .forward files is not practical, as it requires a user to be created for every mailing list. [5] Using :include: files would require delivery to commands to be enabled in :include: files, which is not recommended for security reasons. It is also messy for virtual domains in the same way as an alias table owned by an 'mlmmj' user is[6]. [6] Adding an alias table owned by an 'mlmmj' user works, and doesn't pose any great security risk. However, it is messy for virtual domains as you need to forward mail from the virtual domain to your non-virtual domain and then to Mlmmj. This results in each list having an additional address, which is not desirable. That extra intermediate address is also included in mail headers, which is not desirable (though it could be filtered out by Mlmmj). Setting up an Mlmmj transport is about the same amount of work and doesn't have these drawbacks. However, If you are not using virtual domains, this is a good and simple option; but it will not be explained in detail here. [7] To use non-virtual alises, at step 4, you'll need to incorporate: alias_maps = hash:/var/spool/mlmmj/aliases propagate_unmatched_extensions = alias You probably will need to adjust propagate_unmatched_extensions in this case, probably by adding 'alias' to the existing value rather than using 'alias' alone. If you want to use 'newaliases' to update the alias table, you should also incorporate: alias_database = hash:/var/spool/mlmmj/aliases At step 6, entries in /var/spool/mlmmj/aliases should look something like: list-name: list-name@localhost.mlmmj At step 7, you'll need: postalias /var/spool/mlmmj/aliases or (if you included alias_database above) newaliases And of course you can omit the virtual stuff if you're not using it. Note that this has not been tested, but we believe it should work. [8] The flags for the transport are pretty critical. In particular if the 'R' option is not used mlmmj-receive fails to receive the mail correctly. The options mean: D - Prepend a 'Delivered-To: recipient' header (not used) O - Prepend an 'X-Original-To: recipient' header R - Prepend a 'Return-Path:'. header h - fold $nexthop to lowercase u - fold $recipient to lowercase mlmmj-1.2.18.0/README.qmail000644 000765 000120 00000005534 11727635243 014751 0ustar00benadmin000000 000000 |------------------------------------------------------------------------------| | Using mlmmj with qmail (and vpopmail) | |------------------------------------------------------------------------------| |--------------- Fabio Busatto --------------| |------------------------------------------------------------------------------| This mini-HOWTO is a step-by-step guide for using mlmmj with qmail MTA (http://www.qmail.org/), and it has been successfully tested also with vpopmail virtual domains (http://www.inter7.com/vpopmail/). Prerequisites: - qmail (and vpopmail) correctly installed - mlmmj correctly installed Conventions: - ${BINDIR}: directory with mlmmj binary files (/usr/local/bin/) - ${LISTDIR}: directory with list configuration files (/var/spool/mlmmj/listname) - ${DQFILE}: dot-qmail file (see below) Configuration: - the first thing you've to do is to create the list, using the mlmmj-make-ml script (follow the classic procedure to do this step) - enter the control directory for the list (${LISTDIR}/control/), and execute the following command: # cd ${LISTDIR}/control/; echo '-' > delimiter - chown and chmod the file according to the mlmmj configuration - create dot-qmail files for the list to handle direct requests and extensions: # echo -e "|${BINDIR}/mlmmj-receive -L ${LISTDIR}" > ${DQFILE} - chown and chmod the files according to the qmail (and vpopmail) configuration WARNING: REMEMBER that the delimiter is -, so do not use + when composing mail addresses for extensions!!! WARNING: DO NOT USE 'preline' command in dot-qmail files, it will result in mlmmj to not work properly!!! |------------------------------------------------------------------------------| Example: - Configuring mlmmj to handle ml@programmazione.it mailing list using qmail as MTA and vpopmail for virtual domain support: # mlmmj-make-ml -c vpopmail:vchkpw -L ml Creating Directorys below /var/spool/mlmmj. Use '-s spooldir' to change The Domain for the List? [] : programmazione.it The emailaddress of the list owner? [postmaster] : postmaster@programmazione.it The path to texts for the list? [/usr/local/share/mlmmj/text.skel] : chown -R vpopmail:vchkpw /var/spool/mlmmj/ml? [y/n]: y # cd /var/spool/mlmmj/ml/control/ # echo '-' > delimiter # chown vpopmail:vchkpw delimiter # cd /home/vpopmail/domains/programmazione.it/ # echo -e "|/usr/local/bin/mlmmj-receive -L /var/spool/mlmmj/ml/" > .qmail-ml # cp -a .qmail-ml .qmail-ml-default # cat *-default # chown vpopmail:vchkpw .qmail-ml .qmail-ml-default # chmod 600 .qmail-ml .qmail-ml-default |------------------------------------------------------------------------------| |--------------- Fabio Busatto --------------| |------------------------------------------------------------------------------| mlmmj-1.2.18.0/README.security000644 000765 000120 00000001151 11414633667 015505 0ustar00benadmin000000 000000 Date: Sun, 1 May 2005 12:54:41 +0200 From: Mads Martin Joergensen To: mlmmj@mmj.dk Subject: Security audit Hey list, Sebastian Krahmer (http://www.novell.com/linux/security/team.html) recently did a security audit of mlmmj, and didn't find any issues. That doesn't necessarily mean that there isn't any, but at least the code have been looked by different eyes with security in mind. -- Mads Martin Joergensen, http://mmj.dk "Why make things difficult, when it is possible to make them cryptic and totally illogical, with just a little bit more effort?" -- A. P. J. mlmmj-1.2.18.0/README.sendmail000644 000765 000120 00000007140 11727635243 015435 0ustar00benadmin000000 000000 Using sendmail + VERP -------------------------------------------------------------------------------- The following configuration enables VERP (http://cr.yp.to/proto/verp.txt) which is useful for mailing list managers that are able to take advantage of that feature. This configuration is currently used for using the mlmmj manager (http://mlmmj.mmj.dk) with VERP enabled + sendmail. The hack consists in hooking VERP rewriting in a replacement ruleset for the existing EnvFromSMTP one (called VerpEnvFromSMTP). This is going to work *only* if we are splitting messages with multiple recipients in separate queue files since the macro we are using for the rewriting ($u) is not set when multiple rcpt are present. The first step consists in forcing envelope splitting, this is done using the QUEUE_GROUP feature, here we are definining r=1 (max 1 rcpt per message) for the default queue group: QUEUE_GROUP(`mqueue', `P=/var/spool/mqueue, F=f, I=1m, R=2, r=1') Since we are going to split a lot it's advisable to use the FAST_SPLIT option, additionally we need to enforce return-path inclusion in the local mailer: define(`confFAST_SPLIT', `100')dnl define(`LOCAL_SHELL_FLAGS', `eu9P')dnl Then we define a regex map for matching the addresses that we are going to rewrite, in our example we'll rewrite addresses like with where user@foo.net is the recipient address of the message. So we need to apply our verp ruleset *only* to those addresses. Additionally we are also adding the Delivered-To header: LOCAL_CONFIG Kmatch_verp regex -m -a@VERP (listname\+bounces\-[0-9]+<@domain\.net\.?>) H?l?Delivered-To: $u Here's the ruleset, the first half of the ruleset is the existing EnvFromSMTP ruleset present in default sendmail.cf, the seconf half is the VERP stuff: SVerpEnvFromSMTP R$+ $: $>PseudoToReal $1 sender/recipient common R$* :; <@> $@ list:; special case R$* $: $>MasqSMTP $1 qualify unqual'ed names R$+ $: $>MasqEnv $1 do masquerading R $* $: $(match_verp $1 $) match the address R $* + $* < @ $* . > $* @VERP $: $1 + $2 - $&u < @ $3 . > $4 VERP rewrite it using $u macro and add VERP string for failsafe R $* - < @ $* . > $* VERP $: $1 < @ $2 . > $3 if $u wasn't defined rewrite the address back R $* - < $+ @ $+ > < @ $* . > $* VERP $: $(dequote $1 "-" $2 "=" $3 $) < @ $4 . > $5 replace the "@" in rcpt address with "=" R $* - $+ @ $+ < @ $* . > $* VERP $: $(dequote $1 "-" $2 "=" $3 $) < @ $4 . > $5 replace the "@" in rcpt address with "=" Finally we need to rewrite the mailer definition for the used mailer (typically esmtp) specifying VerpEnvFromSMTP as the sender rewrite ruleset: MAILER_DEFINITIONS Mesmtp, P=[IPC], F=mDFMuXa, S=VerpEnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n, L=990, T=DNS/RFC822/SMTP, A=TCP $h NOTE: for mailing list servers it's also a good idea keeping existing Delivered-To headers, sendmail needs the following patch for doing this --- sendmail/conf.c.orig 2004-07-14 21:54:23.000000000 +0000 +++ sendmail/conf.c 2004-12-06 15:22:05.000000000 +0000 @@ -117,6 +117,7 @@ { "content-length", H_ACHECK, NULL }, { "subject", H_ENCODABLE, NULL }, { "x-authentication-warning", H_FORCE, NULL }, + { "delivered-to", H_FORCE, NULL }, { NULL, 0, NULL } }; Andrea Barisani mlmmj-1.2.18.0/src/000755 000765 000120 00000000000 11761151615 013541 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/TODO000644 000765 000120 00000000544 11416076474 013453 0ustar00benadmin000000 000000 Code cleanup: o Make RECIPDELIM configurable (compile and/or runtime) o Add some more logging to mlmmj-maintd--actually we have to rethink logging a bit. We want to log everything to syslog/mlmmj. Functionality items: o control/preexec and control/postexec. Nice to do: o Add memory debugging features ("At exit you had the following allocated:") mlmmj-1.2.18.0/TUNABLES000644 000765 000120 00000020671 11761150110 014105 0ustar00benadmin000000 000000 TUNABLES for lists managed with mlmmj: -------------------------------------- The following files can be used for changing the behaviour of a list. The filename is supposed to be below listdir/control. In the case it's a "boolean", the contents of a file does not matter, the mere presence of it, will set the variable to "true". If it's a "normal" file, the first line will be used as value, leaving line 2 and forward ready for commentary etc. If it's possible to specify several entries (one pr. line), it's marked "list". If the file's entire content is used as value, it's marked "text". · listaddress (list) This file contains all addresses which mlmmj sees as listaddresses (see tocc below). The first one is the one used as the primary one, when mlmmj sends out mail. · closedlist (boolean) Is the list is open or closed. If it's closed subscription and unsubscription via mail is disabled. · closedlistsub (boolean) Closed for subscription. Unsubscription is possible. · moderated (boolean) If this file is present, the emailaddresses in the file listdir/control/moderators will act as moderators for the list. · submod (list) If this file is present, subscription will be moderated by owner(s). If there are emailaddresses in this file, then these will be used instead of owner. · tocc (boolean) If this file is present, the list address does not have to be in the To: or Cc: header of the email to the list. · subonlypost (boolean) When this file is present, only people who are subscribed to the list, are allowed to post to it. The check is made against the "From:" header. · modnonsubposts (boolean) When this file is present, all postings from people who are not subscribed to the list will be moderated. · prefix (normal) The prefix for the Subject: line of mails to the list. This will alter the Subject: line, and add a prefix if it's not present elsewhere. · owner (list) The emailaddresses in this file (1 pr. line) will get mails to listname+owner@listdomain.tld · customheaders (list) These headers are added to every mail coming through. This is the place you want to add Reply-To: header in case you want such. · delheaders (list) In this file is specified *ONE* headertoken to match pr. line. If the file consists of: Received: Message-ID: Then all occurences of these headers in incoming list mail will be deleted. "From " and "Return-Path:" are deleted no matter what. · access (list) If this file exists, all headers of a post to the list is matched against the rules. The first rule to match wins. See README.access for syntax and examples. · memorymailsize (normal) Here is specified in bytes how big a mail can be and still be prepared for sending in memory. It's greatly reducing the amount of write system calls to prepare it in memory before sending it, but can also lead to denial of service attacks. Default is 16k (16384 bytes). · addtohdr (boolean) When this file is present, a To: header including the recipients emailaddress will be added to outgoing mail. Recommended usage is to remove existing To: headers with delheaders (see above) first. · relayhost (normal) The host specified (IP address or hostname, both works) in this file will be used for relaying the mail sent to the list. Defaults to 127.0.0.1. · notifysub (boolean) If this file is present, the owner(s) will get a mail with the address of someone sub/unsubscribing to a mailinglist. · notifymod (boolean) If this file is present, the poster (based on the envelope from) will get a mail when their post is being moderated. · digestinterval (normal) This file specifies how many seconds will pass before the next digest is sent. Defaults to 604800 seconds, which is 7 days. · digestmaxmails (normal) This file specifies how many mails can accumulate before digest sending is triggered. Defaults to 50 mails, meaning that if 50 mails arrive to the list before digestinterval have passed, the digest is delivered. · bouncelife (normal) Here is specified for how long time in seconds an address can bounce before it's unsubscribed. Defaults to 432000 seconds, which is 5 days. · noarchive (boolean) If this file exists, the mail won't be saved in the archive but simply deleted. · nosubconfirm (boolean) If this file exists, no mail confirmation is needed to subscribe to the list. This should in principle never ever be used, but there is times on local lists etc. where this is useful. HANDLE WITH CARE! · noget (boolean) If this file exists, then retrieving old posts with +get-N is disabled · subonlyget (boolean) If this file exists, then retrieving old posts with +get-N is only possible for subscribers. The above mentioned 'noget' have precedence. · verp (normal) Control how Mlmmj does VERP (variable envelope return path). If this tunable does not exist, Mlmmj will send a message to the SMTP server for each recipient, with an appropriate envelope return path, i.e. it will handle VERP itself. If the tunable does exist, Mlmmj will instead divide the recipients into groups (the maximum number of recipients in a group can be controlled by the maxverprecips tunable) and send one message to the SMTP server per group. The content of this tunable allows VERP to be handled by the SMTP server. If the tunable contains "postfix", Mlmmj will make Postfix use VERP by adding XVERP=-= to the MAIL FROM: line. If it contains something else, that text will be appended to the MAIL FROM: line. If it contains nothing, VERP will effectively be disabled, as neither Mlmmj nor the SMTP server will do it. · maxverprecips (normal) How many recipients per mail delivered to the SMTP server. Defaults to 100. · notoccdenymails (boolean) · noaccessdenymails (boolean) · nosubonlydenymails (boolean) These switches turns off whether mlmmj sends out notification about postings being denied due to the listaddress not being in To: or Cc: (see 'tocc'), when it was rejected due to an access rule (see 'access') or whether it's a subscribers only posting list (see 'subonlypost'). · nosubmodmails (boolean) This switch turns off whether mlmmj sends out notification about subscription being moderated to the person requesting subscription (see 'submod'). · smtpport (normal) In this file a port other than port 25 for connecting to the relayhost can be specified. · delimiter (normal) This specifies what to use as recipient delimiter for the list. Default is "+". · nodigesttext (boolean) If this file exists, digest mails won't have a text part with a thread summary. · nodigestsub (boolean) If this file exists, subscription to the digest version of the mailinglist will be denied. (Useful if you don't want to allow digests and notify users about it). · nonomailsub (boolean) If this file exists, subscription to the nomail version of the mailinglist will be denied. (Useful if you don't want to allow nomail and notify users about it). · maxmailsize (normal) With this option the maximal allowed size of incoming mails can be specified. · nomaxmailsizedenymails (boolean) If this is set, no reject notifications caused by violation of maxmailsize will be sent. · nolistsubsemail (boolean) If this is set, the LISTNAME+list@ functionality for requesting an email with the subscribers for owner is disabled. · staticbounceaddr (normal) If this is set to something@example.org, the bounce address (Return-Path:) will be fixed to something+listname-bounces-and-so-on@example.org in case you need to disable automatic bounce handling. · ifmodsendonlymodmoderate (boolean) If this file is present, then mlmmj in case of moderation checks the envelope from, to see if the sender is a moderator, and in that case only send the moderation mails to that address. In practice this means that a moderator sending mail to the list won't bother all the other moderators with his mail. · footer (text) The content of this file is appended to mail sent to the list. · notmetoo (boolean) If this file is present, mlmmj attempts to exclude the sender of a post from the distribution list for that post so people don't receive copies of their own posts. mlmmj-1.2.18.0/UPGRADE000644 000765 000120 00000003627 11761151156 013774 0ustar00benadmin000000 000000 This applies to everyone using Mlmmj < 1.2.18.0: ------------------------------------------------ Updating the list texts is optional but highly recommended, as they have been vastly improved for this version. Users of the php-admin interface need to modify configuration files to define $confdir. Be aware of the following new features you may wish to turn on or use: - Richer list texts (including a new naming scheme, conditionals, automatic wrapping and true UTF-8 support). See README.listtexts for more details. - Notifying posters when their posts are being moderated (notifymod tunable). - Not-me-too feature to avoid having the poster receiving their own messages (notmetoo tunable). - Ability to explicitly reject posts (exposed in new list texts). - Ability to explicitly obstruct subscriptions (exposed in new list texts). - Unsubscribe from all versions of a list at once (changed behaviour of +unsubscribe[-{digest|nomail}]; they now all remove the subscriber from all versions of the list). - Ability to switch between different versions of a list by using +subscribe[-{digest|nomail|both}] ('both' means normal and digest, and is a 'hidden feature' not mentioned in the supplied list texts). - Subscription ability in php-admin. This applies to everyone using mlmmj < 1.1.0: --------------------------------------------- Don't forget to upgrade the listtexts. Listtext handling was completely rewritten and the subject is now translateable as well. Don't forget to create the new directories needed for digest and nomail version of the list. listdir/subcribers.d and listdir/nomailsubs.d This applies to everyone using mlmmj < 0.8.3: --------------------------------------------- Don't forget to upgrade the listtexts! This applies to everyone using mlmmj > 0.7.2: --------------------------------------------- Don't forget to add the emailaddress of the list owner in listdir/control/owner mlmmj-1.2.18.0/VERSION000644 000765 000120 00000000011 11761151234 014007 0ustar00benadmin000000 000000 1.2.18.0 mlmmj-1.2.18.0/src/checkwait_smtpreply.c000644 000765 000120 00000005330 11727635244 017776 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include "checkwait_smtpreply.h" #include "config.h" #include "memory.h" #include "mygetline.h" char *checkwait_smtpreply(int sockfd, int replytype) { char *smtpreply; smtpreply = mygetline(sockfd); if(smtpreply == NULL) { /* This will never be a valid SMTP response so will always be returned, * but is more descriptive than an empty string. */ smtpreply = mystrdup("none / error / closed connection"); } #if 0 printf("replytype = [%d], smtpreply = [%s]\n", replytype, smtpreply); fprintf(stderr, "%s", smtpreply); #endif /* This case might seem like (and is ATM) total overkill. But it's * easy for us to extend it later on if needed. */ switch(replytype) { case MLMMJ_CONNECT: if(smtpreply[0] != '2' || smtpreply[1] != '2') return smtpreply; break; case MLMMJ_HELO: if(smtpreply[0] != '2' || smtpreply[1] != '5') return smtpreply; break; case MLMMJ_FROM: if(smtpreply[0] != '2' || smtpreply[1] != '5') return smtpreply; break; case MLMMJ_RCPTTO: if(smtpreply[0] != '2' || smtpreply[1] != '5') return smtpreply; break; case MLMMJ_DATA: if(smtpreply[0] != '3' || smtpreply[1] != '5') return smtpreply; break; case MLMMJ_DOT: if(smtpreply[0] != '2' || smtpreply[1] != '5') return smtpreply; break; case MLMMJ_QUIT: if(smtpreply[0] != '2' || smtpreply[1] != '2') return smtpreply; break; case MLMMJ_RSET: if(smtpreply[0] != '2' || smtpreply[1] != '5') return smtpreply; break; default: break; } myfree(smtpreply); return NULL; } mlmmj-1.2.18.0/src/chomp.c000644 000765 000120 00000002667 11727635244 015035 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include "chomp.h" char *chomp(char *str) { size_t i; if(str == NULL) return NULL; if(*str == '\0' || *str == '\n' || *str == '\r') { *str = '\0'; return str; } i = strlen(str) - 1; while((str[i] == '\n') || (str[i] == '\r')) { str[i] = 0; i--; } return str; } mlmmj-1.2.18.0/src/ctrlvalue.c000644 000765 000120 00000004466 11727635244 015727 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include "strgen.h" #include "ctrlvalue.h" #include "mygetline.h" #include "chomp.h" #include "memory.h" static char *ctrlval(const char *listdir, const char *subdir, const char *ctrlstr, int oneline) { char *filename, *value = NULL; int ctrlfd, i; if(listdir == NULL) return NULL; filename = concatstr(5, listdir, "/", subdir, "/", ctrlstr); ctrlfd = open(filename, O_RDONLY); myfree(filename); if(ctrlfd < 0) return NULL; if (oneline) { value = mygetline(ctrlfd); chomp(value); } else { value = mygetcontent(ctrlfd); i = strlen(value) - 1; if (i >= 0 && value[i] == '\n') { value[i] = '\0'; i--; } if (i >= 0 && value[i] == '\r') { value[i] = '\0'; i--; } } close(ctrlfd); return value; } char *ctrlvalue(const char *listdir, const char *ctrlstr) { return ctrlval(listdir, "control", ctrlstr, 1); } char *ctrlcontent(const char *listdir, const char *ctrlstr) { return ctrlval(listdir, "control", ctrlstr, 0); } char *textcontent(const char *listdir, const char *ctrlstr) { return ctrlval(listdir, "text", ctrlstr, 0); } mlmmj-1.2.18.0/src/ctrlvalues.c000644 000765 000120 00000004021 11727635244 016075 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include "strgen.h" #include "ctrlvalues.h" #include "mygetline.h" #include "chomp.h" #include "mlmmj.h" #include "memory.h" struct strlist *ctrlvalues(const char *listdir, const char *ctrlstr) { struct strlist *ret; char *filename = concatstr(3, listdir, "/control/", ctrlstr); char *value; int ctrlfd; ctrlfd = open(filename, O_RDONLY); myfree(filename); if(ctrlfd < 0) return NULL; ret = mymalloc(sizeof(struct strlist)); ret->count = 0; ret->strs = NULL; while((value = mygetline(ctrlfd)) != NULL) { chomp(value); /* Ignore empty lines */ if (*value == '\0') continue; ret->count++; ret->strs = (char **) myrealloc(ret->strs, sizeof(char *) * (ret->count + 1)); ret->strs[ret->count-1] = value; ret->strs[ret->count] = NULL; } close(ctrlfd); return ret; } mlmmj-1.2.18.0/src/do_all_the_voodoo_here.c000644 000765 000120 00000011731 11727635244 020401 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include "mlmmj.h" #include "mygetline.h" #include "gethdrline.h" #include "strgen.h" #include "chomp.h" #include "ctrlvalue.h" #include "do_all_the_voodoo_here.h" #include "log_error.h" #include "wrappers.h" #include "memory.h" int findit(const char *line, const char **headers) { int i = 0; size_t len; while(headers[i]) { len = strlen(headers[i]); if(strncasecmp(line, headers[i], len) == 0) return 1; i++; } return 0; } void getinfo(const char *line, struct mailhdr *readhdrs) { int i = 0; size_t tokenlen, linelen, valuelen; while(readhdrs[i].token) { tokenlen = strlen(readhdrs[i].token); linelen = strlen(line); if(strncasecmp(line, readhdrs[i].token, tokenlen) == 0) { readhdrs[i].valuecount++; valuelen = linelen - tokenlen + 1; readhdrs[i].values = (char **)myrealloc(readhdrs[i].values, readhdrs[i].valuecount * sizeof(char *)); readhdrs[i].values[readhdrs[i].valuecount - 1] = (char *)mymalloc(valuelen + 1); strncpy(readhdrs[i].values[readhdrs[i].valuecount - 1], line+tokenlen, valuelen); chomp(readhdrs[i].values[readhdrs[i].valuecount - 1]); } i++; } } int do_all_the_voodoo_here(int infd, int outfd, int hdrfd, int footfd, const char **delhdrs, struct mailhdr *readhdrs, struct strlist *allhdrs, const char *prefix) { char *hdrline, *subject, *unqp; int hdrsadded = 0; int subject_present = 0; allhdrs->count = 0; allhdrs->strs = NULL; while((hdrline = gethdrline(infd))) { /* Done with headers? Then add extra if wanted*/ if((strncasecmp(hdrline, "mime", 4) == 0) || ((strlen(hdrline) == 1) && (hdrline[0] == '\n'))){ /* add extra headers */ if(!hdrsadded && hdrfd >= 0) { if(dumpfd2fd(hdrfd, outfd) < 0) { log_error(LOG_ARGS, "Could not " "add extra headers"); myfree(hdrline); return -1; } else hdrsadded = 1; } fsync(outfd); /* end of headers, write single LF */ if(hdrline[0] == '\n') { /* but first add Subject if none is present * and a prefix is defined */ if (prefix && !subject_present) { subject = concatstr(3, "Subject: ", prefix, "\n"); writen(outfd, subject, strlen(subject)); myfree(subject); subject_present = 1; } if(writen(outfd, hdrline, strlen(hdrline)) < 0) { myfree(hdrline); log_error(LOG_ARGS, "Error writing hdrs."); return -1; } myfree(hdrline); break; } } /* Do we want info from hdrs? Get it before it's gone */ if(readhdrs) getinfo(hdrline, readhdrs); /* Snatch a copy of the header */ allhdrs->count++; allhdrs->strs = myrealloc(allhdrs->strs, sizeof(char *) * (allhdrs->count + 1)); allhdrs->strs[allhdrs->count-1] = mystrdup(hdrline); allhdrs->strs[allhdrs->count] = NULL; /* XXX why, why, why? */ /* Add Subject: prefix if wanted */ if(prefix) { if(strncasecmp(hdrline, "Subject:", 8) == 0) { subject_present = 1; unqp = cleanquotedp(hdrline + 8); if(strstr(hdrline + 8, prefix) == NULL && strstr(unqp, prefix) == NULL) { subject = concatstr(3, "Subject: ", prefix, hdrline + 8); writen(outfd, subject, strlen(subject)); myfree(subject); myfree(hdrline); myfree(unqp); continue; } myfree(unqp); } } /* Should it be stripped? */ if(delhdrs) { if(!findit(hdrline, delhdrs)) writen(outfd, hdrline, strlen(hdrline)); } else writen(outfd, hdrline, strlen(hdrline)); myfree(hdrline); } /* Just print the rest of the mail */ if(dumpfd2fd(infd, outfd) < 0) { log_error(LOG_ARGS, "Error when dumping rest of mail"); return -1; } /* No more, lets add the footer if one */ if(footfd >= 0) if(dumpfd2fd(footfd, outfd) < 0) { log_error(LOG_ARGS, "Error when adding footer"); return -1; } fsync(outfd); return 0; } mlmmj-1.2.18.0/src/dumpfd2fd.c000644 000765 000120 00000003131 11414633671 015560 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include "wrappers.h" #define DUMPBUF 4096 int dumpfd2fd(int infd, int outfd) { size_t n; char buf[DUMPBUF]; while((n = read(infd, &buf, sizeof(buf))) != 0) { if(n < 0) { if(errno == EINTR) continue; else return -1; /* Caller can check errno */ } if(writen(outfd, &buf, n) < 0) return -1; /* Caller can check errno */ } return 0; } mlmmj-1.2.18.0/src/find_email_adr.c000644 000765 000120 00000012715 11727635244 016637 0ustar00benadmin000000 000000 /* Some crap from BSD mail to parse email addresses. * * Neale Pickett stole these functions from FreeBSD * ports, and reformatted them to use mlmmj's coding style. The * original functions (skip_comment and skin) had the following * copyright notice: */ /* * Copyright (c) 1980, 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. */ #include #include #include #include "find_email_adr.h" #include "memory.h" /* * Start of a "comment". * Ignore it. */ static char * skip_comment(char *cp) { int nesting = 1; for (; nesting > 0 && *cp; cp++) { switch (*cp) { case '\\': if (cp[1]) cp++; break; case '(': nesting++; break; case ')': nesting--; break; } } return (cp); } /* * Skin an arpa net address according to the RFC 822 interpretation * of "host-phrase." */ static char *skin(char *name) { char *nbuf, *bufend, *cp, *cp2; int c, gotlt, lastsp; if (name == NULL) return (NULL); /* We assume that length(input) <= length(output) */ nbuf = mymalloc(strlen(name) + 1); if (strchr(name, '(') == NULL && strchr(name, '<') == NULL && strchr(name, ' ') == NULL) { strcpy(nbuf, name); return (nbuf); } gotlt = 0; lastsp = 0; bufend = nbuf; for (cp = name, cp2 = bufend; (c = *cp++) != '\0'; ) { switch (c) { case '(': cp = skip_comment(cp); lastsp = 0; break; case '"': /* * Start of a "quoted-string". * Copy it in its entirety. */ while ((c = *cp) != '\0') { cp++; if (c == '"') break; if (c != '\\') *cp2++ = c; else if ((c = *cp) != '\0') { *cp2++ = c; cp++; } } lastsp = 0; break; case ' ': if (cp[0] == 'a' && cp[1] == 't' && cp[2] == ' ') cp += 3, *cp2++ = '@'; else if (cp[0] == '@' && cp[1] == ' ') cp += 2, *cp2++ = '@'; else lastsp = 1; break; case '<': cp2 = bufend; gotlt++; lastsp = 0; break; case '>': if (gotlt) { gotlt = 0; while ((c = *cp) != '\0' && c != ',') { cp++; if (c == '(') cp = skip_comment(cp); else if (c == '"') while ((c = *cp) != '\0') { cp++; if (c == '"') break; if (c == '\\' && *cp != '\0') cp++; } } lastsp = 0; break; } /* FALLTHROUGH */ default: if (lastsp) { lastsp = 0; *cp2++ = ' '; } *cp2++ = c; if (c == ',' && *cp == ' ' && !gotlt) { *cp2++ = ' '; while (*++cp == ' ') ; lastsp = 0; bufend = cp2; } } } *cp2 = '\0'; nbuf = (char *)myrealloc(nbuf, strlen(nbuf) + 1); return (nbuf); } struct email_container *find_email_adr(const char *str, struct email_container *retstruct) { char *c1 = NULL, *c2 = NULL; char *p; char *s; s = (char *)mymalloc(strlen(str) + 1); strcpy(s, str); p = s; while(p) { char *adr; char *cur; cur = p; oncemore: p = strchr(p, ','); if (p) { /* If there's a comma, replace it with a NUL, so * cur will only have one address in it. Except * it's not in ""s */ c1 = strchr(cur, '"'); if(c1) { c2 = strchr(c1+1, '"'); } if(c2) { if(*(c2-1) == '\\') { *c2 = ' '; c2 = NULL; goto oncemore; } } if((c1 == NULL) || (c1 > p) || (c2 && c2 < p)) { *p = '\0'; p += 1; } else { *p = ' '; goto oncemore; } } while(cur && ((' ' == *cur) || ('\t' == *cur) || ('\r' == *cur) || ('\n' == *cur))) { cur += 1; } if ('\0' == *cur) { continue; } adr = skin(cur); if (adr) { retstruct->emailcount++; retstruct->emaillist = (char **)myrealloc(retstruct->emaillist, sizeof(char *) * retstruct->emailcount); retstruct->emaillist[retstruct->emailcount-1] = adr; } } myfree(s); return retstruct; } mlmmj-1.2.18.0/src/getaddrsfromfd.c000644 000765 000120 00000002623 11727635244 016712 0ustar00benadmin000000 000000 #include #include #include #include #include #include "mlmmj.h" #include "log_error.h" #include "memory.h" #include "strgen.h" #include "getaddrsfromfd.h" off_t getaddrsfromfd(struct strlist *slist, int fd, int max) { off_t offset = lseek(fd, 0, SEEK_CUR); char *start, *cur, *next; struct stat st; size_t len; if(fstat(fd, &st) < 0) { log_error(LOG_ARGS, "Could not fstat fd"); return -1; } /* mmap of 0-bytes is invalid */ if(st.st_size == 0) { return 0; } start = mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); if(start == MAP_FAILED) { log_error(LOG_ARGS, "Could not mmap fd"); return -1; } for(next = cur = (start + offset); next < start + st.st_size; next++) { if(*next == '\n' || next == start + st.st_size - 1) { slist->count++; len = next - cur; if(next == start + st.st_size - 1 && *next != '\n') len++; slist->strs = (char **)myrealloc(slist->strs, sizeof(char *) * slist->count); slist->strs[slist->count - 1] = mymalloc(len + 1); strncpy(slist->strs[slist->count - 1], cur, len); slist->strs[slist->count - 1][len] = '\0'; cur = next + 1; } else { continue; } if(slist->count >= max) { offset = (off_t)(cur - start); goto donegetting; } } offset = st.st_size; donegetting: munmap(start, st.st_size); lseek(fd, offset, SEEK_SET); return st.st_size - offset; } mlmmj-1.2.18.0/src/gethdrline.c000644 000765 000120 00000004477 11727635244 016055 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * Copyright (C) 2006 Morten K. Poulsen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include "mygetline.h" #include "gethdrline.h" #include "strgen.h" #include "memory.h" #include "wrappers.h" #include "log_error.h" char *gethdrline(int fd) { char *line = NULL, *retstr = NULL, *oldretstr = NULL; char ch; ssize_t n; retstr = mygetline(fd); if (!retstr) { return NULL; } /* do not attempt to unfold the end-of-headers marker */ if (retstr[0] == '\n') return retstr; for(;;) { /* look-ahead one char to determine if we need to unfold */ n = readn(fd, &ch, 1); if (n == 0) { /* end of file, and therefore also headers */ return retstr; } else if (n == -1) { /* error */ log_error(LOG_ARGS, "readn() failed in gethdrline()"); myfree(retstr); return NULL; } if (lseek(fd, -1, SEEK_CUR) == (off_t)-1) { log_error(LOG_ARGS, "lseek() failed in gethdrline()"); myfree(retstr); return NULL; } if ((ch != '\t') && (ch != ' ')) /* no more unfolding */ return retstr; oldretstr = retstr; line = mygetline(fd); if (!line) { return retstr; } retstr = concatstr(2, oldretstr, line); myfree(oldretstr); myfree(line); } } mlmmj-1.2.18.0/src/getlistaddr.c000644 000765 000120 00000003752 11414633671 016224 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include "getlistaddr.h" #include "chomp.h" #include "log_error.h" #include "mygetline.h" #include "strgen.h" #include "memory.h" char *getlistaddr(const char *listdir) { char *tmpstr; int listnamefd; tmpstr = concatstr(2, listdir, "/control/listaddress");; if((listnamefd = open(tmpstr, O_RDONLY)) < 0) { log_error(LOG_ARGS, "Could not open '%s'", tmpstr); exit(EXIT_FAILURE); } myfree(tmpstr); tmpstr = mygetline(listnamefd); if(tmpstr == NULL){ log_error(LOG_ARGS, "FATAL. Could not get listaddress " "in %s/control/listaddress", listdir); exit(EXIT_FAILURE); } if(strchr(tmpstr, '@') == NULL) { log_error(LOG_ARGS, "FATAL. No @ sign in listaddress"); exit(EXIT_FAILURE); } chomp(tmpstr); close(listnamefd); return tmpstr; } mlmmj-1.2.18.0/src/getlistdelim.c000644 000765 000120 00000004036 11414633671 016400 0ustar00benadmin000000 000000 /* Copyright 2005 Joel Aelwyn * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS+ * IN THE SOFTWARE. */ #include #include #include #include #include #include "mlmmj.h" #include "getlistdelim.h" #include "chomp.h" #include "log_error.h" #include "mygetline.h" #include "strgen.h" #include "memory.h" char *getlistdelim(const char *listdir) { char *delimfn, *delimstr; int delimfd; delimfn = concatstr(2, listdir, "/control/delimiter"); if(-1 != (delimfd = open(delimfn, O_RDONLY))){ delimstr = mygetline(delimfd); close(delimfd); if(NULL == delimstr){ log_error(LOG_ARGS, "FATAL. Could not get list delimiter from %s", delimfn); myfree(delimfn); exit(EXIT_FAILURE); } chomp(delimstr); if(0 == strlen(delimstr)){ log_error(LOG_ARGS, "FATAL. Zero-length delimiter found from %s", delimfn); myfree(delimfn); exit(EXIT_FAILURE); } } else delimstr = mystrdup(DEFAULT_RECIPDELIM); myfree(delimfn); return delimstr; } mlmmj-1.2.18.0/src/incindexfile.c000644 000765 000120 00000004474 11414633671 016361 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include "wrappers.h" #include "mylocking.h" #include "incindexfile.h" #include "itoa.h" #include "log_error.h" #include "strgen.h" #include "memory.h" #define INTBUF_SIZE 32 int incindexfile(const char *listdir) { int fd, lock; long int index = 0; char intbuf[INTBUF_SIZE] = "uninitialized"; size_t i; char *indexfilename; indexfilename = concatstr(2, listdir, "/index"); fd = open(indexfilename, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR); if(fd == -1) { myfree(indexfilename); log_error(LOG_ARGS, "Error opening index file"); return 0; } lock = myexcllock(fd); if(lock) { myfree(indexfilename); log_error(LOG_ARGS, "Error locking index file"); close(fd); return 0; } readn(fd, intbuf, INTBUF_SIZE); for(i=0; i '9') { intbuf[i] = '\0'; break; } } index = atol(intbuf); index++; itoa(index, intbuf); lseek(fd, 0, SEEK_SET); writen(fd, intbuf, strlen(intbuf)); close(fd); /* Lock is also released */ myfree(indexfilename); return index; } mlmmj-1.2.18.0/src/init_sockfd.c000644 000765 000120 00000004144 11727635244 016213 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include "init_sockfd.h" #include "log_error.h" void init_sockfd(int *sockfd, const char *relayhost, unsigned short port) { int len, on; struct sockaddr_in addr; if (getenv("MLMMJ_TESTING")) { relayhost = "127.0.0.1"; port = 10025; } *sockfd = socket(PF_INET, SOCK_STREAM, 0); if(*sockfd == -1) { log_error(LOG_ARGS, "Could not get socket"); return; } addr.sin_family = PF_INET; addr.sin_addr.s_addr = inet_addr(relayhost); addr.sin_port = htons(port); len = sizeof(addr); if(connect(*sockfd, (struct sockaddr *)&addr, len) == -1) { log_error(LOG_ARGS, "Could not connect to %s", relayhost); close(*sockfd); *sockfd = -1; return; } on = 1; if(setsockopt(*sockfd, SOL_SOCKET, SO_KEEPALIVE, (void *)&on, sizeof(on)) < 0) log_error(LOG_ARGS, "Could not set SO_KEEPALIVE"); } mlmmj-1.2.18.0/src/itoa.c000644 000765 000120 00000003026 11414633671 014644 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include "itoa.h" void reversestr(char *str) { char c; int i, j; for(i = 0, j = strlen(str) - 1; i < j; i++, j--) { c = str[i]; str[i] = str[j]; str[j] = c; } } void itoa(int n, char *str) { int i, sign; if((sign = n) < 0) n = -n; i = 0; do { str[i++] = n % 10 + '0'; } while((n /= 10) > 0); if(sign < 0) str[i++] = '-'; str[i] = 0; reversestr(str); } mlmmj-1.2.18.0/src/listcontrol.c000644 000765 000120 00000062326 11734220454 016270 0ustar00benadmin000000 000000 /* Copyright (C) 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "listcontrol.h" #include "find_email_adr.h" #include "getlistdelim.h" #include "strgen.h" #include "prepstdreply.h" #include "send_help.h" #include "send_list.h" #include "log_error.h" #include "statctrl.h" #include "mygetline.h" #include "chomp.h" #include "memory.h" #include "log_oper.h" #include "ctrlvalues.h" #include "subscriberfuncs.h" enum ctrl_e { CTRL_SUBSCRIBE_DIGEST, CTRL_SUBSCRIBE_NOMAIL, CTRL_SUBSCRIBE_BOTH, CTRL_SUBSCRIBE, CTRL_CONFSUB_DIGEST, CTRL_CONFSUB_NOMAIL, CTRL_CONFSUB_BOTH, CTRL_CONFSUB, CTRL_UNSUBSCRIBE_DIGEST, CTRL_UNSUBSCRIBE_NOMAIL, CTRL_UNSUBSCRIBE, CTRL_CONFUNSUB_DIGEST, CTRL_CONFUNSUB_NOMAIL, CTRL_CONFUNSUB, CTRL_BOUNCES, CTRL_RELEASE, CTRL_REJECT, CTRL_PERMIT, CTRL_OBSTRUCT, CTRL_MODERATE, CTRL_HELP, CTRL_FAQ, CTRL_GET, CTRL_LIST, CTRL_END /* end marker, must be last */ }; struct ctrl_command { char *command; unsigned int accepts_parameter; }; /* Must match the enum. CAREFUL when using commands that are substrings * of other commands. In that case the longest one have to be listed * first to match correctly. */ static struct ctrl_command ctrl_commands[] = { { "subscribe-digest", 0 }, { "subscribe-nomail", 0 }, { "subscribe-both", 0 }, { "subscribe", 0 }, { "confsub-digest", 1 }, { "confsub-nomail", 1 }, { "confsub-both", 1 }, { "confsub", 1 }, { "unsubscribe-digest", 0 }, { "unsubscribe-nomail", 0 }, { "unsubscribe", 0 }, { "confunsub-digest", 1 }, { "confunsub-nomail", 1 }, { "confunsub", 1 }, { "bounces", 1 }, { "release", 1 }, { "reject", 1 }, { "permit", 1 }, { "obstruct", 1 }, { "moderate", 1 }, { "help", 0 }, { "faq", 0 }, { "get", 1 }, { "list", 0 } }; int listcontrol(struct email_container *fromemails, const char *listdir, const char *controlstr, const char *mlmmjsub, const char *mlmmjunsub, const char *mlmmjsend, const char *mlmmjbounce, const char *mailname) { char *bouncenr, *tmpstr; char *param = NULL, *conffilename, *moderatefilename, *gatekeepfilename; char *omitfilename; char *omit = NULL; char *c, *archivefilename, *sendfilename; struct stat stbuf; int closedlist, nosubconfirm, tmpfd, noget, i, closedlistsub, subonlyget = 0; size_t cmdlen; unsigned int ctrl; struct strlist *owners; int owner_idx; text *txt; char *queuefilename; /* A closed list doesn't allow subscribtion and unsubscription */ closedlist = statctrl(listdir, "closedlist"); /* A closed list "sub" only dissallows subscription, not unsub. */ closedlistsub = statctrl(listdir, "closedlistsub"); nosubconfirm = statctrl(listdir, "nosubconfirm"); #if 0 log_error(LOG_ARGS, "controlstr = [%s]\n", controlstr); log_error(LOG_ARGS, "fromemails->emaillist[0] = [%s]\n", fromemails->emaillist[0]); #endif for (ctrl=0; ctrlemailcount != 1 && ctrl != CTRL_BOUNCES) { errno = 0; log_error(LOG_ARGS, "Ignoring mail with invalid From: " "which was not a bounce"); return -1; } /* We only need the control mail when bouncing, to save bounced msg */ if(ctrl != CTRL_BOUNCES) unlink(mailname); switch (ctrl) { /* listname+subscribe-digest@domain.tld */ case CTRL_SUBSCRIBE_DIGEST: if (closedlist || closedlistsub) { errno = 0; log_error(LOG_ARGS, "A subscribe-digest request was" " sent to a closed list. Ignoring mail"); return -1; } if (!strchr(fromemails->emaillist[0], '@')) { /* Not a valid From: address */ errno = 0; log_error(LOG_ARGS, "A subscribe-digest request was" " sent with an invalid From: header." " Ignoring mail"); return -1; } if (statctrl(listdir, "nodigestsub")) { errno = 0; log_error(LOG_ARGS, "A subscribe-digest request was" " denied"); txt = open_text(listdir, "deny", "sub", "disabled", "digest", "sub-deny-digest"); MY_ASSERT(txt); register_unformatted(txt, "subaddr", fromemails->emaillist[0]); queuefilename = prepstdreply(txt, listdir, "$listowner$", fromemails->emaillist[0], NULL); MY_ASSERT(queuefilename); close_text(txt); send_help(listdir, queuefilename, fromemails->emaillist[0], mlmmjsend); return -1; } log_oper(listdir, OPLOGFNAME, "mlmmj-sub: request for digest" " subscription from %s", fromemails->emaillist[0]); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", fromemails->emaillist[0], "-d", "-r", "-c", (nosubconfirm ? (char *)NULL : "-C"), (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsub); exit(EXIT_FAILURE); break; /* listname+subscribe-nomail@domain.tld */ case CTRL_SUBSCRIBE_NOMAIL: if (closedlist || closedlistsub) { errno = 0; log_error(LOG_ARGS, "A subscribe-nomail request was" " sent to a closed list. Ignoring mail"); return -1; } if (!strchr(fromemails->emaillist[0], '@')) { /* Not a valid From: address */ errno = 0; log_error(LOG_ARGS, "A subscribe-nomail request was" " sent with an invalid From: header." " Ignoring mail"); return -1; } if (statctrl(listdir, "nonomailsub")) { errno = 0; log_error(LOG_ARGS, "A subscribe-nomail request was" " denied"); txt = open_text(listdir, "deny", "sub", "disabled", "nomail", "sub-deny-nomail"); MY_ASSERT(txt); register_unformatted(txt, "subaddr", fromemails->emaillist[0]); queuefilename = prepstdreply(txt, listdir, "$listowner$", fromemails->emaillist[0], NULL); MY_ASSERT(queuefilename); close_text(txt); send_help(listdir, queuefilename, fromemails->emaillist[0], mlmmjsend); return -1; } log_oper(listdir, OPLOGFNAME, "mlmmj-sub: request for nomail" " subscription from %s", fromemails->emaillist[0]); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", fromemails->emaillist[0], "-n", "-r", "-c", (nosubconfirm ? (char *)NULL : "-C"), (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsub); exit(EXIT_FAILURE); break; /* listname+subscribe-both@domain.tld */ case CTRL_SUBSCRIBE_BOTH: if (closedlist || closedlistsub) { errno = 0; log_error(LOG_ARGS, "A subscribe-both request was" " sent to a closed list. Ignoring mail"); return -1; } if (!strchr(fromemails->emaillist[0], '@')) { /* Not a valid From: address */ errno = 0; log_error(LOG_ARGS, "A subscribe-both request was" " sent with an invalid From: header." " Ignoring mail"); return -1; } if (statctrl(listdir, "nodigestsub")) { errno = 0; log_error(LOG_ARGS, "A subscribe-both request was" " denied"); txt = open_text(listdir, "deny", "sub", "disabled", "both", "sub-deny-digest"); MY_ASSERT(txt); register_unformatted(txt, "subaddr", fromemails->emaillist[0]); queuefilename = prepstdreply(txt, listdir, "$listowner$", fromemails->emaillist[0], NULL); MY_ASSERT(queuefilename); close_text(txt); send_help(listdir, queuefilename, fromemails->emaillist[0], mlmmjsend); return -1; } log_oper(listdir, OPLOGFNAME, "mlmmj-sub: request for both" " subscription from %s", fromemails->emaillist[0]); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", fromemails->emaillist[0], "-b", "-r", "-c", (nosubconfirm ? (char *)NULL : "-C"), (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsub); exit(EXIT_FAILURE); break; /* listname+subscribe@domain.tld */ case CTRL_SUBSCRIBE: if (closedlist || closedlistsub) { errno = 0; log_error(LOG_ARGS, "A subscribe request was" " sent to a closed list. Ignoring mail"); return -1; } if (!strchr(fromemails->emaillist[0], '@')) { /* Not a valid From: address */ errno = 0; log_error(LOG_ARGS, "A subscribe request was" " sent with an invalid From: header." " Ignoring mail"); return -1; } log_oper(listdir, OPLOGFNAME, "mlmmj-sub: request for regular" " subscription from %s", fromemails->emaillist[0]); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", fromemails->emaillist[0], "-r", "-c", (nosubconfirm ? (char *)NULL : "-C"), (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsub); exit(EXIT_FAILURE); break; /* listname+subconf-digest-COOKIE@domain.tld */ case CTRL_CONFSUB_DIGEST: conffilename = concatstr(3, listdir, "/subconf/", param); myfree(param); if((tmpfd = open(conffilename, O_RDONLY)) < 0) { /* invalid COOKIE */ errno = 0; log_error(LOG_ARGS, "A subconf-digest request was" " sent with a mismatching cookie." " Ignoring mail"); return -1; } tmpstr = mygetline(tmpfd); chomp(tmpstr); close(tmpfd); unlink(conffilename); log_oper(listdir, OPLOGFNAME, "mlmmj-sub: %s confirmed" " subscription to digest", tmpstr); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", tmpstr, "-d", "-R", "-c", (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsub); exit(EXIT_FAILURE); break; /* listname+subconf-nomail-COOKIE@domain.tld */ case CTRL_CONFSUB_NOMAIL: conffilename = concatstr(3, listdir, "/subconf/", param); myfree(param); if((tmpfd = open(conffilename, O_RDONLY)) < 0) { /* invalid COOKIE */ errno = 0; log_error(LOG_ARGS, "A subconf-nomail request was" " sent with a mismatching cookie." " Ignoring mail"); return -1; } tmpstr = mygetline(tmpfd); chomp(tmpstr); close(tmpfd); unlink(conffilename); log_oper(listdir, OPLOGFNAME, "mlmmj-sub: %s confirmed" " subscription to nomail", tmpstr); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", tmpstr, "-n", "-R", "-c", (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsub); exit(EXIT_FAILURE); break; /* listname+subconf-both-COOKIE@domain.tld */ case CTRL_CONFSUB_BOTH: conffilename = concatstr(3, listdir, "/subconf/", param); myfree(param); if((tmpfd = open(conffilename, O_RDONLY)) < 0) { /* invalid COOKIE */ errno = 0; log_error(LOG_ARGS, "A subconf-both request was" " sent with a mismatching cookie." " Ignoring mail"); return -1; } tmpstr = mygetline(tmpfd); chomp(tmpstr); close(tmpfd); unlink(conffilename); log_oper(listdir, OPLOGFNAME, "mlmmj-sub: %s confirmed" " subscription to both", tmpstr); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", tmpstr, "-b", "-R", "-c", (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsub); exit(EXIT_FAILURE); break; /* listname+subconf-COOKIE@domain.tld */ case CTRL_CONFSUB: conffilename = concatstr(3, listdir, "/subconf/", param); myfree(param); if((tmpfd = open(conffilename, O_RDONLY)) < 0) { /* invalid COOKIE */ errno = 0; log_error(LOG_ARGS, "A subconf request was" " sent with a mismatching cookie." " Ignoring mail"); return -1; } tmpstr = mygetline(tmpfd); chomp(tmpstr); close(tmpfd); unlink(conffilename); log_oper(listdir, OPLOGFNAME, "mlmmj-sub: %s confirmed" " subscription to regular list", tmpstr); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", tmpstr, "-R", "-c", (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsub); exit(EXIT_FAILURE); break; /* DEPRECATED: listname+unsubscribe-digest@domain.tld */ case CTRL_UNSUBSCRIBE_DIGEST: /* DEPRECATED: listname+unsubscribe-nomail@domain.tld */ case CTRL_UNSUBSCRIBE_NOMAIL: /* listname+unsubscribe@domain.tld */ case CTRL_UNSUBSCRIBE: if (closedlist) { errno = 0; log_error(LOG_ARGS, "An unsubscribe request was" " sent to a closed list. Ignoring mail"); return -1; } if (!strchr(fromemails->emaillist[0], '@')) { /* Not a valid From: address */ errno = 0; log_error(LOG_ARGS, "An unsubscribe request was" " sent with an invalid From: header." " Ignoring mail"); return -1; } log_oper(listdir, OPLOGFNAME, "mlmmj-unsub: %s requests" " unsubscribe", fromemails->emaillist[0]); execlp(mlmmjunsub, mlmmjunsub, "-L", listdir, "-a", fromemails->emaillist[0], "-r", (nosubconfirm ? "-c" : "-C"), (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjunsub); exit(EXIT_FAILURE); break; /* listname+unsubconf-digest-COOKIE@domain.tld */ case CTRL_CONFUNSUB_DIGEST: if (closedlist) { errno = 0; log_error(LOG_ARGS, "An unsubconf-digest request was" " sent to a closed list. Ignoring mail"); return -1; } conffilename = concatstr(3, listdir, "/unsubconf/", param); myfree(param); if((tmpfd = open(conffilename, O_RDONLY)) < 0) { /* invalid COOKIE */ errno = 0; log_error(LOG_ARGS, "An unsubconf-digest request was" " sent with a mismatching cookie." " Ignoring mail"); return -1; } tmpstr = mygetline(tmpfd); close(tmpfd); chomp(tmpstr); unlink(conffilename); log_oper(listdir, OPLOGFNAME, "mlmmj-unsub: %s confirmed" " unsubscribe from digest", tmpstr); execlp(mlmmjunsub, mlmmjunsub, "-L", listdir, "-a", tmpstr, "-d", "-R", "-c", (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjunsub); exit(EXIT_FAILURE); break; /* listname+unsubconf-nomail-COOKIE@domain.tld */ case CTRL_CONFUNSUB_NOMAIL: if (closedlist) { errno = 0; log_error(LOG_ARGS, "An unsubconf-nomail request was" " sent to a closed list. Ignoring mail"); return -1; } conffilename = concatstr(3, listdir, "/unsubconf/", param); myfree(param); if((tmpfd = open(conffilename, O_RDONLY)) < 0) { /* invalid COOKIE */ errno = 0; log_error(LOG_ARGS, "An unsubconf-nomail request was" " sent with a mismatching cookie." " Ignoring mail"); return -1; } tmpstr = mygetline(tmpfd); close(tmpfd); chomp(tmpstr); unlink(conffilename); log_oper(listdir, OPLOGFNAME, "mlmmj-unsub: %s confirmed" " unsubscribe from nomail", tmpstr); execlp(mlmmjunsub, mlmmjunsub, "-L", listdir, "-a", tmpstr, "-n", "-R", "-c", (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjunsub); exit(EXIT_FAILURE); break; /* listname+unsubconf-COOKIE@domain.tld */ case CTRL_CONFUNSUB: if (closedlist) { errno = 0; log_error(LOG_ARGS, "An unsubconf request was" " sent to a closed list. Ignoring mail"); return -1; } conffilename = concatstr(3, listdir, "/unsubconf/", param); myfree(param); if((tmpfd = open(conffilename, O_RDONLY)) < 0) { /* invalid COOKIE */ errno = 0; log_error(LOG_ARGS, "An unsubconf request was" " sent with a mismatching cookie." " Ignoring mail"); return -1; } tmpstr = mygetline(tmpfd); close(tmpfd); chomp(tmpstr); unlink(conffilename); log_oper(listdir, OPLOGFNAME, "mlmmj-unsub: %s confirmed" " unsubscribe from regular list", tmpstr); execlp(mlmmjunsub, mlmmjunsub, "-L", listdir, "-a", tmpstr, "-R", "-c", (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjunsub); exit(EXIT_FAILURE); break; /* listname+bounces-INDEX-user=example.tld@domain.tld */ case CTRL_BOUNCES: bouncenr = param; c = strchr(param, '-'); if (!c) { /* Exec with dsn parsing, since the addr is missing */ execlp(mlmmjbounce, mlmmjbounce, "-L", listdir, "-m", mailname, "-n", bouncenr, "-d", (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjbounce); exit(EXIT_FAILURE); } *c++ = '\0'; execlp(mlmmjbounce, mlmmjbounce, "-L", listdir, "-a", c, "-m", mailname, "-n", bouncenr, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjbounce); exit(EXIT_FAILURE); break; /* listname+release-COOKIE@domain.tld */ case CTRL_RELEASE: /* DEPRECATED: listname+moderate-COOKIE@domain.tld */ /* DEPRECATED: listname+moderate-subscribeCOOKIE@domain.tld */ case CTRL_MODERATE: /* Subscriber moderation; DEPRECATED */ if(strncmp(param, "subscribe", 9) == 0) { tmpstr = mystrdup(param + 9); myfree(param); param = tmpstr; goto permit; } moderatefilename = concatstr(3, listdir, "/moderation/", param); if(stat(moderatefilename, &stbuf) < 0) { myfree(moderatefilename); /* no mail to moderate */ errno = 0; log_error(LOG_ARGS, "A release request was" " sent with a mismatching cookie." " Ignoring mail"); return -1; } sendfilename = concatstr(2, moderatefilename, ".sending"); /* Rename it to avoid mail being sent twice */ if(rename(moderatefilename, sendfilename) < 0) { log_error(LOG_ARGS, "Could not rename to .sending"); exit(EXIT_FAILURE); } omitfilename = concatstr(2, moderatefilename, ".omit"); if(stat(omitfilename, &stbuf) == 0) { tmpfd = open(omitfilename, O_RDONLY); if(tmpfd < 0) { log_error(LOG_ARGS, "Could not open %s", omitfilename); } else { omit = mygetline(tmpfd); close(tmpfd); chomp(omit); } unlink(omitfilename); myfree(omitfilename); } myfree(moderatefilename); log_oper(listdir, OPLOGFNAME, "%s released %s", fromemails->emaillist[0], param); if (omit != NULL) execlp(mlmmjsend, mlmmjsend, "-L", listdir, "-o", omit, "-m", sendfilename, (char *)NULL); else execlp(mlmmjsend, mlmmjsend, "-L", listdir, "-m", sendfilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); break; /* listname+reject-COOKIE@domain.tld */ case CTRL_REJECT: moderatefilename = concatstr(3, listdir, "/moderation/", param); if(stat(moderatefilename, &stbuf) < 0) { myfree(moderatefilename); /* no mail to moderate */ errno = 0; log_error(LOG_ARGS, "A reject request was" " sent with a mismatching cookie." " Ignoring mail"); return -1; } log_oper(listdir, OPLOGFNAME, "%s rejected %s", fromemails->emaillist[0], param); myfree(param); if (unlink(moderatefilename) != 0) { log_error(LOG_ARGS, "Could not unlink %s", moderatefilename); myfree(moderatefilename); exit(EXIT_FAILURE); } myfree(moderatefilename); break; /* listname+permit-COOKIE@domain.tld */ case CTRL_PERMIT: permit: gatekeepfilename = concatstr(3, listdir, "/moderation/subscribe", param); if(stat(gatekeepfilename, &stbuf) < 0) { myfree(gatekeepfilename); /* no mail to moderate */ errno = 0; log_error(LOG_ARGS, "A permit request was" " sent with a mismatching cookie." " Ignoring mail"); return -1; } log_oper(listdir, OPLOGFNAME, "%s permitted %s", fromemails->emaillist[0], param); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-m", param, "-c", (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsub); exit(EXIT_FAILURE); break; /* listname+obstruct-COOKIE@domain.tld */ case CTRL_OBSTRUCT: gatekeepfilename = concatstr(3, listdir, "/moderation/subscribe", param); if(stat(gatekeepfilename, &stbuf) < 0) { myfree(gatekeepfilename); /* no mail to moderate */ errno = 0; log_error(LOG_ARGS, "An obstruct request was" " sent with a mismatching cookie." " Ignoring mail"); return -1; } log_oper(listdir, OPLOGFNAME, "%s obstructed %s", fromemails->emaillist[0], param); myfree(param); if (unlink(gatekeepfilename) != 0) { log_error(LOG_ARGS, "Could not unlink %s", gatekeepfilename); myfree(gatekeepfilename); exit(EXIT_FAILURE); } myfree(gatekeepfilename); break; /* listname+help@domain.tld */ case CTRL_HELP: if(!strchr(fromemails->emaillist[0], '@')) { /* Not a valid From: address */ errno = 0; log_error(LOG_ARGS, "A help request was" " sent with an invalid From: header." " Ignoring mail"); return -1; } log_oper(listdir, OPLOGFNAME, "%s requested help", fromemails->emaillist[0]); txt = open_text(listdir, "help", NULL, NULL, NULL, "listhelp"); MY_ASSERT(txt); queuefilename = prepstdreply(txt, listdir, "$listowner$", fromemails->emaillist[0], NULL); MY_ASSERT(queuefilename); close_text(txt); send_help(listdir, queuefilename, fromemails->emaillist[0], mlmmjsend); break; /* listname+faq@domain.tld */ case CTRL_FAQ: if(!strchr(fromemails->emaillist[0], '@')) { /* Not a valid From: address */ errno = 0; log_error(LOG_ARGS, "A faq request was" " sent with an invalid From: header." " Ignoring mail"); return -1; } log_oper(listdir, OPLOGFNAME, "%s requested faq", fromemails->emaillist[0]); txt = open_text(listdir, "faq", NULL, NULL, NULL, "listfaq"); MY_ASSERT(txt); queuefilename = prepstdreply(txt, listdir, "$listowner$", fromemails->emaillist[0], NULL); MY_ASSERT(queuefilename); close_text(txt); send_help(listdir, queuefilename, fromemails->emaillist[0], mlmmjsend); break; /* listname+get-INDEX@domain.tld */ case CTRL_GET: noget = statctrl(listdir, "noget"); if(noget) { errno = 0; log_error(LOG_ARGS, "A get request was sent to a list" " with the noget option set. Ignoring mail"); return -1; } subonlyget = statctrl(listdir, "subonlyget"); if(subonlyget) { if(is_subbed(listdir, fromemails->emaillist[0], 0) == SUB_NONE) { errno = 0; log_error(LOG_ARGS, "A get request was sent" " from a non-subscribed address to a" " list with the subonlyget option set." " Ignoring mail"); return -1; } } /* sanity check--is it all digits? */ for(c = param; *c != '\0'; c++) { if(!isdigit((int)*c)) { errno = 0; log_error(LOG_ARGS, "The get request contained" " non-digits in index. Ignoring mail"); return -1; } } archivefilename = concatstr(3, listdir, "/archive/", param); if(stat(archivefilename, &stbuf) < 0) { log_error(LOG_ARGS, "Unable to open archive file"); exit(EXIT_FAILURE); } log_oper(listdir, OPLOGFNAME, "%s got archive/%s", fromemails->emaillist[0], archivefilename); execlp(mlmmjsend, mlmmjsend, "-T", fromemails->emaillist[0], "-L", listdir, "-l", "6", "-m", archivefilename, "-a", "-D", (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); break; /* listname+list@domain.tld */ case CTRL_LIST: if(statctrl(listdir, "nolistsubsemail")) return -1; owner_idx = -1; owners = ctrlvalues(listdir, "owner"); for(i = 0; i < owners->count; i++) { if(strcasecmp(fromemails->emaillist[0], owners->strs[i]) == 0) { log_oper(listdir, OPLOGFNAME, "%s requested sub list", fromemails->emaillist[0]); owner_idx = i; break; } } if (owner_idx == -1) { errno = 0; log_error(LOG_ARGS, "A list request was sent to the" " list from a non-owner address." " Ignoring mail"); return -1; } else { send_list(listdir, owners->strs[owner_idx], mlmmjsend); } break; /* listname+???@domain.tld */ default: errno = 0; log_error(LOG_ARGS, "Unknown command \"%s\". Ignoring mail", controlstr); return -1; } return 0; } mlmmj-1.2.18.0/src/log_error.c000644 000765 000120 00000004111 11727635244 015703 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Morten K. Poulsen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include "log_error.h" #include "config.h" #include "memory.h" #ifdef HAVE_SYSLOG_H #include #endif char *log_name = NULL; void log_set_name(const char* name) { if (log_name) myfree(log_name); log_name = mystrdup(name); } void log_free_name() { myfree(log_name); } void log_error(const char *file, int line, const char *errstr, const char *fmt, ...) { static int syslog_is_open = 0; char buf[1024]; va_list ap; va_start(ap, fmt); vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); if (!log_name) log_name = "mlmmj-UNKNOWN"; #ifdef HAVE_SYSLOG if(!syslog_is_open) { openlog(log_name, LOG_PID|LOG_CONS, LOG_MAIL); syslog_is_open = 1; } syslog(LOG_ERR, "%s:%d: %s: %s", file, line, buf, errstr); #else fprintf(stderr, "%s[%d]: %s:%d: %s: %s\n", log_name, (int)getpid(), file, line, buf, errstr); #endif } mlmmj-1.2.18.0/src/log_oper.c000644 000765 000120 00000006030 11727635244 015521 0ustar00benadmin000000 000000 /* Copyright (C) 2005 Mads Martin Joergensen < mmj AT mmj DOT dk > * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "log_error.h" #include "log_oper.h" #include "strgen.h" #include "mylocking.h" #include "wrappers.h" #include "memory.h" int log_oper(const char *prefix, const char *basename, const char *fmt, ...) { int fd, statres; char ct[26], *logstr, *logfilename, *tmp, log_msg[256]; struct stat st; time_t t; va_list ap; size_t i; logfilename = concatstr(3, prefix, "/", basename); statres = lstat(logfilename, &st); if(statres < 0 && errno != ENOENT) { log_error(LOG_ARGS, "Could not stat logfile %s", logfilename); myfree(logfilename); return -1; } if(statres >= 0 && st.st_size > (off_t)OPLOGSIZE) { tmp = concatstr(2, logfilename, ".rotated"); if(rename(logfilename, tmp) < 0) { log_error(LOG_ARGS, "Could not rename %s,%s", logfilename, tmp); } myfree(tmp); } fd = open(logfilename, O_RDWR|O_CREAT|O_APPEND, S_IRUSR|S_IWUSR); if(fd < 0) { log_error(LOG_ARGS, "Could not open %s", logfilename); myfree(logfilename); return -1; } if((time(&t) == (time_t)-1) || (ctime_r(&t, ct) == NULL)) strncpy(ct, "Unknown time", sizeof(ct)); else ct[24] = '\0'; if(myexcllock(fd) < 0) { log_error(LOG_ARGS, "Could not lock %s", logfilename); myfree(logfilename); return -1; } va_start(ap, fmt); i = vsnprintf(log_msg, sizeof(log_msg), fmt, ap); if(i < 0) { va_end(ap); log_error(LOG_ARGS, "Failed to format log message: %s", fmt); return -1; } if(i > sizeof(log_msg)) log_error(LOG_ARGS, "Log message truncated"); va_end(ap); logstr = concatstr(4, ct, " ", log_msg, "\n"); if(writen(fd, logstr, strlen(logstr)) < 0) log_error(LOG_ARGS, "Could not write to %s", logfilename); close(fd); myfree(logfilename); myfree(logstr); return 0; } mlmmj-1.2.18.0/src/mail-functions.c000644 000765 000120 00000017454 11727635244 016657 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include "mail-functions.h" #include "wrappers.h" #include "log_error.h" #include "memory.h" /* "HELO \r\n " has length 7 */ #define EXTRA_HELO_LEN 8 int write_helo(int sockfd, const char *hostname) { size_t len = (size_t)(strlen(hostname) + EXTRA_HELO_LEN); char *helo; size_t bytes_written; if((helo = mymalloc(len)) == 0) return errno; snprintf(helo, len, "HELO %s\r\n", hostname); len = strlen(helo); #if 0 fprintf(stderr, "\nwrite_helo, helo = [%s]\n", helo); #endif bytes_written = writen(sockfd, helo, len); if(bytes_written < 0) { log_error(LOG_ARGS, "Could not write HELO"); myfree(helo); return errno; } myfree(helo); return 0; } /* "MAIL FROM: <> \r\n" has length 16 */ #define EXTRA_FROM_LEN 16 int write_mail_from(int sockfd, const char *from_addr, const char *extra) { size_t len = (size_t)(strlen(from_addr) + EXTRA_FROM_LEN + strlen(extra) + 2); char *mail_from; size_t bytes_written; mail_from = mymalloc(len); if(extra && extra[0] != '\0') { if(extra[0] == ' ') extra++; snprintf(mail_from, len, "MAIL FROM: <%s> %s\r\n", from_addr, extra); } else snprintf(mail_from, len, "MAIL FROM: <%s>\r\n", from_addr); len = strlen(mail_from); #if 0 fprintf(stderr, "%s", mail_from); #endif bytes_written = writen(sockfd, mail_from, len); if(bytes_written < 0) { log_error(LOG_ARGS, "Could not write FROM"); myfree(mail_from); return errno; } myfree(mail_from); return 0; } /* "RCPT TO: <>\r\n" has length 13 */ #define EXTRA_RCPT_LEN 14 int write_rcpt_to(int sockfd, const char *rcpt_addr) { size_t len = (size_t)(strlen(rcpt_addr) + EXTRA_RCPT_LEN); char *rcpt_to; size_t bytes_written; if((rcpt_to = mymalloc(len)) == 0) return errno; snprintf(rcpt_to, len, "RCPT TO: <%s>\r\n", rcpt_addr); len = strlen(rcpt_to); #if 0 log_error(LOG_ARGS, "%s", rcpt_to); #endif bytes_written = writen(sockfd, rcpt_to, len); if(bytes_written < 0) { log_error(LOG_ARGS, "Could not write TO"); myfree(rcpt_to); return errno; } myfree(rcpt_to); return 0; } int write_mailbody_from_map(int sockfd, char *mapstart, size_t size, const char *tohdr) { char *cur, *next; char newlinebuf[3]; size_t len; int i = 1; for(next = cur = mapstart; next < mapstart + size; next++) { if(*next == '\n') { if(writen(sockfd, cur, next - cur) < 0) { log_error(LOG_ARGS, "Could not write mail"); return -1; } newlinebuf[0] = '\r'; newlinebuf[1] = '\n'; len = 2; if(next < (mapstart + size - 1) && *(next+1) == '.') { newlinebuf[2] = '.'; len = 3; } if(writen(sockfd, newlinebuf, len) < 0) { log_error(LOG_ARGS, "Could not write mail"); return -1; } if(i && tohdr && *(next+1) == '\n') { /* add To: header */ if(writen(sockfd, tohdr, strlen(tohdr)) < 0) { log_error(LOG_ARGS, "Could not write" " To: header"); return -1; } i = 0; /* Make sure we don't write it again */ } cur = next + 1; } } return 0; } char *get_preppedhdrs_from_map(char *mapstart, size_t *hlen) { char *cur, *next, *endhdrs, *retstr, *r; const char newlinebuf[] = "\r\n"; size_t hdrlen, n = 0; endhdrs = strstr(mapstart, "\n\n"); if(endhdrs == NULL) return NULL; /* The map doesn't map a file with a mail */ hdrlen = endhdrs - mapstart + 1; for(next = cur = mapstart; next < mapstart + hdrlen; next++) if(*next == '\n') n++; retstr = mymalloc(hdrlen + n); *hlen = hdrlen + n; r = retstr; for(next = cur = mapstart; next < mapstart + hdrlen; next++) { if(*next == '\n') { strncpy(r, cur, next - cur); r += next - cur; strncpy(r, newlinebuf, 2); r += 2; cur = next + 1; } } return retstr; } char *get_prepped_mailbody_from_map(char *mapstart, size_t size, size_t *blen) { char *cur, *next, *endhdrs, *retstr, *r; char newlinebuf[3]; size_t bodylen, len, n = 0; endhdrs = strstr(mapstart, "\n\n"); if(endhdrs == NULL) return NULL; /* The map doesn't map a file with a mail */ endhdrs++; /* Skip the first newline, it's in hdrs */ bodylen = size - (endhdrs - mapstart); for(next = cur = endhdrs; next < mapstart + size; next++) { if(*next == '\n') { n++; if((next < mapstart + size - 1) && *(next+1) == '.') n++; } } retstr = mymalloc(bodylen + n); *blen = bodylen + n; r = retstr; for(next = cur = endhdrs; next < mapstart + size; next++) { if(*next == '\n') { strncpy(r, cur, next - cur); r += next - cur; newlinebuf[0] = '\r'; newlinebuf[1] = '\n'; len = 2; if((next < mapstart + size - 1) && *(next+1) == '.') { newlinebuf[2] = '.'; len = 3; } strncpy(r, newlinebuf, len); r += len; cur = next + 1; } } return retstr; } /* "\r\n" has length 2 */ #define EXTRA_CUSTOM_LEN 3 int write_dot(int sockfd) { size_t bytes_written; bytes_written = writen(sockfd, "\r\n.\r\n", 5); if(bytes_written < 0) return errno; return 0; } int write_custom_line(int sockfd, const char *line) { size_t len = strlen(line) + EXTRA_CUSTOM_LEN; size_t bytes_written; char *customline; if((customline = mymalloc(len)) == 0) return errno; snprintf(customline, len, "%s\r\n", line); len = strlen(customline); #if 0 fprintf(stderr, "write_custom_line = [%s]\n", customline); fprintf(stderr, "strlen(customline) = [%d]\n", strlen(customline)); #endif bytes_written = writen(sockfd, customline, len); if(bytes_written < 0) { log_error(LOG_ARGS, "Could not write customline"); myfree(customline); return errno; } myfree(customline); return 0; } /* "Reply-To: \r\n" has length 12 */ #define EXTRA_REPLYTO_LEN 13 int write_replyto(int sockfd, const char *replyaddr) { size_t len = (size_t)(strlen(replyaddr) + EXTRA_REPLYTO_LEN); char *replyto; size_t bytes_written; if((replyto = mymalloc(len)) == 0) return errno; snprintf(replyto, len, "Reply-To: %s\r\n", replyaddr); len = strlen(replyto); #if 0 fprintf(stderr, "\nwrite_replyto, replyto = [%s]\n", replyto); #endif bytes_written = writen(sockfd, replyto, len); if(bytes_written < 0) { log_error(LOG_ARGS, "Could not write Reply-To header"); myfree(replyto); return errno; } myfree(replyto); return 0; } int write_data(int sockfd) { if(write_custom_line(sockfd, "DATA")) { log_error(LOG_ARGS, "Could not write DATA"); return errno; } return 0; } int write_quit(int sockfd) { if(write_custom_line(sockfd, "QUIT")) { log_error(LOG_ARGS, "Could not write QUIT"); return errno; } return 0; } int write_rset(int sockfd) { if(write_custom_line(sockfd, "RSET")) { log_error(LOG_ARGS, "Could not write RSET"); return errno; } return 0; } mlmmj-1.2.18.0/src/Makefile.am000644 000765 000120 00000005217 11734220454 015600 0ustar00benadmin000000 000000 # AUTOMAKE_OPTIONS = foreign AM_CFLAGS = -g -Wall -pedantic -Wsign-compare -DDEFAULTTEXTDIR='"@textlibdir@"' INCLUDES = -I$(srcdir)/../include bin_PROGRAMS = mlmmj-send mlmmj-receive mlmmj-process mlmmj-sub \ mlmmj-unsub mlmmj-bounce mlmmj-maintd mlmmj-list bin_SCRIPTS = mlmmj-make-ml EXTRA_DIST = mlmmj-make-ml mlmmj_send_SOURCES = mlmmj-send.c writen.c mail-functions.c itoa.c chomp.c \ incindexfile.c checkwait_smtpreply.c getlistaddr.c \ mylocking.c init_sockfd.c strgen.c random-int.c \ print-version.c log_error.c mygetline.c memory.c \ statctrl.c ctrlvalue.c getaddrsfromfd.c readn.c \ getlistdelim.c mlmmj_receive_SOURCES = mlmmj-receive.c writen.c random-int.c strgen.c \ print-version.c log_error.c dumpfd2fd.c memory.c \ log_oper.c mylocking.c readn.c mlmmj_process_SOURCES = mlmmj-process.c writen.c find_email_adr.c \ incindexfile.c itoa.c getlistaddr.c chomp.c \ mylocking.c listcontrol.c random-int.c strgen.c \ print-version.c send_help.c prepstdreply.c \ do_all_the_voodoo_here.c mygetline.c gethdrline.c \ log_error.c statctrl.c ctrlvalue.c dumpfd2fd.c \ subscriberfuncs.c ctrlvalues.c memory.c log_oper.c \ send_list.c readn.c getlistdelim.c unistr.c mlmmj_sub_SOURCES = mlmmj-sub.c writen.c mylocking.c \ getlistaddr.c chomp.c random-int.c strgen.c \ subscriberfuncs.c print-version.c \ log_error.c mygetline.c prepstdreply.c memory.c \ statctrl.c readn.c getlistdelim.c ctrlvalues.c \ unistr.c ctrlvalue.c mlmmj_unsub_SOURCES = mlmmj-unsub.c writen.c mylocking.c \ getlistaddr.c chomp.c subscriberfuncs.c random-int.c \ strgen.c print-version.c log_error.c mygetline.c \ prepstdreply.c memory.c statctrl.c readn.c \ getlistdelim.c unistr.c ctrlvalue.c mlmmj_bounce_SOURCES = mlmmj-bounce.c print-version.c log_error.c \ subscriberfuncs.c strgen.c random-int.c writen.c \ prepstdreply.c mygetline.c chomp.c getlistaddr.c \ memory.c find_email_adr.c gethdrline.c readn.c \ getlistdelim.c unistr.c ctrlvalue.c statctrl.c mlmmj_maintd_SOURCES = mlmmj-maintd.c print-version.c log_error.c mygetline.c \ strgen.c random-int.c chomp.c writen.c memory.c \ ctrlvalue.c send_digest.c getlistaddr.c dumpfd2fd.c \ mylocking.c log_oper.c readn.c getlistdelim.c \ prepstdreply.c statctrl.c gethdrline.c unistr.c mlmmj_list_SOURCES = mlmmj-list.c strgen.c writen.c print-version.c memory.c \ log_error.c random-int.c readn.c subscriberfuncs.c install-exec-hook: ln -f -s mlmmj-receive $(DESTDIR)$(bindir)/mlmmj-recieve ln -f -s mlmmj-make-ml $(DESTDIR)$(bindir)/mlmmj-make-ml.sh mlmmj-1.2.18.0/src/Makefile.in000644 000765 000120 00000071636 11761151557 015630 0ustar00benadmin000000 000000 # Makefile.in generated by automake 1.12 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } 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 = : bin_PROGRAMS = mlmmj-send$(EXEEXT) mlmmj-receive$(EXEEXT) \ mlmmj-process$(EXEEXT) mlmmj-sub$(EXEEXT) mlmmj-unsub$(EXEEXT) \ mlmmj-bounce$(EXEEXT) mlmmj-maintd$(EXEEXT) \ mlmmj-list$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/mlmmj-make-ml.in $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = mlmmj-make-ml CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mlmmj_bounce_OBJECTS = mlmmj-bounce.$(OBJEXT) \ print-version.$(OBJEXT) log_error.$(OBJEXT) \ subscriberfuncs.$(OBJEXT) strgen.$(OBJEXT) \ random-int.$(OBJEXT) writen.$(OBJEXT) prepstdreply.$(OBJEXT) \ mygetline.$(OBJEXT) chomp.$(OBJEXT) getlistaddr.$(OBJEXT) \ memory.$(OBJEXT) find_email_adr.$(OBJEXT) gethdrline.$(OBJEXT) \ readn.$(OBJEXT) getlistdelim.$(OBJEXT) unistr.$(OBJEXT) \ ctrlvalue.$(OBJEXT) statctrl.$(OBJEXT) mlmmj_bounce_OBJECTS = $(am_mlmmj_bounce_OBJECTS) mlmmj_bounce_LDADD = $(LDADD) am_mlmmj_list_OBJECTS = mlmmj-list.$(OBJEXT) strgen.$(OBJEXT) \ writen.$(OBJEXT) print-version.$(OBJEXT) memory.$(OBJEXT) \ log_error.$(OBJEXT) random-int.$(OBJEXT) readn.$(OBJEXT) \ subscriberfuncs.$(OBJEXT) mlmmj_list_OBJECTS = $(am_mlmmj_list_OBJECTS) mlmmj_list_LDADD = $(LDADD) am_mlmmj_maintd_OBJECTS = mlmmj-maintd.$(OBJEXT) \ print-version.$(OBJEXT) log_error.$(OBJEXT) \ mygetline.$(OBJEXT) strgen.$(OBJEXT) random-int.$(OBJEXT) \ chomp.$(OBJEXT) writen.$(OBJEXT) memory.$(OBJEXT) \ ctrlvalue.$(OBJEXT) send_digest.$(OBJEXT) \ getlistaddr.$(OBJEXT) dumpfd2fd.$(OBJEXT) mylocking.$(OBJEXT) \ log_oper.$(OBJEXT) readn.$(OBJEXT) getlistdelim.$(OBJEXT) \ prepstdreply.$(OBJEXT) statctrl.$(OBJEXT) gethdrline.$(OBJEXT) \ unistr.$(OBJEXT) mlmmj_maintd_OBJECTS = $(am_mlmmj_maintd_OBJECTS) mlmmj_maintd_LDADD = $(LDADD) am_mlmmj_process_OBJECTS = mlmmj-process.$(OBJEXT) writen.$(OBJEXT) \ find_email_adr.$(OBJEXT) incindexfile.$(OBJEXT) itoa.$(OBJEXT) \ getlistaddr.$(OBJEXT) chomp.$(OBJEXT) mylocking.$(OBJEXT) \ listcontrol.$(OBJEXT) random-int.$(OBJEXT) strgen.$(OBJEXT) \ print-version.$(OBJEXT) send_help.$(OBJEXT) \ prepstdreply.$(OBJEXT) do_all_the_voodoo_here.$(OBJEXT) \ mygetline.$(OBJEXT) gethdrline.$(OBJEXT) log_error.$(OBJEXT) \ statctrl.$(OBJEXT) ctrlvalue.$(OBJEXT) dumpfd2fd.$(OBJEXT) \ subscriberfuncs.$(OBJEXT) ctrlvalues.$(OBJEXT) \ memory.$(OBJEXT) log_oper.$(OBJEXT) send_list.$(OBJEXT) \ readn.$(OBJEXT) getlistdelim.$(OBJEXT) unistr.$(OBJEXT) mlmmj_process_OBJECTS = $(am_mlmmj_process_OBJECTS) mlmmj_process_LDADD = $(LDADD) am_mlmmj_receive_OBJECTS = mlmmj-receive.$(OBJEXT) writen.$(OBJEXT) \ random-int.$(OBJEXT) strgen.$(OBJEXT) print-version.$(OBJEXT) \ log_error.$(OBJEXT) dumpfd2fd.$(OBJEXT) memory.$(OBJEXT) \ log_oper.$(OBJEXT) mylocking.$(OBJEXT) readn.$(OBJEXT) mlmmj_receive_OBJECTS = $(am_mlmmj_receive_OBJECTS) mlmmj_receive_LDADD = $(LDADD) am_mlmmj_send_OBJECTS = mlmmj-send.$(OBJEXT) writen.$(OBJEXT) \ mail-functions.$(OBJEXT) itoa.$(OBJEXT) chomp.$(OBJEXT) \ incindexfile.$(OBJEXT) checkwait_smtpreply.$(OBJEXT) \ getlistaddr.$(OBJEXT) mylocking.$(OBJEXT) \ init_sockfd.$(OBJEXT) strgen.$(OBJEXT) random-int.$(OBJEXT) \ print-version.$(OBJEXT) log_error.$(OBJEXT) \ mygetline.$(OBJEXT) memory.$(OBJEXT) statctrl.$(OBJEXT) \ ctrlvalue.$(OBJEXT) getaddrsfromfd.$(OBJEXT) readn.$(OBJEXT) \ getlistdelim.$(OBJEXT) mlmmj_send_OBJECTS = $(am_mlmmj_send_OBJECTS) mlmmj_send_LDADD = $(LDADD) am_mlmmj_sub_OBJECTS = mlmmj-sub.$(OBJEXT) writen.$(OBJEXT) \ mylocking.$(OBJEXT) getlistaddr.$(OBJEXT) chomp.$(OBJEXT) \ random-int.$(OBJEXT) strgen.$(OBJEXT) \ subscriberfuncs.$(OBJEXT) print-version.$(OBJEXT) \ log_error.$(OBJEXT) mygetline.$(OBJEXT) prepstdreply.$(OBJEXT) \ memory.$(OBJEXT) statctrl.$(OBJEXT) readn.$(OBJEXT) \ getlistdelim.$(OBJEXT) ctrlvalues.$(OBJEXT) unistr.$(OBJEXT) \ ctrlvalue.$(OBJEXT) mlmmj_sub_OBJECTS = $(am_mlmmj_sub_OBJECTS) mlmmj_sub_LDADD = $(LDADD) am_mlmmj_unsub_OBJECTS = mlmmj-unsub.$(OBJEXT) writen.$(OBJEXT) \ mylocking.$(OBJEXT) getlistaddr.$(OBJEXT) chomp.$(OBJEXT) \ subscriberfuncs.$(OBJEXT) random-int.$(OBJEXT) \ strgen.$(OBJEXT) print-version.$(OBJEXT) log_error.$(OBJEXT) \ mygetline.$(OBJEXT) prepstdreply.$(OBJEXT) memory.$(OBJEXT) \ statctrl.$(OBJEXT) readn.$(OBJEXT) getlistdelim.$(OBJEXT) \ unistr.$(OBJEXT) ctrlvalue.$(OBJEXT) mlmmj_unsub_OBJECTS = $(am_mlmmj_unsub_OBJECTS) mlmmj_unsub_LDADD = $(LDADD) 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(mlmmj_bounce_SOURCES) $(mlmmj_list_SOURCES) \ $(mlmmj_maintd_SOURCES) $(mlmmj_process_SOURCES) \ $(mlmmj_receive_SOURCES) $(mlmmj_send_SOURCES) \ $(mlmmj_sub_SOURCES) $(mlmmj_unsub_SOURCES) DIST_SOURCES = $(mlmmj_bounce_SOURCES) $(mlmmj_list_SOURCES) \ $(mlmmj_maintd_SOURCES) $(mlmmj_process_SOURCES) \ $(mlmmj_receive_SOURCES) $(mlmmj_send_SOURCES) \ $(mlmmj_sub_SOURCES) $(mlmmj_unsub_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ 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@ 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_CC = @ac_ct_CC@ 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_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ textlibdir = @textlibdir@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign AM_CFLAGS = -g -Wall -pedantic -Wsign-compare -DDEFAULTTEXTDIR='"@textlibdir@"' INCLUDES = -I$(srcdir)/../include bin_SCRIPTS = mlmmj-make-ml EXTRA_DIST = mlmmj-make-ml mlmmj_send_SOURCES = mlmmj-send.c writen.c mail-functions.c itoa.c chomp.c \ incindexfile.c checkwait_smtpreply.c getlistaddr.c \ mylocking.c init_sockfd.c strgen.c random-int.c \ print-version.c log_error.c mygetline.c memory.c \ statctrl.c ctrlvalue.c getaddrsfromfd.c readn.c \ getlistdelim.c mlmmj_receive_SOURCES = mlmmj-receive.c writen.c random-int.c strgen.c \ print-version.c log_error.c dumpfd2fd.c memory.c \ log_oper.c mylocking.c readn.c mlmmj_process_SOURCES = mlmmj-process.c writen.c find_email_adr.c \ incindexfile.c itoa.c getlistaddr.c chomp.c \ mylocking.c listcontrol.c random-int.c strgen.c \ print-version.c send_help.c prepstdreply.c \ do_all_the_voodoo_here.c mygetline.c gethdrline.c \ log_error.c statctrl.c ctrlvalue.c dumpfd2fd.c \ subscriberfuncs.c ctrlvalues.c memory.c log_oper.c \ send_list.c readn.c getlistdelim.c unistr.c mlmmj_sub_SOURCES = mlmmj-sub.c writen.c mylocking.c \ getlistaddr.c chomp.c random-int.c strgen.c \ subscriberfuncs.c print-version.c \ log_error.c mygetline.c prepstdreply.c memory.c \ statctrl.c readn.c getlistdelim.c ctrlvalues.c \ unistr.c ctrlvalue.c mlmmj_unsub_SOURCES = mlmmj-unsub.c writen.c mylocking.c \ getlistaddr.c chomp.c subscriberfuncs.c random-int.c \ strgen.c print-version.c log_error.c mygetline.c \ prepstdreply.c memory.c statctrl.c readn.c \ getlistdelim.c unistr.c ctrlvalue.c mlmmj_bounce_SOURCES = mlmmj-bounce.c print-version.c log_error.c \ subscriberfuncs.c strgen.c random-int.c writen.c \ prepstdreply.c mygetline.c chomp.c getlistaddr.c \ memory.c find_email_adr.c gethdrline.c readn.c \ getlistdelim.c unistr.c ctrlvalue.c statctrl.c mlmmj_maintd_SOURCES = mlmmj-maintd.c print-version.c log_error.c mygetline.c \ strgen.c random-int.c chomp.c writen.c memory.c \ ctrlvalue.c send_digest.c getlistaddr.c dumpfd2fd.c \ mylocking.c log_oper.c readn.c getlistdelim.c \ prepstdreply.c statctrl.c gethdrline.c unistr.c mlmmj_list_SOURCES = mlmmj-list.c strgen.c writen.c print-version.c memory.c \ log_error.c random-int.c readn.c subscriberfuncs.c all: all-am .SUFFIXES: .SUFFIXES: .c .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): mlmmj-make-ml: $(top_builddir)/config.status $(srcdir)/mlmmj-make-ml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ 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) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(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: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mlmmj-bounce$(EXEEXT): $(mlmmj_bounce_OBJECTS) $(mlmmj_bounce_DEPENDENCIES) $(EXTRA_mlmmj_bounce_DEPENDENCIES) @rm -f mlmmj-bounce$(EXEEXT) $(LINK) $(mlmmj_bounce_OBJECTS) $(mlmmj_bounce_LDADD) $(LIBS) mlmmj-list$(EXEEXT): $(mlmmj_list_OBJECTS) $(mlmmj_list_DEPENDENCIES) $(EXTRA_mlmmj_list_DEPENDENCIES) @rm -f mlmmj-list$(EXEEXT) $(LINK) $(mlmmj_list_OBJECTS) $(mlmmj_list_LDADD) $(LIBS) mlmmj-maintd$(EXEEXT): $(mlmmj_maintd_OBJECTS) $(mlmmj_maintd_DEPENDENCIES) $(EXTRA_mlmmj_maintd_DEPENDENCIES) @rm -f mlmmj-maintd$(EXEEXT) $(LINK) $(mlmmj_maintd_OBJECTS) $(mlmmj_maintd_LDADD) $(LIBS) mlmmj-process$(EXEEXT): $(mlmmj_process_OBJECTS) $(mlmmj_process_DEPENDENCIES) $(EXTRA_mlmmj_process_DEPENDENCIES) @rm -f mlmmj-process$(EXEEXT) $(LINK) $(mlmmj_process_OBJECTS) $(mlmmj_process_LDADD) $(LIBS) mlmmj-receive$(EXEEXT): $(mlmmj_receive_OBJECTS) $(mlmmj_receive_DEPENDENCIES) $(EXTRA_mlmmj_receive_DEPENDENCIES) @rm -f mlmmj-receive$(EXEEXT) $(LINK) $(mlmmj_receive_OBJECTS) $(mlmmj_receive_LDADD) $(LIBS) mlmmj-send$(EXEEXT): $(mlmmj_send_OBJECTS) $(mlmmj_send_DEPENDENCIES) $(EXTRA_mlmmj_send_DEPENDENCIES) @rm -f mlmmj-send$(EXEEXT) $(LINK) $(mlmmj_send_OBJECTS) $(mlmmj_send_LDADD) $(LIBS) mlmmj-sub$(EXEEXT): $(mlmmj_sub_OBJECTS) $(mlmmj_sub_DEPENDENCIES) $(EXTRA_mlmmj_sub_DEPENDENCIES) @rm -f mlmmj-sub$(EXEEXT) $(LINK) $(mlmmj_sub_OBJECTS) $(mlmmj_sub_LDADD) $(LIBS) mlmmj-unsub$(EXEEXT): $(mlmmj_unsub_OBJECTS) $(mlmmj_unsub_DEPENDENCIES) $(EXTRA_mlmmj_unsub_DEPENDENCIES) @rm -f mlmmj-unsub$(EXEEXT) $(LINK) $(mlmmj_unsub_OBJECTS) $(mlmmj_unsub_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ 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)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkwait_smtpreply.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chomp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctrlvalue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctrlvalues.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/do_all_the_voodoo_here.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dumpfd2fd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_email_adr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getaddrsfromfd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gethdrline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlistaddr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlistdelim.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incindexfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init_sockfd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itoa.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listcontrol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_oper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail-functions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlmmj-bounce.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlmmj-list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlmmj-maintd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlmmj-process.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlmmj-receive.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlmmj-send.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlmmj-sub.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlmmj-unsub.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mygetline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mylocking.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prepstdreply.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-version.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random-int.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_digest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statctrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strgen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subscriberfuncs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/writen.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) '$<'` 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" cscopelist: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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 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 @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook 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 pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS .MAKE: install-am install-exec-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic cscopelist ctags distclean distclean-compile \ distclean-generic 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-exec-hook \ 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 pdf pdf-am \ ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-binSCRIPTS install-exec-hook: ln -f -s mlmmj-receive $(DESTDIR)$(bindir)/mlmmj-recieve ln -f -s mlmmj-make-ml $(DESTDIR)$(bindir)/mlmmj-make-ml.sh # 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: mlmmj-1.2.18.0/src/memory.c000644 000765 000120 00000004315 11414633671 015222 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Morten K. Poulsen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ /* define _MEMORY_C so we can use the libc memory functions -- see mlmmj.h */ #define _MEMORY_C 1 #include #include #include "mlmmj.h" #include "memory.h" #include "log_error.h" /* TODO add a debug mode with canaries and other goodies */ void *__mymalloc(const char *file, int line, size_t size) { void *ret; ret = malloc(size); if (ret == NULL) { log_error(file, line, strerror(errno), "malloc(%d) failed! Bailing out!", size); exit(EXIT_FAILURE); } return ret; } void *__myrealloc(const char *file, int line, void *ptr, size_t size) { void *ret; ret = realloc(ptr, size); if (ret == NULL) { log_error(file, line, strerror(errno), "realloc(%p, %d) failed! Bailing out!", ptr, size); exit(EXIT_FAILURE); } return ret; } void __myfree(const char *file, int line, void *ptr) { free(ptr); } char *__mystrdup(const char *file, int line, const char *str) { void *ret; ret = strdup(str); if (ret == NULL) { log_error(file, line, strerror(errno), "strdup() failed! Bailing out!"); exit(EXIT_FAILURE); } return ret; } mlmmj-1.2.18.0/src/mlmmj-bounce.c000644 000765 000120 00000023450 11734220454 016274 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Morten K. Poulsen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "getlistaddr.h" #include "getlistdelim.h" #include "mlmmj.h" #include "strgen.h" #include "wrappers.h" #include "log_error.h" #include "subscriberfuncs.h" #include "mygetline.h" #include "chomp.h" #include "prepstdreply.h" #include "memory.h" #include "find_email_adr.h" #include "gethdrline.h" void do_probe(const char *listdir, const char *mlmmjsend, const char *addr) { text *txt; file_lines_state *fls; char *myaddr, *from, *a, *queuefilename, *listaddr; char *listfqdn, *listname, *probefile, *listdelim=getlistdelim(listdir); int fd; time_t t; myaddr = mystrdup(addr); listaddr = getlistaddr(listdir); listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); from = concatstr(6, listname, listdelim, "bounces-probe-", myaddr, "@", listfqdn); myfree(listaddr); myfree(listdelim); myfree(listfqdn); myfree(listname); a = strrchr(myaddr, '='); if (!a) { myfree(myaddr); myfree(from); log_error(LOG_ARGS, "do_probe(): malformed address"); exit(EXIT_FAILURE); } *a = '@'; txt = open_text(listdir, "probe", NULL, NULL, NULL, "bounce-probe"); MY_ASSERT(txt); register_unformatted(txt, "bouncenumbers", "%bouncenumbers%"); /* DEPRECATED */ fls = init_truncated_file_lines(addr, 0, ':'); register_formatted(txt, "bouncenumbers", rewind_file_lines, get_file_line, fls); queuefilename = prepstdreply(txt, listdir, "$listowner$", myaddr, NULL); MY_ASSERT(queuefilename); close_text(txt); finish_file_lines(fls); probefile = concatstr(4, listdir, "/bounce/", addr, "-probe"); MY_ASSERT(probefile); t = time(NULL); a = mymalloc(32); snprintf(a, 31, "%ld", (long int)t); a[31] = '\0'; unlink(probefile); fd = open(probefile, O_WRONLY|O_TRUNC|O_CREAT, S_IRUSR|S_IWUSR); if(fd < 0) log_error(LOG_ARGS, "Could not open %s", probefile); else if(writen(fd, a, strlen(a)) < 0) log_error(LOG_ARGS, "Could not write time in probe"); myfree(probefile); execlp(mlmmjsend, mlmmjsend, "-l", "5", "-L", listdir, "-T", myaddr, "-F", from, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } char *dsnparseaddr(const char *mailname) { int fd, indsn = 0, i; char *line, *linedup, *search, *addr = NULL; struct email_container emails = { 0, NULL }; fd = open(mailname, O_RDONLY); if(fd < 0) { log_error(LOG_ARGS, "Could not open bounceindexfile %s", mailname); return NULL; } while((line = gethdrline(fd))) { linedup = mystrdup(line); for(i = 0; line[i]; i++) linedup[i] = tolower(line[i]); search = strstr(linedup, "message/delivery-status"); myfree(linedup); if(search) indsn = 1; if(indsn) { i = strncasecmp(line, "Final-Recipient:", 16); if(i == 0) { find_email_adr(line, &emails); if(emails.emailcount > 0) { addr = mystrdup(emails.emaillist[0]); for(i = 0; i < emails.emailcount; i++) myfree(emails.emaillist[i]); myfree(emails.emaillist); } else { addr = NULL; } myfree(line); return addr; } } myfree(line); } return NULL; } static void print_help(const char *prg) { printf("Usage: %s -L /path/to/list\n" " -a john=doe.org [-n num | -p]\n" " -a: Address string that bounces\n" " -h: This help\n" " -L: Full path to list directory\n" " -n: Message number in the archive\n" " -p: Send out a probe\n" " -V: Print version\n", prg); exit(EXIT_SUCCESS); } int main(int argc, char **argv) { int opt, fd, dsnbounce = 0, i = 0; char *listdir = NULL, *address = NULL, *number = NULL; char *bindir, *mlmmjsend, *savename; char *mailname = NULL, *bfilename, *a, *buf, *lowcaseaddr; size_t len; time_t t; int probe = 0; struct stat st; uid_t uid; log_set_name(argv[0]); CHECKFULLPATH(argv[0]); bindir = mydirname(argv[0]); mlmmjsend = concatstr(2, bindir, "/mlmmj-send"); myfree(bindir); while ((opt = getopt(argc, argv, "hdVL:a:n:m:p")) != -1) { switch(opt) { case 'L': listdir = optarg; break; case 'a': address = optarg; break; case 'd': dsnbounce = 1; break; case 'm': mailname = optarg; break; case 'n': number = optarg; break; case 'p': probe = 1; break; case 'h': print_help(argv[0]); break; case 'V': print_version(argv[0]); exit(0); } } if(listdir == NULL || (address == NULL && dsnbounce == 0) || (number == NULL && probe == 0)) { fprintf(stderr, "You have to specify -L, -a or -d and -n or -p\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } /* Lets make sure no random user tries to do bouncehandling */ if(listdir) { if(stat(listdir, &st) == 0) { uid = getuid(); if(uid && uid != st.st_uid) { log_error(LOG_ARGS, "Have to invoke either as root " "or as the user owning listdir"); writen(STDERR_FILENO, "Have to invoke either as root " "or as the user owning listdir\n", 60); exit(EXIT_FAILURE); } } else { log_error(LOG_ARGS, "Could not stat %s", listdir); exit(EXIT_FAILURE); } } if(dsnbounce) { address = dsnparseaddr(mailname); /* Delete the mailfile, no need for it anymore */ if(mailname) unlink(mailname); if(address == NULL) exit(EXIT_SUCCESS); a = strrchr(address, '@'); MY_ASSERT(a); *a = '='; } /* Make the address lowercase */ lowcaseaddr = mystrdup(address); i = 0; while(lowcaseaddr[i]) { lowcaseaddr[i] = tolower(lowcaseaddr[i]); i++; } address = lowcaseaddr; if(number != NULL && probe != 0) { fprintf(stderr, "You can only specify one of -n or -p\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } if (probe) { /* send out a probe */ do_probe(listdir, mlmmjsend, address); /* do_probe() will never return */ exit(EXIT_FAILURE); } #if 0 log_error(LOG_ARGS, "listdir = [%s] address = [%s] number = [%s]", listdir, address, number); #endif /* check if it's sub/unsub requests bouncing, and in that case * simply remove the confirmation file. Variablenames address and * number are a bit misleading in this case due to the different * construction of the sub/unsub confirmation From header. */ if(strcmp(number, "confsub") == 0) { a = concatstr(3, listdir, "/subconf/", address); unlink(a); myfree(a); if(mailname) unlink(mailname); exit(EXIT_SUCCESS); } if(strcmp(number, "confunsub") == 0) { a = concatstr(3, listdir, "/unsubconf/", address); unlink(a); myfree(a); if(mailname) unlink(mailname); exit(EXIT_SUCCESS); } /* Below checks for bounce probes bouncing. If they do, simply remove * the probe file and exit successfully. Yes, I know the variables * have horrible names, but please bear with me. */ if(strcmp(number, "probe") == 0) { a = concatstr(4, listdir, "/bounce/", address, "-probe"); unlink(a); unlink(mailname); myfree(a); exit(EXIT_SUCCESS); } /* save the filename with '=' before replacing it with '@' */ bfilename = concatstr(3, listdir, "/bounce/", address); a = strrchr(address, '='); if (!a) { if(mailname) unlink(mailname); exit(EXIT_SUCCESS); /* ignore malformed address */ } *a = '@'; /* make sure it's a subscribed address */ if(is_subbed(listdir, address, 0) == SUB_NONE) { log_error(LOG_ARGS, "%s is bouncing but not subscribed?", address); if(mailname) unlink(mailname); myfree(bfilename); exit(EXIT_SUCCESS); /* Not subbed, so exit silently */ } if(lstat(bfilename, &st) == 0) { if((st.st_mode & S_IFLNK) == S_IFLNK) { log_error(LOG_ARGS, "%s is a symbolic link", bfilename); exit(EXIT_FAILURE); } } if ((fd = open(bfilename, O_WRONLY|O_APPEND|O_CREAT, S_IRUSR|S_IWUSR)) < 0) { log_error(LOG_ARGS, "Could not open '%s'", bfilename); myfree(bfilename); exit(EXIT_FAILURE); } /* TODO check that the message is not already bounced */ /* XXX How long can the string representation of an integer be? * It is not a security issue (we use snprintf()), but it would be * bad mojo to cut the timestamp field -- mortenp 20040427 */ /* int + ":" + int + " # Wed Jun 30 21:49:08 1993\n" + NUL */ len = 20 + 1 + 20 + 28 + 1; buf = mymalloc(len); if (!buf) exit(EXIT_FAILURE); t = time(NULL); snprintf(buf, len-26, "%s:%ld # ", number, (long int)t); ctime_r(&t, buf+strlen(buf)); writen(fd, buf, strlen(buf)); close(fd); if(mailname) { savename = concatstr(2, bfilename, ".lastmsg"); rename(mailname, savename); myfree(savename); } myfree(bfilename); if(dsnbounce && address) myfree(address); return EXIT_SUCCESS; } mlmmj-1.2.18.0/src/mlmmj-list.c000644 000765 000120 00000011214 11727635244 016000 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "wrappers.h" #include "memory.h" #include "strgen.h" #include "log_error.h" static void print_help(const char *prg) { printf("Usage: %s -L /path/to/listdir\n" " [-c] [-d] [-h] [-m] [-n] [-o] [-s] [-V]\n" " -L: Full path to list directory\n" " -c: Print subscriber count\n" " -d: Print for digesters list\n" " -h: This help\n" " -m: Print moderators for list\n" " -n: Print for nomail version of list\n" " -o: Print owner(s) of list\n" " -s: Print normal subscribers (default) \n" " -V: Print version\n", prg); exit(EXIT_SUCCESS); } int dumpcount(const char *filename, int *count) { int fd; char *start, *next, *cur; struct stat st; size_t len; if((fd = open(filename, O_RDONLY)) < 0) return -1; if(stat(filename, &st) < 0) return -1; if(!S_ISREG(st.st_mode)) return -1; /* Nobody there */ if(st.st_size == 0) { return 0; } start = mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); if(start == MAP_FAILED) return -1; for(next = cur = start; next < start + st.st_size; next++) { if(*next == '\n' || next == start + st.st_size - 1) { len = next - cur; if(next == start + st.st_size - 1 && *next != '\n') len++; if(count) (*count)++; else { writen(STDOUT_FILENO, cur, len); writen(STDOUT_FILENO, "\n", 1); } cur = next + 1; } } munmap(start, st.st_size); close(fd); return 0; } int main(int argc, char **argv) { int opt, ret, count = 0, docount = 0; char *listdir = NULL, *fileiter = NULL, *tmp; char *subddir, *subdir, *subfile = NULL; DIR *dirp; struct dirent *dp; enum subtype typesub = SUB_NORMAL; while ((opt = getopt(argc, argv, "cdhmnosVL:")) != -1) { switch(opt) { case 'c': docount = 1; break; case 'd': typesub = SUB_DIGEST; break; case 'h': print_help(argv[0]); break; case 'L': listdir = optarg; break; case 'm': typesub = SUB_FILE; subfile = "/control/moderators"; break; case 'n': typesub = SUB_NOMAIL; break; case 'o': typesub = SUB_FILE; subfile = "/control/owner"; break; case 'V': print_version(argv[0]); exit(EXIT_SUCCESS); default: case 's': typesub = SUB_NORMAL; break; } } if(listdir == NULL) { fprintf(stderr, "You have to specify -L\n" "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } switch(typesub) { default: case SUB_NORMAL: subddir = "/subscribers.d/"; break; case SUB_DIGEST: subddir = "/digesters.d/"; break; case SUB_NOMAIL: subddir = "/nomailsubs.d/"; break; case SUB_FILE: subddir = NULL; break; } if(subddir) subdir = concatstr(2, listdir, subddir); else subdir = NULL; if(subdir) { dirp = opendir(subdir); if(dirp == NULL) { fprintf(stderr, "Could not opendir(%s);\n", subdir); exit(EXIT_FAILURE); } while((dp = readdir(dirp)) != NULL) { if((strcmp(dp->d_name, "..") == 0) || (strcmp(dp->d_name, ".") == 0)) continue; fileiter = concatstr(2, subdir, dp->d_name); if(docount) dumpcount(fileiter, &count); else ret = dumpcount(fileiter, NULL); myfree(fileiter); } myfree(subdir); closedir(dirp); } else { tmp = concatstr(2, listdir, subfile); if(docount) dumpcount(tmp, &count); else dumpcount(tmp, NULL); } if(docount) printf("%d\n", count); return 0; } mlmmj-1.2.18.0/src/mlmmj-maintd.c000644 000765 000120 00000063050 11734220454 016275 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include "mlmmj-maintd.h" #include "mlmmj.h" #include "strgen.h" #include "chomp.h" #include "log_error.h" #include "mygetline.h" #include "wrappers.h" #include "memory.h" #include "ctrlvalue.h" #include "statctrl.h" #include "send_digest.h" #include "mylocking.h" #include "log_oper.h" static void print_help(const char *prg) { printf("Usage: %s [-L | -d] /path/to/dir [-F]\n" " -d: Full path to directory with listdirs\n" " Use this to run maintenance on all list directories\n" " in that directory.\n" " -L: Full path to one list directory\n" " -F: Don't fork, performing one maintenance run only.\n" " This option should be used when one wants to\n" " avoid running another daemon, and use e.g. " "cron to control it instead.\n", prg); exit(EXIT_SUCCESS); } static int mydaemon(const char *rootdir) { int i; pid_t pid; if((pid = fork()) < 0) return -1; else if (pid) exit(EXIT_SUCCESS); /* parent says bye bye */ if(setsid() < 0) { log_error(LOG_ARGS, "Could not setsid()"); return -1; } if(signal(SIGHUP, SIG_IGN) == SIG_ERR) { log_error(LOG_ARGS, "Could not signal(SIGHUP, SIG_IGN)"); return -1; } if((pid = fork()) < 0) return -1; else if (pid) exit(EXIT_SUCCESS); /* parent says bye bye */ if(chdir(rootdir) < 0) log_error(LOG_ARGS, "Could not chdir(%s)", rootdir); i = sysconf(_SC_OPEN_MAX); if(i < 0) i = 256; while(i >= 0) close(i--); open("/dev/null", O_RDONLY); open("/dev/null", O_RDWR); open("/dev/null", O_RDWR); return 0; } int delolder(const char *dirname, time_t than) { DIR *dir; struct dirent *dp; struct stat st; time_t t; if(chdir(dirname) < 0) { log_error(LOG_ARGS, "Could not chdir(%s)", dirname); return -1; } if((dir = opendir(dirname)) == NULL) { log_error(LOG_ARGS, "Could not opendir(%s)", dirname); return -1; } while((dp = readdir(dir)) != NULL) { if(stat(dp->d_name, &st) < 0) { log_error(LOG_ARGS, "Could not stat(%s)", dp->d_name); continue; } if(!S_ISREG(st.st_mode)) continue; t = time(NULL); if(t - st.st_mtime > than) unlink(dp->d_name); } closedir(dir); return 0; } int clean_moderation(const char *listdir) { char *moddirname = concatstr(2, listdir, "/moderation"); int ret = delolder(moddirname, MODREQLIFE); myfree(moddirname); return ret; } int clean_discarded(const char *listdir) { char *discardeddirname = concatstr(2, listdir, "/queue/discarded"); int ret = delolder(discardeddirname, DISCARDEDLIFE); myfree(discardeddirname); return ret; } int clean_subconf(const char *listdir) { char *subconfdirname = concatstr(2, listdir, "/subconf"); int ret = delolder(subconfdirname, CONFIRMLIFE); myfree(subconfdirname); return ret; } int clean_unsubconf(const char *listdir) { char *unsubconfdirname = concatstr(2, listdir, "/unsubconf"); int ret = delolder(unsubconfdirname, CONFIRMLIFE); myfree(unsubconfdirname); return ret; } int discardmail(const char *old, const char *new, time_t age) { struct stat st; time_t t; int fd, ret = 0; fd = open(old, O_RDWR); if(fd < 0) return 0; if(myexcllock(fd) < 0) { close(fd); return 0; } stat(old, &st); t = time(NULL); if(t - st.st_mtime > age) { if(rename(old, new) < 0) ret = 0; else ret = 1; } close(fd); return ret; } int resend_queue(const char *listdir, const char *mlmmjsend) { DIR *queuedir; struct dirent *dp; char *mailname, *fromname, *toname, *reptoname, *from, *to, *repto; char *ch, *dirname = concatstr(2, listdir, "/queue/"); char *bouncelifestr; pid_t childpid, pid; struct stat st; int fromfd, tofd, fd, status, err = 0; time_t t, bouncelife = 0; if(chdir(dirname) < 0) { log_error(LOG_ARGS, "Could not chdir(%s)", dirname); myfree(dirname); return 1; } if((queuedir = opendir(dirname)) == NULL) { log_error(LOG_ARGS, "Could not opendir(%s)", dirname); myfree(dirname); return 1; } myfree(dirname); while((dp = readdir(queuedir)) != NULL) { mailname = concatstr(3, listdir, "/queue/", dp->d_name); if(stat(mailname, &st) < 0) { log_error(LOG_ARGS, "Could not stat(%s)", mailname); myfree(mailname); continue; } if(!S_ISREG(st.st_mode)) { myfree(mailname); continue; } if(strchr(dp->d_name, '.')) { ch = strrchr(mailname, '.'); MY_ASSERT(ch); *ch = '\0'; if(stat(mailname, &st) < 0) { if(errno == ENOENT) { *ch = '.'; unlink(mailname); } } myfree(mailname); continue; } fromname = concatstr(2, mailname, ".mailfrom"); toname = concatstr(2, mailname, ".reciptto"); reptoname = concatstr(2, mailname, ".reply-to"); fromfd = open(fromname, O_RDONLY); if(fromfd < 0) err = errno; tofd = open(toname, O_RDONLY); if((fromfd < 0 && err == ENOENT) || (tofd < 0 && errno == ENOENT)) { unlink(mailname); unlink(fromname); unlink(toname); unlink(reptoname); myfree(mailname); myfree(fromname); myfree(toname); myfree(reptoname); if(fromfd >= 0) close(fromfd); if(tofd >= 0) close(tofd); continue; } from = mygetline(fromfd); chomp(from); close(fromfd); myfree(fromname); to = mygetline(tofd); chomp(to); close(tofd); myfree(toname); fd = open(reptoname, O_RDONLY); if(fd < 0) { myfree(reptoname); repto = NULL; } else { repto = mygetline(fd); chomp(repto); close(fd); myfree(reptoname); } /* before we try again, check and see if it's old */ bouncelifestr = ctrlvalue(listdir, "bouncelife"); if(bouncelifestr) { bouncelife = atol(bouncelifestr); myfree(bouncelifestr); } if(bouncelife == 0) bouncelife = BOUNCELIFE; t = time(NULL); if(t - st.st_mtime > bouncelife) { unlink(mailname); myfree(mailname); myfree(from); myfree(to); myfree(repto); continue; } childpid = fork(); if(childpid < 0) { myfree(mailname); myfree(from); myfree(to); myfree(repto); log_error(LOG_ARGS, "Could not fork"); continue; } if(childpid > 0) { myfree(mailname); myfree(from); myfree(to); myfree(repto); do /* Parent waits for the child */ pid = waitpid(childpid, &status, 0); while(pid == -1 && errno == EINTR); } else { if(repto) { execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-m", mailname, "-F", from, "-T", to, "-R", repto, "-a", (char *)NULL); } else { execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-m", mailname, "-F", from, "-T", to, "-a", (char *)NULL); } log_error(LOG_ARGS, "Could not execlp %s", mlmmjsend); /* This is the child. Exit on failure. */ exit(EXIT_FAILURE); } } closedir(queuedir); return 0; } int resend_requeue(const char *listdir, const char *mlmmjsend) { DIR *queuedir; struct dirent *dp; char *dirname = concatstr(2, listdir, "/requeue/"); char *archivefilename, *subfilename, *subnewname; struct stat st; pid_t childpid, pid; time_t t; int status, fromrequeuedir; if(chdir(dirname) < 0) { log_error(LOG_ARGS, "Could not chdir(%s)", dirname); myfree(dirname); return 1; } if((queuedir = opendir(dirname)) == NULL) { log_error(LOG_ARGS, "Could not opendir(%s)", dirname); myfree(dirname); return 1; } while((dp = readdir(queuedir)) != NULL) { if((strcmp(dp->d_name, "..") == 0) || (strcmp(dp->d_name, ".") == 0)) continue; if(stat(dp->d_name, &st) < 0) { log_error(LOG_ARGS, "Could not stat(%s)",dp->d_name); continue; } if(!S_ISDIR(st.st_mode)) continue; /* Remove old empty directories */ t = time(NULL); if(t - st.st_mtime > (time_t)3600) if(rmdir(dp->d_name) == 0) continue; archivefilename = concatstr(3, listdir, "/archive/", dp->d_name); /* Explicitly initialize for each mail we examine */ fromrequeuedir = 0; if(stat(archivefilename, &st) < 0) { /* Might be it's just not moved to the archive * yet because it's still getting sent, so just * continue */ myfree(archivefilename); /* If the list is set not to archive we want to look * in /requeue/ for a mailfile */ archivefilename = concatstr(4, listdir, "/requeue/", dp->d_name, "/mailfile"); if(stat(archivefilename, &st) < 0) { myfree(archivefilename); continue; } fromrequeuedir = 1; } subfilename = concatstr(3, dirname, dp->d_name, "/subscribers"); if(stat(subfilename, &st) < 0) { if (fromrequeuedir) unlink(archivefilename); myfree(archivefilename); myfree(subfilename); continue; } subnewname = concatstr(2, subfilename, ".resending"); if(rename(subfilename, subnewname) < 0) { log_error(LOG_ARGS, "Could not rename(%s, %s)", subfilename, subnewname); myfree(archivefilename); myfree(subfilename); myfree(subnewname); continue; } myfree(subfilename); childpid = fork(); if(childpid < 0) { myfree(archivefilename); myfree(subnewname); log_error(LOG_ARGS, "Could not fork"); continue; } if(childpid > 0) { myfree(archivefilename); myfree(subnewname); do /* Parent waits for the child */ pid = waitpid(childpid, &status, 0); while(pid == -1 && errno == EINTR); } else { execlp(mlmmjsend, mlmmjsend, "-l", "3", "-L", listdir, "-m", archivefilename, "-s", subnewname, "-a", "-D", (char *)NULL); log_error(LOG_ARGS, "Could not execlp %s", mlmmjsend); /* This is the child. Exit on failure. */ exit(EXIT_FAILURE); } } closedir(queuedir); myfree(dirname); return 0; } int clean_nolongerbouncing(const char *listdir) { DIR *bouncedir; char *dirname = concatstr(2, listdir, "/bounce/"); char *filename, *probetimestr, *s; int probefd; time_t probetime, t; struct dirent *dp; struct stat st; if(chdir(dirname) < 0) { log_error(LOG_ARGS, "Could not chdir(%s)", dirname); myfree(dirname); return 1; } if((bouncedir = opendir(dirname)) == NULL) { log_error(LOG_ARGS, "Could not opendir(%s)", dirname); myfree(dirname); return 1; } myfree(dirname); while((dp = readdir(bouncedir)) != NULL) { if((strcmp(dp->d_name, "..") == 0) || (strcmp(dp->d_name, ".") == 0)) continue; filename = mystrdup(dp->d_name); s = strrchr(filename, '-'); if(s && (strcmp(s, "-probe") == 0)) { if(stat(filename, &st) < 0) { log_error(LOG_ARGS, "Could not stat(%s)", filename); myfree(filename); continue; } probefd = open(filename, O_RDONLY); if(probefd < 0) { myfree(filename); continue; } probetimestr = mygetline(probefd); if(probetimestr == NULL) { myfree(filename); continue; } close(probefd); chomp(probetimestr); probetime = (time_t)strtol(probetimestr, NULL, 10); myfree(probetimestr); t = time(NULL); if(t - probetime > WAITPROBE) { unlink(filename); /* remove -probe onwards from filename */ *s = '\0'; unlink(filename); s = concatstr(2, filename, ".lastmsg"); unlink(s); myfree(s); } } myfree(filename); } closedir(bouncedir); return 0; } int probe_bouncers(const char *listdir, const char *mlmmjbounce) { DIR *bouncedir; char *dirname = concatstr(2, listdir, "/bounce/"); char *probefile, *s; struct dirent *dp; struct stat st; pid_t pid, childpid; int status; if(chdir(dirname) < 0) { log_error(LOG_ARGS, "Could not chdir(%s)", dirname); myfree(dirname); return 1; } if((bouncedir = opendir(dirname)) == NULL) { log_error(LOG_ARGS, "Could not opendir(%s)", dirname); myfree(dirname); return 1; } myfree(dirname); while((dp = readdir(bouncedir)) != NULL) { if((strcmp(dp->d_name, "..") == 0) || (strcmp(dp->d_name, ".") == 0)) continue; s = strrchr(dp->d_name, '-'); if(s && (strcmp(s, "-probe") == 0)) continue; s = strrchr(dp->d_name, '.'); if(s && (strcmp(s, ".lastmsg") == 0)) continue; if(stat(dp->d_name, &st) < 0) { log_error(LOG_ARGS, "Could not stat(%s)", dp->d_name); continue; } probefile = concatstr(2, dp->d_name, "-probe"); /* Skip files which already have a probe out */ if(stat(probefile, &st) == 0) { myfree(probefile); continue; } myfree(probefile); childpid = fork(); if(childpid < 0) { log_error(LOG_ARGS, "Could not fork"); continue; } if(childpid > 0) { do /* Parent waits for the child */ pid = waitpid(childpid, &status, 0); while(pid == -1 && errno == EINTR); } else { probefile = mystrdup(dp->d_name); execlp(mlmmjbounce, mlmmjbounce, "-L", listdir, "-a", probefile, "-p", (char *)NULL); log_error(LOG_ARGS, "Could not execlp %s", mlmmjbounce); /* This is the child. Exit on failure. */ exit(EXIT_FAILURE); } } closedir(bouncedir); return 0; } int unsub_bouncers(const char *listdir, const char *mlmmjunsub) { DIR *bouncedir; char *dirname = concatstr(2, listdir, "/bounce/"); char *probefile, *address, *a, *firstbounce, *bouncedata; char *bouncelifestr; struct dirent *dp; struct stat st; pid_t pid, childpid; int status, fd; time_t bouncetime, t, bouncelife = 0; if(chdir(dirname) < 0) { log_error(LOG_ARGS, "Could not chdir(%s)", dirname); myfree(dirname); return 1; } if((bouncedir = opendir(dirname)) == NULL) { log_error(LOG_ARGS, "Could not opendir(%s)", dirname); myfree(dirname); return 1; } myfree(dirname); bouncelifestr = ctrlvalue(listdir, "bouncelife"); if(bouncelifestr) { bouncelife = atol(bouncelifestr); myfree(bouncelifestr); } if(bouncelife == 0) bouncelife = BOUNCELIFE; while((dp = readdir(bouncedir)) != NULL) { if((strcmp(dp->d_name, "..") == 0) || (strcmp(dp->d_name, ".") == 0)) continue; a = strrchr(dp->d_name, '-'); if(a && (strcmp(a, "-probe") == 0)) continue; a = strrchr(dp->d_name, '.'); if(a && (strcmp(a, ".lastmsg") == 0)) continue; if(stat(dp->d_name, &st) < 0) { log_error(LOG_ARGS, "Could not stat(%s)", dp->d_name); continue; } probefile = concatstr(2, dp->d_name, "-probe"); /* Skip files which already have a probe out */ if(stat(probefile, &st) == 0) { myfree(probefile); continue; } myfree(probefile); /* Get the first line of the bounce file to check if it's * been bouncing for long enough */ fd = open(dp->d_name, O_RDONLY); if(fd < 0) { log_error(LOG_ARGS, "Could not open %s", dp->d_name); continue; } firstbounce = mygetline(fd); close(fd); if(firstbounce == NULL) continue; /* End the string at the comment */ a = strchr(firstbounce, '#'); if(a == NULL) { myfree(firstbounce); continue; } *a = '\0'; bouncedata = mystrdup(a+1); /* Save for the log */ chomp(bouncedata); a = strchr(firstbounce, ':'); if(a == NULL) { myfree(firstbounce); myfree(bouncedata); continue; } a++; /* Increase to first digit */ bouncetime = (time_t)strtol(a, NULL, 10); myfree(firstbounce); t = time(NULL); if(t - bouncetime < bouncelife + WAITPROBE) { myfree(bouncedata); continue; /* ok, don't unsub this one */ } /* Ok, go ahead and unsubscribe the address */ address = mystrdup(dp->d_name); a = strchr(address, '='); if(a == NULL) { /* skip malformed */ myfree(address); myfree(bouncedata); continue; } *a = '@'; childpid = fork(); if(childpid < 0) { log_error(LOG_ARGS, "Could not fork"); myfree(address); myfree(bouncedata); continue; } if(childpid > 0) { log_oper(listdir, OPLOGFNAME, "mlmmj-maintd: %s" " unsubscribed due to bouncing since" " %s", address, bouncedata); myfree(address); myfree(bouncedata); do /* Parent waits for the child */ pid = waitpid(childpid, &status, 0); while(pid == -1 && errno == EINTR); unlink(dp->d_name); a = concatstr(2, dp->d_name, ".lastmsg"); unlink(a); myfree(a); } else { execlp(mlmmjunsub, mlmmjunsub, "-L", listdir, "-b", "-a", address, (char *)NULL); log_error(LOG_ARGS, "Could not execlp %s", mlmmjunsub); /* This is the child. Exit on failure. */ exit(EXIT_FAILURE); } } closedir(bouncedir); return 0; } int run_digests(const char *listdir, const char *mlmmjsend) { char *lasttimestr, *lastindexstr, *lastissuestr; char *digestname, *indexname; char *digestintervalstr, *digestmaxmailsstr; char *s1, *s2, *s3; time_t digestinterval, t, lasttime; long digestmaxmails, lastindex, index, lastissue; int fd, indexfd, lock; size_t lenbuf, lenstr; if (statctrl(listdir, "noarchive")) { return 0; } digestintervalstr = ctrlvalue(listdir, "digestinterval"); if (digestintervalstr) { digestinterval = (time_t)atol(digestintervalstr); myfree(digestintervalstr); } else { digestinterval = (time_t)DIGESTINTERVAL; } digestmaxmailsstr = ctrlvalue(listdir, "digestmaxmails"); if (digestmaxmailsstr) { digestmaxmails = atol(digestmaxmailsstr); myfree(digestmaxmailsstr); } else { digestmaxmails = DIGESTMAXMAILS; } digestname = concatstr(2, listdir, "/lastdigest"); fd = open(digestname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); if (fd < 0) { log_error(LOG_ARGS, "Could not open '%s'", digestname); myfree(digestname); return 1; } lock = myexcllock(fd); if(lock) { log_error(LOG_ARGS, "Error locking lastdigest"); myfree(digestname); close(fd); return 1; } s1 = mygetline(fd); /* Syntax is lastindex:lasttime or lastindex:lasttime:lastissue */ if (s1 && (lasttimestr = strchr(s1, ':'))) { *(lasttimestr++) = '\0'; if ((lastissuestr = strchr(lasttimestr, ':'))) { *(lastissuestr++) = '\0'; lastissue = atol(lastissuestr); } else { lastissue = 0; } lasttime = atol(lasttimestr); lastindexstr = s1; lastindex = atol(lastindexstr); } else { if (s1 && (strlen(s1) > 0)) { log_error(LOG_ARGS, "'%s' contains malformed data", digestname); myfree(digestname); myfree(s1); close(fd); return 1; } /* If lastdigest is empty, we start from scratch */ lasttime = 0; lastindex = 0; lastissue = 0; } indexname = concatstr(2, listdir, "/index"); indexfd = open(indexname, O_RDONLY); if (indexfd < 0) { log_error(LOG_ARGS, "Could not open '%s'", indexname); myfree(digestname); myfree(indexname); myfree(s1); close(fd); return 1; } s2 = mygetline(indexfd); close(indexfd); if (!s2) { /* If we don't have an index, no mails have been sent to the * list, and therefore we don't need to send a digest */ myfree(digestname); myfree(indexname); myfree(s1); close(fd); return 1; } index = atol(s2); t = time(NULL); if ((t - lasttime >= digestinterval) || (index - lastindex >= digestmaxmails)) { if (index > lastindex+digestmaxmails) index = lastindex+digestmaxmails; if (index > lastindex) { lastissue++; send_digest(listdir, lastindex+1, index, lastissue, NULL, mlmmjsend); } if (lseek(fd, 0, SEEK_SET) < 0) { log_error(LOG_ARGS, "Could not seek '%s'", digestname); } else { /* index + ':' + time + ':' + issue + '\n' + '\0' */ lenbuf = 20 + 1 + 20 + 1 + 20 + 2; s3 = mymalloc(lenbuf); lenstr = snprintf(s3, lenbuf, "%ld:%ld:%ld\n", index, (long)t, lastissue); if (lenstr >= lenbuf) lenstr = lenbuf - 1; if (writen(fd, s3, lenstr) == -1) { log_error(LOG_ARGS, "Could not write new '%s'", digestname); } myfree(s3); } } myfree(digestname); myfree(indexname); myfree(s1); myfree(s2); close(fd); return 0; } void do_maintenance(const char *listdir, const char *mlmmjsend, const char *mlmmjbounce, const char *mlmmjunsub) { char *random, *logname, *logstr; char timenow[64]; struct stat st; int maintdlogfd; uid_t uid = getuid(); time_t t; if(!listdir) return; if(stat(listdir, &st) < 0) { log_error(LOG_ARGS, "Could not stat(%s) " "No maintenance run performed.", listdir); return; } if(uid == 0) { /* We're root. Do something about it.*/ if(setuid(st.st_uid) < 0) { log_error(LOG_ARGS, "Could not setuid listdir owner."); return; } } else if(uid != st.st_uid) { log_error(LOG_ARGS, "User ID not equal to the ID of %s. No " "maintenance run performed.", listdir); return; } if(chdir(listdir) < 0) { log_error(LOG_ARGS, "Could not chdir(%s). " "No maintenance run performed.", listdir); return; } random = random_str(); logname = concatstr(3, listdir, "/maintdlog-", random); myfree(random); maintdlogfd = open(logname, O_WRONLY|O_EXCL|O_CREAT, S_IRUSR|S_IWUSR); if(maintdlogfd < 0) { log_error(LOG_ARGS, "Could not open %s", logname); myfree(logname); return; } t = time(NULL); if(ctime_r(&t, timenow)) WRITEMAINTLOG4(3, "Starting maintenance run at ", timenow, "\n"); WRITEMAINTLOG4(3, "clean_moderation(", listdir, ");\n"); clean_moderation(listdir); WRITEMAINTLOG4(3, "clean_discarded(", listdir, ");\n"); clean_discarded(listdir); WRITEMAINTLOG4(3, "clean_subconf(", listdir, ");\n"); clean_subconf(listdir); WRITEMAINTLOG4(3, "clean_unsubconf(", listdir, ");\n"); clean_unsubconf(listdir); WRITEMAINTLOG6(5, "resend_queue(", listdir, ", ", mlmmjsend, ");\n"); resend_queue(listdir, mlmmjsend); WRITEMAINTLOG6(5, "resend_requeue(", listdir, ", ", mlmmjsend, ");\n"); resend_requeue(listdir, mlmmjsend); WRITEMAINTLOG4(3, "clean_nolongerbouncing(", listdir, ");\n"); clean_nolongerbouncing(listdir); WRITEMAINTLOG6(5, "unsub_bouncers(", listdir, ", ", mlmmjunsub, ");\n"); unsub_bouncers(listdir, mlmmjunsub); WRITEMAINTLOG6(5, "probe_bouncers(", listdir, ", ", mlmmjbounce, ");\n"); probe_bouncers(listdir, mlmmjbounce); WRITEMAINTLOG6(5, "run_digests(", listdir, ", ", mlmmjsend, ");\n"); run_digests(listdir, mlmmjsend); close(maintdlogfd); logstr = concatstr(3, listdir, "/", MAINTD_LOGFILE); if(rename(logname, logstr) < 0) log_error(LOG_ARGS, "Could not rename(%s,%s)", logname, logstr); myfree(logname); myfree(logstr); } int main(int argc, char **argv) { int opt, daemonize = 1, ret = 0; char *bindir, *listdir = NULL, *mlmmjsend, *mlmmjbounce, *mlmmjunsub; char *dirlists = NULL, *s, *listiter; struct stat st; struct dirent *dp; DIR *dirp; CHECKFULLPATH(argv[0]); log_set_name(argv[0]); while ((opt = getopt(argc, argv, "hFVL:d:")) != -1) { switch(opt) { case 'd': dirlists = optarg; break; case 'F': daemonize = 0; break; case 'L': listdir = optarg; break; case 'h': print_help(argv[0]); break; case 'V': print_version(argv[0]); exit(EXIT_SUCCESS); } } if(listdir == NULL && dirlists == NULL) { fprintf(stderr, "You have to specify -d or -L\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } if(listdir && dirlists) { fprintf(stderr, "You have to specify either -d or -L\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } bindir = mydirname(argv[0]); mlmmjsend = concatstr(2, bindir, "/mlmmj-send"); mlmmjbounce = concatstr(2, bindir, "/mlmmj-bounce"); mlmmjunsub = concatstr(2, bindir, "/mlmmj-unsub"); myfree(bindir); if(daemonize) { if(dirlists) ret = mydaemon(dirlists); else ret = mydaemon(listdir); } if(daemonize && ret < 0) { log_error(LOG_ARGS, "Could not daemonize. Only one " "maintenance run will be done."); daemonize = 0; } while(1) { if(listdir) { do_maintenance(listdir, mlmmjsend, mlmmjbounce, mlmmjunsub); goto mainsleep; } if(chdir(dirlists) < 0) { log_error(LOG_ARGS, "Could not chdir(%s).", dirlists); myfree(mlmmjbounce); myfree(mlmmjsend); myfree(mlmmjunsub); exit(EXIT_FAILURE); } if((dirp = opendir(dirlists)) == NULL) { log_error(LOG_ARGS, "Could not opendir(%s).", dirlists); myfree(mlmmjbounce); myfree(mlmmjsend); myfree(mlmmjunsub); exit(EXIT_FAILURE); } while((dp = readdir(dirp)) != NULL) { if((strcmp(dp->d_name, "..") == 0) || (strcmp(dp->d_name, ".") == 0)) continue; listiter = concatstr(3, dirlists, "/", dp->d_name); if(stat(listiter, &st) < 0) { log_error(LOG_ARGS, "Could not stat(%s)", listiter); myfree(listiter); continue; } if(!S_ISDIR(st.st_mode)) { myfree(listiter); continue; } s = concatstr(2, listiter, "/control/listaddress"); ret = stat(s, &st); myfree(s); if(ret < 0) { /* If ret < 0 it's not a listiter */ myfree(listiter); continue; } do_maintenance(listiter, mlmmjsend, mlmmjbounce, mlmmjunsub); myfree(listiter); } closedir(dirp); mainsleep: if(!daemonize) break; else sleep(MAINTD_SLEEP); } myfree(mlmmjbounce); myfree(mlmmjsend); myfree(mlmmjunsub); log_free_name(); exit(EXIT_SUCCESS); } mlmmj-1.2.18.0/src/mlmmj-make-ml000644 000765 000120 00000007300 11761151570 016121 0ustar00benadmin000000 000000 #!/bin/sh # # mlmmj-make-ml - henne@hennevogel.de # VERSION="0.1" DEFAULTDIR="/var/spool/mlmmj" ALIASFILE=/etc/aliases USAGE="mlmmj-make-ml $VERSION $0 [-h] [-L listname] [-s spooldir] [-a] [-c user] [-z] -h: display this help text -L: the name of the mailing list -s: your spool directory (default $DEFAULTDIR) -a: create the needed entries in your $ALIASFILE file -c: user to chown the spool directory to (default not to chown at all) -z: do nothing for now " while getopts ":hL:s:azc:" Option do case "$Option" in h ) echo "$USAGE" exit 0 ;; z ) echo -n "nothing" exit 0 ;; L ) LISTNAME="$OPTARG" ;; s ) SPOOLDIR="$OPTARG" ;; a ) A_CREATE="YES" ;; c ) DO_CHOWN=1 CHOWN="$OPTARG" ;; * ) echo "$0: invalid option" echo "Try $0 -h for more information." exit 1 esac done SHIFTVAL=$((OPTIND-1)) shift $SHIFTVAL if [ -z "$SPOOLDIR" ]; then SPOOLDIR="$DEFAULTDIR" fi echo "Creating Directorys below $SPOOLDIR. Use '-s spooldir' to change" if [ -z "$LISTNAME" ]; then echo -n "What should the name of the Mailinglist be? [mlmmj-test] : " read LISTNAME if [ -z "$LISTNAME" ]; then LISTNAME="mlmmj-test" fi fi LISTDIR="$SPOOLDIR/$LISTNAME" mkdir -p $LISTDIR for DIR in incoming queue queue/discarded archive text subconf unsubconf \ bounce control moderation subscribers.d digesters.d requeue \ nomailsubs.d do mkdir "$LISTDIR"/"$DIR" done test -f "$LISTDIR"/index || touch "$LISTDIR"/index echo -n "The Domain for the List? [] : " read FQDN if [ -z "$FQDN" ]; then FQDN=`domainname -f` fi echo -n "The emailaddress of the list owner? [postmaster] : " read OWNER if [ -z "$OWNER" ]; then OWNER="postmaster" fi echo "$OWNER" > "$LISTDIR"/"control/owner" ( cd "/usr/local/share/mlmmj/text.skel" echo echo "For the list texts you can choose between the following languages or" echo "give a absolute path to a directory containing the texts." echo echo "Available languages:" ls TEXTPATHDEF=en echo -n "The path to texts for the list? [$TEXTPATHDEF] : " read TEXTPATHIN if [ -z "$TEXTPATHIN" ] ; then TEXTPATH="$TEXTPATHDEF" else TEXTPATH="$TEXTPATHIN" fi if [ ! -d "$TEXTPATH" ]; then echo echo "**NOTE** Could not copy the texts for the list" echo "Please manually copy the files from the listtexts/ directory" echo "in the source distribution of mlmmj." sleep 2 else cp "$TEXTPATH"/* "$LISTDIR"/"text" fi ) LISTADDRESS="$LISTNAME@$FQDN" echo "$LISTADDRESS" > "$LISTDIR"/control/"listaddress" MLMMJRECEIVE=`which mlmmj-receive 2>/dev/null` if [ -z "$MLMMJRECEIVE" ]; then MLMMJRECEIVE="/path/to/mlmmj-receive" fi MLMMJMAINTD=`which mlmmj-maintd 2>/dev/null` if [ -z "$MLMMJMAINTD" ]; then MLMMJMAINTD="/path/to/mlmmj-maintd" fi ALIAS="$LISTNAME: \"|$MLMMJRECEIVE -L $SPOOLDIR/$LISTNAME/\"" CRONENTRY="0 */2 * * * \"$MLMMJMAINTD -F -L $SPOOLDIR/$LISTNAME/\"" if [ -n "$A_CREATE" ]; then echo "I want to add the following to your $ALIASFILE file:" echo "$ALIAS" echo -n "is this ok? [y/N] : " read OKIDOKI case $OKIDOKI in y|Y) echo "$ALIAS" >> $ALIASFILE ;; n|N) exit 0 ;; *) echo "Options was: y, Y, n or N" esac else echo echo "Don't forget to add this to $ALIASFILE:" echo "$ALIAS" fi if [ "$DO_CHOWN" ] ; then echo echo -n "chown -R $CHOWN $SPOOLDIR/$LISTNAME? [y/n]: " read OKIDOKI case $OKIDOKI in y|Y) chown -R $CHOWN $SPOOLDIR/$LISTNAME ;; n|N) exit 0 ;; *) echo "option is: y, Y, n, N" ;; esac fi echo echo "If you're not starting mlmmj-maintd in daemon mode," echo "don't forget to add this to your crontab:" echo "$CRONENTRY" echo echo " ** FINAL NOTES ** 1) The mailinglist directory have to be owned by the user running the mailserver (i.e. starting the binaries to work the list) 2) Run newaliases" mlmmj-1.2.18.0/src/mlmmj-make-ml.in000755 000765 000120 00000007254 11734220454 016537 0ustar00benadmin000000 000000 #!/bin/sh # # mlmmj-make-ml - henne@hennevogel.de # VERSION="0.1" DEFAULTDIR="/var/spool/mlmmj" ALIASFILE=/etc/aliases USAGE="mlmmj-make-ml $VERSION $0 [-h] [-L listname] [-s spooldir] [-a] [-c user] [-z] -h: display this help text -L: the name of the mailing list -s: your spool directory (default $DEFAULTDIR) -a: create the needed entries in your $ALIASFILE file -c: user to chown the spool directory to (default not to chown at all) -z: do nothing for now " while getopts ":hL:s:azc:" Option do case "$Option" in h ) echo "$USAGE" exit 0 ;; z ) echo -n "nothing" exit 0 ;; L ) LISTNAME="$OPTARG" ;; s ) SPOOLDIR="$OPTARG" ;; a ) A_CREATE="YES" ;; c ) DO_CHOWN=1 CHOWN="$OPTARG" ;; * ) echo "$0: invalid option" echo "Try $0 -h for more information." exit 1 esac done SHIFTVAL=$((OPTIND-1)) shift $SHIFTVAL if [ -z "$SPOOLDIR" ]; then SPOOLDIR="$DEFAULTDIR" fi echo "Creating Directorys below $SPOOLDIR. Use '-s spooldir' to change" if [ -z "$LISTNAME" ]; then echo -n "What should the name of the Mailinglist be? [mlmmj-test] : " read LISTNAME if [ -z "$LISTNAME" ]; then LISTNAME="mlmmj-test" fi fi LISTDIR="$SPOOLDIR/$LISTNAME" mkdir -p $LISTDIR for DIR in incoming queue queue/discarded archive text subconf unsubconf \ bounce control moderation subscribers.d digesters.d requeue \ nomailsubs.d do mkdir "$LISTDIR"/"$DIR" done test -f "$LISTDIR"/index || touch "$LISTDIR"/index echo -n "The Domain for the List? [] : " read FQDN if [ -z "$FQDN" ]; then FQDN=`domainname -f` fi echo -n "The emailaddress of the list owner? [postmaster] : " read OWNER if [ -z "$OWNER" ]; then OWNER="postmaster" fi echo "$OWNER" > "$LISTDIR"/"control/owner" ( cd "@textlibdir@" echo echo "For the list texts you can choose between the following languages or" echo "give a absolute path to a directory containing the texts." echo echo "Available languages:" ls TEXTPATHDEF=en echo -n "The path to texts for the list? [$TEXTPATHDEF] : " read TEXTPATHIN if [ -z "$TEXTPATHIN" ] ; then TEXTPATH="$TEXTPATHDEF" else TEXTPATH="$TEXTPATHIN" fi if [ ! -d "$TEXTPATH" ]; then echo echo "**NOTE** Could not copy the texts for the list" echo "Please manually copy the files from the listtexts/ directory" echo "in the source distribution of mlmmj." sleep 2 else cp "$TEXTPATH"/* "$LISTDIR"/"text" fi ) LISTADDRESS="$LISTNAME@$FQDN" echo "$LISTADDRESS" > "$LISTDIR"/control/"listaddress" MLMMJRECEIVE=`which mlmmj-receive 2>/dev/null` if [ -z "$MLMMJRECEIVE" ]; then MLMMJRECEIVE="/path/to/mlmmj-receive" fi MLMMJMAINTD=`which mlmmj-maintd 2>/dev/null` if [ -z "$MLMMJMAINTD" ]; then MLMMJMAINTD="/path/to/mlmmj-maintd" fi ALIAS="$LISTNAME: \"|$MLMMJRECEIVE -L $SPOOLDIR/$LISTNAME/\"" CRONENTRY="0 */2 * * * \"$MLMMJMAINTD -F -L $SPOOLDIR/$LISTNAME/\"" if [ -n "$A_CREATE" ]; then echo "I want to add the following to your $ALIASFILE file:" echo "$ALIAS" echo -n "is this ok? [y/N] : " read OKIDOKI case $OKIDOKI in y|Y) echo "$ALIAS" >> $ALIASFILE ;; n|N) exit 0 ;; *) echo "Options was: y, Y, n or N" esac else echo echo "Don't forget to add this to $ALIASFILE:" echo "$ALIAS" fi if [ "$DO_CHOWN" ] ; then echo echo -n "chown -R $CHOWN $SPOOLDIR/$LISTNAME? [y/n]: " read OKIDOKI case $OKIDOKI in y|Y) chown -R $CHOWN $SPOOLDIR/$LISTNAME ;; n|N) exit 0 ;; *) echo "option is: y, Y, n, N" ;; esac fi echo echo "If you're not starting mlmmj-maintd in daemon mode," echo "don't forget to add this to your crontab:" echo "$CRONENTRY" echo echo " ** FINAL NOTES ** 1) The mailinglist directory have to be owned by the user running the mailserver (i.e. starting the binaries to work the list) 2) Run newaliases" mlmmj-1.2.18.0/src/mlmmj-process.c000644 000765 000120 00000075047 11735441471 016515 0ustar00benadmin000000 000000 /* Copyright (C) 2003, 2003, 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "wrappers.h" #include "find_email_adr.h" #include "incindexfile.h" #include "getlistaddr.h" #include "getlistdelim.h" #include "listcontrol.h" #include "strgen.h" #include "do_all_the_voodoo_here.h" #include "log_error.h" #include "mygetline.h" #include "statctrl.h" #include "ctrlvalue.h" #include "ctrlvalues.h" #include "getlistaddr.h" #include "prepstdreply.h" #include "subscriberfuncs.h" #include "memory.h" #include "log_oper.h" #include "chomp.h" #include "unistr.h" enum action { ALLOW, SEND, DENY, MODERATE, DISCARD }; static char *action_strs[] = { "allowed", "sent", "denied", "moderated", "discarded" }; enum modreason { MODNONSUBPOSTS, ACCESS, MODERATED }; static char *modreason_strs[] = { "modnonsubposts", "access", "moderated" }; static void newmoderated(const char *listdir, const char *mailfilename, const char *mlmmjsend, const char *efromsender, const char *subject, const char *posteraddr, enum modreason modreason) { char *from, *listfqdn, *listname, *moderators = NULL; char *buf, *replyto, *listaddr = getlistaddr(listdir), *listdelim; text *txt; memory_lines_state *mls; char *queuefilename = NULL, *moderatorsfilename, *efromismod = NULL; char *mailbasename = mybasename(mailfilename), *tmp, *to, *reject; int moderatorsfd, foundaddr = 0, notifymod = 0, status; pid_t childpid, pid; #if 0 printf("mailfilename = [%s], mailbasename = [%s]\n", mailfilename, mailbasename); #endif listfqdn = genlistfqdn(listaddr); listname = genlistname(listaddr); moderatorsfilename = concatstr(2, listdir, "/control/moderators"); if((moderatorsfd = open(moderatorsfilename, O_RDONLY)) < 0) { log_error(LOG_ARGS, "Could not open '%s'", moderatorsfilename); myfree(moderatorsfilename); exit(EXIT_FAILURE); } myfree(moderatorsfilename); if(statctrl(listdir, "ifmodsendonlymodmoderate")) efromismod = concatstr(2, efromsender, "\n"); while((buf = mygetline(moderatorsfd))) { if(efromismod && strcmp(buf, efromismod) == 0) foundaddr = 1; tmp = moderators; moderators = concatstr(2, moderators, buf); myfree(buf); myfree(tmp); } if(!foundaddr) { myfree(efromismod); efromismod = NULL; } if(efromismod) mls = init_memory_lines(efromismod); else mls = init_memory_lines(moderators); close(moderatorsfd); myfree(moderators); listdelim = getlistdelim(listdir); replyto = concatstr(6, listname, listdelim, "release-", mailbasename, "@", listfqdn); reject = concatstr(6, listname, listdelim, "reject-", mailbasename, "@", listfqdn); from = concatstr(4, listname, listdelim, "owner@", listfqdn); to = concatstr(3, listname, "-moderators@", listfqdn); /* FIXME JFA: Should this be converted? Why, why not? */ myfree(listdelim); myfree(listname); myfree(listfqdn); txt = open_text(listdir, "moderate", "post", modreason_strs[modreason], NULL, "moderation"); MY_ASSERT(txt); register_unformatted(txt, "subject", subject); register_unformatted(txt, "posteraddr", posteraddr); register_unformatted(txt, "moderateaddr", replyto); /* DEPRECATED */ register_unformatted(txt, "releaseaddr", replyto); register_unformatted(txt, "rejectaddr", reject); register_unformatted(txt, "moderators", "%moderators%"); /* DEPRECATED */ register_formatted(txt, "moderators", rewind_memory_lines, get_memory_line, mls); register_originalmail(txt, mailfilename); queuefilename = prepstdreply(txt, listdir, "$listowner$", to, replyto); MY_ASSERT(queuefilename); close_text(txt); /* we might need to exec more than one mlmmj-send */ notifymod = !efromismod && statctrl(listdir,"notifymod"); if (notifymod) { childpid = fork(); if(childpid < 0) log_error(LOG_ARGS, "Could not fork; poster not notified"); } else childpid = -1; if(childpid != 0) { if(childpid > 0) { do /* Parent waits for the child */ pid = waitpid(childpid, &status, 0); while(pid == -1 && errno == EINTR); } finish_memory_lines(mls); if(efromismod) execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-F", from, "-m", queuefilename, "-T", efromsender, (char *)NULL); else execlp(mlmmjsend, mlmmjsend, "-l", "2", "-L", listdir, "-F", from, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } myfree(queuefilename); /* send mail to poster that the list is moderated */ txt = open_text(listdir, "wait", "post", modreason_strs[modreason], NULL, "moderation-poster"); MY_ASSERT(txt); register_unformatted(txt, "subject", subject); register_unformatted(txt, "posteraddr", posteraddr); register_unformatted(txt, "moderators", "%moderators%"); /* DEPRECATED */ register_formatted(txt, "moderators", rewind_memory_lines, get_memory_line, mls); register_originalmail(txt, mailfilename); queuefilename = prepstdreply(txt, listdir, "$listowner$", efromsender, NULL); MY_ASSERT(queuefilename); close_text(txt); finish_memory_lines(mls); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-F", from, "-m", queuefilename, "-T", efromsender, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } static enum action do_access(struct strlist *rule_strs, struct strlist *hdrs, const char *from, const char *listdir) { int i, j; unsigned int match; char *rule_ptr; char errbuf[128]; int err; enum action act; unsigned int not; regex_t regexp; char *hdr; for (i=0; icount; i++) { rule_ptr = rule_strs->strs[i]; if (strncmp(rule_ptr, "allow", 5) == 0) { rule_ptr += 5; act = ALLOW; } else if (strncmp(rule_ptr, "send", 4) == 0) { rule_ptr += 4; act = SEND; } else if (strncmp(rule_ptr, "deny", 4) == 0) { rule_ptr += 4; act = DENY; } else if (strncmp(rule_ptr, "moderate", 8) == 0) { rule_ptr += 8; act = MODERATE; } else if (strncmp(rule_ptr, "discard", 7) == 0) { rule_ptr += 7; act = DISCARD; } else { errno = 0; log_error(LOG_ARGS, "Unable to parse rule #%d \"%s\":" " Missing action keyword. Denying post from \"%s\"", i, rule_strs->strs[i], from); log_oper(listdir, OPLOGFNAME, "Unable to parse rule #%d \"%s\":" " Missing action keyword. Denying post from \"%s\"", i, rule_strs->strs[i], from); return DENY; } if (*rule_ptr == ' ') { rule_ptr++; } else if (*rule_ptr == '\0') { /* the rule is a keyword and no regexp */ log_oper(listdir, OPLOGFNAME, "mlmmj-process: access -" " A mail from \"%s\" was %s by rule #%d \"%s\"", from, action_strs[act], i, rule_strs->strs[i]); return act; } else { /* we must have space or end of string */ errno = 0; log_error(LOG_ARGS, "Unable to parse rule #%d \"%s\":" " Invalid character after action keyword." " Denying post from \"%s\"", i, rule_strs->strs[i], from); log_oper(listdir, OPLOGFNAME, "Unable to parse rule #%d \"%s\":" " Invalid character after action keyword." " Denying post from \"%s\"", i, rule_strs->strs[i], from); return DENY; } if (*rule_ptr == '!') { rule_ptr++; not = 1; } else { not = 0; } /* remove unanchored ".*" from beginning of regexp to stop the * regexp matching to loop so long time it seems like it's * hanging */ if (strncmp(rule_ptr, "^.*", 3) == 0) { rule_ptr += 3; } while (strncmp(rule_ptr, ".*", 2) == 0) { rule_ptr += 2; } if ((err = regcomp(®exp, rule_ptr, REG_EXTENDED | REG_NOSUB | REG_ICASE))) { regerror(err, ®exp, errbuf, sizeof(errbuf)); regfree(®exp); errno = 0; log_error(LOG_ARGS, "regcomp() failed for rule #%d \"%s\"" " (message: '%s') (expression: '%s')" " Denying post from \"%s\"", i, rule_strs->strs[i], errbuf, rule_ptr, from); log_oper(listdir, OPLOGFNAME, "regcomp() failed for rule" " #%d \"%s\" (message: '%s') (expression: '%s')" " Denying post from \"%s\"", i, rule_strs->strs[i], errbuf, rule_ptr, from); return DENY; } match = 0; for (j=0; jcount; j++) { if (regexec(®exp, hdrs->strs[j], 0, NULL, 0) == 0) { match = 1; break; } } regfree(®exp); if (match != not) { if (match) { hdr = mystrdup(hdrs->strs[j]); chomp(hdr); log_oper(listdir, OPLOGFNAME, "mlmmj-process: access -" " A mail from \"%s\" with header \"%s\" was %s by" " rule #%d \"%s\"", from, hdr, action_strs[act], i, rule_strs->strs[i]); myfree(hdr); } else { log_oper(listdir, OPLOGFNAME, "mlmmj-process: access -" " A mail from \"%s\" was %s by rule #%d \"%s\"" " because no header matched.", from, action_strs[act], i, rule_strs->strs[i]); } return act; } } log_oper(listdir, OPLOGFNAME, "mlmmj-process: access -" " A mail from \"%s\" didn't match any rules, and" " was denied by default.", from); return DENY; } static char *recipient_extra(const char *listdir, const char *addr) { char *listdelim; char *delim, *atsign, *ret; size_t len; if (!addr) return NULL; listdelim = getlistdelim(listdir); delim = strstr(addr, listdelim); if (!delim) { myfree(listdelim); return NULL; } delim += strlen(listdelim); myfree(listdelim); atsign = strrchr(delim, '@'); if (!atsign) return NULL; len = atsign - delim; ret = (char *)mymalloc(len + 1); strncpy(ret, delim, len); ret[len] = '\0'; return ret; } static void print_help(const char *prg) { printf("Usage: %s -L /path/to/list\n" " -m /path/to/mail [-h] [-P] [-V]\n" " -h: This help\n" " -L: Full path to list directory\n" " -m: Full path to mail file\n" " -P: Don't execute mlmmj-send\n" " -V: Print version\n", prg); exit(EXIT_SUCCESS); } int main(int argc, char **argv) { int i, j, opt, noprocess = 0, moderated = 0, send = 0; enum modreason modreason; int hdrfd, footfd, rawmailfd, donemailfd, omitfd; int addrtocc = 1, intocc = 0; int maxmailsize = 0; int notmetoo = 0; char *listdir = NULL, *mailfile = NULL, *headerfilename = NULL; char *footerfilename = NULL, *donemailname = NULL; char *randomstr = NULL, *mqueuename, *omitfilename; char *mlmmjsend, *mlmmjsub, *mlmmjunsub, *mlmmjbounce; char *bindir, *subjectprefix, *discardname, *listaddr, *listdelim; char *listfqdn, *listname, *fromaddr; text *txt; char *queuefilename, *recipextra = NULL, *owner = NULL; char *maxmailsizestr; char *subject = NULL, *posteraddr = NULL; char *envstr, *efrom; struct stat st; uid_t uid; struct email_container fromemails = { 0, NULL }; struct email_container toemails = { 0, NULL }; struct email_container ccemails = { 0, NULL }; struct email_container rpemails = { 0, NULL }; struct email_container dtemails = { 0, NULL }; struct strlist *access_rules = NULL; struct strlist *delheaders = NULL; struct strlist allheaders; struct strlist *alternates = NULL; struct mailhdr readhdrs[] = { { "From:", 0, NULL }, { "To:", 0, NULL }, { "Cc:", 0, NULL }, { "Return-Path:", 0, NULL }, { "Delivered-To:", 0, NULL }, { "Subject:", 0, NULL }, { NULL, 0, NULL } }; CHECKFULLPATH(argv[0]); log_set_name(argv[0]); bindir = mydirname(argv[0]); mlmmjsend = concatstr(2, bindir, "/mlmmj-send"); mlmmjsub = concatstr(2, bindir, "/mlmmj-sub"); mlmmjunsub = concatstr(2, bindir, "/mlmmj-unsub"); mlmmjbounce = concatstr(2, bindir, "/mlmmj-bounce"); myfree(bindir); while ((opt = getopt(argc, argv, "hVPm:L:")) != -1) { switch(opt) { case 'L': listdir = optarg; break; case 'm': mailfile = optarg; break; case 'h': print_help(argv[0]); break; case 'P': noprocess = 1; break; case 'V': print_version(argv[0]); exit(EXIT_SUCCESS); } } if(listdir == NULL || mailfile == NULL) { fprintf(stderr, "You have to specify -L and -m\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } /* Lets make sure no random user tries to send mail to the list */ if(listdir) { if(stat(listdir, &st) == 0) { uid = getuid(); if(uid && uid != st.st_uid) { log_error(LOG_ARGS, "Have to invoke either as root " "or as the user owning listdir"); writen(STDERR_FILENO, "Have to invoke either as root " "or as the user owning listdir\n", 60); exit(EXIT_FAILURE); } } else { log_error(LOG_ARGS, "Could not stat %s", listdir); exit(EXIT_FAILURE); } } do { myfree(donemailname); myfree(randomstr); randomstr = random_str(); donemailname = concatstr(3, listdir, "/queue/", randomstr); donemailfd = open(donemailname, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); } while ((donemailfd < 0) && (errno == EEXIST)); if(donemailfd < 0) { log_error(LOG_ARGS, "could not create %s", donemailname); myfree(donemailname); exit(EXIT_FAILURE); } #if 0 log_error(LOG_ARGS, "donemailname = [%s]\n", donemailname); #endif if((rawmailfd = open(mailfile, O_RDONLY)) < 0) { unlink(donemailname); myfree(donemailname); log_error(LOG_ARGS, "could not open() input mail file"); exit(EXIT_FAILURE); } /* hdrfd is checked in do_all_the_voodoo_here(), because the * customheaders file might not exist */ headerfilename = concatstr(2, listdir, "/control/customheaders"); hdrfd = open(headerfilename, O_RDONLY); myfree(headerfilename); /* footfd is checked in do_all_the_voodoo_here(), see above */ footerfilename = concatstr(2, listdir, "/control/footer"); footfd = open(footerfilename, O_RDONLY); myfree(footerfilename); delheaders = ctrlvalues(listdir, "delheaders"); if(delheaders == NULL) { delheaders = mymalloc(sizeof(struct strlist)); delheaders->count = 0; delheaders->strs = NULL; } delheaders->strs = myrealloc(delheaders->strs, (delheaders->count+3) * sizeof(char *)); delheaders->strs[delheaders->count++] = mystrdup("From "); delheaders->strs[delheaders->count++] = mystrdup("Return-Path:"); delheaders->strs[delheaders->count] = NULL; subjectprefix = ctrlvalue(listdir, "prefix"); if(do_all_the_voodoo_here(rawmailfd, donemailfd, hdrfd, footfd, (const char**)delheaders->strs, readhdrs, &allheaders, subjectprefix) < 0) { log_error(LOG_ARGS, "Error in do_all_the_voodoo_here"); exit(EXIT_FAILURE); } for(i = 0; i < delheaders->count; i++) myfree(delheaders->strs[i]); myfree(delheaders->strs); close(rawmailfd); close(donemailfd); if(hdrfd >= 0) close(hdrfd); if(footfd >= 0) close(footfd); /* To: addresses */ for(i = 0; i < readhdrs[1].valuecount; i++) { find_email_adr(readhdrs[1].values[i], &toemails); } /* Cc: addresses */ for(i = 0; i < readhdrs[2].valuecount; i++) { find_email_adr(readhdrs[2].values[i], &ccemails); } /* Delivered-To: addresses */ for(i = 0; i < readhdrs[4].valuecount; i++) { find_email_adr(readhdrs[4].values[i], &dtemails); } /* address extension (the "foo" part of "user+foo@domain.tld") */ if((envstr = getenv("DEFAULT")) != NULL) { /* qmail */ recipextra = mystrdup(envstr); } else if((envstr = getenv("EXTENSION")) != NULL) { /* postfix */ recipextra = mystrdup(envstr); } else if((envstr = getenv("LOCAL_PART_SUFFIX")) != NULL) { /* exim */ listdelim = getlistdelim(listdir); if (strncmp(envstr, listdelim, strlen(listdelim)) == 0) { recipextra = mystrdup(envstr + strlen(listdelim)); } else { recipextra = mystrdup(envstr); } myfree(listdelim); } else if(dtemails.emailcount >= 1) { /* parse the (first) Delivered-To: header */ recipextra = recipient_extra(listdir, dtemails.emaillist[0]); } else if(toemails.emailcount >= 1) { /* parse the (first) To: header */ recipextra = recipient_extra(listdir, toemails.emaillist[0]); } else { recipextra = NULL; } if(recipextra && (strlen(recipextra) == 0)) { myfree(recipextra); recipextra = NULL; } /* From: addresses */ for(i = 0; i < readhdrs[0].valuecount; i++) { find_email_adr(readhdrs[0].values[i], &fromemails); } /* discard malformed mail with invalid From: unless it's a bounce */ if(fromemails.emailcount != 1 && (recipextra == NULL || strncmp(recipextra, "bounces", 7) != 0)) { for(i = 0; i < fromemails.emailcount; i++) printf("fromemails.emaillist[%d] = %s\n", i, fromemails.emaillist[i]); discardname = concatstr(3, listdir, "/queue/discarded/", randomstr); log_error(LOG_ARGS, "Discarding %s due to invalid From:", mailfile); for(i = 0; i < fromemails.emailcount; i++) log_error(LOG_ARGS, "fromemails.emaillist[%d] = %s\n", i, fromemails.emaillist[i]); rename(mailfile, discardname); unlink(donemailname); myfree(donemailname); myfree(discardname); myfree(randomstr); /* TODO: free emailstructs */ exit(EXIT_SUCCESS); } /* The only time posteraddr will remain unset is when the mail is a * bounce, so the mail will be processed by listcontrol() and the * program will terminate before posteraddr is used. */ if (fromemails.emailcount > 0) posteraddr = fromemails.emaillist[0]; /* Return-Path: addresses */ for(i = 0; i < readhdrs[3].valuecount; i++) { find_email_adr(readhdrs[3].values[i], &rpemails); } /* envelope from */ if((envstr = getenv("SENDER")) != NULL) { /* qmail, postfix, exim */ efrom = mystrdup(envstr); } else if(rpemails.emailcount >= 1) { /* the (first) Return-Path: header */ efrom = mystrdup(rpemails.emaillist[0]); } else { efrom = mystrdup(""); } /* Subject: */ if (readhdrs[5].valuecount) subject = unistr_header_to_utf8(readhdrs[5].values[0]); if (!subject) subject = mystrdup(""); if(recipextra) { owner = concatstr(2, listdir, "/control/owner"); if(owner && strcmp(recipextra, "owner") == 0) { /* Why is this here, and not in listcontrol() ? * -- mortenp 20060409 */ /* strip envelope from before resending */ delheaders->count = 0; delheaders->strs = NULL; delheaders->strs = myrealloc(delheaders->strs, (delheaders->count+3) * sizeof(char *)); delheaders->strs[delheaders->count++] = mystrdup("From "); delheaders->strs[delheaders->count++] = mystrdup("Return-Path:"); delheaders->strs[delheaders->count] = NULL; if((rawmailfd = open(mailfile, O_RDONLY)) < 0) { log_error(LOG_ARGS, "could not open() " "input mail file"); exit(EXIT_FAILURE); } if((donemailfd = open(donemailname, O_WRONLY|O_TRUNC)) < 0) { log_error(LOG_ARGS, "could not open() " "output mail file"); exit(EXIT_FAILURE); } if(do_all_the_voodoo_here(rawmailfd, donemailfd, -1, -1, (const char**)delheaders->strs, NULL, &allheaders, NULL) < 0) { log_error(LOG_ARGS, "do_all_the_voodoo_here"); exit(EXIT_FAILURE); } close(rawmailfd); close(donemailfd); unlink(mailfile); log_oper(listdir, OPLOGFNAME, "mlmmj-process: sending" " mail from %s to owner", efrom); execlp(mlmmjsend, mlmmjsend, "-l", "4", "-L", listdir, "-F", efrom, "-s", owner, "-a", "-m", donemailname, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } #if 0 log_error(LOG_ARGS, "listcontrol(from, %s, %s, %s, %s, %s, %s)\n", listdir, toemails.emaillist[0], mlmmjsub, mlmmjunsub, mlmmjsend, mlmmjbounce); #endif unlink(mailfile); listcontrol(&fromemails, listdir, recipextra, mlmmjsub, mlmmjunsub, mlmmjsend, mlmmjbounce, donemailname); return EXIT_SUCCESS; } listaddr = getlistaddr(listdir); alternates = ctrlvalues(listdir, "listaddress"); /* checking incoming mail's size */ maxmailsizestr = ctrlvalue(listdir, "maxmailsize"); if(maxmailsizestr) { maxmailsize = atol(maxmailsizestr); if(stat(donemailname, &st) < 0) { log_error(LOG_ARGS, "stat(%s,..) failed", donemailname); exit(EXIT_FAILURE); } if(st.st_size > maxmailsize) { if (statctrl(listdir, "nomaxmailsizedenymails")) { errno = 0; log_error(LOG_ARGS, "Discarding %s due to" " size limit (%d bytes too big)", donemailname, (st.st_size - maxmailsize)); unlink(donemailname); unlink(mailfile); myfree(donemailname); myfree(maxmailsizestr); exit(EXIT_SUCCESS); } listdelim = getlistdelim(listdir); listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn); txt = open_text(listdir, "deny", "post", "maxmailsize", NULL, "maxmailsize"); MY_ASSERT(txt); register_unformatted(txt, "subject", subject); register_unformatted(txt, "posteraddr", posteraddr); register_unformatted(txt, "maxmailsize", maxmailsizestr); register_originalmail(txt, donemailname); queuefilename = prepstdreply(txt, listdir, "$listowner$", posteraddr, NULL); MY_ASSERT(queuefilename); close_text(txt); myfree(listdelim); myfree(listname); myfree(listfqdn); unlink(donemailname); unlink(mailfile); myfree(donemailname); myfree(maxmailsizestr); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", posteraddr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } } myfree(delheaders); if(strcmp(efrom, "") == 0) { /* don't send mails with <> in From to the list */ discardname = concatstr(3, listdir, "/queue/discarded/", randomstr); errno = 0; log_error(LOG_ARGS, "Discarding %s due to missing envelope" " from address", mailfile); rename(mailfile, discardname); unlink(donemailname); myfree(donemailname); myfree(discardname); myfree(randomstr); /* TODO: free emailstructs */ exit(EXIT_SUCCESS); } unlink(mailfile); addrtocc = !(statctrl(listdir, "tocc")); if(addrtocc) { for(i = 0; i < toemails.emailcount; i++) { errno = 0; log_error(LOG_ARGS, "Found To: %s", toemails.emaillist[i]); for(j = 0; j < alternates->count; j++) { chomp(alternates->strs[j]); if(strcasecmp(alternates->strs[j], toemails.emaillist[i]) == 0) intocc = 1; } } for(i = 0; i < ccemails.emailcount; i++) { errno = 0; log_error(LOG_ARGS, "Found Cc: %s", ccemails.emaillist[i]); for(j = 0; j < alternates->count; j++) { chomp(alternates->strs[j]); if(strcasecmp(alternates->strs[j], ccemails.emaillist[i]) == 0) intocc = 1; } } } for(i = 0; i < alternates->count; i++) myfree(alternates->strs[i]); if(addrtocc && !intocc) { /* Don't send a mail about denial to the list, but silently * discard and exit. Also don't in case of it being turned off */ if ((strcasecmp(listaddr, posteraddr) == 0) || statctrl(listdir, "notoccdenymails")) { log_error(LOG_ARGS, "Discarding %s because list" " address was not in To: or Cc:," " and From: was the list or" " notoccdenymails was set", mailfile); myfree(listaddr); unlink(donemailname); myfree(donemailname); exit(EXIT_SUCCESS); } listdelim = getlistdelim(listdir); listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn); txt = open_text(listdir, "deny", "post", "notintocc", NULL, "notintocc"); MY_ASSERT(txt); register_unformatted(txt, "subject", subject); register_unformatted(txt, "posteraddr", posteraddr); register_originalmail(txt, donemailname); queuefilename = prepstdreply(txt, listdir, "$listowner$", posteraddr, NULL); MY_ASSERT(queuefilename) close_text(txt); myfree(listdelim); myfree(listname); myfree(listfqdn); unlink(donemailname); myfree(donemailname); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", posteraddr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } access_rules = ctrlvalues(listdir, "access"); if (access_rules) { enum action accret; /* Don't send a mail about denial to the list, but silently * discard and exit. Also do this in case it's turned off */ accret = do_access(access_rules, &allheaders, posteraddr, listdir); if (accret == DENY) { if ((strcasecmp(listaddr, posteraddr) == 0) || statctrl(listdir, "noaccessdenymails")) { log_error(LOG_ARGS, "Discarding %s because" " it was denied by an access" " rule, and From: was the list" " address or noaccessdenymails" " was set", mailfile); myfree(listaddr); unlink(donemailname); myfree(donemailname); exit(EXIT_SUCCESS); } listdelim = getlistdelim(listdir); listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn); txt = open_text(listdir, "deny", "post", "access", NULL, "access"); MY_ASSERT(txt); register_unformatted(txt, "subject", subject); register_unformatted(txt, "posteraddr", posteraddr); register_originalmail(txt, donemailname); queuefilename = prepstdreply(txt, listdir, "$listowner$", posteraddr, NULL); MY_ASSERT(queuefilename) close_text(txt); myfree(listaddr); myfree(listdelim); myfree(listname); myfree(listfqdn); unlink(donemailname); myfree(donemailname); myfree(randomstr); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", posteraddr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } else if (accret == MODERATE) { moderated = 1; modreason = ACCESS; } else if (accret == DISCARD) { discardname = concatstr(3, listdir, "/queue/discarded/", randomstr); myfree(randomstr); if(rename(donemailname, discardname) < 0) { log_error(LOG_ARGS, "could not rename(%s,%s)", donemailname, discardname); myfree(donemailname); myfree(discardname); exit(EXIT_FAILURE); } myfree(donemailname); myfree(discardname); exit(EXIT_SUCCESS); } else if (accret == SEND) { send = 1; } else if (accret == ALLOW) { /* continue processing as normal */ } } if(!send && (statctrl(listdir, "subonlypost") || statctrl(listdir, "modnonsubposts"))) { /* Don't send a mail about denial to the list, but silently * discard and exit. */ if (strcasecmp(listaddr, posteraddr) == 0) { log_error(LOG_ARGS, "Discarding %s because" " subonlypost was set and From: was" " the list address", mailfile); myfree(listaddr); unlink(donemailname); myfree(donemailname); exit(EXIT_SUCCESS); } if(is_subbed(listdir, posteraddr, 0) == SUB_NONE) { if(statctrl(listdir, "modnonsubposts")) { moderated = 1; modreason = MODNONSUBPOSTS; } else { if(statctrl(listdir, "nosubonlydenymails")) { log_error(LOG_ARGS, "Discarding %s because" " subonlypost and" " nosubonlydenymails was set", mailfile); myfree(listaddr); unlink(donemailname); myfree(donemailname); exit(EXIT_SUCCESS); } listdelim = getlistdelim(listdir); listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn); txt = open_text(listdir, "deny", "post", "subonlypost", NULL, "subonlypost"); MY_ASSERT(txt); register_unformatted(txt, "subject", subject); register_unformatted(txt, "posteraddr", posteraddr); register_originalmail(txt, donemailname); queuefilename = prepstdreply(txt, listdir, "$listowner$", posteraddr, NULL); MY_ASSERT(queuefilename) close_text(txt); myfree(listaddr); myfree(listdelim); myfree(listname); myfree(listfqdn); unlink(donemailname); myfree(donemailname); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-T", posteraddr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } } } if(!send && !moderated) { if(statctrl(listdir, "moderated")) { moderated = 1; modreason = MODERATED; } } notmetoo = statctrl(listdir, "notmetoo"); if(moderated) { mqueuename = concatstr(3, listdir, "/moderation/", randomstr); myfree(randomstr); if(rename(donemailname, mqueuename) < 0) { log_error(LOG_ARGS, "could not rename(%s,%s)", donemailname, mqueuename); myfree(donemailname); myfree(mqueuename); exit(EXIT_FAILURE); } myfree(donemailname); if (notmetoo) { omitfilename = concatstr(2, mqueuename, ".omit"); omitfd = open(omitfilename, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); if (omitfd < 0) { log_error(LOG_ARGS, "could not open %s", omitfilename); myfree(mqueuename); myfree(omitfilename); exit(EXIT_FAILURE); } myfree(omitfilename); if(writen(omitfd, posteraddr, strlen(posteraddr)) < 0) { log_error(LOG_ARGS, "could not write omit file"); myfree(mqueuename); exit(EXIT_FAILURE); } fsync(omitfd); close(omitfd); } newmoderated(listdir, mqueuename, mlmmjsend, efrom, subject, posteraddr, modreason); return EXIT_SUCCESS; } myfree(randomstr); if(noprocess) { myfree(donemailname); /* XXX: toemails and ccemails etc. have to be myfree() */ exit(EXIT_SUCCESS); } if (notmetoo) execlp(mlmmjsend, mlmmjsend, "-L", listdir, "-o", posteraddr, "-m", donemailname, (char *)NULL); else execlp(mlmmjsend, mlmmjsend, "-L", listdir, "-m", donemailname, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); return EXIT_FAILURE; } mlmmj-1.2.18.0/src/mlmmj-receive.c000644 000765 000120 00000011534 11727635244 016454 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "wrappers.h" #include "mygetline.h" #include "strgen.h" #include "log_error.h" #include "memory.h" extern char *optarg; static void print_help(const char *prg) { printf("Usage: %s -L /path/to/listdir\n" " [-s sender@example.org] [-e extension] [-h] [-V] [-P] [-F]\n" " -h: This help\n" " -F: Don't fork in the background\n" " -L: Full path to list directory\n" " -s: Specify sender address\n" " -e: The foo part of user+foo@example.org\n" " -P: Don't execute mlmmj-process\n" " -V: Print version\n", prg); exit(EXIT_SUCCESS); } int main(int argc, char **argv) { char *infilename = NULL, *listdir = NULL; char *randomstr = random_str(); char *mlmmjprocess, *bindir; int fd, opt, noprocess = 0, nofork = 0; struct stat st; uid_t uid; pid_t childpid; CHECKFULLPATH(argv[0]); log_set_name(argv[0]); bindir = mydirname(argv[0]); mlmmjprocess = concatstr(2, bindir, "/mlmmj-process"); myfree(bindir); while ((opt = getopt(argc, argv, "hPVL:s:e:F")) != -1) { switch(opt) { case 'h': print_help(argv[0]); break; case 'L': listdir = optarg; break; case 's': setenv("SENDER", optarg, 1); break; case 'e': setenv("EXTENSION", optarg, 1); break; case 'P': noprocess = 1; break; case 'F': nofork = 1; break; case 'V': print_version(argv[0]); exit(0); } } if(listdir == NULL) { fprintf(stderr, "You have to specify -L\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } /* Lets make sure no random user tries to send mail to the list */ if(listdir) { if(stat(listdir, &st) == 0) { uid = getuid(); if(uid && uid != st.st_uid) { log_error(LOG_ARGS, "Have to invoke either as root " "or as the user owning listdir " "Invoked with uid = [%d]", (int)uid); writen(STDERR_FILENO, "Have to invoke either as root " "or as the user owning listdir\n", 60); exit(EXIT_FAILURE); } } else { log_error(LOG_ARGS, "Could not stat %s", listdir); exit(EXIT_FAILURE); } } infilename = concatstr(3, listdir, "/incoming/", randomstr); myfree(randomstr); fd = open(infilename, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); while(fd < 0 && errno == EEXIST) { myfree(infilename); randomstr = random_str(); infilename = concatstr(3, listdir, "/incoming/", randomstr); myfree(randomstr); fd = open(infilename, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); } if(fd < 0) { log_error(LOG_ARGS, "could not create mail file in " "%s/incoming directory", listdir); myfree(infilename); exit(EXIT_FAILURE); } if(dumpfd2fd(fileno(stdin), fd) != 0) { log_error(LOG_ARGS, "Could not receive mail"); exit(EXIT_FAILURE); } #if 0 log_oper(listdir, OPLOGFNAME, "mlmmj-receive got %s", infilename); #endif fsync(fd); close(fd); if(noprocess) { myfree(infilename); exit(EXIT_SUCCESS); } /* * Now we fork so we can exit with success since it could potentially * take a long time for mlmmj-send to finish delivering the mails and * returning, making it susceptible to getting a SIGKILL from the * mailserver invoking mlmmj-receive. */ if (!nofork) { childpid = fork(); if(childpid < 0) log_error(LOG_ARGS, "fork() failed! Proceeding anyway"); if(childpid) exit(EXIT_SUCCESS); /* Parent says: "bye bye kids!"*/ close(0); close(1); close(2); } execlp(mlmmjprocess, mlmmjprocess, "-L", listdir, "-m", infilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjprocess); exit(EXIT_FAILURE); } mlmmj-1.2.18.0/src/mlmmj-send.c000644 000765 000120 00000103047 11727635244 015764 0ustar00benadmin000000 000000 /* Copyright (C) 2004, 2003, 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "mlmmj-send.h" #include "mail-functions.h" #include "itoa.h" #include "incindexfile.h" #include "chomp.h" #include "checkwait_smtpreply.h" #include "getlistaddr.h" #include "getlistdelim.h" #include "init_sockfd.h" #include "strgen.h" #include "log_error.h" #include "mygetline.h" #include "wrappers.h" #include "memory.h" #include "statctrl.h" #include "ctrlvalue.h" #include "mylocking.h" #include "getaddrsfromfd.h" static int addtohdr = 0; static int prepmailinmem = 0; static int maxverprecips = MAXVERPRECIPS; static int gotsigterm = 0; void catch_sig_term(int sig) { gotsigterm = 1; } char *get_index_from_filename(const char *filename) { char *myfilename, *indexstr, *ret; size_t len; myfilename = mystrdup(filename); if (!myfilename) { return NULL; } len = strlen(myfilename); if (len > 9 && (strcmp(myfilename + len - 9, "/mailfile") == 0)) { myfilename[len - 9] = '\0'; } indexstr = strrchr(myfilename, '/'); if (indexstr) { indexstr++; /* skip the slash */ } else { indexstr = myfilename; } ret = mystrdup(indexstr); myfree(myfilename); return ret; } char *bounce_from_adr(const char *recipient, const char *listadr, const char *listdelim, const char *mailfilename, const char *listdir) { char *bounceaddr, *myrecipient, *mylistadr; char *indexstr, *listdomain, *a = NULL, *mymailfilename; char *staticbounceaddr, *staticbounceaddr_localpart; char *staticbounceaddr_domain; size_t len; mymailfilename = mystrdup(mailfilename); if (!mymailfilename) { return NULL; } indexstr = get_index_from_filename(mymailfilename); if (!indexstr) { myfree(mymailfilename); return NULL; } myrecipient = mystrdup(recipient); if (!myrecipient) { myfree(mymailfilename); return NULL; } a = strchr(myrecipient, '@'); if (a) *a = '='; mylistadr = mystrdup(listadr); if (!mylistadr) { myfree(mymailfilename); myfree(myrecipient); return NULL; } listdomain = strchr(mylistadr, '@'); if (!listdomain) { myfree(mymailfilename); myfree(myrecipient); myfree(mylistadr); return NULL; } *listdomain++ = '\0'; /* 11 = "bounces-" + "-" + "@" + NUL */ len = strlen(mylistadr) + strlen(listdelim) + strlen(myrecipient) + strlen(indexstr) + strlen(listdomain) + 11; staticbounceaddr = ctrlvalue(listdir, "staticbounceaddr"); if (staticbounceaddr) { staticbounceaddr_localpart = genlistname(staticbounceaddr); staticbounceaddr_domain = genlistfqdn(staticbounceaddr); /* localpart + "-" + domain */ len += strlen(staticbounceaddr_localpart) + 1 + strlen(staticbounceaddr_domain); } else { staticbounceaddr_localpart = NULL; staticbounceaddr_domain = NULL; } bounceaddr = mymalloc(len); if (!bounceaddr) { myfree(staticbounceaddr); myfree(staticbounceaddr_localpart); myfree(staticbounceaddr_domain); myfree(myrecipient); myfree(mylistadr); return NULL; } if (staticbounceaddr) { snprintf(bounceaddr, len, "%s%s%s-bounces-%s-%s@%s", staticbounceaddr_localpart, listdelim, mylistadr, indexstr, myrecipient, staticbounceaddr_domain); myfree(staticbounceaddr); myfree(staticbounceaddr_localpart); myfree(staticbounceaddr_domain); } else { snprintf(bounceaddr, len, "%s%sbounces-%s-%s@%s", mylistadr, listdelim, indexstr, myrecipient, listdomain); } myfree(myrecipient); myfree(mylistadr); myfree(indexstr); myfree(mymailfilename); return bounceaddr; } int bouncemail(const char *listdir, const char *mlmmjbounce, const char *from) { char *myfrom = mystrdup(from); char *listdelim = getlistdelim(listdir); char *addr, *num, *c; size_t len; pid_t pid = 0; if((c = strchr(myfrom, '@')) == NULL) { myfree(myfrom); myfree(listdelim); return 0; /* Success when malformed 'from' */ } *c = '\0'; num = strrchr(myfrom, '-'); num++; c = strstr(myfrom, listdelim); myfrom = strchr(c, '-'); myfrom++; len = num - myfrom - 1; addr = mymalloc(len + 1); addr[len] = '\0'; strncpy(addr, myfrom, len); myfree(listdelim); pid = fork(); if(pid < 0) { log_error(LOG_ARGS, "fork() failed!"); return 1; } if(pid > 0) return 0; execlp(mlmmjbounce, mlmmjbounce, "-L", listdir, "-a", num, "-n", addr, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjbounce); return 1; } int send_mail(int sockfd, const char *from, const char *to, const char *replyto, char *mailmap, size_t mailsize, const char *listdir, const char *mlmmjbounce, const char *hdrs, size_t hdrslen, const char *body, size_t bodylen) { int retval = 0; char *reply, *reply2, *tohdr; if(sockfd == -1) return EBADF; if(strchr(to, '@') == NULL) { errno = 0; log_error(LOG_ARGS, "No @ in address, ignoring %s", to); return 0; } retval = write_mail_from(sockfd, from, ""); if(retval) { log_error(LOG_ARGS, "Could not write MAIL FROM\n"); return retval; } reply = checkwait_smtpreply(sockfd, MLMMJ_FROM); if(reply) { log_error(LOG_ARGS, "Error in MAIL FROM. Reply = [%s]", reply); myfree(reply); write_rset(sockfd); reply2 = checkwait_smtpreply(sockfd, MLMMJ_RSET); if (reply2 != NULL) myfree(reply2); return MLMMJ_FROM; } retval = write_rcpt_to(sockfd, to); if(retval) { log_error(LOG_ARGS, "Could not write RCPT TO:\n"); return retval; } reply = checkwait_smtpreply(sockfd, MLMMJ_RCPTTO); if(reply) { write_rset(sockfd); reply2 = checkwait_smtpreply(sockfd, MLMMJ_RSET); if (reply2 != NULL) myfree(reply2); if(mlmmjbounce && ((reply[0] == '4') || (reply[0] == '5')) && (reply[1] == '5')) { myfree(reply); return bouncemail(listdir, mlmmjbounce, from); } else { log_error(LOG_ARGS, "Error in RCPT TO. Reply = [%s]", reply); myfree(reply); return MLMMJ_RCPTTO; } } retval = write_data(sockfd); if(retval) { log_error(LOG_ARGS, "Could not write DATA\b"); return retval; } reply = checkwait_smtpreply(sockfd, MLMMJ_DATA); if(reply) { log_error(LOG_ARGS, "Error with DATA. Reply = [%s]", reply); myfree(reply); write_rset(sockfd); reply2 = checkwait_smtpreply(sockfd, MLMMJ_RSET); if (reply2 != NULL) myfree(reply2); return MLMMJ_DATA; } if(replyto) { retval = write_replyto(sockfd, replyto); if(retval) { log_error(LOG_ARGS, "Could not write reply-to addr.\n"); return retval; } } if(addtohdr) tohdr = concatstr(3, "To: ", to, "\r\n"); else tohdr = NULL; if(prepmailinmem) { retval = writen(sockfd, hdrs, hdrslen); if(retval < 0) { log_error(LOG_ARGS, "Could not write mailheaders.\n"); return retval; } if(tohdr) { retval = writen(sockfd, tohdr, strlen(tohdr)); if(retval < 0) { log_error(LOG_ARGS, "Could not write To:.\n"); return retval; } myfree(tohdr); } retval = writen(sockfd, body, bodylen); if(retval < 0) { log_error(LOG_ARGS, "Could not write mailbody.\n"); return retval; } } else { retval = write_mailbody_from_map(sockfd, mailmap, mailsize, tohdr); if(retval) { log_error(LOG_ARGS, "Could not write mail\n"); return retval; } } retval = write_dot(sockfd); if(retval) { log_error(LOG_ARGS, "Could not write .\n"); return retval; } reply = checkwait_smtpreply(sockfd, MLMMJ_DOT); if(reply) { log_error(LOG_ARGS, "Mailserver did not ack end of mail.\n" ". was written, to no" "avail. Reply = [%s]", reply); myfree(reply); write_rset(sockfd); reply2 = checkwait_smtpreply(sockfd, MLMMJ_RSET); if (reply2 != NULL) myfree(reply2); return MLMMJ_DOT; } return 0; } int initsmtp(int *sockfd, const char *relayhost, unsigned short port) { int retval = 0; char *reply = NULL; char *myhostname = hostnamestr(); init_sockfd(sockfd, relayhost, port); if(*sockfd == -1) return EBADF; if((reply = checkwait_smtpreply(*sockfd, MLMMJ_CONNECT)) != NULL) { log_error(LOG_ARGS, "No proper greeting to our connect" "Reply: [%s]", reply); myfree(reply); retval = MLMMJ_CONNECT; /* FIXME: Queue etc. */ } write_helo(*sockfd, myhostname); myfree(myhostname); if((reply = checkwait_smtpreply(*sockfd, MLMMJ_HELO)) != NULL) { log_error(LOG_ARGS, "Error with HELO. Reply: [%s]", reply); /* FIXME: quit and tell admin to configure correctly */ myfree(reply); retval = MLMMJ_HELO; } return retval; } int endsmtp(int *sockfd) { int retval = 0; char *reply = NULL; if(*sockfd == -1) return retval; write_quit(*sockfd); reply = checkwait_smtpreply(*sockfd, MLMMJ_QUIT); if(reply) { printf("reply from quit: %s\n", reply); log_error(LOG_ARGS, "Mailserver would not let us QUIT. " "We close the socket anyway though. " "Mailserver reply = [%s]", reply); myfree(reply); retval = MLMMJ_QUIT; } close(*sockfd); *sockfd = -1; return retval; } int send_mail_verp(int sockfd, struct strlist *addrs, char *mailmap, size_t mailsize, const char *from, const char *listdir, const char *hdrs, size_t hdrslen, const char *body, size_t bodylen, const char *verpextra) { int retval, i; char *reply, *reply2; if(sockfd == -1) return EBADF; retval = write_mail_from(sockfd, from, verpextra); if(retval) { log_error(LOG_ARGS, "Could not write MAIL FROM\n"); return retval; } reply = checkwait_smtpreply(sockfd, MLMMJ_FROM); if(reply) { log_error(LOG_ARGS, "Error in MAIL FROM. Reply = [%s]", reply); myfree(reply); write_rset(sockfd); reply2 = checkwait_smtpreply(sockfd, MLMMJ_RSET); if (reply2 != NULL) myfree(reply2); return MLMMJ_FROM; } for(i = 0; i < addrs->count; i++) { if(gotsigterm) { log_error(LOG_ARGS, "TERM signal received, " "shutting down."); return -1; } if(strchr(addrs->strs[i], '@') == NULL) { errno = 0; log_error(LOG_ARGS, "No @ in address, ignoring %s", addrs->strs[i]); continue; } retval = write_rcpt_to(sockfd, addrs->strs[i]); if(retval) { log_error(LOG_ARGS, "Could not write RCPT TO:\n"); return retval; } reply = checkwait_smtpreply(sockfd, MLMMJ_RCPTTO); if(reply) { log_error(LOG_ARGS, "Error in RCPT TO. Reply = [%s]", reply); myfree(reply); return MLMMJ_RCPTTO; } } retval = write_data(sockfd); if(retval) { log_error(LOG_ARGS, "Could not write DATA\b"); return retval; } reply = checkwait_smtpreply(sockfd, MLMMJ_DATA); if(reply) { log_error(LOG_ARGS, "Error with DATA. Reply = [%s]", reply); myfree(reply); write_rset(sockfd); reply2 = checkwait_smtpreply(sockfd, MLMMJ_RSET); if (reply2 != NULL) myfree(reply2); return MLMMJ_DATA; } if(prepmailinmem) { retval = writen(sockfd, hdrs, hdrslen); if(retval < 0) { log_error(LOG_ARGS, "Could not write mailheaders.\n"); return retval; } retval = writen(sockfd, body, bodylen); if(retval < 0) { log_error(LOG_ARGS, "Could not write mailbody.\n"); return retval; } } else { retval = write_mailbody_from_map(sockfd, mailmap, mailsize, NULL); if(retval) { log_error(LOG_ARGS, "Could not write mail\n"); return retval; } } retval = write_dot(sockfd); if(retval) { log_error(LOG_ARGS, "Could not write .\n"); return retval; } reply = checkwait_smtpreply(sockfd, MLMMJ_DOT); if(reply) { log_error(LOG_ARGS, "Mailserver did not ack end of mail.\n" ". was written, to no" "avail. Reply = [%s]", reply); myfree(reply); write_rset(sockfd); reply2 = checkwait_smtpreply(sockfd, MLMMJ_RSET); if (reply2 != NULL) myfree(reply2); return MLMMJ_DOT; } return 0; } int send_mail_many_fd(int sockfd, const char *from, const char *replyto, char *mailmap, size_t mailsize, int subfd, const char *listaddr, const char *listdelim, const char *archivefilename, const char *listdir, const char *mlmmjbounce, const char *hdrs, size_t hdrslen, const char *body, size_t bodylen) { int res, ret, i; struct strlist stl; stl.strs = NULL; stl.count = 0; do { res = getaddrsfromfd(&stl, subfd, maxverprecips); if(stl.count == maxverprecips) { ret = send_mail_many_list(sockfd, from, replyto, mailmap, mailsize, &stl, listaddr, listdelim, archivefilename, listdir, mlmmjbounce, hdrs, hdrslen, body, bodylen); for(i = 0; i < stl.count; i++) myfree(stl.strs[i]); if(ret < 0) return ret; stl.count = 0; } } while(res > 0); if(stl.count) { ret = send_mail_many_list(sockfd, from, replyto, mailmap, mailsize, &stl, listaddr, listdelim, archivefilename, listdir, mlmmjbounce, hdrs, hdrslen, body, bodylen); for(i = 0; i < stl.count; i++) myfree(stl.strs[i]); stl.count = 0; return ret; } return 0; } int requeuemail(const char *listdir, const char *index, struct strlist *addrs, int addrcount) { int addrfd, i; char *dirname, *addrfilename, *addr; dirname = concatstr(3, listdir, "/requeue/", index); if(mkdir(dirname, 0750) < 0 && errno != EEXIST) { log_error(LOG_ARGS, "Could not mkdir(%s) for " "requeueing. Mail cannot " "be requeued.", dirname); myfree(dirname); return -1; } addrfilename = concatstr(2, dirname, "/subscribers"); myfree(dirname); addrfd = open(addrfilename, O_WRONLY|O_CREAT|O_APPEND, S_IRUSR|S_IWUSR); if(addrfd < 0) { log_error(LOG_ARGS, "Could not open %s", addrfilename); myfree(addrfilename); return -1; } else { /* Dump the remaining addresses. We dump the remaining before * we write the failing address to ensure the potential good * ones will be tried first when mlmmj-maintd sends out mails * that have been requeued. addrcount was so far we were */ for(i = addrcount + 1; i < addrs->count; i++) { addr = concatstr(2, addrs->strs[i], "\n"); if(writen(addrfd, addr, strlen(addr)) < 0) { log_error(LOG_ARGS, "Could not add [%s] " "to requeue file", addr); return -1; } myfree(addr); } addr = concatstr(2, addrs->strs[addrcount], "\n"); if(writen(addrfd, addr, strlen(addr)) < 0) { log_error(LOG_ARGS, "Could not add [%s] to requeue " "file", addr); return -1; } myfree(addr); } myfree(addrfilename); close(addrfd); return 0; } int send_mail_many_list(int sockfd, const char *from, const char *replyto, char *mailmap, size_t mailsize, struct strlist *addrs, const char *listaddr, const char *listdelim, const char *archivefilename, const char *listdir, const char *mlmmjbounce, const char *hdrs, size_t hdrslen, const char *body, size_t bodylen) { int res = 0, i, status; char *bounceaddr, *addr, *index; for(i = 0; i < addrs->count; i++) { addr = addrs->strs[i]; if(strchr(addr, '@') == NULL) { errno = 0; log_error(LOG_ARGS, "No @ in address, ignoring %s", addr); continue; } if(gotsigterm && listaddr && archivefilename) { /* we got SIGTERM, so save the addresses and bail */ log_error(LOG_ARGS, "TERM signal received, " "shutting down."); index = get_index_from_filename(archivefilename); status = requeuemail(listdir, index, addrs, i); myfree(index); return status; } if(from) { res = send_mail(sockfd, from, addr, replyto, mailmap, mailsize, listdir, NULL, hdrs, hdrslen, body, bodylen); } else { bounceaddr = bounce_from_adr(addr, listaddr, listdelim, archivefilename, listdir); res = send_mail(sockfd, bounceaddr, addr, replyto, mailmap, mailsize, listdir, mlmmjbounce, hdrs, hdrslen, body, bodylen); myfree(bounceaddr); } if(res && listaddr && archivefilename) { /* we failed, so save the addresses and bail */ index = get_index_from_filename(archivefilename); status = requeuemail(listdir, index, addrs, i); myfree(index); return status; } } return 0; } static void print_help(const char *prg) { printf("Usage: %s [-L /path/to/list -m /path/to/mail | -l listctrl]\n" " [-a] [-D] [-F sender@example.org] [-h] [-o address@example.org]\n" " [-r 127.0.0.1] [-R reply@example.org] [-s /path/to/subscribers]\n" " [-T recipient@example.org] [-V]\n" " -a: Don't archive the mail\n" " -D: Don't delete the mail after it's sent\n" " -F: What to use as MAIL FROM:\n" " -h: This help\n" " -l: List control variable:\n", prg); printf(" '1' means 'send a single mail'\n" " '2' means 'mail to moderators'\n" " '3' means 'resend failed list mail'\n" " '4' means 'send to file with recipients'\n" " '5' means 'bounceprobe'\n" " '6' means 'single listmail to single recipient'\n" " '7' means 'digest'\n"); printf(" -L: Full path to list directory\n" " -m: Full path to mail file\n" " -o: Address to omit from distribution (normal mail only)\n" " -r: Relayhost IP address (defaults to 127.0.0.1)\n" " -R: What to use as Reply-To: header\n" " -s: Subscribers file name\n" " -T: What to use as RCPT TO:\n" " -V: Print version\n"); exit(EXIT_SUCCESS); } int main(int argc, char **argv) { size_t len = 0, hdrslen, bodylen; int sockfd = -1, mailfd = 0, opt, mindex = 0, subfd = 0, tmpfd, i; int deletewhensent = 1, sendres = 0, archive = 1, digest = 0; int ctrlarchive, res; char *listaddr = NULL, *listdelim = NULL; char *mailfilename = NULL, *subfilename = NULL, *omit = NULL; char *replyto = NULL, *bounceaddr = NULL, *to_addr = NULL; char *relayhost = NULL, *archivefilename = NULL, *tmpstr; char *listctrl = NULL, *subddirname = NULL, *listdir = NULL; char *mlmmjbounce = NULL, *bindir, *mailmap, *probefile, *a; char *body = NULL, *hdrs = NULL, *memmailsizestr = NULL, *verp = NULL; char relay[16], *listname, *listfqdn, *verpfrom, *maxverprecipsstr; char strindex[32], *reply, *strport, *requeuefilename; ssize_t memmailsize = 0; DIR *subddir; struct dirent *dp; struct stat st; struct hostent *relayent; uid_t uid; struct strlist stl; unsigned short smtpport = 25; struct sigaction sigact; CHECKFULLPATH(argv[0]); log_set_name(argv[0]); bindir = mydirname(argv[0]); mlmmjbounce = concatstr(2, bindir, "/mlmmj-bounce"); myfree(bindir); /* install signal handler for SIGTERM */ sigact.sa_handler = catch_sig_term; sigemptyset(&sigact.sa_mask); sigact.sa_flags = 0; if(sigaction(SIGTERM, &sigact, NULL) < 0) log_error(LOG_ARGS, "Could not install SIGTERM handler!"); while ((opt = getopt(argc, argv, "aVDhm:l:L:R:F:T:r:s:o:")) != -1){ switch(opt) { case 'a': archive = 0; break; case 'D': deletewhensent = 0; break; case 'F': bounceaddr = optarg; break; case 'h': print_help(argv[0]); break; case 'l': listctrl = optarg; break; case 'L': listdir = optarg; break; case 'm': mailfilename = optarg; break; case 'o': omit = optarg; break; case 'r': relayhost = optarg; break; case 'R': replyto = optarg; break; case 's': subfilename = optarg; break; case 'T': to_addr = optarg; break; case 'V': print_version(argv[0]); exit(EXIT_SUCCESS); } } if(mailfilename == NULL || (listdir == NULL && listctrl == NULL)) { fprintf(stderr, "You have to specify -m and -L or -l\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } /* Lets make sure no random user tries to send mail to the list */ if(listdir) { if(stat(listdir, &st) == 0) { uid = getuid(); if(uid && uid != st.st_uid) { log_error(LOG_ARGS, "Have to invoke either as root " "or as the user owning listdir"); writen(STDERR_FILENO, "Have to invoke either as root " "or as the user owning listdir\n", 60); exit(EXIT_FAILURE); } } else { log_error(LOG_ARGS, "Could not stat %s", listdir); exit(EXIT_FAILURE); } } if(!listctrl) listctrl = mystrdup("0"); /* get the list address */ if(listctrl[0] == '1' && (bounceaddr == NULL || to_addr == NULL)) { fprintf(stderr, "With -l 1 you need -F and -T\n"); exit(EXIT_FAILURE); } if((listctrl[0] == '2' && (listdir == NULL || bounceaddr == NULL))) { fprintf(stderr, "With -l 2 you need -L and -F\n"); exit(EXIT_FAILURE); } if((listctrl[0] == '7' && listdir == NULL)) { fprintf(stderr, "With -l 7 you need -L\n"); exit(EXIT_FAILURE); } verp = ctrlvalue(listdir, "verp"); chomp(verp); if(verp == NULL) if(statctrl(listdir, "verp") == 1) verp = mystrdup(""); maxverprecipsstr = ctrlvalue(listdir, "maxverprecips"); if(verp && maxverprecipsstr) { maxverprecips = atol(maxverprecipsstr); myfree(maxverprecipsstr); } if(maxverprecips <= 0) maxverprecips = MAXVERPRECIPS; stl.strs = NULL; stl.count = 0; switch(listctrl[0]) { case '1': case '2': case '3': case '4': case '5': case '6': case '7': archive = 0; default: break; } if(listdir && listctrl[0] != '5') listaddr = getlistaddr(listdir); /* initialize file with mail to send */ if((mailfd = open(mailfilename, O_RDWR)) < 0) { log_error(LOG_ARGS, "Could not open '%s'", mailfilename); exit(EXIT_FAILURE); } if(myexcllock(mailfd) < 0) { log_error(LOG_ARGS, "Could not lock '%s'." "Mail not sent!", mailfilename); exit(EXIT_FAILURE); } if(fstat(mailfd, &st) < 0) { log_error(LOG_ARGS, "Could not stat mailfd"); exit(EXIT_FAILURE); } memmailsizestr = ctrlvalue(listdir, "memorymailsize"); ctrlarchive = statctrl(listdir, "noarchive"); if(memmailsizestr) { memmailsize = strtol(memmailsizestr, NULL, 10); myfree(memmailsizestr); } if(memmailsize == 0) memmailsize = MEMORYMAILSIZE; if(st.st_size > memmailsize) { prepmailinmem = 0; errno = 0; log_error(LOG_ARGS, "Not preparing in memory. " "Mail is %ld bytes", (long)st.st_size); } else prepmailinmem = 1; mailmap = mmap(0, st.st_size, PROT_READ, MAP_SHARED, mailfd, 0); if(mailmap == MAP_FAILED) { log_error(LOG_ARGS, "Could not mmap mailfd"); exit(EXIT_FAILURE); } if(prepmailinmem) { hdrs = get_preppedhdrs_from_map(mailmap, &hdrslen); if(hdrs == NULL) { log_error(LOG_ARGS, "Could not prepare headers"); exit(EXIT_FAILURE); } body = get_prepped_mailbody_from_map(mailmap, st.st_size, &bodylen); if(body == NULL) { log_error(LOG_ARGS, "Could not prepare mailbody"); myfree(hdrs); exit(EXIT_FAILURE); } } if(listdir) listdelim = getlistdelim(listdir); switch(listctrl[0]) { case '1': /* A single mail is to be sent, do nothing */ case '5': break; case '2': /* Moderators */ subfilename = concatstr(2, listdir, "/control/moderators"); if((subfd = open(subfilename, O_RDONLY)) < 0) { log_error(LOG_ARGS, "Could not open '%s':", subfilename); myfree(hdrs); myfree(body); myfree(subfilename); myfree(listdelim); /* No moderators is no error. Could be the sysadmin * likes to do it manually. */ exit(EXIT_SUCCESS); } break; case '3': addtohdr = statctrl(listdir, "addtohdr"); case '4': /* sending mails to subfile */ if((subfd = open(subfilename, O_RDONLY)) < 0) { log_error(LOG_ARGS, "Could not open '%s':", subfilename); myfree(hdrs); myfree(body); myfree(listdelim); exit(EXIT_FAILURE); } break; case '6': archive = 0; deletewhensent = 0; archivefilename = mystrdup(mailfilename); bounceaddr = bounce_from_adr(to_addr, listaddr, listdelim, archivefilename, listdir); break; default: /* normal list mail -- now handled when forking */ addtohdr = statctrl(listdir, "addtohdr"); break; } /* initialize the archive filename */ if(archive) { mindex = incindexfile((const char *)listdir); len = strlen(listdir) + 9 + 20; archivefilename = mymalloc(len); snprintf(archivefilename, len, "%s/archive/%d", listdir, mindex); } itoa(mindex, strindex); if(!relayhost) { relayhost = ctrlvalue(listdir, "relayhost"); chomp(relayhost); } if(!relayhost) strncpy(relay, RELAYHOST, sizeof(relay)); else { relayent = gethostbyname(relayhost); if(relayent == NULL) { strncpy(relay, RELAYHOST, sizeof(relay)); } else { if(inet_ntop(relayent->h_addrtype, relayent->h_addr_list[0], relay, sizeof(relay)) == NULL) strncpy(relay, RELAYHOST, sizeof(relay)); } } strport = ctrlvalue(listdir, "smtpport"); if(strport) smtpport = (unsigned short)atol(strport); switch(listctrl[0]) { case '1': /* A single mail is to be sent */ case '6': initsmtp(&sockfd, relay, smtpport); if(send_mail(sockfd, bounceaddr, to_addr, replyto, mailmap, st.st_size, listdir, NULL, hdrs, hdrslen, body, bodylen)) { close(sockfd); sockfd = -1; /* error, so keep it in the queue */ deletewhensent = 0; /* dump data we want when resending first check * if it already exists. In that case continue */ tmpstr = concatstr(2, mailfilename, ".mailfrom"); if(stat(tmpstr, &st) == 0) { myfree(tmpstr); break; } tmpfd = open(tmpstr, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); myfree(tmpstr); if(tmpfd >= 0) { writen(tmpfd, bounceaddr, strlen(bounceaddr)); fsync(tmpfd); } close(tmpfd); tmpstr = concatstr(2, mailfilename, ".reciptto"); if(stat(tmpstr, &st) == 0) { myfree(tmpstr); break; } tmpfd = open(tmpstr, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); myfree(tmpstr); if(tmpfd >= 0) { writen(tmpfd, to_addr, strlen(to_addr)); fsync(tmpfd); } close(tmpfd); if(replyto) { tmpstr = concatstr(2, mailfilename, ".reply-to"); if(stat(tmpstr, &st) == 0) { myfree(tmpstr); break; } tmpfd = open(tmpstr, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); myfree(tmpstr); if(tmpfd >= 0) { writen(tmpfd, replyto, strlen(replyto)); fsync(tmpfd); } close(tmpfd); } } else { endsmtp(&sockfd); } break; case '2': /* Moderators */ initsmtp(&sockfd, relay, smtpport); if(send_mail_many_fd(sockfd, bounceaddr, NULL, mailmap, st.st_size, subfd, NULL, NULL, NULL, listdir, NULL, hdrs, hdrslen, body, bodylen)) { close(sockfd); sockfd = -1; } else { endsmtp(&sockfd); } break; case '3': /* resending earlier failed mails */ initsmtp(&sockfd, relay, smtpport); if(send_mail_many_fd(sockfd, NULL, NULL, mailmap, st.st_size, subfd, listaddr, listdelim, mailfilename, listdir, mlmmjbounce, hdrs, hdrslen, body, bodylen)) { close(sockfd); sockfd = -1; } else { endsmtp(&sockfd); } unlink(subfilename); break; case '4': /* send mails to owner */ initsmtp(&sockfd, relay, smtpport); if(send_mail_many_fd(sockfd, bounceaddr, NULL, mailmap, st.st_size, subfd, listaddr, listdelim, mailfilename, listdir, mlmmjbounce, hdrs, hdrslen, body, bodylen)) { close(sockfd); sockfd = -1; } else { endsmtp(&sockfd); } break; case '5': /* bounceprobe - handle relayhost local users bouncing*/ initsmtp(&sockfd, relay, smtpport); if(send_mail(sockfd, bounceaddr, to_addr, replyto, mailmap, st.st_size, listdir, NULL, hdrs, hdrslen, body, bodylen)) { close(sockfd); sockfd = -1; /* error, so remove the probefile */ tmpstr = mystrdup(to_addr); a = strchr(tmpstr, '@'); MY_ASSERT(a); *a = '='; probefile = concatstr(4, listdir, "/bounce/", tmpstr, "-probe"); unlink(probefile); myfree(probefile); myfree(tmpstr); } else { endsmtp(&sockfd); } break; case '7': digest = 1; addtohdr = 1; archivefilename = "digest"; /* fall through */ default: /* normal list mail */ if (!digest) { subddirname = concatstr(2, listdir, "/subscribers.d/"); } else { subddirname = concatstr(2, listdir, "/digesters.d/"); } if((subddir = opendir(subddirname)) == NULL) { log_error(LOG_ARGS, "Could not opendir(%s)", subddirname); myfree(listdelim); myfree(subddirname); myfree(hdrs); myfree(body); exit(EXIT_FAILURE); } listdelim = getlistdelim(listdir); listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); verpfrom = concatstr(6, listname, listdelim, "bounces-", strindex, "@", listfqdn); myfree(listname); myfree(listfqdn); if(digest) verp = NULL; if(verp && (strcmp(verp, "postfix") == 0)) { myfree(verp); verp = mystrdup("XVERP=-="); } if(addtohdr && verp) { log_error(LOG_ARGS, "Cannot use VERP and add " "To: header. Not sending with " "VERP."); verp = NULL; } if(verp) { initsmtp(&sockfd, relay, smtpport); if(sockfd > -1) { if(write_mail_from(sockfd, verpfrom, verp)) { log_error(LOG_ARGS, "Could not write VERP MAIL FROM. " "Not sending with VERP."); verp = NULL; } else { reply = checkwait_smtpreply(sockfd, MLMMJ_FROM); if(reply) { log_error(LOG_ARGS, "Mailserver did not " "accept VERP MAIL FROM. " "Not sending with VERP."); myfree(reply); verp = NULL; } } /* We can't be in SMTP DATA state or anything like * that, so should be able to safely QUIT. */ endsmtp(&sockfd); } else { log_error(LOG_ARGS, "Could not connect to " "write VERP MAIL FROM. " "Not sending with VERP."); verp = NULL; } } while((dp = readdir(subddir)) != NULL) { if(!strcmp(dp->d_name, ".")) continue; if(!strcmp(dp->d_name, "..")) continue; subfilename = concatstr(2, subddirname, dp->d_name); if((subfd = open(subfilename, O_RDONLY)) < 0) { log_error(LOG_ARGS, "Could not open '%s'", subfilename); myfree(subfilename); continue; } do { i = stl.count; res = getaddrsfromfd(&stl, subfd, maxverprecips); if(omit != NULL) { while(i < stl.count) { if(strcmp(stl.strs[i], omit) == 0) { myfree(stl.strs[i]); stl.count--; while (i < stl.count) { stl.strs[i] = stl.strs[i+1]; i++; } stl.strs[stl.count] = NULL; break; } i++; } } if(stl.count == maxverprecips) { initsmtp(&sockfd, relay, smtpport); if(verp) { sendres = send_mail_verp( sockfd, &stl, mailmap, st.st_size, verpfrom, listdir, hdrs, hdrslen, body, bodylen, verp); if(sendres) requeuemail(listdir, strindex, &stl, 0); } else { sendres = send_mail_many_list( sockfd, NULL, NULL, mailmap, st.st_size, &stl, listaddr, listdelim, archivefilename, listdir, mlmmjbounce, hdrs, hdrslen, body, bodylen); } if (sendres) { close(sockfd); sockfd = -1; } else { endsmtp(&sockfd); } for(i = 0; i < stl.count; i++) myfree(stl.strs[i]); stl.count = 0; } } while(res > 0); myfree(subfilename); close(subfd); } if(stl.count) { initsmtp(&sockfd, relay, smtpport); if(verp) { sendres = send_mail_verp(sockfd, &stl, mailmap, st.st_size, verpfrom, listdir, hdrs, hdrslen, body, bodylen, verp); if(sendres) requeuemail(listdir, strindex, &stl, 0); } else { sendres = send_mail_many_list(sockfd, NULL, NULL, mailmap, st.st_size, &stl, listaddr, listdelim, archivefilename, listdir, mlmmjbounce, hdrs, hdrslen, body, bodylen); } if (sendres) { close(sockfd); sockfd = -1; } else { endsmtp(&sockfd); } for(i = 0; i < stl.count; i++) myfree(stl.strs[i]); stl.count = 0; } myfree(stl.strs); myfree(verpfrom); closedir(subddir); myfree(subddirname); break; } myfree(listdelim); myfree(hdrs); myfree(body); myfree(mlmmjbounce); munmap(mailmap, st.st_size); close(mailfd); myfree(verp); if(archive) { if(!ctrlarchive) { if(rename(mailfilename, archivefilename) < 0) { log_error(LOG_ARGS, "Could not rename(%s,%s);", mailfilename, archivefilename); } } else { len = strlen(listdir) + 9 + 20 + 9; requeuefilename = mymalloc(len); snprintf(requeuefilename, len, "%s/requeue/%d", listdir, mindex); if(stat(requeuefilename, &st) < 0) { /* Nothing was requeued and we don't keep * mail for a noarchive list. */ unlink(mailfilename); } else { snprintf(requeuefilename, len, "%s/requeue/%d/mailfile", listdir, mindex); if (rename(mailfilename, requeuefilename) < 0) { log_error(LOG_ARGS, "Could not rename(%s,%s);", mailfilename, requeuefilename); } } myfree(requeuefilename); } myfree(archivefilename); } else if(deletewhensent) unlink(mailfilename); return EXIT_SUCCESS; } mlmmj-1.2.18.0/src/mlmmj-sub.c000644 000765 000120 00000055651 11734220454 015622 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "mlmmj-sub.h" #include "mylocking.h" #include "wrappers.h" #include "getlistaddr.h" #include "getlistdelim.h" #include "strgen.h" #include "subscriberfuncs.h" #include "log_error.h" #include "mygetline.h" #include "statctrl.h" #include "prepstdreply.h" #include "memory.h" #include "ctrlvalues.h" #include "chomp.h" static void moderate_sub(const char *listdir, const char *listaddr, const char *listdelim, const char *subaddr, const char *mlmmjsend, enum subtype typesub, enum subreason reasonsub) { int i, fd, status, nosubmodmails = 0; text *txt; memory_lines_state *mls; char *a = NULL, *queuefilename, *from, *listname, *listfqdn, *str; char *modfilename, *mods, *to, *replyto, *moderators = NULL; char *cookie, *obstruct; struct strlist *submods; pid_t childpid, pid; /* generate the file in moderation/ */ switch(typesub) { default: case SUB_NORMAL: str = concatstr(4, subaddr, "\n", "SUB_NORMAL", "\n"); break; case SUB_DIGEST: str = concatstr(4, subaddr, "\n", "SUB_DIGEST", "\n"); break; case SUB_NOMAIL: str = concatstr(4, subaddr, "\n", "SUB_NOMAIL", "\n"); break; case SUB_BOTH: str = concatstr(4, subaddr, "\n", "SUB_BOTH", "\n"); break; } for (;;) { cookie = random_str(); modfilename = concatstr(3, listdir, "/moderation/subscribe", cookie); fd = open(modfilename, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); if (fd < 0) { if (errno == EEXIST) { myfree(cookie); myfree(modfilename); continue; } log_error(LOG_ARGS, "could not create %s" "ignoring request: %s", str); exit(EXIT_FAILURE); } break; } if(writen(fd, str, strlen(str)) < 0) { log_error(LOG_ARGS, "could not write to %s" "ignoring request: %s", str); exit(EXIT_FAILURE); } close(fd); myfree(str); submods = ctrlvalues(listdir, "submod"); mods = concatstr(2, listdir, "/control/submod"); /* check to see if there's adresses in the submod control file */ for(i = 0; i < submods->count; i++) a = strchr(submods->strs[i], '@'); /* no addresses in submod control file, use owner */ if(a == NULL) { /* free the submods struct from above */ for(i = 0; i < submods->count; i++) myfree(submods->strs[i]); myfree(submods->strs); myfree(submods); submods = ctrlvalues(listdir, "owner"); myfree(mods); mods = concatstr(2, listdir, "/control/owner"); } /* send mail to moderators about request pending */ listdelim = getlistdelim(listdir); listfqdn = genlistfqdn(listaddr); listname = genlistname(listaddr); from = concatstr(4, listname, listdelim, "owner@", listfqdn); to = concatstr(3, listname, "-moderators@", listfqdn); replyto = concatstr(6, listname, listdelim, "permit-", cookie, "@", listfqdn); obstruct = concatstr(6, listname, listdelim, "obstruct-", cookie, "@", listfqdn); myfree(cookie); for(i = 0; i < submods->count; i++) { printf("%s", submods->strs[i]); str = moderators; moderators = concatstr(3, moderators, submods->strs[i], "\n"); myfree(str); } mls = init_memory_lines(moderators); myfree(moderators); txt = open_text(listdir, "gatekeep", "sub", subreason_strs[reasonsub], subtype_strs[typesub], "submod-moderator"); MY_ASSERT(txt); register_unformatted(txt, "subaddr", subaddr); register_unformatted(txt, "moderateaddr", replyto); /* DEPRECATED */ register_unformatted(txt, "permitaddr", replyto); register_unformatted(txt, "obstructaddr", obstruct); register_unformatted(txt, "moderators", "%gatekeepers%"); /* DEPRECATED */ register_formatted(txt, "gatekeepers", rewind_memory_lines, get_memory_line, mls); queuefilename = prepstdreply(txt, listdir, "$listowner$", to, replyto); MY_ASSERT(queuefilename); close_text(txt); /* we might need to exec more than one mlmmj-send */ nosubmodmails = statctrl(listdir,"nosubmodmails"); if (nosubmodmails) childpid = -1; else { childpid = fork(); if(childpid < 0) log_error(LOG_ARGS, "Could not fork; requester not notified"); } if(childpid != 0) { if(childpid > 0) { do /* Parent waits for the child */ pid = waitpid(childpid, &status, 0); while(pid == -1 && errno == EINTR); } finish_memory_lines(mls); execl(mlmmjsend, mlmmjsend, "-a", "-l", "4", "-L", listdir, "-s", mods, "-F", from, "-R", replyto, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execl() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } myfree(to); myfree(replyto); /* send mail to requester that the list is submod'ed */ from = concatstr(4, listname, listdelim, "bounces-help@", listfqdn); txt = open_text(listdir, "wait", "sub", subreason_strs[reasonsub], subtype_strs[typesub], "submod-requester"); MY_ASSERT(txt); register_unformatted(txt, "subaddr", subaddr); register_unformatted(txt, "moderators", "%gatekeepers"); /* DEPRECATED */ register_formatted(txt, "gatekeepers", rewind_memory_lines, get_memory_line, mls); queuefilename = prepstdreply(txt, listdir, "$listowner$", subaddr, NULL); MY_ASSERT(queuefilename); close_text(txt); finish_memory_lines(mls); myfree(listname); myfree(listfqdn); execl(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", subaddr, "-F", from, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execl() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } void getaddrandtype(const char *listdir, const char *modstr, char **addrptr, enum subtype *subtypeptr) { int fd; char *readaddr, *readtype, *modfilename; if (strncmp(modstr, "subscribe", 9) == 0) modstr += 9; modfilename = concatstr(3, listdir, "/moderation/subscribe", modstr); fd = open(modfilename, O_RDONLY); if(fd < 0) { log_error(LOG_ARGS, "Could not open %s", modfilename); exit(EXIT_FAILURE); } readaddr = mygetline(fd); readtype = mygetline(fd); close(fd); if(readaddr == NULL || readtype == NULL) { log_error(LOG_ARGS, "Could not parse %s", modfilename); exit(EXIT_FAILURE); } chomp(readaddr); *addrptr = readaddr; if(strncmp(readtype, "SUB_NORMAL", 10) == 0) { *subtypeptr = SUB_NORMAL; goto freedone; } if(strncmp(readtype, "SUB_DIGEST", 10) == 0) { *subtypeptr = SUB_DIGEST; goto freedone; } if(strncmp(readtype, "SUB_NOMAIL", 10) == 0) { *subtypeptr = SUB_NOMAIL; goto freedone; } if(strncmp(readtype, "SUB_BOTH", 8) == 0) { *subtypeptr = SUB_BOTH; goto freedone; } log_error(LOG_ARGS, "Type %s not valid in %s", readtype, modfilename); freedone: myfree(readtype); unlink(modfilename); myfree(modfilename); } void confirm_sub(const char *listdir, const char *listaddr, const char *listdelim, const char *subaddr, const char *mlmmjsend, enum subtype typesub, enum subreason reasonsub) { text *txt; char *queuefilename, *fromaddr, *listname, *listfqdn, *listtext; listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn); myfree(listname); myfree(listfqdn); switch(typesub) { default: case SUB_NORMAL: listtext = mystrdup("sub-ok"); break; case SUB_DIGEST: listtext = mystrdup("sub-ok-digest"); break; case SUB_NOMAIL: listtext = mystrdup("sub-ok-nomail"); break; case SUB_BOTH: /* No legacy list text as feature didn't exist. */ listtext = mystrdup("sub-ok"); break; } txt = open_text(listdir, "finish", "sub", subreason_strs[reasonsub], subtype_strs[typesub], listtext); myfree(listtext); MY_ASSERT(txt); register_unformatted(txt, "subaddr", subaddr); queuefilename = prepstdreply(txt, listdir, "$helpaddr$", subaddr, NULL); MY_ASSERT(queuefilename); close_text(txt); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", subaddr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } void notify_sub(const char *listdir, const char *listaddr, const char *listdelim, const char *subaddr, const char *mlmmjsend, enum subtype typesub, enum subreason reasonsub) { char *listfqdn, *listname, *fromaddr, *tostr; text *txt; char *queuefilename = NULL, *listtext = NULL; listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn); tostr = concatstr(4, listname, listdelim, "owner@", listfqdn); myfree(listname); myfree(listfqdn); switch(typesub) { default: case SUB_NORMAL: listtext = mystrdup("notifysub"); break; case SUB_DIGEST: listtext = mystrdup("notifysub-digest"); break; case SUB_NOMAIL: listtext = mystrdup("notifysub-nomail"); break; case SUB_BOTH: /* No legacy list text as feature didn't exist. */ listtext = mystrdup("notifysub"); break; } txt = open_text(listdir, "notify", "sub", subreason_strs[reasonsub], subtype_strs[typesub], listtext); myfree(listtext); MY_ASSERT(txt); register_unformatted(txt, "subaddr", subaddr); register_unformatted(txt, "newsub", subaddr); /* DEPRECATED */ queuefilename = prepstdreply(txt, listdir, "$listowner$", "$listowner$", NULL); MY_ASSERT(queuefilename); close_text(txt); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", tostr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } void generate_subconfirm(const char *listdir, const char *listaddr, const char *listdelim, const char *subaddr, const char *mlmmjsend, enum subtype typesub, enum subreason reasonsub) { int subconffd; char *confirmaddr, *listname, *listfqdn, *confirmfilename = NULL; text *txt; char *listtext, *queuefilename = NULL, *fromaddr; char *randomstr = NULL, *tmpstr; listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); do { myfree(confirmfilename); myfree(randomstr); randomstr = random_plus_addr(subaddr); confirmfilename = concatstr(3, listdir, "/subconf/", randomstr); subconffd = open(confirmfilename, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); } while ((subconffd < 0) && (errno == EEXIST)); if(subconffd < 0) { log_error(LOG_ARGS, "Could not open '%s'", confirmfilename); myfree(confirmfilename); myfree(randomstr); exit(EXIT_FAILURE); } myfree(confirmfilename); if(writen(subconffd, subaddr, strlen(subaddr)) < 0) { log_error(LOG_ARGS, "Could not write to subconffd"); myfree(confirmfilename); myfree(randomstr); exit(EXIT_FAILURE); } close(subconffd); fromaddr = concatstr(6, listname, listdelim, "bounces-confsub-", randomstr, "@", listfqdn); switch(typesub) { default: case SUB_NORMAL: listtext = mystrdup("sub-confirm"); tmpstr = mystrdup("confsub-"); break; case SUB_DIGEST: listtext = mystrdup("sub-confirm-digest"); tmpstr = mystrdup("confsub-digest-"); break; case SUB_NOMAIL: listtext = mystrdup("sub-confirm-nomail"); tmpstr = mystrdup("confsub-nomail-"); break; case SUB_BOTH: /* No legacy list text as feature didn't exist. */ listtext = mystrdup("sub-confirm"); tmpstr = mystrdup("confsub-both-"); break; } confirmaddr = concatstr(6, listname, listdelim, tmpstr, randomstr, "@", listfqdn); myfree(randomstr); myfree(tmpstr); txt = open_text(listdir, "confirm", "sub", subreason_strs[reasonsub], subtype_strs[typesub], listtext); myfree(listtext); MY_ASSERT(txt); register_unformatted(txt, "subaddr", subaddr); register_unformatted(txt, "confaddr", confirmaddr); /* DEPRECATED */ register_unformatted(txt, "confirmaddr", confirmaddr); queuefilename = prepstdreply(txt, listdir, "$helpaddr$", subaddr, confirmaddr); MY_ASSERT(queuefilename); close_text(txt); myfree(listname); myfree(listfqdn); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", subaddr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } static void print_help(const char *prg) { printf("Usage: %s -L /path/to/list {-a john@doe.org | -m str}\n" " [-c] [-C] [-f] [-h] [-L] [-d | -n] [-q] [-r | -R] [-s] [-U] [-V]\n" " -a: Email address to subscribe \n" " -c: Send welcome mail (unless requesting confirmation)\n" " -C: Request mail confirmation (unless switching versions)\n" " -d: Subscribe to digest of list\n" " -f: Force subscription (do not moderate)\n" " -h: This help\n" " -L: Full path to list directory\n" " -m: moderation string\n" " -n: Subscribe to no mail version of list\n", prg); printf(" -q: Be quiet (don't notify owner about the subscription)\n" " -r: Behave as if request arrived via email (internal use)\n" " -R: Behave as if confirmation arrived via email (internal use)\n" " -s: Don't send a mail to subscriber if already subscribed\n" " -U: Don't switch to the user id of the listdir owner\n" " -V: Print version\n" "To ensure a silent subscription, use -f -q -s\n"); exit(EXIT_SUCCESS); } void generate_subscribed(const char *listdir, const char *subaddr, const char *mlmmjsend, enum subtype typesub) { text *txt; char *queuefilename, *fromaddr, *listname, *listfqdn, *listaddr; char *listdelim = getlistdelim(listdir); listaddr = getlistaddr(listdir); listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn); myfree(listdelim); txt = open_text(listdir, "deny", "sub", "subbed", subtype_strs[typesub], "sub-subscribed"); MY_ASSERT(txt); register_unformatted(txt, "subaddr", subaddr); queuefilename = prepstdreply(txt, listdir, "$helpaddr$", subaddr, NULL); MY_ASSERT(queuefilename); close_text(txt); myfree(listaddr); myfree(listname); myfree(listfqdn); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", subaddr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } static void subscribe_type(char *listdir, char *listaddr, char *listdelim, char *address, char *mlmmjsend, enum subtype typesub, enum subreason reasonsub) { char *subfilename = NULL; char chstr[2], *subdir; char *subddirname = NULL, *sublockname; int groupwritable = 0, sublock, sublockfd, lock, subfilefd; struct stat st; size_t len; switch(typesub) { default: case SUB_NORMAL: subdir = "/subscribers.d/"; break; case SUB_DIGEST: subdir = "/digesters.d/"; break; case SUB_NOMAIL: subdir = "/nomailsubs.d/"; break; } subddirname = concatstr(2, listdir, subdir); if (stat(subddirname, &st) == 0) { if(st.st_mode & S_IWGRP) { groupwritable = S_IRGRP|S_IWGRP; umask(S_IWOTH); setgid(st.st_gid); } } chstr[0] = address[0]; chstr[1] = '\0'; subfilename = concatstr(3, listdir, subdir, chstr); sublockname = concatstr(5, listdir, subdir, ".", chstr, ".lock"); sublockfd = open(sublockname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); if(sublockfd < 0) { log_error(LOG_ARGS, "Error opening lock file %s", sublockname); myfree(sublockname); exit(EXIT_FAILURE); } sublock = myexcllock(sublockfd); if(sublock < 0) { log_error(LOG_ARGS, "Error locking '%s' file", sublockname); myfree(sublockname); close(sublockfd); exit(EXIT_FAILURE); } subfilefd = open(subfilename, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR|groupwritable); if(subfilefd == -1) { log_error(LOG_ARGS, "Could not open '%s'", subfilename); myfree(sublockname); exit(EXIT_FAILURE); } lock = myexcllock(subfilefd); if(lock) { log_error(LOG_ARGS, "Error locking subscriber file"); close(subfilefd); close(sublockfd); myfree(sublockname); exit(EXIT_FAILURE); } lseek(subfilefd, 0L, SEEK_END); len = strlen(address); address[len] = '\n'; writen(subfilefd, address, len + 1); address[len] = 0; close(subfilefd); close(sublockfd); unlink(sublockname); myfree(sublockname); } int main(int argc, char **argv) { char *listaddr, *listdelim, *listdir = NULL; char *mlmmjsend, *mlmmjunsub, *bindir; char *address = NULL, *lowcaseaddr, *modstr = NULL; const char *flag = NULL; int opt, subconfirm = 0, confirmsub = 0, notifysub; int changeuid = 1, status, digest = 0, nomail = 0, both = 0; int nogensubscribed = 0; int force = 0, quiet = 0, i = 0; enum subtype subbed; struct stat st; pid_t pid, childpid = 0; uid_t uid; enum subtype typesub = SUB_NORMAL; enum subreason reasonsub = SUB_ADMIN; CHECKFULLPATH(argv[0]); log_set_name(argv[0]); bindir = mydirname(argv[0]); mlmmjsend = concatstr(2, bindir, "/mlmmj-send"); mlmmjunsub = concatstr(2, bindir, "/mlmmj-unsub"); myfree(bindir); while ((opt = getopt(argc, argv, "hbcCdfm:nsVUL:a:qrR")) != -1) { switch(opt) { case 'a': address = optarg; break; case 'b': both = 1; break; case 'c': confirmsub = 1; break; case 'C': subconfirm = 1; break; case 'd': digest = 1; break; case 'f': force = 1; break; case 'h': print_help(argv[0]); break; case 'L': listdir = optarg; break; case 'm': modstr = optarg; break; case 'n': nomail = 1; break; case 'q': quiet = 1; break; case 'r': reasonsub = SUB_REQUEST; break; case 'R': reasonsub = SUB_CONFIRM; break; case 's': nogensubscribed = 1; break; case 'U': changeuid = 0; break; case 'V': print_version(argv[0]); exit(0); } } if(listdir == NULL) { fprintf(stderr, "You have to specify -L\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } if(address == NULL && modstr == NULL) { fprintf(stderr, "You have to specify -a or -m\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } if(both + digest + nomail > 1) { fprintf(stderr, "Specify at most one of -b, -d and -n\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } if(digest) typesub = SUB_DIGEST; if(nomail) typesub = SUB_NOMAIL; if(both) typesub = SUB_BOTH; if(reasonsub == SUB_CONFIRM && subconfirm) { fprintf(stderr, "Cannot specify both -C and -R\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } if(modstr) { getaddrandtype(listdir, modstr, &address, &typesub); reasonsub = SUB_PERMIT; } if(strchr(address, '@') == NULL) { log_error(LOG_ARGS, "No '@' sign in '%s', not subscribing", address); exit(EXIT_SUCCESS); } /* Make the address lowercase */ lowcaseaddr = mystrdup(address); i = 0; while(lowcaseaddr[i]) { lowcaseaddr[i] = tolower(lowcaseaddr[i]); i++; } address = lowcaseaddr; /* get the list address */ listaddr = getlistaddr(listdir); if(strncasecmp(listaddr, address, strlen(listaddr)) == 0) { printf("Cannot subscribe the list address to the list\n"); exit(EXIT_SUCCESS); /* XXX is this success? */ } if(changeuid) { uid = getuid(); if(!uid && stat(listdir, &st) == 0) { printf("Changing to uid %d, owner of %s.\n", (int)st.st_uid, listdir); if(setuid(st.st_uid) < 0) { perror("setuid"); fprintf(stderr, "Continuing as uid %d\n", (int)uid); } } } subbed = is_subbed(listdir, address, 1); if(subbed == typesub) { if(!nogensubscribed) generate_subscribed(listdir, address, mlmmjsend, typesub); return EXIT_SUCCESS; } else if(subbed != SUB_NONE) { reasonsub = SUB_SWITCH; /* If we want to subscribe to both, we can just subscribe the * missing version, so don't unsub. */ if (!(typesub == SUB_BOTH && subbed != SUB_NOMAIL)) { childpid = fork(); if(childpid < 0) { log_error(LOG_ARGS, "Could not fork; " "not unsubscribed from current version"); } if (childpid == 0) { if (subbed == SUB_BOTH) { if (typesub == SUB_NORMAL) flag = "-d"; if (typesub == SUB_DIGEST) flag = "-N"; } execlp(mlmmjunsub, mlmmjunsub, "-L", listdir, "-q", "-a", address, flag, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjunsub); exit(EXIT_FAILURE); } } } if(childpid > 0) { do /* Parent waits for the child */ pid = waitpid(childpid, &status, 0); while(pid == -1 && errno == EINTR); } listdelim = getlistdelim(listdir); if(subbed == SUB_NONE && subconfirm) generate_subconfirm(listdir, listaddr, listdelim, address, mlmmjsend, typesub, reasonsub); if(modstr == NULL && subbed == SUB_NONE && !force && statctrl(listdir, "submod")) { moderate_sub(listdir, listaddr, listdelim, address, mlmmjsend, typesub, reasonsub); } if (typesub == SUB_BOTH) { if (subbed != SUB_NORMAL) { subscribe_type(listdir, listaddr, listdelim, address, mlmmjsend, SUB_NORMAL, reasonsub); } if (subbed != SUB_DIGEST) { subscribe_type(listdir, listaddr, listdelim, address, mlmmjsend, SUB_DIGEST, reasonsub); } } else if (!(subbed == SUB_BOTH && typesub != SUB_NOMAIL)) { subscribe_type(listdir, listaddr, listdelim, address, mlmmjsend, typesub, reasonsub); } if(confirmsub) { childpid = fork(); if(childpid < 0) { log_error(LOG_ARGS, "Could not fork; owner not notified"); confirm_sub(listdir, listaddr, listdelim, address, mlmmjsend, typesub, reasonsub); } if(childpid > 0) { do /* Parent waits for the child */ pid = waitpid(childpid, &status, 0); while(pid == -1 && errno == EINTR); } /* child confirms subscription */ if(childpid == 0) confirm_sub(listdir, listaddr, listdelim, address, mlmmjsend, typesub, reasonsub); } notifysub = !quiet && reasonsub != SUB_SWITCH && statctrl(listdir, "notifysub"); /* Notify list owner about subscription */ if (notifysub) notify_sub(listdir, listaddr, listdelim, address, mlmmjsend, typesub, reasonsub); myfree(address); myfree(listaddr); myfree(listdelim); return EXIT_SUCCESS; } mlmmj-1.2.18.0/src/mlmmj-unsub.c000644 000765 000120 00000044167 11734220454 016165 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "mlmmj-unsub.h" #include "mylocking.h" #include "wrappers.h" #include "mygetline.h" #include "getlistaddr.h" #include "getlistdelim.h" #include "subscriberfuncs.h" #include "strgen.h" #include "log_error.h" #include "memory.h" #include "statctrl.h" #include "prepstdreply.h" void confirm_unsub(const char *listdir, const char *listaddr, const char *listdelim, const char *subaddr, const char *mlmmjsend, enum subtype typesub, enum subreason reasonsub) { text *txt; char *queuefilename, *fromaddr, *listname, *listfqdn, *listtext; listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn); myfree(listname); myfree(listfqdn); switch(typesub) { default: case SUB_NORMAL: listtext = mystrdup("unsub-ok"); break; case SUB_DIGEST: listtext = mystrdup("unsub-ok-digest"); break; case SUB_NOMAIL: listtext = mystrdup("unsub-ok-nomail"); break; } txt = open_text(listdir, "finish", "unsub", subreason_strs[reasonsub], subtype_strs[typesub], listtext); myfree(listtext); MY_ASSERT(txt); register_unformatted(txt, "subaddr", subaddr); queuefilename = prepstdreply(txt, listdir, "$helpaddr$", subaddr, NULL); MY_ASSERT(queuefilename); close_text(txt); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", subaddr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } void notify_unsub(const char *listdir, const char *listaddr, const char *listdelim, const char *subaddr, const char *mlmmjsend, enum subtype typesub, enum subreason reasonsub) { char *listfqdn, *listname, *fromaddr, *tostr; text *txt; char *queuefilename = NULL, *listtext; listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn); tostr = concatstr(4, listname, listdelim, "owner@", listfqdn); myfree(listname); myfree(listfqdn); switch(typesub) { default: case SUB_NORMAL: listtext = mystrdup("notifyunsub"); break; case SUB_DIGEST: listtext = mystrdup("notifyunsub-digest"); break; case SUB_NOMAIL: listtext = mystrdup("notifyunsub-nomail"); break; } txt = open_text(listdir, "notify", "unsub", subreason_strs[reasonsub], subtype_strs[typesub], listtext); myfree(listtext); MY_ASSERT(txt); register_unformatted(txt, "subaddr", subaddr); register_unformatted(txt, "oldsub", subaddr); /* DEPRECATED */ queuefilename = prepstdreply(txt, listdir, "$listowner$", "$listowner$", NULL); MY_ASSERT(queuefilename); close_text(txt); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", tostr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } void generate_unsubconfirm(const char *listdir, const char *listaddr, const char *listdelim, const char *subaddr, const char *mlmmjsend, enum subtype typesub, enum subreason reasonsub) { char *confirmaddr, *listname, *listfqdn, *tmpstr; text *txt; char *queuefilename, *fromaddr; char *randomstr = NULL, *confirmfilename = NULL, *listtext; int subconffd; listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); do { myfree(confirmfilename); myfree(randomstr); randomstr = random_plus_addr(subaddr); confirmfilename = concatstr(3, listdir, "/unsubconf/", randomstr); subconffd = open(confirmfilename, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); } while ((subconffd < 0) && (errno == EEXIST)); if(subconffd < 0) { log_error(LOG_ARGS, "Could not open '%s'", confirmfilename); myfree(randomstr); myfree(confirmfilename); exit(EXIT_FAILURE); } myfree(confirmfilename); if(writen(subconffd, subaddr, strlen(subaddr)) < 0) { log_error(LOG_ARGS, "Could not write unsubconffile"); myfree(randomstr); myfree(confirmfilename); exit(EXIT_FAILURE); } close(subconffd); fromaddr = concatstr(6, listname, listdelim, "bounces-confunsub-", randomstr, "@", listfqdn); switch(typesub) { default: case SUB_NORMAL: listtext = mystrdup("unsub-confirm"); tmpstr = mystrdup("confunsub-"); break; case SUB_DIGEST: listtext = mystrdup("unsub-confirm-digest"); tmpstr = mystrdup("confunsub-digest-"); break; case SUB_NOMAIL: listtext = mystrdup("unsub-confirm-nomail"); tmpstr = mystrdup("confunsub-nomail-"); break; } confirmaddr = concatstr(6, listname, listdelim, tmpstr, randomstr, "@", listfqdn); myfree(randomstr); myfree(tmpstr); txt = open_text(listdir, "confirm", "unsub", subreason_strs[reasonsub], subtype_strs[typesub], listtext); myfree(listtext); MY_ASSERT(txt); register_unformatted(txt, "subaddr", subaddr); register_unformatted(txt, "confaddr", confirmaddr); /* DEPRECATED */ register_unformatted(txt, "confirmaddr", confirmaddr); queuefilename = prepstdreply(txt, listdir, "$helpaddr$", subaddr, confirmaddr); MY_ASSERT(queuefilename); close_text(txt); myfree(listname); myfree(listfqdn); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", subaddr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } ssize_t unsubscribe(int subreadfd, int subwritefd, const char *address) { off_t suboff = find_subscriber(subreadfd, address); struct stat st; char *inmap; size_t len = strlen(address) + 1; /* + 1 for the '\n' */ ssize_t writeres = 0, written = 0; if(suboff == -1) return -1; /* Did not find subscriber */ if(fstat(subreadfd, &st) < 0) { log_error(LOG_ARGS, "Could not stat subreadfd"); return -1; } if((inmap = mmap(0, st.st_size, PROT_READ, MAP_SHARED, subreadfd, 0)) == MAP_FAILED) { log_error(LOG_ARGS, "Could not mmap subreadfd"); return -1; } if(suboff > 0) { writeres = writen(subwritefd, inmap, suboff); if(writeres < 0) return -1; } written += writeres; writeres = writen(subwritefd, inmap + len + suboff, st.st_size - len - suboff); if(writeres < 0) return -1; written += writeres; munmap(inmap, st.st_size); return written; } static void print_help(const char *prg) { printf("Usage: %s -L /path/to/list -a john@doe.org\n" " [-b] [-c | -C] [-h] [-L] [-d | -n | -N] [-q] [-r | -R] [-s] [-V]\n" " -a: Email address to unsubscribe \n" " -b: Behave as if unsubscription is due to bouncing (internal use)\n" " -c: Send goodbye mail\n" " -C: Request mail confirmation\n" " -d: Unsubscribe from digest of list\n" " -h: This help\n" " -L: Full path to list directory\n" " -n: Unsubscribe from no mail version of list\n" " -N: Unsubscribe from normal version of list\n", prg); printf(" -q: Be quiet (don't notify owner about the subscription)\n" " -r: Behave as if request arrived via email (internal use)\n" " -R: Behave as if confirmation arrived via email (internal use)\n" " -s: Don't send a mail to the address if not subscribed\n" " -U: Don't switch to the user id of the listdir owner\n" " -V: Print version\n" "To ensure a silent unsubscription, use -q -s\n"); exit(EXIT_SUCCESS); } static void generate_notsubscribed(const char *listdir, const char *subaddr, const char *mlmmjsend, enum subtype typesub) { text *txt; char *queuefilename, *fromaddr, *listname, *listfqdn, *listaddr; char *listdelim = getlistdelim(listdir); listaddr = getlistaddr(listdir); listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn); myfree(listdelim); txt = open_text(listdir, "deny", "unsub", "unsubbed", subtype_strs[typesub], "unsub-notsubscribed"); MY_ASSERT(txt); register_unformatted(txt, "subaddr", subaddr); queuefilename = prepstdreply(txt, listdir, "$helpaddr$", subaddr, NULL); MY_ASSERT(queuefilename); close_text(txt); myfree(listaddr); myfree(listname); myfree(listfqdn); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", subaddr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } static void unsubscribe_type(char *listdir, char *listaddr, char *listdelim, char *address, char *mlmmjsend, enum subtype typesub, enum subreason reasonsub) { char *subdir, *subddirname, *sublockname; char *subreadname = NULL, *subwritename; int subread, subwrite, rlock, wlock; int sublock, sublockfd; int groupwritable = 0; int unsubres; struct stat st; DIR *subddir; struct dirent *dp; off_t suboff; switch(typesub) { default: case SUB_NORMAL: subdir = "/subscribers.d/"; break; case SUB_DIGEST: subdir = "/digesters.d/"; break; case SUB_NOMAIL: subdir = "/nomailsubs.d/"; break; } subddirname = concatstr(2, listdir, subdir); if (stat(subddirname, &st) == 0) { if(st.st_mode & S_IWGRP) { groupwritable = S_IRGRP|S_IWGRP; umask(S_IWOTH); } } if((subddir = opendir(subddirname)) == NULL) { log_error(LOG_ARGS, "Could not opendir(%s)", subddirname); myfree(subddirname); exit(EXIT_FAILURE); } myfree(subddirname); while((dp = readdir(subddir)) != NULL) { if(!strcmp(dp->d_name, ".")) continue; if(!strcmp(dp->d_name, "..")) continue; subreadname = concatstr(3, listdir, subdir, dp->d_name); subread = open(subreadname, O_RDWR); if(subread == -1) { myfree(subreadname); continue; } suboff = find_subscriber(subread, address); if(suboff == -1) { close(subread); myfree(subreadname); continue; } /* create a .name.lock file and aquire the lock */ sublockname = concatstr(5, listdir, subdir, ".", dp->d_name, ".lock"); sublockfd = open(sublockname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); if(sublockfd < 0) { log_error(LOG_ARGS, "Error opening lock file %s", sublockname); myfree(sublockname); continue; } sublock = myexcllock(sublockfd); if(sublock < 0) { log_error(LOG_ARGS, "Error locking '%s' file", sublockname); myfree(sublockname); close(sublockfd); continue; } rlock = myexcllock(subread); if(rlock < 0) { log_error(LOG_ARGS, "Error locking '%s' file", subreadname); close(subread); close(sublockfd); myfree(subreadname); myfree(sublockname); continue; } subwritename = concatstr(2, subreadname, ".new"); subwrite = open(subwritename, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | groupwritable); if(subwrite == -1){ log_error(LOG_ARGS, "Could not open '%s'", subwritename); close(subread); close(sublockfd); myfree(subreadname); myfree(subwritename); myfree(sublockname); continue; } wlock = myexcllock(subwrite); if(wlock < 0) { log_error(LOG_ARGS, "Error locking '%s'", subwritename); close(subread); close(subwrite); close(sublockfd); myfree(subreadname); myfree(subwritename); myfree(sublockname); continue; } unsubres = unsubscribe(subread, subwrite, address); if(unsubres < 0) { close(subread); close(subwrite); close(sublockfd); unlink(subwritename); myfree(subreadname); myfree(subwritename); myfree(sublockname); continue; } if(unsubres > 0) { if(rename(subwritename, subreadname) < 0) { log_error(LOG_ARGS, "Could not rename '%s' to '%s'", subwritename, subreadname); close(subread); close(subwrite); myfree(subreadname); myfree(subwritename); continue; } } else { /* unsubres == 0, no subscribers left */ unlink(subwritename); unlink(subreadname); } close(subread); close(subwrite); close(sublockfd); myfree(subreadname); myfree(subwritename); unlink(sublockname); myfree(sublockname); } closedir(subddir); } int main(int argc, char **argv) { int opt; int normal = 0, digest = 0, nomail = 0, subbed; int confirmunsub = 0, unsubconfirm = 0, notifysub = 0; int changeuid = 1, quiet = 0; int nogennotsubscribed = 0, i = 0; int status; char *listaddr, *listdelim, *listdir = NULL, *address = NULL; char *mlmmjsend, *bindir, *subdir, *subddirname; char *lowcaseaddr; enum subtype typesub = SUB_ALL; enum subreason reasonsub = SUB_ADMIN; uid_t uid; struct stat st; pid_t pid, childpid; CHECKFULLPATH(argv[0]); log_set_name(argv[0]); bindir = mydirname(argv[0]); mlmmjsend = concatstr(2, bindir, "/mlmmj-send"); myfree(bindir); while ((opt = getopt(argc, argv, "hcCdenNVUL:a:sbqrR")) != -1) { switch(opt) { case 'L': listdir = optarg; break; case 'a': address = optarg; break; case 'b': reasonsub = SUB_BOUNCING; break; case 'c': confirmunsub = 1; break; case 'C': unsubconfirm = 1; break; case 'd': digest = 1; break; case 'h': print_help(argv[0]); break; case 'n': nomail = 1; break; case 'N': normal = 1; break; case 'q': quiet = 1; break; case 'r': reasonsub = SUB_REQUEST; break; case 'R': reasonsub = SUB_CONFIRM; break; case 's': nogennotsubscribed = 1; break; case 'U': changeuid = 0; break; case 'V': print_version(argv[0]); exit(0); } } if(listdir == 0 || address == 0) { fprintf(stderr, "You have to specify -L and -a\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } if(digest + nomail + normal > 1) { fprintf(stderr, "Specify at most one of -d, -n and -N\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } if(digest) typesub = SUB_DIGEST; if(nomail) typesub = SUB_NOMAIL; if(normal) typesub = SUB_NORMAL; if(confirmunsub && unsubconfirm) { fprintf(stderr, "Cannot specify both -C and -c\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } if(reasonsub == SUB_CONFIRM && unsubconfirm) { fprintf(stderr, "Cannot specify both -C and -R\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } if(reasonsub == SUB_BOUNCING && unsubconfirm) { fprintf(stderr, "Cannot specify both -C and -b\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } /* Make the address lowercase */ lowcaseaddr = mystrdup(address); i = 0; while(lowcaseaddr[i]) { lowcaseaddr[i] = tolower(lowcaseaddr[i]); i++; } address = lowcaseaddr; /* get the list address */ listaddr = getlistaddr(listdir); listdelim = getlistdelim(listdir); if(changeuid) { uid = getuid(); if(!uid && stat(listdir, &st) == 0) { printf("Changing to uid %d, owner of %s.\n", (int)st.st_uid, listdir); if(setuid(st.st_uid) < 0) { perror("setuid"); fprintf(stderr, "Continuing as uid %d\n", (int)uid); } } } if (typesub == SUB_ALL) { subbed = is_subbed(listdir, address, 0) != SUB_NONE; } else { switch(typesub) { default: case SUB_NORMAL: subdir = "/subscribers.d/"; break; case SUB_DIGEST: subdir = "/digesters.d/"; break; case SUB_NOMAIL: subdir = "/nomailsubs.d/"; break; } subddirname = concatstr(2, listdir, subdir); subbed = is_subbed_in(subddirname, address); myfree(subddirname); } if(!subbed) { /* Address is not subscribed */ myfree(listaddr); myfree(listdelim); if(!nogennotsubscribed) { generate_notsubscribed(listdir, address, mlmmjsend, typesub); } exit(EXIT_SUCCESS); } if(unsubconfirm) generate_unsubconfirm(listdir, listaddr, listdelim, address, mlmmjsend, typesub, reasonsub); if (typesub == SUB_ALL) { unsubscribe_type(listdir, listaddr, listdelim, address, mlmmjsend, SUB_NORMAL, reasonsub); unsubscribe_type(listdir, listaddr, listdelim, address, mlmmjsend, SUB_DIGEST, reasonsub); unsubscribe_type(listdir, listaddr, listdelim, address, mlmmjsend, SUB_NOMAIL, reasonsub); } else { unsubscribe_type(listdir, listaddr, listdelim, address, mlmmjsend, typesub, reasonsub); } if(confirmunsub) { childpid = fork(); if(childpid < 0) { log_error(LOG_ARGS, "Could not fork"); confirm_unsub(listdir, listaddr, listdelim, address, mlmmjsend, typesub, reasonsub); } if(childpid > 0) { do /* Parent waits for the child */ pid = waitpid(childpid, &status, 0); while(pid == -1 && errno == EINTR); } /* child confirms subscription */ if(childpid == 0) confirm_unsub(listdir, listaddr, listdelim, address, mlmmjsend, typesub, reasonsub); } notifysub = !quiet && statctrl(listdir, "notifysub"); /* Notify list owner about subscription */ if (notifysub) notify_unsub(listdir, listaddr, listdelim, address, mlmmjsend, typesub, reasonsub); myfree(listaddr); myfree(listdelim); return EXIT_SUCCESS; } mlmmj-1.2.18.0/src/mygetline.c000644 000765 000120 00000004054 11727635244 015714 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Morten K. Poulsen * Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include "mygetline.h" #include "memory.h" static char *mygetuntil(int fd, int eof) { size_t i = 0, res, buf_size = BUFSIZE; /* initial buffer size */ char *buf, ch; buf = mymalloc(buf_size); buf[0] = '\0'; while(1) { res = read(fd, &ch, 1); if(res < 0) { if(errno == EINTR) continue; else { myfree(buf); return NULL; } } if(res == 0) { if(buf[0]) { buf[i] = '\0'; return buf; } else { myfree(buf); return NULL; } } if(i == buf_size - 1) { buf_size *= 2; buf = myrealloc(buf, buf_size); } buf[i++] = ch; if(eof != EOF && ch == eof) { buf[i] = '\0'; return buf; } } } char *mygetline(int fd) { return mygetuntil(fd, '\n'); } char *mygetcontent(int fd) { return mygetuntil(fd, EOF); } mlmmj-1.2.18.0/src/mylocking.c000644 000765 000120 00000003412 11414633671 015703 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003, 2005 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include "mylocking.h" int myexcllock(int fd) { int excllock; struct flock locktype; locktype.l_type = F_WRLCK; locktype.l_whence = SEEK_SET; locktype.l_start = 0; locktype.l_len = 0; do { excllock = fcntl(fd, F_SETLKW, &locktype); } while(excllock < 0 && errno == EINTR); return excllock; } int myunlock(int fd) { int unlock; struct flock locktype; locktype.l_type = F_UNLCK; locktype.l_whence = SEEK_SET; locktype.l_start = 0; locktype.l_len = 0; do { unlock = fcntl(fd, F_SETLKW, &locktype); } while(unlock < 0 && errno == EINTR); return unlock; } mlmmj-1.2.18.0/src/prepstdreply.c000644 000765 000120 00000125357 11744131530 016452 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * Copyright (C) 2007 Morten K. Poulsen * Copyright (C) 2011 Ben Schmidt * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include "prepstdreply.h" #include "statctrl.h" #include "ctrlvalue.h" #include "strgen.h" #include "chomp.h" #include "log_error.h" #include "mygetline.h" #include "wrappers.h" #include "memory.h" #include "getlistaddr.h" #include "mlmmj.h" #include "getlistdelim.h" #include "unistr.h" struct substitution; typedef struct substitution substitution; struct substitution { char *token; char *subst; substitution *next; }; struct formatted; typedef struct formatted formatted; struct formatted { char *token; rewind_function rew; get_function get; void *state; formatted *next; }; struct source; typedef struct source source; struct source { source *prev; char *upcoming; int processedlen; int processedwidth; char *prefix; int prefixlen; int prefixwidth; char *suffix; int fd; formatted *fmt; int transparent; int limit; }; struct conditional; typedef struct conditional conditional; struct conditional { int satisfied; int elsepart; conditional *outer; }; enum conditional_target { ACTION, REASON, TYPE, CONTROL }; enum wrap_mode { WRAP_WORD, WRAP_CHAR, WRAP_USER }; enum width_reckoning { WIDTH_THIN, WIDTH_WIDE }; struct text { char *action; char *reason; char *type; source *src; substitution *substs; char *mailname; formatted *fmts; int wrapindent; int wrapwidth; enum wrap_mode wrapmode; enum width_reckoning widthreckoning; char *zerowidth; conditional *cond; conditional *skip; }; struct memory_lines_state { char *lines; char *pos; }; struct file_lines_state { char *filename; int fd; char truncate; char *line; }; memory_lines_state *init_memory_lines(const char *lines) { memory_lines_state *s = mymalloc(sizeof(memory_lines_state)); size_t len; /* Ensure there *is* a trailing newline */ s->pos = NULL; len = strlen(lines); if (lines[len-1] == '\n') { s->lines = mystrdup(lines); return s; } s->lines = mymalloc((len + 2) * sizeof(char)); strcpy(s->lines, lines); s->lines[len] = '\n'; s->lines[len+1] = '\0'; return s; } void rewind_memory_lines(void *state) { memory_lines_state *s = (memory_lines_state *)state; if (s == NULL) return; s->pos = NULL; } const char *get_memory_line(void *state) { memory_lines_state *s = (memory_lines_state *)state; char *line, *pos; if (s == NULL) return NULL; if (s->pos != NULL) *s->pos++ = '\n'; else s->pos = s->lines; line = s->pos; pos = line; if (*pos == '\0') { s->pos = NULL; return NULL; } while (*pos != '\n') pos++; *pos = '\0'; s->pos = pos; return line; } void finish_memory_lines(memory_lines_state *s) { if (s == NULL) return; myfree(s->lines); myfree(s); } file_lines_state *init_file_lines(const char *filename, int open_now) { file_lines_state *s = mymalloc(sizeof(file_lines_state)); if (open_now) { s->fd = open(filename, O_RDONLY); s->filename = NULL; if (s->fd < 0) { myfree(s); return NULL; } } else { s->filename = mystrdup(filename); s->fd = -1; } s->truncate = '\0'; s->line = NULL; return s; } file_lines_state *init_truncated_file_lines(const char *filename, int open_now, char truncate) { file_lines_state *s; s = init_file_lines(filename, open_now); if (s == NULL) return NULL; s->truncate = truncate; return s; } void rewind_file_lines(void *state) { file_lines_state *s = (file_lines_state *)state; if (s == NULL) return; if (s->filename != NULL) { s->fd = open(s->filename, O_RDONLY); myfree(s->filename); s->filename = NULL; } if (s->fd >= 0) { if(lseek(s->fd, 0, SEEK_SET) < 0) { log_error(LOG_ARGS, "Could not seek to start of file"); close(s->fd); s->fd = -1; } } } const char *get_file_line(void *state) { file_lines_state *s = (file_lines_state *)state; char *end; if (s == NULL) return NULL; if (s->line != NULL) { myfree(s->line); s->line = NULL; } if (s->fd >= 0) { s->line = mygetline(s->fd); if (s->line == NULL) return NULL; if (s->truncate != '\0') { end = strchr(s->line, s->truncate); if (end == NULL) return NULL; *end = '\0'; } else { chomp(s->line); } return s->line; } return NULL; } void finish_file_lines(file_lines_state *s) { if (s == NULL) return; if (s->line != NULL) myfree(s->line); if (s->fd >= 0) close(s->fd); if (s->filename != NULL) myfree(s->filename); myfree(s); } static char *filename_token(char *token) { char *pos = token; if (*pos == '\0') return NULL; while ( (*pos >= '0' && *pos <= '9') || (*pos >= 'A' && *pos <= 'Z') || (*pos >= 'a' && *pos <= 'z') || (*pos == '_') || (*pos == '-') || (*pos == '.' && pos != token) ) { pos++; } if (*pos != '\0') return NULL; return token; } static char *numeric_token(char *token) { char *pos; if (*token == '\0') return NULL; for(pos = token; *pos != '\0'; pos++) { if(*pos >= '0' && *pos <= '9') continue; break; } if (*pos != '\0') return NULL; return token; } static void substitute_one(char **line_p, char **pos_p, int *width_p, const char *listaddr, const char *listdelim, const char *listdir, text *txt) { /* It is important for this function to leave the length of the * processed portion unchanged, or increase it by just one ASCII * character (for $$). */ char *line = *line_p; char *pos = *pos_p; char *token = pos + 1; char *endpos; char *fqdn, *listname; char *value = NULL; substitution *subst; endpos = strchr(token, '$'); if (endpos == NULL) { (*pos_p)++; (*width_p)++; return; } *pos = '\0'; *endpos = '\0'; fqdn = genlistfqdn(listaddr); listname = genlistname(listaddr); if(strcmp(token, "") == 0) { value = mystrdup("$"); } else if(strcmp(token, "listaddr") == 0) { /* DEPRECATED: use $list$@$domain$ instead */ value = mystrdup(listaddr); } else if(strcmp(token, "list+") == 0) { value = concatstr(2, listname, listdelim); } else if(strcmp(token, "list") == 0) { value = mystrdup(listname); } else if(strcmp(token, "domain") == 0) { value = mystrdup(fqdn); } else if(strcmp(token, "listowner") == 0) { /* DEPRECATED: use $list+$owner@$domain$ instead */ value = concatstr(4, listname, listdelim, "owner@", fqdn); } else if(strcmp(token, "helpaddr") == 0) { /* DEPRECATED: use $list+$help@$domain$ instead */ value = concatstr(4, listname, listdelim, "help@", fqdn); } else if(strcmp(token, "faqaddr") == 0) { /* DEPRECATED: use $list+$faq@$domain$ instead */ value = concatstr(4, listname, listdelim, "faq@", fqdn); } else if(strcmp(token, "listgetN") == 0) { /* DEPRECATED: use $list+$get-N@$domain$ instead */ value = concatstr(4, listname, listdelim, "get-N@", fqdn); } else if(strcmp(token, "listunsubaddr") == 0) { /* DEPRECATED: use $list+$unsubscribe@$domain$ instead */ value = concatstr(4, listname, listdelim, "unsubscribe@", fqdn); } else if(strcmp(token, "digestunsubaddr") == 0) { /* DEPRECATED: use $list+$unsubscribe-digest@$domain$ instead */ value = concatstr(4, listname, listdelim, "unsubscribe-digest@", fqdn); } else if(strcmp(token, "nomailunsubaddr") == 0) { /* DEPRECATED: use $list+$unsubscribe-nomail@$domain$ instead */ value = concatstr(4, listname, listdelim, "unsubscribe-nomail@", fqdn); } else if(strcmp(token, "listsubaddr") == 0) { /* DEPRECATED: use $list+$subscribe@$domain$ instead */ value = concatstr(4, listname, listdelim, "subscribe@", fqdn); } else if(strcmp(token, "digestsubaddr") == 0) { /* DEPRECATED: use $list+$subscribe-digest@$domain$ instead */ value = concatstr(4, listname, listdelim, "subscribe-digest@", fqdn); } else if(strcmp(token, "nomailsubaddr") == 0) { /* DEPRECATED: use $list+$subscribe-nomail@$domain$ instead */ value = concatstr(4, listname, listdelim, "subscribe-nomail@", fqdn); } else if(strncmp(token, "control ", 8) == 0) { token = filename_token(token + 8); if (token != NULL) value = ctrlcontent(listdir, token); } else if(strncmp(token, "text ", 5) == 0) { token = filename_token(token + 5); if (token != NULL) value = textcontent(listdir, token); } else if(strcmp(token, "originalmail") == 0) { /* DEPRECATED: use %originalmail% instead */ value = mystrdup(" %originalmail 100%"); } else { subst = txt->substs; while (subst != NULL) { if(strcmp(token, subst->token) == 0) { value = mystrdup(subst->subst); break; } subst = subst->next; } } if (value != NULL) { line = concatstr(3, line, value, endpos + 1); *pos_p = line + (*pos_p - *line_p); if (strcmp(value, "$") == 0) { (*pos_p)++; (*width_p)++; } myfree(*line_p); *line_p = line; myfree(value); } else { *pos = '$'; *endpos = '$'; (*pos_p)++; (*width_p)++; } myfree(fqdn); myfree(listname); } char *substitute(const char *line, const char *listaddr, const char *listdelim, const char *listdir, text *txt) { char *new; char *pos; int width = 0; /* Just a dummy here */ new = mystrdup(line); pos = new; while (*pos != '\0') { if (*pos == '$') { substitute_one(&new, &pos, &width, listaddr, listdelim, listdir, txt); /* The function sets up for the next character * to process, so continue straight away. */ continue; } pos++; } return new; } text *open_text_file(const char *listdir, const char *filename) { char *tmp; text *txt; txt = mymalloc(sizeof(text)); txt->src = mymalloc(sizeof(source)); txt->src->prev = NULL; txt->src->upcoming = NULL; txt->src->processedlen = 0; txt->src->processedwidth = 0; txt->src->prefix = NULL; txt->src->prefixlen = 0; txt->src->prefixwidth = 0; txt->src->suffix = NULL; txt->src->transparent = 0; txt->src->limit = -1; txt->src->fmt = NULL; txt->action = NULL; txt->reason = NULL; txt->type = NULL; txt->substs = NULL; txt->mailname = NULL; txt->fmts = NULL; txt->wrapindent = 0; txt->wrapwidth = 0; txt->wrapmode = WRAP_WORD; txt->widthreckoning = WIDTH_THIN; txt->zerowidth = NULL; txt->cond = NULL; txt->skip = NULL; tmp = concatstr(3, listdir, "/text/", filename); txt->src->fd = open(tmp, O_RDONLY); myfree(tmp); if (txt->src->fd >= 0) return txt; tmp = concatstr(2, DEFAULTTEXTDIR "/default/", filename); txt->src->fd = open(tmp, O_RDONLY); myfree(tmp); if (txt->src->fd >= 0) return txt; tmp = concatstr(2, DEFAULTTEXTDIR "/en/", filename); txt->src->fd = open(tmp, O_RDONLY); myfree(tmp); if (txt->src->fd >= 0) return txt; return NULL; } text *open_text(const char *listdir, const char *purpose, const char *action, const char *reason, const char *type, const char *compat) { size_t filenamelen, len; char *filename; text *txt; filename = concatstr(7,purpose,"-",action,"-",reason,"-",type); filenamelen = strlen(filename); do { if ((txt = open_text_file(listdir, filename)) != NULL) break; len = type ? strlen(type) : 0; filename[filenamelen-len-1] = '\0'; if ((txt = open_text_file(listdir, filename)) != NULL) break; filename[filenamelen-len-1] = '-'; filenamelen -= len + 1; len = reason ? strlen(reason) : 0; filename[filenamelen-len-1] = '\0'; if ((txt = open_text_file(listdir, filename)) != NULL) break; filename[filenamelen-len-1] = '-'; filenamelen -= len + 1; len = action ? strlen(action) : 0; filename[filenamelen-len-1] = '\0'; if ((txt = open_text_file(listdir, filename)) != NULL) break; filename[filenamelen-len-1] = '-'; filenamelen -= len + 1; if ((txt = open_text_file(listdir, compat)) != NULL) { myfree(filename); filename = mystrdup(compat); break; } log_error(LOG_ARGS, "Could not open listtext '%s'", filename); myfree(filename); return NULL; } while (0); txt->action = action != NULL ? mystrdup(action) : NULL; txt->reason = reason != NULL ? mystrdup(reason) : NULL; txt->type = type != NULL ? mystrdup(type) : NULL; return txt; } void close_source(text *txt) { source *tmp; if (txt->src->fd != -1) close(txt->src->fd); if (txt->src->prefix != NULL) myfree(txt->src->prefix); if (txt->src->suffix != NULL) myfree(txt->src->suffix); tmp = txt->src; txt->src = txt->src->prev; myfree(tmp); } void register_unformatted(text *txt, const char *token, const char *replacement) { substitution * subst = mymalloc(sizeof(substitution)); subst->token = mystrdup(token); subst->subst = mystrdup(replacement); subst->next = txt->substs; txt->substs = subst; } void register_originalmail(text *txt, const char *mailname) { txt->mailname = mystrdup(mailname); } void register_formatted(text *txt, const char *token, rewind_function rew, get_function get, void *state) { formatted * fmt = mymalloc(sizeof(formatted)); fmt->token = mystrdup(token); fmt->rew = rew; fmt->get = get; fmt->state = state; fmt->next = txt->fmts; txt->fmts = fmt; } static void begin_new_source_file(text *txt, char **line_p, char **pos_p, int *width_p, const char *filename, int transparent) { char *line = *line_p; char *pos = *pos_p; char *tmp, *esc; source *src; int fd; int i; /* Save any later lines for use after finishing the source */ while (*pos != '\0' && *pos != '\r' && *pos != '\n') pos++; if (*pos == '\r') pos++; if (*pos == '\n') pos++; if (*pos != '\0') { txt->src->upcoming = mystrdup(pos); txt->src->processedlen = 0; txt->src->processedwidth = 0; } fd = open(filename, O_RDONLY); if (fd < 0) { /* Act as if the source were an empty line */ **pos_p = '\0'; return; } src = mymalloc(sizeof(source)); src->prev = txt->src; src->upcoming = NULL; src->prefixlen = strlen(line); src->prefixwidth = *width_p; src->prefix = mymalloc((*width_p + 1) * sizeof(char)); for (tmp = src->prefix, i = 0; i < *width_p; tmp++, i++) *tmp = ' '; *tmp = '\0'; src->suffix = NULL; src->fd = fd; src->fmt = NULL; src->transparent = transparent; src->limit = -1; txt->src = src; tmp = mygetline(fd); if (tmp == NULL) { close_source(txt); **pos_p = '\0'; return; } if (!transparent) { esc = unistr_escaped_to_utf8(tmp); myfree(tmp); tmp = esc; } line = concatstr(2, line, tmp); *pos_p = line + (*pos_p - *line_p); myfree(*line_p); *line_p = line; myfree(tmp); } static void begin_new_formatted_source(text *txt, char **line_p, char **pos_p, int *width_p, char *suffix, formatted *fmt, int transparent) { char *line = *line_p; char *pos = *pos_p; const char *str; source *src; /* Save any later lines for use after finishing the source */ while (*pos != '\0' && *pos != '\r' && *pos != '\n') pos++; if (*pos == '\r') pos++; if (*pos == '\n') pos++; if (*pos != '\0') { txt->src->upcoming = mystrdup(pos); txt->src->processedlen = 0; txt->src->processedwidth = 0; } (*fmt->rew)(fmt->state); src = mymalloc(sizeof(source)); src->prev = txt->src; src->upcoming = NULL; if (*line == '\0') { src->prefix = NULL; } else { src->prefix = mystrdup(line); } src->prefixlen = strlen(line); src->prefixwidth = *width_p; if (*suffix == '\0' || *suffix == '\r' || *suffix == '\n') { src->suffix = NULL; } else { src->suffix = mystrdup(suffix); } src->fd = -1; src->fmt = fmt; src->transparent = transparent; src->limit = -1; txt->src = src; str = (*fmt->get)(fmt->state); if (str == NULL) { close_source(txt); **line_p = '\0'; *pos_p = *line_p; *width_p = 0; return; } if (!transparent) str = unistr_escaped_to_utf8(str); line = concatstr(2, line, str); /* The suffix will be added back in get_processed_text_line() */ *pos_p = line + strlen(*line_p); myfree(*line_p); *line_p = line; } static int handle_conditional(text *txt, char **line_p, char **pos_p, int *skipwhite_p, char *token, int neg, enum conditional_target tgt, int multi, const char *listdir) { /* This function handles a conditional directive and returns a boolean * (0 or 1) representing whether it was successfully handled or not. * The conditional should already have been identified, and the type of * conditional, whether it is negative, whether multiple parameters are * acceptable, and the position of the first parameter should be passed * in. */ char *line = *line_p; char *pos; int satisfied = 0; int matches; conditional *cond; if (txt->skip == NULL) { for (;;) { pos = token; if (*pos == '\0') break; while ( (*pos >= '0' && *pos <= '9') || (*pos >= 'A' && *pos <= 'Z') || (*pos >= 'a' && *pos <= 'z') || (*pos == '_') || (*pos == '-') || (*pos == '.' && pos != token) ) { pos++; } if (*pos == ' ') { *pos = '\0'; } else { multi = 0; } if (*pos != '\0') return 1; matches = 0; if (tgt == ACTION) { if (txt->action == NULL) return 1; if (strcasecmp(token, txt->action) == 0) matches = 1; } else if (tgt == REASON) { if (txt->reason == NULL) return 1; if (strcasecmp(token, txt->reason) == 0) matches = 1; } else if (tgt == TYPE) { if (txt->type == NULL) return 1; if (strcasecmp(token, txt->type) == 0) matches = 1; } else if (tgt == CONTROL) { if (statctrl(listdir, token)) matches = 1; } if ((matches && !neg) || (!matches && neg)) { satisfied = 1; break; } if (!multi) break; *pos = ' '; token = pos + 1; } } else { /* We consider nested conditionals as successful while skipping * text so they don't register themselves as the reason for * skipping, nor trigger swallowing blank lines */ satisfied = 1; pos = token + 1; while (*pos != '\0') pos++; multi = 0; } cond = mymalloc(sizeof(conditional)); cond->satisfied = satisfied; cond->elsepart = 0; cond->outer = txt->cond; txt->cond = cond; if (!satisfied) txt->skip = cond; if (multi) { *pos = ' '; pos++; while (*pos != '\0') pos++; } pos++; if (*skipwhite_p) { while (*pos == ' ' || *pos == '\t') pos++; } line = concatstr(2, line, pos); *pos_p = line + (*pos_p - *line_p); myfree(*line_p); *line_p = line; return 0; } static int handle_directive(text *txt, char **line_p, char **pos_p, int *width_p, int *skipwhite_p, int conditionalsonly, const char *listdir) { /* This function returns 1 to swallow a preceding blank line, i.e. if * we just finished processing a failed conditional without an else * part, -1 if we did nothing due to only processing conditionals, and * 0 otherwise. */ char *line = *line_p; char *pos = *pos_p; char *token = pos + 1; char *endpos; char *filename; int limit; formatted *fmt; conditional *cond; int swallow; endpos = strchr(token, '%'); if (endpos == NULL) { if (conditionalsonly) return -1; (*pos_p)++; return 0; } *pos = '\0'; *endpos = '\0'; if(strncmp(token, "ifaction ", 9) == 0) { token += 9; if (handle_conditional(txt, line_p, pos_p, skipwhite_p, token, 0, ACTION, 1, listdir) == 0) return 0; } else if(strncmp(token, "ifreason ", 9) == 0) { token += 9; if (handle_conditional(txt, line_p, pos_p, skipwhite_p, token, 0, REASON, 1, listdir) == 0) return 0; } else if(strncmp(token, "iftype ", 7) == 0) { token += 7; if (handle_conditional(txt, line_p, pos_p, skipwhite_p, token, 0, TYPE, 1, listdir) == 0) return 0; } else if(strncmp(token, "ifcontrol ", 10) == 0) { token += 10; if (handle_conditional(txt, line_p, pos_p, skipwhite_p, token, 0, CONTROL, 1, listdir) == 0) return 0; } else if(strncmp(token, "ifnaction ", 10) == 0) { token += 10; if (handle_conditional(txt, line_p, pos_p, skipwhite_p, token, 1, ACTION, 0, listdir) == 0) return 0; } else if(strncmp(token, "ifnreason ", 10) == 0) { token += 10; if (handle_conditional(txt, line_p, pos_p, skipwhite_p, token, 1, REASON, 0, listdir) == 0) return 0; } else if(strncmp(token, "ifntype ", 8) == 0) { token += 8; if (handle_conditional(txt, line_p, pos_p, skipwhite_p, token, 1, TYPE, 0, listdir) == 0) return 0; } else if(strncmp(token, "ifncontrol ", 11) == 0) { token += 11; if (handle_conditional(txt, line_p, pos_p, skipwhite_p, token, 1, CONTROL, 1, listdir) == 0) return 0; } else if(strcmp(token, "else") == 0) { if (txt->cond != NULL) { if (txt->skip == txt->cond) txt->skip = NULL; else if (txt->skip == NULL) txt->skip = txt->cond; txt->cond->elsepart = 1; endpos++; if (*skipwhite_p) { while (*endpos == ' ' || *endpos == '\t') endpos++; } line = concatstr(2, line, endpos); *pos_p = line + (*pos_p - *line_p); myfree(*line_p); *line_p = line; return 0; } } else if(strcmp(token, "endif") == 0) { if (txt->cond != NULL) { if (txt->skip == txt->cond) txt->skip = NULL; cond = txt->cond; swallow = (!cond->satisfied && !cond->elsepart)?1:0; txt->cond = cond->outer; myfree(cond); endpos++; if (*skipwhite_p) { while (*endpos == ' ' || *endpos == '\t') endpos++; } line = concatstr(2, line, endpos); *pos_p = line + (*pos_p - *line_p); myfree(*line_p); *line_p = line; return swallow; } } if (conditionalsonly) { *pos = '%'; *endpos = '%'; return -1; } if (txt->skip != NULL) { /* We don't process anything but conditionals if we're * already skipping text in one. */ *pos = '%'; *endpos = '%'; (*pos_p)++; (*width_p)++; return 0; } *skipwhite_p = 0; if(strcmp(token, "") == 0) { line = concatstr(3, line, "%", endpos + 1); *pos_p = line + (*pos_p - *line_p) + 1; (*width_p)++; myfree(*line_p); *line_p = line; return 0; } else if(strcmp(token, "^") == 0) { if (txt->src->prefixlen != 0) { line[txt->src->prefixlen] = '\0'; line = concatstr(2, line, endpos + 1); *width_p = txt->src->prefixwidth; } else { line = mystrdup(endpos + 1); *width_p = 0; } *pos_p = line; myfree(*line_p); *line_p = line; return 0; } else if(strcmp(token, "comment") == 0 || strcmp(token, "$") == 0 ) { pos = endpos + 1; while (*pos != '\0' && *pos != '\r' && *pos != '\n') pos++; line = concatstr(2, line, pos); *pos_p = line + (*pos_p - *line_p); myfree(*line_p); *line_p = line; return 0; } else if(strncmp(token, "wrap", 4) == 0) { token += 4; limit = 0; if (*token == '\0') { limit = 76; } else if (*token == ' ') { token = numeric_token(token + 1); if (token != NULL) limit = atol(token); } if (limit != 0) { txt->wrapindent = *width_p; txt->wrapwidth = limit; line = concatstr(2, line, endpos + 1); *pos_p = line + (*pos_p - *line_p); myfree(*line_p); *line_p = line; return 0; } } else if(strcmp(token, "nowrap") == 0) { txt->wrapwidth = 0; line = concatstr(2, line, endpos + 1); *pos_p = line + (*pos_p - *line_p); myfree(*line_p); *line_p = line; return 0; } else if(strcmp(token, "ww") == 0 || strcmp(token, "wordwrap") == 0 || strcmp(token, "cw") == 0 || strcmp(token, "charwrap") == 0 || strcmp(token, "uw") == 0 || strcmp(token, "userwrap") == 0) { if (*token == 'w') txt->wrapmode = WRAP_WORD; if (*token == 'c') txt->wrapmode = WRAP_CHAR; if (*token == 'u') txt->wrapmode = WRAP_USER; line = concatstr(2, line, endpos + 1); *pos_p = line + (*pos_p - *line_p); myfree(*line_p); *line_p = line; return 0; } else if(strcmp(token, "thin") == 0) { txt->widthreckoning = WIDTH_THIN; line = concatstr(2, line, endpos + 1); *pos_p = line + (*pos_p - *line_p); myfree(*line_p); *line_p = line; return 0; } else if(strcmp(token, "wide") == 0) { txt->widthreckoning = WIDTH_WIDE; line = concatstr(2, line, endpos + 1); *pos_p = line + (*pos_p - *line_p); myfree(*line_p); *line_p = line; return 0; } else if(strncmp(token, "zero ", 5) == 0) { token += 5; if (txt->zerowidth != NULL) myfree(txt->zerowidth); txt->zerowidth = mystrdup(token); line = concatstr(2, line, endpos + 1); *pos_p = line + (*pos_p - *line_p); myfree(*line_p); *line_p = line; return 0; } else if(strncmp(token, "control ", 8) == 0) { token = filename_token(token + 8); if (token != NULL) { filename = concatstr(3, listdir, "/control/", token); begin_new_source_file(txt, line_p, pos_p, width_p, filename, 0); myfree(filename); return 0; } } else if(strncmp(token, "text ", 5) == 0) { token = filename_token(token + 5); if (token != NULL) { filename = concatstr(3, listdir, "/text/", token); begin_new_source_file(txt, line_p, pos_p, width_p, filename, 0); myfree(filename); return 0; } } else if(strncmp(token, "originalmail", 12) == 0 && txt->mailname != NULL) { token += 12; limit = 0; if (*token == '\0') { limit = -1; } else if (*token == ' ') { token = numeric_token(token + 1); if (token != NULL) limit = atol(token); } else { token = numeric_token(token); if (token != NULL) limit = atol(token); } if (limit != 0) { begin_new_source_file(txt, line_p, pos_p, width_p, txt->mailname, 1); if (limit == -1) txt->src->limit = -1; else txt->src->limit = limit - 1; return 0; } } if (token == NULL) { /* We have encountered a directive, but not been able to deal * with it, so just advance through the string. */ *pos = '%'; *endpos = '%'; (*pos_p)++; (*width_p)++; return 0; } fmt = txt->fmts; while (fmt != NULL) { if (strcmp(token, fmt->token) == 0) { begin_new_formatted_source(txt, line_p, pos_p, width_p, endpos + 1, fmt, 0); return 0; } fmt = fmt->next; } /* No recognised directive; just advance through the string. */ *pos = '%'; *endpos = '%'; (*pos_p)++; (*width_p)++; return 0; } char *get_processed_text_line(text *txt, int headers, const char *listaddr, const char *listdelim, const char *listdir) { char *line; const char *item; char *pos; char *tmp; char *prev = NULL; int len, width, i; int processedlen, processedwidth; int wrapindentlen = -1; int incision, linebreak, linebreakwidth; int directive, inhibitbreak; int peeking = 0; /* for a failed conditional without an else */ int skipwhite; /* skip whitespace after a conditional directive */ int swallow; char utf8char[5] = {0, 0, 0, 0, 0}; for (;;) { line = NULL; while (txt->src != NULL) { if (txt->src->upcoming != NULL) { if (prev != NULL) { /* If wrapping, we are going to swallow * leading whitespace anyway, which is * what the prefix will always be, so * we needn't include it, nor the * wrapindent; wrapindentlen is also * already set from the previous * iteration. */ line = txt->src->upcoming; txt->src->upcoming = NULL; break; } /* Join the prefix, wrapindent and upcoming * line. */ len = strlen(txt->src->upcoming); processedlen = txt->src->processedlen; processedwidth = txt->src->processedwidth; if (txt->src->prefixwidth != 0) { /* prefixlen may be true for an existing * prefix, not the one in txt->src, so * set it afresh. */ txt->src->prefixlen = strlen(txt->src->prefix); len += txt->src->prefixlen; processedlen += txt->src->prefixlen; processedwidth += txt->src->prefixwidth; } if (txt->wrapwidth != 0) { /* wrapindent is a width, but includes * the prefix; the excess we make up * with just spaces though, so one byte * per character. */ len += txt->wrapindent - txt->src->prefixwidth; processedlen += txt->wrapindent - txt->src->prefixwidth; processedwidth += txt->wrapindent - txt->src->prefixwidth; } line = mymalloc((len + 1) * sizeof(char)); if (txt->src->prefixwidth != 0) { strcpy(line, txt->src->prefix); pos = line + txt->src->prefixlen; } else { pos = line; } if (txt->wrapwidth != 0) { i = txt->wrapindent - txt->src->prefixwidth; for (; i > 0; i--) *pos++ = ' '; wrapindentlen = pos - line; } strcpy(pos, txt->src->upcoming); myfree(txt->src->upcoming); txt->src->upcoming = NULL; break; } if (txt->src->limit != 0) { if (txt->src->fd != -1) { tmp = mygetline(txt->src->fd); } else if (txt->src->fmt != NULL) { item = (*txt->src->fmt->get)( txt->src->fmt->state); if (item==NULL) tmp = NULL; else tmp = mystrdup(item); } else { tmp = NULL; } if (txt->src->limit > 0) txt->src->limit--; if (tmp == NULL) { txt->src->upcoming = NULL; } else if (txt->src->transparent) { txt->src->upcoming = tmp; txt->src->processedlen = 0; txt->src->processedwidth = 0; } else { txt->src->upcoming = unistr_escaped_to_utf8(tmp); txt->src->processedlen = 0; txt->src->processedwidth = 0; myfree(tmp); } } else { txt->src->upcoming = NULL; } if (txt->src->upcoming != NULL) continue; close_source(txt); } if (line == NULL) { if (peeking) return mystrdup(""); if (prev != NULL) return prev; return NULL; } if (prev != NULL) { /* Wrapping; join and start processing at the new bit, * which is always unprocessed. */ len = strlen(prev); pos = prev + len - 1; /* The width remains set from the previous iteration. */ if (txt->wrapmode == WRAP_WORD) { while (pos >= prev + wrapindentlen && (*pos == ' ' || *pos == '\t')) { pos--; len--; width--; } } pos++; *pos = '\0'; pos = line; while (*pos == ' ' || *pos == '\t') pos++; if ((*pos == '\r' || *pos == '\n' || *pos == '\0') && txt->skip == NULL) { /* Empty/white line; stop wrapping, finish the last line and save the empty/white line for later. */ txt->wrapwidth = 0; txt->src->upcoming = line; txt->src->processedlen = 0; txt->src->processedwidth = 0; line = prev; pos = line + len; skipwhite = 0; } else { if (*prev == '\0') { tmp = mystrdup(pos); } else { if (txt->wrapmode == WRAP_WORD && len > wrapindentlen) { tmp = concatstr(3, prev, " ", pos); len++; width++; } else { tmp = concatstr(2, prev, pos); } } myfree(line); line = tmp; myfree(prev); pos = line + len; skipwhite = 1; } /* We can always line-break where the input had one */ linebreak = len; linebreakwidth = width; prev = NULL; } else { /* Not wrapping; start processing where we left off; * there can't be any break opportunities in the * processed part, and if it looks like there are, they * must have been inhibited so aren't really. */ pos = line + processedlen; len = processedlen; width = processedwidth; linebreak = 0; linebreakwidth = 0; skipwhite = 0; } if (txt->skip != NULL) { incision = len; } else { incision = -1; } directive = 0; inhibitbreak = 0; while (*pos != '\0') { if (txt->wrapwidth != 0 && width >= txt->wrapwidth && !peeking && linebreak > wrapindentlen && linebreak < len) break; if ((unsigned char)*pos > 0xbf && txt->skip == NULL && txt->wrapmode == WRAP_CHAR && !inhibitbreak) { linebreak = len; linebreakwidth = width; } if (*pos == '\r') { *pos = '\0'; pos++; if (*pos == '\n') pos++; if (*pos == '\0') break; txt->src->upcoming = mystrdup(pos); txt->src->processedlen = 0; txt->src->processedwidth = 0; break; } else if (*pos == '\n') { *pos = '\0'; pos++; if (*pos == '\0') break; txt->src->upcoming = mystrdup(pos); txt->src->processedlen = 0; txt->src->processedwidth = 0; break; } else if (*pos == ' ') { if (txt->skip == NULL && txt->wrapmode != WRAP_USER && !inhibitbreak) { linebreak = len + 1; linebreakwidth = width + 1; } inhibitbreak = 0; } else if (*pos == '\t') { /* Avoid breaking due to peeking */ inhibitbreak = 0; } else if (txt->src->transparent) { /* Do nothing if the file is to be included * transparently */ if (peeking && txt->skip == NULL) break; inhibitbreak = 0; } else if (*pos == '\\' && txt->skip == NULL) { if (peeking) break; if (*(pos + 1) == '/') { linebreak = len; linebreakwidth = width; tmp = pos + 2; inhibitbreak = 0; } else if (*(pos + 1) == '=') { tmp = pos + 2; /* Ensure we don't wrap the next * character */ inhibitbreak = 1; } else { /* Includes space and backslash */ tmp = pos + 1; /* Ensure we don't wrap a space */ if (*(pos+1) == ' ') inhibitbreak = 1; else inhibitbreak = 0; } *pos = '\0'; tmp = concatstr(2, line, tmp); pos = tmp + len; myfree(line); line = tmp; skipwhite = 0; continue; } else if (*pos == '$' && txt->skip == NULL) { if (peeking) break; substitute_one(&line, &pos, &width, listaddr, listdelim, listdir, txt); if (len != pos - line) { /* Cancel any break inhibition if the * length changed (which will be * because of $$) */ inhibitbreak = 0; len = pos - line; } skipwhite = 0; /* The function sets up for the next character * to process, so continue straight away. */ continue; } else if (*pos == '%') { directive = 1; swallow = handle_directive(txt, &line, &pos, &width, &skipwhite, peeking, listdir); if (swallow == 1) peeking = 0; if (swallow == -1) break; if (txt->skip != NULL) { if (incision == -1) { /* We have to cut a bit out * later */ incision = pos - line; } } else { if (incision != -1) { /* Time to cut */ if (pos - line != incision) { line[incision] = '\0'; tmp = concatstr(2, line, pos); pos = tmp + incision; myfree(line); line = tmp; } incision = -1; } } if (len != pos - line) { /* Cancel any break inhibition if the * length changed (which will be * because of %% or %^% or an empty * list) */ inhibitbreak = 0; len = pos - line; } if (txt->wrapwidth != 0 && wrapindentlen == -1) { /* Started wrapping. */ wrapindentlen = len; } /* handle_directive() sets up for the next * character to process, so continue straight * away. */ continue; } else if (peeking && txt->skip == NULL) { break; } if (txt->skip == NULL) { len++; if ((unsigned char)*pos < 0x80) { width++; } else if ((unsigned char)*pos > 0xbf) { /* Not a UTF-8 continuation byte. */ if (txt->zerowidth != NULL) { tmp = pos; utf8char[0] = *tmp++; for (i = 1; i < 4; i++, tmp++) { if ((unsigned char)*tmp<0x80 || (unsigned char)*tmp>0xbf) break; utf8char[i] = *tmp; } utf8char[i] = '\0'; if (strstr(txt->zerowidth, utf8char) == NULL) { width++; if (txt->widthreckoning == WIDTH_WIDE) width++; } } else { width++; if (txt->widthreckoning == WIDTH_WIDE) width++; } } } pos++; skipwhite = 0; } if (incision == 0) { /* The whole line was skipped; nothing to return yet; * keep reading */ incision = -1; myfree(line); continue; } if (incision != -1) { /* Time to cut */ if (pos - line != incision) { line[incision] = '\0'; tmp = mystrdup(line); pos = tmp + incision; myfree(line); line = tmp; } incision = -1; } if (txt->wrapwidth != 0 && !peeking) { if (width < txt->wrapwidth || linebreak <= wrapindentlen || linebreak >= len) { prev = line; continue; } if (linebreak != 0) { if (txt->wrapmode == WRAP_WORD && line[linebreak-1] == ' ') line[linebreak-1] = '\0'; if (line[linebreak] == '\0') linebreak = 0; } if (linebreak != 0) { if (txt->src->upcoming == NULL) { tmp = mystrdup(line + linebreak); } else { /* If something's coming up, it's because * it was a new line. */ if (*(line + linebreak) != '\0') { tmp = concatstr(3, line + linebreak, "\n", txt->src->upcoming); myfree(txt->src->upcoming); } else { tmp = txt->src->upcoming; } } txt->src->upcoming = tmp; txt->src->processedlen = len - linebreak; txt->src->processedwidth = width - linebreakwidth; } line[linebreak] = '\0'; tmp = mystrdup(line); myfree(line); line = tmp; } else { if (directive) { pos = line; while (*pos == ' ' || *pos == '\t') pos++; if (*pos == '\0') { /* Omit whitespace-only line with * directives */ myfree(line); continue; } } if (*line == '\0' && !headers && !peeking) { /* Non-wrapped bona fide blank line that isn't * ending the headers; peek ahead to check it's * not followed by an unsatisfied conditional * without an else */ peeking = 1; myfree(line); continue; } else if (peeking) { /* We found something; return preceding blank * line */ if (txt->src->upcoming == NULL) { txt->src->upcoming = line; txt->src->processedlen = len; txt->src->processedwidth = width; } else { tmp = txt->src->upcoming; txt->src->upcoming = concatstr(3, line, "\n", txt->src->upcoming); txt->src->processedlen = len; txt->src->processedwidth = width; myfree(line); myfree(tmp); } line = mystrdup(""); } } if (txt->src->suffix != NULL) { tmp = concatstr(2, line, txt->src->suffix); myfree(line); return tmp; } else { return line; } } } void close_text(text *txt) { substitution *subst; formatted *fmt; conditional *cond; while (txt->src != NULL) { close_source(txt); } while (txt->substs != NULL) { subst = txt->substs; myfree(subst->token); myfree(subst->subst); txt->substs = txt->substs->next; myfree(subst); } if (txt->mailname != NULL) myfree(txt->mailname); while (txt->fmts != NULL) { fmt = txt->fmts; myfree(fmt->token); txt->fmts = txt->fmts->next; myfree(fmt); } while (txt->cond != NULL) { cond = txt->cond; txt->cond = txt->cond->outer; myfree(cond); } myfree(txt); } char *prepstdreply(text *txt, const char *listdir, const char *from, const char *to, const char *replyto) { size_t len, i; int outfd; char *listaddr, *listdelim, *tmp, *retstr = NULL; char *listfqdn, *line; char *str; char *headers[10] = { NULL }; /* relies on NULL to flag end */ listaddr = getlistaddr(listdir); listdelim = getlistdelim(listdir); listfqdn = genlistfqdn(listaddr); do { tmp = random_str(); if (retstr) myfree(retstr); retstr = concatstr(3, listdir, "/queue/", tmp); myfree(tmp); outfd = open(retstr, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); } while ((outfd < 0) && (errno == EEXIST)); if(outfd < 0) { log_error(LOG_ARGS, "Could not open std mail %s", retstr); myfree(listaddr); myfree(listdelim); myfree(listfqdn); myfree(retstr); myfree(txt); return NULL; } for (i=0; i<6; i++) { tmp = mystrdup("randomN"); tmp[6] = '0' + i; str = random_str(); register_unformatted(txt, tmp, str); myfree(tmp); myfree(str); } tmp = substitute(from, listaddr, listdelim, listdir, txt); headers[0] = concatstr(2, "From: ", tmp); myfree(tmp); tmp = substitute(to, listaddr, listdelim, listdir, txt); headers[1] = concatstr(2, "To: ", tmp); myfree(tmp); headers[2] = genmsgid(listfqdn); chomp(headers[2]); headers[3] = gendatestr(); chomp(headers[3]); headers[4] = mystrdup("Subject: mlmmj administrivia"); headers[5] = mystrdup("MIME-Version: 1.0"); headers[6] = mystrdup("Content-Type: text/plain; charset=utf-8"); headers[7] = mystrdup("Content-Transfer-Encoding: 8bit"); if(replyto) { tmp = substitute(replyto, listaddr, listdelim, listdir, txt); headers[8] = concatstr(2, "Reply-To: ", tmp); myfree(tmp); } for(;;) { line = get_processed_text_line(txt, 1, listaddr, listdelim, listdir); if (!line) { log_error(LOG_ARGS, "No body in listtext"); break; } if (*line == '\0') { /* end of headers */ myfree(line); line = NULL; break; } if (*line == ' ' || *line == '\t') { /* line beginning with linear whitespace is a continuation of previous header line */ len = strlen(line); line[len] = '\n'; if(writen(outfd, line, len+1) < 0) { log_error(LOG_ARGS, "Could not write std mail"); myfree(line); myfree(retstr); retstr = NULL; goto freeandreturn; } } else { tmp = line; len = 0; while (*tmp && *tmp != ':') { tmp++; len++; } if (!*tmp) { log_error(LOG_ARGS, "No headers or invalid " "header in listtext"); break; } tmp++; len++; /* remove the standard header if one matches */ for (i=0; headers[i] != NULL; i++) { if (strncasecmp(line, headers[i], len) == 0) { myfree(headers[i]); while (headers[i] != NULL) { headers[i] = headers[i+1]; i++; } break; } } if (strncasecmp(line, "Subject:", len) == 0) { tmp = unistr_utf8_to_header(tmp); myfree(line); line = concatstr(2, "Subject:", tmp); myfree(tmp); } len = strlen(line); line[len] = '\n'; if(writen(outfd, line, len+1) < 0) { log_error(LOG_ARGS, "Could not write std mail"); myfree(line); myfree(retstr); retstr = NULL; goto freeandreturn; } } myfree(line); line = NULL; } for (i=0; headers[i] != NULL; i++) { len = strlen(headers[i]); headers[i][len] = '\n'; if(writen(outfd, headers[i], len+1) < 0) { log_error(LOG_ARGS, "Could not write std mail"); if (line) myfree(line); myfree(retstr); retstr = NULL; goto freeandreturn; } } /* end the headers */ if(writen(outfd, "\n", 1) < 0) { log_error(LOG_ARGS, "Could not write std mail"); if (line) myfree(line); myfree(retstr); retstr = NULL; goto freeandreturn; } if (line == NULL) { line = get_processed_text_line(txt, 0, listaddr, listdelim, listdir); } while(line) { len = strlen(line); line[len] = '\n'; if(writen(outfd, line, len+1) < 0) { myfree(str); log_error(LOG_ARGS, "Could not write std mail"); myfree(retstr); retstr = NULL; goto freeandreturn; } myfree(line); line = get_processed_text_line(txt, 0, listaddr, listdelim, listdir); } fsync(outfd); close(outfd); freeandreturn: myfree(listaddr); myfree(listdelim); myfree(listfqdn); return retstr; } mlmmj-1.2.18.0/src/print-version.c000644 000765 000120 00000002660 11414633671 016532 0ustar00benadmin000000 000000 /* Copyright (C) 2003, 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include "mlmmj.h" void print_version(const char *prg) { char *lastslashindex = strrchr(prg, '/'); if(!lastslashindex) lastslashindex = (char *)prg; else lastslashindex++; printf("%s version "VERSION"\n", lastslashindex); } mlmmj-1.2.18.0/src/random-int.c000644 000765 000120 00000003615 11727635244 015771 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include "wrappers.h" int random_int() { static int init = 0; unsigned int seed; int devrandom; unsigned char ch; if (init) return rand(); seed = (unsigned int)time(NULL); devrandom = open("/dev/urandom", O_RDONLY); if(devrandom < 0) devrandom = open("/dev/random", O_RDONLY); if (devrandom >= 0) { readn(devrandom, &ch, 1); seed ^= ch; readn(devrandom, &ch, 1); seed ^= ch << 8; readn(devrandom, &ch, 1); seed ^= ch << 16; readn(devrandom, &ch, 1); seed ^= ch << 24; close(devrandom); } srand(seed); init = 1; return rand(); } #if 0 int main(int argc, char **argv) { int i; for(i = 0; i < 25; i++) printf("%i\n", random_int()); return 0; } #endif mlmmj-1.2.18.0/src/readn.c000644 000765 000120 00000003247 11414633671 015006 0ustar00benadmin000000 000000 /* Copyright (C) 2005 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include "wrappers.h" /* classic read wrapper from Stevens */ ssize_t readn(int fd, void *vptr, size_t n) { size_t nleft; ssize_t nread; char *ptr; ptr = vptr; nleft = n; while(nleft > 0) { if((nread = read(fd, ptr, nleft)) < 0) { if(errno == EINTR) nread = 0; /* and call read() again */ else return -1; /* Caller can check errno */ } else if (nread == 0) break; /* EOF */ nleft -= nread; ptr += nread; } return n - nleft; /* return >= 0 */ } mlmmj-1.2.18.0/src/send_digest.c000644 000765 000120 00000031017 11734220454 016175 0ustar00benadmin000000 000000 /* Copyright (C) 2004, 2005 Morten K. Poulsen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "send_digest.h" #include "log_error.h" #include "strgen.h" #include "memory.h" #include "getlistaddr.h" #include "getlistdelim.h" #include "wrappers.h" #include "prepstdreply.h" #include "mygetline.h" #include "gethdrline.h" #include "statctrl.h" #include "unistr.h" #include "chomp.h" struct mail { int idx; char *from; }; struct thread { char *subject; int num_mails; struct mail *mails; }; struct thread_list_state; typedef struct thread_list_state thread_list_state; struct thread_list_state { const char *listdir; int firstindex; int lastindex; int num_threads; struct thread *threads; int cur_thread; int cur_mail; }; static thread_list_state *init_thread_list( const char *listdir, int firstindex, int lastindex) { /* We use a static variable rather than dynamic allocation as * there will never be two lists in use simultaneously */ static thread_list_state s; s.listdir = listdir; s.firstindex = firstindex; s.lastindex = lastindex; s.num_threads = 0; s.threads = NULL; s.cur_thread = -1; return &s; } static void rewind_thread_list(void * state) { thread_list_state *s = (thread_list_state *)state; int i, j, archivefd, thread_idx; char *line, *tmp, *subj, *from; char *archivename; int num_threads = 0; struct thread *threads = NULL; char buf[45]; if (s->cur_thread != -1) { /* We have gathered the data already; just rewind */ s->cur_thread = 0; s->cur_mail = -1; return; } for (i=s->firstindex; i<=s->lastindex; i++) { snprintf(buf, sizeof(buf), "%d", i); archivename = concatstr(3, s->listdir, "/archive/", buf); archivefd = open(archivename, O_RDONLY); myfree(archivename); if (archivefd < 0) continue; subj = NULL; from = NULL; while ((line = gethdrline(archivefd))) { if (strcmp(line, "\n") == 0) { myfree(line); break; } if (strncasecmp(line, "Subject: ", 9) == 0) { myfree(subj); subj = unistr_header_to_utf8(line + 9); } if (strncasecmp(line, "From: ", 6) == 0) { myfree(from); from = unistr_header_to_utf8(line + 6); } myfree(line); } if (!subj) { subj = mystrdup("no subject"); } if (!from) { from = mystrdup("anonymous"); } tmp = subj; for (;;) { if (isspace(*tmp)) { tmp++; continue; } if (strncasecmp(tmp, "Re:", 3) == 0) { tmp += 3; continue; } break; } /* tmp is now the clean subject */ thread_idx = -1; for (j=0; jnum_threads = num_threads; s->threads = threads; s->cur_thread = 0; s->cur_mail = -1; } static const char *get_thread_list_line(void * state) { thread_list_state *s = (thread_list_state *)state; if (s->cur_thread >= s->num_threads) return NULL; if (s->cur_mail == -1) { s->cur_mail = 0; return s->threads[s->cur_thread].subject; } if (s->cur_mail >= s->threads[s->cur_thread].num_mails) { s->cur_thread++; s->cur_mail = -1; return "\n"; } return s->threads[s->cur_thread].mails[s->cur_mail++].from; } static void finish_thread_list(thread_list_state * s) { int i, j; if (s->threads == NULL) return; for (i=0; inum_threads; i++) { myfree(s->threads[i].subject); for (j=0; jthreads[i].num_mails; j++) { myfree(s->threads[i].mails[j].from); } myfree(s->threads[i].mails); } myfree(s->threads); s->threads = NULL; } int send_digest(const char *listdir, int firstindex, int lastindex, int issue, const char *addr, const char *mlmmjsend) { int i, fd, archivefd, status, hdrfd; size_t len; text * txt; char buf[100]; char *tmp, *queuename = NULL, *archivename, *subject = NULL, *line = NULL; char *boundary, *listaddr, *listdelim, *listname, *listfqdn; pid_t childpid, pid; thread_list_state * tls; if (addr) { errno = 0; log_error(LOG_ARGS, "send_digest() does not support sending " "digest mails to only one recipient yet"); return -1; } if (firstindex > lastindex) return -1; do { tmp = random_str(); myfree(queuename); queuename = concatstr(3, listdir, "/queue/", tmp); myfree(tmp); fd = open(queuename, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); } while ((fd < 0) && (errno == EEXIST)); if (fd < 0) { log_error(LOG_ARGS, "Could not open digest queue file '%s'", queuename); myfree(queuename); return -1; } tmp = concatstr(2, listdir, "/control/customheaders"); hdrfd = open(tmp, O_RDONLY); myfree(tmp); boundary = random_str(); listaddr = getlistaddr(listdir); listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); listdelim = getlistdelim(listdir); txt = open_text_file(listdir, "digest"); if (txt == NULL) { log_error(LOG_ARGS, "Could not open listtext 'digest'"); goto fallback_subject; } snprintf(buf, sizeof(buf), "%d", firstindex); register_unformatted(txt, "digestfirst", buf); snprintf(buf, sizeof(buf), "%d", lastindex); register_unformatted(txt, "digestlast", buf); if (lastindex == firstindex) { snprintf(buf, sizeof(buf), "%d", firstindex); } else { snprintf(buf, sizeof(buf), "%d-%d", firstindex, lastindex); } register_unformatted(txt, "digestinterval", buf); snprintf(buf, sizeof(buf), "%d", issue); register_unformatted(txt, "digestissue", buf); register_unformatted(txt, "digestthreads", "%digestthreads%"); /* DEPRECATED */ tls = init_thread_list(listdir, firstindex, lastindex); register_formatted(txt, "digestthreads", rewind_thread_list, get_thread_list_line, tls); line = get_processed_text_line(txt, 1, listaddr, listdelim, listdir); if (line == NULL) { log_error(LOG_ARGS, "No content in digest listtext"); goto fallback_subject; } tmp = line; len = 0; while (*tmp && *tmp != ':') { tmp++; len++; } if (!*tmp) { log_error(LOG_ARGS, "No subject or invalid " "subject in digest listtext"); goto fallback_subject; } tmp++; len++; if (strncasecmp(line, "Subject:", len) == 0) { tmp = unistr_utf8_to_header(tmp); subject = concatstr(2, "Subject:", tmp); myfree(tmp); myfree(line); /* Skip the empty line after the subject */ line = get_processed_text_line(txt, 1, listaddr, listdelim, listdir); if (line == NULL || *line != '\0') { log_error(LOG_ARGS, "Too many headers " "in digest listtext"); goto fallback_subject; } if (line != NULL) myfree(line); line = NULL; } else { log_error(LOG_ARGS, "No subject or invalid " "subject in digest listtext"); goto fallback_subject; } fallback_subject: if (subject == NULL) { if (lastindex == firstindex) { snprintf(buf, sizeof(buf), "%d", firstindex); } else { snprintf(buf, sizeof(buf), "%d-%d", firstindex, lastindex); } tmp = mystrdup(buf); snprintf(buf, sizeof(buf), "Digest of %s issue %d (%s)", listaddr, issue, tmp); subject = unistr_utf8_to_header(buf); myfree(tmp); } tmp = concatstr(10, "From: ", listname, listdelim, "help@", listfqdn, "\nMIME-Version: 1.0" "\nContent-Type: multipart/" DIGESTMIMETYPE "; " "boundary=", boundary, "\nSubject: ", subject, "\n"); myfree(listfqdn); myfree(subject); if (writen(fd, tmp, strlen(tmp)) < 0) { myfree(tmp); goto errdighdrs; } myfree(tmp); if(hdrfd >= 0 && dumpfd2fd(hdrfd, fd) < 0) { goto errdighdrs; } close(hdrfd); hdrfd = -1; if (writen(fd, "\n", 1) < 0) { errdighdrs: log_error(LOG_ARGS, "Could not write digest headers to '%s'", queuename); close(fd); unlink(queuename); myfree(boundary); myfree(queuename); myfree(listaddr); myfree(listname); myfree(listdelim); if (txt != NULL) { close_text(txt); myfree(line); } if (hdrfd > 0) { close(hdrfd); } return -1; } if ((txt != NULL) && !statctrl(listdir, "nodigesttext")) { tmp = concatstr(3, "\n--", boundary, "\nContent-Type: text/plain; charset=UTF-8" "\nContent-Transfer-Encoding: 8bit" "\n\n"); if (writen(fd, tmp, strlen(tmp)) == -1) { log_error(LOG_ARGS, "Could not write digest text/plain" " part headers to '%s'", queuename); close(fd); unlink(queuename); myfree(boundary); myfree(tmp); myfree(queuename); myfree(listaddr); myfree(listname); myfree(listdelim); if (txt != NULL) { close_text(txt); myfree(line); } return -1; } myfree(tmp); for (;;) { line = get_processed_text_line(txt, 0, listaddr, listdelim, listdir); if (line == NULL) break; len = strlen(line); line[len] = '\n'; if(writen(fd, line, len+1) < 0) { myfree(line); log_error(LOG_ARGS, "Could not write" " std mail"); break; } myfree(line); } finish_thread_list(tls); close_text(txt); } else if (txt != NULL) { finish_thread_list(tls); close_text(txt); } if (line != NULL) myfree(line); myfree(listaddr); myfree(listdelim); for (i=firstindex; i<=lastindex; i++) { snprintf(buf, sizeof(buf), "%d", i); archivename = concatstr(3, listdir, "/archive/", buf); archivefd = open(archivename, O_RDONLY); myfree(archivename); if (archivefd < 0) continue; tmp = concatstr(7, "\n--", boundary, "\nContent-Type: message/rfc822" "\nContent-Disposition: inline; filename=\"", listname, "_", buf, ".eml\"" "\n\n"); if (writen(fd, tmp, strlen(tmp)) == -1) { log_error(LOG_ARGS, "Could not write digest part " "headers for archive index %d to " "'%s'", i, queuename); close(fd); close(archivefd); unlink(queuename); myfree(boundary); myfree(tmp); myfree(queuename); myfree(listname); return -1; } myfree(tmp); if (dumpfd2fd(archivefd, fd) < 0) { log_error(LOG_ARGS, "Could not write digest part %d " "to '%s'", i, queuename); close(fd); close(archivefd); unlink(queuename); myfree(boundary); myfree(queuename); myfree(listname); return -1; } close(archivefd); } tmp = concatstr(3, "\n--", boundary, "--\n"); if (writen(fd, tmp, strlen(tmp)) == -1) { log_error(LOG_ARGS, "Could not write digest end to '%s'", queuename); close(fd); unlink(queuename); myfree(boundary); myfree(queuename); myfree(listname); return -1; } close(fd); myfree(boundary); myfree(listname); myfree(tmp); childpid = fork(); if(childpid < 0) { log_error(LOG_ARGS, "Could not fork"); myfree(queuename); return -1; } if(childpid > 0) { do /* Parent waits for the child */ pid = waitpid(childpid, &status, 0); while(pid == -1 && errno == EINTR); } else { execlp(mlmmjsend, mlmmjsend, "-l", "7", "-L", listdir, "-m", queuename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); /* It is OK to exit, as this is a child */ } myfree(queuename); return 0; } mlmmj-1.2.18.0/src/send_help.c000644 000765 000120 00000004344 11734220454 015651 0ustar00benadmin000000 000000 /* Copyright (C) 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include "mlmmj.h" #include "send_help.h" #include "strgen.h" #include "find_email_adr.h" #include "getlistaddr.h" #include "getlistdelim.h" #include "log_error.h" #include "chomp.h" #include "wrappers.h" #include "mygetline.h" #include "prepstdreply.h" #include "memory.h" void send_help(const char *listdir, const char *queuefilename, const char *emailaddr, const char *mlmmjsend) { char *listaddr, *listdelim, *listname, *listfqdn; char *fromaddr; listaddr = getlistaddr(listdir); listdelim = getlistdelim(listdir); listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn); myfree(listname); myfree(listdelim); myfree(listfqdn); myfree(listaddr); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", emailaddr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } mlmmj-1.2.18.0/src/send_list.c000644 000765 000120 00000013533 11734220454 015674 0ustar00benadmin000000 000000 /* Copyright (C) 2005 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "send_list.h" #include "strgen.h" #include "getlistaddr.h" #include "getlistdelim.h" #include "log_error.h" #include "chomp.h" #include "wrappers.h" #include "mygetline.h" #include "prepstdreply.h" #include "memory.h" struct subs_list_state; typedef struct subs_list_state subs_list_state; struct subs_list_state { char *dirname; DIR *dirp; int fd; char *line; int used; }; static subs_list_state *init_subs_list(const char *dirname) { /* We use a static variable rather than dynamic allocation as * there will never be two lists in use simultaneously */ static subs_list_state s; s.dirname = mystrdup(dirname); s.dirp = NULL; s.fd = -1; s.used = 0; return &s; } static void rewind_subs_list(void *state) { subs_list_state *s = (subs_list_state *)state; if (s == NULL) return; if (s->dirp != NULL) closedir(s->dirp); s->dirp = opendir(s->dirname); if(s->dirp == NULL) { log_error(LOG_ARGS, "Could not opendir(%s);\n", s->dirname); } s->used = 1; } static const char *get_sub(void *state) { subs_list_state *s = (subs_list_state *)state; char *filename; struct dirent *dp; if (s == NULL) return NULL; if (s->dirp == NULL) return NULL; if (s->line != NULL) { myfree(s->line); s->line = NULL; } for (;;) { if (s->fd == -1) { dp = readdir(s->dirp); if (dp == NULL) { closedir(s->dirp); s->dirp = NULL; return NULL; } if ((strcmp(dp->d_name, "..") == 0) || (strcmp(dp->d_name, ".") == 0)) continue; filename = concatstr(2, s->dirname, dp->d_name); s->fd = open(filename, O_RDONLY); if(s->fd < 0) { log_error(LOG_ARGS, "Could not open %s for reading", filename); myfree(filename); continue; } myfree(filename); } s->line = mygetline(s->fd); if (s->line == NULL) { close(s->fd); s->fd = -1; continue; } chomp(s->line); return s->line; } } static void finish_subs_list(subs_list_state *s) { if (s == NULL) return; if (s->line != NULL) myfree(s->line); if (s->fd != -1) close(s->fd); if (s->dirp != NULL) closedir(s->dirp); myfree(s->dirname); } static void print_subs(int fd, subs_list_state *s) { const char *sub; rewind_subs_list(s); while ((sub = get_sub(s)) != NULL) { if (writen(fd, sub, strlen(sub)) < 0) { log_error(LOG_ARGS, "error writing subs list"); } writen(fd, "\n", 1); } } void send_list(const char *listdir, const char *emailaddr, const char *mlmmjsend) { text *txt; subs_list_state *subsls, *digestsls, *nomailsls; char *queuefilename, *listaddr, *listdelim, *listname, *listfqdn; char *fromaddr, *subdir, *nomaildir, *digestdir; int fd; listaddr = getlistaddr(listdir); listdelim = getlistdelim(listdir); listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn); myfree(listdelim); subdir = concatstr(2, listdir, "/subscribers.d/"); digestdir = concatstr(2, listdir, "/digesters.d/"); nomaildir = concatstr(2, listdir, "/nomailsubs.d/"); subsls = init_subs_list(subdir); digestsls = init_subs_list(digestdir); nomailsls = init_subs_list(nomaildir); myfree(subdir); myfree(digestdir); myfree(nomaildir); txt = open_text(listdir, "list", NULL, NULL, subtype_strs[SUB_ALL], "listsubs"); MY_ASSERT(txt); register_formatted(txt, "subs", rewind_subs_list, get_sub, subsls); register_formatted(txt, "digestsubs", rewind_subs_list, get_sub, digestsls); register_formatted(txt, "nomailsubs", rewind_subs_list, get_sub, nomailsls); queuefilename = prepstdreply(txt, listdir, "$listowner$", emailaddr, NULL); MY_ASSERT(queuefilename); close_text(txt); /* DEPRECATED */ /* Add lists manually if they weren't encountered in the list text */ if (!subsls->used && !digestsls->used && !nomailsls->used) { fd = open(queuefilename, O_WRONLY); if(fd < 0) { log_error(LOG_ARGS, "Could not open sub list mail"); exit(EXIT_FAILURE); } if(lseek(fd, 0, SEEK_END) < 0) { log_error(LOG_ARGS, "Could not seek to end of file"); exit(EXIT_FAILURE); } print_subs(fd, subsls); writen(fd, "\n-- \n", 5); print_subs(fd, nomailsls); writen(fd, "\n-- \n", 5); print_subs(fd, digestsls); writen(fd, "\n-- \nend of output\n", 19); close(fd); } finish_subs_list(subsls); finish_subs_list(digestsls); finish_subs_list(nomailsls); myfree(listaddr); myfree(listname); myfree(listfqdn); execlp(mlmmjsend, mlmmjsend, "-l", "1", "-L", listdir, "-T", emailaddr, "-F", fromaddr, "-m", queuefilename, (char *)NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend); exit(EXIT_FAILURE); } mlmmj-1.2.18.0/src/statctrl.c000644 000765 000120 00000003324 11414633671 015551 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include "strgen.h" #include "statctrl.h" #include "memory.h" #include "log_error.h" int statctrl(const char *listdir, const char *ctrlstr) { char *filename = concatstr(3, listdir, "/control/", ctrlstr); struct stat st; int res; res = stat(filename, &st); myfree(filename); if(res < 0) { if(errno == ENOENT) { return 0; } else { log_error(LOG_ARGS, "Could not stat %s/control/%s. " "Bailing out.", listdir, ctrlstr); exit(EXIT_FAILURE); } } return 1; } mlmmj-1.2.18.0/src/strgen.c000644 000765 000120 00000016402 11727635244 015221 0ustar00benadmin000000 000000 /* Copyright (C) 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "strgen.h" #include "wrappers.h" #include "memory.h" #include "log_error.h" char *random_str() { size_t len = 17; char *dest = mymalloc(len); snprintf(dest, len, "%08x%08x", random_int(), random_int()); return dest; } char *random_plus_addr(const char *addr) { size_t len = strlen(addr) + 128; char *dest = mymalloc(len); char *atsign; char *tmpstr; tmpstr = mymalloc(len); snprintf(tmpstr, len, "%s", addr); atsign = strchr(tmpstr, '@'); MY_ASSERT(atsign); *atsign = '='; snprintf(dest, len, "%08x%08x-%s", random_int(), random_int(), tmpstr); myfree(tmpstr); return dest; } char *headerstr(const char *headertoken, const char *str) { size_t len = strlen(headertoken) + strlen(str) + 2; char *dest = mymalloc(len); snprintf(dest, len, "%s%s\n", headertoken, str); return dest; } char *genlistname(const char *listaddr) { size_t len; char *dest, *atsign; atsign = strchr(listaddr, '@'); MY_ASSERT(atsign); len = atsign - listaddr + 1; dest = mymalloc(len); snprintf(dest, len, "%s", listaddr); return dest; } char *genlistfqdn(const char *listaddr) { size_t len; char *dest, *atsign; atsign = strchr(listaddr, '@'); MY_ASSERT(atsign); len = strlen(listaddr) - (atsign - listaddr); dest = mymalloc(len); snprintf(dest, len, "%s", atsign + 1); return dest; } char *concatstr(int count, ...) { va_list arg; const char *str; int i; size_t len = 0; char *retstr; va_start(arg, count); for(i = 0; i < count; i++) { str = va_arg(arg, const char *); if(str) len += strlen(str); } retstr = mymalloc(len + 1); retstr[0] = retstr[len] = 0; va_start(arg, count); for(i = 0; i < count; i++) { str = va_arg(arg, const char *); if(str) strcat(retstr, str); } va_end(arg); return retstr; } char *hostnamestr() { struct hostent *hostlookup; char *hostname = NULL; size_t len = 512; for (;;) { len *= 2; myfree(hostname); hostname = mymalloc(len); hostname[len-1] = '\0'; /* gethostname() is allowed to: * a) return -1 and undefined in hostname * b) return 0 and an unterminated string in hostname * c) return 0 and a NUL-terminated string in hostname * * We keep expanding the buffer until the hostname is * NUL-terminated (and pray that it is not truncated) * or an error occurs. */ if (gethostname(hostname, len - 1)) { if (errno == ENAMETOOLONG) { continue; } myfree(hostname); return mystrdup("localhost"); } if (hostname[len-1] == '\0') { break; } } if (strchr(hostname, '.')) { /* hostname is FQDN */ return hostname; } if ((hostlookup = gethostbyname(hostname))) { myfree(hostname); return mystrdup(hostlookup->h_name); } return hostname; } char *mydirname(const char *path) { char *mypath, *dname, *ret; mypath = mystrdup(path); dname = dirname(mypath); ret = mystrdup(dname); /* We don't free mypath until we have strdup()'ed dname, because * dirname() returns a pointer into mypath -- mortenp 20040527 */ myfree(mypath); return ret; } char *mybasename(const char *path) { char *mypath, *bname, *ret; mypath = mystrdup(path); bname = basename(mypath); ret = mystrdup(bname); /* We don't free mypath until we have strdup()'ed bname, because * basename() returns a pointer into mypath -- mortenp 20040527 */ myfree(mypath); return ret; } char *cleanquotedp(const char *qpstr) { char *retstr; char qc[3]; const char *c = qpstr; long qcval; int i = 0; size_t len; /* XXX: We only use this function for checking whether the subject * prefix is only present, so the recoding is neither guaranteed * complete nor correct */ len = strlen(qpstr); retstr = mymalloc(len + 1); retstr[len] = '\0'; qc[2] = '\0'; while(c < qpstr+len) { switch(*c) { case '=': c++; if (!isxdigit(*c)) break; qc[0] = *(c++); if (!isxdigit(*c)) break; qc[1] = *(c++); qcval = strtol(qc, NULL, 16); if(qcval) retstr[i++] = (char)qcval; break; case '_': retstr[i++] = ' '; c++; break; default: retstr[i++] = *(c++); break; } } retstr[i] = '\0'; return retstr; } char *genmsgid(const char *fqdn) { char buf[256]; snprintf(buf, sizeof(buf), "Message-ID: <%ld-%d-mlmmj-%08x@%s>\n", (long int)time(NULL), (int)getpid(), random_int(), fqdn); return mystrdup(buf); } char *gendatestr() { time_t t; struct tm gmttm, lttm; int dayyear; char *timestr; const char *weekday = NULL, *month = NULL; /* 6 + 26 + ' ' + timezone which is 5 + '\n\0' == 40 */ timestr = (char *)mymalloc(40); t = time(NULL); localtime_r(&t, <tm); gmtime_r(&t, &gmttm); t = (((lttm.tm_hour - gmttm.tm_hour) * 60) + (lttm.tm_min - gmttm.tm_min)) * 60; dayyear = lttm.tm_yday - gmttm.tm_yday; if(dayyear) { if (dayyear == -1 || dayyear > 1) t -= 24 * 60 * 60; else t += 24 * 60 * 60; } switch(lttm.tm_wday) { case 0: weekday = "Sun"; break; case 1: weekday = "Mon"; break; case 2: weekday = "Tue"; break; case 3: weekday = "Wed"; break; case 4: weekday = "Thu"; break; case 5: weekday = "Fri"; break; case 6: weekday = "Sat"; break; default: break; } switch(lttm.tm_mon) { case 0: month = "Jan"; break; case 1: month = "Feb"; break; case 2: month = "Mar"; break; case 3: month = "Apr"; break; case 4: month = "May"; break; case 5: month = "Jun"; break; case 6: month = "Jul"; break; case 7: month = "Aug"; break; case 8: month = "Sep"; break; case 9: month = "Oct"; break; case 10: month = "Nov"; break; case 11: month = "Dec"; break; default: break; } snprintf(timestr, 40, "Date: %s, %02d %s %04d %02d:%02d:%02d %+05d\n", weekday, lttm.tm_mday, month, lttm.tm_year + 1900, lttm.tm_hour, lttm.tm_min, lttm.tm_sec, ((int)t)/36); return timestr; } mlmmj-1.2.18.0/src/subscriberfuncs.c000644 000765 000120 00000010433 11734220454 017106 0ustar00benadmin000000 000000 /* Copyright (C) 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "subscriberfuncs.h" #include "mygetline.h" #include "log_error.h" #include "wrappers.h" #include "strgen.h" #include "memory.h" char *subtype_strs[] = { "normal", "digest", "nomail", "file", "all", "both", "none" }; char * subreason_strs[] = { "request", "confirm", "permit", "admin", "bouncing", "switch" }; off_t find_subscriber(int fd, const char *address) { char *start, *cur, *next; struct stat st; size_t len; if(fstat(fd, &st) < 0) { log_error(LOG_ARGS, "Could not stat fd"); return (off_t)-1; } /* No need to check in 0-size file */ if(st.st_size == 0) return (off_t)-1; if(!S_ISREG(st.st_mode)) { log_error(LOG_ARGS, "Non regular file in subscribers.d/"); return (off_t)-1; } if((start = mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) { log_error(LOG_ARGS, "Could not mmap fd"); return (off_t)-1; } for(next = cur = start; next < start + st.st_size; next++) { if(*next == '\n') { len = next - cur; if((strlen(address) == len) && (strncasecmp(address, cur, len) == 0)) { munmap(start, st.st_size); return (off_t)(cur - start); } cur = next + 1; } } if(next > cur) { len = next - cur; if((strlen(address) == len) && (strncasecmp(address, cur, len) == 0)) { munmap(start, st.st_size); return (off_t)(cur - start); } } munmap(start, st.st_size); return (off_t)-1; } int is_subbed_in(const char *subddirname, const char *address) { int retval = 0, subread; char *subreadname; off_t suboff; DIR *subddir; struct dirent *dp; if((subddir = opendir(subddirname)) == NULL) { log_error(LOG_ARGS, "Could not opendir(%s)", subddirname); exit(EXIT_FAILURE); } while((dp = readdir(subddir)) != NULL) { if(!strcmp(dp->d_name, ".")) continue; if(!strcmp(dp->d_name, "..")) continue; subreadname = concatstr(2, subddirname, dp->d_name); subread = open(subreadname, O_RDONLY); if(subread < 0) { log_error(LOG_ARGS, "Could not open %s", subreadname); myfree(subreadname); continue; } suboff = find_subscriber(subread, address); close(subread); myfree(subreadname); if(suboff == -1) { continue; } else { retval = 1; break; } } closedir(subddir); return retval; } enum subtype is_subbed(const char *listdir, const char *address, int both) { int retval; char *subddirname; enum subtype typesub = SUB_NONE; subddirname = concatstr(2, listdir, "/subscribers.d/"); retval = is_subbed_in(subddirname, address); myfree(subddirname); if (retval) { if (!both) return SUB_NORMAL; typesub = SUB_NORMAL; } subddirname = concatstr(2, listdir, "/digesters.d/"); retval = is_subbed_in(subddirname, address); myfree(subddirname); if (retval) { if (typesub == SUB_NORMAL) return SUB_BOTH; return SUB_DIGEST; } subddirname = concatstr(2, listdir, "/nomailsubs.d/"); retval = is_subbed_in(subddirname, address); myfree(subddirname); if (retval) return SUB_NOMAIL; return SUB_NONE; } mlmmj-1.2.18.0/src/unistr.c000644 000765 000120 00000031776 11734220454 015245 0ustar00benadmin000000 000000 /* Copyright (C) 2005 Morten K. Poulsen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "unistr.h" #include "log_error.h" #include "memory.h" unistr *unistr_new(void) { unistr *ret; ret = mymalloc(sizeof(unistr)); ret->len = 0; ret->alloc_len = 64; ret->chars = mymalloc(ret->alloc_len * sizeof(unistr_char)); return ret; } void unistr_free(unistr *str) { if (!str) return; myfree(str->chars); myfree(str); } int unistr_cmp(const unistr *str1, const unistr *str2) { unsigned int i; for (i=0; ilen; i++) { if (str1->chars[i] < str2->chars[i]) { return -1; } else if (str1->chars[i] > str2->chars[i]) { return 1; } } if (str2->len > str1->len) { return 1; } return 0; } unistr *unistr_dup(const unistr *str) { unistr *ret; unsigned int i; ret = unistr_new(); for (i=0; ilen; i++) { unistr_append_char(ret, str->chars[i]); } return ret; } void unistr_append_char(unistr *str, unistr_char uc) { if (str->len >= str->alloc_len) { str->alloc_len *= 2; str->chars = myrealloc(str->chars, str->alloc_len * sizeof(unistr_char)); } str->chars[str->len++] = uc; } void unistr_append_usascii(unistr *str, const char *binary, size_t bin_len) { unsigned int i; for (i=0; i 0x7F) { unistr_append_char(str, '?'); } else { unistr_append_char(str, (unsigned char)binary[i]); } } } void unistr_append_utf8(unistr *str, const char *binary, size_t bin_len) { unsigned int i, j; unistr_char ch; unsigned char *bin = (unsigned char *)binary; for (i=0; i0; j--) { i++; ch <<= 6; if ((bin[i] & 192) != 128) { /* invalid byte sequence */ ch = '?'; break; } ch |= bin[i] & 63; } unistr_append_char(str, ch); } } } void unistr_append_iso88591(unistr *str, const char *binary, size_t bin_len) { unsigned int i; for (i=0; ilen = %lu\n", (unsigned long)str->len); printf(" ->alloc_len = %lu\n", (unsigned long)str->alloc_len); printf(" ->chars [ "); for (i=0; ilen; i++) { if ((str->chars[i] <= 0x7F) && (str->chars[i] != '\n')) { printf("'%c' ", str->chars[i]); } else { printf("0x%02X ", str->chars[i]); } } printf("]\n"); } char *unistr_to_utf8(const unistr *str) { unsigned int i; size_t len = 0; char *ret; char *p; for (i=0; ilen; i++) { if (str->chars[i] <= 0x7F) { len++; } else if (str->chars[i] <= 0x7FF) { len += 2; } else if (str->chars[i] <= 0xFFFF) { len += 3; } else if (str->chars[i] <= 0x1FFFFF) { len += 4; } else if (str->chars[i] <= 0x3FFFFFF) { len += 5; } else if (str->chars[i] <= 0x7FFFFFFF) { len += 6; } else { errno = 0; log_error(LOG_ARGS, "unistr_to_utf8(): can not utf-8 encode" "U+%04X", str->chars[i]); return mystrdup(""); } } len++; /* NUL */ ret = mymalloc(len); p = ret; for (i=0; ilen; i++) { if (str->chars[i] <= 0x7F) { /* 1 */ *(p++) = str->chars[i]; } else if (str->chars[i] <= 0x7FF) { /* 2 */ *(p++) = 192 + ((str->chars[i] & 1984) >> 6); *(p++) = 128 + (str->chars[i] & 63); } else if (str->chars[i] <= 0xFFFF) { /* 3 */ *(p++) = 224 + ((str->chars[i] & 61440) >> 12); *(p++) = 128 + ((str->chars[i] & 4032) >> 6); *(p++) = 128 + (str->chars[i] & 63); } else if (str->chars[i] <= 0x1FFFFF) { /* 4 */ *(p++) = 240 + ((str->chars[i] & 1835008) >> 18); *(p++) = 128 + ((str->chars[i] & 258048) >> 12); *(p++) = 128 + ((str->chars[i] & 4032) >> 6); *(p++) = 128 + (str->chars[i] & 63); } else if (str->chars[i] <= 0x3FFFFFF) { /* 5 */ *(p++) = 248 + ((str->chars[i] & 50331648) >> 24); *(p++) = 128 + ((str->chars[i] & 16515072) >> 18); *(p++) = 128 + ((str->chars[i] & 258048) >> 12); *(p++) = 128 + ((str->chars[i] & 4032) >> 6); *(p++) = 128 + (str->chars[i] & 63); } else if (str->chars[i] <= 0x7FFFFFFF) { /* 6 */ *(p++) = 252 + ((str->chars[i] & 1073741824) >> 30); *(p++) = 128 + ((str->chars[i] & 1056964608) >> 24); *(p++) = 128 + ((str->chars[i] & 16515072) >> 18); *(p++) = 128 + ((str->chars[i] & 258048) >> 12); *(p++) = 128 + ((str->chars[i] & 4032) >> 6); *(p++) = 128 + (str->chars[i] & 63); } else { errno = 0; log_error(LOG_ARGS, "unistr_to_utf8(): can not utf-8 encode" "U+%04X", str->chars[i]); } } *(p++) = '\0'; return ret; } static int hexval(char ch) { ch = tolower(ch); if ((ch >= 'a') && (ch <= 'f')) { return 10 + ch - 'a'; } if ((ch >= '0') && (ch <= '9')) { return ch - '0'; } return 0; } static void decode_qp(char *str, char **binary, size_t *bin_len) { int i; /* decoded string will never be longer, and we don't include a NUL */ *binary = mymalloc(strlen(str)); *bin_len = 0; for (i=0; str[i]; i++) { if ((str[i] == '=') && isxdigit(str[i+1]) && isxdigit(str[i+2])) { (*binary)[(*bin_len)++] = (hexval(str[i+1]) << 4) + hexval(str[i+2]); i += 2; } else if (str[i] == '_') { (*binary)[(*bin_len)++] = 0x20; } else { (*binary)[(*bin_len)++] = str[i]; } } } static void decode_base64(char *str, char **binary, size_t *bin_len) { int tab[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; size_t len; unsigned int i; unsigned int out; int out_numbits; int val; /* decoded string will never be longer, and we don't include a NUL */ len = strlen(str); *binary = mymalloc(len); *bin_len = 0; out = 0; out_numbits = 0; for (i=0; i= 8) { (*binary)[(*bin_len)++] = (out >> (out_numbits - 8)) & 255; out_numbits -= 8; } } } static void header_decode_word(char *word, unistr *ret) { char *my_word; char *charset, *encoding, *string, *end; char *binary; size_t bin_len; if ((word[0] != '=') || (word[1] != '?')) { unistr_append_usascii(ret, word, strlen(word)); return; } my_word = mystrdup(word); charset = my_word + 2; if ((encoding = strchr(charset, '?')) == NULL) { /* missing encoding */ unistr_append_usascii(ret, "???", 3); myfree(my_word); return; } *(encoding++) = '\0'; if ((string = strchr(encoding, '?')) == NULL) { /* missing string */ unistr_append_usascii(ret, "???", 3); myfree(my_word); return; } *(string++) = '\0'; if ((end = strchr(string, '?')) == NULL) { /* missing end */ unistr_append_usascii(ret, "???", 3); myfree(my_word); return; } *(end++) = '\0'; if ((end[0] != '=') || (end[1] != '\0')) { /* broken end */ unistr_append_usascii(ret, "???", 3); myfree(my_word); return; } if (tolower(encoding[0]) == 'q') { decode_qp(string, &binary, &bin_len); } else if (tolower(encoding[0]) == 'b') { decode_base64(string, &binary, &bin_len); } else { /* unknown encoding */ unistr_append_usascii(ret, "???", 3); myfree(my_word); return; } if (strcasecmp(charset, "us-ascii") == 0) { unistr_append_usascii(ret, binary, bin_len); } else if (strcasecmp(charset, "utf-8") == 0) { unistr_append_utf8(ret, binary, bin_len); } else if (strcasecmp(charset, "iso-8859-1") == 0) { unistr_append_iso88591(ret, binary, bin_len); } else { /* unknown charset */ unistr_append_usascii(ret, "???", 3); } myfree(my_word); myfree(binary); } /* IN: "=?iso-8859-1?Q?hyggem=F8de?= torsdag" * OUT: "hyggem\xC3\xB8de torsdag" */ char *unistr_header_to_utf8(const char *str) { char *my_str; char *word; char *p; unistr *us; char *ret; my_str = mystrdup(str); us = unistr_new(); word = strtok_r(my_str, " \t\n", &p); while (word) { header_decode_word(word, us); word = strtok_r(NULL, " \t\n", &p); if (word) unistr_append_char(us, ' '); } myfree(my_str); ret = unistr_to_utf8(us); unistr_free(us); return ret; } static int is_ok_in_header(char ch) { if ((ch >= 'a') && (ch <= 'z')) return 1; if ((ch >= 'A') && (ch <= 'Z')) return 1; if ((ch >= '0') && (ch <= '9')) return 1; if (ch == '.') return 1; if (ch == ',') return 1; if (ch == ':') return 1; if (ch == ';') return 1; if (ch == '-') return 1; if (ch == ' ') return 1; return 0; } /* IN: "hyggem\xC3\xB8de torsdag" * OUT: "=?utf-8?Q?hyggem=C3=B8de_torsdag?=" */ char *unistr_utf8_to_header(const char *str) { unistr *us; char *ret; const char *p; int clean; char buf[4]; /* clean header? */ clean = 1; for (p=str; *p; p++) { if (!is_ok_in_header(*p)) { clean = 0; break; } } if (clean) { return mystrdup(str); } us = unistr_new(); unistr_append_usascii(us, "=?utf-8?q?", 10); for (p=str; *p; p++) { if (*p == 0x20) { unistr_append_char(us, '_'); } else if (is_ok_in_header(*p)) { unistr_append_char(us, *p); } else { snprintf(buf, sizeof(buf), "=%02X", (unsigned char)*p); unistr_append_usascii(us, buf, 3); } } unistr_append_usascii(us, "?=", 2); ret = unistr_to_utf8(us); unistr_free(us); return ret; } /* IN: "hyggem\\u00F8de torsdag" * OUT: "hyggem\xC3\xB8de torsdag" */ char *unistr_escaped_to_utf8(const char *str) { unistr_char ch; unistr *us; char *ret; char u[5]; int len; int skip = 0; us = unistr_new(); while (*str) { if (*str == '\\') { str++; if (*str == 'u' && !skip) { str++; if (!isxdigit(str[0]) || !isxdigit(str[1]) || !isxdigit(str[2]) || !isxdigit(str[3])) { unistr_append_char(us, '?'); continue; } u[0] = *str++; u[1] = *str++; u[2] = *str++; u[3] = *str++; u[4] = '\0'; ch = strtol(u, NULL, 16); unistr_append_char(us, ch); continue; } else { unistr_append_char(us, '\\'); /* Avoid processing the second backslash of a * double-backslash; but if this was a such a * one, go back to normal */ skip = !skip; continue; } } else { u[0] = *str; len = 1; str++; while (*str && (unsigned char)u[0] > 0x7F) { u[0] = *str; len++; str++; } unistr_append_utf8(us, str - len, len); } } ret = unistr_to_utf8(us); unistr_free(us); return ret; } mlmmj-1.2.18.0/src/writen.c000644 000765 000120 00000003212 11414633671 015215 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #include #include #include /** * write n bytes to a descriptor */ ssize_t writen(int fd, const void *vptr, size_t n) { size_t nleft; ssize_t nwritten; const char *ptr; ptr = (const char*)vptr; nleft = n; while(nleft > 0) { if((nwritten = write(fd, ptr, nleft)) < 0) { if(errno == EINTR) { nwritten = 0; /* and call write() again */ } else { return -1; /* error, caller can check errno */ } } nleft -= nwritten; ptr += nwritten; } return n; } mlmmj-1.2.18.0/man/mlmmj-bounce.1000644 000765 000120 00000002741 11734220454 016176 0ustar00benadmin000000 000000 .TH mlmmj-bounce "1" "September 2004" mlmmj-bounce .SH NAME mlmmj-bounce \- bounce handling utility for mlmmj .SH SYNOPSIS .B mlmmj-bounce \fI\-L /path/to/list \fR[\fI\-a john=doe.org | \-d\fR]\fI \fR[\fI\-n num | \-p\fR] .HP \fB\-a\fR: Address string that bounces .HP \fB\-d\fR: Parse the mail to extract the address via the DSN (RFC1891) .HP \fB\-h\fR: This help .HP \fB\-L\fR: Full path to list directory .HP \fB\-n\fR: Message number in the archive that bounced .HP \fB\-p\fR: Send out a probe .HP \fB\-V\fR: Print version .SH DESCRIPTION mlmmj-bounce is used to handle mails that are bouncing. When a mail arrives to the system, mlmmj-bounce will register in /bounce/ info about which number that bounced at what time. An example of such a line could be: .LP 109:1094409801 # Sun Sep 5 20:43:21 2004 The above shows that message number 109 bounced 1094409801 seconds after epoch which is in human date stamps is Sunday September 5th 20:43:21 2004. The last bounce mail received to the address is saved in /bounce/.lastmsg. When the \fB\-p\fR option is used it sends out a probe email including info that it's a bounce probe and a list of the bounced message numbers. The existance of a /bounce/.probe file indicates that a probe have been sent out. .SH AUTHORS This manual page was written by the following persons: .HP S\[/o]ren Boll Overgaard (based on html2man output) .HP Mads Martin J\[/o]rgensen mlmmj-1.2.18.0/man/mlmmj-list.1000644 000765 000120 00000001333 11734220454 015672 0ustar00benadmin000000 000000 .TH mlmmj-list "1" "November 2004" mlmmj-receive .SH NAME mlmmj-list \- list people / subscribers associated with a list .SH SYNOPSIS .B mlmmj-list \fI\-L /path/to/listdir \fR[\fI\-c\fR] \fR[\fI\-d\fR] \fR[\fI\-h\fR] [\fI\-m\fR] [\fI\-n\fR] [\fI\-o\fR] \fR[\fI\-s\fR] \fR[\fI\-V\fR] .HP \fB\-c\fR: Count the emailaddresses .HP \fB\-d\fR: Print for digesters list .HP \fB\-L\fR: Full path to list directory .HP \fB\-m\fR: Print moderators for list .HP \fB\-n\fR: Print for nomail version of list .HP \fB\-o\fR: Print the owner(s) of the list .HP \fB\-s\fR: Print normail subscribers (default) .HP \fB\-V\fR: Print version .SH AUTHORS This manual page was written by the following person: .HP Mads Martin J\[/o]rgensen mlmmj-1.2.18.0/man/mlmmj-maintd.1000644 000765 000120 00000002732 11734220454 016177 0ustar00benadmin000000 000000 .TH mlmmj-maintd "1" "September 2004" mlmmj-maintd .SH NAME mlmmj-maintd \- maintenance for mlmmj maintained lists .SH SYNOPSIS .B mlmmj-maintd [\fI\-F\fR] \fI[\-d\fR | \fI\-L\fR] /path/to/dir .HP \fB\-d\fR: Full path to directory with lists .HP \fB\-L\fR: Full path to list directory .HP \fB\-F\fR: Don't fork, performing one maintenance run only. .SH DESCRIPTION This is the program doing the maintenance for an mlmmj based mailing list. It will unsubscribe people who have bounced for long enough, send out bounce probes, resend mails that couldn't be delivered to relayhost, clean out stale requests for e.g. subscription, resend list mails and clean up leftover files etc. If a directory containing several lists exists, the \fB\-d\fR can be used to specify this, making mlmmj-maintd perform a maintenance run in every listdir below the specified one. Only either \fB\-d\fR or \fB\-L\fR can be specified at the same time. It will run as a daemon, unless the \fB\-F\fR switch is specified, in which case it just runs once. The \fB\-F\fR option should be used when one wants to avoid running another daemon, and use e.g. cron to control it instead. In case cron is used, mlmmj-maintd should be run every 2 hours or so. An example crontab entry: .LP 0 */2 * * * /usr/bin/mlmmj-maintd \-F \-L /path/to/list .SH AUTHORS This manual page was written by the following persons: .HP S\[/o]ren Boll Overgaard (based on html2man output) .HP Mads Martin J\[/o]rgensen mlmmj-1.2.18.0/man/mlmmj-make-ml.1000644 000765 000120 00000001664 11734220454 016251 0ustar00benadmin000000 000000 .TH mlmmj-make-ml "1" "September 2004" mlmmj-make-ml .SH NAME mlmmj-make-ml \- create a mailing list for mlmmj .SH SYNOPSIS .B mlmmj-make-ml [\fI\-h\fR] [\fI\-L listname\fR] [\fI\-s spooldir\fR] [\fI\-a\fR] [\fI\-c user\fR] [\fI\-z\fR] .HP \fB\-h\fR: Display help .HP \fB\-L\fR: The name of the mailing list .HP \fB\-s\fR: Your spool directory (default /var/spool/mlmmj) .HP \fB\-a\fR: Create the needed entries in your /etc/aliases file .HP \fB\-c\fR: User to chown the spool directory to (default not to chown at all) .HP \fB\-z\fR: Do nothing for now .SH DESCRIPTION This is an interactive script which creates the mailing list directory and thus the list itself for being run by mlmmj. .SH BUGS It's not possible to create a list entirely on the command line. .SH AUTHORS This manual page was written by the following persons: .HP S\[/o]ren Boll Overgaard (based on html2man output) .HP Mads Martin J\[/o]rgensen mlmmj-1.2.18.0/man/mlmmj-process.1000644 000765 000120 00000003720 11734220454 016377 0ustar00benadmin000000 000000 .TH mlmmj-process "1" "September 2004" mlmmj-process .SH NAME mlmmj-process \- process mail for an mlmmj managed mailinglist .SH SYNOPSIS .B mlmmj-process \fI\-L /path/to/list \-m /path/to/mail \fR[\fI\-h\fR] [\fI\-P\fR] [\fI\-V\fR] .HP \fB\-h\fR: This help .HP \fB\-L\fR: Full path to list directory .HP \fB\-m\fR: Full path to mail file .HP \fB\-P\fR: Don't execute mlmmj-send (debugging only) .HP \fB\-V\fR: Print version .SH DESCRIPTION This is the binary which processes a mail. Examples of what such processing is: .RS 0 .IP \(bu 4 .B Access control Using the access rules specified in /control/access to perform access control to the list. This is done before headers are stripped, so one can create allow rules based on headers that are later stripped. .IP \(bu 4 .B Header stripping Headers specified in /control/delheaders are deleted from the mail. .IP \(bu 4 .B Header addition Headers specified in /control/customheaders are added to the mail. This could be headers like List-ID: or Reply-To: .IP \(bu 4 .B List control In case there's a mail with a recipient delimiter it's not a regular list mail. Processing of these happens in mlmmj-receive as well. Examples of such are subscription requests, mails to owner etc. It will base it's recipient delimiter detection on the Delivered-To: header if present. If not, the To: header is used. .IP \(bu 4 .B Moderation If the list is moderated, it will happen in mlmmj-process. .RE When processing is done, it will invoke the needed binary according to whatever mail it is. If it's a subscription request it will invoke mlmmj-sub, if it's a regular list mail it will invoke mlmmj-send. .SH "SEE ALSO" The file TUNABLES from the mlmmj source distribution or in the documentation directory of the operating system distribution. .SH AUTHORS This manual page was written by the following persons: .HP S\[/o]ren Boll Overgaard (based on html2man output) .HP Mads Martin J\[/o]rgensen mlmmj-1.2.18.0/man/mlmmj-receive.1000644 000765 000120 00000002656 11734220454 016352 0ustar00benadmin000000 000000 .TH mlmmj-receive "1" "September 2004" mlmmj-receive .SH NAME mlmmj-receive \- receive mails for an mlmmj managed mailinglist .SH SYNOPSIS .B mlmmj-receive \fI\-L /path/to/listdir \fR[\fI\-h\fR] [\fI\-V\fR] [\fI\-P\fR] [\fI\-F\fR] .HP \fB\-h\fR: This help .HP \fB\-F\fR: Don't fork in the background (debugging only) .HP \fB\-L\fR: Full path to list directory .HP \fB\-P\fR: Don't execute mlmmj-process (debugging only) .HP \fB\-V\fR: Print version .SH DESCRIPTION The mlmmj-receive binary is the one specified in the mailserver configuration file (aliases file), which writes the mail to the /incoming directory and invokes mlmmj-process unless the \fB\-P\fR option is specified. On systems using mailservers supporting the \fB/etc/aliases\fR file, a line to activate an mlmmj managed mailinglist would look like this: .LP list: "|/usr/bin/mlmmj-receive \-L /var/spool/mlmmj/list/" It's very important to specify the full path to the binary, or the mailinglist will not function. When the \fB\-F\fR option is used, it will not fork in the background. The reason it forks is that if delivery of a mail takes longer time than the mail server will allow a command to be idle before presumed dead, the mail server would kill it. .SH "SEE ALSO" mlmmj-process(1) .SH AUTHORS This manual page was written by the following persons: .HP S\[/o]ren Boll Overgaard (based on html2man output) .HP Mads Martin J\[/o]rgensen mlmmj-1.2.18.0/man/mlmmj-send.1000644 000765 000120 00000003643 11734220454 015656 0ustar00benadmin000000 000000 .TH mlmmj-send "1" "January 2010" mlmmj-send .SH NAME mlmmj-send \- send mail to a mailinglist or similar .SH SYNOPSIS .B mlmmj-send [\fI\-L\fR /path/to/list | \fI\-l\fR listctrl] \fI\-m\fR /path/to/mail [\fI\-a\fR] [\fI\-D\fR] [\fI\-F\fR] [\fI\-h\fR] [\fI\-o\fR] [\fI\-r\fR] [\fI\-R\fR] [\fI\-s\fR] [\fI\-T\fR] [\fI\-V\fR] .HP \fB\-a\fR: Don't archive the mail .HP \fB\-D\fR: Don't delete the mail after it's sent .HP \fB\-F\fR: What to use as MAIL FROM: .HP \fB\-h\fR: This help .HP \fB\-l\fR: List control variable. .HP \fB\-L\fR: Full path to list directory .HP \fB\-m\fR: Full path to mail file .HP \fB\-o\fR: Address to omit from distribution (normal mail only) .HP \fB\-r\fR: Relayhost IP address (defaults to 127.0.0.1) .HP \fB\-R\fR: What to use as Reply-To: header .HP \fB\-s\fR: Subscribers file name .HP \fB\-T\fR: What to use as RCPT TO: .HP \fB\-V\fR: Print version .SH DESCRIPTION This binary is used to send all kinds of mail to mlmmj managed mailinglists, but can potentially be used standalone for sending mails. The only option that is not self explanatory is the \fB\-l\fR list control option: .IP \&'1' means 'send a single mail' This is used together with \fB\-F\fR and \fB\-T\fR to send one mail to one recipient. \&'2' means 'mail to moderators' Used for sending mails to the moderators of a list. \&'3' means 'resend failed list mail' \&'4' means 'send to file with recipients' \&'5' means 'bounceprobe' \&'6' means 'single listmail to single recipient' .SH BUGS This manual page is very scarce documentation of the mlmmj-send binary. The reason for this is that it's really not supposed to be used by any human, but only supposed to be invoked from other mlmmj binaries. So in case more documentation is needed, please read the source. .SH AUTHORS This manual page was written by the following persons: .HP S\[/o]ren Boll Overgaard (based on html2man output) .HP Mads Martin J\[/o]rgensen mlmmj-1.2.18.0/man/mlmmj-sub.1000644 000765 000120 00000006225 11734220454 015515 0ustar00benadmin000000 000000 .TH mlmmj-sub "1" "January 2010" mlmmj-sub .SH NAME mlmmj-sub \- subscribe address to a mailinglist run by mlmmj .SH SYNOPSIS .B mlmmj-sub \fI\-L /path/to/list\fR [\fI\-a john@doe.org\fR | \fI\-m str\fR] [\fI\-c\fR] [\fI\-C\fR] [\fI\-d\fR | \fI\-n\fR] [\fI\-f\fR] [\fI\-h\fR] [\fI\-q\fR] \fR[\fI\-r\fR | \fI\-R\fR] [\fI\-s\fR] [\fI\-U\fR] [\fI\-V\fR] .HP \fB\-a\fR: Email address to subscribe .HP \fB\-c\fR: Send welcome mail (unless requesting confirmation) .HP \fB\-C\fR: Request mail confirmation (unless switching versions) .HP \fB\-d\fR: Subscribe to digest version of the list .HP \fB\-f\fR: Force subscription (do not moderate) .HP \fB\-h\fR: This help .HP \fB\-L\fR: Full path to list directory .HP \fB\-m\fR: Moderation string .HP \fB\-n\fR: Subscribe to nomail version of the list .HP \fB\-q\fR: Be quiet (don't notify owner about the subscription) .HP \fB\-r\fR: Behave as if request arrived via email (internal use) .HP \fB\-R\fR: Behave as if confirmation arrived via email (internal use) .HP \fB\-s\fR: Don't send a mail to the subscriber if already subscribed .HP \fB\-U\fR: Don't switch to the user id of the listdir owner .HP \fB\-V\fR: Print version .SH DESCRIPTION This utility is used to subscribe people to the specified mailinglist. It will write the email address in a file with the name of the beginning letter of the email address getting subscribed in the /subscribers.d/ directory. The digest version of the list is a list version where people receive postings to the list periodically (e.g. once a day) or when a large number of posts have accumulated. Digest subscribers are in the /digesters.d/ directory. The nomail version of the list is a list version where people are subscribed like usual, but they won't receive any postings to the list. This is useful for people who read the mailinglist through a news gateway, but want to be able to post to the list. Nomail subscribers are in the /nomailsubs.d/ directory. Unless the \fB\-U\fR switch is used it will switch its user id to the user id owning the list directory. This is done to make sure that new files created are having correct permissions. If the given address is already subscribed to the list, but to a different version, the subscription is switched to that version, and confirmation and moderation are bypassed. If the address is already subscribed to the version requested, a mail is sent to the subscriber, unless the \fB\-s\fR switch is used. Subscription may be moderated (if /control/submod exists) unless the \fB\-f\fR switch is given. When a subscription is permitted by a gatekeeper, welcome messages are sent to the subscriber as usual, regardless of options given now. To ensure subscription is silent from the point of view of the subscriber, use \fB\-f\fR, but neither \fB\-c\fR nor \fB\-C\fR. To inhibit notification of the owner, use \fB\-q\fR. Use of \fB\-s\fR is recommended to ensure you don't spam already-subscribed addresses by accident. .SH "SEE ALSO" mlmmj-unsub(1), setuid(2) .SH AUTHORS This manual page was written by the following persons: .HP S\[/o]ren Boll Overgaard (based on html2man output) .HP Mads Martin J\[/o]rgensen mlmmj-1.2.18.0/man/mlmmj-unsub.1000644 000765 000120 00000004516 11734220454 016061 0ustar00benadmin000000 000000 .TH mlmmj-unsub "1" "September 2004" mlmmj-unsub .SH NAME mlmmj-unsub \- unsubscribe address from a mailinglist run by mlmmj .SH SYNOPSIS .B mlmmj-unsub \fI\-L /path/to/list \-a john@doe.org\fR [\fI\-b\fR] [\fI\-c\fR | \fI\-C\fR] [\fI\-d\fR | \fI\-n\fR | \fI\-N\fR] [\fI\-h\fR] [\fI\-q\fR] [\fI\-r\fR | \fI\-R\fR] [\fI\-s\fR] [\fI\-U\fR] [\fI\-V\fR] .HP \fB\-a\fR: Email address to unsubscribe .HP \fB\-b\fR: Behave as if unsubscription is due to bouncing (internal use) .HP \fB\-c\fR: Send goodbye mail .HP \fB\-C\fR: Request mail confirmation .HP \fB\-d\fR: Unsubscribe from the digest version of the list .HP \fB\-h\fR: This help .HP \fB\-L\fR: Full path to list directory .HP \fB\-n\fR: Unsubscribe from the nomail version of the list .HP \fB\-N\fR: Unsubscribe from the normal version of the list .HP \fB\-q\fR: Be quiet (don't notify owner about the unsubscribe) .HP \fB\-r\fR: Behave as if request arrived via email (internal use) .HP \fB\-R\fR: Behave as if confirmation arrived via email (internal use) .HP \fB\-s\fR: Don't send a mail to the address if not subscribed .HP \fB\-U\fR: Don't switch to the user id of the listdir owner .HP \fB\-V\fR: Print version .SH DESCRIPTION This utility is used to unsubscribe people from the specified mailinglist. It will remove the specified email address from every file in the /subscribers.d/, /digesters.d/ and /nomailsubs.d/ directories (or if the \-d, \-n or \-N switch is given, only the one relevant directory). Unless the \fB\-U\fR switch is used it will switch its user id to the user id owning the list directory. This is done to make sure that new files created are having correct permissions. Normally a mail is sent to the person being unsubscribed if the address is not subscribed to the list. If the \fB\-s\fR switch is used such a mail will not be sent. When neither \fB\-c\fR nor \fB\-C\fR is specified, unsubscription happens silently from the point of view of the subscriber. When \fB\-q\fR is specified, unsubscription happens silently from the point of view of the list owner. Use of \fB\-s\fR is recommended to ensure you don't spam unsubscribed addresses by accident. .SH "SEE ALSO" mlmmj-sub(1) .SH AUTHORS This manual page was written by the following persons: .HP S\[/o]ren Boll Overgaard (based on html2man output) .HP Mads Martin J\[/o]rgensen mlmmj-1.2.18.0/listtexts/ast/000755 000765 000120 00000000000 11761151615 015604 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/listtexts/de/000755 000765 000120 00000000000 11761151615 015405 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/listtexts/en/000755 000765 000120 00000000000 11761151615 015417 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/listtexts/fi/000755 000765 000120 00000000000 11761151616 015414 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/listtexts/fr/000755 000765 000120 00000000000 11761151616 015425 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/listtexts/gr/000755 000765 000120 00000000000 11761151616 015426 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/listtexts/it/000755 000765 000120 00000000000 11761151616 015432 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/listtexts/Makefile.am000644 000765 000120 00000000144 11734220454 017046 0ustar00benadmin000000 000000 ## Process this file with automake to produce Makefile.in nobase_dist_textlib_DATA = $(srcdir)/*/* mlmmj-1.2.18.0/listtexts/Makefile.in000644 000765 000120 00000027503 11761151557 017076 0ustar00benadmin000000 000000 # Makefile.in generated by automake 1.12 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } 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 = : subdir = listtexts DIST_COMMON = $(nobase_dist_textlib_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(textlibdir)" DATA = $(nobase_dist_textlib_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ 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@ 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_CC = @ac_ct_CC@ 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_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ textlibdir = @textlibdir@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ nobase_dist_textlib_DATA = $(srcdir)/*/* 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) --gnu listtexts/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu listtexts/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-nobase_dist_textlibDATA: $(nobase_dist_textlib_DATA) @$(NORMAL_INSTALL) @list='$(nobase_dist_textlib_DATA)'; test -n "$(textlibdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(textlibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(textlibdir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(textlibdir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(textlibdir)/$$dir"; }; \ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(textlibdir)/$$dir'"; \ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(textlibdir)/$$dir" || exit $$?; }; \ done uninstall-nobase_dist_textlibDATA: @$(NORMAL_UNINSTALL) @list='$(nobase_dist_textlib_DATA)'; test -n "$(textlibdir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(textlibdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: cscope cscopelist: 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 $(DATA) installdirs: for dir in "$(DESTDIR)$(textlibdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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 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-nobase_dist_textlibDATA 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 pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nobase_dist_textlibDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic 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-nobase_dist_textlibDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-nobase_dist_textlibDATA # 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: mlmmj-1.2.18.0/listtexts/pt/000755 000765 000120 00000000000 11761151616 015441 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/listtexts/sk/000755 000765 000120 00000000000 11761151616 015433 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/listtexts/zh-cn/000755 000765 000120 00000000000 11761151616 016035 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/listtexts/zh-cn/confirm000644 000765 000120 00000002723 11734220454 017416 0ustar00benadmin000000 000000 %ifaction sub%Subject: 确认订阅 $list$@$domain$%endif% %ifaction unsub%Subject: ç¡®è®¤å–æ¶ˆè®¢é˜… $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap% %ifreason admin% 一ä½ç®¡ç†å‘˜ %endif% %ifreason request% 有人(\=但愿是您\=) %endif% 请求将您的电å­é‚®ç®±åœ°å€ <$subaddr$> 添加到 %iftype normal% 此列表\=。这æ„å‘³ç€æ¯å½“有人å‘该列表å‘邮件\=,您都会收到邮件的副本\=。 %endif% %iftype digest% 此列表\=,收å–讨论汇总\=。这æ„å‘³ç€æ‚¨å°†åœ¨å•å°é‚®ä»¶ä¸­æ”¶åˆ°å¤šæ¡æ¶ˆæ¯\=,间隔 一定时间\=ï¼Œæˆ–è¾¾åˆ°ä¸€å®šæ•°é‡æ—¶å‘é€\=。 %endif% %iftype nomail% 此列表\=ï¼Œä½†ä¸æ”¶å–邮件\=。这æ„å‘³ç€æ‚¨å°†ä¸ä¼šæŽ¥æ”¶åˆ°ä»»ä½•å‘往列表的邮件\=, 但ä»ä¿æŒæˆå‘˜èº«ä»½\=。也就是说\=,例如\=,您å¯ä»¥åœ¨åªæœ‰è®¢é˜…者能å‘逿¶ˆæ¯çš„ 列表中å‘言\=,但通过网页存档或其他电邮跟踪进展\=。 %endif% %endif% %ifaction unsub% %^%%wrap% %ifreason admin% 一ä½ç®¡ç†å‘˜ %endif% %ifreason request% 有人(\=但愿是您\=) %endif% 请求将您的电å­é‚®ç®±åœ°å€ <$subaddr$> 从列表移除\=。 %endif% %wrap%è¦ç¡®è®¤æ˜¯æ‚¨çš„请求\=,请å‘邮件到 <$confaddr$> (\=通常å¯ç›´æŽ¥å›žå¤æœ¬é‚® ä»¶\=)\=。邮件主题与正文任æ„\=。 完æˆåŽ\=,您应该会收到确认æ“作æˆåŠŸçš„å›žå¤\=。 å¦‚æžœæ‚¨ä¸æ‰“ç®—å–æ¶ˆè®¢é˜…\=,å¯ç›´æŽ¥å¿½ç•¥æœ¬é‚®ä»¶\=。 mlmmj-1.2.18.0/listtexts/zh-cn/deny000644 000765 000120 00000004006 11734220454 016714 0ustar00benadmin000000 000000 %ifaction sub%Subject: 无法订阅 $list$@$domain$%endif% %ifaction unsub%Subject: 无法退订 $list$@$domain$%endif% %ifaction release reject%Subject: æ— æ³•ç®¡ç† $list$@$domain$%endif% %ifaction permit obstruct%Subject: 无法看管 $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap% %ifreason disabled% 由于本列表的 %iftype normal%常规%endif% %iftype digest%汇总%endif% %iftype nomail%无邮件%endif% 版本已ç»å…³é—­\=, %endif% %ifreason closed% 由于本列表ä¸å…许通过邮件订阅\=, %endif% %ifreason subbed% 由于您已ç»è®¢é˜…\=, %endif% %ifreason expired% 由于掌门人过久没有通过您的加入请求\=, %endif% %ifreason obstruct% 由于掌门人å¦å†³äº†æ‚¨çš„加入请求\=, %endif% 您无法订阅本列表\=。 %endif% %ifaction unsub% %^%%wrap% 您无法从本列表退订\=, %ifreason unsubbed% 因为您尚未订阅本列表\=。 %^%%wrap%如果您ä»ç„¶æ”¶åˆ°é‚®ä»¶\=,å¯èƒ½é€šè¿‡å…¶ä»–邮箱地å€è®¢é˜…了\=ã€‚è¦æŸ¥æ˜Žæ‚¨è®¢ 阅的地å€\=,请å‚考欢迎您加入列表的邮件\=,或查看您收到的列表邮件的 "Return-Path“\/头\=。 %endif% %endif% %ifaction release reject% %^%%wrap% %ifaction release% 您无法将指定帖å­é€šè¿‡åˆ°åˆ—表 %endif% %ifaction reject% 您无法å¦å†³æŒ‡å®šå¸–å­ %endif% %ifreason notfound% 因为找ä¸åˆ°è¯¥å¸–å­\=。å¯èƒ½å…¶ä»–版主已ç»é€šè¿‡æˆ–å¦å†³\=,也å¯èƒ½å·²ç»è¿‡æœŸ\=。 %endif% %ifreason moderators% å› ä¸ºæ‚¨ä¸æ˜¯æœ¬åˆ—表的版主\=。 %endif% %endif% %ifaction permit obstruct% %^%%wrap% %ifaction permit% 您无法批准指定的订阅请求 %endif% %ifaction obstruct% 您无法å¦å†³æŒ‡å®šçš„订阅请求 %endif% %ifreason notfound% 因为找ä¸åˆ°è¯¥è¯·æ±‚\=。å¯èƒ½å…¶ä»–æŽŒé—¨äººå·²ç»æ‰¹å‡†æˆ–å¦å†³\=,或者该请求已ç»è¿‡ 期\=。 %endif% %ifreason gatekeepers% å› ä¸ºæ‚¨ä¸æ˜¯æœ¬åˆ—表的掌门人\=。 %endif% %endif% mlmmj-1.2.18.0/listtexts/zh-cn/deny-post000644 000765 000120 00000003226 11734220454 017702 0ustar00benadmin000000 000000 Subject: å‘å¾€ $list$@$domain$ 的邮件被拒ç»ï¼š$subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%æ¥è‡ª <$posteraddr$> 题为《\=$subject$\=》的邮件无法投递到列表\=, %ifreason maxmailsize% 因为超出了所å…许的最大邮件尺寸 $maxmailsize$ 字节\=。 %endif% %ifreason tocc% å› ä¸ºåˆ—è¡¨åœ°å€æœªå‡ºçŽ°åœ¨ To: 或 CC: 头部字段\=。 %endif% %ifreason access% 因为管ç†å‘˜è®¾ç½®äº†æƒé™è§„则\=。 %endif% %ifreason expired% 因为过久没有版主通过\=。 %endif% %ifreason reject% 因为有版主å¦å†³äº†è¯¥é‚®ä»¶\=。 %endif% %ifreason subonlypost% å› ä¸ºæ‚¨ä¸æ˜¯åˆ—表订户\=。 %ifcontrol closedlist closedlistsub% %^%%wrap%如果您打算æˆä¸ºè®¢æˆ·\=,需è¦è”系列表管ç†å‘˜\=。您å¯ä»¥å‘é€é‚®ä»¶ 到 <$list+$owner@$domain$> è”系列表所有者\=。 %endif% %^%%wrap%如果您确信自己是订户\=,å¯èƒ½é€šè¿‡ä¸åŒçš„电å­é‚®ç®±åœ°å€è®¢é˜…了\=ã€‚è¦æŸ¥ 明您订阅的地å€\=,请å‚考欢迎您加入列表的邮件\=,或查阅您所收到的列表邮件 çš„\/“Return-Pathâ€\/头\=。 %endif% %ifreason maxmailsize% %^%(\=被回ç»çš„邮件开头如下\=。\=) %else% %^%(\=被回ç»çš„邮件如下\=。\=) %endif% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %ifreason maxmailsize% %^%%originalmail 300% %else% %^%%originalmail% %endif% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/zh-cn/digest000644 000765 000120 00000000277 11734220454 017242 0ustar00benadmin000000 000000 Subject: $list$@$domain$ 讨论汇总 第 $digestissue$ 期 (\=$digestinterval$\=) %charwrap%%wide% è¯é¢˜ (\=第 $digestfirst$ 至 $digestlast$ å°é‚®ä»¶\=)\=: - %digestthreads% mlmmj-1.2.18.0/listtexts/zh-cn/faq000644 000765 000120 00000000142 11734220454 016521 0ustar00benadmin000000 000000 Subject: $list$@$domain$ 的常è§é—®é¢˜ %charwrap%%wide% 抱歉\=,尚无常è§é—®é¢˜\=。 mlmmj-1.2.18.0/listtexts/zh-cn/finish000644 000765 000120 00000002401 11734220454 017232 0ustar00benadmin000000 000000 %ifaction unsub%Subject: $list$@$domain$ çš„é“别%endif% %ifaction release reject%Subject: 已通过 $list$@$domain$:$subject$%endif% %ifaction permit obstruct%Subject: å·²å¤„ç† $list$@$domain$:$subaddr$%endif% %ifaction post%Subject: å·²å‘布到 $list$@$domain$:$subject$%endif% %text prologue% %ifaction unsub% %^%%wrap% %ifreason request% %endif% %ifreason confirm% 感谢确认您的退订\=。 %endif% %ifreason admin% 一ä½ç‰ˆä¸»å·²å°†æ‚¨ç§»å‡ºæœ¬åˆ—表\=。 %else% 您已ç»é€€å‡ºæœ¬åˆ—表\=。 %endif% %endif% %ifaction release% %^%%wrap%您已æˆåŠŸé€šè¿‡ <$posteraddr$> å‘布到本列表的题为《\=$subject$\=》 的邮件\=。 %endif% %ifaction reject% %^%%wrap%您已æˆåŠŸå¦å†³ <$posteraddr$> å‘é€çš„题为《\=$subject$\=》的邮 ä»¶\=。 %endif% %ifaction permit% %^%%wrap%您已æˆåŠŸæ‰¹å‡† <$subaddr$> 加入本列表\=。 %endif% %ifaction obstruct% %^%%wrap%您已æˆåŠŸé˜»æ­¢ <$subaddr$> 加入本列表\=。 %endif% %ifaction post% %^%%wrap% %ifreason confirm% 感谢您确认 %endif% %ifreason release% 一ä½ç‰ˆä¸»å·²ç»é€šè¿‡æ‚¨ %endif% %ifreason request% 感谢您å‘布 %endif% 题为《\=$subject$\=》的邮件\=。该邮件已分å‘到本列表\=。 %endif% mlmmj-1.2.18.0/listtexts/zh-cn/finish-sub000644 000765 000120 00000002114 11734220454 020022 0ustar00benadmin000000 000000 Subject: 欢迎加入 $list$@$domain$ %text prologue% %wrap% %ifreason request% 感谢您申请加入我们\=。 %endif% %ifreason confirm% 感谢您确认订阅\=。 %endif% %ifreason permit% ä¸€ä½æŽŒé—¨äººå·²æ‰¹å‡†æ‚¨çš„åŠ å…¥\=。 %endif% %ifreason switch% 您的订阅已切æ¢ä¸º %else% %ifreason admin% 一ä½ç®¡ç†å‘˜å·²å°†æ‚¨åŠ å…¥æœ¬åˆ—è¡¨çš„ %else% 您已被加入本列表的 %endif% %endif% %iftype normal%常规%endif% %iftype digest%汇总%endif% %iftype nomail%无邮件%endif% 版本\=。 %wrap%您订阅所用的电å­é‚®ç®±åœ°å€ä¸º <$subaddr$>\=。 %ifcontrol closedlist% %^%%wrap%å¦‚æžœæ‚¨æ‰“ç®—å–æ¶ˆè®¢é˜…\=,需è¦è”系一ä½ç®¡ç†å‘˜\=。您å¯ä»¥å‘电å­é‚®ä»¶ 到 <$list+$owner@$domain$> è”系列表所有者\=。 %else% %^%%wrap%å¦‚æžœæ‚¨æ‰“ç®—å–æ¶ˆè®¢é˜…\=,请使用本电å­é‚®ç®±åœ°å€å‘邮件 到 <$list+$unsubscribe@$domain$>\=。邮件主题与正文任æ„\=。éšåŽæ‚¨å°†æ”¶åˆ°ç¡® 认或进一步说明\=。 %endif% %wrap%è¦èŽ·å–关于本列表的其他信æ¯åŠå¸®åŠ©\=,请å‘邮件 到 <$list+$help@$domain$>。 mlmmj-1.2.18.0/listtexts/zh-cn/gatekeep-sub000644 000765 000120 00000001003 11734220454 020323 0ustar00benadmin000000 000000 Subject: 请求订阅 $list$@$domain$:$subaddr$ %text prologue% %wrap%æ¥è‡ª <$subaddr$> 的地å€è¯·æ±‚订阅本列表的 %iftype normal%常规%endif% %iftype digest%汇总%endif% %iftype nomail%无邮件%endif% 版本\=。 %wrap%è¦æ‰¹å‡†è¯¥è¯·æ±‚\=,请å‘é€é‚®ä»¶åˆ° <$permitaddr$> (\=通常å¯ä»¥é€šè¿‡ç›´æŽ¥å›žå¤ 本邮件完æˆ\=)\=。 %wrap%å¦‚æžœæ‚¨ä¸æ‰“算批准\=,请å‘é€é‚®ä»¶åˆ° <$obstructaddr$> 或直接忽略本邮 ä»¶\=。 下述掌门人已收到本邮件\=: - %gatekeepers% mlmmj-1.2.18.0/listtexts/zh-cn/help000644 000765 000120 00000004727 11734220454 016717 0ustar00benadmin000000 000000 Subject: $list$@$domain$ ä¿¡æ¯ %text prologue% 以下是关于本列表的一些信æ¯\=。 您å¯ä»¥è®¢é˜…下述版本\=: - %wrap%常规版本\=:æ¯å½“有邮件å‘到列表\=,订户都将收到一份副本\=。 %ifcontrol closedlist closedlistsub% 请è”系列表管ç†å‘˜è®¢é˜…\=。 %else% 请å‘邮件到该地å€è®¢é˜…\=:<$list+$subscribe@$domain$>。 %endif% %ifncontrol nodigestsub% %^%- %wrap%汇总版本\=ï¼šè®¢æˆ·å®šæœŸæˆ–ç´¯ç§¯åˆ°ä¸€å®šæ•°é‡æ—¶åœ¨å•å°é‚®ä»¶ä¸­æ”¶åˆ°å¤šæ¡å¸– å­\=。 %ifcontrol closedlist closedlistsub% 请è”系列表管ç†å‘˜è®¢é˜…\=。 %else% 请å‘邮件到该地å€è®¢é˜…\=:<$list+$subscribe-digest@$domain$>。 %endif% %endif% %ifncontrol nonomailsub% %^%- %wrap%无邮件版本\=:订户ä¸ä¼šæ”¶åˆ°å‘往列表的任何帖å­\=。这æ„味ç€\=,尽 ç®¡ä»–ä»¬èƒ½åœ¨åªæœ‰è®¢æˆ·èƒ½å‘帖的列表中å‘帖\=,但他们å¯ä»¥é€šè¿‡ web 存档或订阅该列 表的其他电å­é‚®ç®±åœ°å€è·Ÿè¸ªå›žåº”\=。 %ifcontrol closedlist closedlistsub% 请è”系列表管ç†å‘˜è®¢é˜…\=。 %else% 请å‘邮件到该地å€è®¢é˜…\=:<$list+$subscribe-nomail@$domain$>。 %endif% %endif% %ifcontrol submod% %^%%wrap%åˆ—è¡¨æŽŒé—¨äººä¼šå®¡é˜…è®¢é˜…è¯·æ±‚å†æ‰¹å‡†æ–°æˆå‘˜\=。 %endif% %ifcontrol closedlist% %^%%wrap%请è”系列表管ç†å‘˜å–消订阅\=。 %else% %^%%wrap%请å‘邮件到该地å€å–消订阅\=:<$list+$unsubscribe@$domain$>。 %endif% %^%%wrap%å‘帖请寄往 <$list$@$domain$>。 %ifcontrol subonlypost%%ifncontrol modnonsubposts% %^%%wrap%然而\=ï¼Œåªæœ‰è®¢æˆ·èƒ½åœ¨åˆ—表中å‘帖\=。 %endif%%endif% %ifcontrol moderated% %^%%wrap%本列表版主将审阅所有帖å­\=,å†é€šè¿‡åˆ°åˆ—表\=。 %else% %ifcontrol subonlypost%%ifcontrol modnonsubposts% %^%%wrap%本列表版主将审阅所有éžè®¢æˆ·çš„帖å­\=,å†é€šè¿‡åˆ°åˆ—表\=。 %endif%%endif% %endif% %ifcontrol access% %^%%wrap%本列表还设有æƒé™è§„则\=,å¯èƒ½å½±å“用户能å¦å‘帖\=,以åŠå“ªäº›å¸–å­éœ€è¦ 审核\=。 %endif% %ifncontrol noget%%ifncontrol noarchive% %^%%wrap% %ifcontrol subonlyget% 任何人 %else% 订户 %endif% å¯ä»¥é€šè¿‡å‘邮件到 <$list+$get-N@$domain$> (\=å°† N æ¢æˆæ‰€éœ€é‚®ä»¶çš„åºå·\=) 从列表存档æå–邮件åºå·ä¸º N 的邮件\=。 %endif%%endif% %^%%wrap%您å¯ä»¥å‘邮件到 <$list+$faq@$domain$> 了解本列表的常è§é—®é¢˜æ–‡æ¡£\=。 %^%%wrap%如需è”系列表所有者\=,请å‘邮件到 <$list+$owner@$domain$>。 mlmmj-1.2.18.0/listtexts/zh-cn/list000644 000765 000120 00000000702 11734220454 016727 0ustar00benadmin000000 000000 Subject: $list$@$domain$ 的订阅者列表 %text prologue% %wrap%以下为订阅者列表 %iftype all% (\=本列表所有版本的订阅者\=)\=: %else% 本列表 %iftype normal%常规%endif% %iftype digest%汇总%endif% %iftype nomail%无邮件%endif% 版本的订阅者\=: %endif% %iftype all normal% %^%- %listsubs% %endif% %iftype all digest% %^%- %digestsubs% %endif% %iftype all nomail% %^%- %nomailsubs% %endif% mlmmj-1.2.18.0/listtexts/zh-cn/moderate-post000644 000765 000120 00000002044 11734220454 020540 0ustar00benadmin000000 000000 Subject: 请审核 $list$@$domain$:$subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%æ¥è‡ª <$posteraddr$> 题为《\=$subject$\=》的邮件已æäº¤å‘布\=。 %ifreason modnonsubposts% ç”±äºŽè¯·æ±‚è€…ä¸æ˜¯è®¢æˆ·\=, %endif% %ifreason moderated% 由于本列表为å—é™åˆ—表\=, %endif% %ifreason access% 由于æƒé™è§„则\=, %endif% 您需è¦å¤„ç†è¿™å°é‚®ä»¶\=。邮件内容如下\=。 %wrap%è¦é€šè¿‡è¯¥é‚®ä»¶çš„å‘布\=,请å‘邮件到 <$releaseaddr$> (\=通常å¯ç›´æŽ¥å›žå¤æœ¬ 邮件完æˆ\=)\=。 %wrap%å¦‚æžœæ‚¨ä¸æ‰“算通过\=,请å‘邮件到 <$rejectaddr$> 或直接忽略本邮件\=。 本邮件已å‘给下述版主\=: - %moderators% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/zh-cn/notify000644 000765 000120 00000001716 11734220454 017272 0ustar00benadmin000000 000000 %ifaction sub%Subject: 订阅 $list$@$domain$:$subaddr$%endif% %ifaction unsub%Subject: å–æ¶ˆè®¢é˜… $list$@$domain$:$subaddr$%endif% %text prologue% %ifaction sub% %^%%wrap% %ifreason request% 由于收到加入请求\=, %endif% %ifreason confirm% 由于加入请求得到确认\=, %endif% %ifreason admin% 由于管ç†å‘˜å‘½ä»¤\=, %endif% %ifreason permit% 由于掌门人批准\=, %endif% åœ°å€ <$subaddr$> å·²æˆåŠŸè®¢é˜…æœ¬åˆ—è¡¨çš„ %iftype normal%常规%endif% %iftype digest%汇总%endif% %iftype nomail%无邮件%endif% 版本\=。 %endif% %ifaction unsub% %^%%wrap% %ifreason request% ç”±äºŽæ”¶åˆ°äº†å–æ¶ˆè®¢é˜…的请求\=, %endif% %ifreason confirm% ç”±äºŽå–æ¶ˆè®¢é˜…请求得到确认\=, %endif% %ifreason admin% 由于管ç†å‘˜å‘½ä»¤\=, %endif% %ifreason bouncing% 由于退回过久\=, %endif% åœ°å€ <$subaddr$> å·²æˆåŠŸä»Žæœ¬åˆ—è¡¨é€€è®¢\=。 %endif% mlmmj-1.2.18.0/listtexts/zh-cn/probe000644 000765 000120 00000000340 11734220454 017061 0ustar00benadmin000000 000000 Subject: $list$@$domain$ 被退回的邮件 %text prologue% 您的部分邮件无法投递\=。如果您看到本邮件\=ï¼Œè¯´æ˜Žå·²ç»æ¢å¤æ­£å¸¸\=ï¼Œä»…ä¾›å‚ è€ƒ\=。 已退回的邮件列表\=: - %bouncenumbers% mlmmj-1.2.18.0/listtexts/zh-cn/prologue000644 000765 000120 00000000140 11734220454 017604 0ustar00benadmin000000 000000 %charwrap%%wide% %wrap%å—¨\=ï¼Œæˆ‘æ˜¯ç®¡ç† <$list$@$domain$> 邮件列表的 Mlmmj 程åº\=。 mlmmj-1.2.18.0/listtexts/zh-cn/wait-post000644 000765 000120 00000001467 11734220454 017714 0ustar00benadmin000000 000000 Subject: 等待å‘布到 $list$@$domain$:$subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%æ¥è‡ª <$posteraddr$> 题为《\=$subject$\=》的邮件已æäº¤è‡³åˆ—表\=。然 而\=, %ifreason moderated% 因为这是先审列表\=, %endif% %ifreason access% 由于访问规则\=, %endif% %ifreason modnonsubposts% å› ä¸ºæ‚¨ä¸æ˜¯è®¢é˜…者\=, %endif% 需è¦ç‰ˆä¸»å®¡æ ¸åŽæ‰èƒ½å‘布到该列表\=。 (\=下为邮件\=。\=) --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/zh-cn/wait-sub000644 000765 000120 00000000260 11734220454 017506 0ustar00benadmin000000 000000 Subject: 等待批准加入 $list$@$domain$ %text prologue% %wrap%您加入该列表的请求已收到\=。然而\=,掌门人需è¦å®¡æ ¸åŽæ‰èƒ½æ‰¹å‡†æ‚¨åŠ  å…¥\=。 mlmmj-1.2.18.0/listtexts/sk/confirm000644 000765 000120 00000003217 11746152500 017012 0ustar00benadmin000000 000000 %ifaction sub%Subject: Potvrdenie prihlásenia do $list$@$domain$%endif% %ifaction unsub%Subject: Potvrdenie odhlásenia z $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap% %ifreason admin% Administrátor %endif% %ifreason request% Niekto (veríme, že Vy) %endif% požiadal, aby VaÅ¡a emailová adresa <$subaddr$> bola pridaná %iftype normal% do mailovej diskusie. To znamená, že zakaždým, keÄ do diskusie bude poslaná správa, dostanete jej kópiu. %endif% %iftype digest% do mailovej diskusie, aby ste prijímali súhrnné správy. To znamená, že budete dostávaÅ¥ viacero správ naraz v pravidelných intervaloch, alebo keÄ sa zozbiera dostatoÄný poÄet správ. %endif% %iftype nomail% do mailovej diskusie, bez posielania mailov. To znamená, že mailom nebudete dostávaÅ¥ žiadne správy, ale budete považovaný/považovaná za Älena. Budete teda maÅ¥ pávo posielaÅ¥ správy do diskusie, urÄenej len pre Älenov, priÄom zaslané správy budete môcÅ¥ ÄítaÅ¥ v archíve diskusie alebo na inej mailovej adrese. %endif% %endif% %ifaction unsub% %^%%wrap% %ifreason admin% Administrátor %endif% %ifreason request% Niekto (veríme, že Vy) %endif% požiadal, aby VaÅ¡a emailová adresa <$subaddr$> bola odstránená z mailovej diskusie. %endif% %wrap%Tento úmysel môžete potvrdiÅ¥ poslaním správy na <$confaddr$>, Äo jednoducho spravíte odpoveÄou na tento mail. Na predmete a obsahu správy nezáleží. Následne dostanete správu s informáciou o úspeÅ¡nom vykonaní operácie. Ak sa odhlásiÅ¥ nechcete, túto správu ignorujte. mlmmj-1.2.18.0/listtexts/sk/deny000644 000765 000120 00000004474 11746152500 016322 0ustar00benadmin000000 000000 %ifaction sub%Subject: NeúspeÅ¡né prihlásenie do $list$@$domain$%endif% %ifaction unsub%Subject: NeúspeÅ¡né odhlásenie z $list$@$domain$%endif% %ifaction release reject%Subject: NeúspeÅ¡né moderovanie $list$@$domain$%endif% %ifaction permit obstruct%Subject: NeúspeÅ¡né spravovanie $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap%VaÅ¡e prihlásenie bolo neúspeÅ¡né, lebo %ifreason disabled% %iftype normal% normálna verzia diskusie %endif% %iftype digest% diskusia s prijímaním súhrnných správ %endif% %iftype nomail% diskusia bez posielania správ %endif% je vypnutá. %endif% %ifreason closed% prihlasovanie mailom nie je povolené. %endif% %ifreason subbed% ste už prihlásený/prihlásená. %endif% %ifreason expired% uplynulo príliÅ¡ veľa Äasu bez toho, aby ho správca povolil. %endif% %ifreason obstruct% lebo ho správca nepovolil. %endif% %endif% %ifaction unsub% %^%%wrap%VaÅ¡e odhlásenie z mailovej diskusie bolo neúspeÅ¡né, %ifreason unsubbed% lebo nie ste prihlásený/prihlásená. %^%%wrap%Tento mail ste dostali preto, lebo ste možno prihlásený/prihlásená s inou adresou. VaÅ¡u prihlasovaciu adresu nájdete v privítacej správe, ktorú ste z tejto diskusie dostali, alebo sa pozrite do hlaviÄky správ, ktoré z tejto diskusie dostávate. %endif% %endif% %ifaction release reject% %^%%wrap% %ifaction release% VaÅ¡e povolenie správy na zverejnenie nebolo úspeÅ¡né %endif% %ifaction reject% VaÅ¡e odmietnutie správy na zverejnenie nebolo úspeÅ¡né %endif% %ifreason notfound% lebo sa ju nepodarilo nájsÅ¥. Iný moderátor ju už asi povolil alebo odmietol, alebo expirovala. %endif% %ifreason moderators% lebo nie ste moderátorom tejto diskusie. %endif% %endif% %ifaction permit obstruct% %^%%wrap% %ifaction permit% Vami zaslané povolenie požiadavky na prihlásenie do mailovej diskusie zlyhalo, %endif% %ifaction obstruct% Vami zaslané odmietnutie požiadavky na prihlásenie do mailovej diskusie zlyhalo, %endif% %ifreason notfound% lebo sa ju nepodarilo nájsÅ¥. Iný správca ju už asi povolil alebo odmietol, alebo expirovala. %endif% %ifreason gatekeepers% lebo nie ste správcom tejto diskusie. %endif% %endif% mlmmj-1.2.18.0/listtexts/sk/deny-post000644 000765 000120 00000003372 11746152500 017301 0ustar00benadmin000000 000000 Subject: Odmietnutie príspevku $subject$ do $list$@$domain$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Správu od <$posteraddr$> s predmetom "$subject$" nebolo možné doruÄiÅ¥ do mailovej diskusie %ifreason maxmailsize% lebo prekroÄila maximálnu veľkosÅ¥ $maxmailsize$ bytov. %endif% %ifreason tocc% lebo adresa diskusie nebola v poliach hlaviÄky Komu: ani Kópia: nájdená. %endif% %ifreason access% z dôvodu administrátorom nastavených prístupových pravidiel. %endif% %ifreason expired % lebo uplynula príliÅ¡ dlhá doba bez toho, aby ju povolil moderátor. %endif% %ifreason reject% lebo ju moderátor nepovolil. %endif% %ifreason subonlypost% lebo nie ste abonentom diskusie. %ifcontrol closedlist closedlistsub% %^%%wrap%Ak sa chcete staÅ¥ abonentom, kontaktujte administrátora diskusie tak, že poÅ¡lete mail na <$list+$owner@$domain$>. %endif% %^%%wrap%Ak si myslíte, že ste abonentom diskusie, tak ste zrejme prihlásený/prihlásená s inou mailovou adresou. VaÅ¡u prihlasovaciu adresu nájdete v privítacej správe, ktorú ste z tejto diskusie dostali, alebo sa pozrite do hlaviÄky správ, ktoré z tejto diskusie dostávate. %endif% %ifreason maxmailsize% %^%(Úvod odmietnutej správy je uvedený nižšie.) %else% %^%(Odmietnutá správa je uvedená nižšie.) %endif% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %ifreason maxmailsize% %^%%originalmail 300% %else% %^%%originalmail% %endif% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/sk/digest000644 000765 000120 00000000237 11746152500 016633 0ustar00benadmin000000 000000 Subject: Súhrn mailovej diskusie $list$@$domain$ vydanie $digestissue$ ($digestinterval$) Témy (správy $digestfirst$ až $digestlast$): - %digestthreads% mlmmj-1.2.18.0/listtexts/sk/faq000644 000765 000120 00000000152 11746152500 016117 0ustar00benadmin000000 000000 Subject: ÄŒasto kladené otázky k mailovej diskusii $list$@$domain$ Ľutujeme, FAQ zatiaľ neexistuje. mlmmj-1.2.18.0/listtexts/sk/finish000644 000765 000120 00000002601 11746152500 016631 0ustar00benadmin000000 000000 %ifaction unsub%Subject: Dovidenia z $list$@$domain$%endif% %ifaction release reject%Subject: Moderovanie $list$@$domain$: $subject$%endif% %ifaction permit obstruct%Subject: Odmietnutie $list$@$domain$: $subaddr$%endif% %ifaction post%Subject: Zverejnenie v $list$@$domain$: $subject$%endif% %text prologue% %ifaction unsub% %^%%wrap% %ifreason request% %endif% %ifreason confirm% ÄŽakujeme za potvrdenie požiadavky na odhlásenie. %endif% %ifreason admin% Administrátor Vás odhlásil z mailovej diskusie. %else% Boli ste odhlásený/odhlásená z mailovej diskusie. %endif% %endif% %ifaction release% %^%%wrap%Správu "$subject$" na zverejnenie v diskusii od <$posteraddr$> ste úspeÅ¡ne povolili. %endif% %ifaction reject% %^%%wrap%Správu "$subject$" na zverejnenie v diskusii od <$posteraddr$> ste úspeÅ¡ne odmietli. %endif% %ifaction permit% %^%%wrap%ÚspeÅ¡ne ste povolili prihlásenie <$subaddr$> do diskusie. %endif% %ifaction obstruct% %^%%wrap%ÚspeÅ¡ne ste zakázali prihlásenie <$subaddr$> do diskusie. %endif% %ifaction post% %^%%wrap% %ifreason confirm% ÄŽakujeme za potvrdenie Vášho príspevku %endif% %ifreason release% Moderátor uvoľnil na zverejnenie príspevok %endif% %ifreason request% ÄŽakujeme za príspevok %endif% s predmetom "$subject$". Príspevok bude odoslaný do mailovej diskusie. %endif% mlmmj-1.2.18.0/listtexts/sk/finish-sub000644 000765 000120 00000003012 11746152500 017415 0ustar00benadmin000000 000000 Subject: Vitajte v $list$@$domain$ %text prologue% %wrap% %ifreason request% ÄŽakujeme Vám za záujem o spoluprácu. %endif% %ifreason confirm% ÄŽakujeme Vám za potvrdenie prihlásenia. %endif% %ifreason permit% Správca odsúhlasil VaÅ¡u žiadosÅ¥ o zapojenie do mailovej diskusie. %endif% %ifreason switch% Typ Vášho prihlásenia bol zmenený na %iftype normal% Å¡tandardnú verziu mailovej diskusie.%endif% %iftype digest% mailovú diskusiu s prijímaním súhrnných správ.%endif% %iftype nomail% mailovú diskusiu bez posielania správ.%endif% %else% %ifreason admin% Administrátor Vás prihlásil do %else% Boli ste pridaný/pridaná do %endif% %iftype normal% Å¡tandardnej verzie mailovej diskusie.%endif% %iftype digest% mailovej diskusie s prijímaním súhrnných správ.%endif% %iftype nomail% mailovej diskusie bez posielania správ.%endif% %endif% %wrap%Ste prihlásený/prihlásená s mailovou adresou <$subaddr$>. %ifcontrol closedlist% %^%%wrap%Ak sa v budúcnosti budete chcieÅ¥ odhlásiÅ¥, bude potrebné kontaktovaÅ¥ administrátora. Zaslaním mailu na adresu <$list+$owner@$domain$> sa skontaktujete so správcom tejto diskusie. %else% %^%%wrap%Ak sa v budúcnosti budete chcieÅ¥ odhlásiÅ¥, poÅ¡lite mail na adresu <$list+$unsubscribe@$domain$>. Na predmete a obsahu správy nezáleží. Následne dostanete potvrdenie s Äalšími inÅ¡trukciami. %endif% %wrap%Pre ÄalÅ¡ie informácie a pomoc s touto mailovou diskusiou napíšte na adresu <$list+$help@$domain$>. mlmmj-1.2.18.0/listtexts/sk/gatekeep-sub000644 000765 000120 00000001215 11746152500 017725 0ustar00benadmin000000 000000 Subject: Požiadavka na prihlásenie do $list$@$domain$: $subaddr$ %text prologue% %wrap%Z adresy <$subaddr$> priÅ¡la prihláška do %iftype normal% normálnej verzie mailovej diskusie.%endif% %iftype digest% mailovej diskusie so zasielaním súhrnných správ.%endif% %iftype nomail% mailovej diskusie bez zasielania správ.%endif% %wrap%Ak chcete prihlášku povoliÅ¥, poÅ¡lite správu na adresu <$permitaddr$>. Spravíte tak odoslaním odpovede na tento mail. %wrap%%Ak nechcete prihlášku povoliÅ¥, poÅ¡lite správu na adresu <$obstructaddr$> alebo túto správu ignorujte. Túto správu dostali nasledujúci administrátori: - %gatekeepers% mlmmj-1.2.18.0/listtexts/sk/help000644 000765 000120 00000006274 11746152500 016313 0ustar00benadmin000000 000000 Subject: Informácie o $list$@$domain$ %text prologue% Informácie o používaní mailovej diskusie. PrihlásiÅ¥ sa môžete do nasledujúcich verzií: - %wrap%Normálna verzia: Zakaždým, keÄ sa do diskusie poÅ¡le príspevok, abonenti dostanú jeho kópiu v samostatnej mailovej správe. %ifcontrol closedlist closedlistsub% Do tejto verzie diskusie sa možno prihlásiÅ¥ poslaním mailu administrátorovi. %else% Do tejto verzie diskusie sa možno prihlásiÅ¥ poslaním mailu na <$list+$subscribe@$domain$>. %endif% %ifncontrol nodigestsub% %^%- %wrap%Verzia s prijímaním súhrnných správ (digest): Abonenti dostávajú viaceré príspevky naraz v jednej mailovej správe buÄ v pravidelných intervaloch, alebo keÄ sa zozbiera dostatoÄný poÄet správ. %ifcontrol closedlist closedlistsub% Do tejto verzie diskusie sa možno prihlásiÅ¥ poslaním mailu administrátorovi. %else% Do tejto verzie diskusie sa možno prihlásiÅ¥ poslaním mailu na <$list+$subscribe-digest@$domain$>. %endif% %endif% %ifncontrol nonomailsub% %^%- %wrap%Verzia bez posielania mailových správ: Abonenti nedostávajú mailom žiadne správy. To znamená, že do diskusie môžu posielaÅ¥ príspevky tak, ako ostatní abonenti, priÄom príspevky diskusie sledujú v archíve diskusie alebo na inej mailovej adrese, ktorou sú do diskusie už prihlásení. %ifcontrol closedlist closedlistsub% Do tejto verzie diskusie sa možno prihlásiÅ¥ poslaním mailu administrátorovi. %else% Do tejto verzie diskusie sa možno prihlásiÅ¥ poslaním mailu na <$list+$subscribe-nomail@$domain$>. %endif% %endif% %ifcontrol submod% %^%%wrap%Diskusia má administrátorov, ktorí každú žiadosÅ¥ o pripojenie musia odsúhlasiÅ¥. %endif% %ifcontrol closedlist% %^%%wrap%Z diskusie sa možno ohlásiÅ¥ poslaním mailu administrátorovi. %else% %^%%wrap%Z diskusie sa možno ohlásiÅ¥ poslaním mailu na <$list+$unsubscribe@$domain$>. %endif% %wrap%Príspevky sa posielajú na adresu <$list$@$domain$>. %ifcontrol subonlypost%%ifncontrol modnonsubposts% %^%%wrap%Príspevky do diskusie môžu posielaÅ¥ len jej abonenti. %endif%%endif% %ifcontrol moderated% %^%%wrap%Diskusia je moderovaná. To znamená, že každý príspevok je pred jeho zverejnením preverený moderátorom. %else% %ifcontrol subonlypost%%ifcontrol modnonsubposts% %^%%wrap%Diskusia má moderátorov, ktorí pred jeho zverejnením preveria každý príspevok od neprihláseného odosielateľa %endif%%endif% %endif% %ifcontrol access% %^%%wrap%Mailová diskusia má definované prístupové pravidlá, ktoré urÄujú, kto môže zasielaÅ¥ príspevky a ktoré príspevky sú moderované. %endif% %ifncontrol noget%%ifncontrol noarchive% %^%%wrap% %ifcontrol subonlyget% Ktokoľvek si môže %else% Abonenti si môžu %endif% vyžiadaÅ¥ zaslanie správy N z archívu konferencie zaslaním mailu na <$list+$get-N@$domain$> (N treba zmeniÅ¥ na Äíslo správy). %endif%%endif% %wrap%Odpovede na Äasto kladené otázky (FAQ) si môžete vyžiadaÅ¥ zaslaním mailu na <$list+$faq@$domain$>. %wrap%Správcu mailovej diskusie môžete kontaktovaÅ¥ na adrese <$list+$owner@$domain$>. mlmmj-1.2.18.0/listtexts/sk/list000644 000765 000120 00000000767 11746152500 016337 0ustar00benadmin000000 000000 Subject: Zoznam abonentov $list$@$domain$ %text prologue% %wrap%Zoznam abonentov %iftype all% (vÅ¡etkých verzií mailovej diskusie): %else% %iftype normal% normálnej verzie mailovej diskusie:%endif% %iftype digest% mailovej diskusie so zasielaním súhrnných správ:%endif% %iftype nomail% mailovej diskusie bez zasielania správ:%endif% %endif% %iftype all normal% %^%- %listsubs% %endif% %iftype all digest% %^%- %digestsubs% %endif% %iftype all nomail% %^%- %nomailsubs% %endif% mlmmj-1.2.18.0/listtexts/sk/moderate-post000644 000765 000120 00000002252 11746152500 020136 0ustar00benadmin000000 000000 Subject: Prosba o moderovanie $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Od <$posteraddr$> bola na zverejnenie doruÄená správa s predmetom "$subject$". Žiadame Vás o jej preverenie, %ifreason modnonsubposts% lebo jej odosielateľ nie je abonentom diskusie. %endif% %ifreason moderated% lebo táto mailová diskusia je moderovaná. %endif% %ifreason access% lebo to vyžaduje nastavenie prístupových pravidiel. %endif% Správa je pripojená nižšie. %wrap%Ak chcete povoliÅ¥ zverejnenie správy, poÅ¡lite mail na adresu <$releaseaddr$>, Äo možno spraviÅ¥ odpovedaním na tento mail. %wrap%Ak nechcete vykonaÅ¥ žiadnu z týchto akcií, poÅ¡lite mail na <$rejectaddr$> alebo jednoducho túto správu ignorujte. Túto správu dostali nasledujúci moderátori: - %moderators% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/sk/notify000644 000765 000120 00000002227 11746152500 016665 0ustar00benadmin000000 000000 %ifaction sub%Subject: Prihlásenie do $list$@$domain$: $subaddr$%endif% %ifaction unsub%Subject: Odhlásenie z $list$@$domain$: $subaddr$%endif% %text prologue% %ifaction sub% %^%%wrap%Adresa <$subaddr$> bola zaradená do zoznamu abonentov %iftype normal% normálnej verzie mailovej diskusie, %endif% %iftype digest% mailovej diskusie s prijímaním súhrnných správ (digest) %endif% %iftype nomail% mailovej diskusie bez zasielania správ, %endif% %ifreason request% lebo sme obdržali požiadavku na prihlásenie. %endif% %ifreason confirm% lebo požiadavka na prihlásenie bola odsúhlasená. %endif% %ifreason admin% lebo tak rozhodol administrátor. %endif% %ifreason permit% lebo tak rozhodol správca. %endif% %endif% %ifaction unsub% %^%%wrap%Adresa <$subaddr$> bola vyradená do zoznamu abonentov %ifreason request% lebo sme obdržali požiadavku na odhlásenie. %endif% %ifreason confirm% lebo požiadavka na prihlásenie bola potvrdená. %endif% %ifreason admin% lebo tak rozhodol administrátor. %endif% %ifreason bouncing% lebo jej overovanie trvalo príliÅ¡ dlho. %endif% %endif% mlmmj-1.2.18.0/listtexts/sk/probe000644 000765 000120 00000000436 11746152500 016464 0ustar00benadmin000000 000000 Subject: NedoruÄené správy z $list$@$domain$ %text prologue% Nepodarilo sa Vám doruÄiÅ¥ viaceré správy. Ak Äítate tento mail, tak situácia sa už vrátila do normálneho stavu a jeho obsah slúži len pre VaÅ¡u informáciu. Zoznam nedoruÄených správ: - %bouncenumbers% mlmmj-1.2.18.0/listtexts/sk/prologue000644 000765 000120 00000000130 11746152500 017200 0ustar00benadmin000000 000000 %wrap%Ahoj, toto je program Mlmmj, ktorý spravuje mailovú diskusiu <$list$@$domain$>. mlmmj-1.2.18.0/listtexts/sk/wait-post000644 000765 000120 00000001560 11746152500 017303 0ustar00benadmin000000 000000 Subject: Äaká sa na zverejnenie do $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Z adresy <$posteraddr$> bola do mailovej diskusie zaslaná správa s predmetom "$subject$". Pred jej zverejnením boli moderátori požiadaní o jej odsúhlasenie, lebo %ifreason moderated% ide o moderovanú mailovú diskusiu. %endif% %ifreason access% to vyžadujú prístupové pravidlá diskusie. %endif% %ifreason modnonsubposts% nie ste jej abonentom. %endif% (Správa je pripojená.) --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/sk/wait-sub000644 000765 000120 00000000374 11746152500 017111 0ustar00benadmin000000 000000 Subject: Äaká sa na povolenie prístupu do $list$@$domain$ %text prologue% %wrap%VaÅ¡a žiadosÅ¥ na povolenie prístupu do mailovej diskusie bola prijatá. Správcovia diskusie boli požiadaní o preverenie VaÅ¡ej žiadosti pred jej akceptáciou. mlmmj-1.2.18.0/listtexts/pt/confirm000644 000765 000120 00000003377 11746152500 017027 0ustar00benadmin000000 000000 %ifaction sub%Subject: Confirmação de subscrição em $list$@$domain$%endif% %ifaction unsub%Subject: Confirmação de cancelamento da subscrição em $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap% %ifreason admin% Um administrador %endif% %ifreason request% Alguém (esperamos que você) %endif% solicitou que o endereço eletrónico <$subaddr$> fosse adicionado %iftype normal% à lista de correio normal. Isto significa que, de cada vez que uma mensagem for enviada para a lista, você receberá uma cópia. %endif% %iftype digest% à lista de correio resumida. Isto significa que você receberá diversas mensagens numa única mensagem, em intervalos periódicos, ou quando se acumularem um determinado conjunto de mensagens. %endif% %iftype nomail% à lista de correio no-mail. Isto significa que você não receberá quaisquer mensagens, mas é considerado como membro. Isto significa que, por exemplo você poderá enviar mensagens para a lista na qual só os subscritores podem enviar, enquanto segue as mensagens através de um arquivo web ou através de outro endereço eletrónico. %endif% %endif% %ifaction unsub% %^%%wrap% %ifreason admin% Um administrador %endif% %ifreason request% Alguém (esperamos que você) %endif% solicitou que o endereço eletrónico <$subaddr$> fosse removido da lista de correio. %endif% %wrap%Para confirmar a operação, envie uma mensagem para <$confaddr$> bastando, para o efeito, responder a esta mensagem. O assunto e o texto da mensagem pode estar vazio. Após o envio da mensagem, deve receber uma mensagem a confirmar que a operação foi councluída com sucesso. Se não solicitou esta operação, ignore esta mensagem. mlmmj-1.2.18.0/listtexts/pt/deny000644 000765 000120 00000004700 11746152500 016320 0ustar00benadmin000000 000000 %ifaction sub%Subject: Não foi possível subscrever em $list$@$domain$%endif% %ifaction unsub%Subject: Não foi possível cancelar a subscrição em $list$@$domain$%endif% %ifaction release reject%Subject: Não foi possível moderar $list$@$domain$%endif% %ifaction permit obstruct%Subject: Não foi possível comunicar com o administrador de $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap%Não foi possível concluir a subscrição à lista %ifreason disabled% porque a versão %iftype normal% normal %endif% %iftype digest% resumida %endif% %iftype nomail% no-mail %endif% da lista está inativa. %endif% %ifreason closed% porque os utilizadores não podem subscrever a esta lista por correio eletrónico. %endif% %ifreason subbed% porque você já subscreveu esta lista. %endif% %ifreason expired% porque o administrador da lista levou muito tempo a responder ao seu pedido. %endif% %ifreason obstruct% porque o administrador da lista bloqueou a sua subscrição. %endif% %endif% %ifaction unsub% %^%%wrap%Não foi possível cancelar a sua subscrição da lista %ifreason unsubbed% porque você não faz parte da lista. %^%%wrap%Se você está a receber muitas mensagens, é possível que já tenha subscrito à lista com outro endereço eletrónico. Para descobrir com que endereço subscreveu, consulte a mensagem de boas vindas da lista ou procure no cabeçalho "Return-Path" de uma mensagem que tenha recebido. %endif% %endif% %ifaction release reject% %^%%wrap% %ifaction release% Você não consegue publicar a mensagem na lista %endif% %ifaction reject% Você não consegue rejeitar a mensagem da lista %endif% %ifreason notfound% porque ela não foi encontrada. É possível que outro moderador já a tenha publicado, rejeitado ou que tenha expirado. %endif% %ifreason moderators% porque você não é um moderador da lista. %endif% %endif% %ifaction permit obstruct% %^%%wrap% %ifaction permit% Você não consegue aceitar o pedido de subscrição %endif% %ifaction obstruct% Você não consegue cancelar o pedido de subscrição %endif% %ifreason notfound% porque ele não foi encontrado. É possível que outro administrador da lista já o tenha aceite, rejeitado ou que tenha expirado. %endif% %ifreason gatekeepers% porque você não é um administrador desta lista. %endif% %endif% mlmmj-1.2.18.0/listtexts/pt/deny-post000644 000765 000120 00000003372 11746152500 017307 0ustar00benadmin000000 000000 Subject: Mensagem para $list$@$domain$ recusada: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%A mensagem de <$posteraddr$> com o assunto "$subject$" não foi entregue na lista %ifreason maxmailsize% porque excedia o tamanho máximo permitido de $maxmailsize$ bytes. %endif% %ifreason tocc% porque o endereço da lista não foi encontrado no cabeçalho Para: ou CC:. %endif% %ifreason access% porque causa de uma regra criada por um administrador. %endif% %ifreason expired% porque já passou muito tempo sem que um moderador a publicasse. %endif% %ifreason reject% porque um moderador a rejeitou. %endif% %ifreason subonlypost% porque você não faz parte da lista. %ifcontrol closedlist closedlistsub% %^%%wrap%Se pretender subscrever a lista, tem que contactar um administrador. Envie uma mensagem para <$list+$owner@$domain$> para contactar o administrador. %endif% %^%%wrap%Se você acha que já subscreveu à lista, é possível que tenha indicado um endereço eletrónico diferente. Para descobrir com que endereço subscreveu, consulte a mensagem de boas vindas da lista ou procure no cabeçalho "Return-Path" de uma mensagem que tenha recebido. %endif% %ifreason maxmailsize% %^%(O início da mensagem recusada está em baixo.) %else% %^%(A mensagem recusada está em baixo.) %endif% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %ifreason maxmailsize% %^%%originalmail 300% %else% %^%%originalmail% %endif% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/pt/digest000644 000765 000120 00000000223 11746152500 016634 0ustar00benadmin000000 000000 Subject: Resumo de $list$@$domain$ assunto $digestissue$ ($digestinterval$) Tópicos (mensagens $digestfirst$ a $digestlast$): - %digestthreads% mlmmj-1.2.18.0/listtexts/pt/faq000644 000765 000120 00000000144 11746152500 016126 0ustar00benadmin000000 000000 Subject: Perguntas frequentes de $list$@$domain$ Desculpe, mas não existem perguntas frequentes. mlmmj-1.2.18.0/listtexts/pt/finish000644 000765 000120 00000002471 11746152500 016644 0ustar00benadmin000000 000000 %ifaction unsub%Subject: Cancelamento da subscrição em $list$@$domain$%endif% %ifaction release reject%Subject: Moderação em $list$@$domain$: $subject$%endif% %ifaction permit obstruct%Subject: Rejeição em $list$@$domain$: $subaddr$%endif% %ifaction post%Subject: Publicação em $list$@$domain$: $subject$%endif% %text prologue% %ifaction unsub% %^%%wrap% %ifreason request% %endif% %ifreason confirm% Agradecemos a confirmação do cancelamento da subscrição. %endif% %ifreason admin% Um administrador removeu-o da lista. %else% Você foi removido da lista. %endif% %endif% %ifaction release% %^%%wrap%Você publicou a mensagem de <$posteraddr$> com o assunto "$subject$". %endif% %ifaction reject% %^%%wrap%Você rejeitou a mensagem de <$posteraddr$> com o assunto "$subject$". %endif% %ifaction permit% %^%%wrap%Você permitiu que <$subaddr$> fosse integrado na lista. %endif% %ifaction obstruct% %^%%wrap%Você não permitiu que <$subaddr$> fosse integrado na lista. %endif% %ifaction post% %^%%wrap% %ifreason confirm% Agradecemos a confirmação da %endif% %ifreason release% O moderador publicou a %endif% %ifreason request% Agradecemos a %endif% sua mensagem com o assunto "$subject$". Está, neste momento, a ser publicada na lista. %endif% mlmmj-1.2.18.0/listtexts/pt/finish-sub000644 000765 000120 00000002436 11746152500 017434 0ustar00benadmin000000 000000 Subject: Bem vindo a $list$@$domain$ %text prologue% %wrap% %ifreason request% Agradecemos o seu pedido de integração na lista. %endif% %ifreason confirm% Agradecemos a confirmação da subscrição. %endif% %ifreason permit% Um administrador permitiu a sua integração na lista. %endif% %ifreason switch% A sua subscrição foi alterada para a versão %else% %ifreason admin% Um administrador permitiu a sua subscrição na versão %else% Você foi adicionado(a) à versão %endif% %endif% %iftype normal% normal %endif% %iftype digest% resumida %endif% %iftype nomail% no-mail %endif% da lista. %wrap%O endereço eletrónico da sua subscrição na lista é <$subaddr$>. %ifcontrol closedlist% %^%%wrap%Caso pretenda cancelar a subscrição, tem que contactar um administrador da lista. Para o efeito, basta enviar uma mensagem eletrónica para <$list+$owner@$domain$>. %else% %^%%wrap%Caso pretenda cancelar a subscrição, envie uma mensagem eletrónica para <$list+$unsubscribe@$domain$>, utilizando este endereço eletrónico. O assunto e o texto da mensagem pode estar vazio. Posteriormente, receberá uma mensagem com as informações a seguir. %endif% %wrap%Para mais informações sobre a lista, envie uma mensagem eletrónica para <$list+$help@$domain$>. mlmmj-1.2.18.0/listtexts/pt/gatekeep-sub000644 000765 000120 00000001147 11746152500 017737 0ustar00benadmin000000 000000 Subject: Pedido de subscrição em $list$@$domain$: $subaddr$ %text prologue% %wrap%Foi solicitado um pedido de <$subaddr$> para receber a versão %iftype normal% normal %endif% %iftype digest% resumida %endif% %iftype nomail% no-mail %endif% da lista. %wrap%Para confirmar a operação, envie uma mensagem para <$permitaddr$> bastando, para o efeito, responder a esta mensagem. O assunto e o texto da mensagem pode estar vazio. %wrap%Se não pretende confirmar a operação, envie uma mensagem para <$obstructaddr$> ou ignore esta mensagem. Os seguintes administradores receberam a mensagem: - %gatekeepers% mlmmj-1.2.18.0/listtexts/pt/help000644 000765 000120 00000005753 11746152500 016322 0ustar00benadmin000000 000000 Subject: Informações de $list$@$domain$ %text prologue% Abaixo são exibidas algumas informações sobre a lista. Pode subscrever às seguintes versões da lista: - %wrap%Versão normal: cada vez que uma mensagem seja enviada para a lista, os subscritores recebem uma cópia. %ifcontrol closedlist closedlistsub% Subscrever enviando uma mensagem para o administrador da lista. %else% Subscrever enviando uma mensagem para <$list+$subscribe@$domain$>. %endif% %ifncontrol nodigestsub% %^%- %wrap%Versão resumida: os subscritores recebem diversas mensagens numa única mensagem, em intervalos periódicos, ou quando se acumularem um deteminado conjunto de mensagens. %ifcontrol closedlist closedlistsub% Subscrever enviando uma mensagem para o administrador da lista. %else% Subscrever enviando uma mensagem para <$list+$subscribe-digest@$domain$>. %endif% %endif% %ifncontrol nonomailsub% %^%- %wrap%Versão no-mail: os subscritores não recebem quaisquer mensagens, mas são considerado como membros da lista. Isto significa que, por exemplo, você pode enviar mensagens para a lista na qual só os subscritores podem enviar, enquanto segue as mensagens através de um arquivo web ou através de outro endereço eletrónico. %ifcontrol closedlist closedlistsub% Subscrever enviando uma mensagem para o administrador da lista. %else% Subscrever enviando uma mensagem para <$list+$subscribe-nomail@$domain$>. %endif% %endif% %ifcontrol submod% %^%%wrap%A lista tem administradores que fazem a revisão dos pedidos de subscrição antes de permitir a entrada a novos membros. %endif% %ifcontrol closedlist% %^%%wrap%Cancele a subscrição contactando o admnistrador da lista. %else% %^%%wrap%Cancele a subscrição enviando uma mensagem para <$list+$unsubscribe@$domain$>. %endif% %wrap%As mensagens são colocadas através de <$list$@$domain$>. %ifcontrol subonlypost%%ifncontrol modnonsubposts% %^%%wrap%No entanto, só subscritores podem enviar mensagens para a lista. %endif%%endif% %ifcontrol moderated% %^%%wrap%A lista tem moderadores que fazem a revisão das mensagens dos subscritores antes de as publicarem na lista. %else% %ifcontrol subonlypost%%ifcontrol modnonsubposts% %^%%wrap%A lista tem moderadores que fazem a revisão das mensagens dos não subscritores antes de as publicarem na lista. %endif%%endif% %endif% %ifcontrol access% %^%%wrap%A lista também tem regras que podem afetar o envio e moderação das mensagens. %endif% %ifncontrol noget%%ifncontrol noarchive% %^%%wrap% %ifcontrol subonlyget% Todos %else% Os subscritores %endif% podem obter a mensagem número X da lista, enviando uma mensagem para <$list+$get-N@$domain$> (altere o X para o número da mensagem que pretende). %endif%%endif% %wrap%Você pode aceder às perguntas frequentes da lista enviando uma mensagem para <$list+$faq@$domain$>. %wrap%Para contactar o proprietário da lista, envie uma mensagem para <$list+$owner@$domain$>. mlmmj-1.2.18.0/listtexts/pt/list000644 000765 000120 00000000653 11746152500 016337 0ustar00benadmin000000 000000 Subject: Subscritores de $list$@$domain$ %text prologue% %wrap%Esta é lista de subscritores %iftype all% de todas as versões da lista: %else% da versão %iftype normal% normal %endif% %iftype digest% resumida %endif% %iftype nomail% no-mail %endif% da lista: %endif% %iftype all normal% %^%- %listsubs% %endif% %iftype all digest% %^%- %digestsubs% %endif% %iftype all nomail% %^%- %nomailsubs% %endif% mlmmj-1.2.18.0/listtexts/pt/moderate-post000644 000765 000120 00000002111 11746152500 020136 0ustar00benadmin000000 000000 Subject: Moderação em $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%A mensagem de <$posteraddr$> com o assunto "$subject$" foi enviada para publicação. Esta mensagem requer moderação %ifreason modnonsubposts% porque o remetente não é um subscritor. %endif% %ifreason moderated% porque esta é uma lista moderada. %endif% %ifreason access% em virtude de uma regra. %endif% Mensagem segue em baixo. %wrap%Para a publicar na lista, envie uma mensagem para <$releaseaddr$> bastando, para o efeito, responder a esta mensagem. %wrap%Se não o quiser fazer, envie uma mensagem para <$rejectaddr$> ou ignore esta mensagem. Os seguintes moderadores receberam esta mensagem: - %moderators% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/pt/notify000644 000765 000120 00000002115 11746152500 016667 0ustar00benadmin000000 000000 %ifaction sub%Subject: Subscrição em $list$@$domain$: $subaddr$%endif% %ifaction unsub%Subject: Cancelamento da subscrição em $list$@$domain$: $subaddr$%endif% %text prologue% %ifaction sub% %^%%wrap%O endereço <$subaddr$> foi adicionado à versão %iftype normal% normal %endif% %iftype digest% resumida %endif% %iftype nomail% no-mail %endif% da lista %ifreason request% porque foi recebido o pedido de subscrição. %endif% %ifreason confirm% porque o pedido de subscrição foi aceite. %endif% %ifreason admin% porque o administrador assim o decidiu. %endif% %ifreason permit% porque o administrador o permitiu. %endif% %endif% %ifaction unsub% %^%%wrap%O endereço <$subaddr$> foi removido da lista %ifreason request% porque foi recebido o pedido de cancelamento de subscrição. %endif% %ifreason confirm% porque o pedido de cancelamento de subscrição foi aceite. %endif% %ifreason admin% porque o administrador assim o decidiu. %endif% %ifreason bouncing% porque o administrador o permitiu. %endif% %endif% mlmmj-1.2.18.0/listtexts/pt/probe000644 000765 000120 00000000414 11746152500 016466 0ustar00benadmin000000 000000 Subject: Mensagens pendentes de $list$@$domain$ %text prologue% Algumas mensagens não foram entregues. Se recebeu esta mensagem, os problemas já foram resolvidos e esta mensagem é meramente informativa. Esta é a lista de mensagens pendentes: - %bouncenumbers% mlmmj-1.2.18.0/listtexts/pt/prologue000644 000765 000120 00000000141 11746152500 017210 0ustar00benadmin000000 000000 %wrap%Este é o Mlmmj, a aplicação que faz a gestão das mensagens da lista <$list$@$domain$>. mlmmj-1.2.18.0/listtexts/pt/wait-post000644 000765 000120 00000001565 11746152500 017316 0ustar00benadmin000000 000000 Subject: Mensagem à espera de publicação em $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%A mensagem de <$posteraddr$> com o assunto "$subject$" foi enviada para a lista. Contudo, os moderadores ainda não a publicaram pois está em lista de espera para revisão %ifreason moderated% porque esta é uma lista moderada. %endif% %ifreason access% em virtude de uma regra. %endif% %ifreason modnonsubposts% porque você não é um subscritor. %endif% (Mensagem segue em baixo.) --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/pt/wait-sub000644 000765 000120 00000000356 11746152500 017117 0ustar00benadmin000000 000000 Subject: A aguardar a permissão para integrar $list$@$domain$ %text prologue% %wrap%O seu pedido para integrar a lista foi recebido. No entanto, os administradores ainda teem que rever a mensagem antes de permitir a sua integração. mlmmj-1.2.18.0/listtexts/it/confirm000644 000765 000120 00000003247 11734220454 017015 0ustar00benadmin000000 000000 %ifaction sub%Subject: Conferma iscrizione a $list$@$domain$%endif% %ifaction unsub%Subject: Conferma rimozione da $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap% %ifreason admin% Un amministratore %endif% %ifreason request% Qualcuno (che speriamo sia tu) %endif% ha richiesto l'aggiunta del tuo indirizzo di posta elettronica <$subaddr$> %iftype normal% alla lista. Ciò significa che ogni volta che un messaggio viene inviato alla lista, tu ne riceverai una copia. %endif% %iftype digest% alla lista, per ricevere digest. Ciò significa che riceverai più messaggi in un unico messaggio di posta, a intervalli regolari, o quando se ne sono accumulati un po'. %endif% %iftype nomail% alla lista, senza invio della posta. Ciò significa che non riceverai alcun messaggio relativo alla lista, ma ne sei sempre considerato/a un membro. Per esempio, puoi inviare messaggi alla lista, cui solo gli iscritti possono scrivere, ma la segui tramite un archivio web o un altro indirizzo di posta con cui sei iscritto/a. %endif% %endif% %ifaction unsub% %^%%wrap% %ifreason admin% Un amministratore %endif% %ifreason request% Qualcuno (che speriamo sia tu) %endif% ha richiesto la rimozione dell'indirizzo di posta elettronica <$subaddr$> dalla lista. %endif% %wrap%Per confermare l'azione, invia un messaggio a <$confaddr$>, tale azione può essere eseguita semplicemente rispondendo al messaggio. L'oggetto e il corpo del messaggio possono essere vuoti. Dopo tale operazione riceverai una risposta che ti informerà della sua riuscita. Se non vuoi confermare l'azione, ignora questo messaggio. mlmmj-1.2.18.0/listtexts/it/deny000644 000765 000120 00000004577 11734220454 016326 0ustar00benadmin000000 000000 %ifaction sub%Subject: Impossibile effettuare l'iscrizione a $list$@$domain$%endif% %ifaction unsub%Subject: Impossibile rimuovere l'iscrizione da $list$@$domain$%endif% %ifaction release reject%Subject: Impossibile moderare $list$@$domain$%endif% %ifaction permit obstruct%Subject: Impossibile eseguire il gatekeeping su $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap%Non sei in grado di iscriverti alla lista %ifreason disabled% perché la versione %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% della lista è disattivata. %endif% %ifreason closed% perché agli utenti non è consentito iscriversi a questa lista tramite e-mail. %endif% %ifreason subbed% perché sei già iscritto/a. %endif% %ifreason expired% perché è trascorso troppo tempo senza che un controllore permettesse il tuo ingresso. %endif% %ifreason obstruct% perché un controllore ha bloccato il tuo ingresso. %endif% %endif% %ifaction unsub% %^%%wrap%Non sei in grado di rimuovere l'iscrizione dalla lista %ifreason unsubbed% perché non sei iscritto/a. %^%%wrap%Se stai ricevendo messaggi, probabilmente sei iscritto/a con un altro indirizzo e-mail. Per vedere l'indirizzo di iscrizione, fai riferimento al messaggio di benvenuto ricevuto dalla lista, o controlla l'intestazione "Return-Path" di un messaggio ricevuto dalla lista. %endif% %endif% %ifaction release reject% %^%%wrap% %ifaction release% Non hai potuto rilasciare il messaggio specificato nella lista %endif% %ifaction reject% Non hai potuto rifiutare il messaggio specificato %endif% %ifreason notfound% perché non è stato possibile trovarlo. Forse un altro moderatore lo ha già rilasciato o rifiutato, o esso è scaduto. %endif% %ifreason moderators% perché non sei un moderatore della lista. %endif% %endif% %ifaction permit obstruct% %^%%wrap% %ifaction permit% Non hai potuto consentire la specifica richiesta di iscrizione %endif% %ifaction obstruct% Non hai potuto bloccare la specifica richiesta di iscrizione %endif% %ifreason notfound% perché è stato impossibile trovarla. Forse un altro gatekeeper l'ha già permessa o bloccata, o essa è scaduta. %endif% %ifreason gatekeepers% perché non sei un gatekeeper della lista. %endif% %endif% mlmmj-1.2.18.0/listtexts/it/deny-post000644 000765 000120 00000003476 11734220454 017306 0ustar00benadmin000000 000000 Subject: Messaggio a $list$@$domain$ negato: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Non è stato possibile consegnare alla lista il messaggio da <$posteraddr$> con oggetto "$subject$" %ifreason maxmailsize% perché ha superato la dimensione massima consentita di $maxmailsize$ byte. %endif% %ifreason tocc% perché l'indirizzo della lista non è stato trovato nella intestazione A: o CC:. %endif% %ifreason access% a causa di una regola di accesso impostata dall'amministratore della lista. %endif% %ifreason expired% perché è trascorso troppo tempo senza che alcun moderatore lo confermasse. %endif% %ifreason reject% perché un moderatore lo ha rifiutato. %endif% %ifreason subonlypost% perché non sei iscritto/a alla lista. %ifcontrol closedlist closedlistsub% %^%%wrap%Se desideri iscriverti, devi contattare l'amministratore della lista. Puoi scrivere a <$list+$owner@$domain$> per contattarlo. %endif% %^%%wrap%Se sai di essere iscritto/a, probabilmente lo sei con un indirizzo di posta diverso. Per vedere con quale indirizzo ti sei iscritto/a, fai riferimento al messaggio di benvenuto ricevuto dalla lista, o controlla l'intestazione "Return-Path" di un messaggio ricevuto dalla lista. %endif% %ifreason maxmailsize% %^%(L'inizio del messaggio rifiutato è riportato sotto.) %else% %^%(Il messaggio rifiutato è riportato sotto.) %endif% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %ifreason maxmailsize% %^%%originalmail 300% %else% %^%%originalmail% %endif% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/it/digest000644 000765 000120 00000000236 11734220454 016632 0ustar00benadmin000000 000000 Subject: Digest di $list$@$domain$ emissione $digestissue$ ($digestinterval$) Argomenti (messaggi $digestfirst$ attraverso $digestlast$): - %digestthreads% mlmmj-1.2.18.0/listtexts/it/faq000644 000765 000120 00000000150 11734220454 016115 0ustar00benadmin000000 000000 Subject: Domande ricorrenti (FAQ) di $list$@$domain$ Ci dispiace, le FAQ non sono ancora disponibili. mlmmj-1.2.18.0/listtexts/it/finish000644 000765 000120 00000002513 11746152500 016632 0ustar00benadmin000000 000000 %ifaction unsub%Subject: Arrivederci da $list$@$domain$%endif% %ifaction release reject%Subject: $list$@$domain$ moderata: $subject$%endif% %ifaction permit obstruct%Subject: $list$@$domain$ controllata: $subaddr$%endif% %ifaction post%Subject: Inviato a $list$@$domain$: $subject$%endif% %text prologue% %ifaction unsub% %^%%wrap% %ifreason request% %endif% %ifreason confirm% Grazie per aver confermato la rimozione della tua iscrizione. %endif% %ifreason admin% Un amministratore ti ha rimosso dalla lista. %else% Ora sei stato/a rimosso/a dalla lista. %endif% %endif% %ifaction release% %^%%wrap%Hai rilasciato correttamente il messaggio alla lista da <$posteraddr$> con oggetto "$subject$". %endif% %ifaction reject% %^%%wrap%Hai rifiutato correttamente il messaggio da <$posteraddr$> con oggetto "$subject$". %endif% %ifaction permit% %^%%wrap%Hai permesso correttamente a <$subaddr$> di unirsi alla lista. %endif% %ifaction obstruct% %^%%wrap%Hai bloccato correttamente l'ingresso alla lista di <$subaddr$>. %endif% %ifaction post% %^%%wrap% %ifreason confirm% Grazie per la conferma %endif% %ifreason release% Un moderatore ha rilasciato %endif% %ifreason request% Grazie per %endif% il tuo messaggio con oggetto "$subject$". Ora verrà distribuito alla lista. %endif% mlmmj-1.2.18.0/listtexts/it/finish-sub000644 000765 000120 00000002341 11734220454 017421 0ustar00benadmin000000 000000 Subject: Benvenuto/a in $list$@$domain$ %text prologue% %wrap% %ifreason request% Grazie per esserti unito/a a noi. %endif% %ifreason confirm% Grazie per aver confermato la tua iscrizione. %endif% %ifreason permit% Un controllore ti ha permesso di unirti a noi. %endif% %ifreason switch% La tua iscrizione è stata cambiata nella versione %else% %ifreason admin% Un amministratore ti ha iscritto alla versione %else% Sei stato/a ora aggiunto/a alla versione %endif% %endif% %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% della lista. %wrap%L'indirizzo di posta elettronica con cui ti sei iscritto/a è <$subaddr$>. %ifcontrol closedlist% %^%%wrap%Se desideri ancora rimuovere l'iscrizione, dovrai contattare un amministratore della lista. Invia un messaggio a <$list+$owner@$domain$> per contattarlo. %else% %^%%wrap%Se desideri ancora rimuovere l'iscrizione, invia un messaggio a <$list+$unsubscribe@$domain$> usando questo indirizzo di posta. L'oggetto e il corpo del messaggio possono essere vuoti. Riceverai una conferma o ulteriori istruzioni. %endif% %wrap%Per ulteriori informazioni e aiuto su questa lista, invia un messaggio a <$list+$help@$domain$>. mlmmj-1.2.18.0/listtexts/it/gatekeep-sub000644 000765 000120 00000001126 11734220454 017726 0ustar00benadmin000000 000000 Subject: Richiesta di iscrizione per $list$@$domain$: $subaddr$ %text prologue% %wrap%C'è stata una richiesta da parte di <$subaddr$> per unirsi alla versione %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% della lista. %wrap%Per completare la procedura, invia un messaggio a <$permitaddr$>, che viene in genere fatto semplicemente rispondendo a questo messaggio. %wrap%Per annullare la procedura, invia un messaggio a <$obstructaddr$> oppure ignora questo messaggio. Questo messaggio è stato ricevuto dai seguenti controllori: - %gatekeepers% mlmmj-1.2.18.0/listtexts/it/help000644 000765 000120 00000005720 11734220454 016306 0ustar00benadmin000000 000000 Subject: Istruzioni per $list$@$domain$ %text prologue% Di seguito, alcune informazioni sulla lista. Puoi iscriverti alle seguenti versioni: - %wrap%Versione normal: ogni volta che un messaggio viene inviato alla lista, gli iscritti ne ricevono una copia. %ifcontrol closedlist closedlistsub% Iscriviti contattando un amministratore della lista. %else% Iscriviti inviando una e-mail a <$list+$subscribe@$domain$>. %endif% %ifncontrol nodigestsub% %^%- %wrap%Versione digest: gli iscritti ricevono più messaggi in un unico messaggio, a intervalli regolari o quando si sono accumulati molti messaggi. %ifcontrol closedlist closedlistsub% Iscriviti contattando un amministratore della lista. %else% Iscriviti inviando una e-mail a <$list+$subscribe-digest@$domain$>. %endif% %endif% %ifncontrol nonomailsub% %^%- %wrap%Versione no-mail: gli iscritti non ricevono alcun messaggio diretto alla lista. Essi sono comunque in grado di inviare messaggi alla lista, a cui è consentito ricevere messaggi solo dagli iscritti, mentre possono seguire la lista tramite un archivio web o un altro indirizzo di posta elettronica col quale sono iscritti. %ifcontrol closedlist closedlistsub% Iscriviti contattando un amministratore della lista. %else% Iscriviti inviando una e-mail a <$list+$subscribe-nomail@$domain$>. %endif% %endif% %ifcontrol submod% %^%%wrap%La lista ha controllori (gatekeeper) che verificano le richieste di iscrizione prima di consentire l'ingresso di nuovi membri. %endif% %ifcontrol closedlist% %^%%wrap%Rimuovi l'iscrizione contattando un amministratore della lista. %else% %^%%wrap%Rimuovi l'iscrizione inviando una e-mail a <$list+$unsubscribe@$domain$>. %endif% %wrap%I messaggi alla lista vanno inviati tramite e-mail a <$list$@$domain$>. %ifcontrol subonlypost%%ifncontrol modnonsubposts% %^%%wrap%Solo gli iscritti, tuttavia, possono inviare messaggi alla lista. %endif%%endif% %ifcontrol moderated% %^%%wrap%La lista ha moderatori che controllano previamente tutti i messaggi diretti alla lista. %else% %ifcontrol subonlypost%%ifcontrol modnonsubposts% %^%%wrap%La lista ha moderatori che controllano previamente i messaggi diretti alla lista inviati da non iscritti. %endif%%endif% %endif% %ifcontrol access% %^%%wrap%La lista possiede anche regole di accesso che possono coinvolgere chi invia e quali messaggi debbano essere moderati. %endif% %ifncontrol noget%%ifncontrol noarchive% %^%%wrap% %ifcontrol subonlyget% Tutti %else% Gli iscritti %endif% possono ricevere un numero di messaggi N dall'archivio della lista, inviando un messaggio a <$list+$get-N@$domain$> (cambiare la lettera N nel numero di messaggi che si desidera ricevere). %endif%%endif% %^%%wrap%Per ottenere il documento delle domande ricorrenti (FAQ) relative alla lista, invia un messaggio a <$list+$faq@$domain$>. %^%%wrap%Per contattare il responsabile della lista, invia un messaggio a <$list+$owner@$domain$>. mlmmj-1.2.18.0/listtexts/it/list000644 000765 000120 00000000663 11734220454 016332 0ustar00benadmin000000 000000 Subject: Iscritti a $list$@$domain$ %text prologue% %wrap%Di seguito l'elenco degli iscritti %iftype all% (a tutte le versioni della lista): %else% alla versione %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% della lista: %endif% %iftype all normal% %^%- %listsubs% %endif% %iftype all digest% %^%- %digestsubs% %endif% %iftype all nomail% %^%- %nomailsubs% %endif% mlmmj-1.2.18.0/listtexts/it/moderate-post000644 000765 000120 00000002215 11734220454 020135 0ustar00benadmin000000 000000 Subject: Moderazione di $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%È stato inviato un messaggio da <$posteraddr$> con oggetto "$subject$". Ti è stato richiesto di moderarlo %ifreason modnonsubposts% perché il/la richiedente non è un/a iscritto/a. %endif% %ifreason moderated% perché questa è una lista moderata. %endif% %ifreason access% a causa di una regola di accesso. %endif% Il messaggio è riportato sotto. %wrap%Per rilasciarlo alla lista, invia un messaggio a <$releaseaddr$>, che in genere si esegue semplicemente rispondendo al questo messaggio. %wrap%Se non vuoi eseguire nulla di tutto ciò, invia un messaggio a <$rejectaddr$> oppure ignora questo messaggio. Questo messaggio è stato ricevuto dai seguenti moderatori: - %moderators% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/it/notify000644 000765 000120 00000002202 11734220454 016656 0ustar00benadmin000000 000000 %ifaction sub%Subject: Iscrizione a $list$@$domain$: $subaddr$%endif% %ifaction unsub%Subject: Rimozione iscrizione da $list$@$domain$: $subaddr$%endif% %text prologue% %ifaction sub% %^%%wrap%L'indirizzo <$subaddr$> è stato iscritto alla versione %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% della lista %ifreason request% perché è stata ricevuta una richiesta di iscrizione. %endif% %ifreason confirm% perché è stata confermata una richiesta di iscrizione. %endif% %ifreason admin% dietro ordine impartito da un amministratore. %endif% %ifreason permit% perché lo ha permesso un controllore. %endif% %endif% %ifaction unsub% %^%%wrap%L'indirizzo <$subaddr$> è stato rimosso della lista %ifreason request% perché è stata ricevuta una richiesta di rimozione. %endif% %ifreason confirm% perché è stata confermata una richiesta di rimozione. %endif% %ifreason admin% dietro ordine impartito da un amministratore. %endif% %ifreason bouncing% perché i messaggi sono tornati indietro per troppo tempo. %endif% %endif% mlmmj-1.2.18.0/listtexts/it/probe000644 000765 000120 00000000473 11734220454 016465 0ustar00benadmin000000 000000 Subject: Messaggi in restituzione (bouncing) da $list$@$domain$ %text prologue% Alcuni messaggi a te indirizzati potrebbero non esserti stati consegnati. Questo messaggio è a puro scopo informativo, dato che le cose sono tornate alla normalità. Di seguito, l'elenco dei messaggi restituiti: - %bouncenumbers% mlmmj-1.2.18.0/listtexts/it/prologue000644 000765 000120 00000000131 11734220454 017201 0ustar00benadmin000000 000000 %wrap%Ciao, questo è il programma Mlmmj che gestisce la mailing list <$list$@$domain$>. mlmmj-1.2.18.0/listtexts/it/wait-post000644 000765 000120 00000001553 11734220454 017305 0ustar00benadmin000000 000000 Subject: In attesa di rilascio a $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Il messaggio da <$posteraddr$> con oggetto "$subject$" è stato inviato alla lista. Tuttavia, ai moderatori è stato richiesto di controllarlo prima di rilasciarlo, %ifreason moderated% perché questa è una lista moderata. %endif% %ifreason access% a causa di una regola di accesso. %endif% %ifreason modnonsubposts% perché non sei iscritto/a. %endif% (Il messaggio è riportato sotto.) --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/it/wait-sub000644 000765 000120 00000000376 11734220454 017113 0ustar00benadmin000000 000000 Subject: In attesa di permesso per l'ammissione a $list$@$domain$ %text prologue% %wrap%La tua richiesta di iscrizione alla lista è stata ricevuta. Tuttavia, la tua richiesta di ammissione è stata prima sottoposta al controllo degli amministratori. mlmmj-1.2.18.0/listtexts/gr/confirm000644 000765 000120 00000006165 11734220454 017013 0ustar00benadmin000000 000000 %ifaction sub%Subject: Επιβεβαίωση εγγÏαφής στη $list$@$domain$%endif% %ifaction unsub%Subject: Επιβεβαίωση διαγÏαφής από τη $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap% %ifreason admin% Ένας από τους διαχειÏιστές %endif% %ifreason request% Κάποιος (και ελπίζουμε πως είστε εσείς) %endif% ζήτησε την καταχώÏηση της email διεÏθυνσης <$subaddr$> %iftype normal% στους παÏαλήπτες των μηνυμάτων αυτής της λίστας ταχυδÏομείου. Αυτό σημαίνει πως κάθε μήνυμα που θα δημοσιεÏεται στη λίστα, θα αποστέλλεται με email και στη δική σας διεÏθυνση. %endif% %iftype digest% στους παÏαλήπτες των συγκεντÏωτικών ενημεÏώσεων της λίστας ταχυδÏομείου. Αυτό σημαίνει πως ανά τακτά χÏονικά διαστήματα, θα παÏαλαμβάνετε ένα συγκεντÏωτικό μήνυμα με τα τελευταία μηνÏματα που δημοσιεÏτηκαν στη λίστα αυτή. %endif% %iftype nomail% στους συνδÏομητές της λίστας ταχυδÏομείου, χωÏίς ενημέÏωσή σας για τα μηνÏματα των άλλων χÏηστών. (no-mail subscription). Η ιδιαιτεÏότητα αυτής της κατηγοÏίας συνδÏομητών είναι πως έχετε τη δυνατότητα να χÏησιμοποιείτε αυτήν την ηλεκτÏονική διεÏθυνση για να δημοσιεÏετε κάποιο μήνυμα στη λίστα, χÏησιμοποιώντας ενδεχομένως κάποια άλλη ηλεκτÏονική διεÏθυνση για να παÏακολουθείτε τα μηνÏματα των άλλων μελών ή ακόμα παÏακολουθώντας τα νέα μηνÏματα από το αÏχείο της λίστας (web archive). %endif% %endif% %ifaction unsub% %^%%wrap% %ifreason admin% Ένας από τους διαχειÏιστές %endif% %ifreason request% Κάποιος (και ελπίζουμε πως είστε εσείς) %endif% κατέθεσε αίτημα για τη διαγÏαφή της email διεÏθυνσης <$subaddr$> από τη λίστα ταχυδÏομείου. %endif% %wrap%Για να επιβεβαιώσετε το παÏαπάνω αίτημα απλά απαντήστε στέλνοντας email στο <$confaddr$> γÏάφοντας οτιδήποτε στο θέμα. Αν όλα πάνε καλά, θα σας αποσταλεί μήνυμα επιβεβαίωσης. Αν το αÏχικό αίτημα Ï€Ïαγματοποιήθηκε κατά λάθος ή δεν Ï€Ïαγματοποιήθηκε από εσάς, τότε απλά αγνοήστε τις παÏαπάνω οδηγίες! mlmmj-1.2.18.0/listtexts/gr/deny000644 000765 000120 00000007343 11734220454 016314 0ustar00benadmin000000 000000 %ifaction sub%Subject: Αδυναμία εγγÏαφής στη $list$@$domain$%endif% %ifaction unsub%Subject: Αδυναμία διαγÏαφής από $list$@$domain$%endif% %ifaction release reject%Subject: Αδυναμία διαχείÏισης της $list$@$domain$%endif% %ifaction permit obstruct%Subject: Αδυναμία ελέγχου της $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap%Δεν μποÏέσατε να εγγÏαφείτε σε αυτην τη λίστα ταχυδÏομείου %ifreason disabled% καθώς %iftype normal% η κανονική συνδÏομή %endif% %iftype digest% η συνδÏομή με λήψη συγκεντÏωτικών μηνυμάτων %endif% %iftype nomail% η συνδÏομή χωÏίς λήψη μηνυμάτων %endif% δεν είναι ενεÏγοποιημένη. %endif% %ifreason closed% καθώς η λίστα αυτή δεν δέχεται εγγÏαφές με χÏήση email. %endif% %ifreason subbed% γιατί είστε ήδη εγγεγÏαμμένος/η. %endif% %ifreason expired% και ο λόγος είναι πως για μεγάλο χÏονικό διάστημα η αίτηση σας δεν διεκπεÏαιώθηκε από κάποιον διαχειÏιστή. %endif% %ifreason obstruct% και ο λόγος είναι πως κάποιος από τους διαχειÏιστές εμπόδισε την αποδοχή της αίτησής σας. %endif% %endif% %ifaction unsub% %^%%wrap% Δεν μποÏέσατε να διαγÏαφείτε από αυτήν τη λίστα ταχυδÏομείου %ifreason unsubbed% καθώς δεν είστε μέλος. %^%%wrap%Αν λαμβάνετε μηνÏματα, ενδεχομένως αυτό συμβαίνει γιατί έχετε εγγÏαφεί χÏησιμοποιώντας κάποιον άλλο λογαÏιασμό email. Για να εντοπίσετε το λογσÏιασμό με τον οποίο έχετε εγγÏαφει, αναζητήστε το Ï€Ïώτο μήνυμα καλωσοÏίσματος που παÏαλάβατε με την εγγÏαφή σας. %endif% %endif% %ifaction release reject% %^%%wrap% %ifaction release% Δεν έγινε εφικτή η αποδοχή του μηνÏματος στη λίστα ταχυδÏομείου %endif% %ifaction reject% Δεν έγινε εφικτή η απόÏÏιψη του μηνÏματος %endif% %ifreason notfound% και ο λόγος είναι πως αυτό δεν βÏέθηκε. Ενδεχομένως, η ανάÏτηση να είναι παÏωχημένη, ή ακόμα κάποιος άλλος διαχειÏιστής να το έχει ήδη διεκπεÏαιώσει. %endif% %ifreason moderators% καθώς δεν έχετε δικαιώματα διαχειÏιστή. %endif% %endif% %ifaction permit obstruct% %^%%wrap% %ifaction permit% Δεν έχετε δικαίωμα έγκÏισης του αιτήματος εγγÏαφής στη λίστα %endif% %ifaction obstruct% Δεν μποÏείτε να εμποδίσετε το αίτημα εγγÏαφής στη λίστα %endif% %ifreason notfound% καθώς δεν βÏέθηκε σχετικό αίτημα. Ενδεχομένως το αίτημα να είναι παÏωχημένο ή κάποιος άλλος διαχειÏιστής να έχει ήδη διεκπεÏαιώσει το αίτημα αυτό. %endif% %ifreason gatekeepers% καθώς δεν είστε διαχειÏιστής για αυτήν την λίστα. %endif% %endif% mlmmj-1.2.18.0/listtexts/gr/deny-post000644 000765 000120 00000005444 11734220454 017277 0ustar00benadmin000000 000000 Subject: Το μήνυμα με θέμα $subject$ αποÏÏίφθηκε απο τη $list$@$domain$: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Το μήνυμα με διεÏθυνση αποστολέα <$posteraddr$> και θέμα "$subject$" δεν παÏαλήφθηκε από τη λίστα ταχυδÏομείου %ifreason maxmailsize% καθώς ξεπεÏνά το μέγιστο επιτÏεπτό μέγεθος των $maxmailsize$ bytes. %endif% %ifreason tocc% καθώς η διεÏθυνση της λίστας ταχυδÏομείου δεν βÏέθηκε στα πεδία To: ή CC:. %endif% %ifreason access% λόγω ενός πεÏιοÏÎ¹ÏƒÎ¼Î¿Ï Ï€Ïόσβασης που έχει επιβληθεί από τον/τους διαχειÏιστές της λίστας. %endif% %ifreason expired% καθώς έχει παÏέλθει μεγάλο χÏονικό διάστημα χωÏίς κάποιος διαχειÏιστής να το έχει διεκπεÏαιώσει. %endif% %ifreason reject% καθώς κάποιος από τους διαχειÏιστές της λίστας το απέÏÏιψε. %endif% %ifreason subonlypost% καθώς δεν είστε εγγεγÏαμμένος στη λίστα. %ifcontrol closedlist closedlistsub% %^%%wrap%Αν επιθυμείτε να εγγÏαφείτε στη λίστα ταχυδÏομείου, αÏκεί να ενημεÏώσετε κάποιον απο τους διαχειÏιστές της, στέλλοντας email στη διεÏθυνση <$list+$owner@$domain$>. %endif% %^%%wrap%Αν νομίζετε πως είστε ήδη εγγεγÏαμμένος τότε επιβεβαιώστε πως αποστείλατε το αÏχικό μήνυμά σας από τη διεÏθυνση που είχατε χÏησιμοποιήσει για την εγγÏαφή σας. Για την επιβεβαίωση της διεÏθυνσης Θα σας βοηθήσει αν αναζητήσετε το αÏχικό μήνυμα καλωσοÏίσματος στη λίστα ταχυδÏομείου. %endif% %ifreason maxmailsize% %^%(ΠαÏακάτω ακολουθεί ένα μέÏος από το μήνυμα που αποÏÏίφθηκε) %else% %^%(ΠαÏακάτω ακολουθεί το μήνυμα που αποÏÏίφθηκε) %endif% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %ifreason maxmailsize% %^%%originalmail 300% %else% %^%%originalmail% %endif% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/gr/digest000644 000765 000120 00000000400 11734220454 016617 0ustar00benadmin000000 000000 Subject: ΣυγκεντÏωτική ενημέÏωση της λίστας ταχυδÏομείου $list$@$domain$ τεÏχος $digestissue$ ($digestinterval$) Θέματα (μηνÏματα από $digestfirst$ έως $digestlast$): - %digestthreads% mlmmj-1.2.18.0/listtexts/gr/faq000644 000765 000120 00000000300 11734220454 016106 0ustar00benadmin000000 000000 Subject: Συχνές εÏωτήσεις σχετικές με τη $list$@$domain$ Δυστυχώς, οι συχνές εÏωτήσεις δεν είναι ακόμα διαθέσιμες. mlmmj-1.2.18.0/listtexts/gr/finish000644 000765 000120 00000004435 11734220454 016634 0ustar00benadmin000000 000000 %ifaction unsub%Subject: ΑποχαιÏετισμός από τη $list$@$domain$%endif% %ifaction release reject%Subject: ΔιαχείÏιση $list$@$domain$: $subject$%endif% %ifaction permit obstruct%Subject: ΠÏοστασία $list$@$domain$: $subaddr$%endif% %ifaction post%Subject: Εμφάνιση μÏνηματος στη $list$@$domain$: $subject$%endif% %text prologue% %ifaction unsub% %^%%wrap% %ifreason request% %endif% %ifreason confirm% ΕυχαÏιστοÏμε για την επιβεβαίωση της διαγÏαφής σας από τη λίστα ταχυδÏομείου. %endif% %ifreason admin% Ένας από τους διαχειÏιστές σας διέγÏαψε από τους παÏαλήπτες τη λίστα ταχυδÏομείου. %else% Έχετε επιτυχώς διαγÏάφει από τους παÏαλήπτες της λίστας ταχυδÏομείου. %endif% %endif% %ifaction release% %^%%wrap%Η ανάÏτηση του μηνÏματος που υποβλήθηκε από τη <$posteraddr$> με θέμα "$subject$" έχει επιτυχώς διεκπεÏαιωθεί. %endif% %ifaction reject% %^%%wrap%Η απόÏÏιψη του μηνÏματος που υποβλήθηκε από τη <$posteraddr$> με θέμα "$subject$" έχει ολοκληÏωθεί. %endif% %ifaction permit% %^%%wrap%Η αποδοχή της αίτησης του/της <$subaddr$> για συμμετοχή στη λίστα ταχυδÏομείου Ï€Ïαγματοποιήθηκε επιτυχώς. %endif% %ifaction obstruct% %^%%wrap%Έχετε επιτυχώς εμποδίσει την αίτηση του <$subaddr$> για συμμετοχή στη λίστα ταχυδÏομείου. %endif% %ifaction post% %^%%wrap% %ifreason confirm% ΕυχαÏιστοÏμε για την επιβεβαίωση του μηνÏματος %endif% %ifreason release% Ένας από τους διαχειÏιστές αποδέχθηκε το μήνυμα %endif% %ifreason request% ΕυχαÏιστοÏμε για το μήνυμα %endif% με θέμα "$subject$" το οποίο έχει γίνει ήδη διαθέσιμο στα υπόλοιπα μέλη της λίστας. %endif% mlmmj-1.2.18.0/listtexts/gr/finish-sub000644 000765 000120 00000004550 11734220454 017421 0ustar00benadmin000000 000000 Subject: ΚαλωσοÏίσατε στη $list$@$domain$ %text prologue% %wrap% %ifreason request% ΕυχαÏιστοÏμε για την επιλογή σας να γίνετε μέλος στη λίστα μας. %endif% %ifreason confirm% ΕυχαÏιστοÏμε για την επιβεβαίωση της εγγÏαφής σας. %endif% %ifreason permit% Η αίτησή σας για εγγÏαφή στη λίστα έγινε αποδεκτή από τους διαχειÏιστές της. %endif% %ifreason switch% Η εγγÏαφή σας άλλαξε σε %else% %ifreason admin% Έχετε εγγÏαφεί από κάποιον διαχειÏιστή ως %else% Έχετε εγγÏαφεί ως %endif% %endif% %iftype normal% κανονικό μέλος (δυνατότητα αποστολής μηνυμάτων και λήψη όλων των μηνυμάτων, μεμονωμένα). %endif% %iftype digest% μέλος με λήψη συνοπτικών πεÏιλήψεων των νέων μηνυμάτων. %endif% %iftype nomail% μέλος χωÏίς λήψη των μηνυμάτων άλλων χÏηστών (no-mail subscription). %endif% %wrap%Η διεÏθυνση email με την οποία έχετε εγγÏαφεί είναι η <$subaddr$>. %ifcontrol closedlist% %^%%wrap%Για διαγÏαφή από τη λίστα αÏκεί να ενημεÏώσετε κάποιον από τους διαχειÏιστές της λίστας. Για επικοινωνία με τον ιδιοκτήτη της λίστας αÏκεί ένα μήνυμα στη <$list+$owner@$domain$>. %else% %^%%wrap%Για τη διαγÏαφή σας από τη λίστα αÏκεί να στείλετε ένα μήνυμα στη <$list+$unsubscribe@$domain$>. Το θέμα και το πεÏιεχόμενο του μηνÏματος μποÏεί να είναι οτιδήποτε, φυσικά μποÏεί να είναι και κενό! Μετά τη αποστολή του μηνÏματος θα λάβετε επιβεβαίωση ή πεÏαιτέÏω οδηγίες. %endif% %wrap%Για πεÏισσότεÏες πληÏοφοÏίες και γενικότεÏη βοήθεια σχετικά με τη λίστα αυτή, αÏκεί να στείλετε ένα μήνυμα στο <$list+$help@$domain$>. mlmmj-1.2.18.0/listtexts/gr/gatekeep-sub000644 000765 000120 00000002161 11734220454 017722 0ustar00benadmin000000 000000 Subject: Αίτηση εγγÏαφής στη λίστα ταχυδÏομείου $list$@$domain$: $subaddr$ %text prologue% %wrap%ΠαÏαλάβαμε αίτημα από τη διεÏθυνση <$subaddr$> για %iftype normal% κανονική εγγÏαφή %endif% %iftype digest% εγγÏαφή με λήψη συγκεντÏωτικών πεÏιλήψεων των νέων μηνυμάτων %endif% %iftype nomail% εγγÏαφή χωÏίς λήψη των μηνυμάτων άλλων χÏηστών %endif% στη λίστα αυτή. %wrap%Για να αποδεχθείτε την αίτηση αυτή, αÏκεί να στείλετε ένα μήνυμα στην <$permitaddr$>. Λογικά αυτό θα συμβεί επιλέγοντας "Απάντηση" στο μήνυμα αυτό. %wrap%Αν δεν επιθυμείτε κάτι τέτοιο τότε στείλτε ένα μήνυμα στη διεÏθυνση <$obstructaddr$> ή απλά αγνοήστε το παÏόν μήνυμα. Το μήνυμα αυτό απεστάλη στους παÏακάτω διαχειÏιστές: - %gatekeepers% mlmmj-1.2.18.0/listtexts/gr/help000644 000765 000120 00000011711 11734220454 016277 0ustar00benadmin000000 000000 Subject: ΠληÏοφοÏίες για τη λίστα $list$@$domain$ %text prologue% ΠαÏακάτω ακολουθοÏν χÏήσιμες πληÏοφοÏίες για αυτήν τη λίστα ταχυδÏομείου. ΤÏόποι εγγÏαφής στη λίστα : - %wrap%Κανονικό μέλος\ : Λήψη αντιγÏάφου από όλα τα μηνÏματα που δημοσιεÏονται στη λίστα. %ifcontrol closedlist closedlistsub% Η εγγÏαφή είναι δυνατή ÏστεÏα από επικοινωνία με κάποιον από τους διαχειÏιστές της λίστας. %else% Για την εγγÏαφή στη λίστα αÏκεί η αποστολή ενός email στη διεÏθυνση <$list+$subscribe@$domain$>. %endif% %ifncontrol nodigestsub% %^%- %wrap%Μέλος που λαμβάνει συγκεντÏωτικές αναφοÏές\ : Λήψη των νέων μηνυμάτων σε ένα συγκεντÏωτικό μήνυμα που αποστέλλεται σε κανονικά διαστήματα ή όταν συσσωÏεÏονται πολλά νέα μηνÏματα. %ifcontrol closedlist closedlistsub% Η εγγÏαφή είναι δυνατή ÏστεÏα από επικοινωνία με κάποιον από τους διαχειÏιστές της λίστας. %else% Για την εγγÏαφή στη λίστα αÏκεί η αποστολή email στη διεÏθυνση <$list+$subscribe-digest@$domain$>. %endif% %endif% %ifncontrol nonomailsub% %^%- %wrap%Μέλος χωÏίς ενημέÏωση για τα νέα μηνÏματα\ : Μη λήψη των νέων μηνυμάτων, με παÏάλληλη δυνατότητα αποστολής και ανάÏτησης ενός μηνÏματος. Η παÏακολοÏθηση της λίστας μποÏεί να γίνει είτε μέσω του αÏχείου της λίστας είτε μέσω κάποιας άλλης εγγεγÏαμμένης διεÏθυνσης email. %ifcontrol closedlist closedlistsub% ΕγγÏαφή με επικοινωνία με κάποιον από τους διαχειÏιστές της λίστας. %else% Για την εγγÏαφή στη λίστα αÏκεί η αποστολή email στη διεÏθυνση <$list+$subscribe-nomail@$domain$>. %endif% %endif% %ifcontrol submod% %^%%wrap%Οι διαχειÏιστές της λίστας επιβλέπουν και εγκÏίνουν τις αιτήσεις εγγÏαφής σε αυτήν. %endif% %ifcontrol closedlist% %^%%wrap%Για τη διαγÏαφή από τη λίστα ταχυδÏομείου αÏκεί η αποστολή ÏƒÏ‡ÎµÏ„Î¹ÎºÎ¿Ï Î¼Î·Î½Ïματος σε κάποιον από τους διαχειÏιστές της. %else% %^%%wrap%Για τη διαγÏαφή αÏκεί η αποστολή email στο <$list+$unsubscribe@$domain$>. %endif% %wrap%Για τη δημοσίευση ενός μηνÏματος αÏκεί η αποστολή του στο <$list$@$domain$>. %ifcontrol subonlypost%%ifncontrol modnonsubposts% %^%%wrap%Ωστόσο, μόνο εγγεγÏαμμένα μέλη έχουν δυνατότητα δημοσίευσης μηνυμάτων στη λίστα. %endif%%endif% %ifcontrol moderated% %^%%wrap%Οι διαχειÏιστές της λίστας επιβλέπουν και εγκÏίνουν όλες τα μηνÏματα που αποστέλλονται σε αυτήν. %else% %ifcontrol subonlypost%%ifcontrol modnonsubposts% %^%%wrap%Οι διαχειÏιστές της λίστας ταχυδÏομείου επιβλέπουν (και εγκÏίνουν ή αποÏÏίπτουν) τα μηνÏματα από μη μέλη της λίστας. %endif%%endif% %endif% %ifcontrol access% %^%%wrap%Οι κανόνες λειτουÏγίας της λίστας ταχυδÏομείου καθοÏίζουν τα μηνÏματα που ανακοινώνονται χωÏίς έλεγχο και όσα Ï€Ïέπει να ελεγχθοÏν Ï€Ïιν τη δημοσίευσή τους. %endif% %ifncontrol noget%%ifncontrol noarchive% %^%%wrap% %ifcontrol subonlyget% Ο κάθε ένας %else% Κάθε εγγεγÏαμμένος χÏήστης %endif% μποÏεί να αναζητήσει το μήνυμα που βÏίσκεται στη θέση N στο αÏχείο της λίστας, στέλνοντας ένα μήνυμα στη διεÏθυνση <$list+$get-N@$domain$> (όπου N θα μπει η θέση του μυνήματος). %endif%%endif% %wrap%Για να δείτε τις συχνές εÏωτήσεις αÏκεί η αποστολή ενός μηνÏματος στο <$list+$faq@$domain$>. %wrap%Για επικοινωνία με τον ιδιοκτήτη της λίστας αÏκεί ένα email στο <$list+$owner@$domain$>. mlmmj-1.2.18.0/listtexts/gr/list000644 000765 000120 00000001302 11734220454 016315 0ustar00benadmin000000 000000 Subject: ΕγγεγÏαμμένα μέλη στη λίστα ταχυδÏομείου $list$@$domain$ %text prologue% %wrap%Μέλη της λίστας ταχυδÏομείου %iftype all% (σε όλες τις κατηγοÏίες συμμετοχής): %else% %iftype normal% με κανονική συμμετοχή\ : %endif% %iftype digest% που λαμβάνουν συγκεντÏωτικές ενημεÏώσεις\ : %endif% %iftype nomail% χωÏίς αποστολή ενημεÏώτικών email (no-mail subscription): %endif% %endif% %iftype all normal% %^%- %listsubs% %endif% %iftype all digest% %^%- %digestsubs% %endif% %iftype all nomail% %^%- %nomailsubs% %endif% mlmmj-1.2.18.0/listtexts/gr/moderate-post000644 000765 000120 00000003204 11734220454 020130 0ustar00benadmin000000 000000 Subject: ΠαÏακαλώ διαχειÏιστείτε $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Το μήνυμα με αποστολέα <$posteraddr$> και θέμα "$subject$" Ï€Ïέπει να ελεγχθεί Ï€Ïιν τη δημοσίευσή του %ifreason modnonsubposts% καθώς ο αποστολέας του μηνÏματος δεν είναι εγγεγÏαμμένος στη λίστα. %endif% %ifreason moderated% καθώς αυτή είναι μία λίστα με ελεγχόμενη δημοσίευση. %endif% %ifreason access% καθώς αυτό επιβάλλεται από τις Ïυθμίσεις ασφαλείας. %endif% Ακολουθεί το μήνυμα. %wrap%Για να αποδεχθείτε το μήνυμα αυτό, αÏκεί η αποστολή ενός μηνÏματος στη διεÏθυνση <$releaseaddr$>, επιλέγοντας "Απάντηση". %wrap%Αν δεν επιθυμείτε να κάνετε τίποτα από τα παÏαπάνω τότε στείλτε ένα μήνυμα στο <$rejectaddr$> ή απλά αγνοήστε το μήνυμα αυτό. Το μήνυμα αυτό απεστάλη στους παÏακάτω διαχειÏιστές : - %moderators% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/gr/notify000644 000765 000120 00000003332 11734220454 016657 0ustar00benadmin000000 000000 %ifaction sub%Subject: ΕγγÏαφή στη λίστα $list$@$domain$: $subaddr$%endif% %ifaction unsub%Subject: ΔιαγÏαφή από τη λίστα $list$@$domain$: $subaddr$%endif% %text prologue% %ifaction sub% %^%%wrap%Η διεÏθυνση <$subaddr$> χÏησιμοποιήθηκε για εγγÏαφή %iftype normal% ÎºÎ±Î½Î¿Î½Î¹ÎºÎ¿Ï Î¼Î­Î»Î¿Ï‚ %endif% %iftype digest% μέλους με συγκεντÏωτική ενημέÏωση %endif% %iftype nomail% μέλους χωÏίς ενημέÏωση %endif% στη λίστα %ifreason request% ÏστεÏα από ανάλογη αίτηση που παÏαλάβαμε. %endif% %ifreason confirm% ÏστεÏα από ανάλογη αίτηση που επιβεβαιώθηκε. %endif% %ifreason admin% ÏστεÏα απο αίτημα ενός από τους διαχειÏιστές. %endif% %ifreason permit% ÏστεÏα από άδεια ενός από τους διαχειÏιστές. %endif% %endif% %ifaction unsub% %^%%wrap%Η διεÏθυνση <$subaddr$> διαγÏάφηκε από τους παÏαλήπτες της λίστας ταχυδÏομείου %ifreason request% ÏστεÏα από ανάλογη αίτηση διαγÏαφής που παÏαλάβαμε. %endif% %ifreason confirm% ÏστεÏα από ανάλογη αίτηση διαγÏαφής που επιβεβαιώθηκε. %endif% %ifreason admin% ÏστεÏα απο αίτημα ενός από τους διαχειÏιστές. %endif% %ifreason bouncing% καθώς εκκÏεμοÏσε το αίτημα χωÏίς αποδοχή για μεγάλο χÏονικό διάστημα. %endif% %endif% mlmmj-1.2.18.0/listtexts/gr/probe000644 000765 000120 00000001206 11734220454 016454 0ustar00benadmin000000 000000 Subject: ΜηνÏματα με καθυστέÏηση ή αδυναμία παÏάδοσης στη λίστα ταχυδÏομείου $list$@$domain$ %text prologue% Κάποια μηνÏματα σας δεν παÏαδόθηκαν επιτυχώς. Αν διαβάζετε αυτές τις γÏαμμές, τότε το Ï€Ïόβλημα έχει ήδη διοÏθωθεί και το μήνυμα αποσκοπεί απλά στην ενημέÏωσή σας. ΠαÏακάτω ακολουθεί ένας κατάλογος με τα μηνÏματα που καθυστέÏησαν ή δεν παÏαδόθηκαν. - %bouncenumbers% mlmmj-1.2.18.0/listtexts/gr/prologue000644 000765 000120 00000000240 11734220454 017176 0ustar00benadmin000000 000000 %wrap%Γειά, αυτό είναι το Mlmmj Ï€ÏόγÏαμμα που διαχειÏίζεται τη λίστα ταχυδÏομείου <$list$@$domain$>. mlmmj-1.2.18.0/listtexts/gr/wait-post000644 000765 000120 00000002373 11734220454 017302 0ustar00benadmin000000 000000 Subject: Μήνυμα που εκκÏεμεί για τη λίστα ταχυδÏομείου $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Ένα μήνυμα με αποστολέα <$posteraddr$> και θέμα "$subject$" έχει υποβληθεί για δημοσίευση στη λίστα. Για να εμφανιστεί Ï€Ïέπει Ï€Ïώτα να διαβαστεί και να επιβεβαιωθεί από κάποιον διαχειÏιστή %ifreason moderated% καθώς αυτή είναι μία ελεγχόμενη λίστα. %endif% %ifreason access% καθώς αυτό επιβάλλεται από τους κανόνες Ï€Ïόσβασης της λίστας. %endif% %ifreason modnonsubposts% καθώς δεν είστε εγγεγÏαμμένος χÏήστης. %endif% (ΠαÏακάτω ακολουθεί το μήνυμα.) --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/gr/wait-sub000644 000765 000120 00000000662 11734220454 017105 0ustar00benadmin000000 000000 Subject: Αναμονή για έγκÏιση της συμμετοχής σας στη λίστα ταχυδÏομείου $list$@$domain$ %text prologue% %wrap%Η αίτησή σας για συμμετοχή στη λίστα ταχυδÏομείου παÏαλήφθηκε. Αναμένεται ο έλεγχος και η αποδοχή ή απόÏÏιψή της από τους διαχειÏιστές της λίστας. mlmmj-1.2.18.0/listtexts/fr/confirm000644 000765 000120 00000003405 11734220454 017004 0ustar00benadmin000000 000000 %ifaction sub%Subject: Confirmer votre abonnement à $list$@$domain$%endif% %ifaction unsub%Subject: Confirmer votre désabonnement de $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap% %ifreason admin% Un administrateur %endif% %ifreason request% Quelqu'un (et nous espérons que c'est vous) %endif% a demandé que votre adresse e-mail <$subaddr$> soit ajoutée %iftype normal% à la liste. Cela signifie que chaque fois qu'un message sera envoyé à la liste, vous en recevrez une copie %endif% %iftype digest% à la liste afin d'en recevoir un résumé. Cela signifie que vous recevrez plusieurs messages dans un seul e-mail, à des intervalles réguliers, ou lorsque beaucoup de messages ont été accumulés. %endif% %iftype nomail% à la liste, sans envoi des e-mails. Cela signifie que vous ne recevrez aucun e-mail envoyé à la liste. Par exemple, vous pouvez envoyer un message à une liste à laquelle seuls les inscrits peuvent poster, alors que vous suivez la liste en utilisant une archive web ou une autre adresse e-mail inscrite. %endif% %endif% %ifaction unsub% %wrap% %ifreason admin% Un administrateur %endif% %ifreason request% Quelqu'un (et nous espérons que c'est vous) %endif% a demandé à ce que l'adresse e-mail <$subaddr$> soit supprimée de la liste. %endif% %wrap%Pour confirmer que vous voulez faire cela, veuillez envoyer un message à <$confaddr$> ce qui peut, habituellement, être fait facilement en répondant à ce message. Le sujet et le corps du message peuvent contenir n'importe quoi. Après cela, vous devriez recevoir un réponse vous informant du succès de l'opération. Si vous ne souhaitez pas faire cela, ignorez simplement ce message. mlmmj-1.2.18.0/listtexts/fr/deny000644 000765 000120 00000004645 11734220454 016315 0ustar00benadmin000000 000000 %ifaction sub%Subject: Abonnement à $list$@$domain$%endif% impossible %ifaction unsub%Subject: Désabonnement de $list$@$domain$%endif% impossible %ifaction release reject%Subject: Impossible de modérer $list$@$domain$%endif% %ifaction permit obstruct%Subject: Impossible d'accepter / refuser $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap%Il n'a pas été possible de vous inscrire à la liste %ifreason disabled% parce que la version %iftype normal% normale %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% de la liste a été désactivée. %endif% %ifreason closed% parce qu'il n'est pas possible de s'inscrire à cette liste par e-mail. %endif% %ifreason subbed% parce que vous êtes déjà inscrit. %endif% %ifreason expired% parce qu'il s'est écoulé trop de temps avant qu'un modérateur autorise votre accès. %endif% %ifreason obstruct% parce qu'un modérateur n'a pas autorisé votre accès. %endif% %endif% %ifaction unsub% %^%%wrap%Il n'a pas été possible de vous désinscrire de la liste %ifreason unsubbed% parce que vous n'êtes pas inscrit. %^%%wrap%Si vous recevez des messages, peut-être qu'une adresse différente est inscrite. Pour connaître l'adresse avec laquelle vous êtes inscrit, référez-vous au message de bienvenue à la liste, ou examinez l'en-tête "Adresse de retour" du message que vous avez reçu de la liste. %endif% %endif% %ifaction release reject% %^%%wrap% %ifaction release% Vous n'avez pu délivrer le message indiqué à la liste %endif% %ifaction reject% Vous n'avez pu rejeter le message spécifié %endif% %ifreason notfound% parce qu'il n'a pu être trouvé. Peut être qu'un autre modérateur l'a déjà délivré ou rejeté ou bien a-t-il expiré. %endif% %ifreason moderators% parce que vous n'êtes pas un modérateur de la liste. %endif% %endif% %ifaction permit obstruct% %^%%wrap% %ifaction permit% Vous n'avez pu autoriser cette demande d'inscription %endif% %ifaction obstruct% Vous n'avez pu rejeter cette demande d'inscription %endif% %ifreason notfound% parce qu'elle n'a pu être trouvée. Peut être qu'un autre modérateur l'a déjà acceptée ou rejetée ou bien a-t-elle expirée. %endif% %ifreason gatekeepers% parce que vous n'êtes pas un modérateur de la liste. %endif% %endif% mlmmj-1.2.18.0/listtexts/fr/deny-post000644 000765 000120 00000003555 11734220454 017277 0ustar00benadmin000000 000000 Subject: Message à $list$@$domain$ refusé : $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Le message de <$posteraddr$> ayant pour sujet "$subject$" n'a pas pu être délivré à la liste %ifreason maxmailsize% parce qu'il dépassait la taille maximale autorisée de $maxmailsize$ octets. %endif% %ifreason tocc% parce que l'adresse de la liste n'a été trouvée ni dans l'entête Pour: ni Copie à:. %endif% %ifreason access% en raison d'une règle d'accès définie par l'administrateur. %endif% %ifreason expired% parce qu'il s'est écoulé trop de temps avant qu'un modérateur ne le délivre. %endif% %ifreason reject% parce qu'un modérateur l'a rejeté. %endif% %ifreason subonlypost% parce que vous n'êtes pas un inscrit de la liste. %ifcontrol closedlist closedlistsub% %^%%wrap%Si vous souhaitez vous inscrire, vous devez contacter un administrateur de la liste. Vous pouvez envoyer un e-mail à <$list+$owner@$domain$> pour contacter le propriétaire de la liste. %endif% %^%%wrap%Si vous pensez être inscrit, vous l'êtes probablement avec une adresse e-mail différente. Pour savoir avec quelle adresse vous êtes inscrit, référez-vous au message de bienvenue à la liste ou examinez l'en-tête "Adresse de retour" du message reçu de la liste. %endif% %ifreason maxmailsize% %^%(Le début du message rejeté est ci-dessous) %else% %^%(Le message rejeté figure ci-dessous.) %endif% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %ifreason maxmailsize% %^%%originalmail 300% %else% %^%%originalmail% %endif% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/fr/digest000644 000765 000120 00000000221 11734220454 016617 0ustar00benadmin000000 000000 Subject: Digest de $list$@$domain$ numéro $digestissue$ ($digestinterval$) Sujets (messages $digestfirst$ de $digestlast$): - %digestthreads% mlmmj-1.2.18.0/listtexts/fr/faq000644 000765 000120 00000000151 11734220454 016111 0ustar00benadmin000000 000000 Subject: Foire aux questions de $list$@$domain$ Désolé, il n'y a pas de FAQ disponible actuellement. mlmmj-1.2.18.0/listtexts/fr/finish000644 000765 000120 00000002537 11746152500 016633 0ustar00benadmin000000 000000 %ifaction unsub%Subject: Au revoir de $list$@$domain$%endif% %ifaction release reject%Subject: $list$@$domain$ modérée : $subject$%endif% %ifaction permit obstruct%Subject: $list$@$domain$ à accès restreint : $subaddr$%endif% %ifaction post%Subject: Envoyé à $list$@$domain$ : $subject$%endif% %text prologue% %ifaction unsub% %^%%wrap% %ifreason request% %endif% %ifreason confirm% Merci d'avoir confirmé votre désinscription. %endif% %ifreason admin% Un administrateur vous a retiré de la liste. %else% Vous avez maintenant été retiré de la liste. %endif% %endif% %ifaction release% %^%%wrap%Vous avez délivré avec succès le message de <$posteraddr$> ayant pour sujet "$subject$" à la liste. %endif% %ifaction reject% %^%%wrap%Vous avez rejeté avec succès le message de <$posteraddr$> ayant pour sujet "$subject$". %endif% %ifaction permit% %^%%wrap%Vous avez permis à <$subaddr$> de rejoindre la liste. %endif% %ifaction obstruct% %^%%wrap%Vous avez empêché <$subaddr$> de rejoindre la liste. %endif% %ifaction post% %^%%wrap% %ifreason confirm% Merci de votre confirmation %endif% %ifreason release% Un modérateur a délivré %endif% %ifreason request% Merci pour %endif% votre message ayant pour sujet "$subject$". Il a maintenant été distribué à la liste. %endif% mlmmj-1.2.18.0/listtexts/fr/finish-sub000644 000765 000120 00000002477 11734220454 017426 0ustar00benadmin000000 000000 Subject: Bienvenue à $list$@$domain$ %text prologue% %wrap% %ifreason request% Merci de votre demande pour nous rejoindre. %endif% %ifreason confirm% Merci de confirmer votre inscription. %endif% %ifreason permit% Un modérateur vous a permis de nous rejoindre. %endif% %ifreason switch% Votre inscription a été transférée sur la version %else% %ifreason admin% Un administrateur vous a inscrit à la version %else% Vous avez maintenant été ajouté à la version %endif% %endif% %iftype normal% normale %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% de la liste. %wrap%L'adresse e-mail avec laquelle vous avez été inscrit est <$subaddr$>. %ifcontrol closedlist% %^%%wrap%Si vous souhaitez vous désinscrire, vous devez contacter un administrateur de la liste. Vous pouvez envoyer un mail à <$list+$owner@$domain$> pour contacter le propriétaire de la liste. %else% %^%%wrap%Si vous souhaitez vous désinscrire, envoyez un message à <$list+$unsubscribe@$domain$> en utilisant cette adresse e-mail. Le sujet et le corps du message peuvent contenir n'importe quoi. Vous recevrez ensuite une confirmation ou des instructions complémentaires. %endif% %wrap%Pour d'autres informations ou de l'aide à propos de cette liste, envoyez un message à <$list+$help@$domain$>. mlmmj-1.2.18.0/listtexts/fr/gatekeep-sub000644 000765 000120 00000001127 11734220454 017722 0ustar00benadmin000000 000000 Subject: Demande d'inscription pour $list$@$domain$ : $subaddr$ %text prologue% %wrap%Il y a eu une demande de la part de <$subaddr$> pour rejoindre la version %iftype normal% normale %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% de la liste. %wrap%Pour l'autoriser, veuillez envoyer un message à <$permitaddr$> ce qui peut être fait habituellement simplement en répondant à ce message. %wrap%Si vous ne souhaitez pas faire cela, envoyez un message à <$obstructaddr$> ou ignorez simplement ce message. Le modérateur suivant à reçu le message : - %gatekeepers% mlmmj-1.2.18.0/listtexts/fr/help000644 000765 000120 00000006004 11734220454 016275 0ustar00benadmin000000 000000 Subject: Information pour $list$@$domain$ %text prologue% Vous trouverez ci-après des informations à propos de la liste Vous pouvez vous inscrire aux versions suivantes : - %wrap%la version normale\ : à chaque fois qu'un message est envoyé à la liste, les inscrits reçoivent une copie de celui-ci. %ifcontrol closedlist closedlistsub% Inscrivez-vous en contactant un administrateur de la liste. %else% Inscrivez-vous en envoyant un e-mail à <$list+$subscribe@$domain$>. %endif% %ifncontrol nodigestsub% %^%- %wrap%La version digest\ : les inscrits reçoivent des messages multiples dans un seul e-mail, à des intervalles réguliers, ou lorsque plusieurs messages se sont accumulés. %ifcontrol closedlist closedlistsub% Inscrivez-vous en contactant un administrateur de la liste. %else% Inscrivez-vous en envoyant un e-mail à <$list+$subscribe-digest@$domain$>. %endif% %endif% %ifncontrol nonomailsub% %^%- %wrap%La version no-mail\ : les inscrits ne reçoivent aucun message de la liste. Cela signifie qu'alors qu'ils peuvent poster des messages à la liste que seuls les inscrits peuvent envoyer, ils suivent la liste en utilisant une archive web ou via une autre adresse e-mail inscrite. %ifcontrol closedlist closedlistsub% Inscrivez-vous en contactant un administrateur de la liste. %else% Inscrivez-vous en envoyant un e-mail à <$list+$subscribe-nomail@$domain$>. %endif% %endif% %ifcontrol submod% %^%%wrap%La liste a un modérateur qui vérifiera les demandes d'inscription avant d'autoriser les nouveaux membres. %endif% %ifcontrol closedlist% %^%%wrap%Désinscrivez-vous en contactant un administrateur de la liste. %else% %^%%wrap%Désinscrivez-vous en envoyant un e-mail à <$list+$unsubscribe@$domain$>. %endif% %wrap%Les messages sont envoyés à <$list$@$domain$>. %ifcontrol subonlypost%%ifncontrol modnonsubposts% %^%%wrap%Cependant, seuls les inscrits peuvent poster sur la liste. %endif%%endif% %ifcontrol moderated% %^%%wrap%La liste a des modérateurs qui vérifieront tous les messages avant de les délivrer à la liste. %else% %ifcontrol subonlypost%%ifcontrol modnonsubposts% %^%%wrap%La liste a des modérateurs qui vérifieront tous les messages des non-incrits avant de les délivrer à la liste. %endif%%endif% %endif% %ifcontrol access% %^%%wrap%La liste a également des règles d'accès qui peuvent concerner ceux qui peuvent poster et les messages qui sont modérés. %endif% %ifncontrol noget%%ifncontrol noarchive% %^%%wrap% %ifcontrol subonlyget% Tous %else% Les inscrits %endif% peuvent retirer le message numéro N des archives de la liste en envoyant un message à <$list+$get-N@$domain$> (remplacez le N par le numéro du message souhaité). %endif%%endif% %wrap%Vous pouvez obtenir le document contenant les questions fréquemment posées pour la liste en envoyant un message à <$list+$faq@$domain$>. %wrap%Pour contacter le propriétaire de la liste envoyé un message à <$list+$owner@$domain$>. mlmmj-1.2.18.0/listtexts/fr/list000644 000765 000120 00000000663 11734220454 016325 0ustar00benadmin000000 000000 Subject: Inscrits à $list$@$domain$ %text prologue% %wrap%Voici la liste des inscrits %iftype all% (à toutes les versions de la liste): %else% à la version %iftype normal% normale %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% de la liste\ : %endif% %iftype all normal% %^%- %listsubs% %endif% %iftype all digest% %^%- %digestsubs% %endif% %iftype all nomail% %^%- %nomailsubs% %endif% mlmmj-1.2.18.0/listtexts/fr/moderate-post000644 000765 000120 00000002252 11734220454 020131 0ustar00benadmin000000 000000 Subject: Veuillez modérer $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Un message de <$posteraddr$> ayant pour sujet "$subject$" a été soumis pour envoi. Il vous est demandé de le modérer %ifreason modnonsubposts% parce que le demandeur n'est pas inscrit. %endif% %ifreason moderated% parce que c'est une liste modérée. %endif% %ifreason access% en raison d'une règle d'accès. %endif% Le message est ci-dessous. %wrap%Pour le délivrer à la liste, veuillez envoyer un message à <$releaseaddr$> ce qui peut habituellement être fait simplement en répondant à ce message. %wrap%Si vous ne souhaitez faire aucune de ces actions, vous pouvez envoyer un message à <$rejectaddr$> ou simplement ignorer ce message. Les modérateurs suivants ont reçu ce mail : - %moderators% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/fr/notify000644 000765 000120 00000002156 11734220454 016661 0ustar00benadmin000000 000000 %ifaction sub%Subject: Inscrit à $list$@$domain$ : $subaddr$%endif% %ifaction unsub%Subject: Désinscrit de $list$@$domain$ : $subaddr$%endif% %text prologue% %ifaction sub% %^%%wrap%L'adresse' <$subaddr$> a été inscrite à la version %iftype normal% normale %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% de la liste %ifreason request% parce qu'une demande pour la rejoindre a été reçue. %endif% %ifreason confirm% parce qu'une demande pour la rejoindre a été confirmée. %endif% %ifreason admin% parce qu'un administrateur l'a demandé. %endif% %ifreason permit% parce qu'un modérateur l'a permis. %endif% %endif% %ifaction unsub% %^%%wrap%L'adresse <$subaddr$> a été désinscrite de la liste %ifreason request% parce qu'une demande de désinscription a été reçue. %endif% %ifreason confirm% parce qu'une demande de désinscription a été confirmée. %endif% %ifreason admin% parce qu'un administrateur l'a demandé. %endif% %ifreason bouncing% parce qu'il a été rejeté pendant trop longtemps. %endif% %endif% mlmmj-1.2.18.0/listtexts/fr/probe000644 000765 000120 00000000512 11734220454 016452 0ustar00benadmin000000 000000 Subject: Messages rejetés de $list$@$domain$ %text prologue% Certains messages ne peuvent pas vous être délivrés. Si vous voyez ce message, cela signifie que les choses sont revenues à la normal et c'est principalement pour votre information. Veuillez trouver ci-après la liste des messages rejetés : - %bouncenumbers% mlmmj-1.2.18.0/listtexts/fr/prologue000644 000765 000120 00000000107 11734220454 017177 0ustar00benadmin000000 000000 %wrap%Hi, c'est le programme Mlmmj gérant la liste <$list$@$domain$>. mlmmj-1.2.18.0/listtexts/fr/wait-post000644 000765 000120 00000001606 11734220454 017277 0ustar00benadmin000000 000000 Subject: En attente de réponse à $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Le message de <$posteraddr$> ayant pour sujet "$subject$" a été soumis à la liste. Cependant il a été demandé aux modérateurs de le contrôler avant de le délivrer à la liste %ifreason moderated% parce que c'est une liste modérée. %endif% %ifreason access% en raison d'une règle d'accès. %endif% %ifreason modnonsubposts% parce que vous n'êtes pas inscrit. %endif% (Le message apparaît ci-dessous.) --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/fr/wait-sub000644 000765 000120 00000000367 11734220454 017106 0ustar00benadmin000000 000000 Subject: En attente d'autorisation pour joindre la liste $list$@$domain$ %text prologue% %wrap%Votre requête pour joindre la liste a été reçue. Cependant, les modérateurs doivent la vérifier avant de vous autoriser à rejoindre la liste. mlmmj-1.2.18.0/listtexts/fi/confirm000644 000765 000120 00000003564 11734220454 017001 0ustar00benadmin000000 000000 %ifaction sub%Subject: Vahvista liittyminen listalle $list$@$domain$%endif% %ifaction unsub%Subject: Vahvista eroaminen listalta $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap% %ifreason admin% Ylläpitäjä %endif% %ifreason request% Joku (toivottavasti sinä) %endif% on pyytänyt, että sähköpostiosoitteesi <$subaddr$> lisättäisiin %iftype normal% postituslistan vastaanottajaksi. Aina kun postituslistalle lähetetään viesti, siitä lähetetään kopio sähköpostiisi. %endif% %iftype digest% postituslistan viestikoosteiden vastaanottajaksi. Sähköpostiisi lähetetään kooste postituslistalle lähetetyistä viesteistä säännöllisin väliajoin tai silloin, kun postituslistalle on kertynyt riittävän monta viestiä. %endif% %iftype nomail% postituslistalle ilman viestien välitystä. Sinulle ei lähetetä postituslistan viestejä, mutta oikeutesi postituslistan käyttöön ovat muuten samat kuin postituslistan normaaleilla tilaajilla. Voit esimerkiksi lähettää viestejä listalle, jolle lähetysoikeus on vain listan tilaajilla. Tämä on käytännöllistä silloin, kun seuraat listan viestejä www-arkiston tai toiseen sähköpostiosoitteeseen tilattujen viestien kautta. %endif% %endif% %ifaction unsub% %^%%wrap% %ifreason admin% Ylläpitäjä %endif% %ifreason request% Joku (toivottavasti sinä) %endif% on pyytänyt, että sähköpostiosoite <$subaddr$> poistettaisiin postituslistan. %endif% %wrap%Vahvistaaksesi toimenpiteen lähetä viesti osoitteeseen <$confaddr$> esimerkiksi vastaamalla tähän sähköpostiviestiin. Viestin otsikolla ja sisällöllä ei ole merkitystä. Kun olet lähettänyt viestin, saat vastauksen, jossa vahvistetaan toimenpide suoritetuksi. Jos et halua vahvistaa toimenpidettä, sinun ei tarvitse tehdä mitään. mlmmj-1.2.18.0/listtexts/fi/deny000644 000765 000120 00000005107 11734220454 016276 0ustar00benadmin000000 000000 %ifaction sub%Subject: Listalle $list$@$domain$ liittyminen epäonnistui%endif% %ifaction unsub%Subject: Listalta $list$@$domain$ poistuminen epäonnistui%endif% %ifaction release reject%Subject: Listan $list$@$domain$ viestin hyväksyntä epäonnistui%endif% %ifaction permit obstruct%Subject: Listan $list$@$domain$ tilauksen hallinta epäonnistui%endif% %text prologue% %ifaction sub% %^%%wrap%Sinua ei voitu liittää postituslistalle, %ifreason disabled% koska listan %iftype normal% tavallinen versio %endif% %iftype digest% viestikoosteversio %endif% %iftype nomail% ei postia -versio %endif% ei ole käytössä. %endif% %ifreason closed% koska tälle listalle ei voi liittyä omatoimisesti sähköpostiviestillä. %endif% %ifreason subbed% koska olet jo aiemmin liittynyt listalle. %endif% %ifreason expired% koska liittymistäsi ei hyväksytty riittävässä ajassa. %endif% %ifreason obstruct% koska postituslistan jäsenistä vastaava henkilö esti liittymisesi listalle. %endif% %endif% %ifaction unsub% %^%%wrap%Jäsenyyttäsi postituslistalla ei voitu lopettaa, %ifreason unsubbed% koska et ole listan tilaaja. %^%%wrap%Jos tästä huolimatta saat postituslistalta viestejä, olet ehkä liittynyt listalle jollain toisella sähköpostiosoitteella. Voit selvittää listalle liitetyn osoitteen viestistä, jossa sinut toivotetaan tervetulleeksi listalle. Jos se ei ole enää tallessa, katso "Return-Path"-otsikkotieto viimeisimmästä viestistä, jonka olet saanut postituslistalta. %endif% %endif% %ifaction release reject% %^%%wrap% %ifaction release% Viestin hyväksyminen postituslistalle välitettäväksi ei onnistunut, %endif% %ifaction reject% Viestin hylkääminen postituslistalta ei onnistunut, %endif% %ifreason notfound% koska sitä ei löytynyt. Ehkäpä toinen moderaattori on jo hyväksynyt tai hylännyt sen, tai viesti on vanhentunut. %endif% %ifreason moderators% koska et ole tämän postituslistan moderaattori. %endif% %endif% %ifaction permit obstruct% %^%%wrap% %ifaction permit% Postituslistan liittymispyynnön hyväksyminen ei onnistunut, %endif% %ifaction obstruct% Postituslistan liittymispyynnön hylkääminen ei onnistunut, %endif% %ifreason notfound% koska sitä ei löytynyt. Ehkäpä toinen listan jäsenistä vastaava on jo hyväksynyt tai hylännyt sen, tai liittymispyyntö on vanhentunut. %endif% %ifreason gatekeepers% koska sinulla ei ole oikeutta hyväksyä postituslistan jäseniä. %endif% %endif% mlmmj-1.2.18.0/listtexts/fi/deny-post000644 000765 000120 00000004032 11734220454 017255 0ustar00benadmin000000 000000 Subject: Viesti listalle $list$@$domain$ hylättiin: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Viestiä osoitteesta <$posteraddr$> otsikolla "$subject$" ei voitu välittää postituslistalle, %ifreason maxmailsize% koska sen koko on suurempi kuin suurin sallittu koko $maxmailsize$ tavua. %endif% %ifreason tocc% koska postituslistan osoite ei ollut To- eikä CC-vastaanottajissa. %endif% %ifreason access% koska listan ylläpitäjän asettamat postitusoikeudet eivät sallineet kyseisen viestin lähetystä. %endif% %ifreason expired% koska kukaan postituslistan moderaattoreista ei hyväksynyt viestiä riittävän ajan kuluessa. %endif% %ifreason reject% koska postituslistan moderaattori esti viestin lähettämisen. %endif% %ifreason subonlypost% koska et ole postituslistan tilaaja. %ifcontrol closedlist closedlistsub% %^%%wrap%Jos haluta liittyä postituslistalle, ota yhteyttä listan ylläpitäjään. Ylläpitäjään saat yhteyden lähettämällä sähköpostia osoitteeseen <$list+$owner@$domain$>. %endif% %^%%wrap%Jos tiedät olevasi tämän postituslistan tilaaja, olet todennäköisesti tilannut sen jollakin toisella sähköpostiosoitteella. Voit selvittää listalle liitetyn osoitteen viestistä, jossa sinut toivotetaan tervetulleeksi listalle. Jos se ei ole enää tallessa, katso "Return-Path"-otsikkotieto viimeisimmästä viestistä, jonka olet saanut postituslistalta. %endif% %ifreason maxmailsize% %^%(Alkuosa viestistä, jota ei lähetetty listalle, on alla.) %else% %^%(Viesti, jota ei lähetetty listalle, on luettavissa alla.) %endif% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %ifreason maxmailsize% %^%%originalmail 300% %else% %^%%originalmail% %endif% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/fi/digest000644 000765 000120 00000000234 11734220454 016612 0ustar00benadmin000000 000000 Subject: Viestikooste $digestissue$ postituslistalta $list$@$domain$ ($digestinterval$) Aiheet (viestit $digestfirst$ - $digestlast$): - %digestthreads% mlmmj-1.2.18.0/listtexts/fi/faq000644 000765 000120 00000000201 11734220454 016074 0ustar00benadmin000000 000000 Subject: Listan $list$@$domain$ usein kysytyt kysymykset Valitettavasti usein kysyttyjä kysymyksiä ei vielä ole saatavilla. mlmmj-1.2.18.0/listtexts/fi/finish000644 000765 000120 00000002703 11746152500 016615 0ustar00benadmin000000 000000 %ifaction unsub%Subject: Vahvistus postituslistalta $list$@$domain$ poistumisesta%endif% %ifaction release reject%Subject: Moderoitu $list$@$domain$: $subject$%endif% %ifaction permit obstruct%Subject: Listalle $list$@$domain$ liittyminen käsitelty: $subaddr$%endif% %ifaction post%Subject: Lähetetty listalle $list$@$domain$: $subject$%endif% %text prologue% %ifaction unsub% %^%%wrap% %ifreason request% %endif% %ifreason confirm% Kiitos, että vahvistit postituslistalta poistumisesi. %endif% %ifreason admin% Ylläpitäjä on poistanut sinut postituslistalta. %else% Sähköpostiosoitteesi on nyt poistettu postituslistalta. %endif% %endif% %ifaction release% %^%%wrap%Osoitteesta <$posteraddr$> lähetetty viesti "$subject$" on onnistuneesti hyväksytty välitettäväksi postituslistalle. %endif% %ifaction reject% %^%%wrap%Osoitteesta <$posteraddr$> lähetetyn viestin "$subject$" välittäminen postituslistalle on estetty. %endif% %ifaction permit% %^%%wrap%Osoite <$subaddr$> on liitetty postituslistalle. %endif% %ifaction obstruct% %^%%wrap%Osoitteen <$subaddr$> liittäminen postituslistalle on estetty. %endif% %ifaction post% %^%%wrap% %ifreason confirm% Kiitos, että vahvistit viestisi %endif% %ifreason release% Moderaattori on hyväksynyt viestisi %endif% %ifreason request% Kiitos viestistäsi %endif% otsikolla "$subject$". Se välitetään postituslistan tilaajille. %endif% mlmmj-1.2.18.0/listtexts/fi/finish-sub000644 000765 000120 00000002714 11734220454 017407 0ustar00benadmin000000 000000 Subject: Tervetuloa postituslistalle $list$@$domain$ %text prologue% %wrap% %ifreason request% Kiitos, että haluat liittyä tälle postituslistalle. %endif% %ifreason confirm% Kiitos, että vahvistit postituslistalle liittymisen. %endif% %ifreason permit% Pyyntösi liittyä tälle postituslistalle on hyväksytty. %endif% %ifreason switch% Postituslistasi tilaus on muutettu %else% %ifreason admin% Postituslistan ylläpitäjä on liittänyt sinut %else% Sinut on lisätty %endif% %endif% %iftype normal% postituslistan normaaliksi tilaajaksi. %endif% %iftype digest% postituslistan viestikoosteiden tilaajaksi. %endif% %iftype nomail% postituslistan jäseneksi ilman viestien jakelua. %endif% %wrap%Osoite, joka postituslistalle on liitetty, on <$subaddr$>. %ifcontrol closedlist% %^%%wrap%Jos haluat lopettaa postituslistan tilauksen, ota yhteyttä listan ylläpitäjään. Yhteydenotto onnistuu lähettämällä sähköpostia osoitteeseen <$list+$owner@$domain$>. %else% %^%%wrap%Jos haluat lopettaa postituslistan tilauksen, lähetä viesti osoitteeseen <$list+$unsubscribe@$domain$> samasta osoitteesta, joka listalle on liitetty. Viestin otsikolla ja sisällöllä ei ole merkitystä. Tehtyäsi tämän sinulle lähetetään vahvistus tai lisäohjeita postituslistan tilauksen lopettamisesta. %endif% %wrap%Lisätietoa ja ohjeita tämän postituslistan käytöstä saa lähettämällä viestin osoitteeseen <$list+$help@$domain$>. mlmmj-1.2.18.0/listtexts/fi/gatekeep-sub000644 000765 000120 00000001256 11734220454 017714 0ustar00benadmin000000 000000 Subject: Pyyntö liittyä listalle $list$@$domain$: $subaddr$ %text prologue% %wrap%Sähköpostiosoitteesta <$subaddr$> on lähetetty pyyntö liittyä postituslistalle %iftype normal% normaalina %endif% %iftype digest% viestikoosteiden %endif% %iftype nomail% ei jakelua -version %endif% tilaajana. %wrap%Salliaksesi liittymisen lähetä viesti osoitteeseen <$permitaddr$>. Tämä onnistuu tavallisesti vastaamalla tähän viestiin. %wrap%Jos et halua sallia listalle liittymistä, lähetä viesti osoitteeseen <$obstructaddr$> tai jätä tämä pyyntö kokonaan huomioimatta. Seuraavat postituslistan jäsenistä vastaavat henkilöt ovat saaneet tämän viestin: - %gatekeepers% mlmmj-1.2.18.0/listtexts/fi/help000644 000765 000120 00000006402 11734220454 016266 0ustar00benadmin000000 000000 Subject: Tietoja postituslistasta $list$@$domain$ %text prologue% Tässä joitakin tietoja tästä postituslistasta. Voit tilata postituslistasta jonkin seuraavista versioista: - %wrap%Tavallinen jakelu: Aina kun postituslistalle lähetetään viesti, saat tilaajana siitä kopion sähköpostiisi. %ifcontrol closedlist closedlistsub% Liity ottamalla yhteyttä postituslistan ylläpitäjään. %else% Liity lähettämällä viesti osoitteeseen <$list+$subscribe@$domain$>. %endif% %ifncontrol nodigestsub% %^%- %wrap%Viestikoosteiden jakelu: Saat koosteen postituslistalle lähetetyistä viesteistä yhtenä viestinä säännöllisin väliajoin tai silloin, kun listalle on kertynyt riittävä määrä viestejä. %ifcontrol closedlist closedlistsub% Liity ottamalla yhteyttä postituslistan ylläpitäjään. %else% Liity lähettämällä viesti osoitteeseen <$list+$subscribe-digest@$domain$>. %endif% %endif% %ifncontrol nonomailsub% %^%- %wrap%Ei jakelua -jäsenyys: Osoitteeseesi ei välitetä lainkaan listalle tulevia viestejä. Voit kuitenkin lähettää viestejä listalle kuten listan tavanomaiset tilaajat. Tällainen liittyminen on järkevää, jos seuraat postituslistaa listan www-arkiston kautta tai olet tilannut viestit toiseen sähköpostiosoitteeseen. %ifcontrol closedlist closedlistsub% Liity ottamalla yhteyttä postituslistan ylläpitäjään. %else% Liity lähettämällä viesti osoitteeseen <$list+$subscribe-nomail@$domain$>. %endif% %endif% %ifcontrol submod% %^%%wrap%Tälle listalle liittyminen edellyttää, että liittymispyynnön hyväksyy joku listan jäsenyyksiä hallinnoiva henkilö. %endif% %ifcontrol closedlist% %^%%wrap%Listalta voi poistua ottamalla yhteyttä listan ylläpitäjään. %else% %^%%wrap%Listalta voi poistua lähettämällä postia osoitteeseen <$list+$unsubscribe@$domain$>. %endif% %wrap%Listalle lähetetään postia lähettämällä viesti osoitteeseen <$list$@$domain$>. %ifcontrol subonlypost%%ifncontrol modnonsubposts% %^%%wrap%Huomaa kuitenkin, että vain listan tilaajat voivat lähettää viestejä tälle listalle. %endif%%endif% %ifcontrol moderated% %^%%wrap%Tällä listalla on moderaattori, joka tarkastaa kaikki listalle lähetetyt viestit ennen niiden välittämistä listalle. %else% %ifcontrol subonlypost%%ifcontrol modnonsubposts% %^%%wrap%Tällä listalla on moderaattori, joka tarkastaa muiden kuin listan tilaajien lähettämät viestit ennen niiden välittämistä listalle. %endif%%endif% %endif% %ifcontrol access% %^%%wrap%Tällä listalla on myös käyttöoikeussääntöjä, jotka voivat vaikuttaa viestien lähetysoikeuteen sekä siihen, mitkä viestit vaativat moderaattorin hyväksynnän. %endif% %ifncontrol noget%%ifncontrol noarchive% %^%%wrap% %ifcontrol subonlyget% Kuka tahansa voi %else% Listan tilaajat voivat %endif% hakea viestin numero N listan arkistosta lähettämällä viestin osoitteeseen <$list+$get-N@$domain$> (korvaa N halutulla viestin numerolla). %endif%%endif% %wrap%Listan usein kysytyt kysymykset vastauksineen voi hakea lähettämällä viestin osoitteeseen <$list+$faq@$domain$>. %wrap%Listan ylläpitäjään saa yhteyden lähettämällä postia osoitteeseen <$list+$owner@$domain$>. mlmmj-1.2.18.0/listtexts/fi/list000644 000765 000120 00000000732 11734220454 016311 0ustar00benadmin000000 000000 Subject: Postituslistan $list$@$domain$ tilaajat %text prologue% %wrap%Tässä on lista postituslistan %iftype all% kaikista tilaajista: %else% %iftype normal% tavallisista tilaajista: %endif% %iftype digest% viestikoosteiden tilaajista: %endif% %iftype nomail% jäsenistä, joille ei välitetä postia: %endif% %endif% %iftype all normal% %^%- %listsubs% %endif% %iftype all digest% %^%- %digestsubs% %endif% %iftype all nomail% %^%- %nomailsubs% %endif% mlmmj-1.2.18.0/listtexts/fi/moderate-post000644 000765 000120 00000002357 11734220454 020126 0ustar00benadmin000000 000000 Subject: Viesti listalle $list$@$domain$ odottaa hyväksyntää: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Viesti osoitteesta <$posteraddr$> otsikolla "$subject$" on lähetetty listalle välitettäväksi. Sinua pyydetään moderoimaan viesti, koska %ifreason modnonsubposts% viestin lähettäjä ei ole listan tilaaja. %endif% %ifreason moderated% tämän listan kaikki viestit moderoidaan. %endif% %ifreason access% tämän listan välityssäännöt vaativat niin. %endif% Viesti on luettavissa alla. %wrap%Salliaksesi viestin välittämisen listalle lähetä viesti osoitteeseen <$releaseaddr$>. Tämän voi tavallisesti tehdä vastaamalla tähän viestiin. %wrap%Jos et halua viestiä hyväksyttävän, lähetä viesti osoitteeseen <$rejectaddr$> tai jätä tämä viesti kokonaan huomioimatta. Seuraavat moderaattorit ovat saaneet tämän viestin: - %moderators% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/fi/notify000644 000765 000120 00000002335 11734220454 016647 0ustar00benadmin000000 000000 %ifaction sub%Subject: Liitetty listalle $list$@$domain$: $subaddr$%endif% %ifaction unsub%Subject: Poistettu listalta $list$@$domain$: $subaddr$%endif% %text prologue% %ifaction sub% %^%%wrap%Osoite <$subaddr$> on liitetty postituslistan %iftype normal% tavalliseen versioon, %endif% %iftype digest% viestikoosteita vastaanottavaan versioon, %endif% %iftype nomail% ei viestien jakelua -versioon, %endif% %ifreason request% koska tilaaja pyysi saada liittyä listalle. %endif% %ifreason confirm% koska tilaaja vahvisti pyyntönsä liittyä listalle. %endif% %ifreason admin% koska listan ylläpitäjä liitti osoitteen listalle. %endif% %ifreason permit% koska listan jäsenyyksistä vastaava henkilö hyväksyi liittymisen. %endif% %endif% %ifaction unsub% %^%%wrap%Osoite <$subaddr$> on poistettu postituslistan %ifreason request% koska tilaaja pyysi tilauksensa lopettamista. %endif% %ifreason confirm% koska tilaaja vahvisti pyyntönsä tilauksensa lopettamisesta. %endif% %ifreason admin% koska listan ylläpitäjä poisti osoitteen listalta. %endif% %ifreason bouncing% koska viestien lähettäminen osoitteeseen on epäonnistunut toistuvasti. %endif% %endif% mlmmj-1.2.18.0/listtexts/fi/probe000644 000765 000120 00000000706 11734220454 016446 0ustar00benadmin000000 000000 Subject: Välittämättä jääneitä viestejä listalta $list$@$domain$ %text prologue% Sinulle on yritetty lähettää viestejä postituslistalta, mutta ne eivät ole menneet perille. Jos saat tämän viestin, toimii viestien välitys jälleen, ja asiat ovat nyt kunnossa. Tämä viesti on vain tiedonanto siitä, että joitakin viestejä on jäänyt saapumatta. Tässä on lista viesteistä, joita sinulle ei saatu lähetettyä: - %bouncenumbers% mlmmj-1.2.18.0/listtexts/fi/prologue000644 000765 000120 00000000125 11734220454 017166 0ustar00benadmin000000 000000 %wrap%Hei, tämä on Mlmmj-ohjelma, joka hallinnoi <$list$@$domain$>-postituslistaa. mlmmj-1.2.18.0/listtexts/fi/wait-post000644 000765 000120 00000001651 11734220454 017266 0ustar00benadmin000000 000000 Subject: Viesti odottaa hyväksymistä listalle $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Viesti osoitteesta <$posteraddr$> otsikolla "$subject$" on lähetetty postituslistalle. Ennen kuin viesti päätyy postituslistalle, moderaattorin on hyväksyttävä se, %ifreason moderated% koska tämä on moderoitu postituslista. %endif% %ifreason access% koska tämän postituslistan käyttösäännöt edellyttävät sitä. %endif% %ifreason modnonsubposts% koska et ole postituslistan tilaaja. %endif% (Lähetetty viesti on alla.) --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/fi/wait-sub000644 000765 000120 00000000417 11734220454 017071 0ustar00benadmin000000 000000 Subject: Liittyminen listalle $list$@$domain$ odottaa hyväksyntää %text prologue% %wrap%Pyyntösi liittyä postituslistalle on vastaanotettu. Ennen kuin osoitteesi liitetään postituslistalle, on listan jäsenyyksistä vastaavan henkilön hyväksyttävä pyyntö. mlmmj-1.2.18.0/listtexts/en/confirm000644 000765 000120 00000003146 11734220454 017001 0ustar00benadmin000000 000000 %ifaction sub%Subject: Confirm subscription to $list$@$domain$%endif% %ifaction unsub%Subject: Confirm unsubscribe from $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap% %ifreason admin% An administrator %endif% %ifreason request% Somebody (and we hope it was you) %endif% has requested that your email address <$subaddr$> be added %iftype normal% to the list. This means every time a post is sent to the list, you will receive a copy of it. %endif% %iftype digest% to the list, to receive digests. This means you will receive multiple posts in a single mail message, at regular intervals, or when a lot of posts have accumulated. %endif% %iftype nomail% to the list, without mail delivery. This means you will not receive any posts to the list, but you are considered a member. This means, for instance, you are able to post to a list which only subscribers may post to, while you follow the list using a web archive or another subscribed email address. %endif% %endif% %ifaction unsub% %^%%wrap% %ifreason admin% An administrator %endif% %ifreason request% Somebody (and we hope it was you) %endif% has requested that the email address <$subaddr$> be removed from the list. %endif% %wrap%To confirm you want to do this, please send a message to <$confaddr$> which can usually be done simply by replying to this message. The subject and the body of the message can be anything. After doing so, you should receive a reply informing you that the operation succeeded. If you do not want to do this, simply ignore this message. mlmmj-1.2.18.0/listtexts/en/deny000644 000765 000120 00000004414 11734220454 016302 0ustar00benadmin000000 000000 %ifaction sub%Subject: Unable to subscribe to $list$@$domain$%endif% %ifaction unsub%Subject: Unable to unsubscribe from $list$@$domain$%endif% %ifaction release reject%Subject: Unable to moderate $list$@$domain$%endif% %ifaction permit obstruct%Subject: Unable to gatekeep $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap%You were unable to be subscribed to the list %ifreason disabled% because the %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% version of the list is turned off. %endif% %ifreason closed% because people are not allowed to subscribe to this list by email. %endif% %ifreason subbed% because you are already subscribed. %endif% %ifreason expired% because too much time passed without a gatekeeper permitting your entry. %endif% %ifreason obstruct% because a gatekeeper obstructed your entry. %endif% %endif% %ifaction unsub% %^%%wrap%You were unable to be unsubscribed from the list %ifreason unsubbed% because you are not subscribed. %^%%wrap%If you are receiving messages, perhaps a different email address is subscribed. To find out which address you are subscribed with, refer to the message welcoming you to the list, or look at the envelope "Return-Path" header of a message you receive from the list. %endif% %endif% %ifaction release reject% %^%%wrap% %ifaction release% You were unable to release the specified post to the list %endif% %ifaction reject% You were unable to reject the specified post %endif% %ifreason notfound% because it could not be found. Perhaps another moderator already released or rejected it, or it expired. %endif% %ifreason moderators% because you are not a moderator for the list. %endif% %endif% %ifaction permit obstruct% %^%%wrap% %ifaction permit% You were unable to permit the specified subscription request %endif% %ifaction obstruct% You were unable to obstruct the specified subscription request %endif% %ifreason notfound% because it could not be found. Perhaps another gatekeeper already permitted or obstructed it, or it expired. %endif% %ifreason gatekeepers% because you are not a gatekeeper for the list. %endif% %endif% mlmmj-1.2.18.0/listtexts/en/deny-post000644 000765 000120 00000003416 11734220454 017266 0ustar00benadmin000000 000000 Subject: Post to $list$@$domain$ denied: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%The message from <$posteraddr$> with subject "$subject$" was unable to be delivered to the list %ifreason maxmailsize% because it exceeded the maximum allowed message size of $maxmailsize$ bytes. %endif% %ifreason tocc% because the list address was not found in either the To: or CC: header. %endif% %ifreason access% because of an access rule set up by the list administrator. %endif% %ifreason expired% because too much time passed without any moderator releasing it. %endif% %ifreason reject% because a moderator rejected it. %endif% %ifreason subonlypost% because you are not a list subscriber. %ifcontrol closedlist closedlistsub% %^%%wrap%If you wish to become a subscriber, you will need to contact a list administrator. You can email <$list+$owner@$domain$> to contact the list owner. %endif% %^%%wrap%If you believe you are a subscriber, you are probably subscribed with a different email address. To find out which address you are subscribed with, refer to the message welcoming you to the list, or look at the envelope "Return-Path" header of a message you receive from the list. %endif% %ifreason maxmailsize% %^%(The beginning of the denied message is below.) %else% %^%(The denied message is below.) %endif% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %ifreason maxmailsize% %^%%originalmail 300% %else% %^%%originalmail% %endif% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/en/digest000644 000765 000120 00000000224 11734220454 016615 0ustar00benadmin000000 000000 Subject: Digest of $list$@$domain$ issue $digestissue$ ($digestinterval$) Topics (messages $digestfirst$ through $digestlast$): - %digestthreads% mlmmj-1.2.18.0/listtexts/en/faq000644 000765 000120 00000000126 11734220454 016106 0ustar00benadmin000000 000000 Subject: Frequently asked questions of $list$@$domain$ Sorry, no FAQ available yet. mlmmj-1.2.18.0/listtexts/en/finish000644 000765 000120 00000002510 11746152500 016615 0ustar00benadmin000000 000000 %ifaction unsub%Subject: Goodbye from $list$@$domain$%endif% %ifaction release reject%Subject: Moderated $list$@$domain$: $subject$%endif% %ifaction permit obstruct%Subject: Guarded $list$@$domain$: $subaddr$%endif% %ifaction post%Subject: Posted to $list$@$domain$: $subject$%endif% %text prologue% %ifaction unsub% %^%%wrap% %ifreason request% %endif% %ifreason confirm% Thank you for confirming your unsubscribe. %endif% %ifreason admin% An administrator has removed you from the list. %else% You have now been removed from the list. %endif% %endif% %ifaction release% %^%%wrap%You have successfully released the message from <$posteraddr$> with subject "$subject$" to the list. %endif% %ifaction reject% %^%%wrap%You have successfully rejected the message from <$posteraddr$> with subject "$subject$". %endif% %ifaction permit% %^%%wrap%You have successfully permitted <$subaddr$> to join the list. %endif% %ifaction obstruct% %^%%wrap%You have successfully obstructed <$subaddr$> from joining the list. %endif% %ifaction post% %^%%wrap% %ifreason confirm% Thank you for confirming %endif% %ifreason release% A moderator has released %endif% %ifreason request% Thank you for %endif% your post with subject "$subject$". It is now being distributed to the list. %endif% mlmmj-1.2.18.0/listtexts/en/finish-sub000644 000765 000120 00000002245 11746152500 017411 0ustar00benadmin000000 000000 Subject: Welcome to $list$@$domain$ %text prologue% %wrap% %ifreason request% Thank you for your request to join us. %endif% %ifreason confirm% Thank you for confirming your subscription. %endif% %ifreason permit% A gatekeeper has permitted you to join us. %endif% %ifreason switch% Your subscription has been switched to the %else% %ifreason admin% An administrator has subscribed you to the %else% You have now been added to the %endif% %endif% %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% version of the list. %wrap%The email address you are subscribed with is <$subaddr$>. %ifcontrol closedlist% %^%%wrap%If you ever wish to unsubscribe, you will need to contact a list administrator. You can email <$list+$owner@$domain$> to contact the list owner. %else% %^%%wrap%If you ever wish to unsubscribe, send a message to <$list+$unsubscribe@$domain$> using this email address. The subject and the body of the message can be anything. You will then receive confirmation or further instructions. %endif% %wrap%For other information and help about this list, send a message to <$list+$help@$domain$>. mlmmj-1.2.18.0/listtexts/en/gatekeep-sub000644 000765 000120 00000001057 11734220454 017717 0ustar00benadmin000000 000000 Subject: Subscription request for $list$@$domain$: $subaddr$ %text prologue% %wrap%There has been a request from <$subaddr$> to join the %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% version of the list. %wrap%To permit this, please send a message to <$permitaddr$> which can usually be done simply by replying to this message. %wrap%If you do not want to do this, either send a message to <$obstructaddr$> or simply ignore this message. The following gatekeepers have received this mail: - %gatekeepers% mlmmj-1.2.18.0/listtexts/en/help000644 000765 000120 00000005156 11734220454 016277 0ustar00benadmin000000 000000 Subject: Information for $list$@$domain$ %text prologue% Here is some information about the list. You can subscribe to the following versions: - %wrap%The normal version: Every time a post is sent to the list, subscribers receive a copy of it. %ifcontrol closedlist closedlistsub% Subscribe by contacting a list administrator. %else% Subscribe by emailing <$list+$subscribe@$domain$>. %endif% %ifncontrol nodigestsub% %^%- %wrap%The digest version: Subscribers receive multiple posts in a single mail message, at regular intervals, or when a lot of posts have accumulated. %ifcontrol closedlist closedlistsub% Subscribe by contacting a list administrator. %else% Subscribe by emailing <$list+$subscribe-digest@$domain$>. %endif% %endif% %ifncontrol nonomailsub% %^%- %wrap%The no-mail version: Subscribers do not receive any posts to the list. This means, though, they are able to post to a list which only subscribers may post to, while they follow the list using a web archive or another subscribed email address. %ifcontrol closedlist closedlistsub% Subscribe by contacting a list administrator. %else% Subscribe by emailing <$list+$subscribe-nomail@$domain$>. %endif% %endif% %ifcontrol submod% %^%%wrap%The list has gatekeepers who will review subscription requests before permitting new members. %endif% %ifcontrol closedlist% %^%%wrap%Unsubscribe by contacting a list administrator. %else% %^%%wrap%Unsubscribe by emailing <$list+$unsubscribe@$domain$>. %endif% %wrap%Posts are made by emailing <$list$@$domain$>. %ifcontrol subonlypost%%ifncontrol modnonsubposts% %^%%wrap%However, only subscribers may post to the list. %endif%%endif% %ifcontrol moderated% %^%%wrap%The list has moderators who will review all posts before releasing them to the list. %else% %ifcontrol subonlypost%%ifcontrol modnonsubposts% %^%%wrap%The list has moderators who will review posts from non-subscribers before releasing them to the list. %endif%%endif% %endif% %ifcontrol access% %^%%wrap%The list also has access rules which may affect who can post and which posts are moderated. %endif% %ifncontrol noget%%ifncontrol noarchive% %^%%wrap% %ifcontrol subonlyget% Anyone %else% Subscribers %endif% can retrieve message number N from the list's archive by sending a message to <$list+$get-N@$domain$> (change the N to the number of the desired message). %endif%%endif% %wrap%You can retrieve the frequently asked questions document for the list by sending a message to <$list+$faq@$domain$>. %wrap%To contact the list owner, send a message to <$list+$owner@$domain$>. mlmmj-1.2.18.0/listtexts/en/list000644 000765 000120 00000000661 11734220454 016316 0ustar00benadmin000000 000000 Subject: Subscribers to $list$@$domain$ %text prologue% %wrap%Here is the list of subscribers %iftype all% (to all versions of the list): %else% to the %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% version of the list: %endif% %iftype all normal% %^%- %listsubs% %endif% %iftype all digest% %^%- %digestsubs% %endif% %iftype all nomail% %^%- %nomailsubs% %endif% mlmmj-1.2.18.0/listtexts/en/moderate-post000644 000765 000120 00000002152 11734220454 020123 0ustar00benadmin000000 000000 Subject: Please moderate $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%A message from <$posteraddr$> with subject "$subject$" has been submitted for posting. You are being asked to moderate %ifreason modnonsubposts% because the requester is not a subscriber. %endif% %ifreason moderated% because this is a moderated list. %endif% %ifreason access% because of an access rule. %endif% The message is below. %wrap%To release it to the list, please send a message to <$releaseaddr$> which can usually be done simply by replying to this message. %wrap%If you do not want to do any of this, either send a message to <$rejectaddr$> or simply ignore this message. The following moderators have received this mail: - %moderators% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/en/notify000644 000765 000120 00000002067 11734220454 016655 0ustar00benadmin000000 000000 %ifaction sub%Subject: Subscribed to $list$@$domain$: $subaddr$%endif% %ifaction unsub%Subject: Unsubscribed from $list$@$domain$: $subaddr$%endif% %text prologue% %ifaction sub% %^%%wrap%The address <$subaddr$> has been subscribed to the %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% version of the list %ifreason request% because a request to join was received. %endif% %ifreason confirm% because a request to join was confirmed. %endif% %ifreason admin% because an administrator commanded it. %endif% %ifreason permit% because a gatekeeper permitted it. %endif% %endif% %ifaction unsub% %^%%wrap%The address <$subaddr$> has been unsubscribed from the list %ifreason request% because a request to unsubscribe was received. %endif% %ifreason confirm% because a request to unsubscribe was confirmed. %endif% %ifreason admin% because an administrator commanded it. %endif% %ifreason bouncing% because it has been bouncing for too long. %endif% %endif% mlmmj-1.2.18.0/listtexts/en/probe000644 000765 000120 00000000425 11734220454 016450 0ustar00benadmin000000 000000 Subject: Bouncing messages from $list$@$domain$ %text prologue% Some messages to you could not be delivered. If you're seeing this message it means things are back to normal, and it's merely for your information. Here is the list of the bounced messages: - %bouncenumbers% mlmmj-1.2.18.0/listtexts/en/prologue000644 000765 000120 00000000121 11734220454 017166 0ustar00benadmin000000 000000 %wrap%Hi, this is the Mlmmj program managing the <$list$@$domain$> mailing list. mlmmj-1.2.18.0/listtexts/en/wait-post000644 000765 000120 00000001540 11734220454 017267 0ustar00benadmin000000 000000 Subject: Awaiting release to $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%The message from <$posteraddr$> with subject "$subject$" has been submitted to the list. However, the moderators are being asked to review it before releasing it to the list %ifreason moderated% because this is a moderated list. %endif% %ifreason access% because of an access rule. %endif% %ifreason modnonsubposts% because you are not a subscriber. %endif% (The message is below.) --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/en/wait-sub000644 000765 000120 00000000324 11734220454 017072 0ustar00benadmin000000 000000 Subject: Awaiting permission to join $list$@$domain$ %text prologue% %wrap%Your request to join the list has been received. However, the gatekeepers are being asked to review it before permitting you to join. mlmmj-1.2.18.0/listtexts/de/confirm000644 000765 000120 00000003450 11734220454 016765 0ustar00benadmin000000 000000 %ifaction sub%Subject: Anmeldebestätigung für Liste $list$@$domain$%endif% %ifaction unsub%Subject: Abmeldebestätigung für Liste $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap% %ifreason admin% Ein Listenadministrator %endif% %ifreason request% Jemand (hoffentlich Sie selbst) %endif% hat darum gebeten, Ihre Mailadresse <$subaddr$> %iftype normal% der Liste hinzuzufügen. Das heißt, dass Sie eine Kopie jeder Mail erhalten, die an die Liste geschickt wird. %endif% %iftype digest% der Liste (im Digest-Modus) hinzuzufügen. Das heißt, dass Sie die an die Liste gesandten Mails in regelmäßigen Abständen (oder nach Erreichen einer bestimmten Nachrichtenmenge) zu einer Sammelmail zusammengefasst erhalten. %endif% %iftype nomail% der Liste (im No-Mail-Modus) hinzuzufügen. Das heißt, Sie erhalten zwar keine Nachrichten von der Liste, werden jedoch als Teilnehmer geführt. So dürfen Sie z.B. Nachrichten an die Liste senden und können die Diskussionen in einem Webarchiv oder über eine zweite angemeldete Mailadresse verfolgen %endif% %endif% %ifaction unsub% %^%%wrap% %ifreason admin% Ein Listenadministrator %endif% %ifreason request% Jemand (hoffentlich Sie selbst) %endif% hat eine Löschung der Mitgliedschaft Ihrer Mailadresse <$subaddr$> von der Liste beantragt. %endif% %wrap%Um sicher zu stellen, dass Sie das wirklich wollen, senden Sie eine Nachricht an <$confaddr$>, was gewöhnlich durch einfaches Antworten auf diese Mail erfolgen kann. Betreff und Text Ihrer Antwort können beliebig sein. Nach dem Absenden Ihrer Antwortmail sollten Sie eine Antwortnachricht erhalten, dass die Operation erfolgreich war. Sollten Sie das nicht wollen, können Sie diese Mail einfach ignorieren. mlmmj-1.2.18.0/listtexts/de/deny000644 000765 000120 00000005013 11734220454 016264 0ustar00benadmin000000 000000 %ifaction sub%Subject: Liste $list$@$domain$ kann nicht abonniert werden%endif% %ifaction unsub%Subject: Abonnement von $list$@$domain$ kann nicht abbestellt werden%endif% %ifaction release reject%Subject: Kann $list$@$domain$ nicht moderieren%endif% %ifaction permit obstruct%Subject: Kann $list$@$domain$ nicht zurückweisen%endif% %text prologue% %ifaction sub% %^%%wrap%Sie konnten der Liste nicht als Abonnent hinzugefügt werden, %ifreason disabled% weil die %iftype normal% normale Version %endif% %iftype digest% Digest-Version %endif% %iftype nomail% No-Mail-Version %endif% der Liste abgeschaltet ist. %endif% %ifreason closed% weil das Abonnieren dieser Liste per Mail nicht gestattet ist. because people are not allowed to subscribe to this list by email. %endif% %ifreason subbed% weil Sie unter dieser Mailadresse bereits als Abonnent eingetragen sind. %endif% %ifreason expired% weil Ihr Antrag zu lange unbearbeitet geblieben ist. %endif% %ifreason obstruct% weil ein Moderator Ihren Antrag abgewiesen hat. %endif% %endif% %ifaction unsub% %^%%wrap%Sie konnten die Liste nicht abbestellen, %ifreason unsubbed% weil Sie (unter dieser Mailadresse) nicht als Abonnent geführt werden. %^%%wrap%Sollten Sie Nachrichten von der Liste erhalten, könnte es sein, dass Sie mit einer anderen Mailadresse eingeschrieben sind. Um herauszufinden, mit welcher Mailadresse Sie eingeschrieben sind, sehen Sie sich in den Kopfzeilen einer Listenmail die Zeile "Return-Path" an. %endif% %endif% %ifaction release reject% %^%%wrap% %ifaction release% Sie konnten diese Nachricht nicht an die Liste durchlassen, %endif% %ifaction reject% Sie konnten diese Nachricht nicht abweisen, %endif% %ifreason notfound% weil die Nachricht nicht gefunden werden konnte. Möglicherweise hat ein anderer Moderator die Nachricht bereits bearbeitet, oder die Bearbeitungsfrist war abgelaufen. %endif% %ifreason moderators% weil sie kein Moderator dieser Liste sind. %endif% %endif% %ifaction permit obstruct% %^%%wrap% %ifaction permit% Sie konnten den Abonnement-Antrag nicht zulassen, %endif% %ifaction obstruct% Sie konnten den Abonnement-Antrag nicht abweisen, %endif% %ifreason notfound% weil er nicht gefunden wurde. Möglicherweise hat ein anderer Moderator ihn bearbeitet, oder die Bearbeitungsfrist war abgelaufen. %endif% %ifreason gatekeepers% weil Sie kein Moderator dieser Liste sind. %endif% %endif% mlmmj-1.2.18.0/listtexts/de/deny-post000644 000765 000120 00000003700 11734220454 017250 0ustar00benadmin000000 000000 Subject: Ihre Nachricht an $list$@$domain$ wurde abgewiesen: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Die Nachricht von <$posteraddr$> mit dem Betreff "$subject$" konnte nicht über die Liste verteilt werden, %ifreason maxmailsize% weil sie die maximal erlaubte Größe von $maxmailsize$ Bytes überschritten hat %endif% %ifreason tocc% weil die Listenadresse weder im An- noch im CC-Feld gefunden wurde %endif% %ifreason access% aufgrund der vom Listenadministrator aufgestellten Zugangsregeln. %endif% %ifreason expired% weil die Bearbeitungsfrist überschritten wurde und kein Moderator die Nachricht weitergeleitet hat. %endif% %ifreason reject% weil sie von einem Listenmoderator abgewiesen wurde. %endif% %ifreason subonlypost% weil Sie die Liste nicht abonniert haben. %ifcontrol closedlist closedlistsub% %^%%wrap%Wenn Sie die Liste abonnieren möchten, kontaktieren Sie einen Listenadministrator. Senden Sie dazu eine Mail an <$list+$owner@$domain$>. %endif% %^%%wrap%Wenn Sie denken, Sie hätten die Liste abonniert, so haben Sie wahrscheinlich eine abweichende Mailadresse verwendet. Um herauszufinden, unter welcher Mailadresse Sie die Liste abnoniert haben, sehen Sie entweder in der Begrüßungsmail ("Willkommen...") oder im Feld "Return-Path" in den Kopfzeilen einer über die Liste erhaltenen Nachricht nach. %endif% %ifreason maxmailsize% %^%(Der Anfang der abgewiesenen Mail ist unten gelistet.) %else% %^%(Die abgewiesene Mail ist unten angehängt.) %endif% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %ifreason maxmailsize% %^%%originalmail 300% %else% %^%%originalmail% %endif% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/de/digest000644 000765 000120 00000000246 11734220454 016607 0ustar00benadmin000000 000000 Subject: Zusammenfassung der Liste $list$@$domain$ Ausgabe: $digestissue$ ($digestinterval$) Themen (Nachrichten $digestfirst$ bis $digestlast$): - %digestthreads% mlmmj-1.2.18.0/listtexts/de/faq000644 000765 000120 00000000210 11734220454 016066 0ustar00benadmin000000 000000 Subject: FAQ (Häufig gestellte Fragen) zur Liste $list$@$domain$ - leider gibt es zur Zeit noch keine FAQ-Sammlung zu dieser Liste - mlmmj-1.2.18.0/listtexts/de/finish000644 000765 000120 00000002722 11734220454 016611 0ustar00benadmin000000 000000 %ifaction unsub%Subject: Auf Wiedersehen bei $list$@$domain$%endif% %ifaction release reject%Subject: $list$@$domain$ moderiert: $subject$%endif% %ifaction permit obstruct%Subject: Abgewiesen von $list$@$domain$: $subaddr$%endif% %ifaction post%Subject: Verteilt über $list$@$domain$: $subject$%endif% %text prologue% %ifaction unsub% %^%%wrap% %ifreason request% %endif% %ifreason confirm% Vielen Dank für Ihre Abmeldebestätigung. %endif% %ifreason admin% Ein Administrator hat Sie von der Liste gelöscht. %else% Sie wurden von der Liste gelöscht. %endif% %endif% %ifaction release% %^%%wrap%Sie haben die Nachricht von <$posteraddr$> mit dem Betreff "$subject$" erfolgreich an die Liste weitergeleitet. %endif% %ifaction reject% %^%%wrap%Sie haben die Nachricht von <$posteraddr$> mit dem Betreff "$subject$" erfolgreich abgewiesen. %endif% %ifaction permit% %^%%wrap%Sie haben die Listenanmeldung von <$subaddr$> erfolgreich zugelassen. %endif% %ifaction obstruct% %^%%wrap%Sie haben die Listenanmeldung von <$subaddr$> erfolgreich abgewiesen. %endif% %ifaction post% %^%%wrap% %ifreason confirm% Vielen Dank für die Bestätigung Ihrer %endif% %ifreason release% Ein Moderator hat Ihre %endif% %ifreason request% Danke für Ihre %endif% Nachricht mit dem Betreff %ifreason release% "$subject$" weitergeleitet. %else% "$subject$". %endif% Sie wird nun über die Liste verteilt. %endif% mlmmj-1.2.18.0/listtexts/de/finish-sub000644 000765 000120 00000002350 11746152500 017374 0ustar00benadmin000000 000000 Subject: Herzlich Willkommen bei $list$@$domain$ %text prologue% %wrap% %ifreason request% Vielen Dank für Ihre Anmeldung. %endif% %ifreason confirm% Vielen Dank für Ihre Anmeldebestätigung. %endif% %ifreason permit% Ein Listenmoderator hat Ihre Anmeldung akzeptiert. %endif% %ifreason switch% Ihr Listenabonnement wurde umgestellt auf die %else% %ifreason admin% Ein Administrator hat Sie angemeldet bei der %else% Sie wurden hinzugefügt zur %endif% %endif% %iftype normal% Normalversion %endif% %iftype digest% Digest-Version %endif% %iftype nomail% No-Mail-Version %endif% der Liste. %wrap%Ihre Abonnement-Adresse lautet <$subaddr$>. %ifcontrol closedlist% %^%%wrap%Zum Abmelden kontaktieren Sie bitte den Listenadministrator. Senden Sie dazu eine Mail an <$list+$owner@$domain$>. %else% %^%%wrap%Zum Abmelden senden Sie eine Mail an <$list+$unsubscribe@$domain$> Bitte achten Sie darauf die oben genannte Absender-Adresse zu benutzen. Betreff und Inhalt der Nachricht sind unerheblich. Sie erhalten eine Abmeldebestätigungsaufforderung oder eine Mail mit weiteren Instruktionen. %endif% %wrap%Um Hilfe und weitere Informationen zu dieser Liste zu erhalten, Senden Sie eine Mail an <$list+$help@$domain$>. mlmmj-1.2.18.0/listtexts/de/gatekeep-sub000644 000765 000120 00000001140 11734220454 017676 0ustar00benadmin000000 000000 Subject: Anmeldeantrag für $list$@$domain$: $subaddr$ %text prologue% %wrap%Ein Antrag von <$subaddr$> zur Anmeldung bei der %iftype normal% Normalversion %endif% %iftype digest% Digest-Version %endif% %iftype nomail% No-Mail-Version %endif% der Liste ist eingegangen. %wrap%Um die Anmeldung zu erlauben, senden Sie eine mail an <$permitaddr$>\ - ein einfaches Antworten auf diese Mail sollte in der Regel genügen. %wrap%Um die Anmeldung abzulehnen, Senden Sie eine Mail an <$obstructaddr$> oder ignorieren Sie diese Nachricht einfach. Folgende Moderatoren haben diese Mail erhalten: - %gatekeepers% mlmmj-1.2.18.0/listtexts/de/help000644 000765 000120 00000005744 11734220454 016270 0ustar00benadmin000000 000000 Subject: Informationen für die Liste $list$@$domain$ %text prologue% Mit dieser Mail erhalten Sie ein paar Informationen zur Mailingliste. Sie können folgende Listenverionen abonnieren: - %wrap%Die Normalversion: Von jeder Nachricht, die an die Liste gesandt wird, wird eine Kopie an die Abonennten verteilt. %ifcontrol closedlist closedlistsub% Zum Anmelden kontaktieren Sie bitte den Listenadministrator. %else% Zum Anmelden senden Sie eine Mail an <$list+$subscribe@$domain$>. %endif% %ifncontrol nodigestsub% %^%- %wrap%Die Digest-Version: Hierbei erhalten die Abonnenten mehrere Nachrichten in einer einzigen Mail verpackt, entweder in regelmäßigen Abständen, oder wenn sich genügend Nachrichten angesammelt haben. %ifcontrol closedlist closedlistsub% Zum Anmelden kontaktieren Sie bitte den Listenadministrator. %else% Zum Anmelden senden Sie eine Mail an <$list+$subscribe-digest@$domain$>. %endif% %endif% %ifncontrol nonomailsub% %^%- %wrap%Die No-Mail-Version: Abonnenten erhalten keine Mails von der Liste. Das heißt, sie dürfen an eine Liste schreiben, an welche nur Abonnenten schreiben dürfen, verfolgen die Listendiskussionen jedoch über ein Webarchiv oder eine andere angemeldete Mailadresse. %ifcontrol closedlist closedlistsub% Zum Anmelden kontaktieren Sie bitte den Listenadministrator. %else% Zum Anmelden senden Sie eine Mail an <$list+$subscribe-nomail@$domain$>. %endif% %endif% %ifcontrol submod% %^%%wrap%Anmeldeanträge an die Liste werden durch Moderatoren bearbeitet. %endif% %ifcontrol closedlist% %^%%wrap%Zum Abmelden kontaktieren Sie einen Listenadministrator. %else% %^%%wrap%Zum Abmelden senden Sie eine Mail an <$list+$unsubscribe@$domain$>. %endif% %wrap%Zum Schreiben an die Liste senden Sie eine Mail an <$list$@$domain$>. %ifcontrol subonlypost%%ifncontrol modnonsubposts% %^%%wrap%Es werden jedoch nur Mails von angemeldeten Teilnehmern verteilt. %endif%%endif% %ifcontrol moderated% %^%%wrap%Alle Mails an die Liste werden durch Moderatoren geprüft, bevor sie an die Liste weitergeleitet werden. %else% %ifcontrol subonlypost%%ifcontrol modnonsubposts% %^%%wrap%Die Listenmoderatoren prüfen alle Mails von Nicht-Abonnenten, bevor sie sie an die Liste weiterleiten. %endif%%endif% %endif% %ifcontrol access% %^%%wrap%Für die Liste sind Zugangsregeln vorhanden, mit denen gesteuert wird, wer an die Liste schreiben darf und wessen Mails moderiert werden. %endif% %ifncontrol noget%%ifncontrol noarchive% %^%%wrap% %ifcontrol subonlyget% Alle %else% Abonnenten %endif% können eine Nachricht Nummer N aus dem Listenarchiv nachbestellen, indem sie eine Mail an <$list+$get-N@$domain$> schicken (ersetzen Sie N mit der Nummer der gewünschten Nachricht). %endif%%endif% %wrap%Sie können die FAQ (Liste der häufigen Fragen) durch eine Mail an <$list+$faq@$domain$> anfordern. %wrap%Zum Kontaktieren des Listeneigentümers senden Sie eine Mail an <$list+$owner@$domain$>. mlmmj-1.2.18.0/listtexts/de/list000644 000765 000120 00000000675 11734220454 016311 0ustar00benadmin000000 000000 Subject: Abonnenten der Liste $list$@$domain$ %text prologue% %wrap%Liste der Abonnenten %iftype all% (für alle Versionen der Liste): %else% für die %iftype normal% Normalversion %endif% %iftype digest% Digest-Version %endif% %iftype nomail% No-Mail-Version %endif% der Liste: %endif% %iftype all normal% %^%- %listsubs% %endif% %iftype all digest% %^%- %digestsubs% %endif% %iftype all nomail% %^%- %nomailsubs% %endif% mlmmj-1.2.18.0/listtexts/de/moderate-post000644 000765 000120 00000002240 11734220454 020107 0ustar00benadmin000000 000000 Subject: Bitte moderieren Sie $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Eine Nachricht von <$posteraddr$> mit dem Betreff "$subject$" wurde an die Liste geschickt. Sie sollten die Nachricht moderieren, %ifreason modnonsubposts% da der Absender kein Abonnent ist. %endif% %ifreason moderated% da die Liste moderiert ist. %endif% %ifreason access% wegen einer Zugangsregel. %endif% Die Nachricht befindet sich unten. %wrap%Um die Nachricht an die Liste durchzulassen, senden Sie eine Mail an <$releaseaddr$>. In der Regel genügt hierzu ein einfaches Antworten auf diese Nachricht. %wrap%Wenn Sie nichts davon ausführen möchten, Senden Sie eine Mail an <$rejectaddr$> oder ignorieren Sie einfach diese Mail. Folgende Moderatoren haben diese Mail erhalten: - %moderators% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/de/notify000644 000765 000120 00000002130 11734220454 016632 0ustar00benadmin000000 000000 %ifaction sub%Subject: Angemeldet bei $list$@$domain$: $subaddr$%endif% %ifaction unsub%Subject: Abgemeldet von $list$@$domain$: $subaddr$%endif% %text prologue% %ifaction sub% %^%%wrap%Die Adresse <$subaddr$> wurde bei der %iftype normal% Normalversion %endif% %iftype digest% Digest-Version %endif% %iftype nomail% No-Mail-Version %endif% der Liste angemeldet %ifreason request% da ein Anmeldeantrag vorlag. %endif% %ifreason confirm% da ein Anmeldeantrag bestätigt wurde. %endif% %ifreason admin% da ein Administrator die Anmeldung durchgeführt hat. %endif% %ifreason permit% da die Anmeldung von einem Moderator zugelassen wurde. %endif% %endif% %ifaction unsub% %^%%wrap%Die Adresse <$subaddr$> wurde von der Liste abgemeldet, %ifreason request% da ein Abmeldeantrag vorlag. %endif% %ifreason confirm% da eine Abmeldebestätigung vorlag. %endif% %ifreason admin% da sie durch einen Administrator durchgeführt wurde. %endif% %ifreason bouncing% da Zustellversuche an diese Adresse zu lange erfolglos blieben. %endif% %endif% mlmmj-1.2.18.0/listtexts/de/probe000644 000765 000120 00000000515 11734220454 016436 0ustar00benadmin000000 000000 Subject: Erfolglose Nachrichtenzustellung von $list$@$domain$ %text prologue% Einige Mails an Sie konnten nicht zugestellt werden. Wenn Sie diese Nachricht erhalten, scheint die Störung beseitigt zu sein, und diese Nachricht dient lediglich Ihrer Information. Es folgt eine Liste der abgewiesenen Nachrichten: - %bouncenumbers% mlmmj-1.2.18.0/listtexts/de/prologue000644 000765 000120 00000000140 11734220454 017155 0ustar00benadmin000000 000000 %wrap%Hallo, hier ist das Programm Mlmmj, welches die Mailingliste <$list$@$domain$> verwaltet. mlmmj-1.2.18.0/listtexts/de/wait-post000644 000765 000120 00000001567 11734220454 017266 0ustar00benadmin000000 000000 Subject: Warte auf Moderation für $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Die Mail von <$posteraddr$> mit dem Betreff "$subject$" wurde an die Liste eingereicht. Jedoch ist vor der Weiterleitung eine Moderation erforderlich, %ifreason moderated% da es sich um eine moderierte Liste handelt. %endif% %ifreason access% da eine Zugangsregel dies erfordert. %endif% %ifreason modnonsubposts% weil Sie nicht auf der Liste eingeschrieben sind. %endif% (Die ist unten angefügt.) --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/de/wait-sub000644 000765 000120 00000000333 11734220454 017060 0ustar00benadmin000000 000000 Subject: Warte auf Zulassung zur Anmeldung bei $list$@$domain$ %text prologue% %wrap%Ihr Anmeldeantrag ist angekommen, jedoch muss er noch von einem Moderator bewertet werden, bevor die Anmeldung durchgeführt wird. mlmmj-1.2.18.0/listtexts/ast/confirm000644 000765 000120 00000003237 11746152500 017166 0ustar00benadmin000000 000000 %ifaction sub%Subject: Confirmar suscripción a $list$@$domain$%endif% %ifaction unsub%Subject: Confirmar des-suscripción de $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap% %ifreason admin% Un alministrador %endif% %ifreason request% Dalguién (esperamos que tu) %endif% pidió que la to direición de corréu <$subaddr$> s'amestara %iftype normal% a la llista. Esto quier dicir que cuando s'unvie un mensaxe a la llista, recibirás una copia del mesmu. %endif% %iftype digest% a la llista, pa recibir resumes. Esto quier dicir que recibirás múltiples mensaxes nun únicu mensaxe de corréu, a intervalos regulares, o cuando s'acumulen munchos mensaxes. %endif% %iftype nomail% a la llista, ensin entrega de corréu. Esto quier dicir que nun recibirás dengún mensaxe de la llista, pero tas consideráu miembru. Esto significa, por exemplu, que podrás escribir a una llista na que sólo los suscriptores puen facelo, mientres sigues la llista per un archivu web o otra direición de corréu suscrita. %endif% %endif% %ifaction unsub% %^%%wrap% %ifreason admin% Un alministrador %endif% %ifreason request% Dalguién (esperamos que tu) %endif% pidió que la direición de corréu <$subaddr$> se desanicie de la llista. %endif% %wrap%Pa confirmar que quies facelo, unvia un mensaxe a <$confaddr$> lo que de vezu pue facese simplemente respondiendo a esti mensaxe. L'asuntu y cuerpu del mensaxe puen ser cualesquier cosa. Tres facelo, tendríes de recibir una contestación pa informate de que la operación foi correuta. Si nun quies facer esto, simplemente salta esti mensaxe. mlmmj-1.2.18.0/listtexts/ast/deny000644 000765 000120 00000004336 11746152500 016471 0ustar00benadmin000000 000000 %ifaction sub%Subject: Nun se pudo suscribir $list$@$domain$%endif% %ifaction unsub%Subject: Nun se pudo des-suscribir $list$@$domain$%endif% %ifaction release reject%Subject: Nun se pudo moderar $list$@$domain$%endif% %ifaction permit obstruct%Subject: Nun se pudo supervisar $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap%Nun se pudo facer la suscripción a la llista %ifreason disabled% porque la versión %iftype normal% normal %endif% %iftype digest% resumida %endif% %iftype nomail% ensin corréu %endif% de la llista ta desactivada. %endif% %ifreason closed% porque nun se permite que la xente se suscriba a esta llista per corréu. %endif% %ifreason subbed% porque yá tas suscritu. %endif% %ifreason expired% porque pasó muncho tiempu ensin qu'un supervisor te permita la entrada. %endif% %ifreason obstruct% porque un supervisor te torgó la entrada. %endif% %endif% %ifaction unsub% %^%%wrap%Nun se pudo des-suscribite de la llista %ifreason unsubbed% porque nun tas suscritu. %^%%wrap%Si tas recibiendo mensaxes, seique teas suscritu con otra direición de corréu distinta. Pa saber con qué direición tas subscritu, mira nel mensaxe que te da la bienvenida a la llista, o mira na testera "Return-Path" d'un mensaxe del corréu que recibes de la llista. %endif% %endif% %ifaction release reject% %^%%wrap% %ifaction release% Nun pudisti desaniciar el mensaxe conseñáu de la llista %endif% %ifaction reject% Nun pudisti refugar el mensaxe conseñáu %endif% %ifreason notfound% porque nun se pudo alcontrar. Seique otru moderator yá lu desanició o lu refugó, o espiró. %endif% %ifreason moderators% porque nun yes moderador de la llista. %endif% %endif% %ifaction permit obstruct% %^%%wrap% %ifaction permit% Nun pudisti permitir la solicitú de suscripción conseñada %endif% %ifaction obstruct% Nun pudisti torgar la solicitú de suscripción conseñada %endif% %ifreason notfound% porque nun se pudo alcontrar. Seique otru moderator yá lu permitiera o lu torgara, o espiró. %endif% %ifreason gatekeepers% porque nun yes supervisor de la llista. %endif% %endif% mlmmj-1.2.18.0/listtexts/ast/deny-post000644 000765 000120 00000003422 11746152500 017447 0ustar00benadmin000000 000000 Subject: Mensaxe a $list$@$domain$ denegáu: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%El mensaxe de <$posteraddr$> con asuntu "$subject$" nun se pudo entregar a la llista %ifreason maxmailsize% porque pasó del tamañu máximu permitíu de mensaxe de $maxmailsize$ bytes. %endif% %ifreason tocc% porque la direición de la llista nun ta nes testeres Pa: o CC:. %endif% %ifreason access% por una regla d'accesu configurada pol alministrador de la llista. %endif% %ifreason expired% porque pasó muncho tiempu ensin que dengún moderador lu lliberara. %endif% %ifreason reject% porque un moderador refugólu. %endif% %ifreason subonlypost% porque nun yes suscriptor de la llista. %ifcontrol closedlist closedlistsub% %^%%wrap%Si quies suscribite, tendrás de comunicate con un alministrador de la llista. Pa facelo pues unviar un corréu al propietariu a <$list+$owner@$domain$>. %endif% %^%%wrap%Si pienses que yá tas suscritu, ye probable que te suscribieras con una direición de corréu distinta. Pa saber la direición cola que tas suscritu, mira nel mensaxe de bienvenida a la llista, o mira na testera "Return-Path" d'un mensaxe de corréu que recibas de la llista. %endif% %ifreason maxmailsize% %^%(El principiu del mensaxe denegáu ta más abaxo.) %else% %^%(El mensaxe denegáu ta más abaxo.) %endif% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %ifreason maxmailsize% %^%%originalmail 300% %else% %^%%originalmail% %endif% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/ast/digest000644 000765 000120 00000000225 11746152500 017002 0ustar00benadmin000000 000000 Subject: Resume de $list$@$domain$ volume $digestissue$ ($digestinterval$) Asuntos (mensaxes del $digestfirst$ al $digestlast$): - %digestthreads% mlmmj-1.2.18.0/listtexts/ast/faq000644 000765 000120 00000000163 11746152500 016273 0ustar00benadmin000000 000000 Subject: Entrugues y rempuestes frecuentes de $list$@$domain$ Sentímoslo, entá nun hai denguna FAQ disponible. mlmmj-1.2.18.0/listtexts/ast/finish000644 000765 000120 00000002435 11746152500 017010 0ustar00benadmin000000 000000 %ifaction unsub%Subject: Despedida de $list$@$domain$%endif% %ifaction release reject%Subject: Moderáu $list$@$domain$: $subject$%endif% %ifaction permit obstruct%Subject: Guardáu $list$@$domain$: $subaddr$%endif% %ifaction post%Subject: Unviáu a $list$@$domain$: $subject$%endif% %text prologue% %ifaction unsub% %^%%wrap% %ifreason request% %endif% %ifreason confirm% Gracies por confirmar que dexes de tar suscritu. %endif% %ifreason admin% Un alministrador te desanició de la llista. %else% Agora tas desaniciáu de la llista. %endif% %endif% %ifaction release% %^%%wrap%Lliberasti correutamente'l mensaxe de <$posteraddr$> con asuntu "$subject$" a la llista. %endif% %ifaction reject% %^%%wrap%Refugasti correutamente'l mensaxe de <$posteraddr$> con asuntu "$subject$". %endif% %ifaction permit% %^%%wrap%Permitisti correutamente que <$subaddr$> se xuna a la llista. %endif% %ifaction obstruct% %^%%wrap%Torgasti correutamente que <$subaddr$> se xuniera a la llista. %endif% %ifaction post% %^%%wrap% %ifreason confirm% Gracies por confirmar %endif% %ifreason release% Un moderador lliberó %endif% %ifreason request% Gracies por %endif% el to mensaxe con asuntu "$subject$". Agora ta distribuyendose a la llista. %endif% mlmmj-1.2.18.0/listtexts/ast/finish-sub000644 000765 000120 00000002315 11746152500 017574 0ustar00benadmin000000 000000 Subject: Bienveníu a $list$@$domain$ %text prologue% %wrap% %ifreason request% Gracies por solicitar xunite a nós. %endif% %ifreason confirm% Gracies por confirmar la to suscripción. %endif% %ifreason permit% Un supervisor te permitió xunite a nós. %endif% %ifreason switch% La to suscripción camudóse a la versión %else% %ifreason admin% Un alministrador te subscribió a la versión %else% Agora tas amestáu a la versión %endif% %endif% %iftype normal% normal %endif% %iftype digest% resumida %endif% %iftype nomail% ensin corréu %endif% de la llista. %wrap%La direición de corréu cola que tas suscritu ye <$subaddr$>. %ifcontrol closedlist% %^%%wrap%Si nel futuru quies des-suscribite, tendrás de ponete'n contautu con un alministrador de la llista. Pa facelo pues mandar un corréu a <$list+$owner@$domain$>. %else% %^%%wrap%Si nel futuru quies des-suscribite, manda un mensaxe a <$list+$unsubscribe@$domain$> usando esta direición de corréu. L'asuntu y cuerpu del mensaxe pue ser cualesquier cosa. Darréu recibirás una confirmación o más instrucciones. %endif% %wrap%Pa más información y ayuda tocante a esta llista, unvia un mensaxe a <$list+$help@$domain$>. mlmmj-1.2.18.0/listtexts/ast/gatekeep-sub000644 000765 000120 00000001072 11746152500 020100 0ustar00benadmin000000 000000 Subject: Solicitú de suscripción a $list$@$domain$: $subaddr$ %text prologue% %wrap%Hebo una solicitú de <$subaddr$> pa xunise a la versión %iftype normal% normal %endif% %iftype digest% resumida %endif% %iftype nomail% ensin corréu %endif% de la llista. %wrap%Pa permitilo, unvia un mensaxe a <$permitaddr$> lo que de vezu pue facese con sólo contestar a esti mensaxe. %wrap%Si nun quies facer esto, o bien pues unviar un mensaxe a <$obstructaddr$> o simplemente escaezte d'esti mensaxe. Los siguientes supervisores recibieron esti corréu: - %gatekeepers% mlmmj-1.2.18.0/listtexts/ast/help000644 000765 000120 00000005615 11746152500 016463 0ustar00benadmin000000 000000 Subject: Información de $list$@$domain$ %text prologue% Equí hai dalguna información tocante a la llista. Pues subscribite a les siguientes versiones: - %wrap%La versión normal: Cada vegada que s'unvia un mensaxe a la llista, los suscriptores reciben una copia del mesmu. %ifcontrol closedlist closedlistsub% Pa subscribite comunicate con un alministrador de la llista. %else% Pa subscribite manda un corréu a <$list+$subscribe@$domain$>. %endif% %ifncontrol nodigestsub% %^%- %wrap%La versión resumida: Los suscriptores reciben dellos mensaxes nun únicu corréu, a intervalos regulares, o cuando s'acumulen mensaxes abondo. %ifcontrol closedlist closedlistsub% Pa subscribite comunicate con un alministrador de la llista. %else% Pa subscribite manda un corréu a <$list+$subscribe-digest@$domain$>. %endif% %endif% %ifncontrol nonomailsub% %^%- %wrap%La versión ensin corréu: Los suscriptores nun reciben dengunu de los mensaxes de la llista. Poro, esto significa que puen espublizar nuna llista onde namái los suscriptores puen facelo, mentanto siguen la llista per un archivu web o per otra direición de corréu suscrita. %ifcontrol closedlist closedlistsub% Pa subscribite comunicate con un alministrador de la llista. %else% Pa subscribite manda un corréu a <$list+$subscribe-nomail@$domain$>. %endif% %endif% %ifcontrol submod% %^%%wrap%La llista tien supervisores que revisarán les solicitúes de suscripción enantes de permitir nuevos miembros. %endif% %ifcontrol closedlist% %^%%wrap%Pa des-subscribite comunicate con un alministrador de la llista. %else% %^%%wrap%Pa des-subscribite manda un corréu a <$list+$unsubscribe@$domain$>. %endif% %wrap%Los mensaxes s'asoleyen mandando un corréu a <$list$@$domain$>. %ifcontrol subonlypost%%ifncontrol modnonsubposts% %^%%wrap%Sicasí, namái los suscriptores puen escribir a la llista. %endif%%endif% %ifcontrol moderated% %^%%wrap%La llista tien moderadores que revisarán los mensaxes enantes de lliberalos a la llista. %else% %ifcontrol subonlypost%%ifcontrol modnonsubposts% %^%%wrap%La llista tien moderadores que revisarán los mensaxes de los non-suscriptores enantes de lliberalos a la llista. %endif%%endif% %endif% %ifcontrol access% %^%%wrap%La llista tamién tien regles d'accesu que puen afeutar a quién pue mandar mensaxes y qué mensaxes se moderen. %endif% %ifncontrol noget%%ifncontrol noarchive% %^%%wrap% %ifcontrol subonlyget% Toles persones %else% Los suscriptores %endif% puen rcuperar el mensaxe númberu N del archivu de la llista unviando un mensaxe a <$list+$get-N@$domain$> (camuda N pol númberu del mensaxe deseáu). %endif%%endif% %wrap%Pues recuperar el documentu d'entrugues frecuentes de la llista unviando un mensaxe a <$list+$faq@$domain$>. %wrap%Pa comunicate col propietariu de la llista, manda un mensaxe a <$list+$owner@$domain$>. mlmmj-1.2.18.0/listtexts/ast/list000644 000765 000120 00000000676 11746152500 016510 0ustar00benadmin000000 000000 Subject: Suscriptores a $list$@$domain$ %text prologue% %wrap%Esta ye la llista de suscriptores %iftype all% (a toles versiones de la llista): %else% a la versión %iftype normal% normal %endif% %iftype digest% resumida %endif% %iftype nomail% ensin corréu %endif% de la llista: %endif% %iftype all normal% %^%- %listsubs% %endif% %iftype all digest% %^%- %digestsubs% %endif% %iftype all nomail% %^%- %nomailsubs% %endif% mlmmj-1.2.18.0/listtexts/ast/moderate-post000644 000765 000120 00000002144 11746152500 020310 0ustar00benadmin000000 000000 Subject: Por favor, modera $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%Se recibió un mensaxe de <$posteraddr$> col asuntu "$subject$" unviáu pa espublizar. Te pedimos que lu moderes %ifreason modnonsubposts% porque'l remitente nun ye suscriptor. %endif% %ifreason moderated% porque esta ye una llista moderada. %endif% %ifreason access% por una regla d'accesu. %endif% El mensaxe ta más abaxo. %wrap%Pa lliberalu a la llista, unvia un mensaxe a <$releaseaddr$> pa lo que de vezu val con simplemente responder a esti mensaxe. %wrap%Si nun quies facer denguna d'estes coses, o manda un mensaxe a <$rejectaddr$> o simplemente salta esti mensaxe. Recibieron esti corréu los siguientes moderadores: - %moderators% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/ast/notify000644 000765 000120 00000002115 11746152500 017033 0ustar00benadmin000000 000000 %ifaction sub%Subject: Suscritu a $list$@$domain$: $subaddr$%endif% %ifaction unsub%Subject: Des-suscritu de $list$@$domain$: $subaddr$%endif% %text prologue% %ifaction sub% %^%%wrap%La direición <$subaddr$> suscribiose a la versión %iftype normal% normal %endif% %iftype digest% resumida %endif% %iftype nomail% ensin corréu %endif% de la llista %ifreason request% porque se recibió una solicitú pa xunise. %endif% %ifreason confirm% porque se confirmó una solicitú pa xunise. %endif% %ifreason admin% por mandatu d'un alministrador. %endif% %ifreason permit% porque lo permitió un supervisor. %endif% %endif% %ifaction unsub% %^%%wrap%La direición <$subaddr$> se des-suscribió de la llista %ifreason request% porque se recibió una solicitú pa desaniciar la suscripción. %endif% %ifreason confirm% porque se confirmó una solicitú pa desaniciar la suscripción. %endif% %ifreason admin% por mandatu d'un alministrador. %endif% %ifreason bouncing% porque tien rebotes d'hai demasiao tiempu. %endif% %endif% mlmmj-1.2.18.0/listtexts/ast/probe000644 000765 000120 00000000434 11746152500 016634 0ustar00benadmin000000 000000 Subject: Mensaxes rebotaos de $list$@$domain$ %text prologue% Dellos mensaxes pa ti nun se pudieron entregar. Si tas viendo esti mensaxe quier dicir que les coses vuelven a ser normales, y esto ye namái pa informate. Esta ye la llista de los mensaxes rebotaos: - %bouncenumbers% mlmmj-1.2.18.0/listtexts/ast/prologue000644 000765 000120 00000000132 11746152500 017354 0ustar00benadmin000000 000000 %wrap%Bones, esti ye'l programa Mlmmj xestionando la llista de corréu <$list$@$domain$>. mlmmj-1.2.18.0/listtexts/ast/wait-post000644 000765 000120 00000001520 11746152500 017451 0ustar00benadmin000000 000000 Subject: Esperando lliberación a $list$@$domain$: $subject$ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_$random0$$random1$_=" Content-Transfer-Encoding: 8bit --=_$random0$$random1$_= Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %text prologue% %wrap%El mensaxe de <$posteraddr$> col asuntu "$subject$" s'unvió a la llista. Sicasí, se pidió que los moderadores lu revisen enantes de lliberalu a la llista %ifreason moderated% porque esta ye una llista moderada. %endif% %ifreason access% por una regla d'accesu. %endif% %ifreason modnonsubposts% porque nun yes suscriptor. %endif% (El mensaxe ta más abaxo.) --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.2.18.0/listtexts/ast/wait-sub000644 000765 000120 00000000331 11746152500 017254 0ustar00benadmin000000 000000 Subject: Esperando permisu pa xunite a $list$@$domain$ %text prologue% %wrap%Recibióse la to solicitú pa xunite a la llista. Sicasí, ta pidiéndose a los supervisores que la revisen enantes de permitite facelo. mlmmj-1.2.18.0/include/checkwait_smtpreply.h000644 000765 000120 00000002713 11414633670 020633 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef CHECK_REPLY_H #define CHECK_REPLY_H #define MLMMJ_CONNECT 1 #define MLMMJ_HELO 2 #define MLMMJ_FROM 4 #define MLMMJ_RCPTTO 8 #define MLMMJ_DATA 16 #define MLMMJ_DOT 32 #define MLMMJ_QUIT 64 #define MLMMJ_RSET 128 #include "mlmmj.h" char *checkwait_smtpreply(int sockfd, int replytype); #endif /* CHECK_REPLY_H */ mlmmj-1.2.18.0/include/chomp.h000644 000765 000120 00000002352 11414633670 015657 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef MLMMJ_CHOMP__H #define MLMMJ_CHOMP__H char *chomp(char *str); #endif /* MLMMJ_CHOMP__H */ mlmmj-1.2.18.0/include/ctrlvalue.h000644 000765 000120 00000002570 11727635244 016562 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef CTRLVALUE_H #define CTRLVALUE_H char *ctrlvalue(const char *listdir, const char *ctrlstr); char *ctrlcontent(const char *listdir, const char *ctrlstr); char *textcontent(const char *listdir, const char *ctrlstr); #endif /* CTRLVALUE_H */ mlmmj-1.2.18.0/include/ctrlvalues.h000644 000765 000120 00000002440 11414633670 016733 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef CTRLVALUES_H #define CTRLVALUES_H #include "mlmmj.h" struct strlist *ctrlvalues(const char *listdir, const char *ctrlstr); #endif /* CTRLVALUES_H */ mlmmj-1.2.18.0/include/do_all_the_voodoo_here.h000644 000765 000120 00000003122 11727635244 021235 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef DO_ALL_THE_VOODOO_HERE_H #define DO_ALL_THE_VOODOO_HERE_H #include "mlmmj.h" /* For struct mailhdr and struct strlist */ int findit(const char *line, const char **headers); void getinfo(const char *line, struct mailhdr *readhdrs); int do_all_the_voodoo_here(int infd, int outfd, int hdrfd, int footfd, const char **delhdrs, struct mailhdr *readhdrs, struct strlist *allhdrs, const char *subjectprefix); #endif /* DO_ALL_THE_VOODOO_HERE_H */ mlmmj-1.2.18.0/include/find_email_adr.h000644 000765 000120 00000002611 11414633670 017464 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef FIND_EMAIL_ADR_H #define FIND_EMAIL_ADR_H #include struct email_container { int emailcount; char **emaillist; }; struct email_container *find_email_adr(const char *str, struct email_container *retval); #endif /* FIND_EMAIL_ADR_H */ mlmmj-1.2.18.0/include/getaddrsfromfd.h000644 000765 000120 00000002473 11414633670 017550 0ustar00benadmin000000 000000 /* Copyright (C) 2005 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef GETADDRSFROMFD_H #define GETADDRSFROMFD_H #include #include "mlmmj.h" off_t getaddrsfromfd(struct strlist *slist, int fd, int max); #endif /* GETADDRSFROMFD_H */ mlmmj-1.2.18.0/include/gethdrline.h000644 000765 000120 00000002340 11414633670 016673 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef GETHDRLINE_H #define GETHDRLINE_H char *gethdrline(int fd); #endif /* GETHDRLINE_H */ mlmmj-1.2.18.0/include/getlistaddr.h000644 000765 000120 00000002367 11414633670 017065 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef GETLISTADDR_H #define GETLISTADDR_H char *getlistaddr(const char *listdir); #endif /* GETLISTADDR_H */ mlmmj-1.2.18.0/include/getlistdelim.h000644 000765 000120 00000002355 11414633670 017242 0ustar00benadmin000000 000000 /* Copyright 2005 Joel Aelwyn * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef GETLISTDELIM_H #define GETLISTDELIM_H char *getlistdelim(const char *listdir); #endif /* GETLISTDELIM_H */ mlmmj-1.2.18.0/include/incindexfile.h000644 000765 000120 00000002371 11414633670 017213 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef INCINDEXFILE_H #define INCINDEXFILE_H int incindexfile(const char *listdir); #endif /* INCINDEXFILE_H */ mlmmj-1.2.18.0/include/init_sockfd.h000644 000765 000120 00000002432 11414633670 017044 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef INIT_SOCKFD_H #define INIT_SOCKFD_H void init_sockfd(int *sockfd, const char *relayhost, unsigned short port); #endif /* INIT_SOCKFD_H */ mlmmj-1.2.18.0/include/itoa.h000644 000765 000120 00000002372 11414633670 015507 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef _ITOA_H_ #define _ITOA_H_ void reversestr(char *str); void itoa(int n, char *str); #endif /* _ITOA_H_ */ mlmmj-1.2.18.0/include/listcontrol.h000644 000765 000120 00000002702 11414633670 017124 0ustar00benadmin000000 000000 /* Copyright (C) 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef LISTCONTROL_H #define LISTCONTROL_H #include "find_email_adr.h" int listcontrol(struct email_container *fromemails, const char *listdir, const char *controlstr, const char *mlmmjsub, const char *mlmmjunsub, const char *mlmmjsend, const char *mlmmjbounce, const char *mailname); #endif /* LISTCONTROL_H */ mlmmj-1.2.18.0/include/log_error.h000644 000765 000120 00000002670 11727635244 016554 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef LOG_ERROR_H #define LOG_ERROR_H #include #include #define LOG_ARGS __FILE__, __LINE__, strerror(errno) void log_set_name(const char *name); void log_free_name(void); void log_error(const char *file, int line, const char *errstr, const char *fmt, ...); #endif /* LOG_ERROR_H */ mlmmj-1.2.18.0/include/log_oper.h000644 000765 000120 00000002416 11414633670 016360 0ustar00benadmin000000 000000 /* Copyright (C) 2005 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef LOG_OPER_H #define LOG_OPER_H int log_oper(const char *prefix, const char *basename, const char *fmt, ...); #endif /* LOG_OPER_H */ mlmmj-1.2.18.0/include/mail-functions.h000644 000765 000120 00000003624 11414633670 017504 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef MAIL_FUNCTIONS_H #define MAIL_FUNCTIONS_H #define WRITE_BUFSIZE 1024 #include int write_helo(int sockfd, const char *hostname); int write_mail_from(int sockfd, const char *from_addr, const char *extra); int write_rcpt_to(int sockfd, const char *rcpt_addr); int write_custom_line(int sockfd, const char *line); int write_mailbody_from_map(int sockfd, char *mailmap, size_t mailsize, const char *tohdr); char *get_preppedhdrs_from_map(char *mapstart, size_t *hdrslen); char *get_prepped_mailbody_from_map(char *mapstart, size_t size, size_t *bodylen); int write_replyto(int sockfd, const char *replyaddr); int write_dot(int sockfd); int write_quit(int sockfd); int write_data(int sockfd); int write_rset(int sockfd); #endif /* MAIL_FUNCTIONS_H */ mlmmj-1.2.18.0/include/memory.h000644 000765 000120 00000003227 11414633670 016063 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Morten K. Poulsen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef _MEMORY_H #define _MEMORY_H 1 void *__mymalloc(const char *file, int line, size_t size); void *__myrealloc(const char *file, int line, void *ptr, size_t size); void __myfree(const char *file, int line, void *ptr); char *__mystrdup(const char *file, int line, const char *str); #define mymalloc(s) __mymalloc(__FILE__, __LINE__, s) #define myrealloc(p,s) __myrealloc(__FILE__, __LINE__, p, s) #define myfree(p) __myfree(__FILE__, __LINE__, p) #define mystrdup(p) __mystrdup(__FILE__, __LINE__, p) #endif /* _MEMORY_H */ mlmmj-1.2.18.0/include/mlmmj-maintd.h000644 000765 000120 00000004353 11414633670 017142 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef MLMMJ_MAINTD_H #define MLMMJ_MAINTD_H #include int delolder(const char *dirname, time_t than); int clean_moderation(const char *listdir); int clean_discarded(const char *listdir); int resend_queue(const char *listdir, const char *mlmmjsend); int resend_requeue(const char *listdir, const char *mlmmjsend); int clean_nolongerbouncing(const char *listdir); int probe_bouncers(const char *listdir, const char *mlmmjbounce); int unsub_bouncers(const char *listdir, const char *mlmmjunsub); int run_digests(const char *listdir, const char *mlmmjsend); /* I know the below is nasty, but it requires C99 to have multiple * argument macros, and this would then be the only thing needing * C99 -- Jun 09 2004, mmj */ #define WRITEMAINTLOG4( s1, s2, s3, s4 ) do { \ logstr = concatstr( s1, s2, s3, s4 ) ;\ writen(maintdlogfd, logstr, strlen(logstr)); \ myfree(logstr); \ } while (0); #define WRITEMAINTLOG6( s1, s2, s3, s4, s5, s6 ) do { \ logstr = concatstr( s1, s2, s3, s4, s5, s6 ) ;\ writen(maintdlogfd, logstr, strlen(logstr)); \ myfree(logstr); \ } while (0); #endif /* MLMMJ_MAINTD_H */ mlmmj-1.2.18.0/include/mlmmj-process.h000644 000765 000120 00000002325 11414633670 017341 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef MMJML_PROCESS_H #define MMJML_PROCESS_H #endif /* MMJML_PROCESS_H */ mlmmj-1.2.18.0/include/mlmmj-receive.h000644 000765 000120 00000002373 11727635244 017316 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef MMJML_RECEIVE_H #define MMJML_RECEIVE_H void free_str_array(char **to_free); #endif /* MMJML_RECEIVE_H */ mlmmj-1.2.18.0/include/mlmmj-send.h000644 000765 000120 00000004663 11414633670 016623 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef MMJML_SEND_H #define MMJML_SEND_H int send_mail(int sockfd, const char *from, const char *to, const char *replyto, char *mailmap, size_t mailsize, const char *listdir, const char *mlmmjbounce, const char *hdrs, size_t hdrslen, const char *body, size_t bodylen); int send_mail_many_fd(int sockfd, const char *from, const char *replyto, char *mailmap, size_t mailsize, int subfd, const char *listaddr, const char *listdelim, const char *archivefilename, const char *listdir, const char *mlmmjbounce, const char *hdrs, size_t hdrslen, const char *body, size_t bodylen); int send_mail_many_list(int sockfd, const char *from, const char *replyto, char *mailmap, size_t mailsize, struct strlist *addrs, const char *listaddr, const char *listdelim, const char *archivefilename, const char *listdir, const char *mlmmjbounce, const char *hdrs, size_t hdrslen, const char *body, size_t bodylen); int send_mail_verp(int sockfd, struct strlist *addrs, char *mailmap, size_t mailsize, const char *from, const char *listdir, const char *hdrs, size_t hdrslen, const char *body, size_t bodylen, const char *extra); int initsmtp(int *sockfd, const char *relayhost, unsigned short port); int endsmtp(int *sockfd); #endif /* MMJML_SEND_H */ mlmmj-1.2.18.0/include/mlmmj-sub.h000644 000765 000120 00000002333 11727635244 016461 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef MLMMJ_SUBSCRIBE_H #define MLMMJ_SUBSCRIBE_H #endif /* MLMMJ_SUBSCRIBE_H */ mlmmj-1.2.18.0/include/mlmmj-unsub.h000644 000765 000120 00000002341 11727635244 017023 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef MLMMJ_UNSUBSCRIBE_H #define MLMMJ_UNSUBSCRIBE_H #endif /* MLMMJ_UNSUBSCRIBE_H */ mlmmj-1.2.18.0/include/mlmmj.h000644 000765 000120 00000010233 11734220454 015657 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003, 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef MLMMJ_GENERIC_INCLUDES #define MLMMJ_GENERIC_INCLUDES #include "config.h" #define RELAYHOST "127.0.0.1" #define READ_BUFSIZE 2048 #define DEFAULT_RECIPDELIM "+" /* Default recipient delimiter */ #define MODREQLIFE 604800 /* How long time will moderation requests be kept? * 604800s is 7 days */ #define DISCARDEDLIFE 604800 /* How long time will discarded mails be kept? * 604800s is 7 days */ #define CONFIRMLIFE 604800 /* How long time will (un)sub confirmations be kept? * 604800s is 7 days */ #define BOUNCELIFE 432000 /* How long time can addresses bounce before unsubscription happens? 432000s is 5 days Tweakable with control/bouncelife */ #define WAITPROBE 43200 /* How long do we wait for a bounce of the probe mail before concluding the address is no longer bouncing? 43200 is 12 hours */ #define MAINTD_SLEEP 7200 /* How long between maintenance runs when mlmmj-maintd runs daemonized? 7200s is 2 hours */ #define MAINTD_LOGFILE "mlmmj-maintd.lastrun.log" #define MEMORYMAILSIZE 16384 /* How big can a mail be before we don't want to it in memory? control/memorymailsize */ #define DIGESTINTERVAL 604800 /* How long do we collect mails for digests * 604800s is 7 days */ #define DIGESTMAXMAILS 50 /* How many mails can accumulate before we send the * digest */ #define DIGESTMIMETYPE "digest" /* Which sub-type of multipart to use when * sending digest mails */ #define OPLOGFNAME "mlmmj.operation.log" /* logfile to log operations */ #define OPLOGSIZE 524288 #define MAXVERPRECIPS 100 struct strlist { int count; char **strs; }; struct mailhdr { const char *token; int valuecount; char **values; }; /* Has to go here, since it's used in many places */ enum subtype { SUB_NORMAL, SUB_DIGEST, SUB_NOMAIL, SUB_FILE, /* For single files (moderator, owner etc.) */ SUB_ALL, /* For listing or unsubscribing all kinds of subscribers */ SUB_BOTH, /* For normal+digest subscription */ SUB_NONE /* For when an address is not subscribed at all */ }; char *subtype_strs[7]; /* count matches enum above; defined in subscriberfuncs.c */ enum subreason { SUB_REQUEST, SUB_CONFIRM, SUB_PERMIT, SUB_ADMIN, SUB_BOUNCING, SUB_SWITCH }; char * subreason_strs[6]; /* count matches enum above; defined in subscriberfuncs.c */ void print_version(const char *prg); #define MY_ASSERT(expression) if (!(expression)) { \ errno = 0; \ log_error(LOG_ARGS, "assertion failed"); \ exit(EXIT_FAILURE); \ } #define CHECKFULLPATH(name) if(strchr(name, '/') == NULL) { \ fprintf(stderr, "All mlmmj binaries have to " \ "be invoked with full path,\n" \ "e.g. /usr/local/bin/%s\n", name); \ exit(EXIT_FAILURE); \ }; /* make sure we use the wrappers */ #ifndef _MEMORY_C #define malloc Bad_programmer__no_biscuit #define realloc Bad_programmer__no_biscuit #define free Bad_programmer__no_biscuit #ifdef strdup #undef strdup #define strdup Bad_programmer__no_biscuit #endif /* strdup */ #endif /* _MEMORY_C */ #endif /* MLMMJ_GENERIC_INCLUDES */ mlmmj-1.2.18.0/include/mygetline.h000644 000765 000120 00000002541 11727635244 016554 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003, 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef MYGETLINE_H #define MYGETLINE_H #define BUFSIZE 256 #if 0 #include char *myfgetline(FILE *infile); #endif char *mygetline(int fd); char *mygetcontent(int fd); #endif /* #ifndef MYGETLINE_H */ mlmmj-1.2.18.0/include/mylocking.h000644 000765 000120 00000002367 11414633670 016553 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef MYLOCKING_H #define MYLOCKING_H int myexcllock(int fd); int myunlock(int fd); #endif /* MYLOCKING_H */ mlmmj-1.2.18.0/include/prepstdreply.h000644 000765 000120 00000005530 11734220454 017304 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * Copyright (C) 2011 Ben Schmidt * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef PREPSTDREPLY_H #define PREPSTDREPLY_H struct text; typedef struct text text; typedef void (*rewind_function)(void *state); typedef const char *(*get_function)(void *state); struct memory_lines_state; typedef struct memory_lines_state memory_lines_state; struct file_lines_state; typedef struct file_lines_state file_lines_state; memory_lines_state *init_memory_lines(const char *lines); void rewind_memory_lines(void *state); const char *get_memory_line(void *state); void finish_memory_lines(memory_lines_state *s); file_lines_state *init_file_lines(const char *filename, int open_now); file_lines_state *init_truncated_file_lines(const char *filename, int open_now, char truncate); void rewind_file_lines(void *state); const char *get_file_line(void *state); void finish_file_lines(file_lines_state *s); char *substitute(const char *line, const char *listaddr, const char *listdelim, const char *listdir, text *txt); text *open_text_file(const char *listdir, const char *filename); text *open_text(const char *listdir, const char *purpose, const char *action, const char *reason, const char *type, const char *compat); void register_unformatted(text *txt, const char *token, const char *subst); void register_originalmail(text *txt, const char *mailname); void register_formatted(text *txt, const char *token, rewind_function rew, get_function get, void * state); char *get_processed_text_line(text *txt, int headers, const char *listaddr, const char *listdelim, const char *listdir); char *prepstdreply(text *txt, const char *listdir, const char *from, const char *to, const char *replyto); void close_text(text *txt); #endif /* PREPSTDREPLY_H */ mlmmj-1.2.18.0/include/remailfile.h000644 000765 000120 00000002404 11414633670 016660 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef REMAILFILE_H #define REMAILFILE_H int remailfile(const char *mailfilename, int deletewhensent); #endif /* REMAILFILE_H */ mlmmj-1.2.18.0/include/send_digest.h000644 000765 000120 00000002503 11414633670 017037 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Morten K. Poulsen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef SEND_DIGEST_H #define SEND_DIGEST_H int send_digest(const char *listdir, int lastindex, int index, int issue, const char *addr, const char *mlmmjsend); #endif /* SEND_DIGEST_H */ mlmmj-1.2.18.0/include/send_help.h000644 000765 000120 00000002441 11734220454 016506 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef SEND_HELP_H #define SEND_HELP_H void send_help(const char *listdir, const char *queuefilename, const char *emailaddr, const char *mlmmjsend); #endif mlmmj-1.2.18.0/include/send_list.h000644 000765 000120 00000002414 11414633670 016534 0ustar00benadmin000000 000000 /* Copyright (C) 2005 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef SEND_LIST_H #define SEND_LIST_H void send_list(const char *listdir, const char *emailaddr, const char *mlmmjsend); #endif mlmmj-1.2.18.0/include/statctrl.h000644 000765 000120 00000002370 11414633670 016411 0ustar00benadmin000000 000000 /* Copyright (C) 2004 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef STATCTRL_H #define STATCTRL_H int statctrl(const char *listdir, const char *ctrlstr); #endif /* STATCTRL_H */ mlmmj-1.2.18.0/include/strgen.h000644 000765 000120 00000003161 11727635244 016060 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef STRGEN_H #define STRGEN_H char *random_str(void); char *random_plus_addr(const char *addr); char *headerstr(const char *headertoken, const char *str); char *genlistname(const char *listaddr); char *genlistfqdn(const char *listaddr); char *concatstr(int count, ...); char *hostnamestr(void); char *mydirname(const char *path); char *mybasename(const char *path); char *cleanquotedp(const char *qpstr); char *genmsgid(const char *fqdn); char *gendatestr(void); #endif /* STRGEN_H */ mlmmj-1.2.18.0/include/subscriberfuncs.h000644 000765 000120 00000002622 11734220454 017750 0ustar00benadmin000000 000000 /* Copyright (C) 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef SUBSCRIBERFUNC_H #define SUBSCRIBERFUNC_H off_t find_subscriber(int fd, const char *address); int is_subbed_in(const char *subddirname, const char *address); enum subtype is_subbed(const char *listdir, const char *address, int both); #endif /* SUBSCRIBERFUNC_H */ mlmmj-1.2.18.0/include/unistr.h000644 000765 000120 00000003667 11734220454 016104 0ustar00benadmin000000 000000 /* Copyright (C) 2005 Morten K. Poulsen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef UNISTR_H #define UNISTR_H typedef unsigned int unistr_char; typedef struct _unistr { size_t len; size_t alloc_len; unistr_char *chars; } unistr; unistr *unistr_new(void); void unistr_free(unistr *str); int unistr_cmp(const unistr *str1, const unistr *str2); unistr *unistr_dup(const unistr *str); void unistr_append_char(unistr *str, unistr_char uc); void unistr_append_usascii(unistr *str, const char *binary, size_t bin_len); void unistr_append_utf8(unistr *str, const char *binary, size_t bin_len); void unistr_append_iso88591(unistr *str, const char *binary, size_t bin_len); void unistr_dump(const unistr *str); char *unistr_to_utf8(const unistr *str); char *unistr_header_to_utf8(const char *str); char *unistr_utf8_to_header(const char *str); char *unistr_escaped_to_utf8(const char *str); #endif mlmmj-1.2.18.0/include/wrappers.h000644 000765 000120 00000002571 11414633670 016417 0ustar00benadmin000000 000000 /* Copyright (C) 2002, 2003 Mads Martin Joergensen * * $Id$ * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef WRAPPERS_H #define WRAPPERS_H #include ssize_t writen(int fd, const void *vptr, size_t n); ssize_t readn(int fd, void *vptr, size_t n); int random_int(void); int dumpfd2fd(int infd, int outfd); #endif /* WRAPPERS_H */ mlmmj-1.2.18.0/contrib/amime-receive/000755 000765 000120 00000000000 11727635243 017130 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/Makefile.am000644 000765 000120 00000000161 11727635243 016452 0ustar00benadmin000000 000000 ## Process this file with automake to produce Makefile.in EXTRA_DIST = web amime-receive SUBDIRS = receivestrip mlmmj-1.2.18.0/contrib/Makefile.in000644 000765 000120 00000041503 11761151557 016467 0ustar00benadmin000000 000000 # Makefile.in generated by automake 1.12 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } 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 = : subdir = contrib DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/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__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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@ 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ 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@ 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_CC = @ac_ct_CC@ 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_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ textlibdir = @textlibdir@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = web amime-receive SUBDIRS = receivestrip 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) --gnu contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu contrib/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): # 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 cscopelist-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ 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" cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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 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 pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ cscopelist-recursive 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 cscopelist \ cscopelist-recursive ctags ctags-recursive distclean \ distclean-generic 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 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: mlmmj-1.2.18.0/contrib/receivestrip/000755 000765 000120 00000000000 11761151616 017117 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/000755 000765 000120 00000000000 11727635244 015176 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/perl-admin/000755 000765 000120 00000000000 11727635243 017225 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/perl-user/000755 000765 000120 00000000000 11727635244 017114 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/php-admin/000755 000765 000120 00000000000 11734220454 017042 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/php-moderation/000755 000765 000120 00000000000 11727635244 020124 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/php-user/000755 000765 000120 00000000000 11727635244 016741 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/php-user/example.html000644 000765 000120 00000002035 11414633670 021254 0ustar00benadmin000000 000000 mlmmj-webinterface

subscribe


unsubscribe


mlmmj-1.2.18.0/contrib/web/php-user/mlmmj.php000644 000765 000120 00000007253 11727635244 020575 0ustar00benadmin000000 000000 * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ // error_reporting(E_ALL); class mlmmj { var $email; var $mailinglist; var $job; var $redirect_success; var $redirect_failure; var $delimiter; var $errors; function is_email($string="") { if (eregi("^[a-z0-9\._-]+".chr(64)."+[a-z0-9\._-]+\.+[a-z]{2,4}$", $string)) { return TRUE; } else { return FALSE; } } function error($string="") { $this->errors = TRUE; // die($string); } function mlmmj() { // set mandatory vars... $this->errors = FALSE; $this->delimiter = "+"; if (!isset($_POST["email"]) && !isset($_POST["mailinglist"]) && !isset($_POST["job"]) && !isset($_POST["redirect_success"]) && !isset($_POST["redirect_failure"])) { $this->errors = TRUE; if(isset($_POST["redirect_failure"])) { header("Location: ".$_POST["redirect_failure"]); exit; } else die("An error occurred. Please check contrib/web/php-user/README for details."); } else { if($this->is_email($_POST["email"])) $this->email = $_POST["email"]; else $this->error("ERROR: email is not a valid email address."); if($this->is_email($_POST["mailinglist"])) $this->mailinglist = $_POST["mailinglist"]; else $this->error("ERROR: mailinglist is not a valid email address."); $this->job = $_POST["job"]; if(!(($this->job == "subscribe") OR ($this->job == "unsubscribe"))) { $this->error("ERROR: job unknown."); } $this->redirect_failure = $_POST["redirect_failure"]; $this->redirect_success = $_POST["redirect_success"]; } // now we should try to go ahead and {sub,unsub}scribe... ;) if(!$this->errors) { // @ ^= char(64) $to = str_replace(chr(64),$this->delimiter.$this->job.chr(64),$this->mailinglist); $subject = $this->job." to ".$this->mailinglist; $body = $this->job; $addheader = ""; $addheader .= "Received: from ". $_SERVER["REMOTE_ADDR"] ." by ". $_SERVER["SERVER_NAME"]. " with HTTP;\r\n\t".date("r")."\n"; $addheader .= "X-Originating-IP: ".$_SERVER["REMOTE_ADDR"]."\n"; $addheader .= "X-Mailer: mlmmj-webinterface powered by PHP/". phpversion() ."\n"; $addheader .= "From: ".$this->email."\n"; $addheader .= "Cc: ".$this->email."\n"; if(!mail($to, $subject, $body, $addheader)) $this->error($this->job." failed."); } if($this->errors) { header("Location: ".$this->redirect_failure); exit; } else { header("Location: ".$this->redirect_success); exit; } } } $mailinglist = new mlmmj; ?> mlmmj-1.2.18.0/contrib/web/php-user/README000644 000765 000120 00000002155 11414633670 017616 0ustar00benadmin000000 000000 README webinterface Jun 27th 2004 Ehh, what's that? The mlmmj-webinterface was created to give people the opportunity to {sub,unsub}scribe to a mailinglists via a webinterface (without having to write an initial {sub,unsub}scribe-mail). What are the requirements? You only need a webserver with PHP >= 3.0.8 support. How can I install/use the webinterface? - Upload mlmmj.php to your webserver. - Have a look at example.html and copy one or both forms into your website. - Adjust the options to satisfy your needs: The mailinglist your want to {sub,unsub}scribe to: Do you want to subscribe or unsubscribe? Where do you want to redirect your user after a failure? What should be the success redirect? That's it - have a lot of fun! Christoph Thiel mlmmj-1.2.18.0/contrib/web/php-moderation/build-translations.sh000755 000765 000120 00000001533 11727635244 024303 0ustar00benadmin000000 000000 #!/bin/bash # # Build script for generating the MLMMJ moderation web interface locales # set -e LOCALE_TRANS=fr_FR WEB_SCRIPT_FILES=mlmmj-moderation.php if [ ! -d translations ]; then echo "Wrong working directory." >&2 exit 1 fi echo "===> Managing internationalizations and localizations" echo "=> Extracting strings from sources" xgettext $WEB_SCRIPT_FILES -o translations/templates.pot echo "=> Merging in every language .po file:" for i in $LOCALE_TRANS; do echo -n "$i " msgmerge -s -U "translations/$i.po" translations/templates.pot done echo "=> Creating l10n folders" for i in $LOCALE_TRANS; do mkdir -p "translations/locale/$i/LC_MESSAGES" done echo "=> Creating binary formats of language files:" for i in $LOCALE_TRANS; do echo -n $i" " msgfmt -c -v -o "translations/locale/$i/LC_MESSAGES/messages.mo" \ "translations/$i.po" done mlmmj-1.2.18.0/contrib/web/php-moderation/dot.htaccess000644 000765 000120 00000000143 11727635244 022427 0ustar00benadmin000000 000000 Require valid-user AuthType Basic AuthName "mlmmj web-interface" AuthUserFile /home/mlmmj/htpasswd mlmmj-1.2.18.0/contrib/web/php-moderation/mlmmj-moderation.php000644 000765 000120 00000024241 11727635244 024113 0ustar00benadmin000000 000000 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ // These are the configuration variables for your list $mod_dir = "/some/path/to/your/listname/moderation"; $list_name = "listname"; $list_domain = "example.com"; $delimiter = "+"; $from_addr = "user@example.com"; // Manage accepted language and cookies $txt_default_lang = "en"; session_register("lang"); if(isset($_SESSION["lang"]) && !is_string($_SESSION["lang"])){ unset($lang); } if(isset($_SESSION["lang"])){ $lang = $_SESSION["lang"]; } // TODO: Add some web stuffs to change the language manually on the web interface... // ...HERE... // // $lang = "fr_FR"; // The following code keeps the lang in sessions, so it can be changed manually above with lang=XX // and if there's nothing in session yet, then it will parse the language set in the browser if(isset($lang)){ $_SESSION["lang"] = $lang; } if (!isset($lang)){ if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) && $_SERVER["HTTP_ACCEPT_LANGUAGE"]) { $all_languages = strtok($_SERVER["HTTP_ACCEPT_LANGUAGE"],";"); $langaccept = explode(",", $all_languages); for ($i = 0; $i < sizeof($langaccept); $i++) { $tmplang = trim($langaccept[$i]); $tmplang2 = substr($tmplang,0,2); if (!isset($lang) && isset($txt_langname[$tmplang]) && $txt_langname[$tmplang]) { $lang = $tmplang; }elseif (!isset($lang) && isset($txt_langname[$tmplang2])) { $lang = $tmplang2; } } } if (!isset($lang)) { $lang = $txt_default_lang; } $_SESSION["lang"] = $lang; } header("Content-type: text/html; charset=UTF-8"); switch($lang){ case "fr_FR": case "fr": $gettext_lang = "fr_FR.UTF-8"; break; default: $gettext_lang = "en_US.UTF-8"; break; } if(FALSE === putenv("LC_ALL=$gettext_lang")){ echo "Failed to putenv LC_ALL=$gettext_lang
"; } if(FALSE === putenv("LANG=$gettext_lang")){ echo "Failed to putenv LANG=$gettext_lang
"; } if(FALSE === setlocale(LC_ALL, $gettext_lang)){ echo "Failed to setlocale(LC_ALL,$gettext_lang)
"; } $pathname = bindtextdomain("messages", dirname(__FILE__) ."/translations/locale"); $message_domain = textdomain("messages"); // This comes from the Mail_Mime PEAR package, under Debian, you need // the php-mail-mime package to have this script work. require_once 'Mail/mimeDecode.php'; // Email header parsing function decodeEmail($input){ $params['include_bodies'] = true; $params['decode_bodies'] = true; $params['decode_headers'] = true; $decoder = new Mail_mimeDecode($input); $structure = $decoder->decode($params); return $structure; } // Reading of all the messages from the moderation folder function getMessageList(){ global $mod_dir; $all_msg = array(); // Read all files from the directory. if (is_dir($mod_dir)) { if ($dh = opendir($mod_dir)) { while (($file = readdir($dh)) !== false) { if( !ereg("^([0-9a-f]+)\$",$file) ) continue; $full_path = $mod_dir . "/" . $file; if(filetype($full_path) == "file"){ if(FALSE === ($input = file_get_contents($full_path))){ echo ""._("Warning: could not read")." $full_path
"; }else{ $struct = decodeEmail($input); $my_msg = array(); $my_msg["headers"] = $struct->headers; $my_msg["body"] = $struct->body; $my_msg["filename"] = $file; $all_msg[] = $my_msg; } } } closedir($dh); } } return $all_msg; } // Printing of the list of messages to be displayed (the big table) function printAllMessages($all_msg){ $n = sizeof($all_msg); $out = "\n"; $th = " class=\"tableTitle\" "; $out .= ""._("Date").""._("Subject").""._("From")."\n"; $out .= ""; for($i=0;$i<$n;$i++){ if($i % 2){ $cls = " class=\"alternatecolorline\" "; }else{ $cls = " class=\"alternatecolorline2\" "; } $out .= ""; $out .= ""; if( isset($all_msg[$i]["headers"]["date"]) ){ $mydate = htmlspecialchars($all_msg[$i]["headers"]["date"]); }else{ $mydate = _("No date"); } $out .= ""; if( !isset($all_msg[$i]["headers"]["subject"]) || strlen($all_msg[$i]["headers"]["subject"]) == 0){ $subject = _("No subject"); }else{ $subject = $all_msg[$i]["headers"]["subject"]; } $out .= ""; if( isset($all_msg[$i]["headers"]["from"]) ){ $myfrom = htmlspecialchars($all_msg[$i]["headers"]["from"]); }else{ $myfrom = _("No from in headers"); } $out .= ""; $out .= "\n"; } $out .= "
" . "" . "" . $mydate . "" . htmlspecialchars($subject) . "" . $myfrom . "
\n"; $out .= _("For the selection:")." "; $out .= ""; $out .= ""; return $out; } // Deletion and validation of messages if( isset($_REQUEST["validate"]) || isset($_REQUEST["delete"])){ if( !isset($_REQUEST["msg_id"]) ){ echo ""._("No message selected!")."
"; }else{ $n = sizeof($_REQUEST["msg_id"]); for($i=0;$i<$n;$i++){ if( !ereg("^([0-9a-f]+)\$",$_REQUEST["msg_id"][$i]) ){ echo "".("Moderation ID format is wrong: will ignore this one!").""; continue; } $fullpath = $mod_dir . "/" . $_REQUEST["msg_id"][$i]; if(!file_exists($fullpath)){ echo ""._("Moderation ID not found in the moderation folder!").""; continue; } // TODO: Check if message is there! if( isset($_REQUEST["validate"]) ){ // echo "Validating message ".$_REQUEST["msg_id"][$i]."
"; $to_addr = $list_name . $delimiter . "moderate-" . $_REQUEST["msg_id"][$i] . "@" . $list_domain; $headers = "From: ".$from_addr; mail($to_addr,"MLMMJ Web interface moderation","MLMMJ Web interface moderation",$headers); }else{ // echo "Deleting message ".$_REQUEST["msg_id"][$i]."
"; unlink($mod_dir . "/" . $_REQUEST["msg_id"][$i]); if( file_exists($mod_dir . "/" . $_REQUEST["msg_id"][$i] . ".orig") ){ unlink($mod_dir . "/" . $_REQUEST["msg_id"][$i] . ".orig"); } } } } } // A bit of javascript to do the checkboxes inversion. echo "

MLMMJ "._("moderation web interface")."

"._("Refresh page").""; if( isset($_REQUEST["action"]) && $_REQUEST["action"] == "show_message"){ if( !ereg("^([0-9a-f]+)\$",$_REQUEST["msgid"]) ){ echo ""._("Message ID format is wrong: can't display!").""; }else{ $full_path = $mod_dir . "/" . $_REQUEST["msgid"]; if( !file_exists($full_path) ){ echo "".("Message does not exists!").""; }else{ if(FALSE === ($input = file_get_contents($full_path))){ echo ""._("Error: could not read")." $full_path
"; }else{ $struct = decodeEmail($input); echo ""._("Back to messages list")."

"; echo ""._("From:")." " . htmlspecialchars($struct->headers["from"])."
"; echo ""._("Date:")." " . htmlspecialchars($struct->headers["date"])."
"; echo ""._("To:")." " . htmlspecialchars($struct->headers["to"])."
"; echo ""._("Subject:")." " . htmlspecialchars($struct->headers["subject"])."
"; echo ""._("Message body:")."

" . nl2br(htmlspecialchars($struct->body)); } } } }else{ $all_msg = getMessageList(); echo printAllMessages($all_msg); } echo ' '; ?> mlmmj-1.2.18.0/contrib/web/php-moderation/mlmmj.css000644 000765 000120 00000001766 11727635244 021764 0ustar00benadmin000000 000000 .alternatecolorline2 { background-color: #E3f9ff; font-size: 10px; } .alternatecolorline { background-color: #bcd0d6; font-size: 10px; } .tableTitle { text-align: center; color: #547074; font-size: 12px; background-color: #dbe9ed; } .errorMessages { color: #FF0000; font-size: 14px; font-weight: bold; } a:link{color:#105278;text-decoration: none;} a:visited{color:#105278;text-decoration: none;} a:hover{color:#000000;text-decoration: underline;} a:active{color:#000000;text-decoration: none;} html{height:100%; margin:4;} body{height:100%;margin:4; font: 12px Arial, Helvetica, sans-serif; color: #000000;} /* Forms fields definitions */ input,select,textarea { font-family: arial; font-size: 12px; color: #000000; background-color: #F6F6F2; border-color: #ECEEE5 #F6F6F2 #F6F6F2 #ECEEE5; } h3 { text-align: center; font-size: 20px; } .footer{width:98%; text-align:center; position:absolute; bottom:0; padding:1%; } mlmmj-1.2.18.0/contrib/web/php-moderation/README000644 000765 000120 00000004513 11727635244 021007 0ustar00benadmin000000 000000 MLMMJ PHP Moderation Web Interface by Thomas Goirand * dependencies * This app needs: - php with gettext() support (for translations). Nearly all (if not all) Unix distributions have php with gettext support. - The Mail_mime PEAR package (php-mail-mime in Debian) * setup * - Run "./build-translations.sh" to generate the gettext binaries out of the sources - Edit the 5 variables on top of mlmmj-moderation.php to set the moderation folder, list name, domain, delimiter and the address used to send the moderation validation messages. You will need gettext installed on your system... - Eventually rename mlmmj-moderation.php and edit mlmmj.css to your taste - Edit and rename the dot.htaccess files to .htaccess to protect the moderation folder from others - make it so this app have read/write access to the moderation folder. Write access is needed because the app does some unlink() calls to delete the messages. - If using debian, you might need to dpkg-reconfigure locales and add fr_FR.UTF-8, if you want to see my French translation (there might be some other distributions needing the same kind of thing, I don't know...). * known issues * - Because this web app is sending an email to validate messages to be moderated, once you have hit "validate", validated messages will still (most of the times) show in the interface, as the folder is (most of the times) read before MLMMJ has time to send the moderated messages and remove them from the moderation folder. A workaround would be to NOT display messages that are moderated on the URL bar, but it's not a good way to go, as if the server is very busy, the next refresh of the page (the one after the validation) can still show some messages already validated. We see here that the method to send emails doesn't seem to be very good... Would it be possible for me to rename the moderated messages??? - Because it's the first version, I have not yet used POST, but some GET in order to see things on the URL bar. So, of course, we are here hitting the limitation of the URL size (if there are really a lot of messages to moderate). This can be changed later simply by adding method="POST" in the form, as I use $_REQUEST (and not the stupid $_POST / $_GET that everybody uses...). I might do this on the next version, but for now, it's more easy for debug purposes to keep it this way. mlmmj-1.2.18.0/contrib/web/php-moderation/translations/000755 000765 000120 00000000000 11727635244 022645 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/php-moderation/translations/dot.htaccess000644 000765 000120 00000000037 11727635244 025152 0ustar00benadmin000000 000000 Order Deny,Allow Deny from all mlmmj-1.2.18.0/contrib/web/php-moderation/translations/fr_FR.po000644 000765 000120 00000004653 11727635244 024213 0ustar00benadmin000000 000000 # MLMMJ moderation web interface templates. # Copyright (C) 2009 Thomas GOIRAND # This file is distributed under the same license as MLMMJ package. # Thomas Goirand , 2009. # msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-03-05 07:25+0800\n" "PO-Revision-Date: 2009-03-05 07:29+0800\n" "Last-Translator: Thomas Goirand \n" "Language-Team: Thomas Goirand \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: mlmmj-moderation.php:259 msgid "Back to messages list" msgstr "Retour a la liste des messages" #: mlmmj-moderation.php:144 msgid "Date" msgstr "Date" #: mlmmj-moderation.php:261 msgid "Date:" msgstr "Date :" #: mlmmj-moderation.php:177 msgid "Delete" msgstr "Effacer" #: mlmmj-moderation.php:256 msgid "Error: could not read" msgstr "Erreur: impossible de lire" #: mlmmj-moderation.php:175 msgid "For the selection:" msgstr "Pour la sélection :" #: mlmmj-moderation.php:144 msgid "From" msgstr "De" #: mlmmj-moderation.php:260 msgid "From:" msgstr "De:" #: mlmmj-moderation.php:144 msgid "Inverse selection" msgstr "Inverser la selection" #: mlmmj-moderation.php:249 msgid "Message ID format is wrong: can't display!" msgstr "Le format de l'ID du message est faux: affichage impossible !" #: mlmmj-moderation.php:264 msgid "Message body:" msgstr "Corp du message :" #: mlmmj-moderation.php:194 msgid "Moderation ID not found in the moderation folder!" msgstr "ID de modération non trouve dans le dossier de modération!" #: mlmmj-moderation.php:157 msgid "No date" msgstr "Pas de date" #: mlmmj-moderation.php:169 msgid "No from in headers" msgstr "Pas de from dans les entêtes" #: mlmmj-moderation.php:184 msgid "No message selected!" msgstr "Pas de message sélectionné !" #: mlmmj-moderation.php:161 msgid "No subject" msgstr "Pas de sujet" #: mlmmj-moderation.php:245 msgid "Refresh page" msgstr "Rafraichir la page" #: mlmmj-moderation.php:144 msgid "Subject" msgstr "Sujet" #: mlmmj-moderation.php:263 msgid "Subject:" msgstr "Sujet :" #: mlmmj-moderation.php:262 msgid "To:" msgstr "Pour :" #: mlmmj-moderation.php:176 msgid "Validate" msgstr "Valider" #: mlmmj-moderation.php:122 msgid "Warning: could not read" msgstr "Alerte : impossible de lire" #: mlmmj-moderation.php:244 msgid "moderation web interface" msgstr "interface web de moderation" mlmmj-1.2.18.0/contrib/web/php-admin/conf/000755 000765 000120 00000000000 11727635244 020000 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/php-admin/htdocs/000755 000765 000120 00000000000 11734220454 020326 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/php-admin/README000644 000765 000120 00000004174 11734220454 017730 0ustar00benadmin000000 000000 mlmmj-1.0.0 August 31th 2004 To use this web-interface you have to: 1) Copy the files from the php-admin directory of the mlmmj distribution to a suitable location and point your webroot to the htdocs directory. If you don't want the webinterface in the root of your website it is recommended to make an alias in your web server configuration in order to keep the conf directory at the same level as the htdocs directory and still outside webscope. If you want to keep it somewhere else, you will need to modify the first line of code in index.php, edit.php and save.php. 2) If your lists are stored somewhere other than /var/spool/mlmmj, edit conf/config.php to reflect this. 3) Change the permissions of the listdir/control directories of any list you want to control using the web-interface, so the web server can write in it: # chown -R wwwrun /var/spool/mlmmj/mlmmj-test/control/ 4) If the web server does not run as the same user the mailserver writes as you need to create a group (eg. mlmmj) and add both users to it. The subscribers.d directory then needs to be writable by that group: # addgroup mlmmj # adduser wwwrun mlmmj # adduser mailuser mlmmj # chgrp -R mlmmj /var/spool/mlmmj/mlmmj-test/subscribers.d/ # chmod -R g+w /var/spool/mlmmj/mlmmj-test/subscribers.d/ # chmod g+s /var/spool/mlmmj/mlmmj-test/subscribers.d/ setgid flag is needed when the webserver calls mlmmj-sub and creates a file under subscribers.d, to keep the mlmmj group. If using the Exim mailserver, you should add initgroups = true in your mlmmj_transport, otherwise it won't be able to write files having write permission to mlmmj group. 5) To enable access control on Apache you have to rename dot.htaccess to .htaccess and edit the path inside the file to point to a htpasswd file somewhere outside the webscope. If you don't have one already, you can create one like this htpasswd -c /home/mlmmj/htpasswd USER It will then ask you for a password for the given username. 6) That is it, you are ready to use the interface. mlmmj-1.2.18.0/contrib/web/php-admin/templates/000755 000765 000120 00000000000 11734220454 021040 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/php-admin/templates/edit.html000644 000765 000120 00000000452 11414633670 022657 0ustar00benadmin000000 000000 mlmmj config

mlmmj config

{ROWS}

Index

mlmmj-1.2.18.0/contrib/web/php-admin/templates/edit_boolean.html000644 000765 000120 00000000155 11414633670 024356 0ustar00benadmin000000 000000 {NICENAME}{TEXT} mlmmj-1.2.18.0/contrib/web/php-admin/templates/edit_list.html000644 000765 000120 00000000154 11414633670 023711 0ustar00benadmin000000 000000 {NICENAME}{TEXT} mlmmj-1.2.18.0/contrib/web/php-admin/templates/edit_string.html000644 000765 000120 00000000146 11414633670 024245 0ustar00benadmin000000 000000 {NICENAME}{TEXT} mlmmj-1.2.18.0/contrib/web/php-admin/templates/index.html000644 000765 000120 00000000142 11414633670 023035 0ustar00benadmin000000 000000 mlmmj config

mlmmj config

{LISTS} mlmmj-1.2.18.0/contrib/web/php-admin/templates/save.html000644 000765 000120 00000000323 11414633670 022665 0ustar00benadmin000000 000000 mlmmj config

mlmmj config

{LIST} control values saved!

Index | {LIST}

mlmmj-1.2.18.0/contrib/web/php-admin/templates/subscribers.html000644 000765 000120 00000001122 11734220454 024250 0ustar00benadmin000000 000000 mlmmj - {LIST} subscribers

{LIST} subscribers

{MESSAGE} {SUBS}
Add subscribers:

Index

mlmmj-1.2.18.0/contrib/web/php-admin/htdocs/class.rFastTemplate.php000644 000765 000120 00000122573 11727635244 024741 0ustar00benadmin000000 000000 // 2001 Alister Bulman Re-Port multi template-roots + more // PHP3 Port: Copyright © 1999 CDI , All Rights Reserved. // Perl Version: Copyright © 1998 Jason Moore , All Rights Reserved. // // RCS Revision // @(#) $Id$ // $Source$ // // Copyright Notice // // 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. // // class.rFastTemplate.php 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. // // Comments // // I would like to thank CDI for pointing out the // copyright notice attached to his PHP3 port which I had blindly missed // in my first release of this code. // // This work is derived from class.FastTemplate.php3 version 1.1.0 as // available from http://www.thewebmasters.net/. That work makes // reference to the "GNU General Artistic License". In correspondence // with the author, the intent was to use the GNU General Public License; // this work does the same. // // Authors // // Roland Roberts // Alister Bulman (multi template-roots) // Michal Rybarik (define_raw()) // CDI , PHP3 port // Jason Moore , original Perl version // // Synopsis // // require ("PATH-TO-TEMPLATE-CODE/class.Template.php"); // $t = new Template("PATH-TO-TEMPLATE-DIRECTORY"); // $t->define (array(MAIN => "diary.html")); // $t->setkey (VAR1, "some text"); // $t->subst (INNER, "inner") // $t->setkey (VAR1, "some more text"); // $t->subst (INNER, ".inner") // $t->setkey (VAR2, "var2 text"); // $t->subst (CONTENT, "main"); // $t->print (CONTENT); // // Description // // This is a class.FastTemplate.php3 replacement that provides most of the // same interface but has the ability to do nested dynamic templates. The // default is to do dynamic template expansion and no special action is // required for this to happen. // // class.FastTemplate.php3 Methods Not Implemented // // clear_parse // Same as clear. In fact, it was the same as clear in FastTemplate. // clear_all // If you really think you need this, try // unset $t; // $t = new Template ($path); // which gives the same effect. // clear_tpl // Use unload instead. This has the side effect of unloading all parent // and sibling templates which may be more drastic than you expect and // is different from class.FastTemplate.php3. This difference is // necessary since the only way we can force the reload of an embedded // template is to force the reload of the parent and sibling templates. // // class.FastTemplate.php3 Methods by Another Name // // The existence of these functions is a historical artifact. I // originally had in mind to write a functional equivalent from scratch. // Then I came my senses and just grabbed class.FastTemplate.php3 and // started hacking it. So, you can use the names on the right, but the // ones on the left are equivalent and are the names used in the original // class.FastTemplate.php3. // // parse --> subst // get_assiged --> getkey // assign --> setkey // clear_href --> unsetkey // clear_assign --> unsetkey // FastPrint --> xprint // class rFastTemplate { // File name to be used for debugging output. Needs to be set prior to // calling anything other than option setting commands (debug, debugall, // strict, dynamic) because once the file has been opened, this is ignored. var $DEBUGFILE = '/tmp/class.rFastTemplate.php.dbg'; // File descriptor for debugging output. var $DEBUGFD = -1; // Array for individual member functions. You can turn on debugging for a // particular member function by calling $this->debug(FUNCTION_NAME) var $DEBUG = array (); // Turn this on to turn on debugging in all member functions via // $this->debugall(). Turn if off via $this->debugall(false); var $DEBUGALL = false; // Names of actual templates. Each element will be an array with template // information including is originating file, file load status, parent // template, variable list, and actual template contents. var $TEMPLATE = array(); // Holds paths-to-templates (See: set_root and FindTemplate) var $ROOT = array(); // Holds the HANDLE to the last template parsed by parse() var $LAST = ''; // Strict template checking. Unresolved variables in templates will generate a // warning. var $STRICT = true; // If true, this suppresses the warning generated by $STRICT=true. var $QUIET = false; // If true, throw an error if the template file is empty. This was previously the default // behavior. I'm not sure how this compares to the original FastTemplate(). var $NOEMPTY = false; // If true, a non-existent directory in the template path will not // generate an error. This was added to allow a directory to be // prepended to the template path array based on where in the directory // tree we are. If the template path is non-existent, it is skipped. var $MISSING_DIR_OKAY = false; // Holds handles assigned by a call to parse(). var $HANDLE = array(); // Holds all assigned variable names and values. var $VAR = array(); // Set to true is this is a WIN32 server. This was part of the // class.FastTemplate.php3 implementation and the only real place it kicks // in is in setting the terminating character on the value of $ROOT, the // path where all the templates live. var $WIN32 = false; // Automatically scan template for dynamic templates and assign new values // to TEMPLATE based on whatever names the HTML comments use. This can be // changed up until the time the first parse() is called. Well, you can // change it anytime, but it will have no effect on already loaded // templates. Also, if you have dynamic templates, the first call to parse // will load ALL of your templates, so changing it after that point will // have no effect on any defined templates. var $DYNAMIC = true; // Grrr. Don't try to break these extra long regular expressions into // multiple lines for readability. PHP 4.03pl1 chokes on them if you do. // I'm guessing the reason is something obscure with the parenthesis // matching, the same sort of thing Tcl might have, but I'm not sure. // Regular expression which matches the beginning of a dynamic/inferior // template. The critical bit is that we need two parts: (1) the entire // match, and (2) the name of the dynamic template. The first part is // required because will do a strstr() to split the buffer into two // pieces: everything before the dynamic template declaration and // everything after. The second is needed because after finding a BEGIN // we will search for an END and they both have to have the same name of // we consider the template malformed and throw and error. // Both of these are written with PCRE (Perl-Compatible Regular // Expressions) because we need the non-greedy operators to insure that // we don't read past the end of the HTML comment marker in the case that // the BEGIN/END block have trailing comments after the tag name. var $REGEX_DYNBEG = '/()/s'; // Regular expression which matches the end of a dynamic/inferior // template; see the comment about on the BEGIN match. var $REGEX_DYNEND = '/()/s'; // Regular expression which matches a variable in the template. var $REGEX_VAR = '/\{[A-Za-z][-_A-Za-z0-9]*\}/'; // // Description // Constructor. // function rFastTemplate ($pathToTemplates = '') { // $pathToTemplates can also be an array of template roots, handled in set_root global $php_errormsg; if (!empty($pathToTemplates)) { $this->set_root ($pathToTemplates); } $this->DEBUG = array ('subst' => false, 'parse_internal' => false, 'parse_internal_1' => false, 'parsed' => false, 'clear' => false, 'clear_dynamic' => false, 'load' => false); return $this; } // // Description // Set the name to be used for debugging output. If another file has // already been opened, close it so the next call to logwrite will // reopen under this name. // function debugfile ($name) { $this->DEBUGFILE = $name; } // // Description // Turn on/off debugging output of an individual member function. // function debug ($what, $on = true) { $this->DEBUG[$what] = $on; } // // Description // Turn on/off debugging output of all member functions. // function debugall ($on = true) { $this->DEBUGALL = $on; } // // Description // Turn on/off automatic dynamic template expansion. Note that a // template with an inferior dynamic template embedded will still // parse but only as if it were part of the main template. When this // is turned on, it will be parsed out as as if it were a full-blown // template and can thus be both parsed and appended to as a separate // entity. // function dynamic ($on = true) { $this->DYNAMIC = $on; } // // Description // Turn on/off strict template checking. When on, all template tags // must be assigned or we throw an error (but stilll parse the // template). // function strict ($on = true) { $this->STRICT = $on; } function quiet ($on = true) { $this->QUIET = $on; } // // Description // For compatibility with class.FastTemplate.php3. // function no_strict () { $this->STRICT = false; } // // Description // Turn off errors for missing template directories. This allows you // to specify a template path that may not yet exist. // function missing_dir_okay ($on = true) { $this->MISSING_DIR_OKAY = $on; } // // Description // Utility function for debugging. // function logwrite ($msg) { if ($this->DEBUGFD < 0) { $this->DEBUGFD = fopen ($this->DEBUGFILE, 'a'); } fputs ($this->DEBUGFD, strftime ('%Y/%m/%d %H:%M:%S ') . $msg . "\n"); } // // Description // This was lifted as-is from class.FastTemplate.php3. Based on what // platform is in use, it makes sure the path specification ends with // the proper path separator; i.e., a slash on unix systems and a // back-slash on WIN32 systems. When we can run on Mac or VMS I guess // we'll worry about other characters.... // // $root can now be an array of template roots which will be searched to // find the first matching name. function set_root ($root) { if (!is_array($root)) { $trailer = substr ($root, -1); if ($trailer != ($this->WIN32 ? '\\' : '/')) $root .= ($this->WIN32 ? '\\' : '/'); if (!is_dir($root)) { if (!$this->MISSING_DIR_OKAY) $this->error ("Specified ROOT dir [$root] is not a directory", true); return false; } $this->ROOT[] = $root; } else { reset($root); while(list($k, $v) = each($root)) { if (is_dir($v)) { $trailer = substr ($v,-1); if ($trailer != ($this->WIN32 ? '\\' : '/')) $v .= ($this->WIN32 ? '\\' : '/'); $this->ROOT[] = $v; } else if (!$this->MISSING_DIR_OKAY) { $this->error ("Specified ROOT dir [$v] is not a directory", true); } } } // FIXME: should add something here to make sure there is at least one // entry in ROOT[]. } // // Description // Associate files with a template names. // // Sigh. At least with the CVS version of PHP, $dynamic = false sets it // to true. // function define ($fileList, $dynamic = 0) { reset ($fileList); while (list ($tpl, $file) = each ($fileList)) { $this->TEMPLATE[$tpl] = array ('file' => $file, 'dynamic' => $dynamic); } return true; } function define_dynamic ($tplList, $parent='') { if (is_array($tplList)) { reset ($tplList); while (list ($tpl, $parent) = each ($tplList)) { $this->TEMPLATE[$tpl]['parent'] = $parent; $this->TEMPLATE[$tpl]['dynamic'] = true; } } else { // $tplList is not an array, but a single child/parent pair. $this->TEMPLATE[$tplList]['parent'] = $parent; $this->TEMPLATE[$tplList]['dynamic'] = true; } } // // Description // Defines a template from a string (not a file). This function has // not been ported from original PERL module to CDI's // class.FastTemplate.php3, and it comebacks in rFastTemplate // class. You can find it useful if you want to use templates, stored // in database or shared memory. // function define_raw ($stringList, $dynamic = 0) { reset ($stringList); while (list ($tpl, $string) = each ($stringList)) { $this->TEMPLATE[$tpl] = array ('string' => $string, 'dynamic' => $dynamic, 'loaded' => 1); } return true; } // // Description // Try each directory in our list of possible roots in turn until we // find a matching template // function FindTemplate ($file) { // first try for a template in the current directory short path for // absolute filenames if (substr($file, 0, 1) == '/') { if (file_exists($file)) { return $file; } } // search path for a matching file reset($this->ROOT); while(list($k, $v) = each($this->ROOT)) { $f = $v . $file; if (file_exists($f)) { return $f; } } $this->error ("FindTemplate: file $file does not exist anywhere in " . implode(' ', $this->ROOT), true); return false; } // // Description // Load a template into memory from the underlying file. // function &load ($file) { $debug = $this->DEBUGALL || $this->DEBUG['load']; if (! count($this->ROOT)) { if ($debug) $this->logwrite ("load: cannot open template $file, template base directory not set"); $this->error ("cannot open template $file, template base directory not set", true); return false; } else { $contents = ''; unset ($contents); $filename = $this->FindTemplate ($file); if ($filename) @ $contents = implode ('', (@file($filename))); // This is inconsistent and depends on the setting of track_errors. First, with no // @-directive above, the error will be reported immediately. Second, if the template // is empty, it may be that no error occurred and we still end up here. To get around // this, we explicitly unset $contents and then check to see if it isset(). If so, // the template was empty and we treat that as a non-error. if (isset($contents) && ($this->NOEMPTY && empty($contents)) ) { if ($debug) $this->logwrite ("load($file): empty template file"); $this->error ("load($file): empty template file", true); } else if (!isset($contents)) { if ($debug) $this->logwrite ("load($file) failure: $php_errormsg"); $this->error ("load($file): failure: $php_errormsg", true); } else { if ($debug) $this->logwrite ("load: found $filename"); return $contents; } } } // // Description // Recursive internal parse routine. This will recursively parse a // template containing dynamic inferior templates. Each of these // inferior templates gets their own entry in the TEMPLATE array. // function &parse_internal_1 ($tag, $rest = '') { $debug = $this->DEBUGALL || $this->DEBUG['parse_internal_1']; if (empty($tag)) { $this->error ("parse_internal_1: empty tag invalid", true); } if ($debug) $this->logwrite ("parse_internal_1 (tag=$tag, rest=$rest)"); while (!empty($rest)) { if ($debug) $this->logwrite ('parse_internal_1: REGEX_DYNBEG search: rest => ' . $rest); if (preg_match ($this->REGEX_DYNBEG, $rest, $dynbeg)) { // Found match, now split into two pieces and search the second // half for the matching END. The string which goes into the // next element includes the HTML comment which forms the BEGIN // block. if ($debug) $this->logwrite ('parse_internal_1: match beg => ' . $dynbeg[1]); $pos = strpos ($rest, $dynbeg[1]); // See if the text on either side of the BEGIN comment is only // whitespace. If so, we delete the entire line. $okay = false; for ($offbeg = $pos - 1; $offbeg >= 0; $offbeg--) { $c = $rest{$offbeg}; if ($c == "\n") { $okay = true; $offbeg++; break; } if (($c != ' ') && ($c != "\t")) { $offbeg = $pos; break; } } if (! $okay) { $offend = $pos + strlen($dynbeg[1]); } else { $l = strlen ($rest); for ($offend = $pos + strlen($dynbeg[1]); $offend < $l; $offend++) { $c = $rest{$offend}; if ($c == "\n") { $offend++; break; } if (($c != ' ') && ($c != "\t")) { $offend = $pos + strlen($dynbeg[1]); break; } } } // This includes the contents of the REGEX_DYNBEG in the output // $part[] = substr ($rest, 0, $pos); // This preserves whitespace on the END block line(s). // $part[] = substr ($rest, 0, $pos+strlen($dynbeg[1])); // $rest = substr ($rest, $pos+strlen($dynbeg[1])); // Catch case where BEGIN block is at position 0. if ($offbeg > 0) $part[] = substr ($rest, 0, $offbeg); $rest = substr ($rest, $offend); $sub = ''; if ($debug) $this->logwrite ("parse_internal_1: found at pos = $pos"); // Okay, here we are actually NOT interested in just the next // END block. We are only interested in the next END block that // matches this BEGIN block. This is not the most efficient // because we really could do this in one pass through the // string just marking BEGIN and END blocks. But the recursion // makes for a simple algorithm (if there was a reverse // preg...). $found = false; while (preg_match ($this->REGEX_DYNEND, $rest, $dynend)) { if ($debug) $this->logwrite ('parse_internal_1: REGEX_DYNEND search: rest => ' . $rest); if ($debug) $this->logwrite ('parse_internal_1: match beg => ' . $dynend[1]); $pos = strpos ($rest, $dynend[1]); if ($dynbeg[2] == $dynend[2]) { $found = true; // See if the text on either side of the END comment is // only whitespace. If so, we delete the entire line. $okay = false; for ($offbeg = $pos - 1; $offbeg >= 0; $offbeg--) { $c = $rest{$offbeg}; if ($c == "\n") { $offbeg++; $okay = true; break; } if (($c != ' ') && ($c != "\t")) { $offbeg = $pos; break; } } if (! $okay) { $offend = $pos + strlen($dynend[1]); } else { $l = strlen ($rest); for ($offend = $pos + strlen($dynend[1]); $offend < $l; $offend++) { $c = $rest{$offend}; if ($c == "\n") { $offend++; break; } if (($c != ' ') && ($c != "\t")) { $offend = $pos + strlen($dynend[1]); break; } } } // if ($debug) // $this->logwrite ("parse_internal_1: DYNAMIC BEGIN: (pos,len,beg,end) => ($pos, " . strlen($dynbeg[1]) . ", $offbeg, $offend) // This includes the contents of the REGEX_DYNEND in the output // $rest = substr ($rest, $pos); // This preserves whitespace on the END block line(s). // $rest = substr ($rest, $pos+strlen($dynend[1])); // $sub .= substr ($rest, 0, $pos); $sub .= substr ($rest, 0, $offbeg); $rest = substr ($rest, $offend); // Already loaded templates will not be reloaded. The // 'clear' test was actually hiding a bug in the clear() // logic.... if (false && isset($this->TEMPLATE[$dynend[2]]['clear']) && $this->TEMPLATE[$dynend[2]]['clear']) { $this->TEMPLATE[$dynend[2]]['string'] = ''; $this->TEMPLATE[$dynend[2]]['result'] = ''; $this->TEMPLATE[$dynend[2]]['part'] = $this->parse_internal_1 ($dynend[2], ' '); } else if (!isset($this->TEMPLATE[$dynend[2]]['loaded']) || !$this->TEMPLATE[$dynend[2]]['loaded']) { // Omit pathological case of empty dynamic template. if (strlen($sub) > 0) { $this->TEMPLATE[$dynend[2]]['string'] = $sub; $this->TEMPLATE[$dynend[2]]['part'] = $this->parse_internal_1 ($dynend[2], $sub); $this->TEMPLATE[$dynend[2]]['part']['parent'] = $tag; } } $this->TEMPLATE[$dynend[2]]['loaded'] = true; $part[] = &$this->TEMPLATE[$dynend[2]]; $this->TEMPLATE[$dynend[2]]['tag'] = $dynend[2]; break; } else { $sub .= substr ($rest, 0, $pos+strlen($dynend[1])); $rest = substr ($rest, $pos+strlen($dynend[1])); if ($debug) $this->logwrite ("parse_internal_1: $dynbeg[2] != $dynend[2]"); } } if (!$found) { $this->error ("malformed dynamic template, missing END
\n" . "$dynbeg[1]
\n", true); } } else { // Although it would appear to make sense to check that we don't // have a dangling END block, we will, in fact, ALWAYS appear to // have a dangling END block. We stuff the BEGIN string in the // part before the inferior template and the END string in the // part after the inferior template. So for this test to work, // we would need to look just past the final match. if (preg_match ($this->REGEX_DYNEND, $rest, $dynend)) { // $this->error ("malformed dynamic template, dangling END
\n" . // "$dynend[1]
\n", 1); } $part[] = $rest; $rest = ''; } } return $part; } // // Description // Parse the template. If $tag is actually an array, we iterate over // the array elements. If it is a simple string tag, we may still // recursively parse the template if it contains dynamic templates and // we are configured to automatically load those as well. // function parse_internal ($tag) { $debug = $this->DEBUGALL || $this->DEBUG['parse_internal']; $append = false; if ($debug) $this->logwrite ("parse_internal (tag=$tag)"); // If we are handed an array of tags, iterate over all of them. This // is really a holdover from the way class.FastTemplate.php3 worked; // I think subst() already pulls that array apart for us, so this // should not be necessary unless someone calls the internal member // function directly. if (gettype($tag) == 'array') { reset ($tag); foreach ($tag as $t) { $this->parse_internal ($t); } } else { // Load the file if it hasn't already been loaded. It might be // nice to put in some logic that reloads the file if it has // changed since we last loaded it, but that probably gets way too // complicated and only makes sense if we start keeping it floating // around between page loads as a persistent variable. if (!isset($this->TEMPLATE[$tag]['loaded'])) { if ($this->TEMPLATE[$tag]['dynamic']) { // Template was declared via define_dynamic(). if ($this->TEMPLATE[$tag]['parent']) $tag = $this->TEMPLATE[$tag]['parent']; else { // Try to find a non-dynamic template with the same file. // This would have been defined via define(array(), true) reset ($this->TEMPLATE); foreach (array_keys($this->TEMPLATE) as $ptag) { if ($debug) $this->logwrite ("parse_internal: looking for non-dynamic parent, $ptag"); if (!$this->TEMPLATE[$ptag]['dynamic'] && ($this->TEMPLATE[$ptag]['file'] == $this->TEMPLATE[$tag]['file'])) { $tag = $ptag; break; } } } } $this->TEMPLATE[$tag]['string'] = &$this->load($this->TEMPLATE[$tag]['file']); $this->TEMPLATE[$tag]['loaded'] = 1; } // If we are supposed to automatically detect dynamic templates and the dynamic // flag is not set, scan the template for dynamic sections. Dynamic sections // markers have a very rigid syntax as HTML comments.... if ($this->DYNAMIC) { $this->TEMPLATE[$tag]['tag'] = $tag; if (!isset($this->TEMPLATE[$tag]['parsed']) || !$this->TEMPLATE[$tag]['parsed']) { $this->TEMPLATE[$tag]['part'] = $this->parse_internal_1 ($tag, $this->TEMPLATE[$tag]['string']); $this->TEMPLATE[$tag]['parsed'] = true; } } } } // // Description // class.FastTemplate.php3 compatible interface. // // Notes // I prefer the name `subst' to `parse' since during this phase we are // really doing variable substitution into the template. However, at // some point we have to load and parse the template and `subst' will // do that as well... // function parse ($handle, $tag, $autoload = true) { return $this->subst ($handle, $tag, $autoload); } // // Description // Perform substitution on the template. We do not really recurse // downward in the sense that we do not do subsitutions on inferior // templates. For each inferior template which is a part of this // template, we insert the current value of their results. // // Notes // Do I want to make this return a reference? function subst ($handle, $tag, $autoload = true) { $append = false; $debug = $this->DEBUGALL || $this->DEBUG['subst']; $this->LAST = $handle; if ($debug) $this->logwrite ("subst (handle=$handle, tag=$tag, autoload=$autoload)"); // For compatibility with FastTemplate, the results need to overwrite // for an array. This really only seems to be useful in the case of // something like // $t->parse ('MAIN', array ('array', 'main')); // Where the 'main' template has a variable named MAIN which will be // set on the first pass (i.e., when parasing 'array') and used on the // second pass (i.e., when parsing 'main'). if (gettype($tag) == 'array') { foreach (array_values($tag) as $t) { if ($debug) $this->logwrite ("subst: calling subst($handle,$t,$autoload)"); $this->subst ($handle, $t, $autoload); } return $this->HANDLE[$handle]; } // Period prefix means append result to pre-existing value. if (substr($tag,0,1) == '.') { $append = true; $tag = substr ($tag, 1); if ($debug) $this->logwrite ("subst (handle=$handle, tag=$tag, autoload=$autoload) in append mode"); } // $this->TEMPLATE[$tag] will only be set if it was explicitly // declared via define(); i.e., inferior templates will not have an // entry. if (isset($this->TEMPLATE[$tag])) { if (!isset($this->TEMPLATE[$tag]['parsed']) || !$this->TEMPLATE[$tag]['parsed']) $this->parse_internal ($tag); } else { if (!$this->DYNAMIC) { $this->error ("subst (handle=$handle, tag=$tag, autoload=$autoload): " . 'no such tag and dynamic templates are turned off', true); } if ($autoload) { if ($debug) $this->logwrite ("subst: TEMPLATE[tag=$tag] not found, trying autoload"); foreach (array_keys($this->TEMPLATE) as $t) { if ($debug) $this->logwrite ("subst: calling parse_internal (tag=$t)"); if (!isset($this->TEMPLATE[$tag]['parsed']) || !$this->TEMPLATE[$tag]['parsed']) $this->parse_internal ($t); } if ($debug) $this->logwrite ('subst: retrying with autoload = false'); $this->subst ($handle, $tag, false); if ($debug) $this->logwrite ('subst: completed with autoload = false'); return; } else { $this->error ("subst (handle=$handle, tag=$tag, autoload=$autoload): no such tag", true); } } if (!$append) { $this->TEMPLATE[$tag]['result'] = ''; if ($debug) $this->logwrite ("subst (handle=$handle, tag=$tag, autoload=$autoload) in overwrite mode"); } if ($debug) $this->logwrite ('subst: type(this->TEMPLATE[$tag][\'part\']) => ' . gettype($this->TEMPLATE[$tag]['part'])); // Hmmm, clear() called before subst() seems to result in this not // being defined which leaves me a bit confused.... $result = ''; if (isset($this->TEMPLATE[$tag]['part'])) { reset ($this->TEMPLATE[$tag]['part']); foreach (array_keys($this->TEMPLATE[$tag]['part']) as $p) { if ($debug) $this->logwrite ("subst: looking at TEMPLATE[$tag]['part'][$p]"); $tmp = $this->TEMPLATE[$tag]['part'][$p]; // Don't try if ($p == 'parent').... if (strcmp ($p, 'parent') == 0) { if ($debug) $this->logwrite ("subst: skipping part $p"); $tmp = ''; } else if (gettype($this->TEMPLATE[$tag]['part'][$p]) == 'string') { if ($debug) $this->logwrite ("subst: using part $p"); reset ($this->VAR); // Because we treat VAR and HANDLE separately (unlike // class.FastTemplate.php3), we have to iterate over both or we // miss some substitutions and are not 100% compatible. while (list($key,$val) = each ($this->VAR)) { if ($debug) $this->logwrite ("subst: substituting VAR $key = $val in $tag"); $key = '{'.$key.'}'; $tmp = str_replace ($key, $val, $tmp); } reset ($this->HANDLE); while (list($key,$val) = each ($this->HANDLE)) { if ($debug) $this->logwrite ("subst: substituting HANDLE $key = $val in $tag"); $key = '{'.$key.'}'; $tmp = str_replace ($key, $val, $tmp); } $result .= $tmp; } else { $xtag = $this->TEMPLATE[$tag]['part'][$p]['tag']; if ($debug) { $this->logwrite ("subst: substituting other tag $xtag result in $tag"); } // The assignment is a no-op if the result is not set, but when // E_ALL is in effect, a warning is generated without the // isset() test. if (isset ($this->TEMPLATE[$xtag]['result'])) $result .= $this->TEMPLATE[$xtag]['result']; } } } if ($this->STRICT) { // If quiet-mode is turned on, skip the check since we're not going // to do anything anyway. if (!$this->QUIET) { if (preg_match ($this->REGEX_VAR, $result)) { $this->error ("unmatched tags still present in $tag
"); } } } else { $result = preg_replace ($this->REGEX_VAR, '', $result); } if ($append) { if ($debug) { $this->logwrite ("subst: appending TEMPLATE[$tag]['result'] = $result"); $this->logwrite ("subst: old HANDLE[$handle] = {$this->HANDLE[$handle]}"); $this->logwrite ("subst: old TEMPLATE[$tag]['result'] = {$this->TEMPLATE[$tag]['result']}"); } // The isset() tests are to suppresss warning when E_ALL is in effect // and the variables have not actually been set yet (even though the // user specified append-mode). if (isset ($this->HANDLE[$handle])) $this->HANDLE[$handle] .= $result; else $this->HANDLE[$handle] = $result; if (isset ($this->TEMPLATE[$tag]['result'])) $this->TEMPLATE[$tag]['result'] .= $result; else $this->TEMPLATE[$tag]['result'] = $result; if ($debug) { $this->logwrite ("subst: new HANDLE[$handle] = {$this->HANDLE[$handle]}"); $this->logwrite ("subst: new TEMPLATE[$tag]['result'] = {$this->TEMPLATE[$tag]['result']}"); } } else { if ($debug) $this->logwrite ("subst: setting TEMPLATE[$tag]['result'] = $result"); $this->HANDLE[$handle] = $result; $this->TEMPLATE[$tag]['result'] = $result; } return $this->HANDLE[$handle]; } // // Description // Clear a block from a template. The intent is to remove an inferior // template from a parent. This works even if the template has already // been parsed since we go straight to the specified template and clear // the results element. If the given template has not yet been // loaded, the load is forced by calling parse_internal(). // function clear_dynamic ($tag = NULL) { $debug = $this->DEBUGALL || $this->DEBUG['clear_dynamic']; if (is_null ($tag)) { // Clear all result elements. Uhm, needs to be tested. if ($debug) $this->logwrite ("clear_dynamic (NULL)"); foreach (array_values ($this->TEMPLATE) as $t) { $this->clear_dynamic ($t); } return; } else if (gettype($tag) == 'array') { if ($debug) $this->logwrite ("clear_dynamic ($tag)"); foreach (array_values($tag) as $t) { $this->clear_dynamic ($t); } return; } else if (!isset($this->TEMPLATE[$tag])) { if ($debug) $this->logwrite ("clear_dynamic ($tag) --> $tag not set, calling parse_internal"); $this->parse_internal ($tag); // $this->TEMPLATE[$tag] = array (); } if ($debug) $this->logwrite ("clear_dynamic ($tag)"); // $this->TEMPLATE[$tag]['loaded'] = true; // $this->TEMPLATE[$tag]['string'] = ''; $this->TEMPLATE[$tag]['result'] = ''; // $this->TEMPLATE[$tag]['clear'] = true; } // // Description // Clear the results of a handle set by parse(). The input handle can // be a single value, an array, or the PHP constant NULL. For the // last case, all handles cleared. // function clear ($handle = NULL) { $debug = $this->DEBUGALL || $this->DEBUG['clear']; if (is_null ($handle)) { // Don't bother unsetting them, just set the whole thing to a new, // empty array. if ($debug) $this->logwrite ("clear (NULL)"); $this->HANDLE = array (); } else if (gettype ($handle) == 'array') { if ($debug) $this->logwrite ("clear ($handle)"); foreach (array_values ($handle) as $h) { $this->clear ($h); } } else if (isset ($this->HANDLE[$handle])) { if ($debug) $this->logwrite ("clear ($handle)"); unset ($this->HANDLE[$handle]); } } // // Description // Clears all information associated with the specified tag as well as // any information associated with embedded templates. This will force // the templates to be reloaded on the next call to subst(). // Additionally, any results of previous calls to subst() will also be // cleared. // // Notes // This leaves dangling references in $this->HANDLE. Or does PHP do // reference counting so they are still valid? // function unload ($tag) { if (!isset($this->TEMPLATE[$tag])) return; if (isset ($this->TEMPLATE[$tag]['parent'])) { $ptag = $this->TEMPLATE[$tag]['parent']; foreach (array_keys($this->TEMPLATE) as $t) { if ($this->TEMPLATE[$t]['parent'] == $ptag) { unset ($this->TEMPLATE[$t]); } } } unset ($this->TEMPLATE[$tag]); return; } // // Description // class.FastTemplate.php3 compatible interface. // function assign ($tplkey, $rest = '') { $this->setkey ($tplkey, $rest); } // // Description // Set a (key,value) in our internal variable array. These will be // used during the substitution phase to replace template variables. // function setkey ($tplkey, $rest = '') { if (gettype ($tplkey) == 'array') { reset ($tplkey); while (list($key,$val) = each ($tplkey)) { if (!empty($key)) { $this->VAR[$key] = $val; } } } else { if (!empty($tplkey)) { $this->VAR[$tplkey] = $rest; } } } function append ($tplkey, $rest = '') { if (gettype ($tplkey) == 'array') { reset ($tplkey); while (list($key,$val) = each ($tplkey)) { if (!empty($key)) { $this->VAR[$key] .= $val; } } } else { if (!empty($tplkey)) { $this->VAR[$tplkey] .= $rest; } } } // // Description // class.FastTemplate.php3 compatible interface // function get_assigned ($key = '') { return $this->getkey ($key); } // // Description // Retrieve a value from our internal variable array given the key name. // function getkey ($key = '') { if (empty($key)) { return false; } else if (isset ($this->VAR[$key])) { return $this->VAR[$key]; } else { return false; } } function fetch ($handle = '') { if (empty($handle)) { $handle = $this->LAST; } return $this->HANDLE[$handle]; } function xprint ($handle = '') { if (empty($handle)) { $handle = $this->LAST; } print ($this->HANDLE[$handle]); } function FastPrint ($handle = '') { $this->xprint ($handle); } function clear_href ($key = '') { $this->unsetkey ($key); } function unsetkey ($key = '') { if (empty($key)) { unset ($this->VAR); $this->VAR = array (); } else if (gettype($key) == 'array') { reset ($key); foreach (array_values($key) as $k) { unset ($this->VAR[$k]); } } else { unset ($this->VAR[$key]); } } function define_nofile ($stringList, $dynamic = 0) { $this->define_raw ($stringList, $dynamic); } // // Description // Member function to control explicit error messages. We don't do // real PHP error handling. // function error ($errorMsg, $die = 0) { $this->ERROR = $errorMsg; echo "ERROR: {$this->ERROR}
\n"; if ($die) { exit; } return; } } mlmmj-1.2.18.0/contrib/web/php-admin/htdocs/dot.htaccess000644 000765 000120 00000000143 11414633670 022634 0ustar00benadmin000000 000000 Require valid-user AuthType Basic AuthName "mlmmj web-interface" AuthUserFile /home/mlmmj/htpasswd mlmmj-1.2.18.0/contrib/web/php-admin/htdocs/edit.php000644 000765 000120 00000007227 11727635244 022005 0ustar00benadmin000000 000000 * * mlmmj/php-perl: * Copyright (C) 2004 Morten K. Poulsen * Copyright (C) 2004 Christian Laursen * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ require(dirname(dirname(__FILE__))."/conf/config.php"); require(dirname(__FILE__)."/class.rFastTemplate.php"); function mlmmj_boolean($name, $nicename, $text) { global $tpl, $topdir, $list; if(is_file($topdir."/".$list."/control/".$name)) $checked = TRUE; else $checked = FALSE; $tpl->assign(array("NAME" => htmlentities($name), "NICENAME" => htmlentities($nicename), "TEXT" => htmlentities($text))); $tpl->assign(array("CHECKED" => $checked ? " checked" : "")); $tpl->parse("ROWS",".boolean"); } function mlmmj_string($name, $nicename, $text) { global $tpl, $topdir, $list; $file = $topdir."/".$list."/control/".$name; $value = ""; if(is_file($file)) { $lines = file($file); $value = $lines[0]; } // remove trailing \n if any, just to be sure $value = preg_replace('/\n$/',"",$value); $tpl->assign(array("NAME" => htmlentities($name), "NICENAME" => htmlentities($nicename), "TEXT" => htmlentities($text), "VALUE" => htmlentities($value))); $tpl->parse("ROWS",".string"); } function mlmmj_list($name, $nicename, $text) { global $tpl, $topdir, $list; $file = "$topdir/$list/control/$name"; $value = ""; if(is_file($file)) $value = file_get_contents($file); // the last \n would result in an extra empty line in the list box, // so we remove it $value = preg_replace('/\n$/',"",$value); $tpl->assign(array("NAME" => htmlentities($name), "NICENAME" => htmlentities($nicename), "TEXT" => htmlentities($text), "VALUE" => htmlentities($value))); $tpl->parse("ROWS",".list"); } // Perl's encode_entities (to be able to use tunables.pl) function encode_entities($str) { return htmlentities($str); } $tpl = new rFastTemplate($templatedir); $list = $_GET["list"]; if(!isset($list)) die("no list specified"); if (dirname(realpath($topdir."/".$list)) != realpath($topdir)) die("list outside topdir"); if(!is_dir($topdir."/".$list)) die("non-existent list"); $tpl->define(array("main" => "edit.html", "boolean" => "edit_boolean.html", "string" => "edit_string.html", "list" => "edit_list.html")); $tpl->assign(array("LIST" =>htmlentities($list))); $tunables = file_get_contents($confdir.'/tunables.pl'); eval($tunables); $tpl->parse("MAIN","main"); $tpl->FastPrint("MAIN"); ?> mlmmj-1.2.18.0/contrib/web/php-admin/htdocs/index.php000644 000765 000120 00000003650 11734220454 022152 0ustar00benadmin000000 000000 * * mlmmj/php-perl: * Copyright (C) 2004 Morten K. Poulsen * Copyright (C) 2004 Christian Laursen * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ require(dirname(dirname(__FILE__))."/conf/config.php"); require(dirname(__FILE__)."/class.rFastTemplate.php"); $tpl = new rFastTemplate($templatedir); $tpl->define(array("main" => "index.html")); $lists = ""; # use scandir to have alphabetical order foreach (scandir($topdir) as $file) { if (!ereg("^\.",$file)) { $lists .= "

".htmlentities($file)."
\n"; $lists .= "Config - Subscribers\n"; $lists .= "

\n"; } } $tpl->assign(array("LISTS" => $lists)); $tpl->parse("MAIN","main"); $tpl->FastPrint("MAIN"); ?> mlmmj-1.2.18.0/contrib/web/php-admin/htdocs/save.php000644 000765 000120 00000006773 11727635244 022023 0ustar00benadmin000000 000000 * * mlmmj/php-perl: * Copyright (C) 2004 Morten K. Poulsen * Copyright (C) 2004 Christian Laursen * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ require(dirname(dirname(__FILE__))."/conf/config.php"); require(dirname(__FILE__)."/class.rFastTemplate.php"); function mlmmj_boolean($name, $nicename, $text) { global $tpl, $topdir, $list; $file = $topdir."/".$list."/control/".$name; if(isset($_POST[$name]) && !empty($_POST[$name])) { if(!touch($file)) die("Couldn't open ".$file." for writing"); if (!chmod($file, 0644)) die("Couldn't chmod ".$file); } else { if (file_exists($file)) { if (!unlink($file)) die("Couldn't unlink ".$file); } } } function mlmmj_string ($name, $nicename, $text) { mlmmj_list($name, $nicename, $text); } function mlmmj_list($name, $nicename, $text) { global $tpl, $topdir, $list; $file = $topdir."/".$list."/control/".$name; if(isset($_POST[$name]) && !empty($_POST[$name]) && !preg_match('/^\s*$/',$_POST[$name])) { // remove all \r $_POST[$name]=preg_replace('/\r/',"",$_POST[$name]); // no trailing \n?, then we add one if (!preg_match('/\n$/',$_POST[$name])) $_POST[$name].="\n"; // we don't like whitespace before a \n $_POST[$name]=preg_replace('/\s*\n/',"\n",$_POST[$name]); if (!$fp = fopen($file, "w")) die("Couldn't open ".$file." for writing"); // write the result in a file fwrite($fp, $_POST[$name]); fclose($fp); if (!chmod($file, 0644)) die("Couldn't chmod ".$file); } else { if (file_exists($file)) { if (!unlink($file)) die("Couldn't unlink ".$file); } } } // Perl's encode_entities (to be able to use tunables.pl) function encode_entities($str) { return htmlentities($str); } $tpl = new rFastTemplate($templatedir); $list = $_POST["list"]; if(!isset($list)) die("no list specified"); if (dirname(realpath($topdir."/".$list)) != realpath($topdir)) die("list outside topdir"); if(!is_dir($topdir."/".$list)) die("non-existent list"); $tpl->define(array("main" => "save.html")); $tpl->assign(array("LIST" => htmlentities($list))); $tunables = file_get_contents($confdir.'/tunables.pl'); eval($tunables); $tpl->parse("MAIN","main"); $tpl->FastPrint("MAIN"); ?> mlmmj-1.2.18.0/contrib/web/php-admin/htdocs/subscribers.php000644 000765 000120 00000007421 11734220454 023371 0ustar00benadmin000000 000000 * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ require(dirname(dirname(__FILE__))."/conf/config.php"); require(dirname(__FILE__)."/class.rFastTemplate.php"); $tpl = new rFastTemplate($templatedir); # get the list parameter and check that list exists $list = $_GET["list"]; if(!isset($list)) die("no list specified"); if (dirname(realpath($topdir."/".$list)) != realpath($topdir)) die("list outside topdir"); if(!is_dir($topdir."/".$list)) die("non-existent list"); # this will be displayed on the top of the page $message = ""; # subscribe some people if tosubscribe is set if (isset($_POST["tosubscribe"])) { foreach (preg_split('/\r\n|\n|\r/', $_POST["tosubscribe"]) as $line) { $email = trim($line); if ($email != "") { if (filter_var($email, FILTER_VALIDATE_EMAIL)) { $cmd = "/usr/bin/mlmmj-sub -L ".escapeshellarg("$topdir/$list")." -a ".escapeshellarg($email)." 2>&1"; unset($out); exec($cmd, $out, $ret); if ($ret !== 0) { $message.= "* Subscribe error for $email\ncommand: $cmd\nreturn code: $ret\noutput: ".implode("\n", $out)."\n"; } } else { $message.= "* Email address not valid: $email\n"; } } } # delete some people if delete is set } else if (isset($_POST["delete"])) { $email = $_POST["email"]; if (! filter_var($email, FILTER_VALIDATE_EMAIL)) die("Email address not valid"); $cmd = "/usr/bin/mlmmj-unsub -L ".escapeshellarg("$topdir/$list")." -a ".escapeshellarg($email)." 2>&1"; unset($out); exec($cmd, $out, $ret); if ($ret !== 0) { $message.= "* Unsubscribe error.\ncommand: $cmd\nreturn code: $ret\noutput: ".implode("\n", $out)."\n"; } } $subscribers=""; # get subscribers from mlmmj $cmd = "/usr/bin/mlmmj-list -L ".escapeshellarg("$topdir/$list")." 2>&1"; unset($out); exec($cmd, $out, $ret); if ($ret !== 0) { $message.= "* Error: Could not get subscribers list.\n"; } else { foreach ($out as $email) { $email = trim($email); $form = "
"; $form.= ""; $form.= ""; $form.= "
"; $subscribers.= "".htmlspecialchars($email)."$form\n"; } if ($subscribers === "") { $subscribers = "This list is empty.\n"; } } # set template vars $tpl->define(array("main" => "subscribers.html")); $tpl->assign(array("LIST" => htmlspecialchars($list))); $tpl->assign(array("MESSAGE" => "
".htmlspecialchars($message)."
")); $tpl->assign(array("SUBS" => $subscribers)); $tpl->parse("MAIN","main"); $tpl->FastPrint("MAIN"); ?> mlmmj-1.2.18.0/contrib/web/php-admin/conf/config.php000644 000765 000120 00000000177 11727635244 021763 0ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/php-admin/conf/tunables.pl000644 000765 000120 00000021725 11727635244 022161 0ustar00benadmin000000 000000 mlmmj_list("listaddress", "List address", "This option contains all addresses which mlmmj sees as listaddresses (see ". "tocc below). The first one is the one used as the primary one, when mlmmj ". "sends out mail."); mlmmj_boolean("closedlist", "Closed list", "If the list is open or closed. If it's closed subscription ". "and unsubscription via mail is disabled."); mlmmj_boolean("closedlistsub", "Closed for subscription", "Closed for subscription. Unsubscription is possible."); mlmmj_boolean("nosubconfirm", "No subscribe confirmation", "If this option is set, the user is not required to confirm when subscribing or unsubscribing."); mlmmj_boolean("moderated", "Moderated", "If this option is set, the emailaddresses in the file listdir/control/moderators will act as moderators for the list."); mlmmj_list("moderators", "Moderators", "If the list is moderated, this is the list of moderators."); mlmmj_list("submod", "Subscription moderators", "This is the list of moderators that will approve subscriptions."); mlmmj_boolean("tocc", "To: Cc:", "If this option is set, the list address does not have to be in the To: or Cc: header of the email to the list."); mlmmj_boolean("addtohdr", "Add To: header", "If this option is set, a To: header including the recipients emailaddress will be added to outgoing mail. ". "Recommended usage is to remove existing To: headers with delheaders (see below) first."); mlmmj_boolean("subonlypost", "Subscribers only post", "If this option is set, only people who are subscribed to the list, are allowed to post to it. ". "The check is made against the \"From:\" header."); mlmmj_boolean("modnonsubposts", "Moderate non-subscriber posts", "If this option is set and subonlypost is enabled, all postings from ". "people who are not subscribed to the list will be moderated."); mlmmj_string("prefix", "Prefix", "The prefix for the Subject: line of mails to the list. This will alter the Subject: line, ". "and add a prefix if it's not present elsewhere."); mlmmj_list("owner", "Owner", "The emailaddresses in this list will get mails to ".encode_entities($list)."+owner"); mlmmj_list("customheaders", "Custom headers", "These headers are added to every mail coming through. This is ". "the place you want to add Reply-To: header in case you want ". "such. ". "If a header should not occur twice in the mail it should be listed in the 'Delete headers' box too."); mlmmj_list("delheaders", "Delete headers", "In this file is specified *ONE* headertoken to match pr. line. ". "If the file consists of: Received: Message-ID: Then all occurences of these headers in incoming list mail will be deleted. ". "\"From \" and \"Return-Path:\" are deleted no matter what."); mlmmj_list("access", "Access", "If this option is set, all headers of a post to the list is matched against the rules. The first rule to match wins. ". "See README.access for syntax and examples. NOTE: If this field is empty access control is *disabled*, ". "unlike having an empty control/access file."); mlmmj_string("memorymailsize", "Memory mail size", "Here is specified in bytes how big a mail can be and still be prepared for sending in memory. ". "It's greatly reducing the amount of write system calls to prepare it in memory before sending it, ". "but can also lead to denial of service attacks. Default is 16k (16384 bytes)."); mlmmj_string("relayhost", "Relay host", "The host specified (IP address or domainname, both works) in this file will be used for relaying the mail sent to the list. ". "Defaults to 127.0.0.1."); mlmmj_string("smtpport", "SMTP port", "In this file a port other than port 25 for connecting to the relayhost can be specified."); mlmmj_string("delimiter", "Delimiter", "This specifies what to use as recipient delimiter for the list.". "Default is '+'."); mlmmj_boolean("notifysub", "Notify subscribers", "If this option is set, the owner(s) will get a mail with the address of someone sub/unsubscribing to a mailinglist."); mlmmj_boolean("notifymod", "Notify moderation", "If this option is set, the poster (based on the envelope from) will ". "get a mail when their post is being moderation."); mlmmj_string("digestinterval", "Digest interval", "This option specifies how many seconds will pass before the ". "next digest is sent. Defaults to 604800 seconds, which is 7 ". "days."); mlmmj_string("digestmaxmails", "Max. digest mails", "This option specifies how many mails can accumulate before ". "digest sending is triggered. Defaults to 50 mails, meaning ". "that if 50 mails arrive to the list before digestinterval have ". "passed, the digest is delivered."); mlmmj_string("bouncelife", "Bouncing lifetime", "Here is specified for how long time in seconds an address can bounce before it's unsubscribed. Defaults ". "to 432000 seconds, which is 5 days."); mlmmj_boolean("noarchive", "No archive", "If this option is set, the mails won't be saved in the ". "archive but simply deleted"); mlmmj_boolean("noget", "No get", "If this option is set, listname+get-INDEX is turned off."); mlmmj_boolean("subonlyget", "Subscribers only get", "If this option is set, retrieving old posts with +get-N is only possible for subscribers."); mlmmj_string("verp", "VERP", "Enable VERP support. Anything added in this variable will be appended the ". "MAIL FROM: line. If 'postfix' is put in the file, it'll make postfix use ". "VERP by adding XVERP=-= to the MAIL FROM: line."); mlmmj_string("maxverprecips", "Maximum VERP recipients", "How many recipients pr. mail delivered to the smtp server. Defaults to 100."); mlmmj_boolean("notoccdenymails", "No To: Cc: deny mails", "This switch turns off whether mlmmj sends out notification about postings ". "being denied due to the listaddress not being in To: or Cc: (see 'tocc')."); mlmmj_boolean("noaccessdenymails", "No access deny mails", "This switch turns off whether mlmmj sends out notification about postings ". "being rejected due to an access rule (see 'access')."); mlmmj_boolean("nosubonlydenymails", "No subscribers only deny mails", "This switch turns off whether mlmmj sends out notification about postings ". "being rejected due to a subscribers only posting list (see 'subonlypost')."); mlmmj_boolean("nosubmodmails", "No subscription moderated mails", "This switch turns off whether mlmmj sends out notification about ". "subscription being moderated to the person requesting subscription". "(see 'submod')."); mlmmj_boolean("nodigesttext", "No digest text summary", "This switch turns off whether digest mails will have a text part with a thread ". "summary."); mlmmj_boolean("nodigestsub", "No digest subscribers", "If this option is set, subscription to the digest version of the mailinglist ". "will be denied. (Useful if you don't want to allow digests and notify users ". "about it)."); mlmmj_boolean("nonomailsub", "No nomail subscribers", "If this option is set, subscription to the nomail version of the mailinglist ". "will be denied. (Useful if you don't want to allow nomail and notify users ". "about it)."); mlmmj_string("maxmailsize", "Max. mail size", "With this option the maximal allowed size of incoming mails can be specified."); mlmmj_boolean("nomaxmailsizedenymails", "No max. mail size deny mails", "If this is set, no reject notifications caused by violation of maxmailsize ". "will be sent."); mlmmj_boolean("nolistsubsemail", "No list subscribers email", "If this is set, the LISTNAME+list\@ functionality for requesting an ". "email with the subscribers for owner is disabled."); mlmmj_string("staticbounceaddr", "Static bounce address", "If this is set to something\@example.org, the bounce address (Return-Path:) ". "will be fixed to something+listname-bounces-and-so-on\@example.org ". "in case you need to disable automatic bounce handling."); mlmmj_boolean("ifmodsendonlymodmoderate", "If moderator send only moderator moderate", "If this is set, then mlmmj in case of moderation checks the ". "envelope from, to see if the sender is a moderator, and in that case ". "only send the moderation mails to that address. In practice this means that ". "a moderator sending mail to the list won't bother all the other moderators ". "with his mail."); mlmmj_list("footer", "Footer", "The content of this option is appended to mail sent to the list."); mlmmj_boolean("notmetoo", "Not me too", "If this is set, mlmmj attempts to exclude the sender of a post ". "from the distribution list for that post so people don't receive copies ". "of their own posts."); mlmmj-1.2.18.0/contrib/web/perl-user/config.pl000755 000765 000120 00000000121 11414633670 020705 0ustar00benadmin000000 000000 $topdir = "/var/spool/mlmmj"; $sendmail = "/usr/lib/sendmail"; $delimiter = "+"; mlmmj-1.2.18.0/contrib/web/perl-user/example.html000644 000765 000120 00000002157 11414633670 021434 0ustar00benadmin000000 000000 mlmmj-webinterface

subscribe


unsubscribe


mlmmj-1.2.18.0/contrib/web/perl-user/mlmmj.cgi000755 000765 000120 00000006261 11727635244 020724 0ustar00benadmin000000 000000 #!/usr/bin/perl # Copyright (C) 2004 Morten K. Poulsen # # $Id$ # # 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 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. use CGI qw(:standard); require "config.pl"; # You might want to customize this function if you are not running the web # server on the same host as the mail server running the lists, or if your # lists are not in $topdir/list-name. sub mlmmj_check_list { my $list = shift; if ($list !~ /^([a-z0-9-.]+)\@/) { return false; } if (!-f "$topdir/$1/control/listaddress") { return false; } open(FILE, "$topdir/$1/control/listaddress") or die('unable to open control/listaddress'); $listaddr = readline(FILE); chomp($listaddr); if ($list ne $listaddr) { return false; } return true; } sub mlmmj_mail { my $from = shift; my $to = shift; my $subject = shift; my $body = shift; my $date = `/bin/date -R`; $mail = "Received: from " . $query->remote_addr() . " by " . $query->server_name() . " with HTTP;\n" . "\t$date" . "X-Originating-IP: " . $query->remote_addr() . "\n" . "X-Mailer: mlmmj-webinterface powered by Perl\n" . "Date: $date" . "From: $from\n" . "To: $to\n" . "Subject: $subject\n" . "\n" . "$body\n"; open(P, "|$sendmail -i -t") or die('unable to send mail'); print(P $mail); close(P); } sub mlmmj_gen_to { my $list = shift; my $job = shift; if (($job ne 'subscribe') && ($job ne 'unsubscribe')) { return false; } ($user, $domain) = split(/@/, $list); return sprintf("%s%s%s@%s", $user, $delimiter, $job, $domain); } sub check_email { my $addr = shift; if ($addr !~ /^[-!#$%&\'*+\.\/0-9=?A-Z^_a-z{|}~]+@[-0-9A-Za-z]+\.[-\.0-9A-Za-z]+$/) { return false; } else { return true; } } $query = new CGI; $list = $query->param('mailinglist'); $job = $query->param('job'); $redirect_failure = $query->param('redirect_failure'); $redirect_success = $query->param('redirect_success'); $email = $query->param('email'); if (mlmmj_check_list($list) ne false && check_email($email) ne false)) { $to = mlmmj_gen_to($list, $job); if ($to ne false) { mlmmj_mail($email, $to, "$job to $list", $job); print $query->redirect($redirect_success); exit(0); } } print $query->redirect($redirect_failure); mlmmj-1.2.18.0/contrib/web/perl-admin/conf/000755 000765 000120 00000000000 11727635243 020152 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/perl-admin/htdocs/000755 000765 000120 00000000000 11727635243 020511 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/perl-admin/README000644 000765 000120 00000005015 11727635243 020106 0ustar00benadmin000000 000000 mlmmj-1.0.0 August 20th 2004 To use this web-interface you have to: 0) Make sure you have the CGI::FastTemplate perl module installed. If not, then install it. It has no dependencies to other perl modules. 1) Copy the files from the perl-admin directory of the mlmmj distribution to a suitable location and point your webroot to the htdocs directory. If you don't want the webinterface in the root of your website it is recommended to make an alias in your web server configuration in order to keep the conf directory at the same level as the htdocs directory and still outside webscope. 2) You need to enable cgi in your apache configuration like this Options ExecCGI DirectoryIndex index.cgi AddHandler cgi-script .cgi 3) Change the permissions of the listdir/control directories of any list you want to control using the web-interface, so the web server can write in it: # chown -R wwwrun /var/spool/mlmmj/mlmmj-test/control/ 4) If the web server does not run as the same user the mailserver writes as you need to create a group (eg. mlmmj) and add both users to it. The subscribers.d directory then needs to be writable by that group: # chgrp -R mlmmj /var/spool/mlmmj/mlmmj-test/subscribers.d # chmod -R g+w /var/spool/mlmmj/mlmmj-test/subscribers.d # chgrp -R mlmmj /var/spool/mlmmj/mlmmj-test/digesters.d # chmod -R g+w /var/spool/mlmmj/mlmmj-test/digesters.d # chgrp -R mlmmj /var/spool/mlmmj/mlmmj-test/nomailsubs.d # chmod -R g+w /var/spool/mlmmj/mlmmj-test/nomailsubs.d # chgrp -R mlmmj /var/spool/mlmmj/mlmmj-test/text # chmod -R g+w /var/spool/mlmmj/mlmmj-test/text To enable access control on Apache you have to: 5) Rename dot.htaccess to .htaccess and edit the path inside the file to point to a htpasswd file somewhere outside the webscope. If you don't have one already, you can create one like this htpasswd -c /home/mlmmj/htpasswd USER It will then ask you for a password for the given username. 6) That is it, you are ready to use the interface. Further customization: You can set two environment variables in your apache config to control the configuration of the mlmmj webinterface. Remember to have mod_env loaded if you do this. SetEnv CONFIG_PATH /home/mlmmj/conf/config.pl SetEnv TUNABLES_PATH /home/mlmmj/conf/tunables.pl This allows you to run several instances of the webinterface with e.g. different topdirs, translated to another language or with another layout. mlmmj-1.2.18.0/contrib/web/perl-admin/templates/000755 000765 000120 00000000000 11727635243 021223 5ustar00benadmin000000 000000 mlmmj-1.2.18.0/contrib/web/perl-admin/templates/edit.html000644 000765 000120 00000000712 11727635243 023036 0ustar00benadmin000000 000000 mlmmj config

mlmmj config

Index | Subscribers | Edit texts

List: $LIST

$ROWS
mlmmj-1.2.18.0/contrib/web/perl-admin/templates/edit_boolean.html000644 000765 000120 00000000151 11414633670 024525 0ustar00benadmin000000 000000 $NICENAME$TEXT mlmmj-1.2.18.0/contrib/web/perl-admin/templates/edit_list.html000644 000765 000120 00000000145 11414633670 024064 0ustar00benadmin000000 000000 $NICENAME$TEXT mlmmj-1.2.18.0/contrib/web/perl-admin/templates/edit_string.html000644 000765 000120 00000000142 11414633670 024414 0ustar00benadmin000000 000000 $NICENAME$TEXT mlmmj-1.2.18.0/contrib/web/perl-admin/templates/edit_text.html000644 000765 000120 00000000700 11727635243 024077 0ustar00benadmin000000 000000 mlmmj config

mlmmj config

Index | Configuration | Subscribers

List: $LIST

$ROWS
mlmmj-1.2.18.0/contrib/web/perl-admin/templates/edit_textstring.html000644 000765 000120 00000000135 11727635243 025330 0ustar00benadmin000000 000000 $NAME mlmmj-1.2.18.0/contrib/web/perl-admin/templates/index.html000644 000765 000120 00000000175 11414633670 023216 0ustar00benadmin000000 000000 mlmmj config

mlmmj config

$LISTS
mlmmj-1.2.18.0/contrib/web/perl-admin/templates/index_row.html000644 000765 000120 00000000306 11727635243 024106 0ustar00benadmin000000 000000 $LISTConfigureSubscribersEdit texts mlmmj-1.2.18.0/contrib/web/perl-admin/templates/save.html000644 000765 000120 00000000421 11727635243 023044 0ustar00benadmin000000 000000 mlmmj config

mlmmj config

$LIST control values saved!

Index | Configuration | Edit texts

mlmmj-1.2.18.0/contrib/web/perl-admin/templates/save_text.html000644 000765 000120 00000000416 11727635243 024114 0ustar00benadmin000000 000000 mlmmj config

mlmmj config

$LIST text values saved!

Index | Configuration | Edit texts

mlmmj-1.2.18.0/contrib/web/perl-admin/templates/subscribers.html000644 000765 000120 00000005437 11727635243 024450 0ustar00benadmin000000 000000 mlmmj subscribers

mlmmj subscribers

Index | Reload subscriber list | Configuration | Edit texts

$ACTION


Remove all subscribers:  
Click this as extra safety check:

Bulk add subscribers:   File:
Normal subscribers:
Digest subscribers:
No-mail subscribers:
Add subscriber:   Email address:
Normal subscriber:
Digest subscriber:
No-mail subscriber:
Search for subscriber: Email address:

List: $LIST
Subscribers: $SUBCOUNT


$PAGINATOR $ROWS
Email addressNormal subscriberDigest subscriberNo-mail subscriber
$PAGINATOR

mlmmj-1.2.18.0/contrib/web/perl-admin/templates/subscribers_row.html000644 000765 000120 00000000472 11414633670 025324 0ustar00benadmin000000 000000 $EMAIL mlmmj-1.2.18.0/contrib/web/perl-admin/htdocs/dot.htaccess000644 000765 000120 00000000143 11414633667 023015 0ustar00benadmin000000 000000 Require valid-user AuthType Basic AuthName "mlmmj web-interface" AuthUserFile /home/mlmmj/htpasswd mlmmj-1.2.18.0/contrib/web/perl-admin/htdocs/edit.cgi000755 000765 000120 00000006567 11414633667 022144 0ustar00benadmin000000 000000 #!/usr/bin/perl -w # Copyright (C) 2004 Morten K. Poulsen # Copyright (C) 2004 Christian Laursen # # $Id$ # # 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 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. use strict; use CGI; use CGI::FastTemplate; use HTML::Entities; use vars qw($topdir $templatedir $list); if (exists $ENV{CONFIG_PATH}) { require $ENV{CONFIG_PATH}; } else { require "../conf/config.pl"; } my $tpl = new CGI::FastTemplate($templatedir); my $q = new CGI; $list = $q->param("list"); die "no list specified" unless $list; die "non-existent list" unless -d("$topdir/$list"); $tpl->define(main => "edit.html", boolean => "edit_boolean.html", string => "edit_string.html", list => "edit_list.html"); $tpl->assign(LIST => encode_entities($list)); my $tunables_file = "../conf/tunables.pl"; if (exists $ENV{TUNABLES_PATH}) { $tunables_file = $ENV{TUNABLES_PATH}; } do $tunables_file; print "Content-type: text/html\n\n"; $tpl->parse(CONTENT => "main"); $tpl->print; sub mlmmj_boolean { my ($name, $nicename, $text) = @_; my $checked = -f "$topdir/$list/control/$name"; $tpl->assign(NAME => encode_entities($name)); $tpl->assign(NICENAME => encode_entities($nicename)); $tpl->assign(TEXT => encode_entities($text)); $tpl->assign(CHECKED => $checked ? ' checked' : ''); $tpl->parse(ROWS => ".boolean"); } sub mlmmj_string { my ($name, $nicename, $text) = @_; my $file = "$topdir/$list/control/$name"; my $value; if (! -f $file) { $value = ""; } else { open(F, $file) or die("can't open $file"); $value = ; close(F); chomp($value); } $tpl->assign(NAME => encode_entities($name)); $tpl->assign(NICENAME => encode_entities($nicename)); $tpl->assign(TEXT => encode_entities($text)); $tpl->assign(VALUE => encode_entities($value)); $tpl->parse(ROWS => ".string"); } sub mlmmj_list { my ($name, $nicename, $text) = @_; my $file = "$topdir/$list/control/$name"; my $value; if (! -f $file) { $value = ""; } else { open(F, $file) or die("can't open $file"); while () { $value .= $_; } close(F); chomp($value); } $tpl->assign(NAME => encode_entities($name)); $tpl->assign(NICENAME => encode_entities($nicename)); $tpl->assign(TEXT => encode_entities($text)); $tpl->assign(VALUE => encode_entities($value)); $tpl->parse(ROWS => ".list"); } mlmmj-1.2.18.0/contrib/web/perl-admin/htdocs/edit_text.cgi000755 000765 000120 00000004600 11727635243 023171 0ustar00benadmin000000 000000 #!/usr/bin/perl -w # Copyright (C) 2007 Franky Van Liedekerke # # $Id$ # # 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 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. use strict; use CGI; use CGI::FastTemplate; use HTML::Entities; use vars qw($topdir $templatedir $list); if (exists $ENV{CONFIG_PATH}) { require $ENV{CONFIG_PATH}; } else { require "../conf/config.pl"; } my $tpl = new CGI::FastTemplate($templatedir); my $q = new CGI; $list = $q->param("list"); die "no list specified" unless $list; die "non-existent list" unless -d("$topdir/$list"); $tpl->define(main => "edit_text.html", list => "edit_textstring.html"); $tpl->assign(LIST => encode_entities($list)); my $textdir = "$topdir/$list/text"; my @files; opendir(DIR, $textdir ) || die "can't opendir $textdir: $!"; @files = grep { !/^\./ && -f "$textdir/$_" } readdir(DIR); closedir DIR; for my $textfile (sort @files) { mlmmj_text($textfile); } print "Content-type: text/html\n\n"; $tpl->parse(CONTENT => "main"); $tpl->print; sub mlmmj_text { my ($name) = @_; my $file = "$textdir/$name"; my $value; if (! -f $file) { $value = ""; } else { open(F, $file) or die("can't open $file"); while () { $value .= $_; } close(F); chomp($value); } $tpl->assign(NAME => encode_entities($name)); $tpl->assign(VALUE => encode_entities($value)); $tpl->parse(ROWS => ".list"); } mlmmj-1.2.18.0/contrib/web/perl-admin/htdocs/index.cgi000755 000765 000120 00000003560 11414633667 022314 0ustar00benadmin000000 000000 #!/usr/bin/perl -w # Copyright (C) 2004 Morten K. Poulsen # Copyright (C) 2004 Christian Laursen # # $Id$ # # 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 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. use strict; use URI::Escape; use HTML::Entities; use CGI::FastTemplate; use vars qw($topdir $templatedir); if (exists $ENV{CONFIG_PATH}) { require $ENV{CONFIG_PATH}; } else { require "../conf/config.pl"; } my $tpl = new CGI::FastTemplate($templatedir); $tpl->define(main => "index.html", row => "index_row.html"); my $lists = ""; opendir(DIR, $topdir) or die "Couldn't open $topdir for reading: $!"; while (my $list = readdir(DIR)) { next if $list =~ /^\./; $tpl->assign(LIST => encode_entities($list)); $tpl->assign(ULIST => uri_escape($list)); $tpl->parse(LISTS => '.row'); } closedir(DIR); print "Content-type: text/html\n\n"; $tpl->parse(CONTENT => "main"); $tpl->print; mlmmj-1.2.18.0/contrib/web/perl-admin/htdocs/save.cgi000755 000765 000120 00000005366 11727635243 022150 0ustar00benadmin000000 000000 #!/usr/bin/perl -w # Copyright (C) 2004 Morten K. Poulsen # Copyright (C) 2004, 2005 Christian Laursen # # $Id$ # # 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 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # We might want some kind of validation of the values we are about to save, # but that would require save.cgi to know about all kind of options that mlmmj # accepts. I am not sure we want that. -- mortenp 20040709 use strict; use CGI; use CGI::FastTemplate; use HTML::Entities; use vars qw($topdir $templatedir $list); if (exists $ENV{CONFIG_PATH}) { require $ENV{CONFIG_PATH}; } else { require "../conf/config.pl"; } my $tpl = new CGI::FastTemplate($templatedir); my $q = new CGI; $list = $q->param("list"); die "no list specified" unless $list; die "non-existent list" unless -d("$topdir/$list"); $tpl->define(main => "save.html"); $tpl->assign(LIST => encode_entities($list)); my $tunables_file = "../conf/tunables.pl"; if (exists $ENV{TUNABLES_PATH}) { $tunables_file = $ENV{TUNABLES_PATH}; } do $tunables_file; print "Content-type: text/html\n\n"; $tpl->parse(CONTENT => "main"); $tpl->print; sub mlmmj_boolean { my ($name, $nicename, $text) = @_; my $file = "$topdir/$list/control/$name"; my $value = $q->param($name); if ($value) { open (FILE, ">$file") or die "Couldn't open $file for writing: $!"; close FILE; } else { unlink $file; } } sub mlmmj_string { mlmmj_list(@_); } sub mlmmj_list { my ($name, $nicename, $text) = @_; my $file = "$topdir/$list/control/$name"; my $value = $q->param($name); if (defined $value && $value !~ /^\s*$/) { $value .= "\n" if $value !~ /\n$/; $value =~ s/\s*\r?\n/\n/g; open (FILE, ">$file") or die "Couldn't open $file for writing: $!"; print FILE $value; close FILE; } else { unlink $file; } } mlmmj-1.2.18.0/contrib/web/perl-admin/htdocs/save_text.cgi000755 000765 000120 00000004534 11727635243 023210 0ustar00benadmin000000 000000 #!/usr/bin/perl -w # Copyright (C) 2007 Franky Van Liedekerke # # $Id$ # # 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 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # We might want some kind of validation of the values we are about to save, # but that would require save.cgi to know about all kind of options that mlmmj # accepts. I am not sure we want that. -- mortenp 20040709 use strict; use CGI; use CGI::FastTemplate; use HTML::Entities; use vars qw($topdir $templatedir $list); if (exists $ENV{CONFIG_PATH}) { require $ENV{CONFIG_PATH}; } else { require "../conf/config.pl"; } my $tpl = new CGI::FastTemplate($templatedir); my $q = new CGI; $list = $q->param("list"); die "no list specified" unless $list; die "non-existent list" unless -d("$topdir/$list"); $tpl->define(main => "save_text.html"); $tpl->assign(LIST => encode_entities($list)); my $textdir = "$topdir/$list/text"; my @files; opendir(DIR, $textdir ) || die "can't opendir $textdir: $!"; @files = grep { !/^\./ && -f "$textdir/$_" } readdir(DIR); closedir DIR; for my $textfile (sort @files) { mlmmj_text($textfile); } print "Content-type: text/html\n\n"; $tpl->parse(CONTENT => "main"); $tpl->print; sub mlmmj_text { my ($name, $nicename, $text) = @_; my $file = "$textdir/$name"; my $value = $q->param($name); open (FILE, ">$file") or die "Couldn't open $file for writing: $!"; print FILE $value; close FILE; } mlmmj-1.2.18.0/contrib/web/perl-admin/htdocs/subscribers.cgi000755 000765 000120 00000017432 11727635243 023535 0ustar00benadmin000000 000000 #!/usr/bin/perl -w # Copyright (C) 2004, 2005, 2006, 2007 Christian Laursen # Copyright (C) 2007 Franky Van Liedekerke # # $Id$ # # 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 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. use strict; use URI::Escape; use HTML::Entities; use CGI; use CGI::FastTemplate; use Digest::MD5; use vars qw($topdir $templatedir $list); if (exists $ENV{CONFIG_PATH}) { require $ENV{CONFIG_PATH}; } else { require "../conf/config.pl"; } my $mlmmjsub = "/usr/local/bin/mlmmj-sub"; my $mlmmjunsub = "/usr/local/bin/mlmmj-unsub"; my $tpl = new CGI::FastTemplate($templatedir); my $q = new CGI; $list = $q->param("list"); my $update = $q->param("update"); my $search = $q->param("search"); my $email = $q->param("email"); my $file = $q->param("file"); my $removeall = $q->param("removeall"); # Everything is submitted from the same form so a little hackery is needed # to pick the right action to perform. When doing subscribe and search we # don't depend on the submit buttons since hitting enter in either of the # text fields will pick the "Subscribe" button. # # If an email has been entered for subscription, clear the search field. if (defined $email && $email !~ /^$/) { $search = undef; } else { $email = undef; } die "no list specified" unless $list; die "non-existent list" unless -d("$topdir/$list"); $tpl->define(main => "subscribers.html", row => "subscribers_row.html"); my $action = ''; my $subscribers; my $subcount; if (defined $removeall) { my $removeall_check = $q->param("removeall_check"); if ($removeall_check) { unlink <$topdir/$list/subscribers.d/*>; unlink <$topdir/$list/nomailsubs.d/*>; unlink <$topdir/$list/digesters.d/*>; $action = "All subscribers have been removed."; } else { $action = "Safety check not clicked, nothing done."; } } elsif (defined $file) { my $subscriber = $q->param("subscriber"); my $digester = $q->param("digester"); my $nomailsub = $q->param("nomailsub"); my $upload_handle = $q->upload("file"); binmode $upload_handle; while (<$upload_handle>) { s/\r?\n$//; my $email=$_; if ($email =~ /^[a-z0-9\.\-_\@]+$/i) { if ($subscriber) { system "$mlmmjsub -L $topdir/$list -a $email -U -s"; } if ($digester) { system "$mlmmjsub -L $topdir/$list -a $email -Ud -s"; } if ($nomailsub) { system "$mlmmjsub -L $topdir/$list -a $email -Un -s"; } if ($? == 0) { $action .= "$email has been subscribed.
\n"; } else { $action .= "error subscribing $email (code $?)
\n"; } } else { $action .= '"'.encode_entities($email).'" is not a valid email address.
'; } } } elsif (defined $email) { my $subscriber = $q->param("subscriber"); my $digester = $q->param("digester"); my $nomailsub = $q->param("nomailsub"); if ($email =~ /^[a-z0-9\.\-_\@]+$/i) { if ($subscriber) { system "$mlmmjsub -L $topdir/$list -a $email -U -s"; } if ($digester) { system "$mlmmjsub -L $topdir/$list -a $email -Ud -s"; } if ($nomailsub) { system "$mlmmjsub -L $topdir/$list -a $email -Un -s"; } if ($? == 0) { $action = "$email has been added"; } else { $action = "error adding $email (code $?)"; } } else { $action = '"'.encode_entities($email).'" is not a valid email address.'; } } elsif (defined $update) { my $maxid = $q->param("maxid"); $subscribers = get_subscribers(); for (my $i = 0; $i < $maxid; ++$i) { my $email = $q->param("email$i"); if (defined $email) { if ($email =~ /^[a-z0-9\.\-_\@]+$/i) { my $updated = 0; my @actions = (); push @actions, {oldstatus => exists $subscribers->{$email}->{subscriber}, newstatus => defined $q->param("subscriber$i"), action => ''}; push @actions, {oldstatus => exists $subscribers->{$email}->{digester}, newstatus => defined $q->param("digester$i"), action => '-d'}; push @actions, {oldstatus => exists $subscribers->{$email}->{nomailsub}, newstatus => defined $q->param("nomailsub$i"), action => '-n'}; for my $action (@actions) { if ($action->{oldstatus} && !$action->{newstatus}) { system "$mlmmjunsub -L $topdir/$list -a $email $action->{action}"; $updated = 1; } elsif (!$action->{oldstatus} && $action->{newstatus}) { system "$mlmmjsub -L $topdir/$list -a $email $action->{action}"; $updated = 1; } } if ($updated) { $action .= "Subscription for $email has been updated.
\n"; } } else { $action .= '"'.encode_entities($email).'" is not a valid email address.'."
\n"; } } } } $tpl->assign(ACTION => $action); $subscribers = get_subscribers(); my $paginator = ''; my $page = $q->param('page'); $page = 0 unless defined $page && $page =~ /^\d+$/; if (keys %$subscribers > 50) { $paginator = 'Pages: '; my $pages = (keys %$subscribers) / 50; $page = 0 unless ($page >= 0 && $page < $pages); my $searchstr = (defined $search && $search ne '') ? '&search='.uri_escape($search) : ''; for (my $i = 0; $ i < $pages; ++$i) { if ($page == $i) { $paginator .= ($i + 1)." "; } else { $paginator .= "".($i + 1)." "; } } } my $i = 0; my @addresses = sort {lc $a cmp lc $b} keys %$subscribers; if ($paginator ne '') { @addresses = @addresses[$page * 50 .. ($page + 1) * 50 - 1]; pop @addresses until defined $addresses[@addresses - 1]; } for my $address (@addresses) { $tpl->assign(EMAIL => $address, ID => $i++, SCHECKED => $subscribers->{$address}->{subscriber} ? 'checked' : '', DCHECKED => $subscribers->{$address}->{digester} ? 'checked' : '', NCHECKED => $subscribers->{$address}->{nomailsub} ? 'checked' : ''); $tpl->parse(ROWS => '.row'); } if (keys %$subscribers == 0) { $tpl->assign(ROWS => ''); } $tpl->assign(LIST => encode_entities($list), MAXID => scalar(@addresses), SEARCH => defined $search ? $search : '', PAGINATOR => $paginator, PAGE => $page, SUBCOUNT => $subcount); print "Content-type: text/html\n\n"; $tpl->parse(CONTENT => "main"); $tpl->print; sub get_subscribers { my %subscribers = (); my @subscribers = `/usr/local/bin/mlmmj-list -L $topdir/$list`; my @digesters = `/usr/local/bin/mlmmj-list -L $topdir/$list -d`; my @nomailsubs = `/usr/local/bin/mlmmj-list -L $topdir/$list -n`; chomp @subscribers; chomp @digesters; chomp @nomailsubs; if (defined $search) { $search = lc $search; @subscribers = grep {index(lc $_, $search) != -1} @subscribers; @digesters = grep {index(lc $_, $search) != -1} @digesters; @nomailsubs = grep {index(lc $_, $search) != -1} @nomailsubs; } for my $address (@subscribers) { $subscribers{$address}->{subscriber} = 1; } for my $address (@digesters) { $subscribers{$address}->{digester} = 1; } for my $address (@nomailsubs) { $subscribers{$address}->{nomailsub} = 1; } $subcount = scalar(keys %subscribers); return \%subscribers; } mlmmj-1.2.18.0/contrib/web/perl-admin/conf/config.pl000755 000765 000120 00000000106 11414633667 021755 0ustar00benadmin000000 000000 $topdir = "/var/spool/mlmmj"; $templatedir = "/home/mlmmj/templates"; mlmmj-1.2.18.0/contrib/web/perl-admin/conf/tunables.pl000644 000765 000120 00000021731 11727635243 022330 0ustar00benadmin000000 000000 mlmmj_list("listaddress", "List address", "This option contains all addresses which mlmmj sees as listaddresses (see ". "tocc below). The first one is the one used as the primary one, when mlmmj ". "sends out mail."); mlmmj_boolean("closedlist", "Closed list", "If the list is open or closed. If it's closed subscription ". "and unsubscription via mail is disabled."); mlmmj_boolean("closedlistsub", "Closed for subscription", "Closed for subscription. Unsubscription is possible."); mlmmj_boolean("nosubconfirm", "No subscribe confirmation", "If this option is set, the user is not required to confirm when subscribing or unsubscribing."); mlmmj_boolean("moderated", "Moderated", "If this option is set, the emailaddresses in the file listdir/control/moderators will act as moderators for the list."); mlmmj_list("moderators", "Moderators", "If the list is moderated, this is the list of moderators."); mlmmj_list("submod", "Subscription moderators", "This is the list of moderators that will approve subscriptions."); mlmmj_boolean("tocc", "To: Cc:", "If this option is set, the list address does not have to be in the To: or Cc: header of the email to the list."); mlmmj_boolean("addtohdr", "Add To: header", "If this option is set, a To: header including the recipients emailaddress will be added to outgoing mail. ". "Recommended usage is to remove existing To: headers with delheaders (see below) first."); mlmmj_boolean("subonlypost", "Subscribers only post", "If this option is set, only people who are subscribed to the list, are allowed to post to it. ". "The check is made against the \"From:\" header."); mlmmj_boolean("modnonsubposts", "Moderate non-subscriber posts", "If this option is set and subonlypost is enabled, all postings from ". "people who are not subscribed to the list will be moderated."); mlmmj_string("prefix", "Prefix", "The prefix for the Subject: line of mails to the list. This will alter the Subject: line, ". "and add a prefix if it's not present elsewhere."); mlmmj_list("owner", "Owner", "The emailaddresses in this list will get mails to ".encode_entities($list)."+owner"); mlmmj_list("customheaders", "Custom headers", "These headers are added to every mail coming through. This is ". "the place you want to add Reply-To: header in case you want ". "such. ". "If a header should not occur twice in the mail it should be listed in the 'Delete headers' box too."); mlmmj_list("delheaders", "Delete headers", "In this file is specified *ONE* headertoken to match pr. line. ". "If the file consists of: Received: Message-ID: Then all occurences of these headers in incoming list mail will be deleted. ". "\"From \" and \"Return-Path:\" are deleted no matter what."); mlmmj_list("access", "Access", "If this option is set, all headers of a post to the list is matched against the rules. The first rule to match wins. ". "See README.access for syntax and examples. NOTE: If this field is empty access control is *disabled*, ". "unlike having an empty control/access file."); mlmmj_string("memorymailsize", "Memory mail size", "Here is specified in bytes how big a mail can be and still be prepared for sending in memory. ". "It's greatly reducing the amount of write system calls to prepare it in memory before sending it, ". "but can also lead to denial of service attacks. Default is 16k (16384 bytes)."); mlmmj_string("relayhost", "Relay host", "The host specified (IP address or domainname, both works) in this file will be used for relaying the mail sent to the list. ". "Defaults to 127.0.0.1."); mlmmj_string("smtpport", "SMTP port", "In this file a port other than port 25 for connecting to the relayhost can be specified."); mlmmj_string("delimiter", "Delimiter", "This specifies what to use as recipient delimiter for the list.". "Default is \"+\"."); mlmmj_boolean("notifysub", "Notify subscribers", "If this option is set, the owner(s) will get a mail with the address of someone sub/unsubscribing to a mailinglist."); mlmmj_boolean("notifymod", "Notify moderation", "If this option is set, the poster (based on the envelope from) will ". "get a mail when their post is being moderation."); mlmmj_string("digestinterval", "Digest interval", "This option specifies how many seconds will pass before the ". "next digest is sent. Defaults to 604800 seconds, which is 7 ". "days."); mlmmj_string("digestmaxmails", "Max. digest mails", "This option specifies how many mails can accumulate before ". "digest sending is triggered. Defaults to 50 mails, meaning ". "that if 50 mails arrive to the list before digestinterval have ". "passed, the digest is delivered."); mlmmj_string("bouncelife", "Bouncing lifetime", "Here is specified for how long time in seconds an address can bounce before it's unsubscribed. Defaults ". "to 432000 seconds, which is 5 days."); mlmmj_boolean("noarchive", "No archive", "If this option is set, the mails won't be saved in the ". "archive but simply deleted"); mlmmj_boolean("noget", "No get", "If this option is set, listname+get-INDEX is turned off."); mlmmj_boolean("subonlyget", "Subscribers only get", "If this option is set, retrieving old posts with +get-N is only possible for subscribers."); mlmmj_string("verp", "VERP", "Enable VERP support. Anything added in this variable will be appended the ". "MAIL FROM: line. If \"postfix\" is put in the file, it'll make postfix use ". "VERP by adding XVERP=-= to the MAIL FROM: line."); mlmmj_string("maxverprecips", "Maximum VERP recipients", "How many recipients pr. mail delivered to the smtp server. Defaults to 100."); mlmmj_boolean("notoccdenymails", "No To: Cc: deny mails", "This switch turns off whether mlmmj sends out notification about postings ". "being denied due to the listaddress not being in To: or Cc: (see 'tocc')."); mlmmj_boolean("noaccessdenymails", "No access deny mails", "This switch turns off whether mlmmj sends out notification about postings ". "being rejected due to an access rule (see 'access')."); mlmmj_boolean("nosubonlydenymails", "No subscribers only deny mails", "This switch turns off whether mlmmj sends out notification about postings ". "being rejected due to a subscribers only posting list (see 'subonlypost')."); mlmmj_boolean("nosubmodmails", "No subscription moderated mails", "This switch turns off whether mlmmj sends out notification about ". "subscription being moderated to the person requesting subscription". "(see 'submod')."); mlmmj_boolean("nodigesttext", "No digest text summary", "This switch turns off whether digest mails will have a text part with a thread ". "summary."); mlmmj_boolean("nodigestsub", "No digest subscribers", "If this option is set, subscription to the digest version of the mailinglist ". "will be denied. (Useful if you don't want to allow digests and notify users ". "about it)."); mlmmj_boolean("nonomailsub", "No nomail subscribers", "If this option is set, subscription to the nomail version of the mailinglist ". "will be denied. (Useful if you don't want to allow nomail and notify users ". "about it)."); mlmmj_string("maxmailsize", "Max. mail size", "With this option the maximal allowed size of incoming mails can be specified."); mlmmj_boolean("nomaxmailsizedenymails", "No max. mail size deny mails", "If this is set, no reject notifications caused by violation of maxmailsize ". "will be sent."); mlmmj_boolean("nolistsubsemail", "No list subscribers email", "If this is set, the LISTNAME+list\@ functionality for requesting an ". "email with the subscribers for owner is disabled."); mlmmj_string("staticbounceaddr", "Static bounce address", "If this is set to something\@example.org, the bounce address (Return-Path:) ". "will be fixed to something+listname-bounces-and-so-on\@example.org ". "in case you need to disable automatic bounce handling."); mlmmj_boolean("ifmodsendonlymodmoderate", "If moderator send only moderator moderate", "If this is set, then mlmmj in case of moderation checks the ". "envelope from, to see if the sender is a moderator, and in that case ". "only send the moderation mails to that address. In practice this means that ". "a moderator sending mail to the list won't bother all the other moderators ". "with his mail."); mlmmj_list("footer", "Footer", "The content of this option is appended to mail sent to the list."); mlmmj_boolean("notmetoo", "Not me too", "If this is set, mlmmj attempts to exclude the sender of a post ". "from the distribution list for that post so people don't receive copies ". "of their own posts."); mlmmj-1.2.18.0/contrib/receivestrip/Makefile.am000644 000765 000120 00000000777 11727635243 021173 0ustar00benadmin000000 000000 # AUTOMAKE_OPTIONS = foreign AM_CFLAGS = -g -Wall -pedantic -Wsign-compare -DDEFAULTTEXTDIR='"@textlibdir@"' INCLUDES = -I$(srcdir)/../../include if WANT_RECEIVESTRIP bin_PROGRAMS = mlmmj-receive-strip endif mlmmj_receive_strip_SOURCES = mlmmj-receive-strip.c ../../src/mygetline.c ../../src/memory.c ../../src/readn.c \ ../../src/strgen.c ../../src/random-int.c ../../src/log_error.c ../../src/print-version.c \ ../../src/writen.c ../../src/dumpfd2fd.c ../../src/ctrlvalues.c ../../src/chomp.c mlmmj-1.2.18.0/contrib/receivestrip/Makefile.in000644 000765 000120 00000105335 11761151557 021177 0ustar00benadmin000000 000000 # Makefile.in generated by automake 1.12 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } 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 = : @WANT_RECEIVESTRIP_TRUE@bin_PROGRAMS = mlmmj-receive-strip$(EXEEXT) subdir = contrib/receivestrip DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mlmmj_receive_strip_OBJECTS = mlmmj-receive-strip.$(OBJEXT) \ mygetline.$(OBJEXT) memory.$(OBJEXT) readn.$(OBJEXT) \ strgen.$(OBJEXT) random-int.$(OBJEXT) log_error.$(OBJEXT) \ print-version.$(OBJEXT) writen.$(OBJEXT) dumpfd2fd.$(OBJEXT) \ ctrlvalues.$(OBJEXT) chomp.$(OBJEXT) mlmmj_receive_strip_OBJECTS = $(am_mlmmj_receive_strip_OBJECTS) mlmmj_receive_strip_LDADD = $(LDADD) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(mlmmj_receive_strip_SOURCES) DIST_SOURCES = $(mlmmj_receive_strip_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ 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@ 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_CC = @ac_ct_CC@ 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_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ textlibdir = @textlibdir@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign AM_CFLAGS = -g -Wall -pedantic -Wsign-compare -DDEFAULTTEXTDIR='"@textlibdir@"' INCLUDES = -I$(srcdir)/../../include mlmmj_receive_strip_SOURCES = mlmmj-receive-strip.c ../../src/mygetline.c ../../src/memory.c ../../src/readn.c \ ../../src/strgen.c ../../src/random-int.c ../../src/log_error.c ../../src/print-version.c \ ../../src/writen.c ../../src/dumpfd2fd.c ../../src/ctrlvalues.c ../../src/chomp.c all: all-am .SUFFIXES: .SUFFIXES: .c .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 contrib/receivestrip/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/receivestrip/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) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ 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) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(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: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mlmmj-receive-strip$(EXEEXT): $(mlmmj_receive_strip_OBJECTS) $(mlmmj_receive_strip_DEPENDENCIES) $(EXTRA_mlmmj_receive_strip_DEPENDENCIES) @rm -f mlmmj-receive-strip$(EXEEXT) $(LINK) $(mlmmj_receive_strip_OBJECTS) $(mlmmj_receive_strip_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chomp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctrlvalues.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dumpfd2fd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlmmj-receive-strip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mygetline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-version.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random-int.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strgen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/writen.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) '$<'` mygetline.o: ../../src/mygetline.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mygetline.o -MD -MP -MF $(DEPDIR)/mygetline.Tpo -c -o mygetline.o `test -f '../../src/mygetline.c' || echo '$(srcdir)/'`../../src/mygetline.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mygetline.Tpo $(DEPDIR)/mygetline.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/mygetline.c' object='mygetline.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 mygetline.o `test -f '../../src/mygetline.c' || echo '$(srcdir)/'`../../src/mygetline.c mygetline.obj: ../../src/mygetline.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mygetline.obj -MD -MP -MF $(DEPDIR)/mygetline.Tpo -c -o mygetline.obj `if test -f '../../src/mygetline.c'; then $(CYGPATH_W) '../../src/mygetline.c'; else $(CYGPATH_W) '$(srcdir)/../../src/mygetline.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mygetline.Tpo $(DEPDIR)/mygetline.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/mygetline.c' object='mygetline.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 mygetline.obj `if test -f '../../src/mygetline.c'; then $(CYGPATH_W) '../../src/mygetline.c'; else $(CYGPATH_W) '$(srcdir)/../../src/mygetline.c'; fi` memory.o: ../../src/memory.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.o -MD -MP -MF $(DEPDIR)/memory.Tpo -c -o memory.o `test -f '../../src/memory.c' || echo '$(srcdir)/'`../../src/memory.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/memory.Tpo $(DEPDIR)/memory.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/memory.c' object='memory.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 memory.o `test -f '../../src/memory.c' || echo '$(srcdir)/'`../../src/memory.c memory.obj: ../../src/memory.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.obj -MD -MP -MF $(DEPDIR)/memory.Tpo -c -o memory.obj `if test -f '../../src/memory.c'; then $(CYGPATH_W) '../../src/memory.c'; else $(CYGPATH_W) '$(srcdir)/../../src/memory.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/memory.Tpo $(DEPDIR)/memory.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/memory.c' object='memory.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 memory.obj `if test -f '../../src/memory.c'; then $(CYGPATH_W) '../../src/memory.c'; else $(CYGPATH_W) '$(srcdir)/../../src/memory.c'; fi` readn.o: ../../src/readn.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT readn.o -MD -MP -MF $(DEPDIR)/readn.Tpo -c -o readn.o `test -f '../../src/readn.c' || echo '$(srcdir)/'`../../src/readn.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/readn.Tpo $(DEPDIR)/readn.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/readn.c' object='readn.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 readn.o `test -f '../../src/readn.c' || echo '$(srcdir)/'`../../src/readn.c readn.obj: ../../src/readn.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT readn.obj -MD -MP -MF $(DEPDIR)/readn.Tpo -c -o readn.obj `if test -f '../../src/readn.c'; then $(CYGPATH_W) '../../src/readn.c'; else $(CYGPATH_W) '$(srcdir)/../../src/readn.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/readn.Tpo $(DEPDIR)/readn.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/readn.c' object='readn.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 readn.obj `if test -f '../../src/readn.c'; then $(CYGPATH_W) '../../src/readn.c'; else $(CYGPATH_W) '$(srcdir)/../../src/readn.c'; fi` strgen.o: ../../src/strgen.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strgen.o -MD -MP -MF $(DEPDIR)/strgen.Tpo -c -o strgen.o `test -f '../../src/strgen.c' || echo '$(srcdir)/'`../../src/strgen.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/strgen.Tpo $(DEPDIR)/strgen.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/strgen.c' object='strgen.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 strgen.o `test -f '../../src/strgen.c' || echo '$(srcdir)/'`../../src/strgen.c strgen.obj: ../../src/strgen.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strgen.obj -MD -MP -MF $(DEPDIR)/strgen.Tpo -c -o strgen.obj `if test -f '../../src/strgen.c'; then $(CYGPATH_W) '../../src/strgen.c'; else $(CYGPATH_W) '$(srcdir)/../../src/strgen.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/strgen.Tpo $(DEPDIR)/strgen.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/strgen.c' object='strgen.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 strgen.obj `if test -f '../../src/strgen.c'; then $(CYGPATH_W) '../../src/strgen.c'; else $(CYGPATH_W) '$(srcdir)/../../src/strgen.c'; fi` random-int.o: ../../src/random-int.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT random-int.o -MD -MP -MF $(DEPDIR)/random-int.Tpo -c -o random-int.o `test -f '../../src/random-int.c' || echo '$(srcdir)/'`../../src/random-int.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/random-int.Tpo $(DEPDIR)/random-int.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/random-int.c' object='random-int.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 random-int.o `test -f '../../src/random-int.c' || echo '$(srcdir)/'`../../src/random-int.c random-int.obj: ../../src/random-int.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT random-int.obj -MD -MP -MF $(DEPDIR)/random-int.Tpo -c -o random-int.obj `if test -f '../../src/random-int.c'; then $(CYGPATH_W) '../../src/random-int.c'; else $(CYGPATH_W) '$(srcdir)/../../src/random-int.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/random-int.Tpo $(DEPDIR)/random-int.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/random-int.c' object='random-int.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 random-int.obj `if test -f '../../src/random-int.c'; then $(CYGPATH_W) '../../src/random-int.c'; else $(CYGPATH_W) '$(srcdir)/../../src/random-int.c'; fi` log_error.o: ../../src/log_error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT log_error.o -MD -MP -MF $(DEPDIR)/log_error.Tpo -c -o log_error.o `test -f '../../src/log_error.c' || echo '$(srcdir)/'`../../src/log_error.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/log_error.Tpo $(DEPDIR)/log_error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/log_error.c' object='log_error.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 log_error.o `test -f '../../src/log_error.c' || echo '$(srcdir)/'`../../src/log_error.c log_error.obj: ../../src/log_error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT log_error.obj -MD -MP -MF $(DEPDIR)/log_error.Tpo -c -o log_error.obj `if test -f '../../src/log_error.c'; then $(CYGPATH_W) '../../src/log_error.c'; else $(CYGPATH_W) '$(srcdir)/../../src/log_error.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/log_error.Tpo $(DEPDIR)/log_error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/log_error.c' object='log_error.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 log_error.obj `if test -f '../../src/log_error.c'; then $(CYGPATH_W) '../../src/log_error.c'; else $(CYGPATH_W) '$(srcdir)/../../src/log_error.c'; fi` print-version.o: ../../src/print-version.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT print-version.o -MD -MP -MF $(DEPDIR)/print-version.Tpo -c -o print-version.o `test -f '../../src/print-version.c' || echo '$(srcdir)/'`../../src/print-version.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/print-version.Tpo $(DEPDIR)/print-version.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/print-version.c' object='print-version.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 print-version.o `test -f '../../src/print-version.c' || echo '$(srcdir)/'`../../src/print-version.c print-version.obj: ../../src/print-version.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT print-version.obj -MD -MP -MF $(DEPDIR)/print-version.Tpo -c -o print-version.obj `if test -f '../../src/print-version.c'; then $(CYGPATH_W) '../../src/print-version.c'; else $(CYGPATH_W) '$(srcdir)/../../src/print-version.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/print-version.Tpo $(DEPDIR)/print-version.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/print-version.c' object='print-version.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 print-version.obj `if test -f '../../src/print-version.c'; then $(CYGPATH_W) '../../src/print-version.c'; else $(CYGPATH_W) '$(srcdir)/../../src/print-version.c'; fi` writen.o: ../../src/writen.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT writen.o -MD -MP -MF $(DEPDIR)/writen.Tpo -c -o writen.o `test -f '../../src/writen.c' || echo '$(srcdir)/'`../../src/writen.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/writen.Tpo $(DEPDIR)/writen.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/writen.c' object='writen.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 writen.o `test -f '../../src/writen.c' || echo '$(srcdir)/'`../../src/writen.c writen.obj: ../../src/writen.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT writen.obj -MD -MP -MF $(DEPDIR)/writen.Tpo -c -o writen.obj `if test -f '../../src/writen.c'; then $(CYGPATH_W) '../../src/writen.c'; else $(CYGPATH_W) '$(srcdir)/../../src/writen.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/writen.Tpo $(DEPDIR)/writen.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/writen.c' object='writen.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 writen.obj `if test -f '../../src/writen.c'; then $(CYGPATH_W) '../../src/writen.c'; else $(CYGPATH_W) '$(srcdir)/../../src/writen.c'; fi` dumpfd2fd.o: ../../src/dumpfd2fd.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dumpfd2fd.o -MD -MP -MF $(DEPDIR)/dumpfd2fd.Tpo -c -o dumpfd2fd.o `test -f '../../src/dumpfd2fd.c' || echo '$(srcdir)/'`../../src/dumpfd2fd.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dumpfd2fd.Tpo $(DEPDIR)/dumpfd2fd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/dumpfd2fd.c' object='dumpfd2fd.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 dumpfd2fd.o `test -f '../../src/dumpfd2fd.c' || echo '$(srcdir)/'`../../src/dumpfd2fd.c dumpfd2fd.obj: ../../src/dumpfd2fd.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dumpfd2fd.obj -MD -MP -MF $(DEPDIR)/dumpfd2fd.Tpo -c -o dumpfd2fd.obj `if test -f '../../src/dumpfd2fd.c'; then $(CYGPATH_W) '../../src/dumpfd2fd.c'; else $(CYGPATH_W) '$(srcdir)/../../src/dumpfd2fd.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dumpfd2fd.Tpo $(DEPDIR)/dumpfd2fd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/dumpfd2fd.c' object='dumpfd2fd.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 dumpfd2fd.obj `if test -f '../../src/dumpfd2fd.c'; then $(CYGPATH_W) '../../src/dumpfd2fd.c'; else $(CYGPATH_W) '$(srcdir)/../../src/dumpfd2fd.c'; fi` ctrlvalues.o: ../../src/ctrlvalues.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ctrlvalues.o -MD -MP -MF $(DEPDIR)/ctrlvalues.Tpo -c -o ctrlvalues.o `test -f '../../src/ctrlvalues.c' || echo '$(srcdir)/'`../../src/ctrlvalues.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ctrlvalues.Tpo $(DEPDIR)/ctrlvalues.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/ctrlvalues.c' object='ctrlvalues.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 ctrlvalues.o `test -f '../../src/ctrlvalues.c' || echo '$(srcdir)/'`../../src/ctrlvalues.c ctrlvalues.obj: ../../src/ctrlvalues.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ctrlvalues.obj -MD -MP -MF $(DEPDIR)/ctrlvalues.Tpo -c -o ctrlvalues.obj `if test -f '../../src/ctrlvalues.c'; then $(CYGPATH_W) '../../src/ctrlvalues.c'; else $(CYGPATH_W) '$(srcdir)/../../src/ctrlvalues.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ctrlvalues.Tpo $(DEPDIR)/ctrlvalues.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/ctrlvalues.c' object='ctrlvalues.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 ctrlvalues.obj `if test -f '../../src/ctrlvalues.c'; then $(CYGPATH_W) '../../src/ctrlvalues.c'; else $(CYGPATH_W) '$(srcdir)/../../src/ctrlvalues.c'; fi` chomp.o: ../../src/chomp.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chomp.o -MD -MP -MF $(DEPDIR)/chomp.Tpo -c -o chomp.o `test -f '../../src/chomp.c' || echo '$(srcdir)/'`../../src/chomp.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/chomp.Tpo $(DEPDIR)/chomp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/chomp.c' object='chomp.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 chomp.o `test -f '../../src/chomp.c' || echo '$(srcdir)/'`../../src/chomp.c chomp.obj: ../../src/chomp.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chomp.obj -MD -MP -MF $(DEPDIR)/chomp.Tpo -c -o chomp.obj `if test -f '../../src/chomp.c'; then $(CYGPATH_W) '../../src/chomp.c'; else $(CYGPATH_W) '$(srcdir)/../../src/chomp.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/chomp.Tpo $(DEPDIR)/chomp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../src/chomp.c' object='chomp.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 chomp.obj `if test -f '../../src/chomp.c'; then $(CYGPATH_W) '../../src/chomp.c'; else $(CYGPATH_W) '$(srcdir)/../../src/chomp.c'; fi` 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" cscopelist: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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 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 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 cscopelist ctags distclean distclean-compile \ distclean-generic 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 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: mlmmj-1.2.18.0/contrib/receivestrip/mlmmj-receive-strip.c000644 000765 000120 00000033033 11727635243 023165 0ustar00benadmin000000 000000 /* Copyright (C) 2007 Sascha Sommer * * 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 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ /* a version of mlmmj-receive that parses the mail on the fly and strips unwanted mime parts opens the files control/mimedeny and control/mimestrip for a list of mime types for body parts that should be denied or stripped. It adds an extra header X-ThisMailContainsUnwantedMimeParts: Y for mails that contain disallowed mimeparts and X-ThisMailContainsUnwantedMimeParts: N otherwise */ #include #include #include #include #include #include #include #include #include #include "mlmmj.h" #include "mygetline.h" #include "gethdrline.h" #include "strgen.h" #include "chomp.h" #include "ctrlvalue.h" #include "ctrlvalues.h" #include "log_error.h" #include "wrappers.h" #include "memory.h" #define UNWANTED_MIME_HDR "X-ThisMailContainsUnwantedMimeParts: N\n" /* append a copy of a string to a string list */ static void append_strtolist(struct strlist *list, char* str) { list->count++; list->strs = myrealloc(list->strs, sizeof(char *) * (list->count + 1)); list->strs[list->count-1] = mystrdup(str); list->strs[list->count] = NULL; } /* free all strings in a strlist */ static void free_strlist(struct strlist *list) { if(!list) return; if(list->strs) { int i; for(i=0;i < list->count;i++) myfree(list->strs[i]); myfree(list->strs); } list->strs = NULL; list->count = 0; } static int findit(char *line, char **headers) { int i = 0; size_t len; if (!headers) return 0; while(headers[i]) { len = strlen(headers[i]); if(strncasecmp(line, headers[i], len) == 0) return 1; i++; } return 0; } /* extract mime_type and boundary from the Content-Type header * allocates a string for the mime_type if one is found * always allocates a boundarie (using "--" when none is found) * the caller needs to free the allocated strings */ static void extract_boundary(struct strlist *allhdrs, char** mime_type, char** boundary) { int x; *boundary = NULL; *mime_type = NULL; for( x = 0 ; x < allhdrs->count ; x++ ){ char* hdr = allhdrs->strs[x]; if(hdr && !strncasecmp(hdr,"Content-Type:",13)){ char* pos = hdr + 13; size_t len = 0; /* find the start of the mimetype */ while(*pos && (*pos == ' ' || *pos == '\t')) ++pos; if(*pos == '"'){ /* handle quoted mime types */ ++pos; while(pos[len] && pos[len] != '"') ++len; }else{ while(pos[len] && pos[len] != ' ' && pos[len] != '\t' && pos[len] != ';') ++len; } /* extract mime type if any */ if(len){ *mime_type = mymalloc(len+1); strncpy(*mime_type,pos,len); (*mime_type)[len] = '\0'; } pos += len; len = 0; /* find start of the boundary info */ while(*pos && strncasecmp(pos,"boundary=",9)) ++pos; if(*pos == '\0') /* no boundary */ break; pos += 9; if(*pos == '"'){ /* quoted boundary */ ++pos; while(pos[len] && pos[len] != '"') ++len; }else{ /* unquoted boundary */ while(pos[len] && pos[len] != ' ' && pos[len] != '\t' && pos[len] != ';') ++len; } /* extract boundary */ *boundary = mymalloc(len + 3); strcpy(*boundary,"--"); strncat(*boundary,pos,len); break; } } } /* read all mail headers and save them in a strlist * check what to do with parts that contain the given mime_type *return values * 0: ok * 1: strip * sets deny to 1 if the entire mail should be denied */ #define MIME_OK 0 #define MIME_STRIP 1 static int read_hdrs(int fd, struct strlist *allhdrs,struct strlist* delmime,struct strlist* denymime,int* deny,char** boundary) { int result = MIME_OK; char* mime_type = NULL; allhdrs->strs = NULL; allhdrs->count = 0; /* read headers */ while(1) { char* line = mygetline(fd); if(!line) /* end of file and also end of headers */ break; /* end of headers */ if(line[0] == '\n'){ myfree(line); break; } if(!allhdrs->count || ((line[0] != '\t') && (line[0] != ' '))) /* first header line or no more unfolding */ append_strtolist(allhdrs,line); else{ char* tmp = concatstr(2, allhdrs->strs[allhdrs->count-1], line); myfree(allhdrs->strs[allhdrs->count-1]); allhdrs->strs[allhdrs->count-1] = tmp; } myfree(line); } extract_boundary(allhdrs,&mime_type,boundary); if(mime_type) { /* check if this part should be stripped */ if(delmime && findit(mime_type, delmime->strs)) result = MIME_STRIP; /* check if the mail should be denied */ if(denymime && findit(mime_type, denymime->strs)) *deny = 1; myfree(mime_type); } return result; } /* writes the mail headers if unwantedmime_hdrpos is not NULL an UNWANTED_MIME_HDR * is inserted and its position saved in unwantedmime_hdrpos * returns 0 on success */ static int write_hdrs(int outfd,struct strlist* hdrs,off_t* unwantedmime_hdrpos) { int i; for(i = 0; i < hdrs->count ; i++) { if(writen(outfd, hdrs->strs[i], strlen(hdrs->strs[i])) < 0){ log_error(LOG_ARGS, "Error when dumping headers"); return -1; } } /* if this is not the header of an embedded part add the header that will indicate if the mail contains unwanted mime parts */ if(unwantedmime_hdrpos) { if(writen(outfd, UNWANTED_MIME_HDR,strlen(UNWANTED_MIME_HDR)) < 0){ log_error(LOG_ARGS, "Error writting unwanted mime header"); return -1; } /* get the current position so that we can update the header later */ *unwantedmime_hdrpos = lseek(outfd,0,SEEK_CUR); if(*unwantedmime_hdrpos < 2){ log_error(LOG_ARGS, "Error getting file position"); return -1; } *unwantedmime_hdrpos -= 2; } /* write a single line feed to terminate the header part */ if(writen(outfd, "\n", 1) < 0) { log_error(LOG_ARGS,"Error writting end of hdrs."); return -1; } return 0; } /* set the unwanted mime_hdr to Y */ static int update_unwantedmime_hdr(int outfd,off_t unwantedmime_hdrpos) { /* seek to the header position */ if(lseek(outfd,unwantedmime_hdrpos,SEEK_SET) < 0) { log_error(LOG_ARGS,"Error seeking to the unwantedmime_hdr"); return -1; } /* update the header */ if(writen(outfd, "Y\n",2) < 0){ log_error(LOG_ARGS, "Error writting extra header"); return -1; } /* seek back to the end of the mail */ if(lseek(outfd,0,SEEK_END) < 0) { log_error(LOG_ARGS,"Error seeking to the mail end"); return -1; } return 0; } static int parse_body(int infd,int outfd, struct strlist* delmime, struct strlist* denymime, int* deny,char* boundary){ int strip = 0; char* line; while((line = mygetline(infd))) { if(boundary && !strncmp(line,boundary,strlen(boundary))){ strip = 0; /* check if the boundary is the beginning of a new part */ if(strncmp(line + strlen(boundary),"--",2)){ struct strlist hdrs; char* new_boundary = NULL; /* check if this part should be stripped */ if(read_hdrs(infd, &hdrs,delmime,denymime,deny,&new_boundary) == MIME_STRIP) strip = 1; else { /* write boundary */ if(writen(outfd, line, strlen(line)) < 0){ log_error(LOG_ARGS, "Error writting boundary"); return -1; } /* write hdr */ if(write_hdrs(outfd, &hdrs, NULL) < 0){ log_error(LOG_ARGS, "Error writting hdrs"); return -1; } /* parse embedded part if a new boundary was found */ if(new_boundary && parse_body(infd,outfd,delmime,denymime,deny,new_boundary) != 0) { log_error(LOG_ARGS, "Could not parse embedded part"); return -1; } } free_strlist(&hdrs); if(new_boundary) myfree(new_boundary); }else{ /* write end of part */ if(writen(outfd, line, strlen(line)) < 0){ log_error(LOG_ARGS, "Error writting hdrs"); return -1; } /* and leave */ myfree(line); break; } }else { if(!strip) { /* write the current line */ if(writen(outfd, line, strlen(line)) < 0){ log_error(LOG_ARGS, "Error when dumping line"); return -1; } } } myfree(line); } return 0; } /* read a mail stripping unwanted parts */ static int dump_mail(int infd, int outfd,char* listdir) { struct strlist hdrs; struct strlist* delmime; struct strlist* denymime; char* boundary=NULL; int deny = 0; int result; off_t unwantedmime_hdr_pos = 0; /* get list control values */ delmime = ctrlvalues(listdir, "mimestrip"); denymime = ctrlvalues(listdir, "mimedeny"); /* read mail header */ result = read_hdrs(infd, &hdrs,delmime,denymime,&deny,&boundary); /* write mail header */ if(write_hdrs(outfd,&hdrs,&unwantedmime_hdr_pos) < 0) { log_error(LOG_ARGS, "Could not write mail headers"); return -1; } /* free mail header */ free_strlist(&hdrs); if(result == MIME_OK && !deny) { /* try to parse the mail */ if(parse_body(infd,outfd,delmime,denymime,&deny,boundary) != 0) { log_error(LOG_ARGS, "Could not parse mail"); return -1; } myfree(boundary); }else deny = 1; /* dump rest of mail */ if(dumpfd2fd(infd, outfd) != 0) { log_error(LOG_ARGS, "Could not receive mail"); return -1; } /* update header */ if(deny) { if(update_unwantedmime_hdr(outfd,unwantedmime_hdr_pos) != 0) { log_error(LOG_ARGS, "Could not update header"); return -1; } } /* free mime types */ if(delmime) { free_strlist(delmime); myfree(delmime); } if(denymime) { free_strlist(denymime); myfree(denymime); } return 0; } static void print_help(const char *prg) { printf("Usage: %s -L /path/to/listdir [-h] [-V] [-P] [-F]\n" " -h: This help\n" " -F: Don't fork in the background\n" " -L: Full path to list directory\n" " -P: Don't execute mlmmj-process\n" " -V: Print version\n", prg); exit(EXIT_SUCCESS); } int main(int argc, char **argv) { char *infilename = NULL, *listdir = NULL; char *randomstr = random_str(); char *mlmmjprocess, *bindir; int fd, opt, noprocess = 0, nofork = 0; struct stat st; uid_t uid; pid_t childpid; CHECKFULLPATH(argv[0]); log_set_name(argv[0]); bindir = mydirname(argv[0]); mlmmjprocess = concatstr(2, bindir, "/mlmmj-process"); myfree(bindir); while ((opt = getopt(argc, argv, "hPVL:F")) != -1) { switch(opt) { case 'h': print_help(argv[0]); break; case 'L': listdir = optarg; break; case 'P': noprocess = 1; break; case 'F': nofork = 1; break; case 'V': print_version(argv[0]); exit(0); } } if(listdir == NULL) { fprintf(stderr, "You have to specify -L\n"); fprintf(stderr, "%s -h for help\n", argv[0]); exit(EXIT_FAILURE); } /* Lets make sure no random user tries to send mail to the list */ if(listdir) { if(stat(listdir, &st) == 0) { uid = getuid(); if(uid && uid != st.st_uid) { log_error(LOG_ARGS, "Have to invoke either as root " "or as the user owning listdir " "Invoked with uid = [%d]", (int)uid); writen(STDERR_FILENO, "Have to invoke either as root " "or as the user owning listdir\n", 60); exit(EXIT_FAILURE); } } else { log_error(LOG_ARGS, "Could not stat %s", listdir); exit(EXIT_FAILURE); } } infilename = concatstr(3, listdir, "/incoming/", randomstr); myfree(randomstr); fd = open(infilename, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); while(fd < 0 && errno == EEXIST) { myfree(infilename); randomstr = random_str(); infilename = concatstr(3, listdir, "/incoming/", randomstr); myfree(randomstr); fd = open(infilename, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); } if(fd < 0) { log_error(LOG_ARGS, "could not create mail file in " "%s/incoming directory", listdir); myfree(infilename); exit(EXIT_FAILURE); } if(dump_mail(fileno(stdin), fd, listdir) != 0) { log_error(LOG_ARGS, "Could not receive mail"); exit(EXIT_FAILURE); } #if 0 log_oper(listdir, OPLOGFNAME, "mlmmj-receive got %s", infilename); #endif fsync(fd); close(fd); if(noprocess) { myfree(infilename); exit(EXIT_SUCCESS); } /* * Now we fork so we can exit with success since it could potentially * take a long time for mlmmj-send to finish delivering the mails and * returning, making it susceptible to getting a SIGKILL from the * mailserver invoking mlmmj-receive. */ if (!nofork) { childpid = fork(); if(childpid < 0) log_error(LOG_ARGS, "fork() failed! Proceeding anyway"); if(childpid) exit(EXIT_SUCCESS); /* Parent says: "bye bye kids!"*/ close(0); close(1); close(2); } execlp(mlmmjprocess, mlmmjprocess, "-L", listdir, "-m", infilename, NULL); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjprocess); exit(EXIT_FAILURE); } mlmmj-1.2.18.0/contrib/receivestrip/README000644 000765 000120 00000002353 11727635243 020007 0ustar00benadmin000000 000000 mlmmj-receive-strip is a replacement for mlmmj-receive It opens the files control/mimedeny and control/mimestrip to get a list of mimetypes for parts of multipart/mime messages that should be denied or stripped The parts then get stripped directly when the mail is received. mlmmj-receive-strip also appends an extra header X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted mime parts Usage: Compile the program in this directory with make and use "make install" to install it. Afterwards replace mlmmj-receive with mlmmj-receive-strip in /etc/aliases for the mailinglist you want to enable stripping and run newaliases Then create the files mimedeny mimestrip in the control directory of your mailinglist. If control/mimestrip for example contains: text/html application/octet-stream html texts and binarys will be stripped from the mail. When you also want to deny mails with certain mimeparts add the mimetypes to the mimedeny file and add the following lines to the control/access file: deny ^X-ThisMailContainsUnwantedMimeParts: Y allow You will most likely want to remove the X-ThisMailContainsUnwantedMimeParts header by adding the following line to the control/delheaders file: X-ThisMailContainsUnwantedMimeParts: mlmmj-1.2.18.0/contrib/amime-receive/mlmmj-amime-receive000755 000765 000120 00000004211 11727635243 022676 0ustar00benadmin000000 000000 #!/bin/bash # # mlmmj-amime-receive # # Take mail from stdin, pipe it through altermime and then to mlmmj-receive # needed to add footers in a MIME-aware way # # requires altermime, see http://www.pldaniels.com/altermime/ # # just replace mlmmj-receive with mlmmj-amime-receive, e.g. in /etc/aliases: # myml: "|/usr/bin/mlmmj-amime-receive -L /var/spool/mlmmj/myml/" # # put the footer-text for the different MIME-types into # control/amime-footer-text # control/amime-footer-html # control/amime-footer-base64 # # Copyright 2008 by Gerd v. Egidy, # # Licensed under MIT License, see LICENSE file coming with mlmmj # MLMMJRECEIVE=/usr/bin/mlmmj-receive ALTERMIME=/usr/bin/altermime # check executables if ! [ -x $MLMMJRECEIVE ]; then echo "can't find $MLMMJRECEIVE executable, aborting" exit 1 fi if ! [ -x $ALTERMIME ]; then echo "can't find $ALTERMIME executable, aborting" exit 1 fi # read parameters I=1 PARAM_L=0 while [ $I -le $# ] && [ $PARAM_L == 0 ]; do if [ "${!I}" == "-L" ]; then PARAM_L=1 fi I=$[$I+1] done if [ $PARAM_L == 1 ] && [ $I -le $# ]; then MLPATH="${!I}" else echo "parameter -L /path/to/listdir missing, aborting" exit 1 fi if ! [ -d "${MLPATH}" ]; then echo "${MLPATH} is not existing or no directory, aborting" exit 1 fi CONTROLD="${MLPATH}/control" if ! [ -d "${CONTROLD}" ]; then echo "${CONTROLD} is not existing or no directory, aborting" exit 1 fi # look for footer-files and build parameters if ! [ -f "${CONTROLD}/amime-footer-text" ]; then echo "${CONTROLD}/amime-footer-text is not existing or no regular file, aborting" exit 1 fi PARAM="--disclaimer=${CONTROLD}/amime-footer-text" if [ -f "${CONTROLD}/amime-footer-html" ]; then PARAM="${PARAM} --disclaimer-html=${CONTROLD}/amime-footer-html --htmltoo --force-for-bad-html" fi if [ -f "${CONTROLD}/amime-footer-base64" ]; then PARAM="${PARAM} --disclaimer-b64=${CONTROLD}/amime-footer-base64" fi PARAM="${PARAM} --altersigned --log-syslog" # go to a dir where altermime can write it's tmp-files safely cd $MLPATH # pipe the calls $ALTERMIME --input=- ${PARAM} | $MLMMJRECEIVE "$@"