mlmmj-1.3.0/000755 000765 000120 00000000000 13111411143 012506 5ustar00benadmin000000 000000 mlmmj-1.3.0/aclocal.m4000644 000765 000120 00000124216 13111411032 014351 0ustar00benadmin000000 000000 # generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # 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.15' 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.15], [], [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.15])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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$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], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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-2014 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. # 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", "OBJC", "OBJCXX", "UPC", or "GJC". # 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], [OBJCXX], [depcc="$OBJCXX" 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf 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"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # 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.65])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], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) 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([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro 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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != 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-2014 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. # 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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 is modern enough. # If it is, 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 --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # -*- Autoconf -*- # Obsolete and "removed" macros, that must however still report explicit # error messages when used, to smooth transition. # # Copyright (C) 1996-2014 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. AC_DEFUN([AM_CONFIG_HEADER], [AC_DIAGNOSE([obsolete], ['$0': this macro is obsolete. You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl AC_CONFIG_HEADERS($@)]) AC_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc AC_DIAGNOSE([obsolete], ['$0': this macro is obsolete. You should simply use the 'AC][_PROG_CC' macro instead. Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', but upon 'ac_cv_prog_cc_stdc'.])]) AC_DEFUN([AM_C_PROTOTYPES], [AC_FATAL([automatic de-ANSI-fication support has been removed])]) AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_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}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} 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.3.0/AUTHORS000644 000765 000120 00000000170 11750345463 013576 0ustar00benadmin000000 000000 Mads Martin Joergensen Morten K. Poulsen Ben Schmidt mlmmj-1.3.0/ChangeLog000644 000765 000120 00000070010 13111407077 014271 0ustar00benadmin000000 000000 1.3.0 o Czech translation (Jiří Šolc) o Don't use address extensions from non-list addresses o Fix some RFC 5321 compliance issues (Martijn Grendelman) o Add smtphelo tunable (Andreas Schulze) o Implement modonlypost 1.2.19.0 o Add README.footers and footer-related resources o Support ESMTP so OpenSMTPD uses 8 bits (Paul Fariello) o Use iconv to convert unknown character sets o Handle unfolded header lines better o Add a tunable for moderation request lifetime (Timo Boettcher) o Ensure mlmmj-send always honours tunables (e.g. relayhost) o Fix reason in denial messages for mails without the list in To: or CC: 1.2.18.1 o Stop mlmmj-maintd deleting list posts while they are being sent o Fix +list from crashing Mlmmj o Fix bug that made double subscription possible 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.3.0/compile000755 000765 000120 00000016245 13111411034 014073 0ustar00benadmin000000 000000 #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # 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.3.0/config.h.in000644 000765 000024 00000007022 13111411033 014546 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 `iconv' library (-liconv). */ #undef HAVE_LIBICONV /* 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.3.0/configure000755 000765 000120 00000536624 13111411032 014432 0ustar00benadmin000000 000000 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for mlmmj 1.3.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 $0: maintainer@mlmmj.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: 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.3.0' PACKAGE_STRING='mlmmj 1.3.0' PACKAGE_BUGREPORT='maintainer@mlmmj.org' 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_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V 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_silent_rules 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.3.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.3.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-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --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.3.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 maintainer@mlmmj.org ## ## ----------------------------------- ##" ) | 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.3.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.15' 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 --is-lightweight"; then am_missing_run="$MISSING " 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+set}" != 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; } 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 # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' 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='1.3.0' 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"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). 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}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi 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 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 whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -liconv" >&5 $as_echo_n "checking for iconv_open in -liconv... " >&6; } if ${ac_cv_lib_iconv_iconv_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-liconv $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 iconv_open (); int main () { return iconv_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_iconv_iconv_open=yes else ac_cv_lib_iconv_iconv_open=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_iconv_iconv_open" >&5 $as_echo "$ac_cv_lib_iconv_iconv_open" >&6; } if test "x$ac_cv_lib_iconv_iconv_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBICONV 1 _ACEOF LIBS="-liconv $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 ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" if test "x$ac_cv_header_iconv_h" = xyes; then : fi # 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= 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.3.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.3.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"" || { # Older Autoconf 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.3.0/configure.ac000644 000765 000120 00000003173 13111407077 015013 0ustar00benadmin000000 000000 # Process this file with autoconf to produce a configure script. AC_INIT(mlmmj, esyscmd([tr -d '\n' < VERSION]), maintainer@mlmmj.org) VERSION=$PACKAGE_VERSION AC_SUBST(VERSION) AM_INIT_AUTOMAKE([subdir-objects]) 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) AC_CHECK_LIB(iconv,iconv_open) # 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]) AC_CHECK_HEADER([iconv.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.3.0/contrib/000755 000765 000120 00000000000 13111411144 014147 5ustar00benadmin000000 000000 mlmmj-1.3.0/COPYING000644 000765 000120 00000002170 11414633667 013566 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.3.0/depcomp000755 000765 000120 00000056016 13111411034 014072 0ustar00benadmin000000 000000 #! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 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 # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} 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" # Avoid interferences from the environment. gccflag= dashmflag= # 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 information. 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 -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## 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). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - 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 -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # 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. ## 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. tr ' ' "$nl" < "$tmpdepfile" \ | 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 -ne 0; then 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 make_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. set_dir_from "$object" set_base_from "$object" 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 -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then 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 "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$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. set_dir_from "$object" set_base_from "$object" 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 -ne 0; then 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,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_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. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool 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$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; 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 -ne 0; then 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" echo >> "$depfile" # make sure the fragment doesn't end with a backslash 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" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | 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" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | 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.3.0/FAQ000644 000765 000120 00000001177 11414633667 013073 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.3.0/include/000755 000765 000120 00000000000 12774202071 014145 5ustar00benadmin000000 000000 mlmmj-1.3.0/install-sh000755 000765 000120 00000034523 13111411034 014520 0ustar00benadmin000000 000000 #!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # 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. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # 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_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 is_target_a_directory=possibly 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 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi 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 if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi 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 "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` 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 oIFS=$IFS IFS=/ set -f set fnord $dstdir shift 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` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && 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.3.0/LICENSE000644 000765 000120 00000002170 11414633667 013540 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.3.0/listtexts/000755 000765 000120 00000000000 13111411143 014551 5ustar00benadmin000000 000000 mlmmj-1.3.0/Makefile.am000644 000765 000120 00000001076 12774202071 014562 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 README.footers 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.3.0/Makefile.in000644 000765 000120 00000066336 13111411034 014570 0ustar00benadmin000000 000000 # Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 = . 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) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) 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 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-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_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ COPYING ChangeLog README TODO compile depcomp install-sh \ missing 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@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 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 README.footers 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 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 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ 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" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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 cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ 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) $(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 @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 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 u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(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/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(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: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am 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-am uninstall uninstall-am uninstall-man uninstall-man1 .PRECIOUS: Makefile # 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.3.0/man/000755 000765 000120 00000000000 12774177173 013313 5ustar00benadmin000000 000000 mlmmj-1.3.0/missing000755 000765 000120 00000015330 13111411034 014106 0ustar00benadmin000000 000000 #! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written 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 case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man 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 # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # 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.3.0/README000644 000765 000120 00000013140 13111407077 013400 0ustar00benadmin000000 000000 README mlmmj-1.3.0 May 25, 2017 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 bounce handling (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 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 "customheaders" (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.3.0/README.access000644 000765 000120 00000007322 11734220454 014646 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.3.0/README.archives000644 000765 000120 00000001276 11734220454 015213 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.3.0/README.exim4000644 000765 000120 00000007072 11727635243 014445 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.3.0/README.footers000644 000765 000120 00000003212 12774202071 015060 0ustar00benadmin000000 000000 README.footers Footers in Mlmmj ================ Mlmmj's built-in footer support is very rudimentary. It will work for plain text emails, and that's about it. It doesn't understand HTML or MIME or anything like that. There are a few solutions to this. They all involve piping incoming mail through a filter before it reaches Mlmmj. A script to do this, called mlmmj-amime-receive, is included in amime-receive in the contrib directory. It can be used with a number of different pre-processors. One day we also hope to improve the integration of these external filters with Mlmmj, e.g. so only list posts are processed. However, the piping solution has worked for a number of people over the years quite satisfactorily, so this is not a high priority. Here are some pre-processors you can use. alterMIME --------- The mlmmj-amime-receive script is designed to work with a program called alterMIME. The script itself (in amime-receive in the contrib directory) contains links to that software, and instructions. Foot Filter ----------- alterMIME didn't allow me to reach my particular goals, so I wrote an alternative called Foot Filter. It is a single source-file C program; the code and a very simple Makefile can be found in foot_filter in the contrib directory, along with an altered version of mlmmj-amime-receive, called mlmmj-recieve-ff. Foot Filter will output documentation if you run it without arguments, and again, instructions for the script that handles the piping are found within it. Py-MIME ------- A third option is Py-MIME. It was developed for use at The Document Foundation (LibreOffice) and is included in pymime in the contrib directory. mlmmj-1.3.0/README.listtexts000644 000765 000120 00000051342 12774202071 015451 0ustar00benadmin000000 000000 README.listtexts List texts in Mlmmj =================== List texts are stored in listdir/text and subdirectories of prefix/share/mlmmj/text.skel. 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. Mlmmj checks these three paths for each candidate filename, and then moves on to the next candidate filename: - listdir/text - prefix/share/mlmmj/text.skel/default - prefix/share/mlmmj/text.skel/en The second path does not exist by default, but can be created by copying or symlinking the language of your choice to that path. Note that this search order means that if there is a more specific list text in a system directory, it will override a less-specific or compatibility list text in the listdir. This may be surprising, and may change in a future version, so should not be relied upon. Best practice is to ensure each list has its own copy of all textx present in system directories, or none of them. 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-modonlypost - 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|modonlypost}) 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 DEPRECATED: use %normalsubs% - %normalsubs% (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|modonlypost| 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|modonlypost| 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.3.0/README.postfix000644 000765 000120 00000020261 11734220454 015076 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.3.0/README.qmail000644 000765 000120 00000005534 11727635243 014523 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.3.0/README.security000644 000765 000120 00000001151 11414633667 015257 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.3.0/README.sendmail000644 000765 000120 00000007140 11727635243 015207 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.3.0/src/000755 000765 000120 00000000000 13111411142 013274 5ustar00benadmin000000 000000 mlmmj-1.3.0/TODO000644 000765 000120 00000000544 11416076474 013225 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.3.0/TUNABLES000644 000765 000120 00000021777 12774202071 013700 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. · modonlypost (boolean) When this file is present, only people listed in listdir/control/moderators 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 allowed to post to the list will be moderated instead of denied. · modreqlife (normal) This specifies how long in seconds a mail awaits moderation before it's discarded. Defaults to 604800 seconds, which is 7 days. · 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) This specifies how long 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 are 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) · nomodonlydenymails (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/moderators only posting list (see 'subonlypost/modonlypost'). · 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. · smtphelo (normal) When this file is present, it contains the hostname to send in the SMTP EHLO or HELO command. Otherwise the machine hostname is used. mlmmj-1.3.0/UPGRADE000644 000765 000120 00000003627 11761151156 013546 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.3.0/VERSION000644 000765 000120 00000000006 13111407077 013565 0ustar00benadmin000000 000000 1.3.0 mlmmj-1.3.0/src/checkwait_smtpreply.c000644 000765 000120 00000006011 12774202071 017534 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 = NULL; if(replytype == MLMMJ_EHLO) { /* Consume all 8BITMIME 250- reply */ do { myfree(smtpreply); smtpreply = mygetline(sockfd); } while (strncmp(smtpreply, "250-", 4) == 0); } else { 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_EHLO: if(smtpreply[0] != '2' || smtpreply[1] != '5') 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.3.0/src/chomp.c000644 000765 000120 00000002667 11727635244 014607 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.3.0/src/ctrlvalue.c000644 000765 000120 00000004466 11727635244 015501 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.3.0/src/ctrlvalues.c000644 000765 000120 00000004021 11727635244 015647 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.3.0/src/do_all_the_voodoo_here.c000644 000765 000120 00000011376 12774202071 020147 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 "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 struct strlist *headers) { int i; size_t len; for (i=0;icount;i++) { len = strlen(headers->strs[i]); if(strncasecmp(line, headers->strs[i], len) == 0) return 1; } return 0; } void getinfo(const char *line, struct mailhdr *readhdrs) { int i = 0; size_t tokenlen, valuelen; while(readhdrs[i].token) { tokenlen = strlen(readhdrs[i].token); if(strncasecmp(line, readhdrs[i].token, tokenlen) == 0) { readhdrs[i].valuecount++; valuelen = strlen(line) - tokenlen; readhdrs[i].values = (char **)myrealloc(readhdrs[i].values, readhdrs[i].valuecount * sizeof(char *)); readhdrs[i].values[readhdrs[i].valuecount - 1] = (char *)mymalloc(valuelen + 1); strcpy(readhdrs[i].values[readhdrs[i].valuecount - 1], line+tokenlen); } i++; } } int do_all_the_voodoo_here(int infd, int outfd, int hdrfd, int footfd, const struct strlist *delhdrs, struct mailhdr *readhdrs, struct strlist *allhdrs, const char *prefix) { char *hdrline, *unfolded, *subject, *unqp; int hdrsadded = 0; int subject_present = 0; allhdrs->count = 0; allhdrs->strs = NULL; for(;;) { hdrline = gethdrline(infd, &unfolded); /* add extra headers before MIME* headers, or after all headers */ if(!hdrsadded && (hdrline == NULL || strncasecmp(hdrline, "mime", 4) == 0)) { if(hdrfd >= 0) { if(dumpfd2fd(hdrfd, outfd) < 0) { log_error(LOG_ARGS, "Could not " "add extra headers"); myfree(hdrline); myfree(unfolded); return -1; } fsync(outfd); } hdrsadded = 1; } /* end of headers */ if(hdrline == NULL) { /* 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; } /* write LF */ if(writen(outfd, "\n", 1) < 0) { myfree(hdrline); myfree(unfolded); log_error(LOG_ARGS, "Error writing hdrs."); return -1; } myfree(hdrline); myfree(unfolded); 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)); allhdrs->strs[allhdrs->count-1] = mystrdup(hdrline); /* 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(4, "Subject: ", prefix, hdrline + 8, "\n"); writen(outfd, subject, strlen(subject)); myfree(subject); myfree(hdrline); myfree(unqp); continue; } myfree(unqp); } } /* Should it be stripped? */ if(!delhdrs || !findit(hdrline, delhdrs)) writen(outfd, unfolded, strlen(unfolded)); myfree(hdrline); myfree(unfolded); } /* 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, let's 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.3.0/src/dumpfd2fd.c000644 000765 000120 00000003131 11414633671 015332 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.3.0/src/find_email_adr.c000644 000765 000120 00000012715 11727635244 016411 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.3.0/src/getaddrsfromfd.c000644 000765 000120 00000002623 11727635244 016464 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.3.0/src/gethdrline.c000644 000765 000120 00000005504 12774202071 015606 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" #include "chomp.h" char *gethdrline(int fd, char **unfolded) { char *line = NULL, *retstr = NULL, *oldretstr = NULL, *oldunfolded = NULL; char ch; ssize_t n; retstr = mygetline(fd); if (!retstr) { if (unfolded != NULL) *unfolded = NULL; return NULL; } if (unfolded != NULL) *unfolded = mystrdup(retstr); chomp(retstr); /* end-of-headers */ if (*retstr == '\0') { if (unfolded != NULL) { myfree(*unfolded); *unfolded = NULL; } myfree(retstr); return NULL; } for(;;) { /* look ahead one char to determine if we need to fold */ 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()"); if (unfolded != NULL) { myfree(*unfolded); *unfolded = NULL; } myfree(retstr); return NULL; } if (lseek(fd, -1, SEEK_CUR) == (off_t)-1) { log_error(LOG_ARGS, "lseek() failed in gethdrline()"); if (unfolded != NULL) { myfree(*unfolded); *unfolded = NULL; } myfree(retstr); return NULL; } if ((ch != '\t') && (ch != ' ')) /* no more folding */ return retstr; line = mygetline(fd); if (!line) return retstr; if (unfolded != NULL) { oldunfolded = *unfolded; *unfolded = concatstr(2, oldunfolded, line); myfree(oldunfolded); } chomp(line); oldretstr = retstr; retstr = concatstr(2, oldretstr, line); myfree(oldretstr); myfree(line); } } mlmmj-1.3.0/src/getlistaddr.c000644 000765 000120 00000003752 11414633671 015776 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.3.0/src/getlistdelim.c000644 000765 000120 00000004036 11414633671 016152 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.3.0/src/incindexfile.c000644 000765 000120 00000004474 11414633671 016133 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.3.0/src/init_sockfd.c000644 000765 000120 00000004144 11727635244 015765 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.3.0/src/itoa.c000644 000765 000120 00000003026 11414633671 014416 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.3.0/src/listcontrol.c000644 000765 000120 00000062272 12774202071 016042 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 "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.3.0/src/log_error.c000644 000765 000120 00000004111 11727635244 015455 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.3.0/src/log_oper.c000644 000765 000120 00000006030 11727635244 015273 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.3.0/src/mail-functions.c000644 000765 000120 00000020557 12774202071 016416 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" /* "EHLO \r\n" has length 7 */ #define EXTRA_EHLO_LEN 7 int write_ehlo(int sockfd, const char *hostname) { size_t len = (size_t)(strlen(hostname) + EXTRA_EHLO_LEN + 1); char *ehlo; size_t bytes_written; if((ehlo = mymalloc(len)) == 0) return errno; snprintf(ehlo, len, "EHLO %s\r\n", hostname); len = strlen(ehlo); #if 0 fprintf(stderr, "\nwrite_ehlo, ehlo = [%s]\n", ehlo); #endif bytes_written = writen(sockfd, ehlo, len); if(bytes_written < 0) { log_error(LOG_ARGS, "Could not write EHLO"); myfree(ehlo); return errno; } myfree(ehlo); return 0; } /* "HELO \r\n" has length 7 */ #define EXTRA_HELO_LEN 7 int write_helo(int sockfd, const char *hostname) { size_t len = (size_t)(strlen(hostname) + EXTRA_HELO_LEN + 1); 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 15 */ #define EXTRA_FROM_LEN 15 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) + 1); 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 12 */ #define EXTRA_RCPT_LEN 12 int write_rcpt_to(int sockfd, const char *rcpt_addr) { size_t len = (size_t)(strlen(rcpt_addr) + EXTRA_RCPT_LEN + 1); 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; } 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; } /* "\r\n" has length 2 */ #define EXTRA_CUSTOM_LEN 2 int write_custom_line(int sockfd, const char *line) { size_t len = strlen(line) + EXTRA_CUSTOM_LEN + 1; 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 12 int write_replyto(int sockfd, const char *replyaddr) { size_t len = (size_t)(strlen(replyaddr) + EXTRA_REPLYTO_LEN + 1); 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.3.0/src/Makefile.am000644 000765 000120 00000005204 13111407077 015345 0ustar00benadmin000000 000000 # AUTOMAKE_OPTIONS = foreign AM_CFLAGS = -g -Wall -pedantic -Wsign-compare -DDEFAULTTEXTDIR='"@textlibdir@"' -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.3.0/src/Makefile.in000644 000765 000120 00000075702 13111411034 015354 0ustar00benadmin000000 000000 # Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 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) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = 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) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = 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 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/mlmmj-make-ml.in \ $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 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@"' -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 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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ 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 TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ 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 tags-am uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS .PRECIOUS: Makefile 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.3.0/src/memory.c000644 000765 000120 00000004315 11414633671 014774 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.3.0/src/mlmmj-bounce.c000644 000765 000120 00000023706 12774202071 016052 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 "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, NULL))) { 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; myfree(line); continue; } if(indsn) { /* TODO: this parsing could be greatly improved */ if(strncasecmp(line, "Final-Recipient:", 16)) { search = strstr(line, ";"); if (search) { find_email_adr(search+1, &emails); if(emails.emailcount > 0) { addr = mystrdup(emails.emaillist[0]); for(i = 0; i < emails.emailcount; i++) myfree(emails.emaillist[i]); myfree(emails.emaillist); } } myfree(line); break; } } myfree(line); } return addr; } static void print_help(const char *prg) { printf("Usage: %s -L /path/to/list\n" " [-a john=doe.org | -d] [-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" " -d: Attempt to parse DSN to determine address\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.3.0/src/mlmmj-list.c000644 000765 000120 00000011214 11727635244 015552 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.3.0/src/mlmmj-maintd.c000644 000765 000120 00000064055 12774202071 016055 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) { time_t modreqlife = 0; char *modreqlifestr; char *moddirname; int ret; modreqlifestr = ctrlvalue(listdir, "modreqlife"); if(modreqlifestr) { modreqlife = atol(modreqlifestr); myfree(modreqlifestr); } if(modreqlife == 0) modreqlife = MODREQLIFE; moddirname = concatstr(2, listdir, "/moderation"); 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'; /* delete orphaned sidecar files */ 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)) { /* only delete old files to avoid deleting mail currently being sent */ t = time(NULL); if(stat(mailname, &st) == 0) { if(t - st.st_mtime > (time_t)36000) { unlink(mailname); /* avoid leaving orphans */ 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.3.0/src/mlmmj-make-ml000644 000765 000120 00000007300 13111411053 015655 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.3.0/src/mlmmj-make-ml.in000755 000765 000120 00000007254 11734220454 016311 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.3.0/src/mlmmj-process.c000644 000765 000120 00000077752 12774202071 016267 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 #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 "unistr.h" #include "chomp.h" enum action { ALLOW, SEND, DENY, MODERATE, DISCARD }; static char *action_strs[] = { "allowed", "sent", "denied", "moderated", "discarded" }; enum modreason { MODNONSUBPOSTS, MODNONMODPOSTS, ACCESS, MODERATED }; static char *modreason_strs[] = { "modnonsubposts", "modnonmodposts", "access", "moderated" }; static int is_moderator(const char *listdir, const char *address, char **moderators) { char *buf, *tmp, *moderatorsfilename; int moderatorsfd, foundaddr = 0; 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); while((buf = mygetline(moderatorsfd))) { chomp(buf); if(address && strcasecmp(buf, address) == 0) { foundaddr = 1; if (!moderators) { close(moderatorsfd); myfree(buf); return foundaddr; } } if (moderators) { tmp = *moderators; *moderators = concatstr(3, *moderators, buf, "\n"); myfree(tmp); } myfree(buf); } close(moderatorsfd); return foundaddr; } 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 *replyto, *listaddr = getlistaddr(listdir), *listdelim; text *txt; memory_lines_state *mls; char *queuefilename = NULL; const char *efromismod = NULL; char *mailbasename = mybasename(mailfilename), *to, *reject; int notifymod = 0, status; pid_t childpid, pid; #if 0 printf("mailfilename = [%s], mailbasename = [%s]\n", mailfilename, mailbasename); #endif listfqdn = genlistfqdn(listaddr); listname = genlistname(listaddr); if(statctrl(listdir, "ifmodsendonlymodmoderate")) efromismod = efromsender; if(!is_moderator(listdir, efromismod, &moderators)) efromismod = NULL; if(efromismod) mls = init_memory_lines(efromismod); else mls = init_memory_lines(moderators); 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]); 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 int addrmatch(const char *listaddr, const char *addr, const char *listdelim, char **recipextra) { char *delim, *atsign; size_t len; if (!addr) return 0; if(strcasecmp(listaddr, addr) == 0) { if (recipextra) *recipextra = NULL; return 1; } if (!listdelim) return 0; delim = strstr(addr, listdelim); if (!delim) return 0; len = delim - addr; if(strncasecmp(listaddr, addr, len) != 0) return 0; if(*(listaddr + len) != '@') return 0; delim += strlen(listdelim); atsign = strrchr(delim, '@'); if (!atsign) return 0; if(strcasecmp(listaddr + len + 1, atsign + 1) != 0) return 0; if (recipextra) { len = atsign - delim; *recipextra = (char *)mymalloc(len + 1); strncpy(*recipextra, delim, len); (*recipextra)[len] = '\0'; } return 1; } 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, intocc = 0, findaddress = 0; int maxmailsize = 0; int notmetoo = 0; int subonlypost = 0, modonlypost = 0, modnonsubposts = 0, foundaddr = 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 = NULL; 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 *listaddrs = 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+2) * sizeof(char *)); delheaders->strs[delheaders->count++] = mystrdup("From "); delheaders->strs[delheaders->count++] = mystrdup("Return-Path:"); subjectprefix = ctrlvalue(listdir, "prefix"); if(do_all_the_voodoo_here(rawmailfd, donemailfd, hdrfd, footfd, delheaders, 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); listdelim = NULL; } else { findaddress = 1; } addrtocc = !(statctrl(listdir, "tocc")); if (findaddress) { listdelim = getlistdelim(listdir); } if(addrtocc || findaddress) { listaddrs = ctrlvalues(listdir, "listaddress"); for(i = 0; i < dtemails.emailcount; i++) { for(j = 0; j < listaddrs->count; j++) { if(addrmatch(listaddrs->strs[j], dtemails.emaillist[i], listdelim, &recipextra)) { findaddress = 0; myfree(listdelim); listdelim = NULL; break; } } } } if(addrtocc || findaddress) { for(i = 0; i < toemails.emailcount; i++) { for(j = 0; j < listaddrs->count; j++) { if(addrmatch(listaddrs->strs[j], toemails.emaillist[i], listdelim, &recipextra)) { intocc = 1; break; } } } if (!intocc) for(i = 0; i < ccemails.emailcount; i++) { for(j = 0; j < listaddrs->count; j++) { if(addrmatch(listaddrs->strs[j], ccemails.emaillist[i], listdelim, &recipextra)) { intocc = 1; break; } } } } if (listdelim) { myfree(listdelim); listdelim = NULL; } if (listaddrs) for(i = 0; i < listaddrs->count; i++) myfree(listaddrs->strs[i]); 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, 2 * sizeof(char *)); delheaders->strs[delheaders->count++] = mystrdup("From "); delheaders->strs[delheaders->count++] = mystrdup("Return-Path:"); 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, delheaders, NULL, &allheaders, NULL) < 0) { log_error(LOG_ARGS, "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); 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, %s)\n", listdir, toemails.emaillist[0], mlmmjsub, mlmmjunsub, mlmmjsend, mlmmjbounce, donemailname); #endif unlink(mailfile); listcontrol(&fromemails, listdir, recipextra, mlmmjsub, mlmmjunsub, mlmmjsend, mlmmjbounce, donemailname); return EXIT_SUCCESS; } listaddr = getlistaddr(listdir); /* 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); 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", "tocc", 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 */ } } subonlypost = statctrl(listdir, "subonlypost"); modonlypost = statctrl(listdir, "modonlypost"); modnonsubposts = statctrl(listdir, "modnonsubposts"); /* modnonsubposts implies subonlypost if modonlypost is not set */ if (modnonsubposts && !modonlypost) subonlypost = 1; if(!send && (subonlypost || modonlypost || 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" " there are sender restrictions but" " From: was the list address", mailfile); myfree(listaddr); unlink(donemailname); myfree(donemailname); exit(EXIT_SUCCESS); } if(subonlypost) { foundaddr = (is_subbed(listdir, posteraddr, 0) != SUB_NONE); } else if (modonlypost) { foundaddr = is_moderator(listdir, posteraddr, NULL); } if(!foundaddr) { if(modnonsubposts) { moderated = 1; if (subonlypost) modreason = MODNONSUBPOSTS; else if (modonlypost) modreason = MODNONMODPOSTS; } else { if((subonlypost && statctrl(listdir, "nosubonlydenymails")) || (modonlypost && statctrl(listdir, "nomodonlydenymails"))) { log_error(LOG_ARGS, "Discarding %s because" " no{sub|mod}onlydenymails 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); if (subonlypost) { txt = open_text(listdir, "deny", "post", "subonlypost", NULL, "subonlypost"); } else if (modonlypost) { txt = open_text(listdir, "deny", "post", "modonlypost", NULL, NULL); } 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", listdir, "-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.3.0/src/mlmmj-receive.c000644 000765 000120 00000011534 11727635244 016226 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.3.0/src/mlmmj-send.c000644 000765 000120 00000110037 12774202071 015522 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, const char *heloname) { int retval = 0; int try_ehlo = 1; char *reply = NULL; do { init_sockfd(sockfd, relayhost, port); if(*sockfd == -1) { retval = EBADF; break; } 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. */ break; } if (try_ehlo) { write_ehlo(*sockfd, heloname); if((reply = checkwait_smtpreply(*sockfd, MLMMJ_EHLO)) == NULL) { /* EHLO successful don't try more */ break; } /* RFC 1869 - 4.5. - In the case of any error response, * the client SMTP should issue either the HELO or QUIT * command. * RFC 1869 - 4.5. - If the server SMTP recognizes the * EHLO command, but the command argument is * unacceptable, it will return code 501. */ if (strncmp(reply, "501", 3) == 0) { myfree(reply); /* Commmand unacceptable; we choose to QUIT but * ignore any QUIT errors; return that EHLO was * the error. */ endsmtp(sockfd); retval = MLMMJ_EHLO; break; } /* RFC 1869 - 4.6. - A server SMTP that conforms to RFC * 821 but does not support the extensions specified * here will not recognize the EHLO command and will * consequently return code 500, as specified in RFC * 821. The server SMTP should stay in the same state * after returning this code (see section 4.1.1 of RFC * 821). The client SMTP may then issue either a HELO * or a QUIT command. */ if (reply[0] != '5') { myfree(reply); /* Server doesn't understand EHLO, but gives a * broken response. Try with new connection. */ endsmtp(sockfd); try_ehlo = 0; continue; } myfree(reply); /* RFC 1869 - 4.7. - Other improperly-implemented * servers will not accept a HELO command after EHLO has * been sent and rejected. In some cases, this problem * can be worked around by sending a RSET after the * failure response to EHLO, then sending the HELO. */ write_rset(*sockfd); reply = checkwait_smtpreply(*sockfd, MLMMJ_RSET); /* RFC 1869 - 4.7. - Clients that do this should be * aware that many implementations will return a failure * code (e.g., 503 Bad sequence of commands) in response * to the RSET. This code can be safely ignored. */ myfree(reply); /* Try HELO on the same connection */ } write_helo(*sockfd, heloname); if((reply = checkwait_smtpreply(*sockfd, MLMMJ_HELO)) == NULL) { /* EHLO successful don't try more */ break; } if (try_ehlo) { myfree(reply); /* We reused a connection we tried EHLO on. Maybe * that's why it failed. Try with new connection. */ endsmtp(sockfd); try_ehlo = 0; continue; } log_error(LOG_ARGS, "Error with HELO. Reply: " "[%s]", reply); myfree(reply); /* FIXME: quit and tell admin to configure * correctly */ retval = MLMMJ_HELO; break; } while (1); 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, *smtphelo, *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"); 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"); } 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); if ((smtphelo = ctrlvalue(listdir, "smtphelo")) == NULL) { smtphelo = hostnamestr(); } switch(listctrl[0]) { case '1': /* A single mail is to be sent */ case '6': initsmtp(&sockfd, relay, smtpport, smtphelo); 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, smtphelo); 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, smtphelo); 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, smtphelo); 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, smtphelo); 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, smtphelo); 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, smtphelo); 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, smtphelo); 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); myfree(smtphelo); 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.3.0/src/mlmmj-sub.c000644 000765 000120 00000055651 11734220454 015374 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.3.0/src/mlmmj-unsub.c000644 000765 000120 00000044167 11734220454 015737 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.3.0/src/mygetline.c000644 000765 000120 00000004054 11727635244 015466 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.3.0/src/mylocking.c000644 000765 000120 00000003412 11414633671 015455 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.3.0/src/prepstdreply.c000644 000765 000120 00000125370 12774202071 016222 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 = 0, processedwidth = 0; 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.3.0/src/print-version.c000644 000765 000120 00000002660 11414633671 016304 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.3.0/src/random-int.c000644 000765 000120 00000003615 11727635244 015543 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.3.0/src/readn.c000644 000765 000120 00000003247 11414633671 014560 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.3.0/src/send_digest.c000644 000765 000120 00000031101 12774202071 015741 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" 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, NULL))) { if (strncasecmp(line, "Subject:", 8) == 0) { myfree(subj); subj = unistr_header_to_utf8(line + 8); } if (strncasecmp(line, "From:", 5) == 0) { myfree(from); from = unistr_header_to_utf8(line + 5); } 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.3.0/src/send_help.c000644 000765 000120 00000004344 11734220454 015423 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.3.0/src/send_list.c000644 000765 000120 00000013606 12774202071 015447 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) { subs_list_state *s = mymalloc(sizeof(subs_list_state)); s->dirname = mystrdup(dirname); s->dirp = NULL; s->fd = -1; s->line = NULL; 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); myfree(s); } 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 *normalsls, *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/"); normalsls = 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, "listsubs", rewind_subs_list, get_sub, normalsls); register_formatted(txt, "normalsubs", rewind_subs_list, get_sub, normalsls); 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 (!normalsls->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, normalsls); 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(normalsls); 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.3.0/src/statctrl.c000644 000765 000120 00000003324 11414633671 015323 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.3.0/src/strgen.c000644 000765 000120 00000016402 11727635244 014773 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.3.0/src/subscriberfuncs.c000644 000765 000120 00000010432 12774202071 016657 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 typesub; } mlmmj-1.3.0/src/unistr.c000644 000765 000120 00000036033 12774202071 015006 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 #include "mlmmj.h" #include "unistr.h" #include "log_error.h" #include "memory.h" /* This is allocated on the stack, so it can't be too big. */ #define ICONV_BUFFER_SIZE 160 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; i 0) { buffer = bytes; bufferleft = ICONV_BUFFER_SIZE; if (iconv(cd, &binary, &bin_len, &buffer, &bufferleft) == (size_t)-1) { if (errno == EILSEQ) { /* illegal sequence; try to recover */ unistr_append_utf8(str, bytes, ICONV_BUFFER_SIZE - bufferleft); unistr_append_usascii(str, "?", 1); bin_len--; binary++; continue; } else if (errno == EINVAL) { /* incomplete sequence; we're done */ unistr_append_usascii(str, "?", 1); break; } else if (errno != E2BIG) { /* some other error; abort */ unistr_append_usascii(str, "???", 1); break; } } /* success or buffer full */ unistr_append_utf8(str, bytes, ICONV_BUFFER_SIZE - bufferleft); } iconv_close(cd); } void unistr_dump(const unistr *str) { unsigned int i; printf("unistr_dump(%p)\n", (void *)str); printf(" ->len = %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; } } } /* wsp, if not NULL, is an earlier offset into the same string as word, * to whitespace that should only be included if word is not encoded. */ static int header_decode_word(char *wsp, char *word, unistr *ret) { char *my_word; char *charset, *encoding, *string, *end; char *binary; size_t bin_len; if (wsp == NULL) wsp = word; if ((word[0] != '=') || (word[1] != '?')) { unistr_append_usascii(ret, wsp, strlen(wsp)); return 0; } my_word = mystrdup(word); charset = my_word + 2; if ((encoding = strchr(charset, '?')) == NULL) { /* missing encoding */ unistr_append_usascii(ret, wsp, word-wsp); unistr_append_usascii(ret, "???", 3); myfree(my_word); return 0; } *(encoding++) = '\0'; if ((string = strchr(encoding, '?')) == NULL) { /* missing string */ unistr_append_usascii(ret, wsp, word-wsp); unistr_append_usascii(ret, "???", 3); myfree(my_word); return 0; } *(string++) = '\0'; if ((end = strchr(string, '?')) == NULL) { /* missing end */ unistr_append_usascii(ret, wsp, word-wsp); unistr_append_usascii(ret, "???", 3); myfree(my_word); return 0; } *(end++) = '\0'; if ((end[0] != '=') || (end[1] != '\0')) { /* broken end */ unistr_append_usascii(ret, wsp, word-wsp); unistr_append_usascii(ret, "???", 3); myfree(my_word); return 0; } 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, wsp, word-wsp); unistr_append_usascii(ret, "???", 3); myfree(my_word); return 0; } 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 { unistr_append_iconv(ret, binary, bin_len, charset); } myfree(my_word); myfree(binary); return 1; } /* 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; char c; char *wsp = NULL; int decoded = 0; unistr *us; char *ret; my_str = mystrdup(str); us = unistr_new(); p = my_str + strspn(my_str, " \t\n"); wsp = p; while (*p) { if (!decoded) { unistr_append_usascii(us, wsp, p-wsp); wsp = NULL; } word = p; p += strcspn(p, " \t\n"); c = *p; *p = '\0'; decoded = header_decode_word(wsp, word, us); *p = c; wsp = p; p += strspn(p, " \t\n"); } 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 *my_str; char *ret; char *wsp = NULL; char *p; int clean; char buf[4]; my_str = mystrdup(str); /* trim whitespace and see if the header is clean */ ret = my_str + strspn(my_str, " \t\n"); clean = 1; for (p=ret; *p; p++) { if (*p == ' ' || *p == '\t' || *p == '\n') { if (wsp == NULL) wsp = p; } else { wsp = NULL; } if (clean && !is_ok_in_header(*p)) clean = 0; } if (wsp != NULL) *wsp = '\0'; if (clean) { ret = mystrdup(ret); myfree(my_str); return ret; } us = unistr_new(); unistr_append_usascii(us, "=?utf-8?q?", 10); for (p=ret; *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); myfree(my_str); 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.3.0/src/writen.c000644 000765 000120 00000003212 11414633671 014767 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.3.0/man/mlmmj-bounce.1000644 000765 000120 00000002741 11734220454 015750 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.3.0/man/mlmmj-list.1000644 000765 000120 00000001333 11734220454 015444 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.3.0/man/mlmmj-maintd.1000644 000765 000120 00000002732 11734220454 015751 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.3.0/man/mlmmj-make-ml.1000644 000765 000120 00000001664 11734220454 016023 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.3.0/man/mlmmj-process.1000644 000765 000120 00000003720 11734220454 016151 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.3.0/man/mlmmj-receive.1000644 000765 000120 00000002656 11734220454 016124 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.3.0/man/mlmmj-send.1000644 000765 000120 00000003643 11734220454 015430 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.3.0/man/mlmmj-sub.1000644 000765 000120 00000006225 11734220454 015267 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.3.0/man/mlmmj-unsub.1000644 000765 000120 00000004516 11734220454 015633 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.3.0/listtexts/ast/000755 000765 000120 00000000000 13111411142 015337 5ustar00benadmin000000 000000 mlmmj-1.3.0/listtexts/cs/000755 000765 000120 00000000000 13111411142 015155 5ustar00benadmin000000 000000 mlmmj-1.3.0/listtexts/de/000755 000765 000120 00000000000 13111411143 015141 5ustar00benadmin000000 000000 mlmmj-1.3.0/listtexts/en/000755 000765 000120 00000000000 13111411143 015153 5ustar00benadmin000000 000000 mlmmj-1.3.0/listtexts/fi/000755 000765 000120 00000000000 13111411143 015147 5ustar00benadmin000000 000000 mlmmj-1.3.0/listtexts/fr/000755 000765 000120 00000000000 13111411143 015160 5ustar00benadmin000000 000000 mlmmj-1.3.0/listtexts/gr/000755 000765 000120 00000000000 13111411143 015161 5ustar00benadmin000000 000000 mlmmj-1.3.0/listtexts/it/000755 000765 000120 00000000000 13111411143 015165 5ustar00benadmin000000 000000 mlmmj-1.3.0/listtexts/Makefile.am000644 000765 000120 00000000144 11734220454 016620 0ustar00benadmin000000 000000 ## Process this file with automake to produce Makefile.in nobase_dist_textlib_DATA = $(srcdir)/*/* mlmmj-1.3.0/listtexts/Makefile.in000644 000765 000120 00000032537 13111411034 016627 0ustar00benadmin000000 000000 # Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 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) DIST_COMMON = $(srcdir)/Makefile.am $(nobase_dist_textlib_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = 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) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 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 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: 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 cscopelist-am \ ctags-am 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 tags-am uninstall \ uninstall-am uninstall-nobase_dist_textlibDATA .PRECIOUS: Makefile # 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.3.0/listtexts/pt/000755 000765 000120 00000000000 13111411143 015174 5ustar00benadmin000000 000000 mlmmj-1.3.0/listtexts/sk/000755 000765 000120 00000000000 13111411143 015166 5ustar00benadmin000000 000000 mlmmj-1.3.0/listtexts/zh-cn/000755 000765 000120 00000000000 13111411143 015570 5ustar00benadmin000000 000000 mlmmj-1.3.0/listtexts/zh-cn/confirm000644 000765 000120 00000002723 11734220454 017170 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.3.0/listtexts/zh-cn/deny000644 000765 000120 00000004006 11734220454 016466 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.3.0/listtexts/zh-cn/deny-post000644 000765 000120 00000003226 11734220454 017454 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.3.0/listtexts/zh-cn/digest000644 000765 000120 00000000277 11734220454 017014 0ustar00benadmin000000 000000 Subject: $list$@$domain$ 讨论汇总 第 $digestissue$ 期 (\=$digestinterval$\=) %charwrap%%wide% 话题 (\=第 $digestfirst$ 至 $digestlast$ 封邮件\=)\=: - %digestthreads% mlmmj-1.3.0/listtexts/zh-cn/faq000644 000765 000120 00000000142 11734220454 016273 0ustar00benadmin000000 000000 Subject: $list$@$domain$ 的常见问题 %charwrap%%wide% 抱歉\=,尚无常见问题\=。 mlmmj-1.3.0/listtexts/zh-cn/finish000644 000765 000120 00000002401 11734220454 017004 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.3.0/listtexts/zh-cn/finish-sub000644 000765 000120 00000002114 11734220454 017574 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.3.0/listtexts/zh-cn/gatekeep-sub000644 000765 000120 00000001003 11734220454 020075 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.3.0/listtexts/zh-cn/help000644 000765 000120 00000004727 11734220454 016471 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.3.0/listtexts/zh-cn/list000644 000765 000120 00000000702 11734220454 016501 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.3.0/listtexts/zh-cn/moderate-post000644 000765 000120 00000002044 11734220454 020312 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.3.0/listtexts/zh-cn/notify000644 000765 000120 00000001716 11734220454 017044 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.3.0/listtexts/zh-cn/probe000644 000765 000120 00000000340 11734220454 016633 0ustar00benadmin000000 000000 Subject: $list$@$domain$ 被退回的邮件 %text prologue% 您的部分邮件无法投递\=。如果您看到本邮件\=,说明已经恢复正常\=,仅供参 考\=。 已退回的邮件列表\=: - %bouncenumbers% mlmmj-1.3.0/listtexts/zh-cn/prologue000644 000765 000120 00000000140 11734220454 017356 0ustar00benadmin000000 000000 %charwrap%%wide% %wrap%嗨\=,我是管理 <$list$@$domain$> 邮件列表的 Mlmmj 程序\=。 mlmmj-1.3.0/listtexts/zh-cn/wait-post000644 000765 000120 00000001467 11734220454 017466 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.3.0/listtexts/zh-cn/wait-sub000644 000765 000120 00000000260 11734220454 017260 0ustar00benadmin000000 000000 Subject: 等待批准加入 $list$@$domain$ %text prologue% %wrap%您加入该列表的请求已收到\=。然而\=,掌门人需要审核后才能批准您加 入\=。 mlmmj-1.3.0/listtexts/sk/confirm000644 000765 000120 00000003217 11746152500 016564 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.3.0/listtexts/sk/deny000644 000765 000120 00000004474 11746152500 016074 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.3.0/listtexts/sk/deny-post000644 000765 000120 00000003372 11746152500 017053 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.3.0/listtexts/sk/digest000644 000765 000120 00000000237 11746152500 016405 0ustar00benadmin000000 000000 Subject: Súhrn mailovej diskusie $list$@$domain$ vydanie $digestissue$ ($digestinterval$) Témy (správy $digestfirst$ až $digestlast$): - %digestthreads% mlmmj-1.3.0/listtexts/sk/faq000644 000765 000120 00000000152 11746152500 015671 0ustar00benadmin000000 000000 Subject: Často kladené otázky k mailovej diskusii $list$@$domain$ Ľutujeme, FAQ zatiaľ neexistuje. mlmmj-1.3.0/listtexts/sk/finish000644 000765 000120 00000002601 11746152500 016403 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.3.0/listtexts/sk/finish-sub000644 000765 000120 00000003012 11746152500 017167 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.3.0/listtexts/sk/gatekeep-sub000644 000765 000120 00000001215 11746152500 017477 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.3.0/listtexts/sk/help000644 000765 000120 00000006274 11746152500 016065 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.3.0/listtexts/sk/list000644 000765 000120 00000000767 11746152500 016111 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.3.0/listtexts/sk/moderate-post000644 000765 000120 00000002252 11746152500 017710 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.3.0/listtexts/sk/notify000644 000765 000120 00000002227 11746152500 016437 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.3.0/listtexts/sk/probe000644 000765 000120 00000000436 11746152500 016236 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.3.0/listtexts/sk/prologue000644 000765 000120 00000000130 11746152500 016752 0ustar00benadmin000000 000000 %wrap%Ahoj, toto je program Mlmmj, ktorý spravuje mailovú diskusiu <$list$@$domain$>. mlmmj-1.3.0/listtexts/sk/wait-post000644 000765 000120 00000001560 11746152500 017055 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.3.0/listtexts/sk/wait-sub000644 000765 000120 00000000374 11746152500 016663 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.3.0/listtexts/pt/confirm000644 000765 000120 00000003377 11746152500 016601 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.3.0/listtexts/pt/deny000644 000765 000120 00000004700 11746152500 016072 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.3.0/listtexts/pt/deny-post000644 000765 000120 00000003372 11746152500 017061 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.3.0/listtexts/pt/digest000644 000765 000120 00000000223 11746152500 016406 0ustar00benadmin000000 000000 Subject: Resumo de $list$@$domain$ assunto $digestissue$ ($digestinterval$) Tópicos (mensagens $digestfirst$ a $digestlast$): - %digestthreads% mlmmj-1.3.0/listtexts/pt/faq000644 000765 000120 00000000144 11746152500 015700 0ustar00benadmin000000 000000 Subject: Perguntas frequentes de $list$@$domain$ Desculpe, mas não existem perguntas frequentes. mlmmj-1.3.0/listtexts/pt/finish000644 000765 000120 00000002471 11746152500 016416 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.3.0/listtexts/pt/finish-sub000644 000765 000120 00000002436 11746152500 017206 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.3.0/listtexts/pt/gatekeep-sub000644 000765 000120 00000001147 11746152500 017511 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.3.0/listtexts/pt/help000644 000765 000120 00000005753 11746152500 016074 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.3.0/listtexts/pt/list000644 000765 000120 00000000653 11746152500 016111 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.3.0/listtexts/pt/moderate-post000644 000765 000120 00000002111 11746152500 017710 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.3.0/listtexts/pt/notify000644 000765 000120 00000002115 11746152500 016441 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.3.0/listtexts/pt/probe000644 000765 000120 00000000414 11746152500 016240 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.3.0/listtexts/pt/prologue000644 000765 000120 00000000141 11746152500 016762 0ustar00benadmin000000 000000 %wrap%Este é o Mlmmj, a aplicação que faz a gestão das mensagens da lista <$list$@$domain$>. mlmmj-1.3.0/listtexts/pt/wait-post000644 000765 000120 00000001565 11746152500 017070 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.3.0/listtexts/pt/wait-sub000644 000765 000120 00000000356 11746152500 016671 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.3.0/listtexts/it/confirm000644 000765 000120 00000003247 11734220454 016567 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.3.0/listtexts/it/deny000644 000765 000120 00000004577 11734220454 016100 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.3.0/listtexts/it/deny-post000644 000765 000120 00000003476 11734220454 017060 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.3.0/listtexts/it/digest000644 000765 000120 00000000236 11734220454 016404 0ustar00benadmin000000 000000 Subject: Digest di $list$@$domain$ emissione $digestissue$ ($digestinterval$) Argomenti (messaggi $digestfirst$ attraverso $digestlast$): - %digestthreads% mlmmj-1.3.0/listtexts/it/faq000644 000765 000120 00000000150 11734220454 015667 0ustar00benadmin000000 000000 Subject: Domande ricorrenti (FAQ) di $list$@$domain$ Ci dispiace, le FAQ non sono ancora disponibili. mlmmj-1.3.0/listtexts/it/finish000644 000765 000120 00000002513 11746152500 016404 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.3.0/listtexts/it/finish-sub000644 000765 000120 00000002341 11734220454 017173 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.3.0/listtexts/it/gatekeep-sub000644 000765 000120 00000001126 11734220454 017500 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.3.0/listtexts/it/help000644 000765 000120 00000005720 11734220454 016060 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.3.0/listtexts/it/list000644 000765 000120 00000000663 11734220454 016104 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.3.0/listtexts/it/moderate-post000644 000765 000120 00000002215 11734220454 017707 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.3.0/listtexts/it/notify000644 000765 000120 00000002202 11734220454 016430 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.3.0/listtexts/it/probe000644 000765 000120 00000000473 11734220454 016237 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.3.0/listtexts/it/prologue000644 000765 000120 00000000131 11734220454 016753 0ustar00benadmin000000 000000 %wrap%Ciao, questo è il programma Mlmmj che gestisce la mailing list <$list$@$domain$>. mlmmj-1.3.0/listtexts/it/wait-post000644 000765 000120 00000001553 11734220454 017057 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.3.0/listtexts/it/wait-sub000644 000765 000120 00000000376 11734220454 016665 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.3.0/listtexts/gr/confirm000644 000765 000120 00000006165 11734220454 016565 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.3.0/listtexts/gr/deny000644 000765 000120 00000007343 11734220454 016066 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.3.0/listtexts/gr/deny-post000644 000765 000120 00000005444 11734220454 017051 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.3.0/listtexts/gr/digest000644 000765 000120 00000000400 11734220454 016371 0ustar00benadmin000000 000000 Subject: Συγκεντρωτική ενημέρωση της λίστας ταχυδρομείου $list$@$domain$ τεύχος $digestissue$ ($digestinterval$) Θέματα (μηνύματα από $digestfirst$ έως $digestlast$): - %digestthreads% mlmmj-1.3.0/listtexts/gr/faq000644 000765 000120 00000000300 11734220454 015660 0ustar00benadmin000000 000000 Subject: Συχνές ερωτήσεις σχετικές με τη $list$@$domain$ Δυστυχώς, οι συχνές ερωτήσεις δεν είναι ακόμα διαθέσιμες. mlmmj-1.3.0/listtexts/gr/finish000644 000765 000120 00000004435 11734220454 016406 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.3.0/listtexts/gr/finish-sub000644 000765 000120 00000004550 11734220454 017173 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.3.0/listtexts/gr/gatekeep-sub000644 000765 000120 00000002161 11734220454 017474 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.3.0/listtexts/gr/help000644 000765 000120 00000011711 11734220454 016051 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.3.0/listtexts/gr/list000644 000765 000120 00000001302 11734220454 016067 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.3.0/listtexts/gr/moderate-post000644 000765 000120 00000003204 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 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.3.0/listtexts/gr/notify000644 000765 000120 00000003332 11734220454 016431 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.3.0/listtexts/gr/probe000644 000765 000120 00000001206 11734220454 016226 0ustar00benadmin000000 000000 Subject: Μηνύματα με καθυστέρηση ή αδυναμία παράδοσης στη λίστα ταχυδρομείου $list$@$domain$ %text prologue% Κάποια μηνύματα σας δεν παραδόθηκαν επιτυχώς. Αν διαβάζετε αυτές τις γραμμές, τότε το πρόβλημα έχει ήδη διορθωθεί και το μήνυμα αποσκοπεί απλά στην ενημέρωσή σας. Παρακάτω ακολουθεί ένας κατάλογος με τα μηνύματα που καθυστέρησαν ή δεν παραδόθηκαν. - %bouncenumbers% mlmmj-1.3.0/listtexts/gr/prologue000644 000765 000120 00000000240 11734220454 016750 0ustar00benadmin000000 000000 %wrap%Γειά, αυτό είναι το Mlmmj πρόγραμμα που διαχειρίζεται τη λίστα ταχυδρομείου <$list$@$domain$>. mlmmj-1.3.0/listtexts/gr/wait-post000644 000765 000120 00000002373 11734220454 017054 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.3.0/listtexts/gr/wait-sub000644 000765 000120 00000000662 11734220454 016657 0ustar00benadmin000000 000000 Subject: Αναμονή για έγκριση της συμμετοχής σας στη λίστα ταχυδρομείου $list$@$domain$ %text prologue% %wrap%Η αίτησή σας για συμμετοχή στη λίστα ταχυδρομείου παραλήφθηκε. Αναμένεται ο έλεγχος και η αποδοχή ή απόρριψή της από τους διαχειριστές της λίστας. mlmmj-1.3.0/listtexts/fr/confirm000644 000765 000120 00000003405 11734220454 016556 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.3.0/listtexts/fr/deny000644 000765 000120 00000004645 11734220454 016067 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.3.0/listtexts/fr/deny-post000644 000765 000120 00000003555 11734220454 017051 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.3.0/listtexts/fr/digest000644 000765 000120 00000000221 11734220454 016371 0ustar00benadmin000000 000000 Subject: Digest de $list$@$domain$ numéro $digestissue$ ($digestinterval$) Sujets (messages $digestfirst$ de $digestlast$): - %digestthreads% mlmmj-1.3.0/listtexts/fr/faq000644 000765 000120 00000000151 11734220454 015663 0ustar00benadmin000000 000000 Subject: Foire aux questions de $list$@$domain$ Désolé, il n'y a pas de FAQ disponible actuellement. mlmmj-1.3.0/listtexts/fr/finish000644 000765 000120 00000002537 11746152500 016405 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.3.0/listtexts/fr/finish-sub000644 000765 000120 00000002477 11734220454 017200 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.3.0/listtexts/fr/gatekeep-sub000644 000765 000120 00000001127 11734220454 017474 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.3.0/listtexts/fr/help000644 000765 000120 00000006004 11734220454 016047 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.3.0/listtexts/fr/list000644 000765 000120 00000000663 11734220454 016077 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.3.0/listtexts/fr/moderate-post000644 000765 000120 00000002252 11734220454 017703 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.3.0/listtexts/fr/notify000644 000765 000120 00000002156 11734220454 016433 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.3.0/listtexts/fr/probe000644 000765 000120 00000000512 11734220454 016224 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.3.0/listtexts/fr/prologue000644 000765 000120 00000000107 11734220454 016751 0ustar00benadmin000000 000000 %wrap%Hi, c'est le programme Mlmmj gérant la liste <$list$@$domain$>. mlmmj-1.3.0/listtexts/fr/wait-post000644 000765 000120 00000001606 11734220454 017051 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.3.0/listtexts/fr/wait-sub000644 000765 000120 00000000367 11734220454 016660 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.3.0/listtexts/fi/confirm000644 000765 000120 00000003564 11734220454 016553 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.3.0/listtexts/fi/deny000644 000765 000120 00000005107 11734220454 016050 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.3.0/listtexts/fi/deny-post000644 000765 000120 00000004032 11734220454 017027 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.3.0/listtexts/fi/digest000644 000765 000120 00000000234 11734220454 016364 0ustar00benadmin000000 000000 Subject: Viestikooste $digestissue$ postituslistalta $list$@$domain$ ($digestinterval$) Aiheet (viestit $digestfirst$ - $digestlast$): - %digestthreads% mlmmj-1.3.0/listtexts/fi/faq000644 000765 000120 00000000201 11734220454 015646 0ustar00benadmin000000 000000 Subject: Listan $list$@$domain$ usein kysytyt kysymykset Valitettavasti usein kysyttyjä kysymyksiä ei vielä ole saatavilla. mlmmj-1.3.0/listtexts/fi/finish000644 000765 000120 00000002703 11746152500 016367 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.3.0/listtexts/fi/finish-sub000644 000765 000120 00000002714 11734220454 017161 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.3.0/listtexts/fi/gatekeep-sub000644 000765 000120 00000001256 11734220454 017466 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.3.0/listtexts/fi/help000644 000765 000120 00000006402 11734220454 016040 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.3.0/listtexts/fi/list000644 000765 000120 00000000732 11734220454 016063 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.3.0/listtexts/fi/moderate-post000644 000765 000120 00000002357 11734220454 017700 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.3.0/listtexts/fi/notify000644 000765 000120 00000002335 11734220454 016421 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.3.0/listtexts/fi/probe000644 000765 000120 00000000706 11734220454 016220 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.3.0/listtexts/fi/prologue000644 000765 000120 00000000125 11734220454 016740 0ustar00benadmin000000 000000 %wrap%Hei, tämä on Mlmmj-ohjelma, joka hallinnoi <$list$@$domain$>-postituslistaa. mlmmj-1.3.0/listtexts/fi/wait-post000644 000765 000120 00000001651 11734220454 017040 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.3.0/listtexts/fi/wait-sub000644 000765 000120 00000000417 11734220454 016643 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.3.0/listtexts/en/confirm000644 000765 000120 00000003146 11734220454 016553 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.3.0/listtexts/en/deny000644 000765 000120 00000004414 11734220454 016054 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.3.0/listtexts/en/deny-post000644 000765 000120 00000003525 12774207406 017050 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 modonlypost% because you are not a list moderator. %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.3.0/listtexts/en/digest000644 000765 000120 00000000224 11734220454 016367 0ustar00benadmin000000 000000 Subject: Digest of $list$@$domain$ issue $digestissue$ ($digestinterval$) Topics (messages $digestfirst$ through $digestlast$): - %digestthreads% mlmmj-1.3.0/listtexts/en/faq000644 000765 000120 00000000126 11734220454 015660 0ustar00benadmin000000 000000 Subject: Frequently asked questions of $list$@$domain$ Sorry, no FAQ available yet. mlmmj-1.3.0/listtexts/en/finish000644 000765 000120 00000002510 11746152500 016367 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.3.0/listtexts/en/finish-sub000644 000765 000120 00000002245 11746152500 017163 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.3.0/listtexts/en/gatekeep-sub000644 000765 000120 00000001057 11734220454 017471 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.3.0/listtexts/en/help000644 000765 000120 00000005156 11734220454 016051 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.3.0/listtexts/en/list000644 000765 000120 00000000661 11734220454 016070 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.3.0/listtexts/en/moderate-post000644 000765 000120 00000002152 11734220454 017675 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.3.0/listtexts/en/notify000644 000765 000120 00000002067 11734220454 016427 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.3.0/listtexts/en/probe000644 000765 000120 00000000425 11734220454 016222 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.3.0/listtexts/en/prologue000644 000765 000120 00000000121 11734220454 016740 0ustar00benadmin000000 000000 %wrap%Hi, this is the Mlmmj program managing the <$list$@$domain$> mailing list. mlmmj-1.3.0/listtexts/en/wait-post000644 000765 000120 00000001540 11734220454 017041 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.3.0/listtexts/en/wait-sub000644 000765 000120 00000000324 11734220454 016644 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.3.0/listtexts/de/confirm000644 000765 000120 00000003450 11734220454 016537 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.3.0/listtexts/de/deny000644 000765 000120 00000005013 11734220454 016036 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.3.0/listtexts/de/deny-post000644 000765 000120 00000003700 11734220454 017022 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.3.0/listtexts/de/digest000644 000765 000120 00000000246 11734220454 016361 0ustar00benadmin000000 000000 Subject: Zusammenfassung der Liste $list$@$domain$ Ausgabe: $digestissue$ ($digestinterval$) Themen (Nachrichten $digestfirst$ bis $digestlast$): - %digestthreads% mlmmj-1.3.0/listtexts/de/faq000644 000765 000120 00000000210 11734220454 015640 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.3.0/listtexts/de/finish000644 000765 000120 00000002722 11734220454 016363 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.3.0/listtexts/de/finish-sub000644 000765 000120 00000002350 11746152500 017146 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.3.0/listtexts/de/gatekeep-sub000644 000765 000120 00000001140 11734220454 017450 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.3.0/listtexts/de/help000644 000765 000120 00000005744 11734220454 016042 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.3.0/listtexts/de/list000644 000765 000120 00000000675 11734220454 016063 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.3.0/listtexts/de/moderate-post000644 000765 000120 00000002240 11734220454 017661 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.3.0/listtexts/de/notify000644 000765 000120 00000002130 11734220454 016404 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.3.0/listtexts/de/probe000644 000765 000120 00000000515 11734220454 016210 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.3.0/listtexts/de/prologue000644 000765 000120 00000000140 11734220454 016727 0ustar00benadmin000000 000000 %wrap%Hallo, hier ist das Programm Mlmmj, welches die Mailingliste <$list$@$domain$> verwaltet. mlmmj-1.3.0/listtexts/de/wait-post000644 000765 000120 00000001567 11734220454 017040 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.3.0/listtexts/de/wait-sub000644 000765 000120 00000000333 11734220454 016632 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.3.0/listtexts/cs/confirm000644 000765 000120 00000003145 12774207406 016564 0ustar00benadmin000000 000000 %ifaction sub%Subject: Potvrzení přihlášení do $list$@$domain$%endif% %ifaction unsub%Subject: Potvrzení odhlášení z $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap% %ifreason admin% Správce %endif% %ifreason request% Někdo (doufáme, že vy) %endif% vyžádal přidání vaší emailové adresy <$subaddr$> %iftype normal% do konference. To znamená, že kdykoli, když někdo pošle zprávu do konference, dostanete kopii této zprávy. %endif% %iftype digest% do Digest verze konference. To znamená, že zprávy zaslané do konference budete dostávat v jedné zprávě. Buďto po uplynutí pravidelné lhůty, nebo až se naschromáždí dostatek zpráv. %endif% %iftype nomail% do No-mail verze konference. To znamená, že nebudete dostávat žádné zprávy, ale jste považován za člena konference. Takže pokud je někde přístupný archiv, můžete jej procházet a hlavně můžete do konference zasílat zprávy (a být třeba prihlášen ještě pod jinou adresou). %endif% %endif% %ifaction unsub% %^%%wrap% %ifreason admin% Správce %endif% %ifreason request% Někdo (doufáme, že vy) %endif% požádal o vyřazení adresy <$subaddr$> z konference. %endif% %wrap%Pro potvrzení odhlášení zašlete prosím zprávu na <$confaddr$>, což většinou znamená jen odpovědět na tento email. Předmět a obsah mailu nehrají roli, může to být cokoli. Až tak učiníte, měl/a byste dostat zprávu potvrzující úspěch odhlášení. Pokud si akci nepřejete, prostě tento email ignorujte. mlmmj-1.3.0/listtexts/cs/deny000644 000765 000120 00000004565 12774207406 016075 0ustar00benadmin000000 000000 %ifaction sub%Subject: Není možné přihlásit se do $list$@$domain$%endif% %ifaction unsub%Subject: Není možné odhlásit se z $list$@$domain$%endif% %ifaction release reject%Subject: Není možné moderovat $list$@$domain$%endif% %ifaction permit obstruct%Subject: Není možné spravovat $list$@$domain$%endif% %text prologue% %ifaction sub% %^%%wrap%Není možné přihlásit se do konference, %ifreason disabled% protože %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% verze zasílání je vypnutá. %endif% %ifreason closed% protože je zakázáno přihlásit se prostřednictvím zaslání zprávy. %endif% %ifreason subbed% protože adresa je již do konference přihlášená. %endif% %ifreason expired% protože uplynulo příliš mnoho času a nikdo neschválil žádost. %endif% %ifreason obstruct% protože žádost o přihlášení byla zamítnuta. %endif% %endif% %ifaction unsub% %^%%wrap%Není možné odhlásit se z konference, %ifreason unsubbed% protože adresa není přihlášena. %^%%wrap%Pokud si myslíte (nebo víte), že jste členem konference, jste pravděpodobně přihlášen/a s jinou emailovou adresou. Můžete ji zjistit z uvítacího emailu při přihlášení do konference, který jste odbržel/a. (Podívejte se na pole "Return-Path" v hlavičce uvítacího emailu.) %endif% %endif% %ifaction release reject% %^%%wrap% %ifaction release% Není možné uvolnit/rozeslat zprávu do konference, %endif% %ifaction reject% Není možné zamítnout zprávu do konference, %endif% %ifreason notfound% protože zprávu nejde nalézt. Možná ji rozeslal/zamítnul někdo jiný (jiný moderátor), nebo již požadavek vypršel. %endif% %ifreason moderators% protože nejste moderátorem konference. %endif% %endif% %ifaction permit obstruct% %^%%wrap% %ifaction permit% Není možné schválit požadavek na přihlášení do konference, %endif% %ifaction obstruct% Není možné zamítnout požadavek na přihlášení do konference, %endif% %ifreason notfound% protože ho nejde nalézt. Možná ho rozeslal/zamítnul někdo jiný (jiný správce), nebo již požadavek vypršel. %endif% %ifreason gatekeepers% protože nejste správcem konference. %endif% %endif% mlmmj-1.3.0/listtexts/cs/deny-post000644 000765 000120 00000003637 12774207406 017057 0ustar00benadmin000000 000000 Subject: Zaslat email do $list$@$domain$ není možné ($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%Zprávu od <$posteraddr$> s předmětem "$subject$" není možné doručit. %ifreason maxmailsize% Zpráva je příliš velká, maximální velikost zprávy je $maxmailsize$ bajtů. %endif% %ifreason tocc% Adresa konference nebyla nalezena v poli Komu: (To:) nebo Kopie: (Cc:). %endif% %ifreason access% Zaslání bylo zamezeno přístupovými právy ke konferenci stanovenými správcem. %endif% %ifreason expired% Zpráva měla být schválena moderátorem konference, ale žádný ji delší čas neschválil. %endif% %ifreason reject% Zpráva byla zamítnuta moderátorem konference. %endif% %ifreason subonlypost% Adresa, ze které byla zpráva zaslána, není v seznamu členů konference. %ifcontrol closedlist closedlistsub% %^%%wrap%Pokud si přejete být členem konference kontaktujte správce. Můžete použít emailovou adresu <$list+$owner@$domain$>. %endif% %^%%wrap%Pokud si myslíte (nebo víte), že jste členem konference, zaslal/a jste zprávu z jiné emailové adresy, než se kterou jste přihlášen/a. Můžete ji zjistit z uvítacího emailu do konference, který jste odbržel/a. (Podívejte se na pole "Return-Path" v hlavičce uvítacího emailu.) %endif% %ifreason modonlypost% protože nejste moderator konference. %endif% %ifreason maxmailsize% %^%(Začátek zprávy je uveden níže.) %else% %^%(Zpráva je uvedena níže.) %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.3.0/listtexts/cs/digest000644 000765 000120 00000000230 12774207406 016376 0ustar00benadmin000000 000000 Subject: Digest verze $list$@$domain$ vydání $digestissue$ ($digestinterval$) Témata (zprávy od $digestfirst$ do $digestlast$): - %digestthreads% mlmmj-1.3.0/listtexts/cs/faq000644 000765 000120 00000000220 12774207406 015665 0ustar00benadmin000000 000000 Subject: Často kladené otázky a odpovědi (FAQ) pro konferenci $list$@$domain$ Omlouváme se, žádné další informace nejsou dostupné. mlmmj-1.3.0/listtexts/cs/finish000644 000765 000120 00000002470 12774207406 016407 0ustar00benadmin000000 000000 %ifaction unsub%Subject: Nashledanou v $list$@$domain$%endif% %ifaction release reject%Subject: Moderovaná konference $list$@$domain$: $subject$%endif% %ifaction permit obstruct%Subject: Chráněná konference $list$@$domain$: $subaddr$%endif% %ifaction post%Subject: Zasláno do $list$@$domain$: $subject$%endif% %text prologue% %ifaction unsub% %^%%wrap% %ifreason request% %endif% %ifreason confirm% Děkujeme za potvrzení odhlášení. %endif% %ifreason admin% Správce vás odhlásil z konference. %else% Byl jste odhlášen z konference. %endif% %endif% %ifaction release% %^%%wrap%Úspěšně jste zaslal zpravu od <$posteraddr$> s předmětem "$subject$" do konference. %endif% %ifaction reject% %^%%wrap%Úspěšně jste zamítnul zprávu od <$posteraddr$> s předmětem "$subject$". %endif% %ifaction permit% %^%%wrap%Úspěšně jste povolil přihlášení <$subaddr$> do konference. %endif% %ifaction obstruct% %^%%wrap%Úspěšně jste zamítnul přihlášení <$subaddr$> do konference. %endif% %ifaction post% %^%%wrap% %ifreason confirm% Děkujeme za potvrzení %endif% %ifreason release% Moderátor umožnil zaslání %endif% %ifreason request% Děkujeme za %endif% zpráva s předmětem "$subject$". Nyní je odesílána do konference. %endif% mlmmj-1.3.0/listtexts/cs/finish-sub000644 000765 000120 00000002225 12774207406 017174 0ustar00benadmin000000 000000 Subject: Vítejte v konferenci $list$@$domain$ %text prologue% %wrap% %ifreason request% Potvrzujeme přihlášení do konference. %endif% %ifreason confirm% Děkujeme za potvrzení přihlášení. %endif% %ifreason permit% Správa konference povolila přihlášení do konference. %endif% %ifreason switch% Vaše členství v konferenci bylo změněno na %else% %ifreason admin% Správce vás přihlásil k %else% Jste nyní přihlášeni k %endif% %endif% %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% verzi odebírání konference. %wrap%Emailová adresa, se kterou jste prihlášen/a je <$subaddr$>. %ifcontrol closedlist% %^%%wrap%Pokud se chcete odhlásit musíte kontaktovat správce konference. Můžete mu zaslat email na adresu <$list+$owner@$domain$>. %else% %^%%wrap%Pokud se budete chtít odhlásit, zašlete zprávu na adresu <$list+$unsubscribe@$domain$>. Předmět a obsah zprávy může být libovolný. Následně obdržíte zprávu s dalšími instrukcemi. %endif% %wrap%Pro získání dalších informací můžete zaslat zprávu na adresu <$list+$help@$domain$>. mlmmj-1.3.0/listtexts/cs/gatekeep-sub000644 000765 000120 00000001114 12774207406 017475 0ustar00benadmin000000 000000 Subject: Požadavek na přihlášení $subaddr$ do $list$@$domain$ %text prologue% %wrap%Požadavek od <$subaddr$> na přihlášení do %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% verze konference. %wrap%K potvrzení požadavku zašlete zprávu na <$permitaddr$>, což lze většinou udělat jen odpovědí na tento emailový požadavek. %wrap%Pokud požadavek nechcete potvrdit, zašlete zprávu na <$obstructaddr$>, nebo prostě jednoduše tento pozadavek ignorujte. Následující osoby dostaly tento požadavek: - %gatekeepers% mlmmj-1.3.0/listtexts/cs/help000644 000765 000120 00000005366 12774207406 016066 0ustar00benadmin000000 000000 Subject: Informace pro $list$@$domain$ %text prologue% Zde jsou informace o konferenci. Je možné se přihlásit k následujícím verzím: - %wrap%Normal: Pokaždé, když je zaslána zpráva do konference dostane každý její člen kopii. %ifcontrol closedlist closedlistsub% Přihlášení se děje kontaktováním správce. %else% Přihlášení je pomocí zaslání zprávy na <$list+$subscribe@$domain$>. %endif% %ifncontrol nodigestsub% %^%- %wrap%Digest: Více zpráv je zasíláno v jedné zprávě v pravidelných intervalech, nebo když se zprávy nahromadí. %ifcontrol closedlist closedlistsub% Přihlášení se děje kontaktováním správce. %else% Přihlášení je pomocí zaslání zprávy na <$list+$subscribe-digest@$domain$>. %endif% %endif% %ifncontrol nonomailsub% %^%- %wrap%No-mail: Nejsou zasílány žádné zprávy z konference. To znamená, že je možné zprávy zasílat do konference (zejména pokud je vyžadováno členství). Zprávy je možné číst pomocí archivu konference (pokud existuje), nebo jsou zasílány na jinou adresu (adresy) přihlášené do konference. %ifcontrol closedlist closedlistsub% Přihlášení se děje kontaktováním správce. %else% Přihlášení je pomocí zaslání zprávy na <$list+$subscribe-nomail@$domain$> %endif% %endif% %ifcontrol submod% %^%%wrap%Konference má správce, který schvaluje nové požadavky na přihlášení do konference. %endif% %ifcontrol closedlist% %^%%wrap%Odhlášení je možné kontaktovaním správce. %else% %^%%wrap%Odhlášení je možné zasláním zprávy na <$list+$unsubscribe@$domain$>. %endif% %wrap%Adresa pro zasílání zpráv do konference je <$list$@$domain$>. %ifcontrol subonlypost%%ifncontrol modnonsubposts% %^%%wrap%Do konference mohou zasílat zprávy jen její členové. %endif%%endif% %ifcontrol moderated% %^%%wrap%Zprávy zaslané do konference podhléhají schválení moderátorem konference. %else% %ifcontrol subonlypost%%ifcontrol modnonsubposts% %^%%wrap%Zpravy zaslane nečleny konference podléhají schválení moderátorem konference. %endif%%endif% %endif% %ifcontrol access% %^%%wrap%Konference má nastavena přístupová pravidla pro zasílání a moderování zpráv. %endif% %ifncontrol noget%%ifncontrol noarchive% %^%%wrap% %ifcontrol subonlyget% Kdokoli %else% Členové %endif% mohou získat zprávu číslo N z archivu konference zasláním zprávy na adresu <$list+$get-N@$domain$> (místo N zadejte požadované číslo zprávy) %endif%%endif% %wrap%Můžete si vyžádat seznam častých otázek a odpovědí (FAQ) zasláním zprávy na adresu <$list+$faq@$domain$>. %wrap%Majitele konference je možné kontaktovat na adrese <$list+$owner@$domain$>. mlmmj-1.3.0/listtexts/cs/list000644 000765 000120 00000000721 12774207406 016077 0ustar00benadmin000000 000000 Subject: Přihlášení členové do $list$@$domain$ %text prologue% %wrap%Toto je seznam členů konference %iftype all% (bez rozdílů členství normal/digest/no-mail): %else% k verzi %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% této konference: %endif% %iftype all normal% %^%- %listsubs% %endif% %iftype all digest% %^%- %digestsubs% %endif% %iftype all nomail% %^%- %nomailsubs% %endif% mlmmj-1.3.0/listtexts/cs/moderate-post000644 000765 000120 00000002250 12774207406 017706 0ustar00benadmin000000 000000 Subject: Žádost o moderování $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%Zpráva od <$posteraddr$> s předmětem "$subject$" byla zaslána a nastal požadavek na moderování, %ifreason modnonsubposts% protože odesílatel není členem konference. %endif% %ifreason moderated% protože jde o moderovanou konferenci. %endif% %ifreason access% protože nastalo omezení přístupovými právy. %endif% Zpráva je uvedena níže. %wrap%K potvrzení a odeslání do konference zašlete zprávu na <$releaseaddr$>, což lze většinou udělat jen odpovědí na tento emailový požadavek. %wrap%Pokud nechcete zprávu odeslat, zašlete zprávu na <$rejectaddr$>, nebo prostě jednoduše tento email ignorujte. Následující moderátoři obrželi tento požadavek: - %moderators% --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.3.0/listtexts/cs/notify000644 000765 000120 00000002134 12774207406 016434 0ustar00benadmin000000 000000 %ifaction sub%Subject: Přihlášení do $list$@$domain$: $subaddr$%endif% %ifaction unsub%Subject: Odhlášení z $list$@$domain$: $subaddr$%endif% %text prologue% %ifaction sub% %^%%wrap%Adresa <$subaddr$> byla přihlášena do %iftype normal% normal %endif% %iftype digest% digest %endif% %iftype nomail% no-mail %endif% verze konference %ifreason request% z důvodu přijetí požadavku na přihlášení. %endif% %ifreason confirm% z důvodu potvrzení požadavku na přihlášení. %endif% %ifreason admin% z důvodu zadaní požadavku správcem. %endif% %ifreason permit% z důvodu povolení adminstrací listu. %endif% %endif% %ifaction unsub% %^%%wrap%Adresa <$subaddr$> byla odhlášena z konference %ifreason request% z důvodu přijetí požadavku na odhlášení. %endif% %ifreason confirm% z důvodu potvrzení požadavku na odhlášení. %endif% %ifreason admin% z důvodu zadání požadavku správcem. %endif% %ifreason bouncing% z důvodu nemožnosti odesílání po příliš dlohou dobu (bouncing). %endif% %endif% mlmmj-1.3.0/listtexts/cs/probe000644 000765 000120 00000000477 12774207406 016243 0ustar00benadmin000000 000000 Subject: Vracející se zprávy z $list$@$domain$ %text prologue% Některé zprávy vám nemohly být doručeny. Pokud jste obdržel/a tuto zpravu znamená to, že se vše vrátilo k normalnímu stavu a berte celou věc jen jako informaci. Zde je seznam nedoručených zpráv, které se vracely: - %bouncenumbers% mlmmj-1.3.0/listtexts/cs/prologue000644 000765 000120 00000000122 12774207406 016753 0ustar00benadmin000000 000000 %wrap%Dobrý den, zde je program Mlmmj spravující konferenci <$list$@$domain$>. mlmmj-1.3.0/listtexts/cs/wait-post000644 000765 000120 00000001760 12774207406 017057 0ustar00benadmin000000 000000 Subject: Čeká se na potvrzení $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%Zpráva od <$posteraddr$> s předmětem "$subject$" byla zaslána do konference. Moderátoři konference byli kontaktováni, aby tuto zprávu schválili před zasláním. %ifreason moderated% Důvodem je to, že tato konference je moderovaná. %endif% %ifreason access% Důvodem je nastavení přístupových práv ke konferenci. %endif% %ifreason modnonsubposts% Důvodem je, že nejste členem konference (nebo píšete zprávu z adresy, se kterou nejste v konferenci přihlášen). %endif% (Zpráva je uvedena níže.) --=_$random0$$random1$_= Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="message.eml" %originalmail% --=_$random0$$random1$_=-- mlmmj-1.3.0/listtexts/cs/wait-sub000644 000765 000120 00000000346 12774207406 016662 0ustar00benadmin000000 000000 Subject: Čeká se na povolení na přihlášení do $list$@$domain$ %text prologue% %wrap%Váš požadavek na přihlášení do konference byl přijat. Nyní se čeká na potvrzení schválení požadavku správci konference. mlmmj-1.3.0/listtexts/ast/confirm000644 000765 000120 00000003237 11746152500 016740 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.3.0/listtexts/ast/deny000644 000765 000120 00000004336 11746152500 016243 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.3.0/listtexts/ast/deny-post000644 000765 000120 00000003422 11746152500 017221 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.3.0/listtexts/ast/digest000644 000765 000120 00000000225 11746152500 016554 0ustar00benadmin000000 000000 Subject: Resume de $list$@$domain$ volume $digestissue$ ($digestinterval$) Asuntos (mensaxes del $digestfirst$ al $digestlast$): - %digestthreads% mlmmj-1.3.0/listtexts/ast/faq000644 000765 000120 00000000163 11746152500 016045 0ustar00benadmin000000 000000 Subject: Entrugues y rempuestes frecuentes de $list$@$domain$ Sentímoslo, entá nun hai denguna FAQ disponible. mlmmj-1.3.0/listtexts/ast/finish000644 000765 000120 00000002435 11746152500 016562 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.3.0/listtexts/ast/finish-sub000644 000765 000120 00000002315 11746152500 017346 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.3.0/listtexts/ast/gatekeep-sub000644 000765 000120 00000001072 11746152500 017652 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.3.0/listtexts/ast/help000644 000765 000120 00000005615 11746152500 016235 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.3.0/listtexts/ast/list000644 000765 000120 00000000676 11746152500 016262 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.3.0/listtexts/ast/moderate-post000644 000765 000120 00000002144 11746152500 020062 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.3.0/listtexts/ast/notify000644 000765 000120 00000002115 11746152500 016605 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.3.0/listtexts/ast/probe000644 000765 000120 00000000434 11746152500 016406 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.3.0/listtexts/ast/prologue000644 000765 000120 00000000132 11746152500 017126 0ustar00benadmin000000 000000 %wrap%Bones, esti ye'l programa Mlmmj xestionando la llista de corréu <$list$@$domain$>. mlmmj-1.3.0/listtexts/ast/wait-post000644 000765 000120 00000001520 11746152500 017223 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.3.0/listtexts/ast/wait-sub000644 000765 000120 00000000331 11746152500 017026 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.3.0/include/checkwait_smtpreply.h000644 000765 000120 00000002733 12774202071 020404 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_EHLO 2 #define MLMMJ_HELO 3 #define MLMMJ_FROM 4 #define MLMMJ_RCPTTO 5 #define MLMMJ_DATA 6 #define MLMMJ_DOT 7 #define MLMMJ_QUIT 8 #define MLMMJ_RSET 9 #include "mlmmj.h" char *checkwait_smtpreply(int sockfd, int replytype); #endif /* CHECK_REPLY_H */ mlmmj-1.3.0/include/chomp.h000644 000765 000120 00000002352 11414633670 015431 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.3.0/include/ctrlvalue.h000644 000765 000120 00000002570 11727635244 016334 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.3.0/include/ctrlvalues.h000644 000765 000120 00000002440 11414633670 016505 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.3.0/include/do_all_the_voodoo_here.h000644 000765 000120 00000003144 12774202071 021002 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 struct strlist *headers); void getinfo(const char *line, struct mailhdr *readhdrs); int do_all_the_voodoo_here(int infd, int outfd, int hdrfd, int footfd, const struct strlist *delhdrs, struct mailhdr *readhdrs, struct strlist *allhdrs, const char *subjectprefix); #endif /* DO_ALL_THE_VOODOO_HERE_H */ mlmmj-1.3.0/include/find_email_adr.h000644 000765 000120 00000002611 11414633670 017236 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.3.0/include/getaddrsfromfd.h000644 000765 000120 00000002473 11414633670 017322 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.3.0/include/gethdrline.h000644 000765 000120 00000002360 12774202071 016444 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,char **unfolded); #endif /* GETHDRLINE_H */ mlmmj-1.3.0/include/getlistaddr.h000644 000765 000120 00000002367 11414633670 016637 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.3.0/include/getlistdelim.h000644 000765 000120 00000002355 11414633670 017014 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.3.0/include/incindexfile.h000644 000765 000120 00000002371 11414633670 016765 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.3.0/include/init_sockfd.h000644 000765 000120 00000002432 11414633670 016616 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.3.0/include/itoa.h000644 000765 000120 00000002372 11414633670 015261 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.3.0/include/listcontrol.h000644 000765 000120 00000002702 11414633670 016676 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.3.0/include/log_error.h000644 000765 000120 00000002670 11727635244 016326 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.3.0/include/log_oper.h000644 000765 000120 00000002416 11414633670 016132 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.3.0/include/mail-functions.h000644 000765 000120 00000003706 12774202071 017254 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_ehlo(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.3.0/include/memory.h000644 000765 000120 00000003227 11414633670 015635 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.3.0/include/mlmmj-maintd.h000644 000765 000120 00000004353 11414633670 016714 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.3.0/include/mlmmj-process.h000644 000765 000120 00000002325 11414633670 017113 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.3.0/include/mlmmj-receive.h000644 000765 000120 00000002373 11727635244 017070 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.3.0/include/mlmmj-send.h000644 000765 000120 00000004711 12774202071 016364 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, const char *heloname); int endsmtp(int *sockfd); #endif /* MMJML_SEND_H */ mlmmj-1.3.0/include/mlmmj-sub.h000644 000765 000120 00000002333 11727635244 016233 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.3.0/include/mlmmj-unsub.h000644 000765 000120 00000002341 11727635244 016575 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.3.0/include/mlmmj.h000644 000765 000120 00000010233 12073747763 015447 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.3.0/include/mygetline.h000644 000765 000120 00000002541 11727635244 016326 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.3.0/include/mylocking.h000644 000765 000120 00000002367 11414633670 016325 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.3.0/include/prepstdreply.h000644 000765 000120 00000005530 11734220454 017056 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.3.0/include/remailfile.h000644 000765 000120 00000002404 11414633670 016432 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.3.0/include/send_digest.h000644 000765 000120 00000002503 11414633670 016611 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.3.0/include/send_help.h000644 000765 000120 00000002441 11734220454 016260 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.3.0/include/send_list.h000644 000765 000120 00000002414 11414633670 016306 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.3.0/include/statctrl.h000644 000765 000120 00000002370 11414633670 016163 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.3.0/include/strgen.h000644 000765 000120 00000003161 11727635244 015632 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.3.0/include/subscriberfuncs.h000644 000765 000120 00000002622 11734220454 017522 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.3.0/include/unistr.h000644 000765 000120 00000003667 11734220454 015656 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.3.0/include/wrappers.h000644 000765 000120 00000002571 11414633670 016171 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.3.0/contrib/amime-receive/000755 000765 000120 00000000000 12774177172 016707 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/foot_filter/000755 000765 000120 00000000000 12774202071 016476 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/Makefile.am000644 000765 000120 00000000204 12774202071 016212 0ustar00benadmin000000 000000 ## Process this file with automake to produce Makefile.in EXTRA_DIST = web amime-receive foot_filter pymime SUBDIRS = receivestrip mlmmj-1.3.0/contrib/Makefile.in000644 000765 000120 00000042034 13111411034 016215 0ustar00benadmin000000 000000 # Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 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) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-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_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in 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@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 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 foot_filter pymime 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 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ 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" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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 cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ 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: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic cscopelist-am ctags ctags-am \ 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-am uninstall uninstall-am .PRECIOUS: Makefile # 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.3.0/contrib/pymime/000755 000765 000120 00000000000 12774202071 015462 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/receivestrip/000755 000765 000120 00000000000 13111411144 016653 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/000755 000765 000120 00000000000 11727635244 014750 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/perl-admin/000755 000765 000120 00000000000 12774177172 017004 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/perl-user/000755 000765 000120 00000000000 12774177172 016672 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/php-admin/000755 000765 000120 00000000000 12774177172 016631 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/php-moderation/000755 000765 000120 00000000000 12774177173 017703 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/php-user/000755 000765 000120 00000000000 12774202062 016502 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/php-user/example.html000644 000765 000120 00000002035 11414633670 021026 0ustar00benadmin000000 000000 mlmmj-webinterface

subscribe


unsubscribe


mlmmj-1.3.0/contrib/web/php-user/mlmmj.php000644 000765 000120 00000007253 12774202062 020336 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.3.0/contrib/web/php-user/mlmmj.php.orig000644 000765 000024 00000007264 12721245111 021307 0ustar00benstaff000000 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 (preg_match(chr(7)."^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]+$".chr(7).'i', $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.3.0/contrib/web/php-user/README000644 000765 000120 00000002155 11414633670 017370 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.3.0/contrib/web/php-moderation/build-translations.sh000755 000765 000120 00000001533 11727635244 024055 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.3.0/contrib/web/php-moderation/dot.htaccess000644 000765 000120 00000000143 11727635244 022201 0ustar00benadmin000000 000000 Require valid-user AuthType Basic AuthName "mlmmj web-interface" AuthUserFile /home/mlmmj/htpasswd mlmmj-1.3.0/contrib/web/php-moderation/mlmmj-moderation.php000644 000765 000120 00000024241 11727635244 023665 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.3.0/contrib/web/php-moderation/mlmmj.css000644 000765 000120 00000001766 11727635244 021536 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.3.0/contrib/web/php-moderation/README000644 000765 000120 00000004513 11727635244 020561 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.3.0/contrib/web/php-moderation/translations/000755 000765 000120 00000000000 12774177173 022424 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/php-moderation/translations/dot.htaccess000644 000765 000120 00000000037 11727635244 024724 0ustar00benadmin000000 000000 Order Deny,Allow Deny from all mlmmj-1.3.0/contrib/web/php-moderation/translations/fr_FR.po000644 000765 000120 00000004653 11727635244 023765 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.3.0/contrib/web/php-admin/conf/000755 000765 000120 00000000000 12774202071 017541 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/php-admin/htdocs/000755 000765 000120 00000000000 12774202160 020077 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/php-admin/README000644 000765 000120 00000004174 11734220454 017502 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.3.0/contrib/web/php-admin/templates/000755 000765 000120 00000000000 12774177172 020627 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/php-admin/templates/edit.html000644 000765 000120 00000000452 11414633670 022431 0ustar00benadmin000000 000000 mlmmj config

mlmmj config

{ROWS}

Index

mlmmj-1.3.0/contrib/web/php-admin/templates/edit_boolean.html000644 000765 000120 00000000155 11414633670 024130 0ustar00benadmin000000 000000 {NICENAME}{TEXT} mlmmj-1.3.0/contrib/web/php-admin/templates/edit_list.html000644 000765 000120 00000000154 11414633670 023463 0ustar00benadmin000000 000000 {NICENAME}{TEXT} mlmmj-1.3.0/contrib/web/php-admin/templates/edit_string.html000644 000765 000120 00000000146 11414633670 024017 0ustar00benadmin000000 000000 {NICENAME}{TEXT} mlmmj-1.3.0/contrib/web/php-admin/templates/index.html000644 000765 000120 00000000142 11414633670 022607 0ustar00benadmin000000 000000 mlmmj config

mlmmj config

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

mlmmj config

{LIST} control values saved!

Index | {LIST}

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

{LIST} subscribers

{MESSAGE} {SUBS}
Add subscribers:

Index

mlmmj-1.3.0/contrib/web/php-admin/htdocs/class.rFastTemplate.php000644 000765 000120 00000122573 11727635244 024513 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.3.0/contrib/web/php-admin/htdocs/dot.htaccess000644 000765 000120 00000000143 11414633670 022406 0ustar00benadmin000000 000000 Require valid-user AuthType Basic AuthName "mlmmj web-interface" AuthUserFile /home/mlmmj/htpasswd mlmmj-1.3.0/contrib/web/php-admin/htdocs/edit.php000644 000765 000120 00000007227 11727635244 021557 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.3.0/contrib/web/php-admin/htdocs/index.php000644 000765 000120 00000003650 12774202062 021724 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.3.0/contrib/web/php-admin/htdocs/index.php.orig000644 000765 000024 00000003645 12721245472 022711 0ustar00benstaff000000 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 ($file[0] != '.') { $lists .= "

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

\n"; } } $tpl->assign(array("LISTS" => $lists)); $tpl->parse("MAIN","main"); $tpl->FastPrint("MAIN"); ?> mlmmj-1.3.0/contrib/web/php-admin/htdocs/save.php000644 000765 000120 00000006773 11727635244 021575 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.3.0/contrib/web/php-admin/htdocs/subscribers.php000644 000765 000120 00000007421 11734220454 023143 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.3.0/contrib/web/php-admin/conf/config.php000644 000765 000120 00000000177 11727635244 021535 0ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/php-admin/conf/tunables.pl000644 000765 000120 00000023450 12774202071 021717 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("modonlypost", "Moderators only post", "When this file is present, only people listed in listdir/control/moderators ". "are allowed to post to it. The check is made against the "From:" header."); mlmmj_boolean("modnonsubposts", "Moderate non-allowed posts", "If this option is set, postings from people who are not allowed to post ". "to the list will be moderated instead of denied."); mlmmj_string("modreqlife", "Moderation request lifetime", "This specifies how long in seconds a mail awaits moderation before it's ". "discarded. Defaults to 604800 seconds, which is 7 days."); 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", "This specifies how long 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("nomodonlydenymails", "No moderators only deny mails", "This switch turns off whether mlmmj sends out notification about postings ". "being rejected due to a moderators only posting list (see 'modonlypost')."); 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_string("smtphelo", "SMTP Helo Name", "When this file is present, it contains the hostname to send in the SMTP ". "EHLO or HELO command. Otherwise the machine hostname is used."); mlmmj-1.3.0/contrib/web/perl-user/config.pl000755 000765 000120 00000000121 11414633670 020457 0ustar00benadmin000000 000000 $topdir = "/var/spool/mlmmj"; $sendmail = "/usr/lib/sendmail"; $delimiter = "+"; mlmmj-1.3.0/contrib/web/perl-user/example.html000644 000765 000120 00000002157 11414633670 021206 0ustar00benadmin000000 000000 mlmmj-webinterface

subscribe


unsubscribe


mlmmj-1.3.0/contrib/web/perl-user/mlmmj.cgi000755 000765 000120 00000006261 11727635244 020476 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.3.0/contrib/web/perl-admin/conf/000755 000765 000120 00000000000 12774202071 017714 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/perl-admin/htdocs/000755 000765 000120 00000000000 12774177172 020270 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/perl-admin/README000644 000765 000120 00000005015 11727635243 017660 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.3.0/contrib/web/perl-admin/templates/000755 000765 000120 00000000000 12774177172 021002 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/web/perl-admin/templates/edit.html000644 000765 000120 00000000712 11727635243 022610 0ustar00benadmin000000 000000 mlmmj config

mlmmj config

Index | Subscribers | Edit texts

List: $LIST

$ROWS
mlmmj-1.3.0/contrib/web/perl-admin/templates/edit_boolean.html000644 000765 000120 00000000151 11414633670 024277 0ustar00benadmin000000 000000 $NICENAME$TEXT mlmmj-1.3.0/contrib/web/perl-admin/templates/edit_list.html000644 000765 000120 00000000145 11414633670 023636 0ustar00benadmin000000 000000 $NICENAME$TEXT mlmmj-1.3.0/contrib/web/perl-admin/templates/edit_string.html000644 000765 000120 00000000142 11414633670 024166 0ustar00benadmin000000 000000 $NICENAME$TEXT mlmmj-1.3.0/contrib/web/perl-admin/templates/edit_text.html000644 000765 000120 00000000700 11727635243 023651 0ustar00benadmin000000 000000 mlmmj config

mlmmj config

Index | Configuration | Subscribers

List: $LIST

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

mlmmj config

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

mlmmj config

$LIST control values saved!

Index | Configuration | Edit texts

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

mlmmj config

$LIST text values saved!

Index | Configuration | Edit texts

mlmmj-1.3.0/contrib/web/perl-admin/templates/subscribers.html000644 000765 000120 00000005437 11727635243 024222 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.3.0/contrib/web/perl-admin/templates/subscribers_row.html000644 000765 000120 00000000472 11414633670 025076 0ustar00benadmin000000 000000 $EMAIL mlmmj-1.3.0/contrib/web/perl-admin/htdocs/dot.htaccess000644 000765 000120 00000000143 11414633667 022567 0ustar00benadmin000000 000000 Require valid-user AuthType Basic AuthName "mlmmj web-interface" AuthUserFile /home/mlmmj/htpasswd mlmmj-1.3.0/contrib/web/perl-admin/htdocs/edit.cgi000755 000765 000120 00000006567 11414633667 021716 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.3.0/contrib/web/perl-admin/htdocs/edit_text.cgi000755 000765 000120 00000004600 11727635243 022743 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.3.0/contrib/web/perl-admin/htdocs/index.cgi000755 000765 000120 00000003560 11414633667 022066 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.3.0/contrib/web/perl-admin/htdocs/save.cgi000755 000765 000120 00000005366 11727635243 021722 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.3.0/contrib/web/perl-admin/htdocs/save_text.cgi000755 000765 000120 00000004534 11727635243 022762 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.3.0/contrib/web/perl-admin/htdocs/subscribers.cgi000755 000765 000120 00000017432 11727635243 023307 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.3.0/contrib/web/perl-admin/conf/config.pl000755 000765 000120 00000000106 11414633667 021527 0ustar00benadmin000000 000000 $topdir = "/var/spool/mlmmj"; $templatedir = "/home/mlmmj/templates"; mlmmj-1.3.0/contrib/web/perl-admin/conf/tunables.pl000644 000765 000120 00000023454 12774202071 022076 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("modonlypost", "Moderators only post", "When this file is present, only people listed in listdir/control/moderators ". "are allowed to post to it. The check is made against the "From:" header."); mlmmj_boolean("modnonsubposts", "Moderate non-allowed posts", "If this option is set, postings from people who are not allowed to post ". "to the list will be moderated instead of denied."); mlmmj_string("modreqlife", "Moderation request lifetime", "This specifies how long in seconds a mail awaits moderation before it's ". "discarded. Defaults to 604800 seconds, which is 7 days."); 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", "This specifies how long 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("nomodonlydenymails", "No moderators only deny mails", "This switch turns off whether mlmmj sends out notification about postings ". "being rejected due to a moderators only posting list (see 'modonlypost')."); 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_string("smtphelo", "SMTP Helo Name", "When this file is present, it contains the hostname to send in the SMTP ". "EHLO or HELO command. Otherwise the machine hostname is used."); mlmmj-1.3.0/contrib/receivestrip/Makefile.am000644 000765 000120 00000001101 13111407077 020712 0ustar00benadmin000000 000000 # AUTOMAKE_OPTIONS = foreign AM_CFLAGS = -g -Wall -pedantic -Wsign-compare -DDEFAULTTEXTDIR='"@textlibdir@"' -I$(srcdir)/../../include if WANT_RECEIVESTRIP bin_PROGRAMS = mlmmj-receive-strip endif MLMMJ_SOURCES = mlmmj_src/mygetline.c mlmmj_src/memory.c mlmmj_src/readn.c \ mlmmj_src/strgen.c mlmmj_src/random-int.c mlmmj_src/log_error.c \ mlmmj_src/print-version.c mlmmj_src/writen.c mlmmj_src/dumpfd2fd.c \ mlmmj_src/ctrlvalues.c mlmmj_src/chomp.c mlmmj_receive_strip_SOURCES = mlmmj-receive-strip.c $(MLMMJ_SOURCES) mlmmj_src/%.c: ln -s ../../../src/$*.c $@ mlmmj-1.3.0/contrib/receivestrip/Makefile.in000644 000765 000120 00000050303 13111411034 020717 0ustar00benadmin000000 000000 # Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 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) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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__dirstamp = $(am__leading_dot)dirstamp am__objects_1 = mlmmj_src/mygetline.$(OBJEXT) \ mlmmj_src/memory.$(OBJEXT) mlmmj_src/readn.$(OBJEXT) \ mlmmj_src/strgen.$(OBJEXT) mlmmj_src/random-int.$(OBJEXT) \ mlmmj_src/log_error.$(OBJEXT) \ mlmmj_src/print-version.$(OBJEXT) mlmmj_src/writen.$(OBJEXT) \ mlmmj_src/dumpfd2fd.$(OBJEXT) mlmmj_src/ctrlvalues.$(OBJEXT) \ mlmmj_src/chomp.$(OBJEXT) am_mlmmj_receive_strip_OBJECTS = mlmmj-receive-strip.$(OBJEXT) \ $(am__objects_1) mlmmj_receive_strip_OBJECTS = $(am_mlmmj_receive_strip_OBJECTS) mlmmj_receive_strip_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = 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) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = 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 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 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@"' -I$(srcdir)/../../include MLMMJ_SOURCES = mlmmj_src/mygetline.c mlmmj_src/memory.c mlmmj_src/readn.c \ mlmmj_src/strgen.c mlmmj_src/random-int.c mlmmj_src/log_error.c \ mlmmj_src/print-version.c mlmmj_src/writen.c mlmmj_src/dumpfd2fd.c \ mlmmj_src/ctrlvalues.c mlmmj_src/chomp.c mlmmj_receive_strip_SOURCES = mlmmj-receive-strip.c $(MLMMJ_SOURCES) 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 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_src/$(am__dirstamp): @$(MKDIR_P) mlmmj_src @: > mlmmj_src/$(am__dirstamp) mlmmj_src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) mlmmj_src/$(DEPDIR) @: > mlmmj_src/$(DEPDIR)/$(am__dirstamp) mlmmj_src/mygetline.$(OBJEXT): mlmmj_src/$(am__dirstamp) \ mlmmj_src/$(DEPDIR)/$(am__dirstamp) mlmmj_src/memory.$(OBJEXT): mlmmj_src/$(am__dirstamp) \ mlmmj_src/$(DEPDIR)/$(am__dirstamp) mlmmj_src/readn.$(OBJEXT): mlmmj_src/$(am__dirstamp) \ mlmmj_src/$(DEPDIR)/$(am__dirstamp) mlmmj_src/strgen.$(OBJEXT): mlmmj_src/$(am__dirstamp) \ mlmmj_src/$(DEPDIR)/$(am__dirstamp) mlmmj_src/random-int.$(OBJEXT): mlmmj_src/$(am__dirstamp) \ mlmmj_src/$(DEPDIR)/$(am__dirstamp) mlmmj_src/log_error.$(OBJEXT): mlmmj_src/$(am__dirstamp) \ mlmmj_src/$(DEPDIR)/$(am__dirstamp) mlmmj_src/print-version.$(OBJEXT): mlmmj_src/$(am__dirstamp) \ mlmmj_src/$(DEPDIR)/$(am__dirstamp) mlmmj_src/writen.$(OBJEXT): mlmmj_src/$(am__dirstamp) \ mlmmj_src/$(DEPDIR)/$(am__dirstamp) mlmmj_src/dumpfd2fd.$(OBJEXT): mlmmj_src/$(am__dirstamp) \ mlmmj_src/$(DEPDIR)/$(am__dirstamp) mlmmj_src/ctrlvalues.$(OBJEXT): mlmmj_src/$(am__dirstamp) \ mlmmj_src/$(DEPDIR)/$(am__dirstamp) mlmmj_src/chomp.$(OBJEXT): mlmmj_src/$(am__dirstamp) \ mlmmj_src/$(DEPDIR)/$(am__dirstamp) mlmmj-receive-strip$(EXEEXT): $(mlmmj_receive_strip_OBJECTS) $(mlmmj_receive_strip_DEPENDENCIES) $(EXTRA_mlmmj_receive_strip_DEPENDENCIES) @rm -f mlmmj-receive-strip$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mlmmj_receive_strip_OBJECTS) $(mlmmj_receive_strip_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f mlmmj_src/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlmmj-receive-strip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mlmmj_src/$(DEPDIR)/chomp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mlmmj_src/$(DEPDIR)/ctrlvalues.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mlmmj_src/$(DEPDIR)/dumpfd2fd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mlmmj_src/$(DEPDIR)/log_error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mlmmj_src/$(DEPDIR)/memory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mlmmj_src/$(DEPDIR)/mygetline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mlmmj_src/$(DEPDIR)/print-version.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mlmmj_src/$(DEPDIR)/random-int.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mlmmj_src/$(DEPDIR)/readn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mlmmj_src/$(DEPDIR)/strgen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mlmmj_src/$(DEPDIR)/writen.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ 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) -rm -f mlmmj_src/$(DEPDIR)/$(am__dirstamp) -rm -f mlmmj_src/$(am__dirstamp) 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) mlmmj_src/$(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) mlmmj_src/$(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 TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ 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 tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile mlmmj_src/%.c: ln -s ../../../src/$*.c $@ # 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.3.0/contrib/receivestrip/mlmmj-receive-strip.c000644 000765 000120 00000033033 11727635243 022737 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.3.0/contrib/receivestrip/mlmmj_src/000755 000765 000120 00000000000 13111411144 020636 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/receivestrip/README000644 000765 000120 00000002353 11727635243 017561 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.3.0/contrib/receivestrip/mlmmj_src/chomp.c000644 000765 000120 00000002667 11727635244 022147 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.3.0/contrib/receivestrip/mlmmj_src/ctrlvalues.c000644 000765 000120 00000004021 11727635244 023207 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.3.0/contrib/receivestrip/mlmmj_src/dumpfd2fd.c000644 000765 000120 00000003131 11414633671 022672 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.3.0/contrib/receivestrip/mlmmj_src/log_error.c000644 000765 000120 00000004111 11727635244 023015 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.3.0/contrib/receivestrip/mlmmj_src/memory.c000644 000765 000120 00000004315 11414633671 022334 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.3.0/contrib/receivestrip/mlmmj_src/mygetline.c000644 000765 000120 00000004054 11727635244 023026 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.3.0/contrib/receivestrip/mlmmj_src/print-version.c000644 000765 000120 00000002660 11414633671 023644 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.3.0/contrib/receivestrip/mlmmj_src/random-int.c000644 000765 000120 00000003615 11727635244 023103 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.3.0/contrib/receivestrip/mlmmj_src/readn.c000644 000765 000120 00000003247 11414633671 022120 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.3.0/contrib/receivestrip/mlmmj_src/strgen.c000644 000765 000120 00000016402 11727635244 022333 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.3.0/contrib/receivestrip/mlmmj_src/writen.c000644 000765 000120 00000003212 11414633671 022327 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.3.0/contrib/pymime/integration/000755 000765 000120 00000000000 12774202071 020005 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/pymime/LICENSE000644 000765 000120 00000104513 12774202071 016473 0ustar00benadmin000000 000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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 . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . mlmmj-1.3.0/contrib/pymime/README.md000644 000765 000120 00000002416 12774202071 016744 0ustar00benadmin000000 000000 pymime - A MIME formatter in python =================================== This program is designed to take a MIME-formatted email and do the following actions: - convert HTML-parts of singlepart-mails to plaintext - strip HTML-parts of multipart-mails - strip attachments - optionally append a footer to the mail - optionally add an X-Archived-At header for mail-archive.com Requirements ------------ Tested with python 2.6 and 2.7. Currently not compatible with python 3.X, as this would require dropping 2.6 support. Usage ----- Usage: pymime.py [options] Options: -h, --help show this help message and exit -i INPUT, --input=INPUT Where to read the mail from. Defaults to STDIN -o OUTPUT, --output=OUTPUT Where to write the transformed mail. Defaults to STDOUT -f FOOTER, --footer=FOOTER UTF-8 encoded footer to append to every mail. -k, --keep-going Ignore failures (ATM only missing footer file) as much as possible before failing. -a, --archive-header Add Archived-At header for mail-archive.com License ------- GPLv3 Source ------ https://github.com/tdf/pymime Bugs ---- https://github.com/tdf/pymime/issues Contact ------- alex@documentfoundation.orgmlmmj-1.3.0/contrib/pymime/src/000755 000765 000120 00000000000 12774202071 016251 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/pymime/src/pymime.py000755 000765 000120 00000027527 12774202071 020143 0ustar00benadmin000000 000000 #!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011 Alexander Werner # 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU 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 . """ This script takes a MIME-formatted email and does various transformations with it, e.g. converts HTML-mails to plain text mails and strips attachements. """ __version__="1.0.0" import HTMLParser, email, email.utils, sys from optparse import OptionParser # for archive-header import hashlib import base64 #------------------------------------------------------------------------------- # Configuration Options start here IGNORETAGS = ( "script", "head", "title", "link" ) MAP_STARTTAGS = {"li": "\n* ", "p": "\n"} MAP_ENDTAGS = { "p": "\n", "div": "\n", "h1": "\n==============================================================\n\n", "h2": "\n--------------------------------------------------------------\n\n", "h3": "\n", "h4": "\n", "h5": "\n", "h6": "\n"} MAXNUMNEWLINES = 2 # No Configuration beneath this line # ------------------------------------------------------------------------------- # Parse command line options parser = OptionParser() parser.add_option( "-i", "--input", dest = "input", default = "-", help = "Where to read the mail from. Defaults to STDIN" ) parser.add_option( "-o", "--output", dest = "output", default = "-", help = "Where to write the transformed mail. Defaults to STDOUT" ) parser.add_option( "-f", "--footer", dest = "footer", default = None, help = "UTF-8 encoded footer to append to every mail." ) parser.add_option( "-k", "--keep-going", dest = "keep_going", action = "store_true", default = False, help = "Ignore failures (ATM only missing footer file) as much as possible before failing." ) parser.add_option( "-a", "--archive-header", dest = "archive_header", action = "store_true", default = False, help = "Add Archived-At header for mail-archive.com" ) parser.add_option( "-V", "--version", dest = "print_version", action = "store_true", default = False, help = "Show version and exit" ) options, args = parser.parse_args() class StripHTML( HTMLParser.HTMLParser ): """ This class provides the necessary logic to convert HTML to plain text. """ def __init__( self ): self.reset() self.plain = [] self.last_starttag = None def handle_starttag( self, tag, attributes ): self.last_starttag = tag if tag in MAP_STARTTAGS: self.plain.append( MAP_STARTTAGS[tag] ) def handle_endtag( self, tag ): if tag in MAP_ENDTAGS.keys(): self.plain.append( MAP_ENDTAGS[tag] ) def handle_data( self, data ): if self.last_starttag not in IGNORETAGS: self.plain.append( data.strip() ) def remove_whitespace( self ): # Split at newlines instead of tags self.plain = "".join( self.plain ).split( "\n" ) numspace = 0 # Copy the whole text oldplain = self.plain[:] self.plain = [] for line in oldplain: if line.isspace() or line is "": numspace = numspace + 1 if numspace <= MAXNUMNEWLINES: # number of blank newlines is lower than limit, append line self.plain.append( "\n" ) else: numspace = 0 # line is no blank newline, append line self.plain.append( line ) def get_plain_data( self ): self.remove_whitespace() return "\n".join( self.plain ) class EMail( object ): """ This class represents an email or a single payload of a multipart email. """ def __init__( self, keep_going = False ): self.to_include = False self.keep_going = keep_going def feed( self, fp = None, string = None, message = None ): """ Feeds the EMail object with data. If fp is supplied, a new message will be created using email.message_from_file, if string is supplied, a new message will be created using email.message_from_string, if message is supplied, the supplied message will be used. """ if fp is not None: self.message = email.message_from_file( fp ) elif string is not None: self.message = email.message_from_string( string ) elif message is not None: self.message = message else: raise AttributeError def parse( self ): """ Parses the supplied message object. EMail.feed must have been called before. """ if self.message.is_multipart(): self.parse_multipart() else: self.parse_singlepart() def parse_multipart( self ): """ Parses a multipart message object. """ mails = [] #--------------------------------------------------------------------------- # Test if the message has a text/plain and a text/html part has_plaintext = False has_html = False for part in self.message.walk(): content_type = part.get_content_type() if content_type == "text/plain": has_plaintext = True if content_type == "text/html": has_html = True #--------------------------------------------------------------------------- # If the message has both text/plain and text/html parts, use the existing text/plain part # and dismiss all other parts if has_plaintext and has_html: for part in self.message.walk(): content_type = part.get_content_type() if content_type == "text/plain": mails.append( part ) #--------------------------------------------------------------------------- # Parse every part of the message for inclusion else: for part in self.message.walk(): # Avoid infinite recursion, message.walk also yields the parent message. if part.is_multipart(): continue # Parse the submessage mail = EMail() mail.feed( message = part ) mail.parse() # If the submessage contains useful data, append it to the final list of submessages if mail.to_include: mails.append( mail.message ) #--------------------------------------------------------------------------- # Test if at least one submessage survived the parsing if mails: # Delete the body from the message self.message.set_payload( None ) # Only one submessage to be included in the body, a restructuring of the parent # message is necessary. if len( mails ) == 1: mail = mails[0] # Copy the Headers from the submessage to the parent message for key in mail.keys(): del self.message[key] self.message[ key] = mail[key] # If the parent message is still multipart, the submessage didn't have a Content-Type # Header. Replace the old parent Content-Type with a default. if "multipart" in self.message.get_content_maintype(): del self.message["Content-Type"] self.message["Content-Type"] = "text/plain" # Copy the body from the submessage to teh parent message self.message.set_payload( mails[0].get_payload() ) # Multiple submessages are to be included, simply attach them. else: for mail in mails: self.message.attach( mail ) # No Message is to be included else: raise Exception def addArchiveHeader( self ): """ Add mail-archive.com direct-link to archive http://www.mail-archive.com/faq.html#listserver """ message_id = self.message['message-id'] list_post = email.utils.parseaddr(self.message['to']) if ( message_id is not None ) and ( list_post[1] is not '' ): # remove < and > from msg-id sha = hashlib.sha1( message_id[1:-1] ) sha.update( list_post[1] ) hash = base64.urlsafe_b64encode( sha.digest() ) url = "" % hash self.message['Archived-At'] = url # in case debugging is needed #self.message['X-Archived-At-msgid'] = message_id[1:-1] #self.message['X-Archived-At-list-post'] = list_post[1] def parse_singlepart( self ): """ Parses a singlepart message object. """ content_type = self.message.get_content_type() if content_type == "text/plain": # text/plain is fine, if I'm a submessage I want to be included self.to_include = True elif content_type == "text/html": # text/html must be stripped down to text/plain s = StripHTML() # Feed the HTML-Stripper with the body of the message s.feed( self.message.get_payload() ) # And set the body of the message to the output of the HTML-Stripper self.message.set_payload( s.get_plain_data() ) # if I'm a submessage I also want to be included self.to_include = True # rewrite the Content-Type header, im no longer an evil HTML mail :) self.message.set_type( "text/plain" ) def get_string( self ): """ Returns the string representation of the supplied message. """ return self.message.as_string() def append_footer_from_file( self, filename ): rawfooter = None footer = None orig_cs = self.message.get_content_charset() if orig_cs == None: cs = "iso-8859-15" orig_cs = "ascii" else: cs = orig_cs try: with open( filename ) as f: rawfooter = f.read() except: if not self.keep_going: raise if rawfooter: try: footer = rawfooter.decode( "utf-8" ).encode( cs ) except: cs = "utf-8" footer = rawfooter.decode( "utf-8" ).encode( cs ) if footer: sep = "\n" if footer.startswith( "\n" ): sep = "" payload = self.message.get_payload( decode = True ).decode( orig_cs ).encode( cs ) + sep + footer del self.message["MIME-Version"] del self.message["Content-Transfer-Encoding"] self.message.set_payload( payload, cs ) if __name__ == "__main__": if options.print_version: print("pymime "+__version__) exit() if options.input == "-": input = sys.stdin else: input = file( options.input ) if options.output == "-": output = sys.stdout else: output = file( options.output, "w" ) e = EMail( keep_going = options.keep_going ) e.feed( fp = input ) e.parse() if options.archive_header: e.addArchiveHeader() if options.footer: e.append_footer_from_file( options.footer ) output.write( e.get_string() ) output.close() mlmmj-1.3.0/contrib/pymime/src/test.eml000644 000765 000120 00000011213 12774202071 017725 0ustar00benadmin000000 000000 Message-ID: Date: Wed, 04 Apr 2000 04:17:00 +0200 From: MHTML MIME-Version: 1.0 To: mhtml@dsv.su.se Subject: Test message no. 17 (modification of no. 13) Content-Type: multipart/alternative; boundary="==boundary-2" --==boundary-2 This is test message no. 17 =========================== Here comes the red test image: ----------------------------- Here comes the yellow test image: -------------------------------- This is the last line of this test message. --==boundary-2 Content-Type: multipart/related; boundary="==boundary-1";type="text/html" Text displayed only to non-MIME-compliant mailers --==boundary-1 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Test message no. 17

This is test message no. 17

Here comes the red test image:

red test image

Here comes the yellow test image:

yellow test image

This is the last line of this test message. --==boundary-1 Content-Type: image/gif Content-ID: Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="red-test-image.gif" R0lGODlhdQAgAPcAAP//////zP//mf//Zv//M///AP/M///MzP/Mmf/MZv/MM//MAP+Z//+Z zP+Zmf+ZZv+ZM/+ZAP9m//9mzP9mmf9mZv9mM/9mAP8z//8zzP8zmf8zZv8zM/8zAP8A//8A zP8Amf8AZv8AM/8AAMz//8z/zMz/mcz/Zsz/M8z/AMzM/8zMzMzMmczMZszMM8zMAMyZ/8yZ zMyZmcyZZsyZM8yZAMxm/8xmzMxmmcxmZsxmM8xmAMwz/8wzzMwzmcwzZswzM8wzAMwA/8wA zMwAmcwAZswAM8wAAJn//5n/zJn/mZn/Zpn/M5n/AJnM/5nMzJnMmZnMZpnMM5nMAJmZ/5mZ zJmZmZmZZpmZM5mZAJlm/5lmzJlmmZlmZplmM5lmAJkz/5kzzJkzmZkzZpkzM5kzAJkA/5kA zJkAmZkAZpkAM5kAAGb//2b/zGb/mWb/Zmb/M2b/AGbM/2bMzGbMmWbMZmbMM2bMAGaZ/2aZ zGaZmWaZZmaZM2aZAGZm/2ZmzGZmmWZmZmZmM2ZmAGYz/2YzzGYzmWYzZmYzM2YzAGYA/2YA zGYAmWYAZmYAM2YAADP//zP/zDP/mTP/ZjP/MzP/ADPM/zPMzDPMmTPMZjPMMzPMADOZ/zOZ zDOZmTOZZjOZMzOZADNm/zNmzDNmmTNmZjNmMzNmADMz/zMzzDMzmTMzZjMzMzMzADMA/zMA zDMAmTMAZjMAMzMAAAD//wD/zAD/mQD/ZgD/MwD/AADM/wDMzADMmQDMZgDMMwDMAACZ/wCZ zACZmQCZZgCZMwCZAABm/wBmzABmmQBmZgBmMwBmAAAz/wAzzAAzmQAzZgAzMwAzAAAA/wAA zAAAmQAAZgAAM+4AAN0AALsAAKoAAIgAAHcAAFUAAEQAACIAABEAAADuAADdAAC7AACqAACI AAB3AABVAABEAAAiAAARAAAA7gAA3QAAuwAAqgAAiAAAdwAAVQAARAAAIgAAEe7u7t3d3bu7 u6qqqoiIiHd3d1VVVURERCIiIhEREQAAACH5BAAAAAAALAAAAAB1ACAAQAj/AP8JHEiwoMGD CBMqXMiwocOGIyJKnEixosWLGDNq3MixY0aBFKuJrBZypMiIJ0ekrLhSpUmSKEdObMkSpsuY OG/qTMnzJUWQHoMKHUq0KEagRpMqXaoUaU6dG2lKlOqRKtOkTq9q3VrV5sd/XMOKZZp1rNmz GsuiXct2hNq2cMVmXdkzZ12LLe/ehYrXpsy/MPUGHvw04lzCdhFbzasYMd+aUxsnnrzTq1uw cTN3tVrxrebPWDGDHr3UM+nTHE2jXn1RNevXEl3Dfi179urDJrte5BzVcknNhyNHZiyzJnGv uWMuppu7uHLkyV1Kxe1ccOGZ0Cn/xshcu8/K2g2LQ8bJGPJj4eh3+/WNHb118PAtBn8aXTrn 6s7tl2QP9b399fhNN55tbe31FYEITlRbgqAtyCBwAz5I20MUVmjhhRgyFBAAOw== --==boundary-1 Content-Type: image/gif Content-ID: Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="yellow-test-image.gif" R0lGODlhmAAgAPcAAP//////zP//mf//Zv//M///AP/M///MzP/Mmf/MZv/MM//MAP+Z//+Z zP+Zmf+ZZv+ZM/+ZAP9m//9mzP9mmf9mZv9mM/9mAP8z//8zzP8zmf8zZv8zM/8zAP8A//8A zP8Amf8AZv8AM/8AAMz//8z/zMz/mcz/Zsz/M8z/AMzM/8zMzMzMmczMZszMM8zMAMyZ/8yZ zMyZmcyZZsyZM8yZAMxm/8xmzMxmmcxmZsxmM8xmAMwz/8wzzMwzmcwzZswzM8wzAMwA/8wA zMwAmcwAZswAM8wAAJn//5n/zJn/mZn/Zpn/M5n/AJnM/5nMzJnMmZnMZpnMM5nMAJmZ/5mZ zJmZmZmZZpmZM5mZAJlm/5lmzJlmmZlmZplmM5lmAJkz/5kzzJkzmZkzZpkzM5kzAJkA/5kA zJkAmZkAZpkAM5kAAGb//2b/zGb/mWb/Zmb/M2b/AGbM/2bMzGbMmWbMZmbMM2bMAGaZ/2aZ zGaZmWaZZmaZM2aZAGZm/2ZmzGZmmWZmZmZmM2ZmAGYz/2YzzGYzmWYzZmYzM2YzAGYA/2YA zGYAmWYAZmYAM2YAADP//zP/zDP/mTP/ZjP/MzP/ADPM/zPMzDPMmTPMZjPMMzPMADOZ/zOZ zDOZmTOZZjOZMzOZADNm/zNmzDNmmTNmZjNmMzNmADMz/zMzzDMzmTMzZjMzMzMzADMA/zMA zDMAmTMAZjMAMzMAAAD//wD/zAD/mQD/ZgD/MwD/AADM/wDMzADMmQDMZgDMMwDMAACZ/wCZ zACZmQCZZgCZMwCZAABm/wBmzABmmQBmZgBmMwBmAAAz/wAzzAAzmQAzZgAzMwAzAAAA/wAA zAAAmQAAZgAAM+4AAN0AALsAAKoAAIgAAHcAAFUAAEQAACIAABEAAADuAADdAAC7AACqAACI AAB3AABVAABEAAAiAAARAAAA7gAA3QAAuwAAqgAAiAAAdwAAVQAARAAAIgAAEe7u7t3d3bu7 u6qqqoiIiHd3d1VVVURERCIiIhEREQAAACH5BAAAAAAALAAAAACYACAAQAj/AP8JHEiwoMGD CBMqXMiwocOHECMWmEixosWLGDNq3Mixo8ePIEN+FPixWrWKJlOenGgS5coCLWG+VKlSY0yW NCnW1PkS482YQFcGxUlU5s6MJEUqXcq0qdOnGpNCnUq1qlWlUm0K7emz502qX0WGvTo1K9mz aNOO7Wg2rdu3cDG2jUu3Ltm5dvPqZYp3r9+/G/u6/LmVp0vDMosO7Xo4sWPCGwmfTPm4cGXF XC0KbowZcdHLiNd6Br3YcUbIpC0vLi33H+DXbo+G3Ay7tl7atnPHxa27N1revoNXBS68uFPi xpOLRK68OVvXHFlfpIwz81PRHrGb9ku7tOyv4Kmnbu4avvxM8RbF50T//ajs1tnVW96OWnLO 015VW9def/791fPBFx9nBPbXGH/5RXaegqHp1xloz5XEVXsFogchfueZl55oBpp2n1H2ccSc c4BJ59GIJKZYEYoqqshiiyS+CGNzEdVo44045qhjQwEBADs= --==boundary-1-- --==boundary-2-- mlmmj-1.3.0/contrib/pymime/integration/mlmmj/000755 000765 000120 00000000000 12774202071 021121 5ustar00benadmin000000 000000 mlmmj-1.3.0/contrib/pymime/integration/mlmmj/mlmmj-pymime000644 000765 000120 00000001652 12774202071 023462 0ustar00benadmin000000 000000 #!/bin/bash MLMMJRECIEVE=/usr/bin/mlmmj-recieve PYMIME=/var/spool/mlmmj/pymime.py # check executables if ! [ -x $MLMMJRECIEVE ]; then echo "can't find $MLMMJRECIEVE executable, aborting" exit 1 fi if ! [ -x $PYMIME ]; then echo "can't find $PYMIME 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 # go to the mailinglist directory cd $MLPATH # pipe the calls $PYMIME | $MLMMJRECIEVE "$@" mlmmj-1.3.0/contrib/foot_filter/foot_filter.c000644 000765 000120 00000252614 12774202071 021170 0ustar00benadmin000000 000000 /* foot_filter.c (C) 2010 Ben Schmidt This Source Code Form is subject to the terms of the Mozilla Public License Version 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // Check out the -V option; it outputs this and more #define FOOT_FILTER_VERSION "foot_filter version 1.2, (C) 2010 Ben Schmidt" static const char * USAGE="\n\ usage: foot_filter [-p plain_footer_file] [-h html_footer_file]\n\ [{-P|-H} mime_footer_file] [-s]\n\ foot_filter -V\n\ \n\ plain_footer_file, if present, will be appended to mails with plain text\n\ sections only. Similarly, html_footer_file. If mime_footer_file (either\n\ plain, -P, or HTML, -H) is given, it will be used when a mail with\n\ alternative formats is encountered, or if the footer for the relevant\n\ type of mail is not present; a new MIME section will be added.\n\ \n\ -s turns on smart mode which endeavours to remove included/quoted copies of\n\ the (or a similar) footer by surrounding the footer with patterns it later\n\ recognises. It also endeavours to strip 'padding' surrounding the old\n\ footers to make things as clean as possible. This includes whitespace\n\ (including ' ' and '
'), '>' quoting characters, various pairs of\n\ HTML tags (p, blockquote, div, span, font; it's naive, it doesn't check\n\ tags in between are balanced at all, so in '

prefix

suffix

' the\n\ first and last tags are paired), and even horizontal rules when inside\n\ paired tags (e.g. use '

footer
'). If the smart strings are\n\ found in the footer, they won't be added by the program, so you have the\n\ necessary control to do this.\n\ \n\ New footers are added prior to trailing whitespace and a few closing html\n\ tags (body, html) as well. You almost certainly want to begin your footer\n\ with an empty line because of this.\n\ \n\ Since these alterations, by their very nature, break signed mail,\n\ signatures are removed while processing. To keep some value from signatures,\n\ have the MTA verify them and add a header (or even supply an alternative\n\ footer to this program), and resign them to authenticate they came from the\n\ mailing list directly after the signature verification was done and recorded.\n\ Or don't use these kinds of transformations at all.\n\ \n\ -V shows the version and exits.\n\ \n\ Program is running now. Send EOF or interrupt to stop it. To avoid this usage\n\ message if wanting to run without arguments, use '--' as an argument.\n\ \n"; /* This is a fairly simple program not expecting much extension. As such, some liberties have been taken and some fun has been had by the author. Correctness has been prioritised in design, but speed and efficiency have been taken into consideration and prioritised above readability and modularity and other such generally recommended programming practices. If making changes, great care should be taken to understand how and where (everywhere) globals are used before making them. Don't try to modify the program without understanding how the whole thing works together or you will get burnt. You have been warned. Relevant RFCs: http://www.ietf.org/rfc/rfc2015.txt http://www.ietf.org/rfc/rfc3851.txt http://www.ietf.org/rfc/rfc2045.txt http://www.ietf.org/rfc/rfc2046.txt http://www.ietf.org/rfc/rfc822.txt http://www.ietf.org/rfc/rfc2183.txt For program configuration, see the 'constants' section below. Also see code comments throughout. Future possibilities: - Saving copies of original mail in 'semi-temp' files for debugging. - Stripping attachments and save them (e.g. in a location that can become a 'files uploaded' section on a website). Replace them with links to the website, even. - Making the prefixes, suffixes, replacements, padding, guts, pairs, configurable at runtime. - Attaching signed mail, or wrapping in a multipart rather than removing signatures; wouldn't be hard if always using MIME footers. - Following a script to allow various other header transformations (addition, removal, etc.), or other transformations. - Prologues as well as or instead of footers. */ /* tag: includes */ #include #include #include #include #include #include #include #include /* tag: typedefs */ // splint has bools, but C doesn't! #ifndef S_SPLINT_S typedef int bool; #define false (0) #define true (1) #endif // This is mostly to be able to include splint annotations typedef /*@null@*//*@observer@*/ const char * const_null_string; typedef /*@null@*/ char * null_string; typedef /*@null@*//*@owned@*/ char * owned_null_string; typedef /*@null@*//*@dependent@*/ char * dependent_null_string; // 'Callbacks'; they communicate primarily using globals, see below typedef bool (*callback_t)(); typedef void (*function_t)(); // For fill() typedef enum { echo, encode, shunt, discard, stop, fail } when_full_t; // Various places typedef enum { unencoded, quoted_printable, base64 } encoding_t; // For returning multiple characters, and a request to delete backlog // when decoding typedef struct { int r; int c1; int c2; int c3; } decode_t; /* tag: constants */ /* tag: header_constants */ // How many MIME Content- headers we expect, maximum, in a mail. If we have // more than that, we won't be able to process MIME so well, but we won't fail // catastrophically. #define mime_headers_max 16 /* tag: footer_constants */ // Stuff for processing the footer's smart removal and (smart or not) // insertion static const char * plain_prefix = "------~----------"; static const char * plain_suffix = "------~~---------"; static const char * plain_replacement = "\r\n\r\n"; static const_null_string plain_tails[] = { " ","\t","\r","\n", NULL }; static const_null_string plain_padding[] = { ">"," ","\t","\r","\n", NULL }; static const_null_string plain_guts[] = { NULL }; static const_null_string plain_pairs[] = { NULL }; static const char * html_prefix = "------~----------"; static const char * html_suffix = "------~~---------"; static const char * html_replacement = "\r\n

\r\n"; static const_null_string html_tails[] = { "","","","", " "," ","&NBSP;","\t","\r","\n", "
","
","
","
","
","
", NULL }; static const_null_string html_padding[] = { ">",">", " "," ","&NBSP;","\t","\r","\n", "
","
","
","
","
","
", NULL }; static const_null_string html_guts[] = { // These are removed in an attempt to make a pair "
","
","
","
","
","
", " "," ","&NBSP;","\t","\r","\n", "
","
","
","
","
","
", NULL }; static const_null_string html_pairs[] = { // Closing part (or NULL to mark no more), end of opening part, // start of opening part, NULL // The search strategy is fairly naive; if it finds the closing part, // it checks for the end of the opening part; if it finds that, it // searches back for the first character of each of the opening part // variants, and if that character is found and is the beginning of the // whole variant, it removes the pair. "

",">","

","

",">","

","

",">","

","
",">","
","
",">","
","
",">","
","
",">","","",">","","",">","","",">","","0,"unexpected commandline argument"); // Load footers if (plain_footer_file!=NULL) load_footer(&plain_footer,&plain_footer_buffer, plain_footer_file, smart_footer?plain_prefix:NULL,smart_footer?plain_suffix:NULL); if (html_footer_file!=NULL) load_footer(&html_footer,&html_footer_buffer, html_footer_file, smart_footer?html_prefix:NULL,smart_footer?html_suffix:NULL); if (mime_footer_file!=NULL) load_footer(&mime_footer,&mime_footer_buffer, mime_footer_file,NULL,NULL); // Do the job process_section(true,true,NULL); // Finish if (plain_footer_buffer!=NULL) free(plain_footer_buffer); if (html_footer_buffer!=NULL) free(html_footer_buffer); if (mime_footer_buffer!=NULL) free(mime_footer_buffer); exit(EX_OK); } static void load_footer(/*@out@*//*@shared@*/ char ** footer, /*@reldef@*/ char ** footer_buffer, char * file, /*@unique@*/ const_null_string prefix, /*@unique@*/ const_null_string suffix) { FILE * f; int prefixl=0, footerl=0, suffixl=0; char * ff; if (prefix!=NULL&&suffix!=NULL) { prefixl=(int)strlen(prefix); suffixl=(int)strlen(suffix); } f=fopen(file,"r"); resort_to_errno(f==NULL,"error opening footer file",EX_NOINPUT); resort_to_errno(fseek(f,0,SEEK_END)!=0, "error seeking end of footer file",EX_IOERR); resort_to_errno((footerl=(int)ftell(f))==-1, "error finding footer length",EX_IOERR); resort_to_errno(fseek(f,0,SEEK_SET)!=0, "error seeking in footer file",EX_IOERR); // prefix, \n, footer, \n, suffix, \0 *footer_buffer=alloc_or_exit(sizeof(char)*(prefixl+footerl+suffixl+3)); *footer=*footer_buffer; *footer+=prefixl+1; resort_to_errno(fread(*footer,1,(size_t)footerl,f)<(size_t)footerl, "error reading footer",EX_IOERR); // We strip off a single trailing newline to keep them from accumulating // but to allow the user the option of adding them if desired if ((*footer)[footerl-1]=='\n') --footerl; (*footer)[footerl]='\0'; if (prefix==NULL||suffix==NULL) return; // Put in the prefix and suffix as necessary ff=strstr(*footer,prefix); if (ff!=NULL) { ff=strstr(ff,suffix); if (ff!=NULL) return; (*footer)[footerl]='\n'; ++footerl; strcpy(*footer+footerl,suffix); (*footer)[footerl+suffixl]='\0'; } else { ff=strstr(*footer,suffix); if (ff==NULL) { (*footer)[footerl]='\n'; ++footerl; strcpy(*footer+footerl,suffix); (*footer)[footerl+suffixl]='\0'; } *footer-=prefixl+1; strcpy(*footer,prefix); (*footer)[prefixl]='\n'; } } // Should be called with the boundary for the section as lookahead // in the buffer, but nothing more, and no lookbehind. static void process_section(bool add_footer, bool can_reenvelope, /*@null@*/ bool * parent_needs_footer) { char * external=NULL; char * internal=NULL; char * generated=NULL; bool reenveloping=false; bool child_needed_footer=false; bool needs_footer=false; bool unsigning=false; if (parent_needs_footer!=NULL) *parent_needs_footer=false; // The headers must be read, saved and echoed before making any // recursive calls, as I'm naughty and using globals. read_boundary(&external); read_and_save_mime_headers(); if (mime_bad) { // If an error, just resort to echoing echo_buffer(); // Boundary and headers // End headers with the extra line break resort_to_errno(putstr("\r\n")==EOF, "error echoing string",EX_IOERR); free_saved_mime_headers(); // Body echo_to_boundary(external); free(external); return; } // Headers determining we skip this section if (is_signature()) { skip_buffer(); // Boundary and headers skip_to_boundary(external); return; } // Header processing if (is_signed()) unsigning=true; if (unsigning) change_to_mixed(); if (add_footer&&mime_footer!=NULL&&( is_alternative()||(is_multipart(NULL)&&!is_mixed())|| (is_plain()&&plain_footer==NULL)|| (is_html()&&html_footer==NULL) )) { add_footer=false; if (can_reenvelope) { reenveloping=true; remove_mime_headers(); } else if (parent_needs_footer!=NULL) *parent_needs_footer=true; } // Headers echo_buffer(); // Boundary and possibly modified headers if (reenveloping) { generate_boundary(&generated); output_mime_mixed_headers(generated); output_prolog(); output_boundary(generated); output_saved_mime_headers(); } // End the headers with the extra line break resort_to_errno(putstr("\r\n")==EOF, "error echoing string",EX_IOERR); // Body processing if (is_multipart(&internal)) { // This branch frees the MIME headers before recursing. // Don't include the prolog if it used to be signed; // it usually says something like 'this message is signed' if (unsigning) { skip_to_boundary(internal); resort_to_errno(putstr("\r\n")==EOF, "error echoing string",EX_IOERR); } else { echo_to_boundary(internal); } // The recursive call needs these globals free_saved_mime_headers(); while (!at_final_boundary(internal)) { process_section(add_footer,false,&child_needed_footer); if (child_needed_footer) needs_footer=true; } if (needs_footer) output_mime_footer(internal); free(internal); echo_to_boundary(external); } else { // This branch frees the MIME headers at the end if (!is_attachment()&&( (is_plain()&&plain_footer!=NULL)|| (is_html()&&html_footer!=NULL))) { // alternatively // if (!is_attachment()&&( // (is_plain()&&((add_footer&&plain_footer!=NULL)||smart_footer))|| // (is_html()&&((add_footer&&html_footer!=NULL)||smart_footer)))) { if (is_plain()) { process_text_section(add_footer,plain_footer, plain_prefix,plain_suffix,plain_replacement, plain_tails,plain_padding,plain_guts,plain_pairs,external); } else { process_text_section(add_footer,html_footer, html_prefix,html_suffix,html_replacement, html_tails,html_padding,html_guts,html_pairs,external); } } else { echo_to_boundary(external); } free_saved_mime_headers(); } // MIME stuff is freed now; take care not to use it. /*@-branchstate@*/ if (reenveloping) { // We ensure generated is not null in another if(reenveloping) // conditional above /*@-nullpass@*/ output_mime_footer(generated); output_final_boundary(generated); free(generated); /*@=nullpass@*/ } /*@=branchstate@*/ free(external); } /* tag: header_functions */ static inline void read_and_save_mime_headers() { /*@-mustfreeonly@*/ mime_bad=false; // Mark current end of buffer buffer_mark=buffer_read; buffer_marked=true; for (;;) { do { // Extend current header until beginning of next callback_bool=false; (void)fill(until_eol,shunt); if (buffer_filled==buffer_read) { // We probably hit EOF; just get out, and the whole // mail will end up echoed out warning("unexpected end of input"); break; } (void)look(one_char,buffer_read,false); if (callback_int==(int)' '||callback_int==(int)'\t') { // Continuation of previous header; read it read_buffer(); continue; } // Start of new header; don't read it; process the old one // (from the mark to the end of the lookbehind) break; } while (true); // Process the old header, if there is one if (buffer_mark0) { if (*h=='\0') break; if (*h=='\\') { ++h; if (*h=='\0') break; } else if (*h=='(') ++levels; else if (*h==')') --levels; ++h; } if (!delimiting(*h,ext)&&!delimiting(*(hh-1),ext)) { // Put in some whitespace if something delimiting isn't // coming and hasn't just been *hh=' '; ++hh; } continue; } else if (*h=='"'||*h=='[') { if (*h=='[') close=']'; else close='"'; *hh=*h; ++h; ++hh; hhh=hh; while (*h!='\0'&&*h!=close) { if (*h=='\\') { *hh=*h; ++hh; ++h; if (*h=='\0') break; if (*h=='\r'&&*(h+1)=='\n') { *hh=*h; ++hh; ++h; *hh=*h; ++hh; ++h; if (*h=='\0') break; ++hh; ++h; continue; } } else if (*h==(char)8) { --hh; ++h; if (hh'||c=='@'|| c==','||c==';'||c==':'||c=='\\'||c=='"'|| c=='.'||c=='['||c==']'|| (ext&&(c=='/'||c=='='||c=='?'))); } static inline void remove_mime_headers() { int h; for (h=0;h0, "internal error: unexpected data in buffer",EX_SOFTWARE); set_decoding_type(); encoding=decoding; decode_and_read_to_boundary_encoding_when_full(boundary); if (smart_footer&&footer!=NULL) { // alternatively // if (smart_footer) { for (;;) { prefix_pos=pos_of(prefix,0,buffer_read); if (prefix_pos==EOF) break; suffix_pos=pos_of(suffix,prefix_pos,buffer_read); if (suffix_pos==EOF) break; for (;;) { later_prefix_pos= pos_of(prefix,prefix_pos+prefixl,suffix_pos-prefixl); if (later_prefix_pos!=EOF) prefix_pos=later_prefix_pos; else break; } suffix_pos+=suffixl; pad(padding,guts,pairs,&prefix_pos,&suffix_pos); replacement_starts[replacements_count]=prefix_pos; replacement_ends[replacements_count]=suffix_pos; // We may not want the last replacement so replace // with nothing first replacement_strings[replacements_count]=NULL; ++replacements_count; // We want the last replacement; encode it now before // doing any more encoding if (removed_footers) encode_string(replacement); encode_replacements(); removed_footers=true; } } if (*boundary!='\0'&&(decoding==quoted_printable||decoding==unencoded)) { // If we're not using base64 encoding, and we're in multipart, there // will be a final CRLF that is part of the input but logically part of // the boundary, not the text. Removing the footer may have already // removed it, so we need to check if it's here or not. if (buffer_read>1) { callback_compare="\r\n"; (void)look(comparing_head,buffer_read-2,false); callback_compare=NULL; if (callback_bool) boundary_newline=true; } } if (add_footer&&footer!=NULL) { // This will skip past the boundary newline mark_tail(tails); if (removed_footers&&buffer_mark==0) { // The last replacement coincides with where the footer // is going to go; don't use the replacement text. removed_footers=false; } } if (removed_footers) encode_string(replacement); if (add_footer&&footer!=NULL) { if (buffer_mark0) (void)empty(until_no_buffer); } static inline void echo_lookbehind() { make_replacements(echoing_one_char,echoing_until_start_marked); if (buffer_read>0) (void)empty(echoing_until_no_lookbehind); } static inline void encode_lookbehind() { make_replacements(encoding_one_char,encoding_until_start_marked); if (buffer_read>0) (void)empty(encoding_until_no_lookbehind); } static inline void encode_replacements() { make_replacements(encoding_one_char,encoding_until_start_marked); } static inline void make_replacements(callback_t one_char, callback_t start_marked) { int r, minr=0; const char * c; if (buffer_read==0) return; buffer_marked=false; while (replacements_count>0) { for (r=0;r0) (void)empty(start_marked); c = replacement_strings[minr]; if (c!=NULL) { while (*c!='\0') { buffer_char=(int)(unsigned int)*c; (void)(*one_char)(); ++c; } } buffer_marked=true; buffer_mark=replacement_ends[minr]; for (r=0;r0) (void)empty(until_start_marked); for (r=minr;r0) (void)empty(encoding_until_start_marked); } static inline void echo_disk_buffer() { if (disk_buffer_filled>0) (void)empty(echoing_until_no_disk_buffer); } static inline void encode_disk_buffer() { if (disk_buffer_filled>0) (void)empty(encoding_until_no_disk_buffer); } static inline void skip_disk_buffer() { if (disk_buffer_filled>0) (void)empty(until_no_disk_buffer); } static inline void read_boundary(/*@out@*/ char ** boundary) { int l=0; if (buffer_filled>buffer_read) { callback_bool=false; callback_int=0; resort_to_exit(!look(counting_until_eol,buffer_read,false), "internal error: missing eol at section boundary",EX_SOFTWARE); l=callback_int-2; // remove the CRLF, but keep the leading '--' } // Leave room to append a trailing '--' for testing final boundary; // the CRLF will be written in this space by saving_until_eol too. *boundary = alloc_or_exit(sizeof(char)*(l+3)); if (buffer_filled>buffer_read) { callback_bool=false; callback_save=*boundary; (void)look(saving_until_eol,buffer_read,false); callback_save=NULL; } (*boundary)[l]='\0'; if (buffer_filled>buffer_read) { callback_bool=false; (void)look(until_eol,buffer_read,true); } } static inline void echo_to_boundary(const char * boundary) { do { echo_buffer(); } while (!process_one_line_checking_boundary( echoing_n_chars,NULL,until_eol,echo,boundary)); } static inline void skip_to_boundary(const char * boundary) { do { skip_buffer(); } while (!process_one_line_checking_boundary( n_chars,NULL,until_eol,discard,boundary)); } static inline void decode_and_read_to_boundary_encoding_when_full( const char * boundary) { do { read_buffer(); } while (!process_one_line_checking_boundary( encoding_n_chars,decode_lookahead, decoding_until_eol,encode,boundary)); finish_decoding(); // This just sets state, doesn't change data } static inline bool process_one_line_checking_boundary(callback_t n_chars, /*@null@*/ function_t process, callback_t processing, when_full_t when_full, const char * boundary) { bool stopped_by_design; if (feof(stdin)!=0) { // We're done! Call it a boundary (even if it isn't--we need to // get out of loops cleanly and tidy up as best we can). return true; } // Empty until enough space for boundary if (mem_buffer_size-mem_buffer_filled<80) { callback_int=80-(mem_buffer_size-mem_buffer_filled); (void)empty(n_chars); } callback_bool=false; stopped_by_design=fill(until_eol,stop); if (stopped_by_design||feof(stdin)!=0) { if (buffer_filled-buffer_read==0) { return *boundary=='\0'; } callback_bool=false; if (*boundary!='\0') { // Can only be at a boundary without being at EOF if there // really is a boundary /*@-temptrans@*/ callback_compare=boundary; /*@=temptrans@*/ (void)look(comparing_head,buffer_read,false); callback_compare=NULL; } if (!callback_bool&&process!=NULL) (*process)(); return callback_bool; } else { // Line is too long to be a boundary, so must be decoded if (process!=NULL) (*process)(); callback_bool=false; (void)fill(processing,when_full); return false; } } // Return the position of text whose start may occur in the buffer // anywhere between from and (just before) to. Use EOF for from to // go from current location; use EOF for to to read indefinitely; // EOF is returned if text is not found. static int pos_of(const char * text,int from,int to) { int saved_buffer_read; int pos=EOF; if (*text=='\0') return from; saved_buffer_read=buffer_read; if (from!=EOF) buffer_read=from; callback_match=(int)(unsigned int)*text; for (;;) { if (to!=EOF) { callback_int=to-buffer_read; if (!look(n_chars_until_match,buffer_read,true)) break; } else { if (!look(until_match,buffer_read,true)) break; } if (!callback_bool) break; /*@-temptrans@*/ callback_compare=text+1; /*@=temptrans@*/ (void)look(comparing_head,buffer_read,false); callback_compare=NULL; if (callback_bool) { // Include the first character pos=buffer_read-1; break; } } buffer_read=saved_buffer_read; return pos; } // Look at characters in the buffer, starting at offset from, // 'reading' if so indicated (and looking at that location). // The callback is called after updating the reading pointer // and placing the character in the buffer. The character is // also passed by means of the buffer_char global. // EOF is sent to the callback when we run out of data. // There is no automatic attempt to fill the buffer. // The callback should return a boolean indicating whether // to continue. This function will return true if the callback // indicated to stop (including if it so indicated on EOF), or // false if it stopped for EOF. // We always call the callback at least once, so don't call // this function at all unless you definitely want to look // at something. static bool look(callback_t callback,int from,bool read) { int pos=from; int disk_buffer_pos; char * mem_buffer_pos; if (pos=mem_buffer_end) mem_buffer_pos-=mem_buffer_size; while (pos=disk_buffer_filled) { mem_buffer_pos=mem_buffer_next_empty+(pos-disk_buffer_filled); if (mem_buffer_pos>=mem_buffer_end) mem_buffer_pos-=mem_buffer_size; while (pos>=disk_buffer_filled) { buffer_char=(int)(unsigned int)*mem_buffer_pos; if (!(*callback)()) return true; --mem_buffer_pos; if (mem_buffer_pos==mem_buffer_start-1) mem_buffer_pos=mem_buffer_end-1; if (mark&&pos==buffer_mark) --buffer_mark; --pos; } } if (pos>=0&&disk_buffer_filled>0) { disk_buffer_pos=disk_buffer_start+pos; // Reading backwards in the disk buffer is potentially very nasty; // hopefully it never actually happens while (pos>=0) { /*@-nullpass@*/ resort_to_errno(fseek(disk_buffer,disk_buffer_pos,SEEK_SET)!=0, "error seeking in temporary file",EX_IOERR); disk_buffer_sought=disk_buffer_pos; buffer_char=getc(disk_buffer); /*@=nullpass@*/ resort_to_errno(buffer_char==EOF, "error reading temporary file",EX_IOERR); ++disk_buffer_sought; if (!(*callback)()) return true; --disk_buffer_pos; if (mark&&pos==buffer_mark) --buffer_mark; --pos; } } if (mark&&buffer_mark==-1) { buffer_mark=0; buffer_marked=false; } // We don't call the callback on EOF when going backwards // buffer_char=EOF; // (void)(*callback)(); return false; } // Remove characters from the (beginning of the) buffer. The same // general principles as for look() apply. The callback is called // after the character is removed and all accounting has been done, so // perhaps the only place you can reliably find the character is in // the buffer_char global. Again the callback gets an EOF call if // there's nothing more to empty, and no automatic filling is done. // The callback and function return values are as for look() and // again, the callback is always called at least once; this means at // least one character is always removed from the buffer, so only call // the function if something definitely should be removed. static bool empty(callback_t callback) { if (disk_buffer_filled>0) { if (disk_buffer_sought!=disk_buffer_start) { /*@-nullpass@*/ resort_to_errno(fseek(disk_buffer,disk_buffer_start,SEEK_SET)!=0, "error seeking in temporary file",EX_IOERR); /*@=nullpass@*/ disk_buffer_sought=disk_buffer_start; } while (disk_buffer_filled>0) { /*@-nullpass@*/ buffer_char=getc(disk_buffer); /*@=nullpass@*/ resort_to_errno(buffer_char==EOF, "error reading temporary file",EX_IOERR); ++disk_buffer_sought; ++disk_buffer_start; --disk_buffer_filled; --buffer_filled; if (buffer_read>0) --buffer_read; if (buffer_marked) { if (buffer_mark>0) --buffer_mark; else buffer_marked=false; } if (!(*callback)()) return true; } } while (mem_buffer_filled>0) { buffer_char=(int)(unsigned int)*mem_buffer_next_empty; ++mem_buffer_next_empty; if (mem_buffer_next_empty==mem_buffer_end) mem_buffer_next_empty=mem_buffer_start; --mem_buffer_filled; --buffer_filled; if (buffer_read>0) --buffer_read; if (buffer_marked) { if (buffer_mark>0) --buffer_mark; else buffer_marked=false; } if (!(*callback)()) return true; } buffer_char=EOF; if (!(*callback)()) return true; return false; } // Get more characters into the (end of the) buffer. The same // general principles as for look() apply. The callback is called // after the character is added and all accounting has been done, // gets the character via buffer_char, including an EOF when no more // input is available (EOF on stdin). It should return whether to get // more characters, and this function will return whether its exit was // requested by the callback or not (the callback may signal EOF is // an appropriate place to stop and we still return true). // When the buffer is full there are a number of automatic options // echo old the data to stdout or call encodechar for it one character // at a time; shunt a block off to disk, keeping mem_buffer_keep in // memory, discard it a character at a time, stop (and return false; // no EOF call is made), or fail (exit). Here 'full' is defined as // less than mem_buffer_margin of space after adding the most recent // character, so there is always a bit of space for callbacks to do // input transformations. Again, at least one character is always // added (if possible), and thus consumed from stdin, so only call this // if you really want to do that. static bool fill(callback_t callback, when_full_t when_full) { if (feof(stdin)!=0) { buffer_char=EOF; if (!(*callback)()) return true; return false; } for (;;) { /*@-infloops@*/ while (mem_buffer_filled>=mem_buffer_size-mem_buffer_margin) { switch (when_full) { case echo: if (disk_buffer_filled>0) echo_disk_buffer(); (void)empty(echoing_one_char); break; case encode: if (disk_buffer_filled>0) encode_disk_buffer(); (void)empty(encoding_one_char); break; case discard: if (disk_buffer_filled>0) skip_disk_buffer(); (void)empty(one_char); break; case shunt: shunt_to_disk(mem_buffer_filled-mem_buffer_keep); break; case stop: return false; case fail: default: resort_to_exit(true,"buffer full",EX_SOFTWARE); } } /*@=infloops@*/ buffer_char=get(); if (buffer_char==EOF) { resort_to_errno(ferror(stdin)!=0,"error reading input",EX_IOERR); if (!(*callback)()) return true; return false; } *mem_buffer_next_fill=(char)buffer_char; ++mem_buffer_next_fill; if (mem_buffer_next_fill==mem_buffer_end) mem_buffer_next_fill=mem_buffer_start; ++mem_buffer_filled; ++buffer_filled; if (!(*callback)()) return true; } } static inline void create_disk_buffer() { int fildes; fildes=mkstemp(disk_buffer_template); resort_to_errno(fildes==-1, "cannot create temporary file",EX_CANTCREAT); disk_buffer=fdopen(fildes,"rw"); resort_to_errno(disk_buffer==NULL, "cannot create temporary stream",EX_CANTCREAT); } static void remove_disk_buffer() { if (disk_buffer!=NULL) { resort_to_warning(fclose(disk_buffer)!=0, "error closing temporary file"); disk_buffer=NULL; resort_to_warning(unlink(disk_buffer_template)!=0, "error removing temporary file"); } } static inline void shunt_to_disk(int n) { if (disk_buffer==NULL) create_disk_buffer(); if (disk_buffer_sought!=disk_buffer_start+disk_buffer_filled) { disk_buffer_sought=disk_buffer_start+disk_buffer_filled; /*@-nullpass@*/ resort_to_errno(fseek(disk_buffer, disk_buffer_start+disk_buffer_filled,SEEK_SET)!=0, "cannot seek to end of temporary file",EX_IOERR); /*@=nullpass@*/ } while (n>0) { resort_to_exit(mem_buffer_filled==0, "internal error: shunting too much to disk",EX_SOFTWARE); /*@-nullpass@*/ resort_to_errno(putc(*mem_buffer_next_empty,disk_buffer)==EOF, "error writing to temporary file",EX_IOERR); /*@=nullpass@*/ ++disk_buffer_sought; ++disk_buffer_filled; ++mem_buffer_next_empty; if (mem_buffer_next_empty==mem_buffer_end) mem_buffer_next_empty=mem_buffer_start; --mem_buffer_filled; --n; } } /* tag: callback_functions */ static bool one_char() { callback_int=buffer_char; return false; } static bool echoing_one_char() { if (buffer_char!=EOF) { resort_to_errno(put(buffer_char)==EOF,"error echoing",EX_IOERR); } callback_int=buffer_char; return false; } static bool encoding_one_char() { if (buffer_char!=EOF) encodechar(buffer_char); callback_int=buffer_char; return false; } // Set up callback_int before using this. static bool n_chars() { return --callback_int>0; } // Set up callback_int before using this. static bool echoing_n_chars() { if (buffer_char!=EOF) { resort_to_errno(put(buffer_char)==EOF,"error echoing",EX_IOERR); } return --callback_int>0; } // Set up callback_int before using this. static bool encoding_n_chars() { if (buffer_char!=EOF) encodechar(buffer_char); return --callback_int>0; } // Set up callback_int and callback_save before using this. static bool saving_n_chars() { if (buffer_char!=EOF) *callback_save++=(char)buffer_char; // We don't actually need this, though it's a good idea, really! // *callback_save='\0'; return --callback_int>0; } // Set up callback_int and callback_match before using this. static bool n_chars_until_match() { callback_bool=buffer_char==callback_match; return --callback_int>0&&buffer_char!=callback_match; } // Do callback_bool=false before using this. static bool until_eol() { if (buffer_char==(int)'\n') return !callback_bool; callback_bool=buffer_char==(int)'\r'; return true; } // Do callback_bool=false before using this. /*static bool echoing_until_eol() { if (buffer_char!=EOF) { resort_to_errno(put(buffer_char)==EOF,"error echoing",EX_IOERR); } if (buffer_char==(int)'\n') return !callback_bool; callback_bool=buffer_char==(int)'\r'; return true; }*/ // Do callback_bool=false, callback_int=0 before using this. static bool counting_until_eol() { if (buffer_char!=EOF) ++callback_int; if (buffer_char==(int)'\n') return !callback_bool; callback_bool=buffer_char==(int)'\r'; return true; } // Do callback_bool=false and set up callback_save before using this. static bool saving_until_eol() { if (buffer_char!=EOF) *callback_save++=(char)buffer_char; // We don't actually need this, though it's a good idea, really! // *callback_save='\0'; if (buffer_char==(int)'\n') return !callback_bool; callback_bool=buffer_char==(int)'\r'; return true; } // Do callback_bool=false before using this. static bool decoding_until_eol() { // We decode as we fill and work directly in the buffer to make // the transformation. We are guaranteed enough space to do this by // mem_buffer_margin. decode_t decoded; decoded=decodechar(buffer_char); // We always remove the latest undecoded character from the // buffer. ++decoded.r; if (decoded.r>mem_buffer_filled) { // This will only happen for quoted-printable decoding // whitespace stripping, and we can just live with it // if we can't get rid of it all; with sensible constants // something really is disobeying MIME and probably SMTP // about line length anyway if this happens. warning("unable to strip all whitespace; not enough in memory"); decoded.r=mem_buffer_filled; } if (buffer_filled-decoded.r(int)'Z'||c2!=c1-(int)'A'+(int)'a')&& (c2<(int)'A'||c2>(int)'Z'||c1!=c2-(int)'A'+(int)'a')) { callback_bool=false; return false; } /*@-modobserver@*/ ++callback_compare; /*@=modobserver@*/ if (*callback_compare=='\0') { callback_bool=true; return false; } return true; /*@=nullderef@*/ } /* tag: encoding_functions */ static inline void encode_string(const char * s) { while (*s!='\0') { encodechar((int)(unsigned int)*s); s++; } } static void encodechar(int c) { if (encoding==unencoded) { if (c!=EOF) resort_to_errno(put(c)==EOF,"error encoding",EX_IOERR); return; } else if (encoding==quoted_printable) { if (encoding_echoed>=68) { // We need a soft line break, or are close enough to needing // one (76 chars max; unclear whether that counts the CRLF; and // we may output two 3 character sequences which we don't want // to follow with an unescaped CRLF). This scheme will probably // make mail look a bit awful, but that's fairly standard anyway, // and it shouldn't degrade. resort_to_errno(putstr("=\r\n")==EOF, "error encoding string",EX_IOERR); encoding_echoed=0; } if (encoding_filled==1) { // Whatever happens, we'll deal with this now encoding_filled=0; if (encoding_buffer[0]=='\r') { if (c==(int)'\n') { // Output them as is and we're done for now resort_to_errno(putstr("\r\n")==EOF, "error encoding string",EX_IOERR); encoding_echoed=0; return; } else { // Must encode the bare CR and continue as normal resort_to_errno(put((int)'=')==EOF,"error encoding",EX_IOERR); encode_hex_byte((unsigned int)'\r'); encoding_echoed+=3; } } else { // encoding_buffer[0] must be whitespace if (c==EOF||c==(int)'\r') { // Must encode it resort_to_errno(put((int)'=')==EOF,"error encoding",EX_IOERR); encode_hex_byte((unsigned int)encoding_buffer[0]); encoding_echoed+=3; } else { // It is fine to output it now as something else is coming resort_to_errno(put( (int)(unsigned int)encoding_buffer[0])==EOF, "error encoding",EX_IOERR); encoding_echoed+=1; } } } if ((c>=33&&c<=60)||(c>=62&&c<=126)) { resort_to_errno(put(c)==EOF,"error encoding",EX_IOERR); ++encoding_echoed; } else if (c==(int)' '||c==(int)'\t') { if (encoding_echoed>=55) { // My concession to readability; since it's likely to be // a big mess with a 68 character width, we might as well // break a bit earlier on a nice word boundary. And it'll // in fact look better if we break with roughly equal size // lines, assuming they come in at close to 76 characters // wide, so we might as well make a nice skinny column. // rather than a ragged one that uses the same amount of // space. Compromising between the two, then, as some // formats, like HTML, don't have many hard line breaks // anyway, is what we get. resort_to_errno(put(c)==EOF,"error encoding",EX_IOERR); resort_to_errno(putstr("=\r\n")==EOF, "error encoding string",EX_IOERR); encoding_echoed=0; } else { // Store it; we may need to encode it if it's at end of line encoding_filled=1; encoding_buffer[0]=(char)c; } } else if (c==(int)'\r') { // Store it; '\n' may be coming up encoding_filled=1; encoding_buffer[0]='\r'; } else if (c==EOF) { // No buffer, and we're done! Reset for another run. encoding_echoed=0; } else { // Anything else must be encoded as a sequence. resort_to_errno(put((int)'=')==EOF,"error encoding",EX_IOERR); encode_hex_byte((unsigned int)c); encoding_echoed+=3; } } else if (encoding==base64) { if (c==EOF) { // Reset for next run; we won't need it here encoding_echoed=0; if (encoding_filled==0) return; encoding_buffer[encoding_filled]='\0'; } else { encoding_buffer[encoding_filled++]=(char)c; } if (encoding_filled==3||c==EOF) { encode_64((((unsigned int)encoding_buffer[0]>>2)&0x3f)); encode_64((((unsigned int)encoding_buffer[0]&0x03)<<4)| (((unsigned int)encoding_buffer[1]>>4)&0x0f)); if (encoding_filled==1) { resort_to_errno(put((int)'=')==EOF,"error encoding",EX_IOERR); resort_to_errno(put((int)'=')==EOF,"error encoding",EX_IOERR); // Reset for next run encoding_filled=0; return; } encode_64((((unsigned int)encoding_buffer[1]&0x0f)<<2)| (((unsigned int)encoding_buffer[2]>>6)&0x03)); if (encoding_filled==2) { resort_to_errno(put((int)'=')==EOF,"error encoding",EX_IOERR); // Reset for next run encoding_filled=0; return; } encode_64((((unsigned int)encoding_buffer[2]&0x3f))); encoding_echoed+=4; if (encoding_echoed>=72) { resort_to_errno(putstr("\r\n")==EOF, "error encoding string",EX_IOERR); encoding_echoed=0; } encoding_filled=0; } } else { resort_to_exit(true,"internal error: unknown encoding",EX_SOFTWARE); } } static inline void finish_encoding() { encodechar(EOF); } // The function takes an input character c and returns up to four output // characters (a character will be EOF to indicate no further characters // to store; note that this doesn't mean there will be no more ever; only // if EOF is returned when EOF was input does it meant this), and a number // of characters to remove before adding the aforementioned characters. static decode_t decodechar(int c) { int h; unsigned int b1, b2, b3, b4; decode_t o; o.r=0; o.c1=EOF; o.c2=EOF; o.c3=EOF; if (decoding==unencoded) { o.c1=c; return o; } else if (decoding==quoted_printable) { // decoding_buffer may hold '=' and maybe a hex digit or a CR. if (decoding_filled==2) { // Whatever happens, it's all settled now. decoding_filled=0; if (decoding_buffer[1]=='\r') { if (c==(int)'\n') { return o; } // Invalid; leave as is--will be encoded later. o.c1=(int)'='; o.c2=(int)'\r'; o.c3=c; return o; } h=decode_hex(c); if (h==EOF) { // Invalid; leave as is--will be encoded later. o.c1=(int)'='; o.c2=(int)(unsigned int)decoding_buffer[1]; o.c3=c; return o; } // We have a full sequence representing a single character. o.c1=decode_hex((int)(unsigned int)decoding_buffer[1])*16+h; return o; } else if (decoding_filled==1) { if (c==(int)'\r'||decode_hex(c)!=EOF) { // Valid character after = decoding_filled=2; decoding_buffer[1]=(char)c; return o; } // Invalid; leave as is--will be encoded later. decoding_filled=0; o.c1=(int)'='; o.c2=c; return o; } else if (decoding_filled==0) { if (c==(int)'=') { // The first character can only ever be '=' so we // don't actually bother to store it; just say it's there. decoding_white=0; decoding_filled=1; return o; } // Keep track of whitespace. if (c==(int)' '||c==(int)'\t') ++decoding_white; else decoding_white=0; // Remove trailing whitespace. if (c==EOF||c==(int)'\r') { o.r=decoding_white; decoding_white=0; } // Otherwise we just keep it. If it's EOF, we're done. o.c1=c; return o; } else { warning("internal error: decoding buffer too full"); return o; } } else if (decoding==base64) { if (c==EOF) { // Just in case it was corrupted, make sure we're reset decoding_filled=0; return o; } if (c==(int)'='||decode_64(c)!=EOF) decoding_buffer[decoding_filled++]=(char)c; if (decoding_filled==4) { // We empty it whatever happens here decoding_filled=0; b1=(unsigned int)decode_64((int)decoding_buffer[0]); b2=(unsigned int)decode_64((int)decoding_buffer[1]); o.c1=(int)(((b1&0x3f)<<2)|((b2>>4)&0x03)); if (decoding_buffer[2]=='=') return o; b3=(unsigned int)decode_64((int)decoding_buffer[2]); o.c2=(int)(((b2&0x0f)<<4)|((b3>>2)&0x0f)); if (decoding_buffer[3]=='=') return o; b4=(unsigned int)decode_64((int)decoding_buffer[3]); o.c3=(int)(((b3&0x03)<<6)|(b4&0x3f)); } return o; } else { resort_to_exit(true,"internal error: unknown encoding",EX_SOFTWARE); // Never reached return o; } } static void decode_lookahead() { // Decoding will always shrink, so this is quite easy char * c; char * cc; decode_t decoded; int pos=buffer_read; int decpos=buffer_read; resort_to_exit(buffer_read=mem_buffer_end) c-=mem_buffer_size; cc=c; while (pos0) { resort_to_exit(decpos-decoded.r=(int)'0'&&c<=(int)'9') return c-(int)'0'; if (c>=(int)'A'&&c<=(int)'F') return c-(int)'A'+10; return EOF; } static inline int decode_64(int c) { if (c>=(int)'A'&&c<=(int)'Z') return c-(int)'A'; if (c>=(int)'a'&&c<=(int)'z') return c-(int)'a'+26; if (c>=(int)'0'&&c<=(int)'9') return c-(int)'0'+52; if (c==(int)'+') return 62; if (c==(int)'/') return 63; // if (c==(int)'=') return EOF; return EOF; } static inline void encode_hex_byte(unsigned int h) { int h1=(int)((h>>4)&0x0f); int h2=(int)(h&0x0f); if (h1<10) resort_to_errno(put((int)'0'+h1)==EOF,"error encoding",EX_IOERR); else if (h1<16) resort_to_errno(put((int)'A'+h1-10)==EOF,"error encoding",EX_IOERR); else resort_to_exit(true,"internal error: byte too large",EX_SOFTWARE); if (h2<10) resort_to_errno(put((int)'0'+h2)==EOF,"error encoding",EX_IOERR); else if (h2<16) resort_to_errno(put((int)'A'+h2-10)==EOF,"error encoding",EX_IOERR); else resort_to_exit(true,"internal error: byte too large",EX_SOFTWARE); } static inline void encode_64(unsigned int b) { if (b<26) resort_to_errno(put((int)'A'+b)==EOF,"error encoding",EX_IOERR); else if (b<52) resort_to_errno(put((int)'a'+b-26)==EOF,"error encoding",EX_IOERR); else if (b<62) resort_to_errno(put((int)'0'+b-52)==EOF,"error encoding",EX_IOERR); else if (b==62) resort_to_errno(put((int)'+')==EOF,"error encoding",EX_IOERR); else if (b==63) resort_to_errno(put((int)'/')==EOF,"error encoding",EX_IOERR); else resort_to_exit(true, "internal error: base64 value too large",EX_SOFTWARE); } /* tag: error_functions */ // Syslog constants: // level: LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, LOG_DEBUG // facility: LOG_MAIL, LOG_DAEMON, LOG_USER, LOG_LOCALn(0-7) static inline void * alloc_or_exit(size_t s) /*@allocates result@*/ { void * m; m=malloc(s); if (m==NULL) { #ifdef USE_STDERR fprintf(stderr,"foot_filter: %s\n","out of memory"); #endif #ifdef USE_SYSLOG syslog(LOG_ERR|LOG_MAIL,"%s\n","out of memory"); #endif exit(EX_OSERR); } return m; } static inline void /*noreturnwhentrue*/ resort_to_exit(bool when,const char * message,int status) { if (when) { #ifdef USE_STDERR fprintf(stderr,"foot_filter: %s\n",message); #endif #ifdef USE_SYSLOG syslog(LOG_ERR|LOG_MAIL,"%s\n",message); #endif exit(status); } } static inline void /*noreturnwhentrue*/ resort_to_errno(bool when,const char * message,int status) { if (when) { #ifdef USE_STDERR fprintf(stderr,"foot_filter: %s (%s)\n",message,strerror(errno)); #endif #ifdef USE_SYSLOG syslog(LOG_ERR|LOG_MAIL,"%s (%m)\n",message); #endif exit(status); } } static inline void resort_to_warning(bool when,const char * message) { if (when) warning(message); } static inline void warning(const char * message) { #ifdef USE_STDERR fprintf(stderr,"foot_filter: %s\n",message); #endif #ifdef USE_SYSLOG syslog(LOG_WARNING|LOG_MAIL,"%s\n",message); #endif } /* tag: helper_functions */ // The program was written following all the specs using CRLF for newlines, // but we get them from Postfix with LF only, so these wrapper functions // do the translation in such a way that it can easily be disabled if desired. static inline int get() { int c; #ifdef UNIX_EOL static bool got_nl=false; if (got_nl) { got_nl=false; return 10; } #endif c=getchar(); #ifdef UNIX_EOL if (c==10) { got_nl=true; return 13; } #endif return c; } static inline int put(int c) { #ifdef UNIX_EOL if (c==13) return c; #endif return putchar(c); } static inline int putstr(const char * s) { while (*s!='\0') if (put((int)(unsigned int)*s++)==EOF) return EOF; return 0; } static inline bool case_insensitively_heads(const char * head,const char * buffer) { const char * s1=head; const char * s2=buffer; for (;;) { if (*s1=='\0') return true; /* for equality return *s2=='\0'; */ else if (*s2=='\0') return false; if (*s1!=*s2&& (*s1<'A'||*s1>'Z'||*s2!=*s1-'A'+'a')&& (*s2<'A'||*s2>'Z'||*s1!=*s2-'A'+'a')) return false; ++s1; ++s2; } } mlmmj-1.3.0/contrib/foot_filter/Makefile000644 000765 000120 00000000611 12774202071 020134 0ustar00benadmin000000 000000 all: foot_filter dev: tags splint foot_filter .PHONY: splint clean clobber tags: foot_filter.c ctags --excmd=number '--regex-c=-/\*[[:blank:]]*tag:[[:blank:]]*([[:alnum:]_]+)-\1-' foot_filter.c splint: splint +unixlib -exitarg -initallelements foot_filter.c foot_filter: foot_filter.c gcc -Wall -g -o foot_filter foot_filter.c -O3 clean: -rm tags clobber: clean -rm foot_filter -rm test mlmmj-1.3.0/contrib/amime-receive/mlmmj-amime-receive000755 000765 000120 00000004211 11727635243 022450 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 "$@"