nullmailer-1.13/0000775000076400007640000000000012133011635010610 500000000000000nullmailer-1.13/nullmailer-1.13.spec0000664000076400007640000000466512133011635014143 00000000000000Name: nullmailer Summary: Simple relay-only mail transport agent Version: 1.13 Release: 1 License: GPL Group: Networking/Daemons Source: http://untroubled.org/nullmailer/archive/%{version}/nullmailer-%{version}.tar.gz BuildRoot: /tmp/nullmailer-root URL: http://untroubled.org/nullmailer/ Packager: Bruce Guenter Provides: smtpdaemon Conflicts: sendmail Conflicts: qmail Requires: supervise-scripts >= 3.2 Requires: gnutls BuildRequires: gnutls-devel PreReq: shadow-utils %description Nullmailer is a mail transport agent designed to only relay all its messages through a fixed set of "upstream" hosts. It is also designed to be secure. %prep %setup %build CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-tls make %install rm -fr $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/etc mkdir -p $RPM_BUILD_ROOT/usr/lib mkdir -p $RPM_BUILD_ROOT/var/nullmailer/service/log mkdir -p $RPM_BUILD_ROOT/var/log/nullmailer make DESTDIR=$RPM_BUILD_ROOT install-strip ln -s ../sbin/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail install scripts/nullmailer.run $RPM_BUILD_ROOT/var/nullmailer/service/run install scripts/nullmailer-log.run $RPM_BUILD_ROOT/var/nullmailer/service/log/run %clean rm -rf $RPM_BUILD_ROOT %pre PATH="/sbin:/usr/sbin:$PATH" export PATH if [ "$1" = 1 ]; then # pre-install instructions grep ^nullmail: /etc/group >/dev/null || groupadd -r nullmail grep ^nullmail: /etc/passwd >/dev/null || useradd -d /var/lock/svc/nullmailer -g nullmail -M -r -s /bin/true nullmail fi %post if ! [ -L /service/nullmailer ]; then svc-add /var/nullmailer/service nullmailer fi if ! [ -s /etc/nullmailer/me ]; then /bin/hostname --fqdn >/etc/nullmailer/me fi if ! [ -s /etc/nullmailer/defaultdomain ]; then /bin/hostname --domain >/etc/nullmailer/defaultdomain fi %preun if [ "$1" = 0 ]; then svc-remove nullmailer fi %postun if [ "$1" = 0 ]; then # post-erase instructions /usr/sbin/userdel nullmail /usr/sbin/groupdel nullmail fi %files %defattr(-,nullmail,nullmail) %doc AUTHORS BUGS ChangeLog COPYING INSTALL NEWS README TODO %dir /etc/nullmailer %attr(04711,nullmail,nullmail) /usr/bin/mailq /usr/bin/nullmailer-inject /usr/bin/nullmailer-smtpd /usr/lib/sendmail %dir /usr/libexec/nullmailer /usr/libexec/nullmailer/* %{_mandir}/*/* %attr(04711,nullmail,nullmail) /usr/sbin/nullmailer-queue /usr/sbin/nullmailer-send /usr/sbin/sendmail %dir /var/log/nullmailer /var/nullmailer nullmailer-1.13/Makefile.am0000664000076400007640000000167011723561630012601 00000000000000localstatedir = @localstatedir@/nullmailer sysconfdir = @sysconfdir@/nullmailer EXTRA_DIST = BUGS HOWTO INSTALL TODO scripts/* SUBDIRS = doc lib protocols src test install-data-local: @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(localstatedir)/queue chmod 700 $(DESTDIR)$(localstatedir)/queue $(mkinstalldirs) $(DESTDIR)$(localstatedir)/tmp chmod 700 $(DESTDIR)$(localstatedir)/tmp $(mkinstalldirs) $(DESTDIR)$(sysconfdir) $(RM) -f $(DESTDIR)$(localstatedir)/trigger mkfifo $(DESTDIR)$(localstatedir)/trigger chmod 600 $(DESTDIR)$(localstatedir)/trigger install-root: chown nullmail $(DESTDIR)$(localstatedir)/* chown nullmail $(DESTDIR)$(sbindir)/nullmailer-queue chmod u+s $(DESTDIR)$(sbindir)/nullmailer-queue chown nullmail $(DESTDIR)$(bindir)/mailq chmod u+s $(DESTDIR)$(bindir)/mailq dist-hook: sed -e s/@VERSION\@/@VERSION@/ \ $(distdir)/nullmailer-@VERSION@.spec find $(distdir)/scripts -name '*~' | xargs -r rm nullmailer-1.13/missing0000755000076400007640000002634411357655707012163 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: nullmailer-1.13/Makefile.in0000664000076400007640000004737712133011471012615 00000000000000# Makefile.in generated by automake 1.10.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ TODO depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ 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 = @MKDIR@ 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@ RANLIB = @RANLIB@ RM = @RM@ 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@ ac_ct_CXX = @ac_ct_CXX@ 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@/nullmailer 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@/nullmailer target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = BUGS HOWTO INSTALL TODO scripts/* SUBDIRS = doc lib protocols src test all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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 || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 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 $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -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__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__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) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__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: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { 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 config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 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-data-local 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 $(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: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-hook dist-lzma dist-shar dist-tarZ 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-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am install-data-local: @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(localstatedir)/queue chmod 700 $(DESTDIR)$(localstatedir)/queue $(mkinstalldirs) $(DESTDIR)$(localstatedir)/tmp chmod 700 $(DESTDIR)$(localstatedir)/tmp $(mkinstalldirs) $(DESTDIR)$(sysconfdir) $(RM) -f $(DESTDIR)$(localstatedir)/trigger mkfifo $(DESTDIR)$(localstatedir)/trigger chmod 600 $(DESTDIR)$(localstatedir)/trigger install-root: chown nullmail $(DESTDIR)$(localstatedir)/* chown nullmail $(DESTDIR)$(sbindir)/nullmailer-queue chmod u+s $(DESTDIR)$(sbindir)/nullmailer-queue chown nullmail $(DESTDIR)$(bindir)/mailq chmod u+s $(DESTDIR)$(bindir)/mailq dist-hook: sed -e s/@VERSION\@/@VERSION@/ \ $(distdir)/nullmailer-@VERSION@.spec find $(distdir)/scripts -name '*~' | xargs -r rm # 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: nullmailer-1.13/COPYING0000444000076400007640000004311010703056325011564 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) 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 this service 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 make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. 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. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the 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 a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE 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. 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 convey 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 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision 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, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This 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 Library General Public License instead of this License. nullmailer-1.13/install-sh0000755000076400007640000001273610251414433012545 00000000000000#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # 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. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # 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 $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 nullmailer-1.13/TODO0000664000076400007640000000300012120374621011214 00000000000000- Add support for SMTP AUTH CRAM-MD5 - Convert all proto modules to use timedout reads. - Add patterns to the remotes file, to allow messages to be delivered to different remotes based on the sender or recipient addresses - Remove "adminaddr" facility from -queue, and add a more general destination address rewriting facility to -inject: - Read a list containing "PATTERN:ADDRESS" lines. - PATTERN can be a literal "user@FQDN" or just "user", in which case it must be matched exactly (before qualification). - PATTERN can be "@FQDN" which matches any user. - For version 1.5: - New program: nullmailer-bounce reads a queued message on stdin, writes a bounce on stdout - New program: nullmailer-ddn reads a queued message on stdin, writes a DDN on stdout - Generate bounces for permanently failed messages. - Generate DDNs for messages older than a configurable time. - Generate bounces for temporarily failing messages after a configurable time. - Queue bounce from <> to sender - Queue double bounce from <#@[]> to doublebounceto or adminaddr - Optionally move bounces to a seperate directory - Move triple bounces to a seperate directory - For version 2: three-state queueing - Queue message partially (tmp -> holding) - Send to smarthost immediately - Remove from holding if sending succeeds - Complete queueing (holding -> queue) if sending is deferred - Return with an error if sending fails (permanently) - Move all from holding -> queue on startup of nullmailer-send nullmailer-1.13/test/0000775000076400007640000000000012133011635011567 500000000000000nullmailer-1.13/test/Makefile.am0000644000076400007640000000175211765446337013573 00000000000000noinst_PROGRAMS = address-test clitest0 clitest1 EXTRA_DIST = address-trace.cc clitest.cc clitest.sh INCLUDES = -I../lib address_test_SOURCES = address-test.cc # address-trace.cc address_test_LDADD = ../lib/libnullmailer.a clitest0_CPPFLAGS = -DCLI_ONLY_LONG=false clitest0_SOURCES = clitest.cc clitest0_LDADD = ../lib/libnullmailer.a ../lib/cli++/libcli++.a clitest1_CPPFLAGS = -DCLI_ONLY_LONG=true clitest1_SOURCES = clitest.cc clitest1_LDADD = ../lib/libnullmailer.a ../lib/cli++/libcli++.a # The following makes sure that we can't produce a package without the # tests executing properly dist-hook: test cp -r tests $(distdir) test: all ./address-test sh clitest.sh @failed=0; \ for test in `find tests -type f -not -name '.*.swp'`; do \ echo Running test $$test...; \ if env - SYSCONFDIR=$(sysconfdir)/nullmailer bash $$test; \ then echo 'Done.'; \ else echo '******************************Failed!******************************'; failed=1; \ fi; \ done 2>&1; exit $$failed nullmailer-1.13/test/Makefile.in0000664000076400007640000004201212133011471013551 00000000000000# Makefile.in generated by automake 1.10.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@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 = : noinst_PROGRAMS = address-test$(EXEEXT) clitest0$(EXEEXT) \ clitest1$(EXEEXT) subdir = test DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) am_address_test_OBJECTS = address-test.$(OBJEXT) address_test_OBJECTS = $(am_address_test_OBJECTS) address_test_DEPENDENCIES = ../lib/libnullmailer.a am_clitest0_OBJECTS = clitest0-clitest.$(OBJEXT) clitest0_OBJECTS = $(am_clitest0_OBJECTS) clitest0_DEPENDENCIES = ../lib/libnullmailer.a ../lib/cli++/libcli++.a am_clitest1_OBJECTS = clitest1-clitest.$(OBJEXT) clitest1_OBJECTS = $(am_clitest1_OBJECTS) clitest1_DEPENDENCIES = ../lib/libnullmailer.a ../lib/cli++/libcli++.a DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(address_test_SOURCES) $(clitest0_SOURCES) \ $(clitest1_SOURCES) DIST_SOURCES = $(address_test_SOURCES) $(clitest0_SOURCES) \ $(clitest1_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ 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 = @MKDIR@ 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@ RANLIB = @RANLIB@ RM = @RM@ 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@ ac_ct_CXX = @ac_ct_CXX@ 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@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = address-trace.cc clitest.cc clitest.sh INCLUDES = -I../lib address_test_SOURCES = address-test.cc # address-trace.cc address_test_LDADD = ../lib/libnullmailer.a clitest0_CPPFLAGS = -DCLI_ONLY_LONG=false clitest0_SOURCES = clitest.cc clitest0_LDADD = ../lib/libnullmailer.a ../lib/cli++/libcli++.a clitest1_CPPFLAGS = -DCLI_ONLY_LONG=true clitest1_SOURCES = clitest.cc clitest1_LDADD = ../lib/libnullmailer.a ../lib/cli++/libcli++.a all: all-am .SUFFIXES: .SUFFIXES: .cc .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) --gnu test/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) address-test$(EXEEXT): $(address_test_OBJECTS) $(address_test_DEPENDENCIES) @rm -f address-test$(EXEEXT) $(CXXLINK) $(address_test_OBJECTS) $(address_test_LDADD) $(LIBS) clitest0$(EXEEXT): $(clitest0_OBJECTS) $(clitest0_DEPENDENCIES) @rm -f clitest0$(EXEEXT) $(CXXLINK) $(clitest0_OBJECTS) $(clitest0_LDADD) $(LIBS) clitest1$(EXEEXT): $(clitest1_OBJECTS) $(clitest1_DEPENDENCIES) @rm -f clitest1$(EXEEXT) $(CXXLINK) $(clitest1_OBJECTS) $(clitest1_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/address-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clitest0-clitest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clitest1-clitest.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` clitest0-clitest.o: clitest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clitest0_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT clitest0-clitest.o -MD -MP -MF $(DEPDIR)/clitest0-clitest.Tpo -c -o clitest0-clitest.o `test -f 'clitest.cc' || echo '$(srcdir)/'`clitest.cc @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/clitest0-clitest.Tpo $(DEPDIR)/clitest0-clitest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='clitest.cc' object='clitest0-clitest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clitest0_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o clitest0-clitest.o `test -f 'clitest.cc' || echo '$(srcdir)/'`clitest.cc clitest0-clitest.obj: clitest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clitest0_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT clitest0-clitest.obj -MD -MP -MF $(DEPDIR)/clitest0-clitest.Tpo -c -o clitest0-clitest.obj `if test -f 'clitest.cc'; then $(CYGPATH_W) 'clitest.cc'; else $(CYGPATH_W) '$(srcdir)/clitest.cc'; fi` @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/clitest0-clitest.Tpo $(DEPDIR)/clitest0-clitest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='clitest.cc' object='clitest0-clitest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clitest0_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o clitest0-clitest.obj `if test -f 'clitest.cc'; then $(CYGPATH_W) 'clitest.cc'; else $(CYGPATH_W) '$(srcdir)/clitest.cc'; fi` clitest1-clitest.o: clitest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clitest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT clitest1-clitest.o -MD -MP -MF $(DEPDIR)/clitest1-clitest.Tpo -c -o clitest1-clitest.o `test -f 'clitest.cc' || echo '$(srcdir)/'`clitest.cc @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/clitest1-clitest.Tpo $(DEPDIR)/clitest1-clitest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='clitest.cc' object='clitest1-clitest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clitest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o clitest1-clitest.o `test -f 'clitest.cc' || echo '$(srcdir)/'`clitest.cc clitest1-clitest.obj: clitest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clitest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT clitest1-clitest.obj -MD -MP -MF $(DEPDIR)/clitest1-clitest.Tpo -c -o clitest1-clitest.obj `if test -f 'clitest.cc'; then $(CYGPATH_W) 'clitest.cc'; else $(CYGPATH_W) '$(srcdir)/clitest.cc'; fi` @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/clitest1-clitest.Tpo $(DEPDIR)/clitest1-clitest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='clitest.cc' object='clitest1-clitest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clitest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o clitest1-clitest.obj `if test -f 'clitest.cc'; then $(CYGPATH_W) 'clitest.cc'; else $(CYGPATH_W) '$(srcdir)/clitest.cc'; fi` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstPROGRAMS 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-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: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstPROGRAMS ctags dist-hook distclean \ distclean-compile 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 maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am # The following makes sure that we can't produce a package without the # tests executing properly dist-hook: test cp -r tests $(distdir) test: all ./address-test sh clitest.sh @failed=0; \ for test in `find tests -type f -not -name '.*.swp'`; do \ echo Running test $$test...; \ if env - SYSCONFDIR=$(sysconfdir)/nullmailer bash $$test; \ then echo 'Done.'; \ else echo '******************************Failed!******************************'; failed=1; \ fi; \ done 2>&1; exit $$failed # 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: nullmailer-1.13/test/clitest.cc0000664000076400007640000000216111765711746013511 00000000000000#include "cli++/cli++.h" #include "fdbuf/fdbuf.h" const char* cli_program = "clitest"; const char* cli_help_prefix = "Nullmailer CLI test harness\n"; const char* cli_help_suffix = 0; const char* cli_args_usage = "[args]"; const int cli_args_min = 0; const int cli_args_max = -1; const bool cli_only_long = CLI_ONLY_LONG; static int a = 0; static int b = 0; static const char* c = 0; static const char* d = 0; cli_option cli_options[] = { { 'a', 0, cli_option::flag, 1, &a, "Test flag", 0 }, { 0, "bb", cli_option::flag, 1, &b, "Test flag", 0 }, { 'c', 0, cli_option::string, 1, &c, "Test string", 0 }, { 0, "dd", cli_option::string, 1, &d, "Test string", 0 }, CLI_OPTION_END }; static void showcstr(const char* name, const char* value) { fout << ' ' << name; if (value == NULL) fout << "=NULL"; else fout << "=\"" << value << "\""; } int cli_main(int argc, char* argv[]) { fout << "argc=" << argc << " a=" << a << " b=" << b; showcstr("c", c); showcstr("d", d); fout << endl; for (int i = 0; i < argc; i++) fout << "argv[" << i << "]=\"" << argv[i] << "\"" << endl; return 0; } nullmailer-1.13/test/clitest.sh0000664000076400007640000000274511765725441013543 00000000000000tmp=$PWD/clitest.tmp trap 'rm -f ${tmp}*' EXIT testit() { test "x$1" = 'x!' && isfailed='-eq 0' || isfailed='-ne 0' "$@" >$tmp.out 2>/dev/null if [ $? $isfailed ] then echo "Test \"$*\" failed!" exit 1 fi if [ "x$1" != 'x!' ] then cat >$tmp.exp if ! diff -u $tmp.exp $tmp.out then echo "Test \"$*\" failed!" exit 1 fi fi } testit ./clitest0 < #include "canonicalize.h" #include "mystring/mystring.h" #include "address.h" #include "fdbuf/fdbuf.h" #include "itoa.h" static bool test(const mystring& in, const mystring& out, const mystring& list) { mystring line = in; mystring tmplist; if(!parse_addresses(line, tmplist)) { fout << "Parsing of '" << in << "' failed." << endl; return false; } bool status = true; if(!!list && tmplist != list) { fout << "Parsing of '" << in << "' failed: bad result list, was:\n" << tmplist << "should be:\n" << list; status = false; } if(!!out && line != out) { fout << "Parsing of '" << in << "' failed: bad result string, was:\n" << line << "\nshould be:\n" << out << "\n"; status = false; } return status; } #define TEST(X,Y,Z) do{ ++count; if(!test(X,Y,Z)) ++failed; }while(0) mystring defaulthost = "a"; mystring defaultdomain = "b.c"; int main() { int count = 0; int failed = 0; // empty list TEST("", "", ""); // empty list with comment TEST("(no addresses)", "(no addresses)", ""); // periods in local TEST("a.b@c.d", "a.b@c.d", "a.b@c.d\n"); // quoted local TEST("\"e\"@c.d", "e@c.d", "e@c.d\n"); // missing host and domain TEST("e", "e@a.b.c", "e@a.b.c\n"); // missing domain TEST("e@x", "e@x.b.c", "e@x.b.c\n"); // trailing period TEST("e@c.d.", "e@c.d.", "e@c.d.\n"); // trailing period, single domain TEST("e@c.", "e@c.", "e@c.\n"); // comment
style TEST("x", "x ", "y@a.b\n"); TEST("", "", "y@a.b\n"); // address (comment) style TEST("y@a.b(x)", "y@a.b (x)", "y@a.b\n"); // internal comments before local TEST("(j)y@a.b", "y@a.b (j)", "y@a.b\n"); // internal comments after local TEST("y(j)@a.b", "y@a.b (j)", "y@a.b\n"); // internal comments before domain TEST("y@(j)a.b", "y@a.b (j)", "y@a.b\n"); // internal comments before period TEST("y@a(j).b", "y@a.b (j)", "y@a.b\n"); // internal comments after period TEST("y@a.(j)b", "y@a.b (j)", "y@a.b\n"); // normal list TEST("a@b.c,d@e.f", "a@b.c, d@e.f", "a@b.c\nd@e.f\n"); // list with comments TEST("a@b.c(j),d@e.f(k)", "a@b.c (j), d@e.f (k)", "a@b.c\nd@e.f\n"); // list without commas TEST("a@b.c d@e.f", "a@b.c, d@e.f", "a@b.c\nd@e.f\n"); // list without commas with comments TEST("a@b.c(j) d@e.f(k)", "a@b.c (j), d@e.f (k)", "a@b.c\nd@e.f\n"); // simple group TEST("g: a@b.c, d@e.f;", "g: a@b.c, d@e.f;", "a@b.c\nd@e.f\n"); // group with spaces in name TEST("g h: a@b.c, d@e.f;", "g h: a@b.c, d@e.f;", "a@b.c\nd@e.f\n"); // empty group TEST("g: ;", "g: ;", ""); // group with a comment TEST("g: a@b.c(j);", "g: a@b.c (j);", "a@b.c\n"); // group with comments TEST("g:a@b.c(j),d@e.f(k);", "g: a@b.c (j), d@e.f (k);", "a@b.c\nd@e.f\n"); // group with no commas TEST("g:a@b.c d@e.f;", "g: a@b.c, d@e.f;", "a@b.c\nd@e.f\n"); // group with route addresses TEST("g:foo;", "g: foo ;", "a@b.c\n"); // route-path syntax (stripped) TEST("f<@g.h:a@b.c>", "f ", "a@b.c\n"); // multiple route-path syntax TEST("f<@g.h@i.j:a@b.c>", "f ", "a@b.c\n"); // comments with quoted brackets TEST("(f\\)\\()a@b.c", "a@b.c (f\\)\\()", "a@b.c\n"); // nested comments TEST("(f(g)h)a@b.c", "a@b.c (f(g)h)", "a@b.c\n"); // simple quoted addresses TEST("\"a\"@b.c", "a@b.c", "a@b.c\n"); // quoted parts of address TEST("a.\"b\".c@d.e", "a.b.c@d.e", "a.b.c@d.e\n"); // escaped characters within quotes TEST("\"s\\'b\"@d.e", "s'b@d.e", "s'b@d.e\n"); // escaped specials TEST("\"s\\\"a\\\"b\"@d.e", "\"s\\\"a\\\"b\"@d.e", "s\"a\"b@d.e\n"); // twisted syntax //TEST("\"\\\"d\\\" <\"<@_._:e@f.g>", // "who knows", // "e@f.g\n"); TEST("c@d.e (a.b)", "c@d.e (a.b)", "c@d.e\n"); TEST("\"a.b\" ", "\"a.b\" ", "c@d.e\n"); TEST("Mr. T ", "Mr. T ", "c@d.e\n"); TEST("a.b ", "a.b ", "c@d.e\n"); TEST("Mr . and T ", "Mr . and T ", "c@d.e\n"); // Whitespace in the quoted string TEST("\"\n f\n \" ", "f ", "a@b.c\n"); TEST("\" a.b\" ", "\"a.b\" ", "c@d.e\n"); fout << itoa(count) << " tests run, "; fout << itoa(failed) << " failed." << endl; return failed; } nullmailer-1.13/test/address-trace.cc0000664000076400007640000000004410702261073014540 00000000000000#define TRACE #include "address.cc" nullmailer-1.13/test/tests/0000775000076400007640000000000012133011635012731 500000000000000nullmailer-1.13/test/tests/mailq0000664000076400007640000000055712133011635013706 00000000000000. functions echo "Testing the output of the mailq command" echo To: nobody@nowhere | inject mailq | head -n 1 | egrep -q '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} [0-9]+ bytes from <.*>$' \ || { echo "Header is misformatted."; exit 1; } mailq | tail -n 1 | egrep -q '^ to $' \ || { echo "Recipient is misformatted."; exit 1; } nullmailer-1.13/test/tests/send0000664000076400007640000000147012133011635013527 00000000000000. functions cat <$tmpdir/libexec/nullmailer/dummy #!/bin/sh code=\$1 shift echo "\$@" >&2 exit \$code EOF chmod +x $tmpdir/libexec/nullmailer/dummy echo 127.0.0.1 smtp >$SYSCONFDIR/remotes # Start up the servers start send $PWD/../src/nullmailer-send start server tcpserver 0 24680 date make_message() { msgid=$(date +%s).$$.me cat <$tmpdir/var/nullmailer/tmp/$msgid me@nowhere me@nowhere Subject: test EOF mv -f $tmpdir/var/nullmailer/tmp/$msgid $tmpdir/var/nullmailer/queue/$msgid } send_message() { echo 127.0.0.1 dummy $@ >$SYSCONFDIR/remotes make_message svc -a $tmpdir/service/send sleep 2 not test -e $tmpdir/var/nullmailer/queue/$msgid } echo 'Testing sending with a succeeding protocol' send_message 0 2.0.0 echo 'Testing sending with a failing protocol' not send_message 1 5.2.2 nullmailer-1.13/test/tests/inject/0000775000076400007640000000000012133011635014205 500000000000000nullmailer-1.13/test/tests/inject/from0000664000076400007640000000332312133011635015014 00000000000000. functions inj() { injectfield from 'to: nobody' "$@"; } testvar() { set -e echo "Checking that inject obeys $1." export $1="$2" inj | grep -q "$3" } echo "Checking that inject inserts a from line." test -n "`inj`" echo "Checking that inject preserves an existing from line." inj "from: a@b.c" | grep -q '^ a@b\.c$' echo "Checking that inject does not add more from lines." test 1 -eq `inj "from: a@b.c" | wc -l` echo "Checking that inject will strip from lines." export NULLMAILER_FLAGS=f inj "from: a@b.c" | not grep -q '^ a@b\.c$' unset NULLMAILER_FLAGS echo "Checking that inject obeys me" rm -f $SYSCONFDIR/default* inj | grep -q "@f.q.d.n>$" echo "Checking that inject obeys config/defaulthost" echo test.org >$SYSCONFDIR/defaulthost inj | grep -q '@test.org>$' echo "Checking that inject obeys config/defaultdomain" echo test >$SYSCONFDIR/defaulthost echo domain.org >$SYSCONFDIR/defaultdomain inj | grep -q '@test.domain.org>$' echo "Checking that inject ignores config/defaultdomain for localhost" echo localhost >$SYSCONFDIR/defaulthost inj | grep -q '@localhost>$' testvar HOSTNAME test1.org '@test1.org>$' testvar MAILHOST test2.org '@test2.org>$' testvar NULLMAILER_HOST test3.org '@test3.org>$' echo "Checking that inject uses getpwnam" inj | grep -q " <`id -un`@" testvar LOGNAME name1 ' /dev/null echo "Checking that inject does not add more date lines." test 1 -eq `inj "date: foo" | wc -l` nullmailer-1.13/test/tests/inject/sender0000664000076400007640000000362312133011635015334 00000000000000. functions inj() { inject -n -v a /dev/null | head -n 1; } testvar() { set -e echo "Checking that inject obeys $1." export $1="$2" inj | grep -q "$3" } testcanon() { set -e echo "Checking that inject canonicalizes $1." export $1="$2" inj | grep -q "$3" } testhdr() { set -e echo "Checking that inject $1 $2:" echo $2: $3 | inject -n -v a 2>/dev/null | head -n 1 | grep -q "$4" } testign() { testhdr ignores "$@"; } testset() { testhdr uses "$@"; } echo "Checking that inject obeys me" rm -f $SYSCONFDIR/default* inj | grep -q "@f.q.d.n$" echo "Checking that inject obeys config/defaulthost" echo test.org >$SYSCONFDIR/defaulthost inj | grep -q '@test.org$' echo "Checking that inject obeys config/defaultdomain" echo test >$SYSCONFDIR/defaulthost echo domain.org >$SYSCONFDIR/defaultdomain inj | grep -q '@test.domain.org$' echo "Checking that inject ignores config/defaultdomain for localhost" echo localhost >$SYSCONFDIR/defaulthost inj | grep -q '@localhost$' testvar HOSTNAME test1.org '@test1.org$' testcanon HOSTNAME test1 '@test1.domain.org$' testvar MAILHOST test2.org '@test2.org$' testcanon MAILHOST test2 '@test2.domain.org$' testvar NULLMAILER_HOST test3.org '@test3.org$' testcanon NULLMAILER_HOST test3 '@test3.domain.org$' echo "Checking that inject uses getpwnam" inj | grep -q "^`id -un`@" testvar LOGNAME name1 '^name1@' testvar USER name2 '^name2@' testvar MAILUSER name3 '^name3@' testvar NULLMAILER_USER name4 '^name4@' testign Errors-To a@b.c '^name4@test3' testign From a@b.c '^name4@test3' testign Reply-To a@b.c '^name4@test3' testign Resent-From a@b.c '^name4@test3' testign Resent-Reply-To a@b.c '^name4@test3' testign Resent-Sender a@b.c '^name4@test3' testign Return-Receipt-To a@b.c '^name4@test3' testign Sender a@b.c '^name4@test3' testset Return-Path name0@host0.org '^name0@host0.org$' export NULLMAILER_FLAGS=s testign Return-Path name0@host0.org '^name4@test3' nullmailer-1.13/test/tests/inject/queue0000664000076400007640000000065012133011635015175 00000000000000. functions echo 'Testing that inject queues messages properly.' echo 'To: nobody' | inject test $( ls $tmpdir/var/nullmailer/queue | wc -l ) = 1 egrep -i '^to: *nobody' $tmpdir/var/nullmailer/queue/* >/dev/null echo 'Testing that inject honors $NULLMAILER_QUEUE.' rm -f $tmpdir/var/nullmailer/queue/* NULLMAILER_QUEUE=/bin/cat echo 'To: nobody' | inject >/dev/null test $( ls $tmpdir/var/nullmailer/queue | wc -l ) = 0 nullmailer-1.13/test/tests/inject/message-id0000664000076400007640000000124612133011635016071 00000000000000. functions inj() { injectfield message-id 'to: n' "$@"; } echo "Checking that inject inserts a message-id." test -n "`inj`" echo "Checking that inject preserves an existing message-id." inj "Message-Id: " | grep -q '^ $' echo "Checking that inject does not add more message-ids." test 1 -eq `inj "Message-Id: " | wc -l` echo "Checking that inject will ignore an existing message-id." export NULLMAILER_FLAGS=i inj "Message-Id: " | not grep -q '^ $' echo "Checking that inject obeys me" inj | grep -q "@f.q.d.n>$" echo "Checking that inject obeys config/idhost" echo test1.org >$SYSCONFDIR/idhost inj | grep -q '@test1.org>$' nullmailer-1.13/test/tests/inject/bad-headers0000664000076400007640000000051712133011635016212 00000000000000. functions injtest() { echo "$@" | not inject >/dev/null; } echo "Checking that inject rejects leading continuation lines." injtest " foo..." echo "Checking that inject rejects malformed RFC headers." injtest "foo : bar" injtest ":foo bar" injtest "foo" echo "Checking that inject rejects bad addresses." injtest "from: foo/tmp/nm/etc/nullmailer/adminaddr echo "Checking that queue rewrites user@localhost to adminaddr." que-recip -q '^admin@remote$' </tmp/nm/etc/nullmailer/adminaddr echo "Checking that queue rewrites to multiple adminaddr." que-recip -q '^admin2@remote2$' <&1 | cat -v >$out HELO HELO somebody EHLO EHLO somebody HELP HELP something DATA RCPT RCPT TO: MAIL MAIL FROM: RCPT RCPT TO: RSET RCPT TO: MAIL FROM: RCPT TO: mail from f@example.com rcpt to r@example.com rcpt <@example.org:r2@example.com> DATA Subject: test testing SMTP .line 2 ..line 3 . QUIT QUIT EOF diff -u - $out <testmail < To: Subject: Nullmailer automated test message Just testing, please ignore EOF for p in smtp qmqp do echo "Testing host not found error with $p." error 2 protocol $p this.host.can.not.exist // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include #include #include #include #include "lib/defines.h" #include "fdbuf/fdbuf.h" #include "mystring/mystring.h" static const char resp_data_ok[] = "354 End your message with a period on a line by itself"; static const char resp_goodbye[] = "221 2.0.0 Good bye"; static const char resp_help[] = "214 2.0.0 Help not available"; static const char resp_mail_bad[] = "554 5.1.2 Sender invalid"; static const char resp_mail_ok[] = "250 2.1.0 Sender accepted"; static const char resp_need_param[] = "501 5.5.2 Syntax error, command requires a parameter"; static const char resp_no_mail[] = "503 5.5.1 You must send a valid sender first"; static const char resp_no_param[] = "501 5.5.2 Syntax error, no parameters allowed"; static const char resp_no_queue[] = "451 4.3.0 Starting nullmailer-queue failed"; static const char resp_no_rcpt[] = "503 5.5.1 You must send a valid recipient first"; static const char resp_ok[] = "250 2.3.0 OK"; static const char resp_queue_exiterr[] = "451 4.3.0 Error returned from nullmailer-queue"; static const char resp_queue_ok[] = "250 2.6.0 Accepted message"; static const char resp_queue_waiterr[] = "451 4.3.0 Error checking return status from nullmailer-queue"; static const char resp_qwrite_err[] = "451 4.3.0 Write to nullmailer-queue failed"; static const char resp_rcpt_bad[] = "554 5.1.2 Recipient invalid"; static const char resp_rcpt_ok[] = "250 2.1.5 Recipient accepted"; static const char resp_unimp[] = "500 5.5.1 Not implemented"; static mystring line; static mystring sender; static mystring recipients; static int readline() { if (!fin.getline(line)) return 0; if (line.length() > 0 && line[line.length()-1] == '\r') line = line.left(line.length()-1); return 1; } static mystring parse_addr_arg(mystring& param) { mystring addr; unsigned i; char term; if ((i = param.find_first('<') + 1) > 0) term = '>'; else { term = ' '; if ((i = param.find_first(':') + 1) <= 0) if ((i = param.find_first(' ') + 1) <= 0) return 0; while (i < param.length() && param[i] == ' ') ++i; } for (bool quoted = false; i < param.length() && (quoted || param[i] != term); ++i) { switch (param[i]) { case '"': quoted = !quoted; break; case '\\': ++i; // fall through default: addr += param[i]; } } // strip source routing if (addr[0] == '@' && (i = addr.find_first(':')) > 0) addr = addr.right(i+1); return addr + "\n"; } static void do_reset(void) { sender = ""; recipients = ""; } static bool respond(const char* msg) { fout << msg << '\r' << endl; return fout; } static pid_t qpid; static int start_queue() { int pfd[2]; int fdnull; const char* args[2] = { 0 }; mystring nqueue = getenv("NULLMAILER_QUEUE"); if (!nqueue) { nqueue = SBIN_DIR; nqueue += "/nullmailer-queue"; } args[0] = nqueue.c_str(); if ((fdnull = open("/dev/null", O_WRONLY)) >= 0) { if (pipe(pfd) == 0) { if ((qpid = fork()) >= 0) { if (qpid == 0) { dup2(pfd[0], 0); dup2(fdnull, 1); dup2(fdnull, 2); close(pfd[0]); close(pfd[1]); close(fdnull); execv(args[0], (char**)args); _exit(111); } close(pfd[0]); return pfd[1]; } close(pfd[0]); close(pfd[1]); } close(fdnull); } return -1; } static bool qwrite(int qfd, const char* data, size_t len) { ssize_t wr; while (len > 0) { wr = write(qfd, data, len); if (wr <= 0) return false; len -= wr; data += wr; } return true; } static bool DATA(mystring& param) { if (!!param) return respond(resp_no_param); if (!sender) return respond(resp_no_mail); if (!recipients) return respond(resp_no_rcpt); int qfd; if ((qfd = start_queue()) < 0) return respond(resp_no_queue); if (!qwrite(qfd, sender.c_str(), sender.length()) || !qwrite(qfd, recipients.c_str(), recipients.length()) || !qwrite(qfd, "\n", 1)) return respond(resp_qwrite_err); if (!respond(resp_data_ok)) return false; while (readline()) { if (line.length() == 1 && line[0] == '.') break; if (line.length() > 1 && line[0] == '.') line = line.sub(1, line.length() - 1); line += '\n'; if (!qwrite(qfd, line.c_str(), line.length())) return respond(resp_qwrite_err); } close(qfd); int status; if (waitpid(qpid, &status, 0) != qpid) return respond(resp_queue_waiterr); return respond(status ? resp_queue_exiterr : resp_queue_ok); } static bool HELO(mystring& param) { if (!param) return respond(resp_need_param); return respond(resp_ok); } static bool HELP(mystring&) { return respond(resp_help); } static bool MAIL(mystring& param) { if (!param) return respond(resp_need_param); do_reset(); sender = parse_addr_arg(param); return respond(!sender ? resp_mail_bad : resp_mail_ok); } static bool NOOP(mystring&) { return respond(resp_ok); } static bool QUIT(mystring&) { respond(resp_goodbye); return false; } static bool RCPT(mystring& param) { if (!param) return respond(resp_need_param); if (!sender) return respond(resp_no_mail); mystring tmp = parse_addr_arg(param); recipients += tmp; return respond(!tmp ? resp_rcpt_bad : resp_rcpt_ok); } static bool RSET(mystring&) { do_reset(); return respond(resp_ok); } static bool VRFY(mystring&) { return respond(resp_unimp); } typedef bool (*dispatch_fn)(mystring& param); struct dispatch { const char* cmd; dispatch_fn fn; }; static struct dispatch dispatch_table[] = { { "DATA", DATA }, { "EHLO", HELO }, { "HELO", HELO }, { "HELP", HELP }, { "MAIL", MAIL }, { "NOOP", NOOP }, { "QUIT", QUIT }, { "RCPT", RCPT }, { "RSET", RSET }, { "VRFY", VRFY }, { 0, 0 } }; static bool dispatch() { mystring cmd; mystring param; cmd = line; for (size_t i = 0; i < line.length(); i++) { if (line[i] == ' ') { cmd = line.left(i); param = line.right(i+1).lstrip(); break; } } cmd = cmd.upper(); struct dispatch* d; for (d = dispatch_table; d->cmd != 0; d++) { if (cmd == d->cmd) return d->fn(param); } return respond("500 5.5.1 Not implemented"); } int main(void) { mystring line; if (!respond("220 nullmailer-smtpd ready")) return 0; while (readline()) { if (!dispatch()) return 0; } return 0; } nullmailer-1.13/src/Makefile.am0000664000076400007640000000132011745305125013357 00000000000000bin_PROGRAMS = \ mailq \ nullmailer-inject \ nullmailer-smtpd sbin_PROGRAMS = \ nullmailer-queue \ nullmailer-send \ sendmail #noinst_PROGRAMS = address INCLUDES = -I../lib -I../lib/cli++ mailq_SOURCES = mailq.cc mailq_LDADD = ../lib/libnullmailer.a nullmailer_inject_SOURCES = inject.cc nullmailer_inject_LDADD = ../lib/cli++/libcli++.a ../lib/libnullmailer.a nullmailer_queue_SOURCES = queue.cc nullmailer_queue_LDADD = ../lib/libnullmailer.a nullmailer_send_SOURCES = send.cc nullmailer_send_LDADD = ../lib/libnullmailer.a nullmailer_smtpd_SOURCES = smtpd.cc nullmailer_smtpd_LDADD = ../lib/libnullmailer.a sendmail_SOURCES = sendmail.cc sendmail_LDADD = ../lib/cli++/libcli++.a ../lib/libnullmailer.a nullmailer-1.13/src/Makefile.in0000664000076400007640000004134312133011471013367 00000000000000# Makefile.in generated by automake 1.10.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@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 = mailq$(EXEEXT) nullmailer-inject$(EXEEXT) \ nullmailer-smtpd$(EXEEXT) sbin_PROGRAMS = nullmailer-queue$(EXEEXT) nullmailer-send$(EXEEXT) \ sendmail$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS) am_mailq_OBJECTS = mailq.$(OBJEXT) mailq_OBJECTS = $(am_mailq_OBJECTS) mailq_DEPENDENCIES = ../lib/libnullmailer.a am_nullmailer_inject_OBJECTS = inject.$(OBJEXT) nullmailer_inject_OBJECTS = $(am_nullmailer_inject_OBJECTS) nullmailer_inject_DEPENDENCIES = ../lib/cli++/libcli++.a \ ../lib/libnullmailer.a am_nullmailer_queue_OBJECTS = queue.$(OBJEXT) nullmailer_queue_OBJECTS = $(am_nullmailer_queue_OBJECTS) nullmailer_queue_DEPENDENCIES = ../lib/libnullmailer.a am_nullmailer_send_OBJECTS = send.$(OBJEXT) nullmailer_send_OBJECTS = $(am_nullmailer_send_OBJECTS) nullmailer_send_DEPENDENCIES = ../lib/libnullmailer.a am_nullmailer_smtpd_OBJECTS = smtpd.$(OBJEXT) nullmailer_smtpd_OBJECTS = $(am_nullmailer_smtpd_OBJECTS) nullmailer_smtpd_DEPENDENCIES = ../lib/libnullmailer.a am_sendmail_OBJECTS = sendmail.$(OBJEXT) sendmail_OBJECTS = $(am_sendmail_OBJECTS) sendmail_DEPENDENCIES = ../lib/cli++/libcli++.a ../lib/libnullmailer.a DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(mailq_SOURCES) $(nullmailer_inject_SOURCES) \ $(nullmailer_queue_SOURCES) $(nullmailer_send_SOURCES) \ $(nullmailer_smtpd_SOURCES) $(sendmail_SOURCES) DIST_SOURCES = $(mailq_SOURCES) $(nullmailer_inject_SOURCES) \ $(nullmailer_queue_SOURCES) $(nullmailer_send_SOURCES) \ $(nullmailer_smtpd_SOURCES) $(sendmail_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ 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 = @MKDIR@ 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@ RANLIB = @RANLIB@ RM = @RM@ 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@ ac_ct_CXX = @ac_ct_CXX@ 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@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ #noinst_PROGRAMS = address INCLUDES = -I../lib -I../lib/cli++ mailq_SOURCES = mailq.cc mailq_LDADD = ../lib/libnullmailer.a nullmailer_inject_SOURCES = inject.cc nullmailer_inject_LDADD = ../lib/cli++/libcli++.a ../lib/libnullmailer.a nullmailer_queue_SOURCES = queue.cc nullmailer_queue_LDADD = ../lib/libnullmailer.a nullmailer_send_SOURCES = send.cc nullmailer_send_LDADD = ../lib/libnullmailer.a nullmailer_smtpd_SOURCES = smtpd.cc nullmailer_smtpd_LDADD = ../lib/libnullmailer.a sendmail_SOURCES = sendmail.cc sendmail_LDADD = ../lib/cli++/libcli++.a ../lib/libnullmailer.a all: all-am .SUFFIXES: .SUFFIXES: .cc .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) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ rm -f "$(DESTDIR)$(sbindir)/$$f"; \ done clean-sbinPROGRAMS: -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) mailq$(EXEEXT): $(mailq_OBJECTS) $(mailq_DEPENDENCIES) @rm -f mailq$(EXEEXT) $(CXXLINK) $(mailq_OBJECTS) $(mailq_LDADD) $(LIBS) nullmailer-inject$(EXEEXT): $(nullmailer_inject_OBJECTS) $(nullmailer_inject_DEPENDENCIES) @rm -f nullmailer-inject$(EXEEXT) $(CXXLINK) $(nullmailer_inject_OBJECTS) $(nullmailer_inject_LDADD) $(LIBS) nullmailer-queue$(EXEEXT): $(nullmailer_queue_OBJECTS) $(nullmailer_queue_DEPENDENCIES) @rm -f nullmailer-queue$(EXEEXT) $(CXXLINK) $(nullmailer_queue_OBJECTS) $(nullmailer_queue_LDADD) $(LIBS) nullmailer-send$(EXEEXT): $(nullmailer_send_OBJECTS) $(nullmailer_send_DEPENDENCIES) @rm -f nullmailer-send$(EXEEXT) $(CXXLINK) $(nullmailer_send_OBJECTS) $(nullmailer_send_LDADD) $(LIBS) nullmailer-smtpd$(EXEEXT): $(nullmailer_smtpd_OBJECTS) $(nullmailer_smtpd_DEPENDENCIES) @rm -f nullmailer-smtpd$(EXEEXT) $(CXXLINK) $(nullmailer_smtpd_OBJECTS) $(nullmailer_smtpd_LDADD) $(LIBS) sendmail$(EXEEXT): $(sendmail_OBJECTS) $(sendmail_DEPENDENCIES) @rm -f sendmail$(EXEEXT) $(CXXLINK) $(sendmail_OBJECTS) $(sendmail_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inject.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mailq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/queue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendmail.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtpd.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)" "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-sbinPROGRAMS \ 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-sbinPROGRAMS 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-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-sbinPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-sbinPROGRAMS install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-sbinPROGRAMS # 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: nullmailer-1.13/src/queue.cc0000664000076400007640000001214412120374703012760 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include #include #include #include #include #include #include "itoa.h" #include "defines.h" #include "mystring/mystring.h" #include "fdbuf/fdbuf.h" #include "configio.h" #include "hostname.h" #define fail(MSG) do{ fout << "nullmailer-queue: " << MSG << endl; return false; }while(0) pid_t pid = getpid(); uid_t uid = getuid(); time_t timesecs = time(0); mystring adminaddr; bool remapadmin = false; bool is_dir(const char* path) { struct stat buf; return !stat(path, &buf) && S_ISDIR(buf.st_mode); } bool is_exist(const char* path) { struct stat buf; return !stat(path, &buf); } int fsyncdir(const char* path) { int fd = open(path, O_RDONLY); if(fd == -1) return 0; int result = fsync(fd); if(result == -1 && errno != EIO) result = 0; close(fd); return result; } void trigger() { int fd = open(QUEUE_TRIGGER, O_WRONLY|O_NONBLOCK, 0666); if(fd == -1) return; char x = 0; write(fd, &x, 1); close(fd); } bool validate_addr(mystring& addr, bool doremap) { int i = addr.find_last('@'); if(i < 0) return false; mystring hostname = addr.right(i+1); if(doremap && remapadmin) { if(hostname == me || hostname == "localhost") addr = adminaddr; } else if(hostname.find_first('.') < 0) return false; return true; } bool copyenv(fdobuf& out) { mystring str; if(!fin.getline(str) || !str) fail("Could not read envelope sender."); if(!validate_addr(str, false)) fail("Envelope sender address is invalid."); if(!(out << str << endl)) fail("Could not write envelope sender."); unsigned count=0; while(fin.getline(str) && !!str) { if(!validate_addr(str, true)) fail("Envelope recipient address is invalid."); if(!(out << str << endl)) fail("Could not write envelope recipient."); ++count; } if(count == 0) fail("No envelope recipients read."); if(!(out << "\n")) fail("Could not write extra blank line to destination."); return true; } bool makereceived(fdobuf& out) { mystring line("Received: (nullmailer pid "); line += itoa(pid); line += " invoked by uid "; line += itoa(uid); line += ");\n\t"; char buf[100]; if(!strftime(buf, 100, "%a, %d %b %Y %H:%M:%S -0000\n", gmtime(×ecs))) fail("Error generating a date string."); line += buf; if(!(out << line)) fail("Could not write received line to message."); return true; } bool dump(int fd) { fdobuf out(fd); if(!copyenv(out)) return false; if(!makereceived(out)) return false; if(!fdbuf_copy(fin, out)) fail("Error copying the message to the queue file."); if(!out.sync()) fail("Error flushing the output file."); if(!out.close()) fail("Error closing the output file."); return true; } bool deliver() { if(!is_dir(QUEUE_MSG_DIR) || !is_dir(QUEUE_TMP_DIR)) fail("Installation error: queue directory is invalid."); // Notes: // - temporary file name is unique to the currently running // nullmailer-queue program // - destination file name is unique to the system // - if the temporary file previously existed, it did so because // the previous nullmailer-queue process crashed, and it can be // safely overwritten const mystring pidstr = itoa(pid); const mystring timestr = itoa(timesecs); const mystring tmpfile = QUEUE_TMP_DIR + pidstr; const mystring newfile = QUEUE_MSG_DIR + timestr + "." + pidstr; int out = open(tmpfile.c_str(), O_CREAT|O_WRONLY|O_TRUNC, 0600); if(out < 0) fail("Could not open temporary file for writing"); if(!dump(out)) { unlink(tmpfile.c_str()); return false; } if(link(tmpfile.c_str(), newfile.c_str())) fail("Error linking the temp file to the new file."); if(fsyncdir(QUEUE_MSG_DIR)) fail("Error syncing the new directory."); if(unlink(tmpfile.c_str())) fail("Error unlinking the temp file."); return true; } int main(int, char*[]) { umask(077); if(config_read("adminaddr", adminaddr) && !!adminaddr) { adminaddr = adminaddr.subst(',', '\n'); remapadmin = true; read_hostnames(); } if(!deliver()) return 1; trigger(); return 0; } nullmailer-1.13/src/inject.cc0000664000076400007640000003710412124661437013122 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include "defines.h" #include #include #include #include #include #include #include #include "mystring/mystring.h" #include "list.h" #include "hostname.h" #include "fdbuf/fdbuf.h" #include "itoa.h" #include "address.h" #include "canonicalize.h" #include "configio.h" #include "cli++/cli++.h" #include "makefield.h" enum { use_args, use_both, use_either, use_header }; static int use_recips = use_either; static int show_message = false; static int show_envelope = false; static const char* o_from = 0; const char* cli_program = "nullmailer-inject"; const char* cli_help_prefix = "Reformat and inject a message into the nullmailer queue\n"; const char* cli_help_suffix = ""; const char* cli_args_usage = "[recipients] slist; // static bool do_debug = false; static mystring cur_line; static mystring nqueue; /////////////////////////////////////////////////////////////////////////////// // Configuration /////////////////////////////////////////////////////////////////////////////// static mystring idhost; extern void canonicalize(mystring& domain); void read_config() { const char* env; mystring tmp; read_hostnames(); if(!config_read("idhost", idhost)) idhost = me; else canonicalize(idhost); if ((env = getenv("NULLMAILER_QUEUE")) != 0) nqueue = env; else { nqueue = SBIN_DIR; nqueue += "/nullmailer-queue"; } } /////////////////////////////////////////////////////////////////////////////// // Envelope processing /////////////////////////////////////////////////////////////////////////////// static slist recipients; static mystring sender; static bool use_header_recips = true; void parse_recips(const mystring& list) { if(!!list) { int start = 0; int end; while((end = list.find_first('\n', start)) >= 0) { recipients.append(list.sub(start, end-start)); start = end+1; } } } bool parse_recip_arg(mystring str) { mystring list; if(!parse_addresses(str, list)) return false; parse_recips(list); return true; } bool parse_sender(const mystring& list) { int end = list.find_first('\n'); if(end > 0 && list.find_first('\n', end+1) < 0) { sender = list.sub(0, end); return true; } return false; } /////////////////////////////////////////////////////////////////////////////// // Header processing /////////////////////////////////////////////////////////////////////////////// static slist headers; static bool header_is_resent = false; static bool header_has_errors = false; static bool header_add_to = false; struct header_field { // member information const char* name; unsigned length; bool is_address; bool is_recipient; bool is_sender; bool is_resent; bool remove; // remove means strip after parsing bool ignore; // ignore means do not parse bool present; bool parse(mystring& line, bool& rm) { if(strncasecmp(line.c_str(), name, length)) return false; rm = remove; if(ignore) return true; if(is_resent) { if(!header_is_resent) { sender = ""; if(use_header_recips) recipients.empty(); } header_is_resent = true; } if(is_address) { mystring tmp = line.right(length); mystring list; if(!parse_addresses(tmp, list)) bad_hdr(line, "Unable to parse the addresses."); else if(!tmp) { rm = true; return true; } else { line = mystringjoin(name) + " " + tmp; if(is_recipient) { if(is_resent == header_is_resent && use_header_recips) parse_recips(list); } else if(is_sender) { if(is_resent == header_is_resent && !sender) parse_sender(list); } } } present = true; return true; } }; #define F false #define T true #define X(N,IA,IR,IS,IRS,R) { #N ":",strlen(#N ":"),\ IA,IR,IS,IRS,R,false, false } static header_field header_fields[] = { // Sender address fields, in order of priority X(Sender, T,F,F,F,F), // 0 X(From, T,F,F,F,F), // 1 X(Reply-To, T,F,F,F,F), // 2 X(Return-Path, T,F,T,F,T), // 3 X(Return-Receipt-To, T,F,F,F,F), // 4 X(Errors-To, T,F,F,F,F), // 5 X(Resent-Sender, T,F,F,T,F), // 6 X(Resent-From, T,F,F,T,F), // 7 X(Resent-Reply-To, T,F,F,T,F), // 8 // Destination address fields X(To, T,T,F,F,F), // 9 X(Cc, T,T,F,F,F), // 10 X(Bcc, T,T,F,F,T), // 11 X(Apparently-To, T,T,F,F,F), // 12 X(Resent-To, T,T,F,T,F), // 13 X(Resent-Cc, T,T,F,T,F), // 14 X(Resent-Bcc, T,T,F,T,T), // 15 // Other fields of interest X(Date, F,F,F,F,F), // 16 X(Message-Id, F,F,F,F,F), // 17 X(Resent-Date, F,F,F,T,F), // 18 X(Resent-Message-Id, F,F,F,T,F), // 19 X(Content-Length, F,F,F,F,T), // 20 }; #undef X #undef F #undef T #define header_field_count (sizeof header_fields/sizeof(header_field)) static bool& header_has_from = header_fields[1].present; static bool& header_has_rfrom = header_fields[7].present; static bool& header_has_to = header_fields[9].present; static bool& header_has_cc = header_fields[10].present; static bool& header_has_rto = header_fields[13].present; static bool& header_has_rcc = header_fields[14].present; static bool& header_has_date = header_fields[16].present; static bool& header_has_mid = header_fields[17].present; static bool& header_has_rdate = header_fields[18].present; static bool& header_has_rmid = header_fields[19].present; static header_field& header_field_from = header_fields[1]; static header_field& header_field_mid = header_fields[17]; static header_field& header_field_rpath = header_fields[3]; static bool use_name_address_style = true; static mystring from; void setup_from() { mystring user = getenv("NULLMAILER_USER"); if(!user) user = getenv("MAILUSER"); if(!user) user = getenv("USER"); if(!user) user = getenv("LOGNAME"); if(!user) { struct passwd *pw = getpwuid(getuid()); if (pw) user = pw->pw_name; } if(!user) user = "unknown"; mystring host = getenv("NULLMAILER_HOST"); if(!host) host = getenv("MAILHOST"); if(!host) host = getenv("HOSTNAME"); if(!host) host = defaulthost; canonicalize(host); mystring name = getenv("NULLMAILER_NAME"); if(!name) name = getenv("MAILNAME"); if(!name) name = getenv("NAME"); if(use_name_address_style) { if(!name) from = "<" + user + "@" + host + ">"; else from = name + " <" + user + "@" + host + ">"; } else { if(!name) from = user + "@" + host; else from = user + "@" + host + " (" + name + ")"; } mystring suser = getenv("NULLMAILER_SUSER"); if(!suser) suser = user; mystring shost = getenv("NULLMAILER_SHOST"); if(!shost) shost = host; canonicalize(shost); if(!sender) sender = suser + "@" + shost; } bool parse_line(mystring& line) { bool valid = false; for(unsigned i = 0; i < line.length(); i++) { char ch = line[i]; if(isspace(ch)) break; if(ch == ':') { valid = (i > 0); break; } } if(!valid) //bad_hdr(line, "Missing field name."); return false; bool remove = false; for(unsigned i = 0; i < header_field_count; i++) { header_field& h = header_fields[i]; if(h.parse(line, remove)) break; } if(!remove) headers.append(line); return true; } bool is_header(const mystring& line) { for(unsigned i = 0; i < line.length(); i++) { char ch = line[i]; if(isspace(ch)) return false; if(ch == ':') return true; } return false; } bool is_continuation(const mystring& line) { return isspace(line[0]); } bool read_header() { mystring cur_line; mystring whole; for (;;) { if (!fin.getline(cur_line)) cur_line = ""; if(!cur_line || cur_line == "\r") break; if(!!whole && is_continuation(cur_line)) { //if(!whole) //bad_hdr(cur_line, "First line cannot be a continuation line."); //else whole += "\n" + cur_line; } else if(!is_header(cur_line)) { cur_line += '\n'; break; } else { if(!!whole) parse_line(whole); whole = cur_line; cur_line = ""; } } if(!!whole) parse_line(whole); return !header_has_errors; } mystring make_recipient_list() { mystring result; bool first = true; for(slist::iter iter(recipients); iter; iter++) { if(!first) result = result + ", " + *iter; else result = *iter; first = false; } return result; } bool fix_header() { setup_from(); if(!header_is_resent) { if(!header_has_date) headers.append("Date: " + make_date()); if(!header_has_mid) headers.append("Message-Id: " + make_messageid(idhost)); if(!header_has_from) headers.append("From: " + from); if(!header_has_to && !header_has_cc && header_add_to && recipients.count() > 0) { header_has_to = true; headers.append("To: " + make_recipient_list()); } } else { if(!header_has_rdate) headers.append("Resent-Date: " + make_date()); if(!header_has_rmid) headers.append("Resent-Message-Id: " + make_messageid(idhost)); if(!header_has_rfrom) headers.append("Resent-From: " + from); if(!header_has_rto && !header_has_rcc && header_add_to && recipients.count() > 0) { header_has_rto = true; headers.append("Resent-To: " + make_recipient_list()); } } if(!header_has_to && !header_has_cc) headers.append("Cc: recipient list not shown: ;"); return true; } /////////////////////////////////////////////////////////////////////////////// // Message sending /////////////////////////////////////////////////////////////////////////////// static fdobuf* nqpipe = 0; static pid_t pid = 0; void exec_queue() { execl(nqueue.c_str(), nqueue.c_str(), NULL); fout << "nullmailer-inject: Could not exec " << nqueue << ": " << strerror(errno) << endl; exit(1); } bool start_queue() { int pipe1[2]; if(pipe(pipe1) == -1) fail_sys("Could not create pipe to nullmailer-queue"); fout.flush(); pid = fork(); if(pid == -1) fail_sys("Could not fork"); if(pid == 0) { close(pipe1[1]); close(0); dup2(pipe1[0], 0); exec_queue(); } else { close(pipe1[0]); nqpipe = new fdobuf(pipe1[1], true); } return true; } bool send_env() { if(!(*nqpipe << sender << "\n")) fail("Error sending sender to nullmailer-queue."); for(slist::iter iter(recipients); iter; iter++) if(!(*nqpipe << *iter << "\n")) fail("Error sending recipients to nullmailer-queue."); if(!(*nqpipe << endl)) fail("Error sending recipients to nullmailer-queue."); return true; } bool send_header() { for(slist::iter iter(headers); iter; iter++) if(!(*nqpipe << *iter << "\n")) fail("Error sending header to nullmailer-queue."); if(!(*nqpipe << endl)) fail("Error sending header to nullmailer-queue."); return true; } bool send_body() { if(!(*nqpipe << cur_line) || !fdbuf_copy(fin, *nqpipe)) fail("Error sending message body to nullmailer-queue."); return true; } bool wait_queue() { if(!nqpipe->close()) fail("Error closing pipe to nullmailer-queue."); int status; if(waitpid(pid, &status, 0) == -1) fail("Error catching the return value from nullmailer-queue."); if(WIFEXITED(status)) { status = WEXITSTATUS(status); if(status) fail("nullmailer-queue failed."); else return true; } else fail("nullmailer-queue crashed or was killed."); } bool send_message() { if(show_message) { nqpipe = &fout; if(show_envelope) send_env(); send_header(); send_body(); return true; } else return start_queue() && send_env() && send_header() && send_body() && wait_queue(); } /////////////////////////////////////////////////////////////////////////////// // Main /////////////////////////////////////////////////////////////////////////////// bool parse_flags() { for(const char* flagstr = getenv("NULLMAILER_FLAGS"); flagstr && *flagstr; flagstr++) { switch(*flagstr) { case 'c': use_name_address_style=false; break; case 'f': header_field_from.ignore=header_field_from.remove=true; break; case 'i': header_field_mid.ignore=header_field_mid.remove=true; break; case 's': header_field_rpath.ignore=header_field_rpath.remove=true; break; case 't': header_add_to = true; break; default: // Just ignore any flags we can't handle break; } } return true; } bool parse_args(int argc, char* argv[]) { if(!parse_flags()) return false; if(o_from) { mystring list; mystring tmp(o_from); if(!parse_addresses(tmp, list) || !parse_sender(list)) { fout << "nullmailer-inject: Invalid sender address: " << o_from << endl; return false; } } use_header_recips = (use_recips != use_args); if(use_recips == use_header) return true; if(use_recips == use_either && argc > 0) use_header_recips = false; bool result = true; for(int i = 0; i < argc; i++) { if(!parse_recip_arg(argv[i])) { fout << "Invalid recipient: " << argv[i] << endl; result = false; } } return result; } int cli_main(int argc, char* argv[]) { read_config(); if(!parse_args(argc, argv) || !read_header() || !fix_header()) return 1; if(recipients.count() == 0) { fout << "No recipients were listed." << endl; return 1; } if(!send_message()) return 1; return 0; } nullmailer-1.13/src/sendmail.cc0000664000076400007640000001143711765725444013454 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include #include #include #include #include "fdbuf/fdbuf.h" #include "defines.h" #include "setenv.h" #include "cli++/cli++.h" const char* cli_program = "sendmail"; const char* cli_help_prefix = "Nullmailer sendmail emulator\n"; const char* cli_help_suffix = 0; const char* cli_args_usage = "[recipients] // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include "defines.h" #include "fdbuf/fdbuf.h" #include "itoa.h" #include "mystring/mystring.h" #include #include #include #include #include #define fail(X) do{ fout << X << endl; return 1; }while(0) int main(int, char*[]) { mystring line; if(chdir(QUEUE_MSG_DIR)) fail("Cannot change directory to queue."); DIR* dir = opendir(QUEUE_MSG_DIR); if(!dir) fail("Cannot open queue directory."); struct dirent* entry; while((entry = readdir(dir)) != 0) { const char* name = entry->d_name; if(name[0] == '.') continue; time_t time = atoi(name); char timebuf[100]; strftime(timebuf, 100, "%Y-%m-%d %H:%M:%S ", localtime(&time)); fout << timebuf; struct stat statbuf; if(stat(name, &statbuf) == -1) fout << "?????"; else fout << itoa(statbuf.st_size); fout << " bytes"; fdibuf in(name); if (in.getline(line)) { fout << " from <" << line << '>'; while (in.getline(line) && !!line) fout << "\n to <" << line << '>'; } fout << endl; } closedir(dir); return 0; } nullmailer-1.13/src/send.cc0000664000076400007640000002030412124655452012571 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include #include #include #include #include #include #include #include #include #include #include "ac/time.h" #include "configio.h" #include "defines.h" #include "errcodes.h" #include "fdbuf/fdbuf.h" #include "hostname.h" #include "itoa.h" #include "list.h" #include "selfpipe.h" #include "setenv.h" selfpipe selfpipe; typedef list slist; #define fail(MSG) do { fout << MSG << endl; return false; } while(0) #define fail2(MSG1,MSG2) do{ fout << MSG1 << MSG2 << endl; return false; }while(0) #define fail_sys(MSG) do{ fout << MSG << strerror(errno) << endl; return false; }while(0) struct remote { static const mystring default_proto; mystring host; mystring proto; slist options; remote(const slist& list); ~remote(); }; const mystring remote::default_proto = "smtp"; remote::remote(const slist& lst) { slist::const_iter iter = lst; host = *iter; ++iter; if(!iter) proto = default_proto; else { proto = *iter; for(++iter; iter; ++iter) options.append(*iter); } } remote::~remote() { } typedef list rlist; unsigned ws_split(const mystring& str, slist& lst) { lst.empty(); const char* ptr = str.c_str(); const char* end = ptr + str.length(); unsigned count = 0; for(;;) { while(ptr < end && isspace(*ptr)) ++ptr; const char* start = ptr; while(ptr < end && !isspace(*ptr)) ++ptr; if(ptr == start) break; lst.append(mystring(start, ptr-start)); ++count; } return count; } static rlist remotes; static int minpause = 60; static int pausetime = minpause; static int maxpause = 24*60*60; static int sendtimeout = 60*60; bool load_remotes() { slist rtmp; if(!config_readlist("remotes", rtmp) || rtmp.count() == 0) return false; remotes.empty(); for(slist::const_iter r(rtmp); r; r++) { if((*r)[0] == '#') continue; slist parts; if(!ws_split(*r, parts)) continue; remotes.append(remote(parts)); } return remotes.count() > 0; } bool load_config() { mystring hh; bool result = true; if (!config_read("helohost", hh)) hh = me; setenv("HELOHOST", hh.c_str(), 1); if(!load_remotes()) result = false; int oldminpause = minpause; if(!config_readint("pausetime", minpause)) minpause = 60; if(!config_readint("maxpause", maxpause)) maxpause = 24*60*60; if(!config_readint("sendtimeout", sendtimeout)) sendtimeout = 60*60; if (minpause != oldminpause) pausetime = minpause; return result; } static slist files; static bool reload_files = false; void catch_alrm(int) { signal(SIGALRM, catch_alrm); reload_files = true; } bool load_files() { reload_files = false; fout << "Rescanning queue." << endl; DIR* dir = opendir("."); if(!dir) fail_sys("Cannot open queue directory: "); files.empty(); struct dirent* entry; while((entry = readdir(dir)) != 0) { const char* name = entry->d_name; if(name[0] == '.') continue; files.append(name); } closedir(dir); return true; } void exec_protocol(int fd, remote& remote) { if(close(0) == -1 || dup2(fd, 0) == -1 || close(fd) == -1) return; mystring program = PROTOCOL_DIR + remote.proto; const char* args[3+remote.options.count()]; unsigned i = 0; args[i++] = program.c_str(); for(slist::const_iter opt(remote.options); opt; opt++) args[i++] = strdup((*opt).c_str()); args[i++] = remote.host.c_str(); args[i++] = 0; execv(args[0], (char**)args); } bool catchsender(pid_t pid) { int status; for (;;) { switch (selfpipe.waitsig(sendtimeout)) { case 0: // timeout kill(pid, SIGTERM); waitpid(pid, &status, 0); selfpipe.waitsig(); // catch the signal from killing the child fail("Sending timed out, killing protocol"); case -1: fail_sys("Error waiting for the child signal: "); case SIGCHLD: break; default: continue; } break; } if(waitpid(pid, &status, 0) == -1) fail_sys("Error catching the child process return value: "); else { if(WIFEXITED(status)) { status = WEXITSTATUS(status); if(status) fail2("Sending failed: ", errorstr(status)); else { fout << "Sent file." << endl; return true; } } else fail("Sending process crashed or was killed."); } } bool send_one(mystring filename, remote& remote) { int fd = open(filename.c_str(), O_RDONLY); if(fd == -1) { fout << "Can't open file '" << filename << "'" << endl; return false; } fout << "Starting delivery: protocol: " << remote.proto << " host: " << remote.host << " file: " << filename << endl; pid_t pid = fork(); switch(pid) { case -1: fail_sys("Fork failed: "); case 0: exec_protocol(fd, remote); exit(ERR_EXEC_FAILED); default: close(fd); if(!catchsender(pid)) return false; if(unlink(filename.c_str()) == -1) fail_sys("Can't unlink file: "); } return true; } bool send_all() { if(!load_config()) fail("Could not load the config"); if(remotes.count() <= 0) fail("No remote hosts listed for delivery"); if(files.count() == 0) return true; fout << "Starting delivery, " << itoa(files.count()) << " message(s) in queue." << endl; for(rlist::iter remote(remotes); remote; remote++) { slist::iter file(files); while(file) { if(send_one(*file, *remote)) files.remove(file); else file++; } } fout << "Delivery complete, " << itoa(files.count()) << " message(s) remain." << endl; return true; } static int trigger; #ifdef NAMEDPIPEBUG static int trigger2; #endif bool open_trigger() { trigger = open(QUEUE_TRIGGER, O_RDONLY|O_NONBLOCK); #ifdef NAMEDPIPEBUG trigger2 = open(QUEUE_TRIGGER, O_WRONLY|O_NONBLOCK); #endif if(trigger == -1) fail_sys("Could not open trigger file: "); return true; } bool read_trigger() { if(trigger != -1) { char buf[1024]; read(trigger, buf, sizeof buf); #ifdef NAMEDPIPEBUG close(trigger2); #endif close(trigger); } return open_trigger(); } bool do_select() { fd_set readfds; FD_ZERO(&readfds); FD_SET(trigger, &readfds); struct timeval timeout; if (files.count() == 0) pausetime = maxpause; timeout.tv_sec = pausetime; timeout.tv_usec = 0; pausetime *= 2; if (pausetime > maxpause) pausetime = maxpause; int s = select(trigger+1, &readfds, 0, 0, &timeout); if(s == 1) { fout << "Trigger pulled." << endl; read_trigger(); reload_files = true; pausetime = minpause; } else if(s == -1 && errno != EINTR) fail_sys("Internal error in select: "); else if(s == 0) reload_files = true; if(reload_files) load_files(); return true; } int main(int, char*[]) { read_hostnames(); if(!selfpipe) { fout << "Could not set up self-pipe." << endl; return 1; } selfpipe.catchsig(SIGCHLD); if(!open_trigger()) return 1; if(chdir(QUEUE_MSG_DIR) == -1) { fout << "Could not chdir to queue message directory." << endl; return 1; } signal(SIGALRM, catch_alrm); signal(SIGHUP, SIG_IGN); load_config(); load_files(); for(;;) { send_all(); if (minpause == 0) break; do_select(); } return 0; } nullmailer-1.13/ChangeLog0000664000076400007640000030275512133011624012314 00000000000000commit 048f87ccd1f6e3c86a3b27b6ed69ddb1201ec669 Author: Bruce Guenter Date: Mon Apr 15 08:47:46 2013 -0600 Stamp version 1.13 NEWS | 4 ++++ README | 7 +++++-- configure.in | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) commit af1bd422d127ea968d708952ff49a6c3bb0f44a5 Author: Bruce Guenter Date: Mon Apr 15 08:46:52 2013 -0600 sendmail: Document the -b[mps] mode options in the man page doc/sendmail.1 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 4d89f70c1e2e414444d1e5087685e3deec3d2f0f Author: Bruce Guenter Date: Fri Apr 12 10:46:22 2013 -0600 smtpd: Fix growing recipient list when sending multiple messages If the client program sends multiple messages without issuing the RSET command, the recipient list would not get cleared. As a result, the second message would have its recipient list added to that of the first, and so on. This change simply resets the list internally. NEWS | 4 ++++ src/smtpd.cc | 1 + test/tests/smtpd | 6 ++++++ 3 files changed, 11 insertions(+) commit 2de136d139e7a37a06300f75b99aaee3efcd600a Author: Bruce Guenter Date: Thu Apr 4 16:09:19 2013 -0600 Stamped release with today's date NEWS | 3 +++ README | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) commit 5dad4cb8e17f645e5fa048cb82c16247f9d9ad6b Author: Bruce Guenter Date: Wed Mar 27 15:18:43 2013 -0600 inject: Fix handling of messages with no body If there is no blank line following the header (and hence no body), the last line of the header may be duplicated in the body of the message. This fixes that boundary condition. NEWS | 2 ++ src/inject.cc | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit ca494e2135ef81d8e3580039c3445d7a15409532 Merge: eaa532e c94c8bd Author: Bruce Guenter Date: Wed Mar 27 14:48:42 2013 -0600 Merge branch 'backoff' commit c94c8bd4ae8f270d0e213365933d84cf0d0b5734 Author: Bruce Guenter Date: Thu Mar 14 10:26:03 2013 -0600 send: Fix up pause time back off calculation src/send.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit eaa532ebff1b01230384c0229f7b53687dfc99f6 Author: Bruce Guenter Date: Wed Mar 27 09:01:52 2013 -0600 smtpd: Strip leading periods from data as required Bug reported by Sebastian Nickel NEWS | 2 ++ src/smtpd.cc | 2 ++ test/tests/smtpd | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) commit 518cc1b89742f33a68128c043c5575e79e8d46dd Author: Bruce Guenter Date: Fri Feb 22 16:25:13 2013 -0600 send: Back off rescan times when sending fails. NEWS | 2 ++ doc/nullmailer-send.8 | 13 +++++++++++-- src/send.cc | 25 +++++++++++++++++++------ 3 files changed, 32 insertions(+), 8 deletions(-) commit 8563947d787b918c71f69e0b4f43275619cd3852 Merge: a3fb6bd 8b2bdff Author: Bruce Guenter Date: Tue Mar 19 13:50:00 2013 -0700 Merge pull request #9 from tpo/master documentation: manual delivery trigger, transport module options commit 8b2bdff730a475e276c9b5a637e19f9402850bb9 Author: Tomas Pospisek Date: Fri Mar 15 10:09:47 2013 +0100 list smpt and qmqp --help in 'see also' section doc/nullmailer-send.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4e821abe4a8d473e4acba41d8495a1c8a44deb16 Author: Tomas Pospisek Date: Fri Mar 15 10:08:59 2013 +0100 document how to find out about protocol modules' options doc/nullmailer-send.8 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit a79fc602b4bdb1ff80e6f3a56d49bfbf20e7b750 Author: Tomas Pospisek Date: Fri Mar 15 10:06:08 2013 +0100 document how to start delivery manually doc/nullmailer-send.8 | 5 +++++ 1 file changed, 5 insertions(+) commit a3fb6bd48cfca9587c21d6e6e835ce3cc2326960 Author: Bruce Guenter Date: Thu Mar 14 10:12:42 2013 -0600 nullmailer-queue: Support multiple admin addresses NEWS | 2 ++ doc/nullmailer-queue.8 | 3 ++- src/queue.cc | 1 + test/tests/queue/rewrite | 14 +++++++++++++- 4 files changed, 18 insertions(+), 2 deletions(-) commit 2d6d0dc09daa48abbfece9fc4d7674dd9095684b Author: Bruce Guenter Date: Wed Dec 19 21:25:26 2012 -0600 protocols/smtp: Send QUIT on success too Apparently some SMTP receivers will warn about senders that didn't send QUIT. Don't know why, and this should help shut them up. NEWS | 1 + protocols/smtp.cc | 2 ++ 2 files changed, 3 insertions(+) commit c0159f5fdf523f4dc508bc85e75c9e73663066b8 Author: Bruce Guenter Date: Wed Dec 19 21:24:40 2012 -0600 Bump version to 1.12 NEWS | 3 +++ configure.in | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit ef77697eafa9033063fe9e3c546f2f1e451da005 Author: Bruce Guenter Date: Thu Jun 14 09:44:38 2012 -0600 Tagged the README with today's date README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d5a7ce0be1d08d3a3636af471241346e219306a4 Author: Bruce Guenter Date: Tue Jun 12 14:52:50 2012 -0600 protocols: Add support for client certificate files. NEWS | 2 ++ protocols/protocol.cc | 2 ++ protocols/protocol.h | 1 + protocols/tls_gnutls.cc | 4 ++++ 4 files changed, 9 insertions(+) commit 16674b30624c3240aad4b4ad1b9e85e6c08f7e8e Author: Bruce Guenter Date: Tue Jun 12 14:47:15 2012 -0600 sendmail: Ignore all sendmail options NEWS | 2 +- src/sendmail.cc | 21 +-------------------- 2 files changed, 2 insertions(+), 21 deletions(-) commit 2704d1305f3d7c474520b3c5cb0063d36b180698 Author: Bruce Guenter Date: Tue Jun 12 14:21:44 2012 -0600 lib/cli++: Fix handling of single-char options with values Invoking 'sendmail -FNAME' fails without this patch. This change also introduces a set of self-tests. NEWS | 2 ++ lib/cli++/main.cc | 29 ++++++++++++-------- test/Makefile.am | 13 +++++++-- test/clitest.cc | 45 +++++++++++++++++++++++++++++++ test/clitest.sh | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 157 insertions(+), 13 deletions(-) create mode 100644 test/clitest.cc create mode 100644 test/clitest.sh commit dd9bb3ece55d2ce2b940b67e069d4ce800f54b5e Author: Bruce Guenter Date: Tue Jun 12 08:31:13 2012 -0600 sendmail: Add -odd -odi and -odq options for compatibility NEWS | 2 ++ src/sendmail.cc | 6 ++++++ 2 files changed, 8 insertions(+) commit f6f6a935463211a4e2fccb12448824bf82fd2362 Author: Bruce Guenter Date: Tue Jun 12 08:30:43 2012 -0600 Bump version to 1.11 NEWS | 5 +++++ configure.in | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) commit e6bc62f9ba314c024c8cb96574b9e9897d1624c2 Author: Bruce Guenter Date: Thu May 24 15:49:00 2012 -0600 protocols: Remove unneeded (?) gnutls/abstract.h include protocols/tls_gnutls.cc | 3 --- 1 file changed, 3 deletions(-) commit 221121d4d568e6e3922654641645dbace6f1cc43 Author: Bruce Guenter Date: Tue Apr 24 09:41:44 2012 -0600 test: Sleep a little longer in the send test to prevent a race test/tests/send | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b34be1b1b7f3c9b1f5755251e62833b7ce4ece4f Author: Bruce Guenter Date: Tue Apr 24 08:55:52 2012 -0600 makedist.in: Stop building RPMs makedist.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56a60e2fd00370ef3ad04959144aed23dd35d43d Author: Bruce Guenter Date: Tue Apr 24 08:55:27 2012 -0600 spec: Updates for tls and nullmailer-smtpd spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5e32780d7c9c57acb5c18c255d95271deb40e885 Author: Bruce Guenter Date: Tue Apr 24 07:49:21 2012 -0600 README: Stamp with today's date README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 871c21f821416ddcb93e4e1bc87ec82bdd8aba12 Author: Bruce Guenter Date: Mon Apr 23 13:44:33 2012 -0600 test: Fix typo in find command test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c24509e9b0cd8fe4430bdd3daa0bcf733ea1eb6d Author: Bruce Guenter Date: Mon Apr 23 11:01:58 2012 -0600 src/smtpd: Add missing #include src/smtpd.cc | 1 + 1 file changed, 1 insertion(+) commit fb6326ff2e5eb767e53f7f1e30748bcf489d26df Merge: d0cc453 75f4a52 Author: Bruce Guenter Date: Mon Apr 23 10:59:54 2012 -0600 Merge branch 'lsb' Conflicts: NEWS src/sendmail.cc commit d0cc4538313204a434982a42aa1182fca5c032e2 Author: Bruce Guenter Date: Mon Apr 23 10:28:07 2012 -0600 src/sendmail: Eliminate a few compiler warnings src/sendmail.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 81f0d6fdf65401a6fbd63b83e1a711812906b6f5 Author: Bruce Guenter Date: Mon Apr 23 10:09:19 2012 -0600 protocols/tls: Added support for gnutls prior to version 2.10 gnutls-2.10 introduced the gnutls_certificate_set_verify_function, which allows for verifying server certificates as soon as they're sent instead of after the handshake is complete. This adds a workaround for the function not being present in older versions by calling the cert verification after the handshake. configure.in | 7 ++++++- protocols/tls_gnutls.cc | 12 ++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) commit b635aef827d8455e9a0eb02a6f9e93fbf250bbcd Merge: 9e94d29 dd57bf9 Author: Bruce Guenter Date: Thu Apr 19 17:10:16 2012 -0600 Merge branch 'tls' commit 9e94d298adc142b0ff68044869f20d2450429b63 Author: Bruce Guenter Date: Thu Apr 19 17:06:45 2012 -0600 Fix a few warnings in autoconf files acinclude.m4 | 8 ++++---- configure.in | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) commit dd57bf991c9aa1e9ee8721c8c64b2021162c1f1a Author: Bruce Guenter Date: Thu Apr 19 16:32:06 2012 -0600 protocols: Add support for server certificate verification TODO | 3 --- protocols/protocol.cc | 8 ++++++++ protocols/protocol.h | 7 +++++++ protocols/tls_gnutls.cc | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 3 deletions(-) commit eb902c3a5808718f59d0009565900104bca55f04 Author: Bruce Guenter Date: Tue Apr 17 16:07:02 2012 -0600 protocols: Add support for STARTTLS NEWS | 2 +- TODO | 1 - protocols/protocol.cc | 12 ++++++++++-- protocols/protocol.h | 2 ++ protocols/qmqp.cc | 7 +++++++ protocols/smtp.cc | 14 +++++++++++++- 6 files changed, 33 insertions(+), 5 deletions(-) commit 436afd26338d319cec9f854bb524c740a1639656 Author: Bruce Guenter Date: Tue Apr 17 15:33:32 2012 -0600 protocols: Make SSL/TLS support optional in configure INSTALL | 3 +++ TODO | 1 - configure.in | 9 +++++++++ lib/fdbuf/Makefile.am | 11 +++++++---- protocols/Makefile.am | 16 ++++++++++++---- protocols/protocol.cc | 6 ++---- protocols/{tls.cc => tls_gnutls.cc} | 0 lib/config_readint.cc => protocols/tls_none.cc | 24 ++++++++++++------------ 8 files changed, 45 insertions(+), 25 deletions(-) rename protocols/{tls.cc => tls_gnutls.cc} (100%) copy lib/config_readint.cc => protocols/tls_none.cc (76%) commit 14568cc6fe479bfd3a5fab160d7f87e0e3abbe51 Author: Bruce Guenter Date: Tue Apr 17 15:11:13 2012 -0600 protocols: Move TLS code into separate source TODO | 1 - protocols/Makefile.am | 4 +- protocols/protocol.cc | 54 ++------------------------ protocols/protocol.h | 3 ++ protocols/{protocol.cc => tls.cc} | 81 ++++----------------------------------- 5 files changed, 15 insertions(+), 128 deletions(-) copy protocols/{protocol.cc => tls.cc} (53%) commit 450b50fb579dc0d0bc911029245b394e1088c7de Author: Bruce Guenter Date: Tue Apr 17 14:36:34 2012 -0600 protocols: Add support for SSL connections using gnutls NEWS | 2 ++ TODO | 8 +++--- protocols/Makefile.am | 4 +-- protocols/protocol.cc | 72 +++++++++++++++++++++++++++++++++++++++++++++++---- 4 files changed, 76 insertions(+), 10 deletions(-) commit 1d31cee72dc3af76590f07156d55c6b2733a5d04 Author: Bruce Guenter Date: Mon Apr 16 15:14:57 2012 -0600 protocols: Add --ssl option (unimplemented) protocols/protocol.cc | 7 +++++-- protocols/protocol.h | 2 ++ protocols/qmqp.cc | 1 + protocols/smtp.cc | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) commit e938f48e637584d4e7198a45a5849fcf0f7d03b1 Author: Bruce Guenter Date: Mon Apr 16 15:00:47 2012 -0600 lib/fdbuf: Add TLS ibuf and obuf classes, using gnutls lib/fdbuf/Makefile.am | 4 ++++ lib/fdbuf/{fdbuf_copy.cc => tlsibuf.cc} | 29 +++++++++++----------------- lib/fdbuf/{fdobuf_chownmod.cc => tlsibuf.h} | 30 ++++++++++++++--------------- lib/fdbuf/{fdbuf_copy.cc => tlsobuf.cc} | 29 +++++++++++----------------- lib/fdbuf/{fdobuf_chownmod.cc => tlsobuf.h} | 30 ++++++++++++++--------------- 5 files changed, 54 insertions(+), 68 deletions(-) copy lib/fdbuf/{fdbuf_copy.cc => tlsibuf.cc} (63%) copy lib/fdbuf/{fdobuf_chownmod.cc => tlsibuf.h} (65%) copy lib/fdbuf/{fdbuf_copy.cc => tlsobuf.cc} (63%) copy lib/fdbuf/{fdobuf_chownmod.cc => tlsobuf.h} (65%) commit e275797c5ab06f1cd1683f735127605352b477ee Author: Bruce Guenter Date: Mon Apr 16 13:01:41 2012 -0600 lib/fdbuf: Fix header include issues lib/fdbuf/fdbuf.h | 4 ++-- lib/fdbuf/fdibuf.h | 2 ++ lib/fdbuf/fdobuf.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) commit 4ee43718cd83a25562c853e24ebe45ce3141d62d Author: Bruce Guenter Date: Mon Apr 16 12:39:53 2012 -0600 lib/fdbuf: Implement virtual read/write functions for better extending lib/fdbuf/fdibuf.cc | 13 +++++++++---- lib/fdbuf/fdibuf.h | 1 + lib/fdbuf/fdobuf.cc | 13 +++++++++---- lib/fdbuf/fdobuf.h | 1 + 4 files changed, 20 insertions(+), 8 deletions(-) commit 3539a0e83a2307b2d60b1c10cbd50c5930b6719e Author: Bruce Guenter Date: Mon Apr 16 15:28:48 2012 -0600 protocols: Allocate I/O fdbuf objects in protocol wrapper protocols/protocol.cc | 6 +++++- protocols/protocol.h | 2 +- protocols/qmqp.cc | 14 +++++++------- protocols/smtp.cc | 14 +++++++------- 4 files changed, 20 insertions(+), 16 deletions(-) commit 245971bc0f9856ee98f6505d952a91c59546c3aa Author: Bruce Guenter Date: Mon Apr 16 15:21:28 2012 -0600 protocols: Use reference instead of pointer in protocol_* calling convention protocols/protocol.cc | 4 ++-- protocols/protocol.h | 4 ++-- protocols/qmqp.cc | 32 ++++++++++++++++---------------- protocols/smtp.cc | 22 +++++++++++----------- 4 files changed, 31 insertions(+), 31 deletions(-) commit 3c23536837b00123f3fa8671c2c7e37322212cda Author: Bruce Guenter Date: Mon Apr 16 15:11:39 2012 -0600 protocols: Handle default port numbers in the wrapper code protocols/protocol.cc | 5 +++++ protocols/protocol.h | 3 +-- protocols/qmqp.cc | 2 +- protocols/smtp.cc | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) commit f16c5b15f468c18d3867fbf33cae17bb4b1ca288 Author: Bruce Guenter Date: Sun Apr 15 13:21:05 2012 -0600 protocols/smtp: Add autodetection of authentication mode NEWS | 2 ++ protocols/protocol.cc | 4 ++-- protocols/protocol.h | 3 ++- protocols/smtp.cc | 62 ++++++++++++++++++++++++++++++++++++++++++++++----- 4 files changed, 62 insertions(+), 9 deletions(-) commit acd189b0c581b73ea5ffaa4b4cb8ba5c5bf2d242 Author: Bruce Guenter Date: Sun Apr 15 13:12:03 2012 -0600 protocols/smtp: Move auth code into smtp class protocols/smtp.cc | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) commit 53e7cfcaa4916023d047187abfb4d9ed8adcfd08 Author: Bruce Guenter Date: Sun Apr 15 12:33:51 2012 -0600 protocol/smtp: Provide interface for recording command responses protocols/smtp.cc | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 75f4a52ba1fa1916a5c64cf279ef883ecb24c142 Author: Bruce Guenter Date: Wed Mar 14 10:18:16 2012 -0600 Add tests for nullmailer-smtpd test/functions | 1 + test/tests/smtpd | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 test/tests/smtpd commit c8559d15c070c1846fe37306a9611c9dd02510cc Author: Bruce Guenter Date: Wed Mar 14 10:04:14 2012 -0600 nullmailer-smtpd: Make sure commands that require a parameter have one src/smtpd.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 9c8e3bd1155113cfef6a0fc215e128baf37ea7ff Author: Bruce Guenter Date: Wed Mar 14 09:56:48 2012 -0600 test: Drop the grep against .svn since it's not used any more test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b85b41aa188e38dfb984d744b19cb6713b75fea Author: Bruce Guenter Date: Wed Mar 14 09:04:30 2012 -0600 sendmail: Add support for -bs (SMTP) mode NEWS | 2 +- src/sendmail.cc | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit 7970d43393021a5b7603f94f11aab0152af4f325 Author: Bruce Guenter Date: Wed Mar 14 09:01:17 2012 -0600 nullmailer-smtpd: Add simple SMTP agent, for sendmail -bs mode .gitignore | 1 + src/Makefile.am | 6 +- src/smtpd.cc | 295 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 301 insertions(+), 1 deletion(-) create mode 100644 src/smtpd.cc commit f0b2f36a1f8c8dbc11f6392964b5570d90d1d26c Author: Bruce Guenter Date: Wed Mar 14 09:00:35 2012 -0600 mystring: Fix (previously unused) implementation of mystring::upper lib/mystring/upper.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb1a4b414d0f80e2066d7daf35b7eba622be693e Author: Bruce Guenter Date: Mon Mar 12 16:02:10 2012 -0600 sendmail: Add support for -bp (mailq) mode NEWS | 2 ++ src/sendmail.cc | 51 +++++++++++++++++++++++++-------------------------- 2 files changed, 27 insertions(+), 26 deletions(-) commit df9818e90dc9130291916a1d96fc4789f768a603 Author: Bruce Guenter Date: Mon Mar 12 15:49:05 2012 -0600 lib/cli++: Fix handling of error messages from short options lib/cli++/cli++.h | 4 ++-- lib/cli++/main.cc | 28 ++++++++++++++++++---------- 2 files changed, 20 insertions(+), 12 deletions(-) commit e301f0e28a97424d9b163959a43b251137731ca3 Author: Bruce Guenter Date: Mon Mar 12 15:34:42 2012 -0600 sendmail: Break out options using hew cli_only_long mode src/sendmail.cc | 79 ++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 53 insertions(+), 26 deletions(-) commit 0a7dab3bc20691e450c2cd61d927c74723003cc3 Author: Bruce Guenter Date: Mon Mar 12 15:21:49 2012 -0600 lib/cli++: Complete implementation of cli_only_long option This change adds support on the command line for "-long" options alongside "--long" options if cli_only_long is set. lib/cli++/main.cc | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 7a30893489004e4c462164e6ae2dc984ea189056 Author: Bruce Guenter Date: Wed Feb 29 22:27:01 2012 -0600 lib/cli++: Add start of cli_only_long option A new boolean, cli_only_long implements a new mode of operation, where both long and short options can be prefixed with a single "-". This change only implements the help text output. lib/cli++/Makefile.am | 2 +- lib/cli++/cli++.h | 3 +++ lib/cli++/main.cc | 67 +++++++++++++++++++++++++++----------------------- lib/cli++/only_long.cc | 3 +++ 4 files changed, 43 insertions(+), 32 deletions(-) create mode 100644 lib/cli++/only_long.cc commit 16a1e560761de3a1deba807adc758e4e1dd07be3 Author: Bruce Guenter Date: Mon Mar 12 16:03:26 2012 -0600 Bump version to 1.10 NEWS | 5 +++++ README | 2 +- configure.in | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) commit b445376bbb00d64a6e4a54f426658027832a0ce8 Author: Bruce Guenter Date: Wed Feb 29 21:00:10 2012 -0600 lib/fdbuf: Initial commit from current sources lib/fdbuf/Makefile.am | 22 +++ lib/fdbuf/fdbuf.cc | 107 +++++++++++ lib/fdbuf/fdbuf.h | 82 ++++++++ lib/{mystring/count.cc => fdbuf/fdbuf_copy.cc} | 25 ++- lib/fdbuf/fdbuf_test.cc | 16 ++ lib/fdbuf/fdibuf.cc | 192 +++++++++++++++++++ lib/fdbuf/fdibuf.h | 50 +++++ lib/{mystring/iter.cc => fdbuf/fdibuf_mystring.cc} | 54 +++--- .../count.cc => fdbuf/fdibuf_netstring.cc} | 28 ++- lib/fdbuf/fdobuf.cc | 209 +++++++++++++++++++++ lib/fdbuf/fdobuf.h | 91 +++++++++ .../count.cc => fdbuf/fdobuf_chownmod.cc} | 21 ++- lib/{mystring/iter.cc => fdbuf/fdobuf_seek.cc} | 50 ++--- lib/{mystring/count.cc => fdbuf/fdobuf_signed.cc} | 25 ++- .../count.cc => fdbuf/fdobuf_unsigned.cc} | 21 ++- 15 files changed, 913 insertions(+), 80 deletions(-) create mode 100644 lib/fdbuf/Makefile.am create mode 100644 lib/fdbuf/fdbuf.cc create mode 100644 lib/fdbuf/fdbuf.h copy lib/{mystring/count.cc => fdbuf/fdbuf_copy.cc} (56%) create mode 100644 lib/fdbuf/fdbuf_test.cc create mode 100644 lib/fdbuf/fdibuf.cc create mode 100644 lib/fdbuf/fdibuf.h copy lib/{mystring/iter.cc => fdbuf/fdibuf_mystring.cc} (53%) copy lib/{mystring/count.cc => fdbuf/fdibuf_netstring.cc} (62%) create mode 100644 lib/fdbuf/fdobuf.cc create mode 100644 lib/fdbuf/fdobuf.h copy lib/{mystring/count.cc => fdbuf/fdobuf_chownmod.cc} (72%) copy lib/{mystring/iter.cc => fdbuf/fdobuf_seek.cc} (61%) copy lib/{mystring/count.cc => fdbuf/fdobuf_signed.cc} (67%) copy lib/{mystring/count.cc => fdbuf/fdobuf_unsigned.cc} (70%) commit 46fa7fa8eb1f1aa8f787e186db7f3d1208ea2451 Author: Bruce Guenter Date: Wed Feb 29 20:59:55 2012 -0600 lib/mystring: Initial commit from current sources lib/mystring/Makefile.am | 25 +++++ lib/mystring/append.cc | 19 ++++ lib/mystring/assign.cc | 55 ++++++++++ lib/{config_readint.cc => mystring/count.cc} | 25 ++--- lib/mystring/fdobuf.cc | 9 ++ lib/mystring/find_first_ch.cc | 11 ++ lib/mystring/find_first_of.cc | 22 ++++ lib/mystring/find_last_ch.cc | 14 +++ lib/mystring/find_last_of.cc | 24 ++++ lib/{canonicalize.cc => mystring/iter.cc} | 46 +++++--- lib/{config_readint.cc => mystring/iter.h} | 41 +++---- lib/mystring/join.cc | 61 +++++++++++ lib/mystring/join.h | 76 +++++++++++++ lib/mystring/lower.cc | 19 ++++ lib/mystring/lstrip.cc | 10 ++ lib/mystring/mystring.cc | 28 +++++ lib/mystring/mystring.h | 127 ++++++++++++++++++++++ lib/mystring/operator_in.cc | 33 ++++++ lib/mystring/rep.cc | 157 +++++++++++++++++++++++++++ lib/{config_readint.cc => mystring/rep.h} | 47 +++++--- lib/mystring/rstrip.cc | 10 ++ lib/mystring/strip.cc | 13 +++ lib/mystring/sub.cc | 37 +++++++ lib/mystring/subst.cc | 18 +++ lib/mystring/trace.h | 11 ++ lib/mystring/upper.cc | 21 ++++ 26 files changed, 886 insertions(+), 73 deletions(-) create mode 100644 lib/mystring/Makefile.am create mode 100644 lib/mystring/append.cc create mode 100644 lib/mystring/assign.cc copy lib/{config_readint.cc => mystring/count.cc} (53%) create mode 100644 lib/mystring/fdobuf.cc create mode 100644 lib/mystring/find_first_ch.cc create mode 100644 lib/mystring/find_first_of.cc create mode 100644 lib/mystring/find_last_ch.cc create mode 100644 lib/mystring/find_last_of.cc copy lib/{canonicalize.cc => mystring/iter.cc} (53%) copy lib/{config_readint.cc => mystring/iter.h} (53%) create mode 100644 lib/mystring/join.cc create mode 100644 lib/mystring/join.h create mode 100644 lib/mystring/lower.cc create mode 100644 lib/mystring/lstrip.cc create mode 100644 lib/mystring/mystring.cc create mode 100644 lib/mystring/mystring.h create mode 100644 lib/mystring/operator_in.cc create mode 100644 lib/mystring/rep.cc copy lib/{config_readint.cc => mystring/rep.h} (53%) create mode 100644 lib/mystring/rstrip.cc create mode 100644 lib/mystring/strip.cc create mode 100644 lib/mystring/sub.cc create mode 100644 lib/mystring/subst.cc create mode 100644 lib/mystring/trace.h create mode 100644 lib/mystring/upper.cc commit 530d4bd52120d252cdd53fcb71ce611723917e91 Author: Bruce Guenter Date: Wed Feb 29 20:58:54 2012 -0600 lib/ac: Initial commit of current sources lib/ac/dirent.h | 17 +++++++++++++++++ lib/ac/time.h | 10 ++++++++++ lib/ac/wait.h | 10 ++++++++++ 3 files changed, 37 insertions(+) create mode 100644 lib/ac/dirent.h create mode 100644 lib/ac/time.h create mode 100644 lib/ac/wait.h commit a935e2d5bbe59ae2002eadb599f7c914530d7562 Author: Bruce Guenter Date: Wed Feb 29 20:56:28 2012 -0600 lib/cli++: Initial commit of current sources from bglibs lib/cli++/Makefile.am | 9 ++ lib/cli++/cli++.h | 59 +++++++++ lib/cli++/cli++topod.pl | 213 ++++++++++++++++++++++++++++++ lib/cli++/clitest.cc | 47 +++++++ lib/cli++/main.cc | 342 ++++++++++++++++++++++++++++++++++++++++++++++++ lib/cli++/messages.cc | 44 +++++++ 6 files changed, 714 insertions(+) create mode 100644 lib/cli++/Makefile.am create mode 100644 lib/cli++/cli++.h create mode 100644 lib/cli++/cli++topod.pl create mode 100644 lib/cli++/clitest.cc create mode 100644 lib/cli++/main.cc create mode 100644 lib/cli++/messages.cc commit 860dabe191d28d0002391b3d2395c9524d13f3ff Author: Bruce Guenter Date: Wed Feb 29 20:46:07 2012 -0600 Remove unneeded Year 2000 statement Makefile.am | 2 +- YEAR2000 | 10 ---------- makedist.in | 2 +- spec | 2 +- 4 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 YEAR2000 commit c5d104702d2ff30989368897b9a2b66a1d2544bd Author: Bruce Guenter Date: Wed Feb 29 20:44:45 2012 -0600 Update copyright year README | 4 ++-- lib/address-old.cc | 2 +- lib/address.cc | 2 +- lib/base64.cc | 2 +- lib/canonicalize.cc | 2 +- lib/config_read.cc | 2 +- lib/config_readint.cc | 2 +- lib/config_readlist.cc | 2 +- lib/errcodes.cc | 2 +- lib/hostname.cc | 2 +- lib/makefield.cc | 2 +- lib/selfpipe.cc | 2 +- lib/setenv.cc | 2 +- lib/tcpconnect.cc | 2 +- protocols/protocol.cc | 2 +- protocols/qmqp.cc | 2 +- protocols/smtp.cc | 2 +- src/inject.cc | 2 +- src/mailq.cc | 2 +- src/queue.cc | 2 +- src/send.cc | 2 +- src/sendmail.cc | 2 +- 22 files changed, 23 insertions(+), 23 deletions(-) commit 88218043763357b339d5cf6d7667444e41e4bbbe Author: Bruce Guenter Date: Sat Feb 25 22:55:17 2012 -0600 Reworded the past NEWS items. NEWS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 494f72e2279a90b6b095715929a008e2c8e4708b Author: Bruce Guenter Date: Sat Feb 25 22:48:44 2012 -0600 selfpipe: Only use select if the timeout is positive If the timeout is zero (or negative), the select will return immediately. Since the pipe being read from is marked as non-blocking, this becomes equivalent to just reading from the socket unconditionally without the select. lib/selfpipe.cc | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 63c54b2ea2cdece784e9f1de61ec0a4a8d73dc87 Author: Bruce Guenter Date: Sat Feb 25 22:39:20 2012 -0600 send: Fix handling of protocol timeouts When the protocol takes too long to send a message to the remote, send will kill that protocol and retry later. However, it never fully deals with the signal caused by the child process exiting. So, when it later resends the message, it appears that the protocol exits immediately, causing further problems. The obvious fix is to make sure we deal with the generated SIGCHLD after killing the protocol. Thanks Nick Leverton for catching this. NEWS | 2 ++ src/send.cc | 1 + 2 files changed, 3 insertions(+) commit 5c87b96d2d9524b3a059cab5f60aebb5a482449e Author: Bruce Guenter Date: Sat Feb 25 13:53:26 2012 -0600 Update includes for new ac/time.h include Old one was named ac/systime.h lib/makefield.cc | 2 +- src/send.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8cba9d7f74ba853c30daeafe09f809aa3c2263c1 Author: Bruce Guenter Date: Tue Mar 16 16:57:02 2010 -0600 Fix handling of whitespace in quoted strings in headers NEWS | 2 ++ lib/address.cc | 8 +++++++- test/address-test.cc | 9 ++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) commit ec087b5409d038554fadbac73909e83d7905c59a Author: Bruce Guenter Date: Fri Feb 5 15:42:20 2010 -0600 sync instead of just flush when writing the queue file NEWS | 3 +++ src/queue.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit ece5c7bb0d21712272826bc79783c98bf85a658e Author: Bruce Guenter Date: Fri Feb 5 15:38:13 2010 -0600 Bump version to 1.06 NEWS | 5 +++++ README | 2 +- configure.in | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) commit 9bcc733516a02260d3e468a87486aed9d0a3b621 Author: Bruce Guenter Date: Mon Oct 19 11:00:09 2009 -0600 Stamped README with today's date README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6450c36e5605ce05e2ffbb090982ea0642d45bda Author: Bruce Guenter Date: Thu Apr 17 16:50:31 2008 -0600 Removed unnecessary FIXME comment in lib/address.cc lib/address.cc | 2 -- 1 file changed, 2 deletions(-) commit 2b339dcf76b2d8dd6df6e08549b2d4c75c87e1ad Author: Bruce Guenter Date: Thu Apr 17 16:41:58 2008 -0600 Set umask in nullmailer-queue, just for safety. src/queue.cc | 1 + 1 file changed, 1 insertion(+) commit 218f9921688643c4bb63ebf1df65a233ba0a2070 Author: Bruce Guenter Date: Thu Apr 17 16:13:17 2008 -0600 Replaced some single-byte string constants with characters in lib/address.cc lib/address.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 8a44d18869dcfb5a9c46e878e3a17334ab8a49b0 Author: Bruce Guenter Date: Thu Apr 17 15:24:41 2008 -0600 Fixed handling of phrases with mixed spacing in the address parser. This change introduces a flag to the token structure to indicate if the token was preceded by whitespace. That flag is used later to calculate if a space should be added back into the reconstructed address field. lib/address.cc | 62 +++++++++++++++++++++++++++++----------------------- test/address-test.cc | 6 +++++ 2 files changed, 41 insertions(+), 27 deletions(-) commit 2d87bf661aa36bf1adb694fc028c4de85658b723 Author: Bruce Guenter Date: Thu Apr 17 13:50:24 2008 -0600 Started fixing phrases containing periods, such as abbreviations. NEWS | 2 ++ lib/address.cc | 24 ++++++++++++++++-------- test/address-test.cc | 3 +++ 3 files changed, 21 insertions(+), 8 deletions(-) commit 64bf159f68314540c6631b61e96d5ac2f880f80d Author: Bruce Guenter Date: Thu Apr 17 13:16:43 2008 -0600 Fixed handling of periods (and other specials) inside quotes. lib/address.cc | 4 ++-- test/address-test.cc | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) commit f8ec121071c7149f07b71eeabe7f9e6bcc84a755 Author: Bruce Guenter Date: Thu Apr 17 11:28:50 2008 -0600 Eliminate the anode constructor that doesn't include a string. lib/address.cc | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 55ff89634392411830b8360dd4f4da98af2b2b59 Author: Bruce Guenter Date: Wed Apr 16 09:57:57 2008 -0600 Fixed use-after-destruct bug in address parsing tracing. lib/address.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 441ac8b60121c728cb7f1f0ef5396fc4ad2787ea Author: Bruce Guenter Date: Wed Apr 16 16:42:31 2008 -0600 Fixed handling of TM_HAS_ISDST on Solaris. Thanks to John Coy for pointing this out. NEWS | 2 ++ lib/makefield.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 381cce827b8516fbd7b2f9d891214c0b738b2431 Author: Bruce Guenter Date: Fri Oct 12 20:18:20 2007 -0600 Added a selftest for -send. test/tests/send | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 test/tests/send commit a3f409909ded9c9ca2b22e8c16a61c4a42ca665d Author: Bruce Guenter Date: Fri Oct 12 20:11:02 2007 -0600 Switch to using supervise for running subprocesses in tests. test/functions | 37 ++++++++++++++++++++++--------------- test/tests/protocols | 6 ++---- 2 files changed, 24 insertions(+), 19 deletions(-) commit 6af25d1743a2a99605add05becd7f1407184a050 Author: Bruce Guenter Date: Fri Oct 12 18:57:50 2007 -0600 Reordered the status error codes to group the permanent ones. lib/errcodes.cc | 48 ++++++++++++++++++++++++++---------------------- lib/errcodes.h | 17 +++++++++++------ src/send.cc | 2 +- 3 files changed, 38 insertions(+), 29 deletions(-) commit 4a40f14aa68369a642216dfcf4c38eef30516c2a Author: Bruce Guenter Date: Fri Oct 12 09:50:06 2007 -0600 Tweaked the make_messageid function to make it more code efficient. lib/makefield.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 29e724376ff61d434b11e1f47c71c373d6f4b82a Author: Bruce Guenter Date: Tue Oct 9 23:01:55 2007 -0600 Fixed compilation of src/selfpipe.cc on Solaris and other OSes. NEWS | 1 + lib/selfpipe.cc | 1 + 2 files changed, 2 insertions(+) commit 329313e7c642081d491b3c26d0969fd7cdc7a60e Author: Bruce Guenter Date: Tue Oct 9 23:01:17 2007 -0600 Bumped version to 1.05 NEWS | 6 ++++++ configure.in | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 3f17550ee9ba94dbf5d8582929f84cc5711d6971 Author: Bruce Guenter Date: Tue Oct 9 17:33:52 2007 -0600 Stamped many files with today's date/year. README | 4 ++-- lib/address-old.cc | 2 +- lib/address.cc | 2 +- lib/base64.cc | 2 +- lib/config_read.cc | 2 +- lib/config_readint.cc | 2 +- lib/config_readlist.cc | 2 +- lib/errcodes.cc | 2 +- lib/hostname.cc | 2 +- lib/makefield.cc | 2 +- lib/setenv.cc | 2 +- lib/tcpconnect.cc | 2 +- protocols/protocol.cc | 2 +- protocols/qmqp.cc | 2 +- protocols/smtp.cc | 2 +- src/inject.cc | 2 +- src/mailq.cc | 2 +- src/queue.cc | 2 +- src/sendmail.cc | 2 +- 19 files changed, 20 insertions(+), 20 deletions(-) commit 4ca905042fff71cb1a7a674502b442b194f827dd Author: Bruce Guenter Date: Tue Oct 9 17:33:39 2007 -0600 Added some missing bits needed for distribution. lib/Makefile.am | 2 +- spec | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) commit 1c5e462c86e567ff4e468656c2c26bcd246e1ce1 Author: Bruce Guenter Date: Tue Oct 9 15:50:00 2007 -0600 Fixed up some test function includes. test/functions | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit efc6fe62282ed60eee927bd272faa98293f60943 Author: Bruce Guenter Date: Tue Oct 9 15:49:17 2007 -0600 Added a .gitignore file to let get ignore more files. .gitignore | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .gitignore commit 7bed03ab4b0f4ba72ecbf2f01b82a3a42a200124 Author: Bruce Guenter Date: Tue Oct 9 15:48:54 2007 -0600 Updated the TODO notes a bit. TODO | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 1a80bbef3ad9dc7451e262f681e85945702a4ceb Author: Bruce Guenter Date: Tue Oct 9 15:48:20 2007 -0600 Added the standard GPL copying document. COPYING | 340 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 340 insertions(+) create mode 100644 COPYING commit 2210203cae988833b6e468c508fb2ce52623a98f Author: Bruce Guenter Date: Tue Oct 9 15:48:02 2007 -0600 Added a simple INSTALL document. INSTALL | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 INSTALL commit f5041c11b8f8543948a09fa3bf06e147226ba382 Author: Bruce Guenter Date: Tue Oct 9 15:47:42 2007 -0600 Removed an unneeded header from src/queue.cc src/queue.cc | 1 - 1 file changed, 1 deletion(-) commit c3dd869824827c2ddf74a5d45f7177912bdb81dd Author: Bruce Guenter Date: Tue Oct 9 15:47:21 2007 -0600 Fixed a double space in the mailq output, and added a test script. src/mailq.cc | 2 +- test/tests/mailq | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 test/tests/mailq commit bd8c99e3898710b542fd5a6f08f98ffdf3e933f8 Author: Bruce Guenter Date: Tue Oct 9 14:36:12 2007 -0600 Added a header for lib/makefield.cc lib/makefield.cc | 4 +--- lib/makefield.h | 7 +++++++ src/inject.cc | 10 ++++------ 3 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 lib/makefield.h commit c04e92eb8bcd99f16a908e48e8bee1673488ccf8 Author: Bruce Guenter Date: Tue Oct 9 12:13:22 2007 -0600 Do not canonicalize *@localhost addresses. NEWS | 3 +++ doc/nullmailer-inject.1 | 4 +++- lib/canonicalize.cc | 4 ++-- test/tests/inject/from | 4 ++++ test/tests/inject/sender | 4 ++++ 5 files changed, 16 insertions(+), 3 deletions(-) commit 5038832d2067dbf30903bc2273b8673904fab11b Author: Bruce Guenter Date: Tue Oct 9 10:40:29 2007 -0600 Documented the helohost config file that nullmailer-send uses. TODO | 12 +++++++++--- doc/nullmailer-send.8 | 10 ++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) commit 357e7086733b25ab1116405502030c75993fb784 Author: Bruce Guenter Date: Tue Oct 9 10:40:05 2007 -0600 Fixed nullmailer-send to reread helohost along with the other config files. src/send.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 07300026f7dfbf889b56ce45b0dd7a8160ac8aee Author: Bruce Guenter Date: Tue Oct 9 10:38:55 2007 -0600 Make a hanging test protocol server less likely in tests/protocols. The previous test script set up an exit function to kill the test protocol server *after* sleeping for 1 second. If the script was interrupted during that sleep, the server wouldn't get killed properly. test/tests/protocols | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89a18d52833e65565031ed7a3cd61ff55fcfb151 Author: Bruce Guenter Date: Tue Oct 9 10:08:11 2007 -0600 Added support for reporting the sender and recipients in mailq. NEWS | 2 ++ src/mailq.cc | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit bb508024b20ee63e9f99e13159969467ab7145e3 Author: Bruce Guenter Date: Tue Oct 9 09:09:00 2007 -0600 Report system errors in more cases in nullmailer-send. src/send.cc | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 695d263cb625df30c9020a03d4eeee09972a30d4 Author: Bruce Guenter Date: Sun Oct 7 23:11:51 2007 -0600 Fix "missing sentinel in function call" warning in src/inject.cc src/inject.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c747e5e565256cd911dfaec96db8c188c462eb7 Author: Bruce Guenter Date: Tue Apr 10 00:03:25 2007 +0000 Added a send timeout in nullmailer-send, to kill sending messages that stall. NEWS | 3 ++ doc/nullmailer-send.8 | 10 +++++ lib/Makefile.am | 1 + lib/selfpipe.cc | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++ lib/selfpipe.h | 16 ++++++++ src/send.cc | 31 +++++++++++++++- 6 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 lib/selfpipe.cc create mode 100644 lib/selfpipe.h commit 2971ceacb9ccd75126996669a0ed92e8b9a6dc8e Author: Bruce Guenter Date: Mon Apr 9 23:28:54 2007 +0000 Added support in nullmailer-inject for $NULLMAILER_QUEUE to name the program which is used to queue messages. NEWS | 2 ++ doc/nullmailer-inject.1 | 6 ++++++ src/inject.cc | 18 ++++++++++-------- test/functions | 25 ++++++++++++++++++++----- test/tests/inject/queue | 14 ++++++++++++++ 5 files changed, 52 insertions(+), 13 deletions(-) create mode 100644 test/tests/inject/queue commit 7daab6d2e608a08b42ee61751def5b3231a5e01b Author: Bruce Guenter Date: Mon Apr 9 16:01:16 2007 +0000 Bumped version to 1.04 NEWS | 6 ++++++ README | 2 +- configure.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) commit 99833fecba790016eb54869fe342205e1b8055c5 Author: Bruce Guenter Date: Thu Jun 29 22:16:35 2006 +0000 Added missing setenv.h source file. lib/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5ee39825d5e5835b06bb187b4b9fdc5dd8fa126 Author: Bruce Guenter Date: Thu Jun 29 21:04:48 2006 +0000 Test for the use of getpwnam instead of "unknown" as a last resort on sender addresses. test/tests/inject/from | 4 ++-- test/tests/inject/sender | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 2dc75a869c1d04f9fdd9a2ee20fee0edeec1ff30 Author: Bruce Guenter Date: Thu Jun 29 19:54:12 2006 +0000 Bumped date stamp on the README README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ceeeffe2e118bad2407ed869e969044ee78dc15 Author: Bruce Guenter Date: Thu Jun 29 19:53:40 2006 +0000 Revised how I want to handle bouncing messages. TODO | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fefb4a02f65431fda75f1a93a2a3c4288ba39df8 Author: Bruce Guenter Date: Thu Jun 29 19:30:33 2006 +0000 If the sender name cannot be determined from the environment variables, try to pull it from /etc/passwd before using "unknown". Thanks Roderick Schertler Mail from cron gets an envelope sender address of "unknown" because it doesn't set $LOGNAME or $USER in the environment. This patch fixes it by having nullmailer-inject try getpwnam() for the name if the environment variables aren't set. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=218326 NEWS | 4 ++++ doc/nullmailer-inject.1 | 5 +++-- src/inject.cc | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) commit 0a65f1b7513554aa4794a65b108f33ac486cd0f0 Author: Bruce Guenter Date: Tue Jun 27 23:22:42 2006 +0000 Fixed netstring length bug in QMQP sending module. NEWS | 2 ++ protocols/qmqp.cc | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit b47012b6aab40fc900d822b2c9909e011ff4d1ab Author: Bruce Guenter Date: Tue Jun 27 23:22:13 2006 +0000 Fixed compile breakage on Solaris due to use of setenv. NEWS | 2 ++ lib/Makefile.am | 3 ++- lib/{config_readint.cc => setenv.cc} | 29 +++++++++++++++++------------ lib/setenv.h | 6 ++++++ src/send.cc | 1 + src/sendmail.cc | 20 +------------------- 6 files changed, 29 insertions(+), 32 deletions(-) copy lib/{config_readint.cc => setenv.cc} (64%) create mode 100644 lib/setenv.h commit cde4bc394cbdb05ffebe96659fcf400b297b8251 Author: Bruce Guenter Date: Fri Jun 23 18:40:00 2006 +0000 Fixed the SMTP protocol module to send EHLO instead of HELO when doing authentication. Thanks to Norbert Tretkowski for the suggestion. NEWS | 6 +++++- protocols/smtp.cc | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) commit 8ac930b89d7ad4a5f1ff2db6c2dcc223e518156c Author: Bruce Guenter Date: Fri Jun 23 15:20:29 2006 +0000 Added support for the SMTP AUTH LOGIN method. NEWS | 2 ++ doc/nullmailer-send.8 | 7 +++++++ protocols/protocol.cc | 5 ++++- protocols/protocol.h | 3 +++ protocols/smtp.cc | 31 ++++++++++++++++++++----------- 5 files changed, 36 insertions(+), 12 deletions(-) commit 8910fae6567878c83972a729d812330878f3af2f Author: Bruce Guenter Date: Thu Jun 22 17:08:08 2006 +0000 Fixed the SMTP protocol module to send QUIT on protocol failures. NEWS | 1 + protocols/smtp.cc | 2 ++ 2 files changed, 3 insertions(+) commit f6352bb34ee4460833b436f0a42e57094f85ad11 Author: Bruce Guenter Date: Thu Jun 22 17:07:34 2006 +0000 Bumped version to 1.03 NEWS | 6 ++++++ README | 2 +- configure.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) commit 5d7dc2399ce42378497cd8d601cd95800d1aa1ad Author: Bruce Guenter Date: Thu Jun 22 17:00:19 2006 +0000 Rename Copyright to License in spec. spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 031244d3092619ead6285b1d2eb61ba089264b80 Author: Bruce Guenter Date: Tue Jan 10 04:31:19 2006 +0000 Bumped the date and version on the README. README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c7789de1ff5957c8db6995317947cbb7f4d5191e Author: Bruce Guenter Date: Wed Dec 7 22:59:13 2005 +0000 Fixed bug in SMTP AUTH that would cause SMTP sending to crash with a segfault when it was used. NEWS | 2 ++ protocols/smtp.cc | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 185b75a8bac9dbe8be395b392de1934c459618dc Author: Bruce Guenter Date: Wed Dec 7 22:58:24 2005 +0000 Bumped version to 1.02 NEWS | 6 ++++++ configure.in | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 08ca3d9b16eab9d148e5963e768c41ab4b821074 Author: Bruce Guenter Date: Thu Nov 10 16:12:06 2005 +0000 Adjusted email addresses to point to untroubled.org AUTHORS | 2 +- BUGS | 2 +- README | 2 +- lib/address-old.cc | 6 +++--- lib/address.cc | 6 +++--- lib/base64.cc | 6 +++--- lib/canonicalize.cc | 6 +++--- lib/config_read.cc | 6 +++--- lib/config_readint.cc | 6 +++--- lib/config_readlist.cc | 6 +++--- lib/errcodes.cc | 6 +++--- lib/hostname.cc | 6 +++--- lib/makefield.cc | 6 +++--- lib/tcpconnect.cc | 6 +++--- makedist.in | 2 +- protocols/protocol.cc | 6 +++--- protocols/qmqp.cc | 6 +++--- protocols/smtp.cc | 6 +++--- spec | 6 +++--- src/inject.cc | 6 +++--- src/mailq.cc | 6 +++--- src/queue.cc | 6 +++--- src/send.cc | 6 +++--- src/sendmail.cc | 6 +++--- test/tests/protocols | 8 ++++---- 25 files changed, 68 insertions(+), 68 deletions(-) commit d69ef12cb81402bf881f064cb0cc64c947f2bf48 Author: Bruce Guenter Date: Thu Nov 10 16:08:00 2005 +0000 Updated the release date in the README file. README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f121ae04b3c9345fc9594ff23b029f67908adbb Author: Bruce Guenter Date: Thu Nov 10 16:07:00 2005 +0000 Touched up note about SMTP AUTH implementation, since it has been heavily modified. NEWS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d88aa91ae567b2fb79980c72bbde94dce189795e Author: Bruce Guenter Date: Mon Nov 7 18:31:35 2005 +0000 Roll back the mistakenly increased value of cli_args_max in protocols/protocol.cc protocols/protocol.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa37094d53833ef3c8d71a5e11ab9718f540c5a7 Author: Bruce Guenter Date: Mon Nov 7 18:30:24 2005 +0000 Break up the --auth option to protocols into --user and --pass. doc/nullmailer-send.8 | 2 +- protocols/protocol.cc | 9 ++++++--- protocols/protocol.h | 4 +++- protocols/smtp.cc | 8 ++------ 4 files changed, 12 insertions(+), 11 deletions(-) commit a4b284f66d595dff455bf42e7c7ce0e0b5b78256 Author: Bruce Guenter Date: Wed Nov 2 17:58:50 2005 +0000 Simplified the logic of breaking the "user,pass" string into its two parts. protocols/smtp.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 203770e20d27331290ce3e01efc512c8cc9d6286 Author: Bruce Guenter Date: Wed Nov 2 17:57:22 2005 +0000 Moved the common "auth" global into protocol.cc, making it default to NULL instead of an empty string. protocols/protocol.cc | 1 + protocols/protocol.h | 2 +- protocols/qmqp.cc | 1 - protocols/smtp.cc | 3 +-- 4 files changed, 3 insertions(+), 4 deletions(-) commit 3cad91f34674656cbadd9f26584e968fa323aa84 Author: Bruce Guenter Date: Wed Nov 2 17:52:21 2005 +0000 Broken the base64 conversion out of protocols/smtp.cc (and simplified it greatly in the process). TODO | 2 -- lib/Makefile.am | 1 + lib/base64.cc | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++ lib/base64.h | 10 +++++++++ protocols/smtp.cc | 67 +++++-------------------------------------------------- 5 files changed, 80 insertions(+), 63 deletions(-) create mode 100644 lib/base64.cc create mode 100644 lib/base64.h commit e6a655c635fce55aa4d365ed8d689777795ae0a4 Author: Bruce Guenter Date: Wed Nov 2 17:11:22 2005 +0000 Added support for SMTP AUTH PLAIN Thanks Ace Jones NEWS | 2 ++ TODO | 4 +++ doc/nullmailer-send.8 | 5 ++-- protocols/protocol.cc | 4 ++- protocols/protocol.h | 1 + protocols/qmqp.cc | 1 + protocols/smtp.cc | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 83 insertions(+), 3 deletions(-) commit a2cfd3adb3650e4fadfda84ec6c4436035a5d889 Author: Bruce Guenter Date: Wed Nov 2 16:50:37 2005 +0000 Fixed compile error in lib/list.h NEWS | 1 + lib/list.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit e24ff7d1187fff34bacee4b3e9f68494a3fb1f1e Author: Bruce Guenter Date: Wed Nov 2 16:50:11 2005 +0000 Bumped version to 1.01 NEWS | 6 ++++++ README | 2 +- configure.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) commit e96902b673a4e2494ca245d29b7bd47e67e8d8a2 Author: Bruce Guenter Date: Mon Feb 28 17:54:04 2005 +0000 Fixed up lib Makefile to properly dist the ac directory. lib/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8e91d48269e281d31bb27bcfa8e08771d23bdb41 Author: Bruce Guenter Date: Mon Feb 28 17:49:53 2005 +0000 Renamed ac/time.h to ac/systime.h to prevent #include recursion. lib/makefield.cc | 2 +- src/send.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 759016a2030267b6effb407e626f696db26ce9ec Author: Bruce Guenter Date: Mon Feb 28 17:28:34 2005 +0000 Updated dates, version, and em.ca URLs. README | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4a4da64bc6e79126d6684b9973aa4bfb1672c658 Author: Bruce Guenter Date: Mon Feb 28 17:28:11 2005 +0000 Removed note about my daemontools RPMs as they are no longer really mailtained. HOWTO | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3fc2cc552bead7c3c2ddc797ccc4e28b786ee4f0 Author: Bruce Guenter Date: Mon Feb 28 17:27:45 2005 +0000 Added some TODOs for protocols, I just want to get 1.00 out the door. TODO | 4 ++++ 1 file changed, 4 insertions(+) commit 2fc95aa6bdf7937dd20573e435776e66767b0639 Author: Bruce Guenter Date: Mon Feb 28 17:20:39 2005 +0000 Updated links to em.ca to untroubled.org makedist.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 48ed6d1ab193122319518d8969997a7634816fdf Author: Bruce Guenter Date: Mon Feb 28 17:20:15 2005 +0000 Removed note about documentation fix. TODO | 2 -- 1 file changed, 2 deletions(-) commit e7466bbfa007c6c2507230d173f5b7fd6ed25e4f Author: Bruce Guenter Date: Sat Feb 26 00:14:31 2005 +0000 Bumped version to 1.00 (no RC status) NEWS | 5 +---- README | 2 +- configure.in | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) commit 7d747a340849ff4da7f4cfcc3dd73b15cc1f4ae5 Author: Bruce Guenter Date: Sat Feb 26 00:07:54 2005 +0000 Removed extra TODO item as nullmailer-inject already handles it. TODO | 3 --- 1 file changed, 3 deletions(-) commit 7e937ae6838f4f048eada733ee3834d530a1c04a Author: Bruce Guenter Date: Sat Feb 26 00:06:16 2005 +0000 Fixed bug in handling headers containing CR+LF line endings. NEWS | 2 ++ TODO | 3 --- src/inject.cc | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) commit c67c5eaad79527bce438b99040e3c2c837fbd318 Author: Bruce Guenter Date: Fri Feb 25 23:52:31 2005 +0000 Use a plain grep instead of formail to extract header entries. test/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38b45971581c15e86248ec96e8b650653de7c2c4 Author: Bruce Guenter Date: Fri Feb 25 23:52:15 2005 +0000 Use the "-n" argument to head and tail commands. test/tests/inject/recips | 2 +- test/tests/inject/sender | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 0cdb3f5ea009a7ace06f1ea34721fc064e87e85c Author: Bruce Guenter Date: Fri Feb 25 23:50:11 2005 +0000 Fixed bug in header parsing that would cause the last header line to be repeated if there was no body. NEWS | 3 +++ src/inject.cc | 1 + 2 files changed, 4 insertions(+) commit ff8d1b990502c773124ebd024a5dc027260b98dd Author: Bruce Guenter Date: Fri Feb 25 22:33:59 2005 +0000 Adjusted usage for newest automake 1.9 and autoconf 2.59 tools. acconfig.h | 21 --------------------- acinclude.m4 | 58 +++++++++++++++++++++++++--------------------------------- configure.in | 8 +++++--- 3 files changed, 30 insertions(+), 57 deletions(-) delete mode 100644 acconfig.h commit 02301e054d43c30b605ff6e53e020b30bf80feb4 Author: Bruce Guenter Date: Mon Feb 21 22:23:55 2005 +0000 Fixed problem with multiple arguments to protocol modules. Thanks Sascha Silbe NEWS | 3 +++ src/send.cc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit b6ec5afabea7bb06d19d78ac3e64e4f7ee13bc61 Author: Bruce Guenter Date: Mon Feb 21 16:56:44 2005 +0000 Fixed extraneous spaces in SMTP sender. NEWS | 2 ++ protocols/smtp.cc | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit 22c89ba9c04455da98b2bba073e1e74ec9bfe3cb Author: Bruce Guenter Date: Wed Feb 12 23:47:07 2003 +0000 Added reference to "me" config file in top-level documentation. doc/nullmailer.7 | 1 + 1 file changed, 1 insertion(+) commit 1ec58eba7492a3a17bb2609e87c7080292cba95d Author: Bruce Guenter Date: Wed Jan 15 17:34:45 2003 +0000 Fixed a bug in reporting errors in the result string -- they do need a newline. test/address-test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 162bae93b1c6376d7104bd9572e80f09de40d39b Author: Bruce Guenter Date: Wed Jan 15 17:34:08 2003 +0000 Fixed the address parser handling domain names with trailing periods. NEWS | 2 ++ lib/address.cc | 5 +++-- test/address-test.cc | 8 ++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) commit 499aaf4797e2fb4c007612b495324c24ccc28d57 Author: Bruce Guenter Date: Mon Jan 13 20:21:50 2003 +0000 Fixed the warning on the cli_options list end marker. Patch from Martin Godisch protocols/protocol.cc | 2 +- src/inject.cc | 2 +- src/sendmail.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 9a02750cc3cbe0f1b8ef6743470b2c6b84cd29da Author: Bruce Guenter Date: Sun Jan 12 04:31:15 2003 +0000 Handle the "-bs" flag in the sendmail wrapper by dieing when we see it. http://bugs.debian.org/170079 Patch from Martin Godisch NEWS | 2 ++ src/sendmail.cc | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) commit a1763f70cd0407894320de203ebf7541a78a7339 Author: Bruce Guenter Date: Sun Jan 12 04:27:24 2003 +0000 Fixed some compile warnings. Patch from Martin Godisch lib/list.h | 9 +++++---- src/sendmail.cc | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) commit 83dcee3a92c4acedd8a68f4e544d07b9e30a2561 Author: Bruce Guenter Date: Sun Jan 12 04:25:07 2003 +0000 Made permissions on queued files more strict. http://bugs.debian.org/164951 NEWS | 2 ++ src/queue.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 6382e441d3a332bf170bc9eeb25186ee45bb6090 Author: Bruce Guenter Date: Sun Jan 12 04:24:18 2003 +0000 Bumped version up to 1.00RC8 NEWS | 11 ++++++++--- configure.in | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) commit 1aeae0c1cca00e85fb620212a49c8d9b73627358 Author: Bruce Guenter Date: Fri Jan 3 23:10:21 2003 +0000 Removed old items. TODO | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) commit 0d8c3e7333b07cfb23ab431ceb1a288a8d122301 Author: Bruce Guenter Date: Fri Jan 3 23:09:46 2003 +0000 Added note about setting up the "me" config file. HOWTO | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 9b80fcc1c41399f83c476bf445bbf331dbb142ec Author: Bruce Guenter Date: Fri Jan 3 21:49:25 2003 +0000 Bumped up the version to 1.00RC7 README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35d3211c2104584cc2bf3982680a452afb3e6515 Author: Bruce Guenter Date: Fri Jan 3 21:49:13 2003 +0000 Added the ChangeLog.old file to the list of extras. makedist.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff31729908d8581446c724acb25b5571bd65f017 Author: Bruce Guenter Date: Fri Jan 3 21:02:46 2003 +0000 Updated dates on copyright marks. README | 4 ++-- lib/address-old.cc | 2 +- lib/address.cc | 2 +- lib/canonicalize.cc | 2 +- lib/config_read.cc | 2 +- lib/config_readint.cc | 2 +- lib/config_readlist.cc | 2 +- lib/errcodes.cc | 2 +- lib/hostname.cc | 2 +- lib/makefield.cc | 2 +- lib/tcpconnect.cc | 2 +- makedist.in | 2 +- protocols/protocol.cc | 2 +- protocols/qmqp.cc | 2 +- protocols/smtp.cc | 2 +- src/inject.cc | 2 +- src/mailq.cc | 2 +- src/queue.cc | 2 +- src/send.cc | 2 +- src/sendmail.cc | 2 +- 20 files changed, 21 insertions(+), 21 deletions(-) commit 43be0087a7242853132c6fc6a53a132a5a146bf7 Author: Bruce Guenter Date: Fri Jan 3 21:02:18 2003 +0000 Renamed ChangeLog to allow use of svn-generated ChangeLog ChangeLog => ChangeLog.old | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ChangeLog => ChangeLog.old (100%) commit 376394e1af0f25e8ea0b168da70a79e9cffa6b08 Author: Bruce Guenter Date: Fri Jan 3 20:51:59 2003 +0000 Added a one-shot mode to nullmailer-send. NEWS | 3 +++ doc/nullmailer-send.8 | 4 ++++ src/send.cc | 1 + 3 files changed, 8 insertions(+) commit ab8a90edce7c7f445e9729489b76e571f337f226 Author: Bruce Guenter Date: Fri Jan 3 20:40:21 2003 +0000 Reset reload_files to false when the files are reloaded. src/send.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f2291a8bcc42973f02ba8f1d09e4cb46cb6c6862 Author: Bruce Guenter Date: Fri Dec 27 14:28:33 2002 +0000 Fixed typo in smtp.cc -- "me" should be "hh". NEWS | 2 ++ protocols/smtp.cc | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) commit b8c300ae4d5f6ee27c133a61d463ea0dd75ecad0 Author: Bruce Guenter Date: Fri Dec 27 14:24:33 2002 +0000 Bumped up version to 1.00RC7 NEWS | 12 +++++++++--- configure.in | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) commit b39514ec1935d22571c94ccd187a3c7f7d04c834 Author: Bruce Guenter Date: Mon Dec 23 20:50:55 2002 +0000 Removed CVS note. README | 4 ---- 1 file changed, 4 deletions(-) commit 4731fbd50f1e8ce9891cef664098a7f28def057f Author: Bruce Guenter Date: Mon Dec 23 20:50:42 2002 +0000 Set date to today. README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 851cbab77a8f6018052d3a4df4a370b1eb7fd4b0 Author: Bruce Guenter Date: Mon Dec 23 18:25:01 2002 +0000 Added note about new protocol module messages, new control file, and FutureQuest sponsorship. NEWS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8dc1b3d69d0192db41f9bafc7b8a0cc7d8d8c178 Author: Bruce Guenter Date: Mon Dec 23 18:22:39 2002 +0000 Fixups: also show the failure message, and use the proper exit code. protocols/protocol.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 7868ecfff640373774da7aa88f74ed0aaf6a183d Author: Bruce Guenter Date: Mon Dec 23 18:19:58 2002 +0000 Show success messages as well. protocols/protocol.cc | 6 ++++++ protocols/protocol.h | 1 + protocols/qmqp.cc | 2 +- protocols/smtp.cc | 28 ++++++++++++++-------------- 4 files changed, 22 insertions(+), 15 deletions(-) commit d66b1aec1546c236dfc033ee69e815a99147df50 Author: Bruce Guenter Date: Mon Dec 23 18:14:11 2002 +0000 Removed the superfluous "QUIT" command. protocols/smtp.cc | 1 - 1 file changed, 1 deletion(-) commit 3f030145f445adbbda33670f1ee620a776c4959a Author: Bruce Guenter Date: Mon Dec 23 18:11:57 2002 +0000 Output error messages when exiting with a failure code. protocols/protocol.cc | 18 +++++++++++++----- protocols/protocol.h | 6 ++++-- protocols/qmqp.cc | 27 +++++++++++++-------------- protocols/smtp.cc | 17 ++++++++--------- 4 files changed, 38 insertions(+), 30 deletions(-) commit cf5c0011a4b88eb89582b1f61d5b0f7916f59000 Author: Bruce Guenter Date: Mon Dec 23 18:11:03 2002 +0000 Allow protocol modules to output their own error messages. src/send.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c284b3127232e5f3b125d6577b39cb8fa5c0e00d Author: Bruce Guenter Date: Mon Dec 23 17:52:49 2002 +0000 Make sure to remove default{domain,host} before testing use of "me". test/tests/inject/from | 1 + test/tests/inject/sender | 1 + 2 files changed, 2 insertions(+) commit dde9fa660686a66ae8ef11ce8dff3b5f4f95d51f Author: Bruce Guenter Date: Mon Dec 23 17:52:22 2002 +0000 Use the "me" control as the hostname to remap with adminaddr. doc/nullmailer-queue.8 | 9 +++------ src/queue.cc | 4 +--- 2 files changed, 4 insertions(+), 9 deletions(-) commit 25c573a9cbdf65536e2804759544d5d7404fae4b Author: Bruce Guenter Date: Mon Dec 23 17:51:17 2002 +0000 Use the "me" control as the idhost, not a default file. src/inject.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 45943686ddb59555396a93757150f903de3c89a5 Author: Bruce Guenter Date: Mon Dec 23 17:50:38 2002 +0000 Fixed up and documented the default host/domain rules. doc/nullmailer-inject.1 | 12 ++++++++---- lib/hostname.cc | 15 +++++++++++---- 2 files changed, 19 insertions(+), 8 deletions(-) commit f6c69210eb981915189202e545691b867e82dfbd Author: Bruce Guenter Date: Mon Dec 23 17:38:45 2002 +0000 Only append a "." to the domain name (when appending the defaultdomain) if it isn't empty. lib/canonicalize.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecde7805dd7a5a81a9a72e3efcc5b3c7bdeea7a8 Author: Bruce Guenter Date: Mon Dec 23 17:27:33 2002 +0000 Auto-create /etc/nullmailer/{me,defaultdomain} on install. spec | 6 ++++++ 1 file changed, 6 insertions(+) commit 9d9cf4abe2823f064490353e65050454e03ec5dd Author: Bruce Guenter Date: Mon Dec 23 17:22:36 2002 +0000 Fixed up tests for the new "me" control file. test/functions | 4 ++-- test/tests/inject/from | 5 ++--- test/tests/inject/message-id | 5 ++--- test/tests/inject/sender | 15 ++++----------- test/tests/protocols | 1 + test/tests/queue/rewrite | 3 +-- 6 files changed, 12 insertions(+), 21 deletions(-) commit 2dcada1a8420f0cd2071f7d5400d36d90da9168f Author: Bruce Guenter Date: Mon Dec 23 16:59:48 2002 +0000 Fixup the tests for the more strict bash2 syntax. test/functions | 10 ++++++---- test/tests/inject/bad-headers | 2 +- test/tests/inject/date | 2 +- test/tests/inject/from | 2 +- test/tests/inject/message-id | 2 +- test/tests/inject/recips | 6 +++--- test/tests/inject/return-path | 2 +- test/tests/inject/sender | 6 +++--- 8 files changed, 17 insertions(+), 15 deletions(-) commit a608374d86fa96f1684ac9a97e20ee5ad905c797 Author: Bruce Guenter Date: Mon Dec 23 16:59:26 2002 +0000 Skip over the .svn directory instead of the CVS directory. test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b969ad0011e096337e1df8b726a4dab31009ac5e Author: Bruce Guenter Date: Tue Dec 17 17:49:04 2002 +0000 Renamed lib/cli to lib/cli++ configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit beec6d81cdddd0e97075f0376a7695f8eace77d8 Author: Bruce Guenter Date: Sun Dec 15 05:36:45 2002 +0000 Renamed lib/cli to lib/cli++ to match the current sources. lib/Makefile.am | 2 +- protocols/Makefile.am | 6 +++--- protocols/protocol.cc | 2 +- src/Makefile.am | 6 +++--- src/inject.cc | 2 +- src/sendmail.cc | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) commit 6236adb6505b8de30d84cd21c77e2fde431813ef Author: Bruce Guenter Date: Sun Dec 15 05:29:43 2002 +0000 *** empty log message *** TODO | 7 +++++++ 1 file changed, 7 insertions(+) commit d61f752fbb528a39e25dee76318ee0710c86761e Author: Bruce Guenter Date: Sun Dec 15 05:29:39 2002 +0000 Added some empty address list tests. test/address-test.cc | 8 ++++++++ 1 file changed, 8 insertions(+) commit f6bd9e96236bc9d15ace31b3a9bcf8f417bd2453 Author: Bruce Guenter Date: Sun Dec 15 05:29:06 2002 +0000 Clarified documentation. doc/nullmailer-inject.1 | 3 +++ doc/nullmailer-send.8 | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) commit da5599048065408b11898be922d8666b9ac42fb3 Author: Bruce Guenter Date: Sun Dec 15 05:28:13 2002 +0000 Remove the CXXLINK hack that prevents compilation with newer versions of gcc. protocols/Makefile.am | 1 - src/Makefile.am | 1 - test/Makefile.am | 1 - 3 files changed, 3 deletions(-) commit 7b404a44924cab6728dce8b44ad87148ab12a3a4 Author: Bruce Guenter Date: Sun Dec 15 05:27:40 2002 +0000 Pass $HELOHOST on to the protocol modules. protocols/smtp.cc | 3 ++- src/send.cc | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit da880344f08b66367f1017eb5963450d5c916e91 Author: Bruce Guenter Date: Sun Dec 15 05:21:51 2002 +0000 Completed the conversion from hostname() to the new config files. lib/canonicalize.cc | 4 +-- lib/hostname.cc | 70 +++++++++-------------------------------------------- lib/hostname.h | 7 ++++-- protocols/smtp.cc | 3 ++- src/inject.cc | 8 +----- src/queue.cc | 6 +---- 6 files changed, 21 insertions(+), 77 deletions(-) commit abf914f1e1c9c0f083760a2ac5fc4dc474ebce12 Author: Bruce Guenter Date: Sun Dec 15 03:18:09 2002 +0000 Fixed a bug in the setenv function in sendmail.cc. NEWS | 2 ++ 1 file changed, 2 insertions(+) commit 6d6b72544f4f345a6b811fcb18035eedb848a612 Author: Bruce Guenter Date: Sat Sep 22 05:15:29 2001 +0000 The parameter for putenv must not be automatic. src/sendmail.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0bfd0e7986ed7eef63c763723a13beb5cb0aac6e Author: Bruce Guenter Date: Sun Aug 26 03:49:12 2001 +0000 Drop address header fields with blank contents. src/inject.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 0eb76674d28ec00176cda2e21e04c8eacf825450 Author: Bruce Guenter Date: Sun Aug 26 03:46:23 2001 +0000 Completed handling empty address lists. lib/address.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit da92f1e915dfceb6502047b3f0388e90987a303f Author: Bruce Guenter Date: Sun Aug 26 03:15:31 2001 +0000 Modified to properly parse an empty address field as empty. lib/address.cc | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit f9623df6d301f8092e033e1506defa51f9428189 Author: Bruce Guenter Date: Tue Jul 10 01:39:40 2001 +0000 Updated for the new untroubled.org web site. makedist.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 432fea67613a7a32218d4ae3b6826b74182c7b67 Author: Bruce Guenter Date: Tue Jul 10 01:39:18 2001 +0000 *** empty log message *** NEWS | 7 +++++++ README | 6 ++++++ TODO | 21 +++++++++++++++++++-- 3 files changed, 32 insertions(+), 2 deletions(-) commit 853dabd29822cc4b25dd56a652bd028d888e0199 Author: Bruce Guenter Date: Tue Jul 10 01:38:54 2001 +0000 Redirect stderr to stdout before starting anything else to catch error messages. scripts/nullmailer.run | 1 + 1 file changed, 1 insertion(+) commit dbb47f9cecb13595241cd7daeb3bc6af27a930e9 Author: Bruce Guenter Date: Tue Jul 10 01:38:29 2001 +0000 Fixed a quoting bug with handling lines starting with ".". protocols/smtp.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f353c7acadf52776286d3ff59406a20513570b90 Author: Bruce Guenter Date: Tue Jul 10 01:37:33 2001 +0000 Tidied up the library function checks. configure.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dacc07ea5f76fc94775e60b8e724754647383c97 Author: Bruce Guenter Date: Tue Jul 10 01:36:59 2001 +0000 Added an ignored option entry from the sendmail "-m" option. src/sendmail.cc | 1 + 1 file changed, 1 insertion(+) commit efbb131064feceb37660df104c68fd1bf4c525b5 Author: Bruce Guenter Date: Thu Mar 29 21:57:30 2001 +0000 Fixed instructions on RPM startup. HOWTO | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6398dc58e24a54ee71115d6f2cabaee8d067646d Author: Bruce Guenter Date: Thu Mar 29 21:57:06 2001 +0000 *** empty log message *** TODO | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit b1e425291726b6fa8cc437e06f440991a0fe770d Author: Bruce Guenter Date: Thu Mar 29 21:56:36 2001 +0000 Removed unnecessary init.d directory, and added in the man7 pages. spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 45dbeb96ea19ca1a64f9edd16ad12e2714772ae8 Author: Bruce Guenter Date: Tue Feb 27 22:38:05 2001 +0000 Fixed some include file problems with sys/time.h. NEWS | 4 ++-- configure.in | 4 ++-- lib/makefield.cc | 2 +- src/send.cc | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 7cdfa39c46ee4b934d7ad21ba7414e38cf135194 Author: Bruce Guenter Date: Wed Feb 7 21:45:32 2001 +0000 *** empty log message *** ChangeLog | 5 +++++ README | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 29bf85c4dd9fb2f27c27fd94c48df4389c3ba9b8 Author: Bruce Guenter Date: Wed Feb 7 21:45:13 2001 +0000 Modified to always attempt to send everything in the queue. src/send.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 74e72decb13a35cad74750daf08a23d2f7c71c85 Author: Bruce Guenter Date: Fri Feb 2 02:30:36 2001 +0000 Bumped up version number to 1.00RC6. ChangeLog | 4 ++++ NEWS | 11 ++++++++--- TODO | 5 +++++ configure.in | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) commit 4a6ad6d42872d58eaac0604e28c05fd852ee52e3 Author: Bruce Guenter Date: Fri Feb 2 02:28:53 2001 +0000 Added a missing include. lib/hostname.cc | 1 + src/send.cc | 1 + 2 files changed, 2 insertions(+) commit 29e1d10faada18b867f5ffa0b84abaa38625c189 Author: Bruce Guenter Date: Sat Dec 30 10:22:46 2000 +0000 Added 1.00RC5 release notes. NEWS | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 11a605944d897d9bfb51abcbc5a65af9db673b84 Author: Bruce Guenter Date: Sat Dec 30 10:18:42 2000 +0000 *** empty log message *** makedist.in | 3 ++- spec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 841ccae483442aba48ad0d9b8312beea0a4bb5f0 Author: Bruce Guenter Date: Sat Dec 30 10:16:46 2000 +0000 Make the service directory. spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5a02d72560f8a58149d907408b6d6d55759879e Author: Bruce Guenter Date: Sat Dec 30 10:12:45 2000 +0000 Bumped up version number. README | 4 ++-- configure.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 0a0590220eacca1bb7965d414d2aab2ca26b4675 Author: Bruce Guenter Date: Sat Dec 30 09:47:26 2000 +0000 Removed unnecessary init script. scripts/nullmailer.init | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 scripts/nullmailer.init commit adad7709bf7490eb355ff5eeede0a1d3b60be3e5 Author: Bruce Guenter Date: Sat Dec 30 09:47:17 2000 +0000 Modified to use supervise-scripts 3. spec | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) commit d62e97b74d464bb7863fb755272a7fa33c3b8578 Author: Bruce Guenter Date: Sat Dec 30 09:41:21 2000 +0000 Return proper error codes for permanent and temporary SMTP failures. protocols/smtp.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit c6654636d6e2812e371ee1193e815412ea117a20 Author: Bruce Guenter Date: Sat Dec 30 09:41:02 2000 +0000 Fixed the prototype for getdomainname. lib/hostname.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef0704b64da065036a7193dbfd5141043ac00aad Author: Bruce Guenter Date: Sat Dec 30 09:40:44 2000 +0000 *** empty log message *** ChangeLog | 9 +++++++++ HOWTO | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) commit 3adb189998e0f75e03129a017fbc1d399739303e Author: Bruce Guenter Date: Wed Aug 30 20:58:37 2000 +0000 Moved extern declaration of getdomainname out of the function. lib/hostname.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 5cede356e41da63b71a1efa0d8a5887dbe847a18 Author: Bruce Guenter Date: Tue Aug 29 05:11:45 2000 +0000 Added missing INSTALL dist file. Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37b555d7173f83a89bdfdb7324a041d8d39c281a Author: Bruce Guenter Date: Tue Aug 29 05:11:09 2000 +0000 Renamed the script files. scripts/{run-log => nullmailer-log.run} | 0 scripts/{init => nullmailer.init} | 0 scripts/{run-svc => nullmailer.run} | 0 spec | 6 +++--- 4 files changed, 3 insertions(+), 3 deletions(-) rename scripts/{run-log => nullmailer-log.run} (100%) rename scripts/{init => nullmailer.init} (100%) rename scripts/{run-svc => nullmailer.run} (100%) commit 195f92e0b52b263cf908701fa929a277eb14ca12 Author: Bruce Guenter Date: Tue Aug 29 00:07:50 2000 +0000 Fixed up forgotten ChangeLog entries. ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) commit 9685b2cccd7befeb33631da041d93544b5425fe7 Author: Bruce Guenter Date: Tue Aug 29 00:00:15 2000 +0000 Final RC4 update. NEWS | 8 +++++--- README | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) commit 46994cdeb5a3d6331e9e6a069273677ed5ffb694 Author: Bruce Guenter Date: Mon Aug 28 23:58:38 2000 +0000 Test addresses with trailing periods. test/address-test.cc | 4 ++++ 1 file changed, 4 insertions(+) commit b7deddd27024f40efb9605d8db0e3bba11233377 Author: Bruce Guenter Date: Mon Aug 28 23:57:43 2000 +0000 Fixed to handle addresses with trailing periods. lib/address.cc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 022a4edce2341a45836c75492f0bf33f45b5e281 Author: Bruce Guenter Date: Wed Aug 16 01:28:46 2000 +0000 Added extern declaration of getdomainname for systems that don't declare it. lib/hostname.cc | 1 + 1 file changed, 1 insertion(+) commit d13669d5bec5b7d2d451b35429cb72371e4fe876 Author: Bruce Guenter Date: Wed Aug 16 01:28:25 2000 +0000 *** empty log message *** ChangeLog | 5 +++++ NEWS | 1 + TODO | 4 ---- 3 files changed, 6 insertions(+), 4 deletions(-) commit 5dd4e7c4559d934c603b7440f56f8b9c65d0c7b1 Author: Bruce Guenter Date: Wed Aug 16 01:21:22 2000 +0000 Updated install instructions in HOWTO, removed the modified INSTALL document. HOWTO | 22 ++++---- INSTALL | 184 ---------------------------------------------------------------- README | 2 +- TODO | 4 ++ 4 files changed, 14 insertions(+), 198 deletions(-) delete mode 100644 INSTALL commit d45b24c27720452fd0c7102a1a6e88bfca4a4b7d Author: Bruce Guenter Date: Wed Aug 16 01:13:24 2000 +0000 Added custom INSTALL instructions. INSTALL | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 INSTALL commit b868ae6ecebc1030a20befbf2619529ed57a775a Author: Bruce Guenter Date: Tue Aug 15 22:45:39 2000 +0000 Ignore warnings from compile output. acinclude.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88f19c732b2ed6f8fdc91a140b4b1076a0f6ef71 Author: Bruce Guenter Date: Mon Aug 14 21:05:51 2000 +0000 Fixed the reversed named pipe bug logic. NEWS | 6 ++++++ acinclude.m4 | 3 ++- configure.in | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) commit e11b9203bf2b7fb2ae57e6f91d3e72349b700fd8 Author: Bruce Guenter Date: Fri Aug 11 11:10:25 2000 +0000 1.00RC3 release checkin. ChangeLog | 2 ++ NEWS | 1 + README | 4 ++-- makedist.in | 13 +++++-------- 4 files changed, 10 insertions(+), 10 deletions(-) commit 294e5aa230f8e6557574c4e6417c5435c738822c Author: Bruce Guenter Date: Fri Aug 11 11:09:41 2000 +0000 Fixed a problem with multiple use of itoa. test/address-test.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 75c881a04cc16ae09c60938fe950c0c0ac9ef560 Author: Bruce Guenter Date: Fri Aug 11 00:48:19 2000 +0000 Added configure test for named pipe bug. ChangeLog | 21 +++++++++++++++++++++ NEWS | 5 +++++ TODO | 11 +++++------ acconfig.h | 2 ++ acinclude.m4 | 34 ++++++++++++++++++++++++++++++++++ configure.in | 4 +++- 6 files changed, 70 insertions(+), 7 deletions(-) commit be2db683e5cb28ebd4701c9554650a3ca6eb4681 Author: Bruce Guenter Date: Fri Aug 11 00:47:53 2000 +0000 Fixed header parsing logic. src/inject.cc | 80 ++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 31 deletions(-) commit 5852e4eb6e687c16f4f242fe957de709e554e3c4 Author: Bruce Guenter Date: Tue Aug 8 11:09:35 2000 +0000 Added code to handle systems that require a writer on the named pipe. src/send.cc | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7c8ee6dd883babf00442b3082bda73b50cb05c5a Author: Bruce Guenter Date: Tue Aug 8 11:08:43 2000 +0000 Added a handler for the -L sendmail option (ignored). src/sendmail.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f45ce51c6178a7e4b799781166c70a1a897457e4 Author: Bruce Guenter Date: Tue Aug 8 11:08:08 2000 +0000 Added man page for the sendmail emulator. doc/Makefile.am | 1 + doc/sendmail.1 | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 doc/sendmail.1 commit c40bd02e6cf8c0a6c3706503ac3f88489f1c0678 Author: Bruce Guenter Date: Tue Aug 8 10:43:47 2000 +0000 Added an overall man page for nullmailer. doc/Makefile.am | 5 +++-- doc/nullmailer.7 | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 doc/nullmailer.7 commit 914c03a6dbbb4e1052090939ee89b91b9cf44cf2 Author: Bruce Guenter Date: Tue Aug 8 10:31:02 2000 +0000 Fixed a typo in the root-install chmods. Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 169c32515a18966632adc2d23df19c83324f3c61 Author: Bruce Guenter Date: Tue Aug 8 10:16:13 2000 +0000 Fixed some typos. lib/tcpconnect.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4c0ee03eb407127c4ba741d2240defaeeb95cbc2 Author: Bruce Guenter Date: Sat Jul 8 00:21:53 2000 +0000 Fixed up release notes. ChangeLog | 2 ++ NEWS | 5 +++++ TODO | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) commit 72e2c21a123deb0636e99f7c140dbb06ce45ecb5 Author: Bruce Guenter Date: Tue Jul 4 09:37:35 2000 +0000 Fixed typo in lib/hostname.cc ChangeLog | 5 +++++ lib/hostname.cc | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) commit 9110a039f500dcdb7158f21a8023a569967d541a Author: Bruce Guenter Date: Wed Jun 28 21:27:46 2000 +0000 Added utsname tests to configure. ChangeLog | 10 ++++++++++ NEWS | 9 +++++++++ acconfig.h | 2 ++ acinclude.m4 | 27 +++++++++++++++++++++++++++ configure.in | 3 ++- 5 files changed, 50 insertions(+), 1 deletion(-) commit 7407ffc714f0ae8b7be3e144b26586b241747ec5 Author: Bruce Guenter Date: Wed Jun 28 21:26:44 2000 +0000 Fixed domain name determination bug, and portability fix in mergelib.sh lib/hostname.cc | 34 ++++++++++++++++++++++++++++------ lib/mergelib.sh | 2 +- 2 files changed, 29 insertions(+), 7 deletions(-) commit ac5526eb24b95b6f39ee009104da2f2c867913c0 Author: Bruce Guenter Date: Wed Jun 28 21:26:05 2000 +0000 Fixed response number bug. protocols/smtp.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b0e7a7464abe860551226e0870dd3f37f6ddc365 Author: Bruce Guenter Date: Tue Jun 20 01:47:50 2000 +0000 Fixed a minor type bug. ChangeLog | 5 +++++ lib/tcpconnect.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) commit b9d8016c91144d1986029bc1bb7ad539c251b233 Author: Bruce Guenter Date: Thu Jun 15 21:26:49 2000 +0000 Final release 1.00RC1 check in. ChangeLog | 2 ++ 1 file changed, 2 insertions(+) commit 4a07e155c61694340e6f797b55bbf48a941dbafa Author: Bruce Guenter Date: Thu Jun 15 21:22:13 2000 +0000 Final 1.00RC1 check in. NEWS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fcae2ba8b7bac005c7b0de960663f6e20c37deb6 Author: Bruce Guenter Date: Thu Jun 15 21:20:59 2000 +0000 Fixed up NEWS and README to reflect new version number. NEWS | 2 +- README | 11 +++++++++++ configure.in | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) commit bf50ea12ddf8170cf5d2cc87bfeee4175d2d617f Author: Bruce Guenter Date: Thu Jun 15 21:13:53 2000 +0000 Fixed up copyright notices. lib/address-old.cc | 21 +++++++++++++++++++++ lib/address.cc | 21 +++++++++++++++++++++ lib/canonicalize.cc | 21 +++++++++++++++++++++ lib/config_read.cc | 21 +++++++++++++++++++++ lib/config_readint.cc | 21 +++++++++++++++++++++ lib/config_readlist.cc | 21 +++++++++++++++++++++ lib/errcodes.cc | 21 +++++++++++++++++++++ lib/hostname.cc | 21 +++++++++++++++++++++ lib/makefield.cc | 21 +++++++++++++++++++++ lib/tcpconnect.cc | 21 +++++++++++++++++++++ protocols/protocol.cc | 4 ++-- protocols/qmqp.cc | 21 +++++++++++++++++++++ protocols/smtp.cc | 21 +++++++++++++++++++++ src/inject.cc | 21 +++++++++++++++++++++ src/mailq.cc | 21 +++++++++++++++++++++ src/queue.cc | 21 +++++++++++++++++++++ src/send.cc | 21 +++++++++++++++++++++ src/sendmail.cc | 4 ++-- 18 files changed, 340 insertions(+), 4 deletions(-) commit 81cbaafd9f3054a18c3b47fe43e8300473b2db21 Author: Bruce Guenter Date: Thu Jun 15 21:13:42 2000 +0000 Added note on bug fix to lib/makefields.cc ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) commit ef8870f75cfb67b2e4745a43ab9cf008fff17165 Author: Bruce Guenter Date: Thu Jun 15 20:59:15 2000 +0000 Removed compiled binary file address-test. test/address-test | Bin 239088 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test/address-test commit e4438a9a7ee6c094b0fa7aa3d07a864482f2e5b5 Author: Bruce Guenter Date: Thu Jun 15 20:58:41 2000 +0000 Fixed include file paths. protocols/Makefile.am | 4 ++-- protocols/protocol.h | 2 +- protocols/qmqp.cc | 4 ++-- protocols/smtp.cc | 4 ++-- src/inject.cc | 12 ++++++------ src/mailq.cc | 2 +- src/queue.cc | 6 +++--- src/send.cc | 2 +- src/sendmail.cc | 4 ++-- test/Makefile.am | 2 +- test/address-test | Bin 231376 -> 239088 bytes test/address-test.cc | 4 ++-- 12 files changed, 23 insertions(+), 23 deletions(-) commit 528cc2d62f77e9d5024494e087b06f194b13411e Author: Bruce Guenter Date: Thu Jun 15 20:58:12 2000 +0000 Fixed include file paths, added missing shell scripts and removed some unnecessary headers. lib/Makefile.am | 13 ++++++++----- lib/address.cc | 2 +- lib/address.h | 2 +- lib/canonicalize.cc | 4 ++-- lib/canonicalize.h | 2 +- lib/config_read.cc | 2 +- lib/config_readint.cc | 2 +- lib/config_readlist.cc | 2 +- lib/configio.h | 2 +- lib/connect.h | 2 +- lib/defines.cc | 8 -------- lib/fdbuf.h | 0 lib/hostname.cc | 4 ++-- lib/make_defines.sh | 9 +++++++++ lib/makefield.cc | 25 ++++++++++--------------- lib/mergelib.sh | 16 ++++++++++++++++ lib/mystring.h | 0 lib/netstring.h | 2 +- 18 files changed, 56 insertions(+), 41 deletions(-) delete mode 100644 lib/defines.cc delete mode 100644 lib/fdbuf.h create mode 100644 lib/make_defines.sh create mode 100644 lib/mergelib.sh delete mode 100644 lib/mystring.h commit 2c137077a1f079c8e3073dee5c45faf172391faf Author: Bruce Guenter Date: Thu Jun 15 20:57:32 2000 +0000 Bumped the version number, and touched up the README and NEWS. NEWS | 6 ++++++ README | 4 +--- configure.in | 2 +- makedist.in | 2 ++ 4 files changed, 10 insertions(+), 4 deletions(-) commit e2dc08d88ac995de9541b544b88e46e393a7079a Author: Bruce Guenter Date: Thu Feb 17 00:24:45 2000 +0000 Imported sources. AUTHORS | 1 + BUGS | 4 + ChangeLog | 435 +++++++++++++++++++++++++++++ HOWTO | 45 +++ Makefile.am | 28 ++ NEWS | 143 ++++++++++ README | 9 + TODO | 5 + YEAR2000 | 10 + acconfig.h | 17 ++ acinclude.m4 | 71 +++++ configure.in | 50 ++++ doc/Makefile.am | 6 + doc/diagram | 21 ++ doc/nullmailer-inject.1 | 240 ++++++++++++++++ doc/nullmailer-queue.8 | 51 ++++ doc/nullmailer-send.8 | 72 +++++ lib/Makefile.am | 36 +++ lib/address-old.cc | 560 ++++++++++++++++++++++++++++++++++++++ lib/address.cc | 619 ++++++++++++++++++++++++++++++++++++++++++ lib/address.h | 8 + lib/canonicalize.cc | 19 ++ lib/canonicalize.h | 7 + lib/config_read.cc | 15 + lib/config_readint.cc | 15 + lib/config_readlist.cc | 23 ++ lib/configio.h | 11 + lib/connect.h | 8 + lib/defines.cc | 8 + lib/defines.h | 13 + lib/errcodes.cc | 24 ++ lib/errcodes.h | 26 ++ lib/fdbuf.h | 0 lib/hostname.cc | 34 +++ lib/hostname.h | 7 + lib/itoa.cc | 23 ++ lib/itoa.h | 11 + lib/list.h | 196 +++++++++++++ lib/listtest.cc | 50 ++++ lib/makefield.cc | 55 ++++ lib/mystring.h | 0 lib/netstring.cc | 13 + lib/netstring.h | 8 + lib/tcpconnect.cc | 46 ++++ makedist.in | 42 +++ protocols/Makefile.am | 11 + protocols/protocol.cc | 52 ++++ protocols/protocol.h | 12 + protocols/qmqp.cc | 113 ++++++++ protocols/smtp.cc | 118 ++++++++ scripts/init | 39 +++ scripts/run-log | 2 + scripts/run-svc | 2 + spec | 93 +++++++ src/Makefile.am | 28 ++ src/address-main.cc | 21 ++ src/inject.cc | 542 ++++++++++++++++++++++++++++++++++++ src/mailq.cc | 38 +++ src/queue.cc | 179 ++++++++++++ src/send.cc | 286 +++++++++++++++++++ src/sendmail.cc | 135 +++++++++ test/Makefile.am | 24 ++ test/address-test | Bin 0 -> 231376 bytes test/address-test.cc | 177 ++++++++++++ test/address-trace.cc | 2 + test/functions | 41 +++ test/tests/inject/bad-headers | 15 + test/tests/inject/date | 12 + test/tests/inject/from | 66 +++++ test/tests/inject/message-id | 24 ++ test/tests/inject/recips | 50 ++++ test/tests/inject/return-path | 9 + test/tests/inject/sender | 76 ++++++ test/tests/protocols | 44 +++ test/tests/queue/rewrite | 45 +++ 75 files changed, 5341 insertions(+) create mode 100644 AUTHORS create mode 100644 BUGS create mode 100644 ChangeLog create mode 100644 HOWTO create mode 100644 Makefile.am create mode 100644 NEWS create mode 100644 README create mode 100644 TODO create mode 100644 YEAR2000 create mode 100644 acconfig.h create mode 100644 acinclude.m4 create mode 100644 configure.in create mode 100644 doc/Makefile.am create mode 100644 doc/diagram create mode 100644 doc/nullmailer-inject.1 create mode 100644 doc/nullmailer-queue.8 create mode 100644 doc/nullmailer-send.8 create mode 100644 lib/Makefile.am create mode 100644 lib/address-old.cc create mode 100644 lib/address.cc create mode 100644 lib/address.h create mode 100644 lib/canonicalize.cc create mode 100644 lib/canonicalize.h create mode 100644 lib/config_read.cc create mode 100644 lib/config_readint.cc create mode 100644 lib/config_readlist.cc create mode 100644 lib/configio.h create mode 100644 lib/connect.h create mode 100644 lib/defines.cc create mode 100644 lib/defines.h create mode 100644 lib/errcodes.cc create mode 100644 lib/errcodes.h create mode 100644 lib/fdbuf.h create mode 100644 lib/hostname.cc create mode 100644 lib/hostname.h create mode 100644 lib/itoa.cc create mode 100644 lib/itoa.h create mode 100644 lib/list.h create mode 100644 lib/listtest.cc create mode 100644 lib/makefield.cc create mode 100644 lib/mystring.h create mode 100644 lib/netstring.cc create mode 100644 lib/netstring.h create mode 100644 lib/tcpconnect.cc create mode 100644 makedist.in create mode 100644 protocols/Makefile.am create mode 100644 protocols/protocol.cc create mode 100644 protocols/protocol.h create mode 100644 protocols/qmqp.cc create mode 100644 protocols/smtp.cc create mode 100644 scripts/init create mode 100644 scripts/run-log create mode 100644 scripts/run-svc create mode 100644 spec create mode 100644 src/Makefile.am create mode 100644 src/address-main.cc create mode 100644 src/inject.cc create mode 100644 src/mailq.cc create mode 100644 src/queue.cc create mode 100644 src/send.cc create mode 100644 src/sendmail.cc create mode 100644 test/Makefile.am create mode 100644 test/address-test create mode 100644 test/address-test.cc create mode 100644 test/address-trace.cc create mode 100644 test/functions create mode 100644 test/tests/inject/bad-headers create mode 100644 test/tests/inject/date create mode 100644 test/tests/inject/from create mode 100644 test/tests/inject/message-id create mode 100644 test/tests/inject/recips create mode 100644 test/tests/inject/return-path create mode 100644 test/tests/inject/sender create mode 100644 test/tests/protocols create mode 100644 test/tests/queue/rewrite nullmailer-1.13/AUTHORS0000664000076400007640000000004510702261073011602 00000000000000Bruce Guenter nullmailer-1.13/depcomp0000755000076400007640000004440011357655707012132 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by 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 outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "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. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #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:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$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: nullmailer-1.13/HOWTO0000664000076400007640000000425710702261073011366 00000000000000Configuration of this program in the typical case is quite simple. 1. Compile and install the program. If you are using the RPM, skip this step. See the INSTALL file for more details. Note that this package is designed to execute as a non-priveleged user named "nullmail". When you do the final install, add the "nullmail" user (typically with either a non-priveleged group or a new "nullmail" group) and run "make install-root" to set up the files with the proper permissions. 2. Set up your hostname in SYSCONFDIR[1]/nullmailer/me. Usually this will be as simple as typing: /bin/hostname >SYSCONFDIR/nullmailer/me You may also wish to set up the defaultdomain and defaulthost configuration files. See the man page for nullmailer-inject for more details. 3. Into the file SYSCONFDIR/nullmailer/remotes, put one line for each of your relay hosts (the computer or computers to which you will send all your mail): HOSTNAME PROTOCOL You will have specified the SYSCONFDIR during configuration of the install step. On most systems, it will be /usr/local/etc. The RPMs use /etc. HOSTNAME is the fully-qualified host name of the relay host, or its numerical IP address. PROTOCOL will typically be "smtp" (without the quotes), but QMQP[2] is also supported with the "qmqp" module. 4. Start nullmailer-send. If you are using the RPM, ignore the rest of the instructions and type: svc-start nullmailer Otherwise, you will need to set up the appropriate scripts to run nullmailer-send in the background, with its output going to a logging program. The following is an appropriate run script for use with daemontools[3]: #!/bin/sh exec setuidgid nullmail nullmailer-send 2>&1 5. You're done! The included sendmail emulator front-end should allow most (if not all) sendmail-compatible programs to run without any changes. See the man page for nullmailer-inject for details on outgoing email message header formatting options. Footnotes: 1. SYSCONFDIR is the system configuration directory, as configured during compilation. It defaults to /usr/local/etc 2. QMQP is a high-speed mail queueing protocol, used with qmail. See http://cr.yp.to/proto/qmqp.html 3. See http://cr.yp.to/daemontools.html. nullmailer-1.13/configure0000775000076400007640000061430712133011470012447 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # # 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 about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_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= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="lib/defines.h" # 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='LTLIBOBJS LIBOBJS TLS_FALSE TLS_TRUE FDBUF_NO_MYSTRING_FALSE FDBUF_NO_MYSTRING_TRUE EGREP GREP CXXCPP MKDIR RM RANLIB am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_tls ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CXXCPP' # 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}' 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 this package 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/PACKAGE] --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 cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-tls Enable SSL/TLS support 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 CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP 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 the package provider. _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 configure 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_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_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_cxx_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_cxx_try_compile # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_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_cxx_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_cxx_try_link # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_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_cxx_preproc_warn_flag$ac_cxx_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_cxx_try_cpp # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_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_cxx_try_run # ac_fn_cxx_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_cxx_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_cxx_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_cxx_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_cxx_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;} ;; 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_cxx_check_header_mongrel # ac_fn_cxx_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_cxx_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_cxx_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_cxx_check_header_compile # ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES # --------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_cxx_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_cxx_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_cxx_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_cxx_check_type # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_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_cxx_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_cxx_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 $as_me, 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 ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu am__api_version='1.10' 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; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=nullmailer VERSION=1.13 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" { $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 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=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .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 # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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_CXX="$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 CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$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_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" 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 CXX=$ac_ct_CXX fi fi fi fi # 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 { $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_cxx_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_cxx_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_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_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_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" 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_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX-g++} accepts -fno-rtti" >&5 $as_echo_n "checking whether ${CXX-g++} accepts -fno-rtti... " >&6; } if ${local_cv_flag_NO_RTTI+:} false; then : $as_echo_n "(cached) " >&6 else echo >conftest.cc if ${CXX-g++} ${CXXFLAGS} -c -fno-rtti conftest.cc >/dev/null 2>&1; then rm -f conftest* local_cv_flag_NO_RTTI=yes else rm -f conftest* local_cv_flag_NO_RTTI=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_cv_flag_NO_RTTI" >&5 $as_echo "$local_cv_flag_NO_RTTI" >&6; } test "$local_cv_flag_NO_RTTI" = yes && CXXFLAGS="$CXXFLAGS -fno-rtti" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX-g++} accepts -fno-exceptions" >&5 $as_echo_n "checking whether ${CXX-g++} accepts -fno-exceptions... " >&6; } if ${local_cv_flag_NO_EXCEPTIONS+:} false; then : $as_echo_n "(cached) " >&6 else echo >conftest.cc if ${CXX-g++} ${CXXFLAGS} -c -fno-exceptions conftest.cc >/dev/null 2>&1; then rm -f conftest* local_cv_flag_NO_EXCEPTIONS=yes else rm -f conftest* local_cv_flag_NO_EXCEPTIONS=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_cv_flag_NO_EXCEPTIONS" >&5 $as_echo "$local_cv_flag_NO_EXCEPTIONS" >&6; } test "$local_cv_flag_NO_EXCEPTIONS" = yes && CXXFLAGS="$CXXFLAGS -fno-exceptions" CFLAGS="$CFLAGS -W -Wall" CXXFLAGS="$CXXFLAGS -W -Wall" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi # 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_path_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else case $STRIP in [\\/]* | ?:[\\/]*) ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi STRIP=$ac_cv_path_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 # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RM+:} false; then : $as_echo_n "(cached) " >&6 else case $RM in [\\/]* | ?:[\\/]*) ac_cv_path_RM="$RM" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi RM=$ac_cv_path_RM if test -n "$RM"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 $as_echo "$RM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MKDIR+:} false; then : $as_echo_n "(cached) " >&6 else case $MKDIR in [\\/]* | ?:[\\/]*) ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MKDIR=$ac_cv_path_MKDIR if test -n "$MKDIR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5 $as_echo "$MKDIR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lxnet" >&5 $as_echo_n "checking for socket in -lxnet... " >&6; } if ${ac_cv_lib_xnet_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lxnet $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_cxx_try_link "$LINENO"; then : ac_cv_lib_xnet_socket=yes else ac_cv_lib_xnet_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_xnet_socket" >&5 $as_echo "$ac_cv_lib_xnet_socket" >&6; } if test "x$ac_cv_lib_xnet_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXNET 1 _ACEOF LIBS="-lxnet $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -linet" >&5 $as_echo_n "checking for socket in -linet... " >&6; } if ${ac_cv_lib_inet_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet $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_cxx_try_link "$LINENO"; then : ac_cv_lib_inet_socket=yes else ac_cv_lib_inet_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_inet_socket" >&5 $as_echo "$ac_cv_lib_inet_socket" >&6; } if test "x$ac_cv_lib_inet_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBINET 1 _ACEOF LIBS="-linet $LIBS" fi { $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_cxx_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 ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_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; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_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_cxx_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_cxx_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_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_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_cxx_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_cxx_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 \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_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_cxx_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_cxx_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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi # 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_cxx_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 sys/time.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_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_cxx_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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm contains tm_isdst" >&5 $as_echo_n "checking whether struct tm contains tm_isdst... " >&6; } if ${local_cv_flag_TM_HAS_ISDST+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif int main() { struct tm* foo; foo->tm_isdst; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : local_cv_flag_TM_HAS_ISDST=yes else local_cv_flag_TM_HAS_ISDST=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_cv_flag_TM_HAS_ISDST" >&5 $as_echo "$local_cv_flag_TM_HAS_ISDST" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm contains __tm_isdst" >&5 $as_echo_n "checking whether struct tm contains __tm_isdst... " >&6; } if ${local_cv_flag_TM_HAS___ISDST+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif int main() { struct tm* foo; foo->__tm_isdst; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : local_cv_flag_TM_HAS___ISDST=yes else local_cv_flag_TM_HAS___ISDST=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_cv_flag_TM_HAS___ISDST" >&5 $as_echo "$local_cv_flag_TM_HAS___ISDST" >&6; } if test "$local_cv_flag_TM_HAS_ISDST" = yes then $as_echo "#define TM_HAS_ISDST tm_isdst" >>confdefs.h elif test "$local_cv_flag_TM_HAS___ISDST" = yes then $as_echo "#define TM_HAS_ISDST __tm_isdst" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm contains tm_gmtoff" >&5 $as_echo_n "checking whether struct tm contains tm_gmtoff... " >&6; } if ${local_cv_flag_TM_HAS_GMTOFF+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif int main() { struct tm* foo; foo->tm_gmtoff; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : local_cv_flag_TM_HAS_GMTOFF=yes else local_cv_flag_TM_HAS_GMTOFF=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_cv_flag_TM_HAS_GMTOFF" >&5 $as_echo "$local_cv_flag_TM_HAS_GMTOFF" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm contains __tm_gmtoff" >&5 $as_echo_n "checking whether struct tm contains __tm_gmtoff... " >&6; } if ${local_cv_flag_TM_HAS___GMTOFF+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif int main() { struct tm* foo; foo->__tm_gmtoff; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : local_cv_flag_TM_HAS___GMTOFF=yes else local_cv_flag_TM_HAS___GMTOFF=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_cv_flag_TM_HAS___GMTOFF" >&5 $as_echo "$local_cv_flag_TM_HAS___GMTOFF" >&6; } if test "$local_cv_flag_TM_HAS_GMTOFF" = yes then $as_echo "#define TM_HAS_GMTOFF tm_gmtoff" >>confdefs.h elif test "$local_cv_flag_TM_HAS___GMTOFF" = yes then $as_echo "#define TM_HAS_GMTOFF __tm_gmtoff" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct utsname contains domainname" >&5 $as_echo_n "checking whether struct utsname contains domainname... " >&6; } if ${local_cv_flag_UTSNAME_HAS_DOMAINNAME+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { struct utsname* foo; foo->domainname; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : local_cv_flag_UTSNAME_HAS_DOMAINNAME=yes else local_cv_flag_UTSNAME_HAS_DOMAINNAME=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_cv_flag_UTSNAME_HAS_DOMAINNAME" >&5 $as_echo "$local_cv_flag_UTSNAME_HAS_DOMAINNAME" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct utsname contains __domainname" >&5 $as_echo_n "checking whether struct utsname contains __domainname... " >&6; } if ${local_cv_flag_UTSNAME_HAS___DOMAINNAME+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { struct utsname* foo; foo->__domainname; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : local_cv_flag_UTSNAME_HAS___DOMAINNAME=yes else local_cv_flag_UTSNAME_HAS___DOMAINNAME=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_cv_flag_UTSNAME_HAS___DOMAINNAME" >&5 $as_echo "$local_cv_flag_UTSNAME_HAS___DOMAINNAME" >&6; } if test "$local_cv_flag_UTSNAME_HAS_DOMAINNAME" = yes then $as_echo "#define UTSNAME_HAS_DOMAINNAME domainname" >>confdefs.h elif test "$local_cv_flag_UTSNAME_HAS___DOMAINNAME" = yes then $as_echo "#define UTSNAME_HAS_DOMAINNAME __domainname" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether named pipes are buggy" >&5 $as_echo_n "checking whether named pipes are buggy... " >&6; } if ${local_cv_flag_NAMEDPIPEBUG+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c < #include #include #include int main(int argc, char** argv) { struct timeval tv; fd_set rfds; int fd = open(*(argv+1), O_RDONLY | O_NONBLOCK); FD_ZERO(&rfds); FD_SET(fd,&rfds); tv.tv_sec = tv.tv_usec = 0; return (select(fd+1, &rfds, 0, 0,&tv) > 0) ? 0 : 1; } EOF if ! ${CC} ${CFLAGS} conftest.c -o conftest 2>/dev/null then echo Compile failed exit 1 fi mkfifo conftest.pipe if ./conftest conftest.pipe then $as_echo "#define NAMEDPIPEBUG 1" >>confdefs.h local_cv_flag_NAMEDPIPEBUG=yes else local_cv_flag_NAMEDPIPEBUG=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_cv_flag_NAMEDPIPEBUG" >&5 $as_echo "$local_cv_flag_NAMEDPIPEBUG" >&6; } for ac_func in setenv srandom do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_cxx_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 $as_echo "#define BUFSIZE 4096" >>confdefs.h if false; then FDBUF_NO_MYSTRING_TRUE= FDBUF_NO_MYSTRING_FALSE='#' else FDBUF_NO_MYSTRING_TRUE='#' FDBUF_NO_MYSTRING_FALSE= fi # Check whether --enable-tls was given. if test "${enable_tls+set}" = set; then : enableval=$enable_tls; case "${enableval}" in yes) tls=true; $as_echo "#define HAVE_TLS 1" >>confdefs.h ;; no) tls=false ;; *) as_fn_error $? "bad value ${enableval} for --enable-tls" "$LINENO" 5 ;; esac else tls=false fi if $tls; then TLS_TRUE= TLS_FALSE='#' else TLS_TRUE='#' TLS_FALSE= fi if $tls; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_certificate_set_verify_function in -lgnutls" >&5 $as_echo_n "checking for gnutls_certificate_set_verify_function in -lgnutls... " >&6; } if ${ac_cv_lib_gnutls_gnutls_certificate_set_verify_function+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgnutls $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 gnutls_certificate_set_verify_function (); int main () { return gnutls_certificate_set_verify_function (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_gnutls_gnutls_certificate_set_verify_function=yes else ac_cv_lib_gnutls_gnutls_certificate_set_verify_function=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_gnutls_gnutls_certificate_set_verify_function" >&5 $as_echo "$ac_cv_lib_gnutls_gnutls_certificate_set_verify_function" >&6; } if test "x$ac_cv_lib_gnutls_gnutls_certificate_set_verify_function" = xyes; then : $as_echo "#define HAVE_GNUTLS_SET_VERIFY_FUNCTION 1" >>confdefs.h fi fi ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile lib/cli++/Makefile lib/fdbuf/Makefile lib/mystring/Makefile protocols/Makefile src/Makefile test/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -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 "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FDBUF_NO_MYSTRING_TRUE}" && test -z "${FDBUF_NO_MYSTRING_FALSE}"; then as_fn_error $? "conditional \"FDBUF_NO_MYSTRING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${TLS_TRUE}" && test -z "${TLS_FALSE}"; then as_fn_error $? "conditional \"TLS\" 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 $as_me, 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 the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status 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" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib/cli++/Makefile") CONFIG_FILES="$CONFIG_FILES lib/cli++/Makefile" ;; "lib/fdbuf/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fdbuf/Makefile" ;; "lib/mystring/Makefile") CONFIG_FILES="$CONFIG_FILES lib/mystring/Makefile" ;; "protocols/Makefile") CONFIG_FILES="$CONFIG_FILES protocols/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; 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 nullmailer-1.13/acinclude.m40000664000076400007640000000706211744115111012727 00000000000000dnl TRY_CXX_FLAG(FLAG,[ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) AC_DEFUN([TRY_CXX_FLAG], [echo >conftest.cc if ${CXX-g++} ${CXXFLAGS} -c [$1] conftest.cc >/dev/null 2>&1; then ifelse([$2], , :, [rm -f conftest* $2]) else ifelse([$3], , :, [rm -f conftest* $3]) fi rm -f conftest*]) AC_DEFUN([CXX_NO_RTTI], [AC_CACHE_CHECK(whether ${CXX-g++} accepts -fno-rtti, local_cv_flag_NO_RTTI, TRY_CXX_FLAG(-fno-rtti, local_cv_flag_NO_RTTI=yes, local_cv_flag_NO_RTTI=no)) test "$local_cv_flag_NO_RTTI" = yes && CXXFLAGS="$CXXFLAGS -fno-rtti" ]) AC_DEFUN([CXX_NO_EXCEPTIONS], [AC_CACHE_CHECK(whether ${CXX-g++} accepts -fno-exceptions, local_cv_flag_NO_EXCEPTIONS, TRY_CXX_FLAG(-fno-exceptions, local_cv_flag_NO_EXCEPTIONS=yes, local_cv_flag_NO_EXCEPTIONS=no)) test "$local_cv_flag_NO_EXCEPTIONS" = yes && CXXFLAGS="$CXXFLAGS -fno-exceptions" ]) dnl TRY_STRUCT_TM_MEMBER(MEMBER,FLAGNAME) AC_DEFUN([TRY_STRUCT_TM_MEMBER], [ AC_CACHE_CHECK(whether struct tm contains [$1], [$2], AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif int main() { struct tm* foo; foo->[$1]; } ])], [$2]=yes, [$2]=no)) ]) AC_DEFUN([TEST_STRUCT_TM],[ TRY_STRUCT_TM_MEMBER(tm_isdst, local_cv_flag_TM_HAS_ISDST) TRY_STRUCT_TM_MEMBER(__tm_isdst, local_cv_flag_TM_HAS___ISDST) if test "$local_cv_flag_TM_HAS_ISDST" = yes then AC_DEFINE(TM_HAS_ISDST,tm_isdst,[struct tm has tm_isdst member]) elif test "$local_cv_flag_TM_HAS___ISDST" = yes then AC_DEFINE(TM_HAS_ISDST,__tm_isdst,[struct tm has tm_isdst member]) fi TRY_STRUCT_TM_MEMBER(tm_gmtoff, local_cv_flag_TM_HAS_GMTOFF) TRY_STRUCT_TM_MEMBER(__tm_gmtoff, local_cv_flag_TM_HAS___GMTOFF) if test "$local_cv_flag_TM_HAS_GMTOFF" = yes then AC_DEFINE(TM_HAS_GMTOFF,tm_gmtoff,[struct tm has tm_gmtoff member]) elif test "$local_cv_flag_TM_HAS___GMTOFF" = yes then AC_DEFINE(TM_HAS_GMTOFF,__tm_gmtoff,[struct tm has tm_gmtoff member]) fi ]) dnl TRY_STRUCT_UTSNAME_MEMBER(MEMBER,FLAGNAME) AC_DEFUN([TRY_STRUCT_UTSNAME_MEMBER], [ AC_CACHE_CHECK(whether struct utsname contains [$1], [$2], AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include int main() { struct utsname* foo; foo->[$1]; } ])], [$2]=yes, [$2]=no)) ]) AC_DEFUN([TEST_STRUCT_UTSNAME],[ TRY_STRUCT_UTSNAME_MEMBER(domainname, local_cv_flag_UTSNAME_HAS_DOMAINNAME) TRY_STRUCT_UTSNAME_MEMBER(__domainname, local_cv_flag_UTSNAME_HAS___DOMAINNAME) if test "$local_cv_flag_UTSNAME_HAS_DOMAINNAME" = yes then AC_DEFINE(UTSNAME_HAS_DOMAINNAME,domainname,[struct utsname has domainname member]) elif test "$local_cv_flag_UTSNAME_HAS___DOMAINNAME" = yes then AC_DEFINE(UTSNAME_HAS_DOMAINNAME,__domainname,[struct utsname has domainname member]) fi ]) AC_DEFUN([CHECK_NAMED_PIPE_BUG], [ AC_CACHE_CHECK(whether named pipes are buggy, local_cv_flag_NAMEDPIPEBUG, cat >conftest.c < #include #include #include int main(int argc, char** argv) { struct timeval tv; fd_set rfds; int fd = open(*(argv+1), O_RDONLY | O_NONBLOCK); FD_ZERO(&rfds); FD_SET(fd,&rfds); tv.tv_sec = tv.tv_usec = 0; return (select(fd+1, &rfds, 0, 0,&tv) > 0) ? 0 : 1; } EOF if ! ${CC} ${CFLAGS} conftest.c -o conftest 2>/dev/null then echo Compile failed exit 1 fi mkfifo conftest.pipe if ./conftest conftest.pipe then AC_DEFINE(NAMEDPIPEBUG, 1, [Named pipes have read/write bug]) local_cv_flag_NAMEDPIPEBUG=yes else local_cv_flag_NAMEDPIPEBUG=no fi rm -f conftest*) ]) nullmailer-1.13/BUGS0000664000076400007640000000023010702261073011211 00000000000000If you find anything in these programs that you would consider a bug, please report it immediately to: Bruce Guenter Thank you! nullmailer-1.13/lib/0000775000076400007640000000000012133011625011355 500000000000000nullmailer-1.13/lib/mergelib.sh0000664000076400007640000000044010702261073013421 00000000000000set -e archive="$1" shift tmpdir=".libmerge.$archive.$$.$RANDOM.$USER" mkdir "$tmpdir" cd "$tmpdir" trap 'cd ..; rm -rf "$tmpdir"' EXIT for input in "$@"; do dir="`basename "$input"`" mkdir "$dir" cd "$dir" ar x ../../"$input" cd .. done ar rc ../"$archive" */* ranlib ../"$archive" nullmailer-1.13/lib/Makefile.am0000664000076400007640000000216710703056325013346 00000000000000SUBDIRS = cli++ fdbuf mystring noinst_LIBRARIES = libmisc.a libnullmailer.a noinst_HEADERS = list.h EXTRA_DIST = make_defines.sh listtest.cc mergelib.sh CLEANFILES = defines.cc libmisc_a_SOURCES = \ address.h address.cc \ base64.h base64.cc \ canonicalize.h canonicalize.cc \ configio.h config_read.cc config_readlist.cc config_readint.cc \ connect.h tcpconnect.cc \ defines.h defines.cc \ errcodes.h errcodes.cc \ hostname.h hostname.cc \ itoa.h itoa.cc \ makefield.cc makefield.h \ netstring.h netstring.cc \ selfpipe.cc selfpipe.h \ setenv.cc setenv.h libnullmailer_a_SOURCES = libnullmailer.a: mergelib.sh libmisc.a fdbuf/libfdbuf.a \ mystring/libmystring.a Makefile $(RM) -f libnullmailer.a sh mergelib.sh libnullmailer.a \ libmisc.a \ fdbuf/libfdbuf.a \ mystring/libmystring.a defines.cc: Makefile.am make_defines.sh @echo Creating defines.cc @sh make_defines.sh \ @localstatedir@/nullmailer \ @sysconfdir@/nullmailer \ @libexecdir@/nullmailer \ @bindir@ \ @sbindir@ dist-hook: $(RM) -f $(distdir)/defines.cc mkdir $(distdir)/ac cp -dP `find ac -name CVS -prune -o -type f -print` $(distdir)/ac/ nullmailer-1.13/lib/cli++/0000775000076400007640000000000012133011624012251 500000000000000nullmailer-1.13/lib/cli++/Makefile.am0000664000076400007640000000034211745305125014236 00000000000000noinst_LIBRARIES = libcli++.a EXTRA_DIST = clitest.cc cli++topod.pl INCLUDES = -I.. #LIBS = @LIBS@ -L. -lcli++ -L../lib -lvmailmgr libcli___a_SOURCES = cli++.h main.cc messages.cc only_long.cc #clitest_SOURCES = clitest.cc nullmailer-1.13/lib/cli++/Makefile.in0000664000076400007640000003046312133011471014244 00000000000000# Makefile.in generated by automake 1.10.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@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 = lib/cli++ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru libcli___a_AR = $(AR) $(ARFLAGS) libcli___a_LIBADD = am_libcli___a_OBJECTS = main.$(OBJEXT) messages.$(OBJEXT) \ only_long.$(OBJEXT) libcli___a_OBJECTS = $(am_libcli___a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libcli___a_SOURCES) DIST_SOURCES = $(libcli___a_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ 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 = @MKDIR@ 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@ RANLIB = @RANLIB@ RM = @RM@ 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@ ac_ct_CXX = @ac_ct_CXX@ 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@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libcli++.a EXTRA_DIST = clitest.cc cli++topod.pl INCLUDES = -I.. #LIBS = @LIBS@ -L. -lcli++ -L../lib -lvmailmgr libcli___a_SOURCES = cli++.h main.cc messages.cc only_long.cc all: all-am .SUFFIXES: .SUFFIXES: .cc .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) --gnu lib/cli++/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/cli++/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libcli++.a: $(libcli___a_OBJECTS) $(libcli___a_DEPENDENCIES) -rm -f libcli++.a $(libcli___a_AR) libcli++.a $(libcli___a_OBJECTS) $(libcli___a_LIBADD) $(RANLIB) libcli++.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/messages.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/only_long.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(LIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES 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-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: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ 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 maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am #clitest_SOURCES = clitest.cc # 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: nullmailer-1.13/lib/cli++/cli++.h0000664000076400007640000000271211745305125013253 00000000000000#ifndef VMAILMGR__CLIPP__CLIPP__H__ #define VMAILMGR__CLIPP__CLIPP__H__ typedef bool (*cli_funcptr)(void*); struct cli_stringlist { const char* string; cli_stringlist* next; cli_stringlist(const char* s) : string(s), next(0) { } }; struct cli_option { char ch; const char* name; enum { flag, counter, integer, string, stringlist, uinteger } type; int flag_value; void* dataptr; const char* helpstr; const char* defaultstr; int set(const char* arg); int parse_long_eq(const char* arg, int as_short); int parse_long_noeq(const char* arg, int as_short); }; #define CLI_OPTION_END {0, 0, cli_option::flag, 0, 0, 0, 0} /* The following are required from the CLI program */ extern const char* cli_program; extern const char* cli_help_prefix; extern const char* cli_help_suffix; extern const char* cli_args_usage; extern const int cli_args_min; extern const int cli_args_max; extern cli_option cli_options[]; extern const bool cli_only_long; extern int cli_main(int argc, char* argv[]); /* The following are provided to the CLI program */ extern const char* argv0; extern const char* argv0base; extern const char* argv0dir; extern void usage(int exit_value, const char* errorstr = 0); extern void cli_error(int exit_value, const char*, const char* = 0, const char* = 0, const char* = 0); extern void cli_warning(const char*, const char* = 0, const char* = 0, const char* = 0); #endif nullmailer-1.13/lib/cli++/messages.cc0000664000076400007640000000243311606072023014315 00000000000000// Copyright (C) 1999,2000,2005 Bruce Guenter // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library 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 // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include "fdbuf/fdbuf.h" #include #include "cli++.h" extern const char* argv0; void cli_error(int exit_value, const char* a, const char* b, const char* c, const char* d) { cli_warning(a,b,c,d); exit(exit_value); } void cli_warning(const char* a, const char* b, const char* c, const char* d) { ferr << cli_program << ": " << a; if(b) ferr << b; if(c) ferr << c; if(d) ferr << d; ferr << endl; } nullmailer-1.13/lib/cli++/clitest.cc0000664000076400007640000000345111606072023014156 00000000000000// Copyright (C) 1999,2000,2005 Bruce Guenter // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library 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 // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include "cli++.h" #include "fdbuf/fdbuf.h" const char* cli_program = "clitest"; const char* cli_help_prefix = "Does nothing but set flags\n"; const char* cli_help_suffix = ""; const char* cli_args_usage = ""; const int cli_args_min = 0; const int cli_args_max = -1; int o_flag = 0; int o_int = 0; char* o_string = "nostring"; cli_option cli_options[] = { { 'f', "flag", cli_option::flag, 1, &o_flag, "Sets a flag", 0 }, { 'i', "int", cli_option::integer, 0, &o_int, "Sets an integer", 0 }, { 's', "str", cli_option::string, 0, &o_string, "Sets a string", 0}, {0} }; int cli_main(int argc, char* argv[]) { fout << "argv0=" << argv0 << endl << " argv0dir=" << argv0dir << endl << " argv0base=" << argv0base << endl; fout << "The flag is set to " << o_flag << endl; fout << "The integer is set to " << o_int << endl; fout << "The string is set to " << o_string << endl; for(int i = 0; i < argc; i++) fout << "argv[" << i << "] = '" << argv[i] << "'\n"; return 0; } nullmailer-1.13/lib/cli++/ChangeLog0000664000076400007640000001056310700776505013766 000000000000002001-03-07 Bruce Guenter * Renamed cli.h to cli++.h 2000-10-25 Bruce Guenter * cli2pod.pl (parse_options): Ignore {0,} as well as {0}. 2000-08-15 Bruce Guenter * cli2pod.pl: Replaced the CLI documentation programs with this script which outputs POD, which can be translated to man pages or HTML (or LaTeX, or text, or FM). 2000-08-14 Bruce Guenter * cli_parse.pl (parse_header_line): Rewrote the parsing to deal with multi-line strings. * cli2man.pl (synopsis): Add usage string. * cli2html.pl (synopsis): Add usage string. 2000-08-12 Bruce Guenter * cli_parse.pl, cli2html.pl, cli2man.pl: Created these programs. 2000-08-01 Bruce Guenter * main.cc (show_option): Fixed several width glitches. 2000-07-18 Bruce Guenter * cli.h (struct cli_option): Added new uinteger type. * main.cc (fill): Removed use of mystring. 2000-07-13 Bruce Guenter * Removed include of mystring. 2000-01-09 Bruce Guenter * main.cc (parse_short): Modified the logic here to treat a string value immediately following a string option as the value for that option rather than as more flags. This makes it behave much more like the standard getopt library. 1999-09-30 Bruce Guenter * main.cc (show_option): Changed stringlist option string from "=LIST" to "=ITEM". 1999-09-29 Bruce Guenter * main.cc (cli_option::set): Fixed problem with setting a string list option. 1999-09-11 Bruce Guenter * main.cc (show_help): Split off two parts of this routine into calc_max_width and show_option. (show_option): Add "=INT" for integer options, and don't add extra space for non-value long options. (set): Use strtol instead of atoi to parse the integer string, to allow for error checking. (show_option): Fixed handling of string lists. 1999-08-14 Bruce Guenter * main.cc (set_argv0): Sets argv0 to the complete value of argv[0], argv0dir to the part of argv[0] up to and including the last '/' (or blank if there is none), and argv0base to the remainder of argv[0]. This is for use in programs that determine what to do based on the value of the program name. 1999-07-14 Bruce Guenter * main.cc (parse_long_eq): Fixed to account for "counter" flag type. (parse_long_noeq): Fixed to account for "counter" flag type. (parse_long_eq): set() will return one, but this shouldn't return one, so subtract one from its result. (show_help): Added a mechanism to display default values on a second line. (show_help): Output a blank line before the "--help" option line. 1999-07-04 Bruce Guenter * main.cc (show_help): Only show a "=VALUE" for string and integer option types. 1999-06-30 Bruce Guenter * messages.cc (cli_error): Moved this routine into a separate module, and added a "cli_warning" routine. 1999-06-25 Bruce Guenter * main.cc (set): Added handling for two new option types: string list and counters. A stringlist maintains a linked list of all the given option arguments. A counter adds the flag_value to the dataptr each time it is encountered. (parse_short): Fixed faulty logic regarding options with values. Need to merge parts into cli_option::set(). 1999-06-24 Bruce Guenter * main.cc: Rewrote the "help" option handling to stop it being a special case, by making an internal option list that includes a "help" option at the end of it. (show_help): Cleaned up the option formatting to produce more correct output. (build_options): Removed the need to count the options. Note that this breaks compatibility with previous versions. (cli_error): Added this convenience function for the CLI program to report errors and optionally exit. (set): Added functionality to call functions when an option is parsed, and moved some of the option parsing into class methods from the structure. (main): Moved the test for showing the usage information before the test for counting command-line arguments. nullmailer-1.13/lib/cli++/only_long.cc0000664000076400007640000000006611745305125014514 00000000000000#include "cli++.h" const bool cli_only_long = false; nullmailer-1.13/lib/cli++/cli++topod.pl0000664000076400007640000001024411606072023014476 00000000000000#!/usr/bin/perl sub cstr2pod { local($_) = shift; s/\\"/"/go; s/"([^\"]*)"/"C<$1>"/go; $_; } $section = 1; @section_order = ( 'NAME', 'SYNOPSIS', 'DESCRIPTION', 'OPTIONS', 'RETURN VALUE', 'ERRORS', 'EXAMPLES', 'ENVIRONMENT', 'FILES', 'SEE ALSO', 'NOTES', 'CAVEATS', 'WARNINGS', 'DIAGNOSTICS', 'BUGS', 'RESTRICTIONS', 'AUTHOR', 'AUTHORS', 'HISTORY' ); sub type2word { my($type) = shift; return 'INT' if $type eq 'integer'; return 'UINT' if $type eq 'uinteger'; return 'STR' if $type eq 'string' || $type eq 'stringlist'; return '' if $type eq 'flag' || $type eq 'counter'; die "Invalid cli option type '$type'"; } sub add_option { my($short, $long, $type, $desc) = @_; my $s = '[B<'; my $o = '=item B<'; if($short) { $s .= "-$short"; $o .= "-$short"; if($type) { $s .= " $type"; $o .= " $type"; } } if($short && $long) { $s .= ">]\n[B<"; $o .= ">, B<"; } if($long) { $s .= "--$long"; $o .= "--$long"; if($type) { $s .= "=$type"; $o .= "=$type"; } } $s .= ">]\n"; $o .= ">\n\n$desc\n\n"; $synopsis .= $s; $options = "=over 8\n\n" unless $options; $options .= $o; } sub parse_option { local($_) = shift; s/^\s*\{\s*//o; s/\s*\},?\s*/ /o; my $short = $1 if s/^'([^\'])',\s*//o; die "Invalid cli option" unless $short || s/^0,\s*//o; my $long = $1 if s/^"([^\"]+)",\s*//o; die "Invalid cli_option" unless $long || s/^0,\s*//o; my $type = $1 if s/^cli_option::(\S+),\s*//o; die "Invalid cli_option" unless $type; $type = &type2word($type); my $val = $1 if s/^([^,]+),\s*//o; my $var = $1 if s/^&([^,]+),\s*//o; my $desc = cstr2pod($1) if s/^"([^,]+)",\s*//o; die "Invalid cli_option" unless $desc; $desc =~ s/\.?$/./o if $desc; my $default = $1 if s/^"([^\"]+)"\s+//o; die "Invalid cli_option" unless $default || s/^0\s+//o; $desc .= " Defaults to $default." if $default; s/\s*\/\/\s*/ /go; s/^\s*//o; add_option($short, $long, $type, $_ || $desc); } sub parse_options { $synopsis = "B<$program>\n"; my $line; while(<>) { s/^\s+//o; s/\s+$//o; if($line && /^\{/o) { &parse_option($line); $line = ""; } next if /^\{\s*0\s*\},?/o; next if /^\{\s*0\s*,\s*\},?/o; last if /^\s*\};/o; $line =~ s/$/ $_/; } &parse_option($line) if $line; $synopsis .= "I<$usage>" if $usage; $options .= "=back" if $options; $sections{'SYNOPSIS'} = $synopsis; $sections{'OPTIONS'} = $options; } sub parse_notes { my $section; my $title; while(<>) { chomp; last unless /^$/o || s/^\/\/\s*//o; if(/^[\sA-Z]+$/o) { $sections{$title} = $section if $title && $section; undef $section; $title = $_; } else { $section .= "$_\n"; } } $sections{$title} = $section if $title && $section; } sub parse_header_line { local($_, $comment) = @_; if(s/^\s*const\s+char\s*\*\s*cli_(\S+)\s*=\s*//o) { my $name = $1; s/;\s*$//o; s/^\"//; s/\"$//o; s/\\n$//o; s/\\n""/\n/go; $program = $_ if $name eq 'program'; $prefix = $_ if $name eq 'help_prefix'; $usage = $_ if $name eq 'args_usage'; $suffix = $_ if $name eq 'help_suffix'; } } sub parse_header { my $comment = ''; my $line = ''; while(<>) { s/^\s+//o; s/\s+$//o; if(s/^.*Copyright\s*\(C\)\s*[\d,]+\s*//o) { $author = $_; } else { last if ($program && $prefix && /^$/o); next if /^#/o; $comment .= "$1\n" if s|\s*//\s*(.*)$||o; $line =~ s/$/\n$_/; if(/;$/o) { &parse_header_line($line, $comment); undef $line; undef $comment; } } } } sub parse_description { while(<>) { s/^\s+//o; s/\s+$//o; last if / cli_options\[\]\s*=\s*\{/o; next unless s/^\/\/\s*//o; $description .= "$_\n"; } } &parse_header; &parse_description; &parse_options; &parse_notes; $description .= "\n\n$suffix\n" if $suffix; $sections{'NAME'} = "$program - $prefix"; $sections{'DESCRIPTION'} = $description; $sections{'AUTHORS'} = $author if $author; foreach $section (@section_order) { print "=head1 $section\n\n$sections{$section}\n\n" if $sections{$section}; } 1; nullmailer-1.13/lib/cli++/main.cc0000664000076400007640000002142111765713212013440 00000000000000// Copyright (C) 1999,2000,2005 Bruce Guenter // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library 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 // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include "ac/time.h" #include "fdbuf/fdbuf.h" #include #include #include "cli++.h" #ifndef HAVE_SRANDOM void srandom(unsigned int seed); #endif static bool do_show_usage = false; const char* argv0; const char* argv0base; const char* argv0dir; static cli_option help_option = { 'h', "help", cli_option::flag, true, &do_show_usage, "Display this help and exit", 0 }; static cli_option** options; static unsigned optionc; static const char* short_options; static void build_options() { for(optionc = 0; cli_options[optionc].ch || cli_options[optionc].name; optionc++) ; optionc++; options = new cli_option*[optionc]; for(unsigned i = 0; i < optionc-1; i++) options[i] = &cli_options[i]; options[optionc-1] = &help_option; char* so; short_options = so = new char[optionc+1]; for (unsigned i = 0; i < optionc; i++) if (options[i]->ch != 0) *so++ = options[i]->ch; *so = 0; } static inline int max(int a, int b) { return (a>b) ? a : b; } static const char* fill(int i) { static int lastlen = 0; static char* buf = 0; if(i > lastlen) { delete[] buf; buf = new char[i+1]; lastlen = i; } memset(buf, ' ', i); buf[i] = 0; return buf; } static void show_usage() { fout << "usage: " << cli_program << " [flags] " << cli_args_usage << endl; } int calc_width(const cli_option* o) { int width = (o->ch || !cli_only_long) ? 4 : 2; if (o->name) { width += strlen(o->name) + 2 + !cli_only_long; switch (o->type) { case cli_option::string: width += 6; break; case cli_option::integer: width += 4; break; case cli_option::uinteger: width += 4; break; case cli_option::stringlist: width += 5; break; case cli_option::flag: break; case cli_option::counter: break; } } return width; } static int calc_max_width() { // maxwidth is the maximum width of the option text prefix int maxwidth = 0; for(unsigned i = 0; i < optionc; i++) maxwidth = max(maxwidth, calc_width(options[i])); return maxwidth; } static void show_option(const cli_option* o, int maxwidth) { if(o == &help_option) fout << '\n'; fout << " "; if(o->ch) fout << '-' << o->ch; else if (!cli_only_long) fout << " "; if (o->ch || !cli_only_long) fout << (o->ch && o->name ? ", " : " "); if(o->name) { const char* extra = ""; switch(o->type) { case cli_option::string: extra = "=VALUE"; break; case cli_option::integer: extra = "=INT"; break; case cli_option::uinteger: extra = "=UNS"; break; case cli_option::stringlist: extra = "=ITEM"; break; case cli_option::flag: break; case cli_option::counter: break; } fout << (cli_only_long ? "-" : "--") << o->name << extra << fill(maxwidth - strlen(o->name) - strlen(extra) - !cli_only_long - (o->ch || !cli_only_long ? 4 : 0)); } else fout << fill(maxwidth-3); fout << o->helpstr << '\n'; if(o->defaultstr) fout << fill(maxwidth+3) << "(Defaults to " << o->defaultstr << ")\n"; } static void show_help() { if(cli_help_prefix) fout << cli_help_prefix; int maxwidth = calc_max_width(); for(unsigned i = 0; i < optionc; i++) show_option(options[i], maxwidth); if(cli_help_suffix) fout << cli_help_suffix; } void usage(int exit_value, const char* errorstr) { if(errorstr) ferr << cli_program << ": " << errorstr << endl; show_usage(); show_help(); exit(exit_value); } cli_stringlist* stringlist_append(cli_stringlist* node, const char* newstr) { cli_stringlist* newnode = new cli_stringlist(newstr); if(node) { cli_stringlist* head = node; while(node->next) node = node->next; node->next = newnode; return head; } else return newnode; } int cli_option::set(const char* arg) { char* endptr; switch(type) { case flag: *(int*)dataptr = flag_value; return 0; case counter: *(int*)dataptr += flag_value; return 0; case integer: *(int*)dataptr = strtol(arg, &endptr, 10); if(*endptr) { ferr << argv0 << ": invalid integer: " << arg << endl; return -1; } return 1; case uinteger: *(unsigned*)dataptr = strtoul(arg, &endptr, 10); if(*endptr) { ferr << argv0 << ": invalid unsigned integer: " << arg << endl; return -1; } return 1; case stringlist: *(cli_stringlist**)dataptr = stringlist_append(*(cli_stringlist**)dataptr, arg); return 1; default: // string *(const char**)dataptr = arg; return 1; } } static int parse_short(int argc, char* argv[]) { int end = strlen(argv[0]) - 1; for(int i = 1; i <= end; i++) { int ch = argv[0][i]; unsigned j; for(j = 0; j < optionc; j++) { cli_option* o = options[j]; if(o->ch == ch) { if(o->type != cli_option::flag && o->type != cli_option::counter) { if(i < end) { if(o->set(argv[0]+i+1) != -1) return 0; } else if(argc <= 1) { ferr << argv0 << ": option -" << o->ch << " requires a value." << endl; } else if(o->set(argv[1]) != -1) return 1; } else if(o->set(0) != -1) break; return -1; } } if(j >= optionc) { ferr << argv0 << ": unknown option letter -" << argv[0][i] << endl; return -1; } } return 0; } static void option_error(const cli_option* o, int as_short, const char* text) { ferr << argv0 << ": option "; if (as_short) ferr << '-' << o->ch; else ferr << (cli_only_long ? "-" : "--") << o->name; ferr << text << endl; } int cli_option::parse_long_eq(const char* arg, int as_short) { if(type == flag || type == counter) { option_error(this, as_short, " does not take a value."); return -1; } else return set(arg)-1; } int cli_option::parse_long_noeq(const char* arg, int as_short) { if(type == flag || type == counter) return set(0); else if(arg) return set(arg); else { option_error(this, as_short, " requires a value."); return -1; } } static int parse_long(int, char* argv[]) { const char* arg = argv[0]+1; // Handle both short and long args if (arg[0] == '-') ++arg; for(unsigned j = 0; j < optionc; j++) { cli_option* o = options[j]; if(o->name) { size_t len = strlen(o->name); if(!memcmp(arg, o->name, len)) { if(arg[len] == '\0') return o->parse_long_noeq(argv[1], false); else if(arg[len] == '=') return o->parse_long_eq(arg+len+1, false); } } } ferr << argv0 << ": unknown option string: '" << argv[0] << "'" << endl; return -1; } static int parse_either(int argc, char* argv[]) { return (strchr(short_options, argv[0][1]) != 0) ? parse_short(argc, argv) : parse_long(argc, argv); } static int parse_args(int argc, char* argv[]) { build_options(); int i; for(i = 1; i < argc; i++) { const char* arg = argv[i]; // Stop at the first non-option argument if(arg[0] != '-') break; // Stop after the first "-" or "--" if(arg[1] == '\0' || (arg[1] == '-' && arg[2] == '\0')) { i++; break; } int j = (arg[1] == '-') ? parse_long(argc-i, argv+i) : cli_only_long ? parse_either(argc-i, argv+i) : parse_short(argc-i, argv+i); if(j < 0) usage(1); else i += j; } return i; } static void set_argv0(const char* p) { argv0 = p; static const char* empty = ""; const char* s = strrchr(p, '/'); if(s) { ++s; argv0base = s; size_t length = s-p; char* tmp = new char[length+1]; memcpy(tmp, p, length); tmp[length] = 0; argv0dir = tmp; } else { argv0base = p; argv0dir = empty; } } int main(int argc, char* argv[]) { struct timeval tv; gettimeofday(&tv, 0); srandom(tv.tv_usec ^ tv.tv_sec); set_argv0(argv[0]); int lastarg = parse_args(argc, argv); if(do_show_usage) usage(0); argc -= lastarg; argv += lastarg; if(argc < cli_args_min) usage(1, "Too few command-line arguments"); if(cli_args_max >= cli_args_min && argc > cli_args_max) usage(1, "Too many command-line arguments"); return cli_main(argc, argv); } nullmailer-1.13/lib/listtest.cc0000664000076400007640000000204010702261073013457 00000000000000#include #include "list.h" typedef list ilist; typedef ilist::iter iiter; void test_remove_first() { ilist l; l.append(1); l.append(2); iiter i(l); l.remove(i); if(!i) cout << "After removing first, iter no longer valid\n"; else if(*i != 2) cout << "After removing first, iter is wrong\n"; if(l.count() != 1) cout << "After removing first, count is wrong\n"; } void test_remove_mid() { ilist l; l.append(1); l.append(2); l.append(3); iiter i(l); i++; l.remove(i); if(!i) cout << "After removing middle, iter no longer valid\n"; else if(*i != 3) cout << "After removing middle, iter is wrong\n"; if(l.count() != 2) cout << "After removing middle, count is wrong\n"; } void test_remove_last() { ilist l; l.append(1); l.append(2); iiter i(l); i++; l.remove(i); if(i) cout << "After removing last, iter is still valid\n"; if(l.count() != 1) cout << "After removing last, count is wrong\n"; } int main() { test_remove_first(); test_remove_mid(); test_remove_last(); return 0; } nullmailer-1.13/lib/address.cc0000664000076400007640000003535411723561202013250 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include #include "canonicalize.h" #include "mystring/mystring.h" #include "list.h" #define LSQBRACKET '[' #define RSQBRACKET ']' #define QUOTE '"' #define CR '\n' #define LPAREN '(' #define RPAREN ')' enum node_type { EMPTY = 0, // Full tokens, with string content: ATOM = 'A', QUOTED_STRING = 'Q', DOMAIN_LITERAL = 'D', COMMENT = 'C', // Special characters, no content: LABRACKET = '<', RABRACKET = '>', AT = '@', COMMA = ',', SEMICOLON = ';', COLON = ':', ESCAPE = '\\', PERIOD = '.', // End of tokens EOT = '$', }; struct token { const node_type type; const bool has_ws; const mystring str; token(node_type); token(node_type, bool, mystring); }; token::token(node_type t) : type(t), has_ws(false) { } token::token(node_type t, bool w, mystring s) : type(t), has_ws(w), str(s) { } struct anode : public token { anode* next; anode(node_type, const char*, const char*, const char*); anode(node_type, bool, mystring); }; anode::anode(node_type t, const char* wstart, const char* start, const char* end) : token(t, start > wstart, mystring(start, end-start)), next(0) { } anode::anode(node_type t, bool w, mystring s) : token(t, w, s), next(0) { } struct result { anode* next; bool good; mystring str; mystring comment; mystring addr; result(); result(const result&); result(anode*); result(anode*, const mystring&, const mystring&, const mystring&); bool operator!() const { return !good; } operator bool() const { return good; } }; result::result() : next(0), good(0) { } result::result(anode* n) : next(n), good(1) { } result::result(anode* n, const mystring& s, const mystring& c, const mystring& l) : next(n), good(1), str(s), comment(c), addr(l) { } result::result(const result& r) : next(r.next), good(r.good), str(r.str), comment(r.comment), addr(r.addr) { } #ifndef TRACE #define ENTER(R) #define FAIL(MSG) return result() #define RETURNR(R) return R #define RETURN(N,S,C,L) return result(N,S,C,L) #else #include "fdbuf/fdbuf.h" static const char indentstr[] = " "; static const char* indent = indentstr + sizeof indentstr - 1; #define ENTER(R) do{ fout << indent-- << __FUNCTION__ << ": \"" << node->str << "\": " << R << endl; }while(0) #define FAIL(MSG) do{ fout << ++indent << __FUNCTION__ << ": failed: " << MSG << endl; return result(); }while(0) #define RETURNR(R) do{ fout << ++indent << __FUNCTION__ << ": succeded str=" << R.str << " comment=" << R.comment << " addr=" << R.addr << endl; return (R); }while(0) #define RETURN(N,S,C,L) do{ result _result(N,S,C,L); RETURNR(_result); }while(0) #endif #define RULE(X) static result match_##X(anode* node) #define MATCHTOKEN(X) do{ if(node->type != X) FAIL("node is not type " #X); else node = node->next; }while(0) #define MATCHRULE(V,R) result V = match_##R(node); if(!V) FAIL("did not match " #R); #define OR_RULE(ALT1,ALT2) { result r=match_##ALT1(node); if(r) RETURNR(r); }{ result r=match_##ALT2(node); if(r) RETURNR(r); } FAIL("did not match " #ALT1 " OR " #ALT2); static bool issymbol(char c) { switch(c) { case LPAREN: case RPAREN: case LABRACKET: case RABRACKET: case LSQBRACKET: case RSQBRACKET: case AT: case COMMA: case SEMICOLON: case COLON: case ESCAPE: case QUOTE: case PERIOD: return true; default: return false; } } static bool isctl(char c) { return (c >= 0 && c <= 31) || (c == 127); } static bool isqtext(char c) { return c && c != QUOTE && c != ESCAPE; } static bool isdtext(char c) { return c && c != LSQBRACKET && c != RSQBRACKET && c != ESCAPE && c != CR; } // quoted-pair = ESCAPE CHAR static bool isqpair(const char* ptr) { return *ptr && *ptr == ESCAPE && *(ptr+1); } static bool isatom(char ch) { return !(isspace(ch) || issymbol(ch) || isctl(ch)); } static anode* tokenize_atom(const char* wstart, const char* &ptr) { if(!isatom(*ptr)) return 0; const char* start = ptr; do { ++ptr; } while(isatom(*ptr)); return new anode(ATOM, wstart, start, ptr); } static anode* tokenize_comment(const char* wstart, const char* &ptr) { if(*ptr != LPAREN) return 0; unsigned count = 0; const char* start = ptr; char ch = *ptr; while(ch) { if(isqpair(ptr)) ++ptr; else if(ch == LPAREN) ++count; else if(ch == RPAREN) { --count; if(!count) return new anode(COMMENT, wstart, start, ++ptr); } else if(ch == CR) return 0; // ERROR ++ptr; ch = *ptr; } return 0; // ERROR } static anode* tokenize_domain_literal(const char* wstart, const char* &ptr) { if(*ptr != LSQBRACKET) return 0; const char* start = ptr; ++ptr; while(isspace(*ptr)) ++ptr; for(; *ptr; ++ptr) { if(isdtext(*ptr)) continue; else if(isqpair(ptr)) ++ptr; else break; } while(isspace(*ptr)) ++ptr; if(*ptr != RSQBRACKET) return 0; // ERROR return new anode(DOMAIN_LITERAL, wstart, start, ptr); } static anode* tokenize_quoted_string(const char* wstart, const char* &ptr) { if(*ptr != QUOTE) return 0; const char* start = ptr; for(++ptr; *ptr; ++ptr) { if(isqtext(*ptr)) continue; else if(isqpair(ptr)) ++ptr; else break; } if(*ptr != QUOTE) return 0; ++ptr; return new anode(QUOTED_STRING, wstart, start, ptr); } static anode* tokenize(const char* &ptr) { const char* wstart = ptr; while(isspace(*ptr)) ++ptr; char ch = *ptr; switch(ch) { case 0: return new anode(EOT, wstart, ptr, ptr); case LABRACKET: case RABRACKET: case AT: case COMMA: case SEMICOLON: case COLON: case ESCAPE: case PERIOD: ++ptr; return new anode((node_type)ch, wstart, ptr-1, ptr); case LPAREN: return tokenize_comment(wstart, ptr); case LSQBRACKET: return tokenize_domain_literal(wstart, ptr); case QUOTE: return tokenize_quoted_string(wstart, ptr); default: return tokenize_atom(wstart, ptr); } } anode* tokenize(const mystring str) { const char* ptr = str.c_str(); anode* head = new anode(EMPTY, ptr, ptr, ptr); anode* tail = head; anode* tmp; while((tmp = tokenize(ptr)) != 0) { tail = tail->next = tmp; if(tmp->type == EOT) { tail = head->next; delete head; return tail; } } return 0; } static mystring quote(const mystring& in) { unsigned length = in.length(); // The result will never be more than double the length of the input plus 2 char out[length*2 + 2 + 1]; char* ptrout = out; const char* ptrin = in.c_str(); bool quoted = false; for(; length; ++ptrin, ++ptrout, --length) { if(*ptrin == QUOTE || *ptrin == ESCAPE) *ptrout++ = ESCAPE; if(issymbol(*ptrin)) quoted = true; *ptrout = *ptrin; } *ptrout = 0; if(quoted) return mystringjoin("\"") + out + "\""; else return in; } static mystring unquote(const mystring& in) { unsigned length = in.length(); // The result will never be more than the length of the input char out[length+1]; bool modified = false; const char* ptrin = in.c_str(); char* ptrout = out; if(in[0] == QUOTE && in[length-1] == QUOTE) { length -= 2; ptrin++; modified = true; } // Skip leading whitespace before copying to out for(; length > 0 && isspace(*ptrin); ++ptrin, --length, modified = true) ; for(; length; ++ptrin, ++ptrout, --length) { if(isqpair(ptrin)) { ++ptrin; --length; modified = true; } *ptrout = *ptrin; } // Skip trailing whitespace copied into out for(; ptrout > out && isspace(ptrout[-1]); --ptrout, modified = true) ; *ptrout = 0; if(modified) return out; else return in; } anode* skipcomment(anode* node, mystring& comment) { while(node->type == COMMENT) { comment = comment + " " + node->str; node = node->next; } return node; } RULE(sub_domain) { // Note atom <= domain-ref ENTER("atom / domain-literal"); mystring comment; node = skipcomment(node, comment); if(node->type == ATOM || node->type == DOMAIN_LITERAL) RETURN(node->next, node->str, comment, node->str); FAIL("did not match ATOM or DOMAIN-LITERAL"); } RULE(domain) { ENTER("sub-domain *(PERIOD sub-domain) [PERIOD]"); MATCHRULE(r, sub_domain); if(!r) FAIL("did not match sub-domain"); mystring comment; for(;;) { node = r.next = skipcomment(r.next, comment); if(node->type != PERIOD) break; r.str += PERIOD; r.addr += PERIOD; node = node->next; result r1 = match_sub_domain(node); if(r1) { r.next = r1.next; r.str += r1.str; comment += r1.comment; r.addr += r1.addr; } else { r.next = node; node = r.next = skipcomment(r.next, comment); } } r.comment += comment; RETURNR(r); } RULE(route) { ENTER("1#(AT domain) COLON"); unsigned count=0; mystring str; mystring comment; for(;;) { if(node->type != AT) break; node = node->next; MATCHRULE(r, domain); str += AT; str += r.str; comment += r.comment; ++count; node = r.next; } if(count == 0) FAIL("matched no domains"); node = skipcomment(node, comment); MATCHTOKEN(COLON); RETURN(node, str, comment, ""); } RULE(word) { ENTER("atom / quoted-string"); mystring comment; node = skipcomment(node, comment); if(node->type == ATOM) RETURN(node->next, node->str, comment, node->str); else if(node->type == QUOTED_STRING) { mystring addr = unquote(node->str); RETURN(node->next, quote(addr), comment, addr); } FAIL("did not match ATOM or QUOTED-STRING"); } RULE(local_part) { ENTER("word *(PERIOD word)"); MATCHRULE(r, word); for(;;) { node = r.next = skipcomment(r.next, r.comment); if(node->type != PERIOD) break; node = node->next; result r1 = match_word(node); if(!r1) break; r.next = r1.next; r.str += PERIOD; r.str += r1.str; r.comment += r1.comment; r.addr += PERIOD; r.addr += r1.addr; } RETURNR(r); } RULE(addr_spec) { ENTER("local-part *( AT domain )"); MATCHRULE(r, local_part); mystring domain; for(;;) { node = r.next = skipcomment(r.next, r.comment); if(node->type != AT) break; node = node->next; result r2 = match_domain(node); if(!r2) break; if(!!domain) { r.str += AT; r.str += domain; r.addr += AT; r.addr += domain; } domain = r2.addr; r.comment += r2.comment; r.next = r2.next; } canonicalize(domain); RETURN(r.next, r.str + "@" + domain, r.comment, r.addr + "@" + domain + "\n"); } RULE(route_addr) { ENTER("LABRACKET [route] addr-spec RABRACKET"); mystring comment; node = skipcomment(node, comment); MATCHTOKEN(LABRACKET); result r1 = match_route(node); if(r1) node = r1.next; comment += r1.comment; MATCHRULE(r2, addr_spec); node = r2.next; comment += r2.comment; node = skipcomment(node, comment); MATCHTOKEN(RABRACKET); RETURN(node, "<" + r2.str + ">" + comment, "", r2.addr); } RULE(phrase) { ENTER("word *(word / PERIOD / CFWS)"); MATCHRULE(r1, word); for(;;) { if(r1.next->type == PERIOD) { if (r1.next->has_ws) r1.str += ' '; r1.str += PERIOD; r1.next = r1.next->next; } else { result r2 = match_word(r1.next); if(!r2) break; if (r1.next->has_ws) r1.str += ' '; r1.str += r2.str; r1.comment += r2.comment; r1.next = r2.next; } } RETURNR(r1); } RULE(route_spec) { ENTER("[phrase] route-addr"); result r1 = match_phrase(node); if(r1) node = r1.next; MATCHRULE(r2, route_addr); if(!r1) RETURNR(r2); r2.str = r1.str + r1.comment + " " + r2.str + r2.comment; RETURNR(r2); } RULE(mailbox) { ENTER("route-spec / addr-spec"); OR_RULE(route_spec, addr_spec); } RULE(mailboxes) { ENTER("mailbox *(*(COMMA) mailbox)"); MATCHRULE(r1, mailbox); r1.str += r1.comment; r1.comment = ""; for(;;) { node = r1.next; for(;;) { node = skipcomment(node, r1.str); if(node->type == COMMA) node = node->next; else break; } if(node->type == EOT) break; result r2 = match_mailbox(node); if(!r2) break; r1.next = r2.next; r1.str = r1.str + ", " + r2.str + r2.comment; r1.addr += r2.addr; } node = skipcomment(node, r1.str); r1.next = node; RETURNR(r1); } RULE(group) { ENTER("phrase COLON [#mailboxes] SEMICOLON"); MATCHRULE(r1, phrase); node = r1.next; MATCHTOKEN(COLON); result r2 = match_mailboxes(node); if(r2) node = r2.next; mystring comment; node = skipcomment(node, comment); MATCHTOKEN(SEMICOLON); RETURN(node, r1.str + ": " + r2.str + r2.comment + comment + ";", "", r2.addr); } RULE(address) { ENTER("group / mailbox"); OR_RULE(group, mailbox); } RULE(addresses) { ENTER("[address *(*(COMMA) address)] EOF"); // Special-case handling for empty address lists if(node->type == EOT) RETURN(0, "", "", ""); if(node->type == COMMENT && node->next->type == EOT) RETURN(0, node->str, "", ""); MATCHRULE(r1, address); r1.str += r1.comment; r1.comment = ""; for(;;) { node = r1.next; for(;;) { node = skipcomment(node, r1.str); if(node->type == COMMA) node = node->next; else break; } if(node->type == EOT) break; result r2 = match_address(node); if(!r2) break; r1.next = r2.next; r1.str = r1.str + ", " + r2.str + r2.comment; r1.addr += r2.addr; } node = skipcomment(node, r1.str); if(node->next) FAIL("Rule ended before EOF"); RETURNR(r1); } static void del_tokens(anode* node) { while(node) { anode* tmp = node->next; delete node; node = tmp; } } bool parse_addresses(mystring& line, mystring& list) { anode* tokenlist = tokenize(line.c_str()); if(!tokenlist) return false; result r = match_addresses(tokenlist); del_tokens(tokenlist); if(r) { line = r.str; list = r.addr; return true; } else return false; } nullmailer-1.13/lib/Makefile.in0000664000076400007640000004511212133011470013343 00000000000000# Makefile.in generated by automake 1.10.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@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 = lib DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru libmisc_a_AR = $(AR) $(ARFLAGS) libmisc_a_LIBADD = am_libmisc_a_OBJECTS = address.$(OBJEXT) base64.$(OBJEXT) \ canonicalize.$(OBJEXT) config_read.$(OBJEXT) \ config_readlist.$(OBJEXT) config_readint.$(OBJEXT) \ tcpconnect.$(OBJEXT) defines.$(OBJEXT) errcodes.$(OBJEXT) \ hostname.$(OBJEXT) itoa.$(OBJEXT) makefield.$(OBJEXT) \ netstring.$(OBJEXT) selfpipe.$(OBJEXT) setenv.$(OBJEXT) libmisc_a_OBJECTS = $(am_libmisc_a_OBJECTS) libnullmailer_a_AR = $(AR) $(ARFLAGS) libnullmailer_a_LIBADD = am_libnullmailer_a_OBJECTS = libnullmailer_a_OBJECTS = $(am_libnullmailer_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libmisc_a_SOURCES) $(libnullmailer_a_SOURCES) DIST_SOURCES = $(libmisc_a_SOURCES) $(libnullmailer_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ 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 = @MKDIR@ 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@ RANLIB = @RANLIB@ RM = @RM@ 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@ ac_ct_CXX = @ac_ct_CXX@ 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@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = cli++ fdbuf mystring noinst_LIBRARIES = libmisc.a libnullmailer.a noinst_HEADERS = list.h EXTRA_DIST = make_defines.sh listtest.cc mergelib.sh CLEANFILES = defines.cc libmisc_a_SOURCES = \ address.h address.cc \ base64.h base64.cc \ canonicalize.h canonicalize.cc \ configio.h config_read.cc config_readlist.cc config_readint.cc \ connect.h tcpconnect.cc \ defines.h defines.cc \ errcodes.h errcodes.cc \ hostname.h hostname.cc \ itoa.h itoa.cc \ makefield.cc makefield.h \ netstring.h netstring.cc \ selfpipe.cc selfpipe.h \ setenv.cc setenv.h libnullmailer_a_SOURCES = all: all-recursive .SUFFIXES: .SUFFIXES: .cc .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) --gnu lib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libmisc.a: $(libmisc_a_OBJECTS) $(libmisc_a_DEPENDENCIES) -rm -f libmisc.a $(libmisc_a_AR) libmisc.a $(libmisc_a_OBJECTS) $(libmisc_a_LIBADD) $(RANLIB) libmisc.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/address.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_read.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_readint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_readlist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/defines.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errcodes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itoa.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/makefield.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netstring.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selfpipe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpconnect.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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 || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-recursive all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags ctags-recursive dist-hook \ distclean distclean-compile 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-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am libnullmailer.a: mergelib.sh libmisc.a fdbuf/libfdbuf.a \ mystring/libmystring.a Makefile $(RM) -f libnullmailer.a sh mergelib.sh libnullmailer.a \ libmisc.a \ fdbuf/libfdbuf.a \ mystring/libmystring.a defines.cc: Makefile.am make_defines.sh @echo Creating defines.cc @sh make_defines.sh \ @localstatedir@/nullmailer \ @sysconfdir@/nullmailer \ @libexecdir@/nullmailer \ @bindir@ \ @sbindir@ dist-hook: $(RM) -f $(distdir)/defines.cc mkdir $(distdir)/ac cp -dP `find ac -name CVS -prune -o -type f -print` $(distdir)/ac/ # 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: nullmailer-1.13/lib/config_read.cc0000664000076400007640000000251611723561166014066 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include "defines.h" #include "configio.h" #include "fdbuf/fdbuf.h" bool config_read(const char* filename, mystring& result) { mystring fullname = CONFIG_DIR; fullname += filename; fdibuf in(fullname.c_str()); if(!in.getline(result)) return false; result = result.strip(); return result.length() > 0; } nullmailer-1.13/lib/canonicalize.cc0000664000076400007640000000252111723561166014261 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include "mystring/mystring.h" #include "canonicalize.h" #include "hostname.h" void canonicalize(mystring& domain) { if(!domain) domain = defaulthost; if(domain != "localhost" && domain.find_first('.') < 0) { if(!!defaultdomain) { if (!!domain) domain += "."; domain += defaultdomain; } } } nullmailer-1.13/lib/configio.h0000664000076400007640000000052210702261073013246 00000000000000#ifndef NULLMAILER__CONFIGIO__H__ #define NULLMAILER__CONFIGIO__H__ #include "mystring/mystring.h" #include "list.h" bool config_read(const char* filename, mystring& result); bool config_readlist(const char* filename, list& result); bool config_readint(const char* filename, int& result); #endif // NULLMAILER__CONFIGIO__H__ nullmailer-1.13/lib/setenv.h0000664000076400007640000000017710702261073012763 00000000000000#ifndef NULLMAILER__SETENV__H__ #define NULLMAILER__SETENV__H__ extern "C" int setenv(const char*, const char*, int); #endif nullmailer-1.13/lib/tcpconnect.cc0000664000076400007640000000432411723561166013765 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include #include #include #include #include #include #include "errcodes.h" #include "connect.h" static int sethostbyname(const mystring& hostname, struct sockaddr_in& sa) { struct hostent *he = gethostbyname(hostname.c_str()); if(!he) { switch(h_errno) { case HOST_NOT_FOUND: return -ERR_HOST_NOT_FOUND; case NO_ADDRESS: return -ERR_NO_ADDRESS; case NO_RECOVERY: return -ERR_GHBN_FATAL; case TRY_AGAIN: return -ERR_GHBN_TEMP; default: return -ERR_GHBN_TEMP; } } memcpy(&sa.sin_addr, he->h_addr, he->h_length); return 0; } int tcpconnect(const mystring& hostname, int port) { struct sockaddr_in sa; memset(&sa, 0, sizeof(sa)); int e = sethostbyname(hostname, sa); if(e) return e; sa.sin_family = AF_INET; sa.sin_port = htons(port); int s = socket(PF_INET, SOCK_STREAM, 0); if(s == -1) return -ERR_SOCKET; if(connect(s, (sockaddr*)&sa, sizeof(sa)) != 0) { switch(errno) { case ECONNREFUSED: return -ERR_CONN_REFUSED; case ETIMEDOUT: return -ERR_CONN_TIMEDOUT; case ENETUNREACH: return -ERR_CONN_UNREACHABLE; default: return -ERR_CONN_FAILED; } } return s; } nullmailer-1.13/lib/base64.h0000664000076400007640000000043710702261073012542 00000000000000#ifndef NULLMAILER_BASE64__H__ #define NULLMAILER_BASE64__H__ #include "mystring/mystring.h" extern void base64_encode(const mystring& in, mystring& out); extern void base64_encode_chunk(const unsigned char bin[3], unsigned len, char encoded[4]); #endif // NULLMAILER_BASE64__H__ nullmailer-1.13/lib/list.h0000664000076400007640000000611510702261073012430 00000000000000#ifndef LIST__H__ #define LIST__H__ template struct list_node { list_node* next; T data; list_node(T d, list_node* n = 0) : next(n), data(d) { } ~list_node() { } }; template class list_iterator; template class const_list_iterator; template class list { public: typedef list_node node; typedef list_iterator iter; typedef const_list_iterator const_iter; friend class list_iterator; friend class const_list_iterator; list() : head(0), tail(0), cnt(0) { } list(const list&); ~list() { empty(); } unsigned count() const { return cnt; } void empty() { while(head) { node* next = head->next; delete head; head = next; } tail = 0; cnt = 0; } bool append(T data) { node* n = new node(data); if(tail) tail->next = n; else head = n; tail = n; ++cnt; return true; } bool prepend(T data) { head = new node(data, head); if(!tail) tail = head; ++cnt; return true; } bool remove(iter&); private: node* head; node* tail; unsigned cnt; }; template class const_list_iterator { friend class list; private: inline void go_next() { prev = curr; if(curr) curr = curr->next; } public: const_list_iterator(const list& l) : lst(l), prev(0), curr(l.head) { } void operator++() { go_next(); } void operator++(int) { go_next(); } T operator*() const { return curr->data; } bool operator!() const { return curr == 0; } operator bool() const { return !operator!(); } private: const list& lst; // g++ 3.2 insists const typename list::node* prev; const typename list::node* curr; }; template list::list(const list& that) : head(0), tail(0), cnt(0) { for(const_iter i = that; i; ++i) append(*i); } template class list_iterator { friend class list; private: inline void go_next() { prev = curr; if(curr) curr = curr->next; } public: list_iterator(list& l) : lst(l), prev(0), curr(l.head) { } void operator++() { go_next(); } void operator++(int) { go_next(); } T operator*() const { return curr->data; } T& operator*() { return curr->data; } bool operator!() const { return curr == 0; } operator bool() const { return !operator!(); } private: list& lst; typename list::node* prev; typename list::node* curr; }; template bool list::remove(list::iter& iter) { if(this != &iter.lst) return false; if(!iter.curr) return false; if(iter.prev) { iter.prev->next = iter.curr->next; if(iter.curr == tail) tail = iter.prev; delete iter.curr; iter.curr = iter.prev->next; } else { head = iter.curr->next; if(!head) tail = 0; delete iter.curr; iter.curr = head; } --cnt; return true; } #endif // LIST__H__ nullmailer-1.13/lib/defines.h0000664000076400007640000000054710702261073013075 00000000000000#ifndef NULLMAILER__DEFINES__H__ #define NULLMAILER__DEFINES__H__ extern const char* QUEUE_DIR; extern const char* QUEUE_TMP_DIR; extern const char* QUEUE_MSG_DIR; extern const char* QUEUE_TRIGGER; extern const char* CONFIG_DIR; extern const char* PROTOCOL_DIR; extern const char* BIN_DIR; extern const char* SBIN_DIR; #endif /* NULLMAILER__DEFINES__H__ */ nullmailer-1.13/lib/itoa.cc0000664000076400007640000000060710702261073012547 00000000000000#include "itoa.h" const char *itoa(long v, int digits) { static char buf[INTLENGTH]; bool neg = false; if(v < 0) { v = -v; neg = true; } char* ptr = buf + INTLENGTH; *--ptr = '\0'; do { *--ptr = (v % 10) + '0'; v /= 10; --digits; } while(v != 0); while(digits > 0 && ptr > buf-1) *--ptr = '0', --digits; if(neg) *--ptr = '-'; return ptr; } nullmailer-1.13/lib/make_defines.sh0000664000076400007640000000071210702261073014247 00000000000000#!/bin/sh echo "const char* QUEUE_DIR=\"$1/\";" >defines.cc echo "const char* QUEUE_TMP_DIR=\"$1/tmp/\";" >>defines.cc echo "const char* QUEUE_MSG_DIR=\"$1/queue/\";" >>defines.cc echo "const char* QUEUE_TRIGGER=\"$1/trigger\";" >>defines.cc echo "const char* CONFIG_DIR=\"$2/\";" >>defines.cc echo "const char* PROTOCOL_DIR=\"$3/\";" >>defines.cc echo "const char* BIN_DIR=\"$4/\";" >>defines.cc echo "const char* SBIN_DIR=\"$5/\";" >>defines.cc nullmailer-1.13/lib/selfpipe.cc0000644000076400007640000000467411724314114013430 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include #include #include #include #include #include #include "selfpipe.h" static int fds[2] = { -1, -1 }; static int fcntl_fl_on(int fd, int flag) { int flags; int newflags; if ((flags = fcntl(fd, F_GETFL, 0)) == -1) return 0; if ((newflags = flags | flag) != flags) if (fcntl(fd, F_SETFL, newflags)) return 0; return 1; } selfpipe::selfpipe() { if (fds[0] < 0) { if (pipe(fds) != -1) { if (fcntl_fl_on(fds[0], O_NONBLOCK) && fcntl_fl_on(fds[1], O_NONBLOCK) && fcntl_fl_on(fds[1], FD_CLOEXEC) && fcntl_fl_on(fds[1], FD_CLOEXEC)) return; close(fds[0]); close(fds[1]); } fds[0] = fds[1] = -1; } } selfpipe::operator bool() const { return fds[0] >= 0; } static void catcher(int sig) { signal(sig, catcher); write(fds[1], &sig, sizeof sig); } void selfpipe::catchsig(int sig) { signal(sig, catcher); } int selfpipe::caught() { int buf; if (read(fds[0], &buf, sizeof buf) == sizeof buf) return buf; return 0; } int selfpipe::waitsig(int timeout) { if (timeout > 0) { fd_set fdset; FD_ZERO(&fdset); FD_SET(fds[0], &fdset); struct timeval tv; tv.tv_sec = timeout; tv.tv_usec = 0; int s; while ((s = select(fds[0] + 1, &fdset, 0, 0, (timeout <= 0) ? 0 : &tv)) == -1) { if (errno != EINTR) return -1; } if (s != 1) return 0; } return caught(); } nullmailer-1.13/lib/makefield.h0000664000076400007640000000030211267116076013377 00000000000000#ifndef NULLMAILER__MAKEFIELD__H__ #define NULLMAILER__MAKEFIELD__H__ extern mystring make_date(); extern mystring make_messageid(const mystring& idhost); #endif // NULLMAILER__MAKEFIELD__H__ nullmailer-1.13/lib/hostname.h0000664000076400007640000000026510702261073013273 00000000000000#ifndef NULLMAILER__HOSTNAME__H__ #define NULLMAILER__HOSTNAME__H__ extern mystring me; extern mystring defaulthost; extern mystring defaultdomain; void read_hostnames(); #endif nullmailer-1.13/lib/netstring.h0000664000076400007640000000032410702261073013466 00000000000000#ifndef NULLMAILER__NETSTRING__H__ #define NULLMAILER__NETSTRING__H__ #include "mystring/mystring.h" mystring str2net(const mystring&); mystring strnl2net(const mystring&); #endif // NULLMAILER__NETSTRING__H__ nullmailer-1.13/lib/selfpipe.h0000664000076400007640000000036710702261073013267 00000000000000#ifndef NULLMAILER_SELFPIPE__H__ #define NULLMAILER_SELFPIPE__H__ class selfpipe { public: selfpipe(); operator bool() const; void catchsig(int sig); int caught(); int waitsig(int timeout = 0); }; #endif // NULLMAILER_SELFPIPE__H__ nullmailer-1.13/lib/makefield.cc0000664000076400007640000000423111723561166013543 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include "defines.h" #include #include "ac/time.h" #include "itoa.h" #include "mystring/mystring.h" mystring make_date() { char buf[256]; time_t t = time(0); struct tm* l = localtime(&t); strftime(buf, 256, "%a, %d %b %Y %H:%M:%S ", l); #ifdef TM_HAS_GMTOFF long tznum = l->TM_HAS_GMTOFF/60; #else long tznum = -timezone/60; #ifdef TM_HAS_ISDST int daylight = l->TM_HAS_ISDST; #endif // TM_HAS_ISDST if(daylight) tznum += 60; #endif // TM_HAS_GMTOFF char tz[6]; tz[0] = '+'; if(tznum < 0) { tznum = -tznum; tz[0] = '-'; } long tzhours = tznum / 60; tz[1] = (tzhours/10)%10 + '0'; tz[2] = tzhours%10 + '0'; long tzmins = tznum % 60; tz[3] = (tzmins/10)%10 + '0'; tz[4] = tzmins%10 + '0'; tz[5] = 0; return mystringjoin(buf) + tz; } // Message ID strings have the form SECONDS.USEC.PID.nullmailer@HOST mystring make_messageid(const mystring& idhost) { struct timeval tv; gettimeofday(&tv, 0); mystring tmp = "<"; tmp += itoa(tv.tv_sec); tmp += '.'; tmp += itoa(tv.tv_usec, 6); tmp += '.'; tmp += itoa(getpid()); tmp += ".nullmailer@"; tmp += idhost; tmp += '>'; return tmp; } nullmailer-1.13/lib/mystring/0000775000076400007640000000000012133011625013231 500000000000000nullmailer-1.13/lib/mystring/Makefile.am0000664000076400007640000000061511606077070015221 00000000000000noinst_LIBRARIES = libmystring.a EXTRA_DIST = ChangeLog iter.h join.h mystring.h rep.h trace.h INCLUDES = -I.. libmystring_a_SOURCES = \ append.cc \ assign.cc \ count.cc \ fdobuf.cc \ find_first_ch.cc \ find_first_of.cc \ find_last_ch.cc \ find_last_of.cc \ iter.cc \ join.cc \ lower.cc \ lstrip.cc \ mystring.cc \ rep.cc \ rstrip.cc \ sub.cc \ subst.cc \ strip.cc \ upper.cc nullmailer-1.13/lib/mystring/mystring.h0000664000076400007640000000665211606077070015221 00000000000000/* $Id: mystring.h 635 2005-11-02 17:37:50Z bruce $ */ // Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef MYSTRING__H__ #define MYSTRING__H__ #include #include "mystring/rep.h" class mystringjoin; class mystring { friend class mystringtmp; friend class mystringjoin; private: mystringrep* rep; protected: void dupnil(); void dup(const char*, size_t); void dup(const char*); void assign(const char*); void assign(const char*, size_t); public: static const mystring NUL; mystring() { dupnil(); } mystring(const char* s) { dup(s); } mystring(const mystring& s) { dup(s.rep->buf, s.rep->length); } mystring(const char* str, size_t len) { dup(str, len); } mystring(const mystringjoin&); ~mystring(); const char* c_str() const { return rep->buf; } bool operator!() const { return empty(); } char operator[](size_t i) const { return rep->buf[i]; } size_t length() const { return rep->length; } bool empty() const { return rep->length == 0; } int operator!=(const char* in) const; int operator!=(const mystring& in) const; bool operator==(const char* in) const { return !operator!=(in); } bool operator==(const mystring& in) const { return !operator!=(in); } void operator=(const char* in) { assign(in); } void operator=(const mystring& in) { assign(in.rep->buf, in.rep->length); } void operator=(const mystringjoin& in); mystring subst(char from, char to) const; mystring lower() const; mystring upper() const; int find_first(char, size_t = 0) const; int find_first_of(const mystring&, size_t = 0) const; int find_first_of(const char*, size_t = 0) const; int find_first_of(const char*, size_t, size_t) const; int find_last(char, size_t = (size_t)-1) const; int find_last_of(const mystring&, size_t = (size_t)-1) const; int find_last_of(const char*, size_t = 0) const; int find_last_of(const char*, size_t, size_t) const; mystring left(size_t) const; mystring right(size_t) const; mystring sub(size_t, size_t) const; mystring lstrip() const; mystring rstrip() const; mystring strip() const; unsigned count(char ch) const; void append(const char*); void append(const char*, size_t); void operator+=(const mystring& str) {append(str.rep->buf, str.rep->length);} void operator+=(const char* str) { append(str); } void operator+=(char ch) { char str[2] = { ch, 0 }; append(str, 1); } }; #ifndef MYSTRING_TRACE inline mystring::~mystring() { rep->detach(); } #endif #include "mystring/iter.h" #include "mystring/join.h" class fdobuf; fdobuf& operator<<(fdobuf& out, const mystring& str); //istream& operator>>(istream& in, mystring& str); typedef mystring string; #endif nullmailer-1.13/lib/mystring/trace.h0000664000076400007640000000060211606077071014431 00000000000000/* $Id: trace.h 616 2005-08-19 20:11:01Z bruce $ */ #include "mystring.h" #ifdef MYSTRING_TRACE ostream& operator<<(ostream& out, const mystringtmp& s); #define trace(X) cerr << (void*)this << "->" << __PRETTY_FUNCTION__ << X << endl #define trace_static(X) cerr << __PRETTY_FUNCTION__ << X << endl #else #define trace(X) do { } while(0) #define trace_static(X) do { } while(0) #endif nullmailer-1.13/lib/mystring/Makefile.in0000664000076400007640000003335512133011471015226 00000000000000# Makefile.in generated by automake 1.10.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@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 = lib/mystring DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru libmystring_a_AR = $(AR) $(ARFLAGS) libmystring_a_LIBADD = am_libmystring_a_OBJECTS = append.$(OBJEXT) assign.$(OBJEXT) \ count.$(OBJEXT) fdobuf.$(OBJEXT) find_first_ch.$(OBJEXT) \ find_first_of.$(OBJEXT) find_last_ch.$(OBJEXT) \ find_last_of.$(OBJEXT) iter.$(OBJEXT) join.$(OBJEXT) \ lower.$(OBJEXT) lstrip.$(OBJEXT) mystring.$(OBJEXT) \ rep.$(OBJEXT) rstrip.$(OBJEXT) sub.$(OBJEXT) subst.$(OBJEXT) \ strip.$(OBJEXT) upper.$(OBJEXT) libmystring_a_OBJECTS = $(am_libmystring_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(libmystring_a_SOURCES) DIST_SOURCES = $(libmystring_a_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ 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 = @MKDIR@ 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@ RANLIB = @RANLIB@ RM = @RM@ 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@ ac_ct_CXX = @ac_ct_CXX@ 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@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libmystring.a EXTRA_DIST = ChangeLog iter.h join.h mystring.h rep.h trace.h INCLUDES = -I.. libmystring_a_SOURCES = \ append.cc \ assign.cc \ count.cc \ fdobuf.cc \ find_first_ch.cc \ find_first_of.cc \ find_last_ch.cc \ find_last_of.cc \ iter.cc \ join.cc \ lower.cc \ lstrip.cc \ mystring.cc \ rep.cc \ rstrip.cc \ sub.cc \ subst.cc \ strip.cc \ upper.cc all: all-am .SUFFIXES: .SUFFIXES: .cc .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) --gnu lib/mystring/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/mystring/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libmystring.a: $(libmystring_a_OBJECTS) $(libmystring_a_DEPENDENCIES) -rm -f libmystring.a $(libmystring_a_AR) libmystring.a $(libmystring_a_OBJECTS) $(libmystring_a_LIBADD) $(RANLIB) libmystring.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/append.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assign.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdobuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_first_ch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_first_of.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_last_ch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_last_of.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/join.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lower.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstrip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mystring.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rstrip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sub.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subst.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upper.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(LIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES 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-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: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ 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 maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: nullmailer-1.13/lib/mystring/find_first_ch.cc0000664000076400007640000000033711606077070016276 00000000000000#include "mystring.h" #include int mystring::find_first(char ch, size_t offset) const { if(offset >= rep->length) return -1; char* ptr = strchr(rep->buf+offset, ch); return ptr ? ptr-rep->buf : -1; } nullmailer-1.13/lib/mystring/find_last_ch.cc0000664000076400007640000000042611606077070016111 00000000000000#include "mystring.h" int mystring::find_last(char ch, size_t offset) const { if(offset == (size_t)-1) offset = rep->length-1; const char* ptr = rep->buf + offset; while(ptr >= rep->buf) { if(*ptr == ch) return ptr - rep->buf; --ptr; } return -1; } nullmailer-1.13/lib/mystring/iter.cc0000664000076400007640000000237711606077070014446 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "mystring.h" mystring_iter::mystring_iter(const mystring& s, char e) : str(s), sep(e), pos(0) { advance(); } mystring_iter::~mystring_iter() { } void mystring_iter::advance() { if(pos == -1) return; int i = str.find_first(sep, pos); if(i == -1) { if(pos >= 0 && pos < (int)str.length()) { part = str.right(pos); pos = str.length(); } else { part = ""; pos = -1; } } else { part = str.sub(pos, i-pos); pos = i + 1; } } nullmailer-1.13/lib/mystring/rep.cc0000664000076400007640000000717011606077071014266 00000000000000#include "mystring.h" #include "trace.h" #include #include mystringrep nil = { 0, 1, 1, "" }; static const unsigned replength = sizeof(unsigned)*3; static const unsigned sizestep = sizeof(unsigned); static const unsigned slackdiv = 4; static const unsigned slackmax = 16; #ifdef MYSTRINGREP_STATS #include "fdbuf.h" struct _rep_stats { unsigned allocs; unsigned alloc_size; unsigned alloc_len; unsigned appends; unsigned appends_dup; _rep_stats() : allocs(0) { } void stat(const char* name, unsigned value) { ferr << "mystringrep: " << name << ": " << value << '\n'; } void pcnt(const char* name, unsigned denom, unsigned divis) { ferr << "mystringrep: " << name << ": " << denom << '/' << divis << '='; if(divis) ferr << denom * 100 / divis << '%'; else ferr << "N/A"; ferr << '\n'; } ~_rep_stats() { stat(" size step", sizestep); stat(" slack divisor", slackdiv); stat(" slack maximum", slackmax); stat(" allocs", allocs); stat(" alloc length", alloc_len); stat(" alloc size", alloc_size); pcnt(" alloc slack", alloc_size-alloc_len, alloc_len); stat("alloc overhead", allocs*replength); pcnt(" appends->dup", appends_dup, appends); } }; static _rep_stats stats; #define ACCOUNT(NAME,VALUE) stats. NAME += VALUE #else // MYSTRINGREP_STATS #define ACCOUNT(NAME,VALUE) #endif // MYSTRINGREP_STATS /////////////////////////////////////////////////////////////////////////////// // class mystringrep /////////////////////////////////////////////////////////////////////////////// mystringrep* mystringrep::alloc(unsigned length) { ACCOUNT(allocs, 1); trace_static("length=" << length); if(length == 0) return &nil; ACCOUNT(alloc_len, length); unsigned slack = length / slackdiv; if(slack > slackmax) slack = slackmax; unsigned size = length+1 + sizestep-1 + slack; size = size - size % sizestep; ACCOUNT(alloc_size, size); mystringrep* ptr = (mystringrep*)new char[size+replength]; ptr->length = length; ptr->references = 0; ptr->size = size; return ptr; } mystringrep* mystringrep::dup(const char* str, unsigned length) { trace_static("str=" << (void*)str << " length=" << length); if(length == 0) return &nil; mystringrep* ptr = alloc(length); memcpy(ptr->buf, str, length); ptr->buf[length] = 0; return ptr; } mystringrep* mystringrep::dup(const char* str1, unsigned length1, const char* str2, unsigned length2) { trace_static(""); if(length1+length2 == 0) return &nil; mystringrep* ptr = alloc(length1+length2); memcpy(ptr->buf, str1, length1); memcpy(ptr->buf+length1, str2, length2); ptr->buf[length1+length2] = 0; return ptr; } mystringrep* mystringrep::append(const char* str, unsigned len) { ACCOUNT(appends, 1); unsigned newlen = length + len; // If there are more than one references, always make a duplicate // Also, if this does not have enough space to add the new string, dup it if(references > 1 || newlen >= size) { ACCOUNT(appends_dup, 1); mystringrep* tmp = dup(buf, length, str, len); tmp->attach(); detach(); return tmp; } // Otherwise, just add the new string to the end of this else { memcpy(buf+length, str, len); buf[newlen] = 0; length = newlen; return this; } } #ifdef MYSTRING_TRACE void mystringrep::attach() { trace("references=" << references); ++references; } #endif void mystringrep::detach() { trace("references=" << references); --references; if(!references) { trace("deleting this"); delete this; } } nullmailer-1.13/lib/mystring/fdobuf.cc0000664000076400007640000000024011606077070014733 00000000000000#include "mystring.h" #include "fdbuf/fdbuf.h" fdobuf& operator<<(fdobuf& out, const mystring& str) { out.write(str.c_str(), str.length()); return out; } nullmailer-1.13/lib/mystring/join.h0000664000076400007640000000362711606077070014303 00000000000000/* $Id: join.h 616 2005-08-19 20:11:01Z bruce $ */ // Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef MYSTRING__JOIN__H__ #define MYSTRING__JOIN__H__ class mystringjoin { private: const mystringjoin* prev; mystringrep* rep; const char* str; mystringjoin(); public: mystringjoin(const mystringjoin& j) : prev(j.prev), rep(j.rep), str(j.str) { rep->attach(); } mystringjoin(const mystring& s) : prev(0), rep(s.rep), str(s.rep->buf) { rep->attach(); } mystringjoin(const char* s) : prev(0), rep(0), str(s) { } mystringjoin(const mystringjoin& p, const mystring& s) : prev(&p), rep(s.rep), str(s.rep->buf) { rep->attach(); } mystringjoin(const mystringjoin& p, const char* s) : prev(&p), rep(0), str(s) { } ~mystringjoin() { if(rep) rep->detach(); } mystringrep* traverse() const; }; inline mystring::mystring(const mystringjoin& j) : rep(j.traverse()) { rep->attach(); } inline mystringjoin operator+(const mystringjoin& a, const mystring& b) { return mystringjoin(a, b); } inline mystringjoin operator+(const mystringjoin& a, const char* b) { return mystringjoin(a, b); } #endif nullmailer-1.13/lib/mystring/find_first_of.cc0000664000076400007640000000104011606077070016300 00000000000000#include "mystring.h" #include int mystring::find_first_of(const char* setstr, size_t setlen, size_t offset) const { for(; offset < rep->length; offset++) { if(memchr(setstr, rep->buf[offset], setlen)) return offset; } return -1; } int mystring::find_first_of(const char* setstr, size_t offset) const { return find_first_of(setstr, strlen(setstr), offset); } int mystring::find_first_of(const mystring& setstr, size_t offset) const { return find_first_of(setstr.rep->buf, setstr.rep->length, offset); } nullmailer-1.13/lib/mystring/iter.h0000664000076400007640000000235211606077070014301 00000000000000/* $Id: iter.h 616 2005-08-19 20:11:01Z bruce $ */ // Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef MYSTRING__ITER__H__ #define MYSTRING__ITER__H__ class mystring_iter { const mystring str; const char sep; int pos; mystring part; void advance(); public: mystring_iter(const mystring&, char = '\0'); ~mystring_iter(); operator bool() const { return pos >= 0; } bool operator!() const { return pos < 0; } mystring operator*() const { return part; } void operator++() { advance(); } }; #endif nullmailer-1.13/lib/mystring/assign.cc0000664000076400007640000000152211606077070014756 00000000000000#include "mystring.h" #include "trace.h" #include #include void mystring::dupnil() { trace(""); rep = &nil; rep->attach(); } void mystring::assign(const char* in) { if(in) assign(in, strlen(in)); else { mystringrep* tmp = rep; dupnil(); tmp->detach(); } } void mystring::assign(const char* in, size_t len) { trace("in='" << in << "'"); if(in != rep->buf) { mystringrep* tmp = rep; dup(in, len); tmp->detach(); } } void mystring::dup(const char* in, size_t len) { trace("in='" << in << "'"); rep = mystringrep::dup(in, len); rep->attach(); } void mystring::dup(const char* in) { if(in) dup(in, strlen(in)); else dupnil(); } void mystring::operator=(const mystringjoin& in) { mystringrep* tmp = rep; rep = in.traverse(); rep->attach(); tmp->detach(); } nullmailer-1.13/lib/mystring/rep.h0000664000076400007640000000251111606077071014122 00000000000000/* $Id: rep.h 616 2005-08-19 20:11:01Z bruce $ */ // Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef MYSTRING__REP__H__ #define MYSTRING__REP__H__ struct mystringrep { unsigned length; unsigned references; unsigned size; char buf[1]; void attach(); void detach(); mystringrep* append(const char*, unsigned); static mystringrep* alloc(unsigned); static mystringrep* dup(const char*, unsigned); static mystringrep* dup(const char*, unsigned, const char*, unsigned); }; #ifndef MYSTRING_TRACE inline void mystringrep::attach() { references++; } #endif extern mystringrep nil; #endif nullmailer-1.13/lib/mystring/mystring.cc0000664000076400007640000000074011606077070015347 00000000000000#include "mystring.h" #include "trace.h" #include #include #ifdef MYSTRING_TRACE mystring::~mystring() { trace("rep=" << (void*)rep); rep->detach(); } #endif int mystring::operator!=(const char* in) const { if(rep->buf == in) return 0; return strcmp(rep->buf, in); } int mystring::operator!=(const mystring& in) const { if(rep->buf == in.rep->buf) return 0; return strcmp(rep->buf, in.rep->buf); } const mystring mystring::NUL("", 1); nullmailer-1.13/lib/mystring/lower.cc0000664000076400007640000000064611606077070014630 00000000000000#include "mystring.h" #include mystring mystring::lower() const { const unsigned length = rep->length; char buf[length+1]; const char* in = rep->buf + length; bool changed = false; for(char* out = buf+length; out >= buf; in--, out--) if(isupper(*in)) *out = tolower(*in), changed = true; else *out = *in; if(!changed) return *this; else return mystring(buf, length); } nullmailer-1.13/lib/mystring/ChangeLog0000664000076400007640000001024207775112177014746 000000000000002000-04-09 Bruce Guenter * count.cc (count): Added this routine to count the number of instances of a single character in a string. 2000-04-06 Bruce Guenter * fdobuf.cc (operator<<): Moved this routine out of an inline declaration. * iter.h: Moved the mystring_iter declarations into this file. * rep.h: Moved the mystringrep declarations into this file. * join.h: Moved the mystringjoin declarations into this file. * mystring.h (class mystring): Renamed the "find_first" and "find_last" routines that scan for items in a set to "find_first_of" and "find_last_of". 1999-08-15 Bruce Guenter * mystring.h (class mystring_iter): Changed the default seperator for strings to '\0' (class mystring): Added a NUL constant (single 0 byte string). 1999-07-26 Bruce Guenter * mystring.h (class mystring_iter): Added this new iterator class, taken from code used in vmailmgr. It is used to iterate over essentially a token-delimited string. 1999-07-14 Bruce Guenter * Removed all vestiges of mystringtmp support from this library. 1999-07-13 Bruce Guenter * append.cc: Fixed same bug as below in append. * assign.cc: Fixed bug in assign and dup where NULL pointers caused a crash. * append.cc, assign.cc: removed the mystringtmp versions of the append, assign, and dup operations. mystringtmp now only exists in the cons[2-7].cc files and tmp.cc * find.cc: Split this file into find_first, find_first_of, find_last, and find_last_of. 1999-07-12 Bruce Guenter * join.cc (traverse): This routine traverses the linked list and builds a mystringrep out of it. * mystring.h: Renamed TRACE to MYSTRING_TRACE. Added a new mystringjoin class. This class is used to turn a list of calls to "operator+" into a single constructor by building a linked list on the stack. This will replace mystringtmp. * rep.cc (struct _rep_stats): Fixed the percentage function to not do divide-by-zero; modified the "slack" reporting to report a percentage of the requested length. * assign.cc: Re-added dup and assign functions for "char*" type, moving the constructors and assignment operators inline. * append.cc: Re-added append functions for "char*" type. 1999-07-08 Bruce Guenter * mystring.h (class mystring): Eliminated the "mystring" return value for the assign and append operators, since this return value is never used and causes extra operations. * operator_plus.cc: Created this new file containing the "operator+" routine. * operator_pleq.cc: Created this new file containing all the "operator+=" routines. * assign.cc: Created this new file containing all the assign and dup primitives. * mystring.h (class mystring): Removed the += operator taking "mystringtmp" parameter, and replaced it with two routines, one for "const mystring&", and one for "const char*". This results in a net code shrinkage. * rep.cc (struct _rep_stats): Added this optional statistics gathering class to determine the effectiveness of the slack space and string appending. * append.cc (append): Use the new rep->append routine. * rep.cc (alloc): Allocate an amount of "slack" space when allocating a string, to allow for later appends. (append): This new routine appends a string to the current rep if and only if the current rep has a single reference and the new length of the string will fit within the current size. If not, it makes a dup of this+str and returns a pointer to it. 1999-06-07 Bruce Guenter * tmp.cc: Removed the contents of checkstr, and moved the necessary parts into the constructors. This makes the code more efficient, as the constructors are adequately specific to omit some of the branches in the comparisons. It also ensures that len is always initialized, allowing many of the simple functions to be moved inline to the header file. 1999-04-01 Bruce Guenter * cons7.cc (mystring): Wrote this constructor to build a string from 7 inputs. nullmailer-1.13/lib/mystring/count.cc0000664000076400007640000000167511606077070014633 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "mystring.h" unsigned mystring::count(char ch) const { unsigned c = 0; for(int pos = find_first(ch); pos > 0; pos = find_first(ch, pos+1)) ++c; return c; } nullmailer-1.13/lib/mystring/join.cc0000664000076400007640000000350011606077070014427 00000000000000#include "mystring.h" #include // This "join" class relies on one fairly obscure detail in the C++ // standard: temporaries are destructed only after the entire // "full-expression" has completed. That is, if the sequence: // f(f(f(x))) creates three temporary objects, the inner objects are // destroyed only after the execution has completed. This allows us // to build a complete linked-list on the stack. Tricky, but efficient! struct tmpitem { const char* str; unsigned len; }; mystringrep* mystringjoin::traverse() const { // At first glance, a recursive implementation would be the most logical // way of doing this, but it turned out to be a significant loss. This // method traverses the pointer chain to first determine the length, and // then to do the actual copying. // Note the use of do/while loops to avoid a test at the head of the loop // which will always succeed (there is always at least one node or item). unsigned count = 0; const mystringjoin* node = this; do { ++count; } while((node = node->prev) != 0); // The use of a temporary array avoids re-traversing the pointer // chain, which is a slight performance win. tmpitem items[count]; unsigned length = 0; node = this; tmpitem* item = items; do { unsigned l = node->rep ? node->rep->length : strlen(node->str); length += l; item->str = node->str; item->len = l; ++item; } while((node = node->prev) != 0); // Since the chain is constructed such that the last item is the // first node, the string gets constructed in reverse order. mystringrep* rep = mystringrep::alloc(length); char* buf = rep->buf + length; item = items; do { unsigned l = item->len; buf -= l; memcpy(buf, item->str, l); ++item; } while(--count != 0); rep->buf[length] = 0; return rep; } nullmailer-1.13/lib/mystring/append.cc0000664000076400007640000000045711606077070014747 00000000000000#include #include "mystring.h" #include "trace.h" void mystring::append(const char* str, size_t len) { if(!str || !len) return; if(!*this) assign(str, len); else rep = rep->append(str, len); } void mystring::append(const char* in) { if(in) append(in, strlen(in)); } nullmailer-1.13/lib/mystring/subst.cc0000664000076400007640000000063111606077071014633 00000000000000#include "mystring.h" mystring mystring::subst(char from, char to) const { const unsigned length = rep->length; char buf[length+1]; const char* in = rep->buf + length; bool changed = true; for(char* out = buf+length; out >= buf; in--, out--) if(*in == from) *out = to, changed = true; else *out = *in; if(!changed) return *this; else return mystring(buf, length); } nullmailer-1.13/lib/mystring/find_last_of.cc0000664000076400007640000000110211606077070016113 00000000000000#include "mystring.h" #include int mystring::find_last_of(const char* setstr, size_t setlen, size_t offset) const { if(offset == (size_t)-1) offset = rep->length-1; for(int i = offset; i >= 0; --i) { if(memchr(setstr, rep->buf[i], setlen)) return i; } return -1; } int mystring::find_last_of(const char* setstr, size_t offset) const { return find_last_of(setstr, strlen(setstr), offset); } int mystring::find_last_of(const mystring& setstr, size_t offset) const { return find_last_of(setstr.rep->buf, setstr.rep->length, offset); } nullmailer-1.13/lib/mystring/sub.cc0000664000076400007640000000152311606077071014265 00000000000000#include "mystring.h" // return the sub-string ending at 'offset' mystring mystring::left(size_t offset) const { if(offset > rep->length) return *this; else return mystring(rep->buf, offset); } // return the sub-string starting at 'offset' mystring mystring::right(size_t offset) const { if(offset >= rep->length) return mystring(); else if(offset == 0) return *this; else return mystring(rep->buf+offset, rep->length-offset); } // return the 'len' characters of the string starting at 'offset' mystring mystring::sub(size_t offset, size_t len) const { // return right(offset).left(len); if(len == 0) return mystring(); else if(offset == 0 && len >= rep->length) return *this; else { if(len+offset >= rep->length) len = rep->length - offset; return mystring(rep->buf+offset, len); } } nullmailer-1.13/lib/mystring/rstrip.cc0000664000076400007640000000034211606077071015015 00000000000000#include "mystring.h" #include mystring mystring::rstrip() const { const char* ptr = rep->buf + rep->length - 1; while(ptr >= rep->buf && isspace(*ptr)) --ptr; return mystring(rep->buf, ptr-rep->buf+1); } nullmailer-1.13/lib/mystring/strip.cc0000664000076400007640000000045011606077071014633 00000000000000#include "mystring.h" #include mystring mystring::strip() const { const char* start = rep->buf; while(*start && isspace(*start)) ++start; const char* end = rep->buf + rep->length - 1; while(end >= start && isspace(*end)) --end; return mystring(start, end-start+1); } nullmailer-1.13/lib/mystring/upper.cc0000664000076400007640000000066711745305125014635 00000000000000#include "mystring.h" #include mystring mystring::upper() const { const unsigned length = rep->length; char buf[length+1]; const char* in = rep->buf + length; bool changed = false; for(char* out = buf+length; out >= buf; in--, out--) if(islower(*in)) { *out = toupper(*in); changed = true; } else *out = *in; if(!changed) return *this; else return mystring(buf, length); } nullmailer-1.13/lib/mystring/lstrip.cc0000664000076400007640000000024611606077070015011 00000000000000#include "mystring.h" #include mystring mystring::lstrip() const { const char* ptr = rep->buf; while(*ptr && isspace(*ptr)) ++ptr; return ptr; } nullmailer-1.13/lib/connect.h0000664000076400007640000000027710702261073013111 00000000000000#ifndef NULLMAILER_CONNECT__H__ #define NULLMAILER_CONNECT__H__ #include "mystring/mystring.h" extern int tcpconnect(const mystring& hostname, int port); #endif // NULLMAILER_CONNECT__H__ nullmailer-1.13/lib/errcodes.h0000664000076400007640000000246110704014056013262 00000000000000#ifndef NULLMAILER__ERRCODES__H__ #define NULLMAILER__ERRCODES__H__ // Temporary errors #define ERR_USAGE 1 // Invalid command-line arguments #define ERR_HOST_NOT_FOUND 2 // gethostbyname failed with HOST_NOT_FOUND #define ERR_NO_ADDRESS 3 // gethostbyname failed with NO_ADDRESS #define ERR_GHBN_TEMP 5 // gethostbyname failed with TRY_AGAIN #define ERR_SOCKET 6 // socket failed #define ERR_CONN_REFUSED 7 // connect failed with ECONNREFUSED #define ERR_CONN_TIMEDOUT 8 // connect failed with ETIMEDOUT #define ERR_CONN_UNREACHABLE 9 // connect failed with ENETUNREACH #define ERR_CONN_FAILED 10 // connect failed #define ERR_PROTO 11 // unexpected result from server #define ERR_MSG_OPEN 12 // could not open the message #define ERR_MSG_READ 13 // reading the message failed #define ERR_MSG_WRITE 14 // writing the message failed #define ERR_EXEC_FAILED 15 // executing a program failed #define ERR_MSG_TEMPFAIL 16 // server temporarily failed to receive #define ERR_UNKNOWN 17 // Arbitrary error code // Permanent errors #define ERR_GHBN_FATAL 33 // gethostbyname failed with NO_RECOVERY #define ERR_MSG_REFUSED 34 // server refused the message #define ERR_MSG_PERMFAIL 35 // server permanently failed to receive #define ERR_PERMANENT_FLAG 32 extern const char* errorstr(int); #endif // NULLMAILER__ERRCODES__H__ nullmailer-1.13/lib/hostname.cc0000664000076400007640000000302211723561166013435 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include "mystring/mystring.h" #include "configio.h" #include "hostname.h" #include "canonicalize.h" mystring me; mystring defaulthost; mystring defaultdomain; void read_hostnames() { int nome; nome = 0; if (!config_read("me", me)) { nome = 1; me = "me"; } if (!config_read("defaultdomain", defaultdomain)) defaultdomain = nome ? "defaultdomain" : me.c_str(); if (!config_read("defaulthost", defaulthost)) defaulthost = nome ? "defaulthost" : me.c_str(); canonicalize(defaulthost); } nullmailer-1.13/lib/setenv.cc0000664000076400007640000000277011723561166013134 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include #include #include #include "setenv.h" #ifndef HAVE_SETENV // This is not really a full emulation of setenv, but close enough int setenv(const char* var, const char* val, int overwrite) { size_t varlen = strlen(var); size_t vallen = strlen(val); char* str = (char*)malloc(varlen+vallen+2); if (str == 0) return -1; memcpy(str, var, varlen); str[varlen] = '='; memcpy(str+varlen+1, val, vallen); str[varlen+vallen+1] = 0; return putenv(str); } #endif nullmailer-1.13/lib/itoa.h0000664000076400007640000000027710702261073012414 00000000000000#ifndef ITOA__H__ #define ITOA__H__ #ifndef INTLENGTH #define INTLENGTH 64 /* 40 digits is long enough to handle unsigned 128-bit numbers */ #endif const char *itoa(long, int = 0); #endif nullmailer-1.13/lib/address.h0000664000076400007640000000027510702261073013103 00000000000000#ifndef NULLMAILER__ADDRESS__H__ #define NULLMAILER__ADDRESS__H__ #include "mystring/mystring.h" bool parse_addresses(mystring& line, mystring& list); #endif // NULLMAILER__ADDRESS__H__ nullmailer-1.13/lib/errcodes.cc0000664000076400007640000000424711723561166013437 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "errcodes.h" const char* errorstr(int code) { switch (code) { case 0: return "No error"; case ERR_HOST_NOT_FOUND: return "Host not found"; case ERR_NO_ADDRESS: return "Host has no address"; case ERR_GHBN_FATAL: return "Fatal error in gethostbyname"; case ERR_GHBN_TEMP: return "Temporary error in gethostbyname"; case ERR_SOCKET: return "Socket failed"; case ERR_CONN_REFUSED: return "Connection refused"; case ERR_CONN_TIMEDOUT: return "Connection timed out"; case ERR_CONN_UNREACHABLE: return "Host or network unreachable"; case ERR_CONN_FAILED: return "Connection failed"; case ERR_PROTO: return "Protocol error"; case ERR_MSG_OPEN: return "Could not open message"; case ERR_MSG_READ: return "Could not read message"; case ERR_MSG_WRITE: return "Could not write message"; case ERR_EXEC_FAILED: return "Could not exec program"; case ERR_MSG_TEMPFAIL: return "Temporary error in sending the message"; case ERR_MSG_REFUSED: return "Server refused the message"; case ERR_MSG_PERMFAIL: return "Permanent error in sending the message"; } return (code & ERR_PERMANENT_FLAG) ? "Unspecified permanent error" : "Unspecified temporary error"; } nullmailer-1.13/lib/canonicalize.h0000664000076400007640000000027210702261073014112 00000000000000#ifndef NULLMAILER__CANONICALIZE__H__ #define NULLMAILER__CANONICALIZE__H__ #include "mystring/mystring.h" void canonicalize(mystring& domain); #endif // NULLMAILER__CANONICALIZE__H__ nullmailer-1.13/lib/netstring.cc0000664000076400007640000000041110702261073013621 00000000000000#include "config.h" #include "netstring.h" #include "itoa.h" mystring str2net(const mystring& s) { return mystringjoin(itoa(s.length())) + ":" + s + ","; } mystring strnl2net(const mystring& s) { return mystringjoin(itoa(s.length()+1)) + ":" + s + "\012,"; } nullmailer-1.13/lib/config_readlist.cc0000664000076400007640000000274411723561166014765 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include "defines.h" #include "configio.h" #include "fdbuf/fdbuf.h" bool config_readlist(const char* filename, list& result) { mystring fullname = CONFIG_DIR; fullname += filename; fdibuf in(fullname.c_str()); if(!in) return false; mystring tmp; bool nonempty = false; while(in.getline(tmp)) { tmp = tmp.strip(); if(tmp[0] != '#' && tmp.length() > 0) { result.append(tmp); nonempty = true; } } return nonempty; } nullmailer-1.13/lib/config_readint.cc0000664000076400007640000000250211723561166014574 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include #include "defines.h" #include "configio.h" #include "fdbuf/fdbuf.h" bool config_readint(const char* filename, int& result) { mystring tmp; if(!config_read(filename, tmp)) return false; char* endptr; result = strtol(tmp.c_str(), &endptr, 10); return endptr > tmp.c_str(); } nullmailer-1.13/lib/fdbuf/0000775000076400007640000000000012133011624012442 500000000000000nullmailer-1.13/lib/fdbuf/Makefile.am0000664000076400007640000000074011743377301014434 00000000000000noinst_LIBRARIES = libfdbuf.a INCLUDES = -I.. if FDBUF_NO_MYSTRING mystring_sources = else mystring_sources = fdibuf_mystring.cc fdibuf_netstring.cc endif if TLS tls_sources = tlsibuf.h tlsibuf.cc tlsobuf.h tlsobuf.cc else tls_sources = endif libfdbuf_a_SOURCES = \ fdbuf.h \ fdbuf.cc \ fdbuf_copy.cc \ fdibuf.h \ fdibuf.cc \ fdobuf.h \ fdobuf.cc \ fdobuf_chownmod.cc \ fdobuf_seek.cc \ fdobuf_signed.cc \ fdobuf_unsigned.cc \ $(tls_sources) \ $(mystring_sources) nullmailer-1.13/lib/fdbuf/Makefile.in0000664000076400007640000003352012133011471014432 00000000000000# Makefile.in generated by automake 1.10.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@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 = lib/fdbuf DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru libfdbuf_a_AR = $(AR) $(ARFLAGS) libfdbuf_a_LIBADD = am__libfdbuf_a_SOURCES_DIST = fdbuf.h fdbuf.cc fdbuf_copy.cc fdibuf.h \ fdibuf.cc fdobuf.h fdobuf.cc fdobuf_chownmod.cc fdobuf_seek.cc \ fdobuf_signed.cc fdobuf_unsigned.cc tlsibuf.h tlsibuf.cc \ tlsobuf.h tlsobuf.cc fdibuf_mystring.cc fdibuf_netstring.cc @TLS_TRUE@am__objects_1 = tlsibuf.$(OBJEXT) tlsobuf.$(OBJEXT) @FDBUF_NO_MYSTRING_FALSE@am__objects_2 = fdibuf_mystring.$(OBJEXT) \ @FDBUF_NO_MYSTRING_FALSE@ fdibuf_netstring.$(OBJEXT) am_libfdbuf_a_OBJECTS = fdbuf.$(OBJEXT) fdbuf_copy.$(OBJEXT) \ fdibuf.$(OBJEXT) fdobuf.$(OBJEXT) fdobuf_chownmod.$(OBJEXT) \ fdobuf_seek.$(OBJEXT) fdobuf_signed.$(OBJEXT) \ fdobuf_unsigned.$(OBJEXT) $(am__objects_1) $(am__objects_2) libfdbuf_a_OBJECTS = $(am_libfdbuf_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libfdbuf_a_SOURCES) DIST_SOURCES = $(am__libfdbuf_a_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ 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 = @MKDIR@ 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@ RANLIB = @RANLIB@ RM = @RM@ 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@ ac_ct_CXX = @ac_ct_CXX@ 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@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libfdbuf.a INCLUDES = -I.. @FDBUF_NO_MYSTRING_FALSE@mystring_sources = fdibuf_mystring.cc fdibuf_netstring.cc @FDBUF_NO_MYSTRING_TRUE@mystring_sources = @TLS_FALSE@tls_sources = @TLS_TRUE@tls_sources = tlsibuf.h tlsibuf.cc tlsobuf.h tlsobuf.cc libfdbuf_a_SOURCES = \ fdbuf.h \ fdbuf.cc \ fdbuf_copy.cc \ fdibuf.h \ fdibuf.cc \ fdobuf.h \ fdobuf.cc \ fdobuf_chownmod.cc \ fdobuf_seek.cc \ fdobuf_signed.cc \ fdobuf_unsigned.cc \ $(tls_sources) \ $(mystring_sources) all: all-am .SUFFIXES: .SUFFIXES: .cc .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) --gnu lib/fdbuf/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/fdbuf/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libfdbuf.a: $(libfdbuf_a_OBJECTS) $(libfdbuf_a_DEPENDENCIES) -rm -f libfdbuf.a $(libfdbuf_a_AR) libfdbuf.a $(libfdbuf_a_OBJECTS) $(libfdbuf_a_LIBADD) $(RANLIB) libfdbuf.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdbuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdbuf_copy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdibuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdibuf_mystring.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdibuf_netstring.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdobuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdobuf_chownmod.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdobuf_seek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdobuf_signed.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdobuf_unsigned.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlsibuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlsobuf.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(LIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES 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-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: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ 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 maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: nullmailer-1.13/lib/fdbuf/fdbuf.cc0000664000076400007640000000433011606077067014000 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "fdbuf.h" #include #include #include #include /////////////////////////////////////////////////////////////////////////////// // Class fdbuf /////////////////////////////////////////////////////////////////////////////// fdbuf::fdbuf(int fdesc, bool dc, unsigned bufsz) : buf(new char[bufsz]), buflength(0), bufstart(0), offset(0), errnum(0), flags(0), bufsize(bufsz), fd(fdesc), do_close(dc) { if(!buf) { flags = flag_error; errnum = errno; } if(fdesc < 0) flags |= flag_closed; #ifdef _REENTRANT pthread_mutex_t tmp = PTHREAD_MUTEX_INITIALIZER; mutex = tmp; pthread_mutex_init(&mutex, 0); #else #ifdef FDBUF_MUTEX_DEBUG mutex_count = 0; #endif #endif } fdbuf::~fdbuf() { close(); #ifdef _REENTRANT pthread_mutex_destroy(&mutex); #endif delete buf; } bool fdbuf::error() const { return flags & flag_error; } bool fdbuf::closed() const { return flags & flag_closed; } bool fdbuf::close() { if(do_close && fd >= 0 && !(flags & flag_closed)) { if(::close(fd) == -1) { errnum = errno; flags |= flag_error; return false; } flags |= flag_closed; } return true; } #if defined(FDBUF_MUTEX_DEBUG) && !defined(_REENTRANT) { int* null = 0; (*null)++; kill(getpid(), 9); } // Debugging code void fdbuf::lock() { if(mutex) abort(); ++mutex; } void fdbuf::unlock() { if(mutex != 1) abort(); --mutex; } #endif nullmailer-1.13/lib/fdbuf/fdobuf_seek.cc0000664000076400007640000000246111606077070015163 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "fdbuf.h" #include #include bool fdobuf::seek(unsigned o) { if(flags) return false; lock(); unsigned buf_start = offset; unsigned buf_end = offset + buflength; if(o >= buf_start && o < buf_end) { bufpos = o - buf_start; } else { if(!nflush(false)) { unlock(); return false; } if(lseek(fd, o, SEEK_SET) != (off_t)o) { errnum = errno; flags |= flag_error; unlock(); return false; } offset = o; } count = 0; unlock(); return true; } nullmailer-1.13/lib/fdbuf/tlsibuf.h0000664000076400007640000000211511743377306014224 00000000000000// Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef FDBUF__TLSIBUF__H__ #define FDBUF__TLSIBUF__H__ #include "fdibuf.h" #include class tlsibuf : public fdibuf { public: tlsibuf(gnutls_session_t, unsigned bufsz = FDBUF_SIZE); protected: gnutls_session_t session; virtual ssize_t _read(char* buf, ssize_t len); }; #endif // FDBUF__TLSIBUF__H__ nullmailer-1.13/lib/fdbuf/fdibuf_mystring.cc0000664000076400007640000000300011606077070016070 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include "fdbuf.h" #include "mystring/mystring.h" bool fdibuf::getline(mystring& out, char terminator) { lock(); count = 0; if(bufstart >= buflength) refill(); if(eof() || error()) { unlock(); return false; } out = ""; while(!eof() && !error()) { char* ptr = buf+bufstart; unsigned bufleft = buflength - bufstart; const char* end = (const char*)memchr(ptr, terminator, bufleft); if(!end) { out += mystring(ptr, bufleft); bufstart = buflength; count += bufleft; refill(); } else { unsigned copylen = end - ptr; out += mystring(ptr, copylen); bufstart += copylen+1; count += copylen+1; break; } } unlock(); return true; } nullmailer-1.13/lib/fdbuf/fdbuf.h0000664000076400007640000000405311743377301013640 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef FDBUF__H__ #define FDBUF__H__ #include "config.h" #include #include #ifdef _REENTRANT #include #endif #ifndef FDBUF_SIZE #define FDBUF_SIZE 4096 #endif class mystring; class fdbuf { public: enum flagbits { flag_eof=1, flag_error=2, flag_closed=4 }; fdbuf(int fdesc, bool dc, unsigned bufsz = FDBUF_SIZE); ~fdbuf(); bool error() const; bool closed() const; bool close(); #ifdef _REENTRANT void lock() { pthread_mutex_lock(&mutex); } void unlock() { pthread_mutex_unlock(&mutex); } #else #ifdef FDBUF_MUTEX_DEBUG void lock(); void unlock(); #else void lock() { } void unlock() { } #endif #endif protected: char* const buf; unsigned buflength; // Length of the data in the buffer unsigned bufstart; // Start of the data in the buffer unsigned offset; // Current file read/write offset int errnum; // Saved error flag unsigned flags; // Status flags const unsigned bufsize; // Total buffer size const int fd; const bool do_close; // True to close on destructor #ifdef _REENTRANT pthread_mutex_t mutex; #else #ifdef FDBUF_MUTEX_DEBUG unsigned mutex; #endif #endif }; bool fdbuf_copy(class fdibuf&, class fdobuf&, bool noflush = false); #include "fdbuf/fdibuf.h" #include "fdbuf/fdobuf.h" #endif // FDBUF__H__ nullmailer-1.13/lib/fdbuf/fdobuf.cc0000664000076400007640000001070211743377306014160 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "fdbuf.h" #include #include #include #include /////////////////////////////////////////////////////////////////////////////// // Globals /////////////////////////////////////////////////////////////////////////////// fdobuf fout(1); fdobuf ferr(2); /////////////////////////////////////////////////////////////////////////////// // Class fdobuf /////////////////////////////////////////////////////////////////////////////// fdobuf::fdobuf(int fdesc, bool dc, unsigned bufsz) : fdbuf(fdesc, dc, bufsz), bufpos(0) { } fdobuf::fdobuf(const char* filename, int f, int mode, unsigned bufsz) : fdbuf(open(filename, O_WRONLY | f, mode), true, bufsz), bufpos(0) { if(fd == -1) { flags = flag_error; errnum = errno; } } fdobuf::~fdobuf() { flush(); } bool fdobuf::close() { if(!flush()) return false; lock(); bool r = fdbuf::close(); unlock(); return r; } bool fdobuf::operator!() const { return error() || closed(); } bool fdobuf::nflush(bool withsync) { if(flags) return false; while(bufstart < buflength) { ssize_t written = _write(buf+bufstart, buflength-bufstart); if(written < 0) { flags |= flag_error; errnum = errno; return false; } else { bufstart += written; offset += written; } } buflength = 0; bufstart = 0; bufpos = 0; if(withsync && (fsync(fd) == -1)) { flags |= flag_error; errnum = errno; return false; } return true; } bool fdobuf::flush() { lock(); bool r = nflush(false); unlock(); return r; } bool fdobuf::sync() { lock(); bool r = nflush(true); unlock(); return r; } bool fdobuf::write(char ch) { if(flags) return false; lock(); count = 0; buf[bufpos++] = ch; //if(buflength >= bufsize && !nflush(false)) { // unlock(); // return false; //} if(bufpos >= buflength) buflength = bufpos; if(buflength >= bufsize && !nflush(false)) { unlock(); return false; } count = 1; unlock(); return true; } bool fdobuf::write_large(const char* data, unsigned datalen) { if(flags) return false; lock(); count = 0; if(!nflush(false)) { unlock(); return false; } while(datalen > 0) { ssize_t written = _write(data, datalen); if(written < 0) { flags |= flag_error; errnum = errno; unlock(); return false; } datalen -= written; data += written; offset += written; count += written; } unlock(); return true; } bool fdobuf::write(const char* data, unsigned datalen) { if(datalen >= bufsize) return write_large(data, datalen); if(flags) return false; lock(); const char* ptr = data; count = 0; // Amount is the number of bytes available in the buffer unsigned amount = bufsize-bufpos; while(datalen >= amount) { // If we get here, this copy will completely fill the buffer, // requiring a flush memcpy(buf+bufpos, ptr, amount); bufpos = bufsize; buflength = bufsize; datalen -= amount; ptr += amount; if(!nflush(false)) { unlock(); return false; } count += amount; amount = bufsize-bufpos; } // At this point, the remaining data will fit into the buffer memcpy(buf+bufpos, ptr, datalen); count += datalen; bufpos += datalen; if(bufpos > buflength) buflength = bufpos; unlock(); return true; } ssize_t fdobuf::_write(const char* buf, ssize_t len) { return ::write(fd, buf, len); } /////////////////////////////////////////////////////////////////////////////// // Manipulators /////////////////////////////////////////////////////////////////////////////// fdobuf& endl(fdobuf& fd) { fd.write("\n", 1); fd.flush(); return fd; } nullmailer-1.13/lib/fdbuf/fdibuf.cc0000664000076400007640000001040111743377301014141 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "fdbuf.h" #include #include #include #include /////////////////////////////////////////////////////////////////////////////// // Class fdibuf /////////////////////////////////////////////////////////////////////////////// fdibuf::fdibuf(int fdesc, bool dc, unsigned bufsz) : fdbuf(fdesc, dc, bufsz) { } fdibuf::fdibuf(const char* filename, unsigned bufsz) : fdbuf(open(filename, O_RDONLY), true, bufsz) { if(fd == -1) { flags = flag_error; errnum = errno; } } fdibuf::~fdibuf() { } bool fdibuf::eof() const { return (flags & flag_eof) && (bufstart >= buflength); } bool fdibuf::operator!() const { return eof() || error() || closed(); } // refill is protected -- no locking bool fdibuf::refill() { if(flags) return false; if(bufstart != 0) { if(bufstart < buflength) { buflength -= bufstart; memcpy(buf, buf+bufstart, buflength); } else buflength = 0; bufstart = 0; } unsigned oldbuflength = buflength; if(buflength < bufsize) { ssize_t red = _read(buf+buflength, bufsize-buflength); if(red < 0) { errnum = errno; flags |= flag_error; } else if(red == 0) flags |= flag_eof; else { buflength += red; offset += red; } } return buflength > oldbuflength; } bool fdibuf::get(char& ch) { lock(); count = 0; if(bufstart >= buflength) refill(); bool r = true; if(eof() || error()) r = false; else { ch = buf[bufstart++]; count = 1; } unlock(); return r; } bool fdibuf::read_large(char* data, unsigned datalen) { lock(); count = 0; // If there's any content in the buffer, memcpy it out first. unsigned len = buflength - bufstart; if(len > datalen) len = datalen; memcpy(data, buf+bufstart, len); data += len; datalen -= len; bufstart += len; count += len; // After the buffer is empty and there's still data to read, // read it straight from the fd instead of copying it through the buffer. while(datalen > 0) { ssize_t red = _read(data, datalen); if(red < 0) { errnum = errno; flags |= flag_error; break; } else if(red == 0) { flags |= flag_eof; break; } data += red; datalen -= red; offset += red; count += red; } unlock(); return datalen == 0; } bool fdibuf::read(char* data, unsigned datalen) { if(datalen >= bufsize) return read_large(data, datalen); lock(); count = 0; char* ptr = data; while(datalen && !eof()) { if(bufstart >= buflength) refill(); unsigned len = buflength-bufstart; if(len > datalen) len = datalen; memcpy(ptr, buf+bufstart, len); bufstart += len; datalen -= len; ptr += len; count += len; } unlock(); return !datalen; } bool fdibuf::seek(unsigned o) { lock(); unsigned buf_start = offset - buflength; if(o >= buf_start && o < offset) { bufstart = o - buf_start; } else { if(lseek(fd, o, SEEK_SET) != (off_t)o) { errnum = errno; flags |= flag_error; unlock(); return false; } offset = o; buflength = bufstart = 0; } count = 0; flags &= ~flag_eof; unlock(); return true; } bool fdibuf::seekfwd(unsigned o) { return seek(tell() + o); } ssize_t fdibuf::_read(char* buf, ssize_t len) { return ::read(fd, buf, len); } /////////////////////////////////////////////////////////////////////////////// // Globals /////////////////////////////////////////////////////////////////////////////// fdibuf fin(0); nullmailer-1.13/lib/fdbuf/tlsibuf.cc0000664000076400007640000000225611743377306014370 00000000000000// Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "tlsibuf.h" /////////////////////////////////////////////////////////////////////////////// // Class tlsibuf /////////////////////////////////////////////////////////////////////////////// tlsibuf::tlsibuf(gnutls_session_t s, unsigned bufsz) : fdibuf(-1, false, bufsz), session(s) { flags &= ~flag_closed; } ssize_t tlsibuf::_read(char* buf, ssize_t len) { return gnutls_record_recv(session, buf, len); } nullmailer-1.13/lib/fdbuf/fdobuf_chownmod.cc0000664000076400007640000000210311606077070016043 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include "fdbuf.h" #include #include bool fdobuf::chown(uid_t uid, gid_t gid) const { if(error()) return false; return fchown(fd, uid, gid) != -1; } bool fdobuf::chmod(mode_t mode) const { if(error()) return false; return fchmod(fd, mode) != -1; } nullmailer-1.13/lib/fdbuf/tlsobuf.h0000664000076400007640000000212411743377307014233 00000000000000// Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef FDBUF__TLSOBUF__H__ #define FDBUF__TLSOBUF__H__ #include "fdobuf.h" #include class tlsobuf : public fdobuf { public: tlsobuf(gnutls_session_t, unsigned bufsz = FDBUF_SIZE); protected: gnutls_session_t session; virtual ssize_t _write(const char* buf, ssize_t len); }; #endif // FDBUF__TLSOBUF__H__ nullmailer-1.13/lib/fdbuf/fdobuf_unsigned.cc0000664000076400007640000000213511606077070016046 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "fdbuf.h" #include #define MAXSTRLEN ((sizeof(signed long)*CHAR_BIT)/3) fdobuf& fdobuf::operator<<(unsigned long i) { if(i == 0) return operator<<('0'); char buf[MAXSTRLEN+1]; char* ptr = buf+MAXSTRLEN; *ptr-- = 0; while(i) { *ptr-- = i % 10 + '0'; i /= 10; } return operator<<(ptr+1); } nullmailer-1.13/lib/fdbuf/fdibuf_netstring.cc0000664000076400007640000000236211606077070016243 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include "fdbuf.h" #include "mystring/mystring.h" bool fdibuf::getnetstring(mystring& out) { // Read in the size char ch; unsigned long size = 0; for(;;) { if(!get(ch)) return false; if(ch == ':') break; else if(ch >= '0' && ch <= '9') size = size*10 + (ch-'0'); else return false; } char tmp[size]; if(!read(tmp, size) || !get(ch) || ch != ',') return false; out = mystring(tmp, size); return true; } nullmailer-1.13/lib/fdbuf/ChangeLog0000664000076400007640000001276507152524002014153 000000000000002000-08-22 Bruce Guenter * Added the missing accessor for the internal "errnum" data member to the fdibuf and fdobuf classes. 2000-08-10 Bruce Guenter * fdibuf.cc (read_large): Fixed a bug in the increment of data. * fdibuf_mystring.cc (getline): Reduced some of the expressions into variables. 2000-04-08 Bruce Guenter * fdibuf.cc (read_large): Fixed bug: count needed to be incremented after reading data in. 2000-04-07 Bruce Guenter * fdobuf_signed.cc (operator<<): Immediately output a '-' for negative numbers rather than storing a negative flag for later. * fdobuf_unsigned.cc (operator<<): Moved the integer versions of this operator into their own modules. * fdobuf_seek.cc (seek): Moved this routine out of fdobuf.cc * fdibuf.cc (read_large): Added this routine to read in a chunk of data larger than the size of the buffer. 2000-04-06 Bruce Guenter * fdibuf_netstring.cc (getnetstring): Moved this routine into its own source file. * fdobuf.cc (write_large): Added this routine to write out a chunk of data larger than the size of the buffer, to avoid doing extra copies. (write): Removed an extraneous code segment. * fdobuf.h: Moved the fdobuf declarations here. * fdibuf.h: Moved the fdibuf declarations here. * fdbuf.h: Removed extraneous fdobuf declaration. 1999-07-08 Bruce Guenter * fdobuf.cc (write): Optimized this routine better for the case where the amount of data to be written will fit inside the buffer. 1999-07-05 Bruce Guenter * fdbuf.h (fdobuf,fdibuf): Made some of the routines here virtual in order to extend it properly. Added "tell()" operations to both fdibuf and fdobuf to indicate the current logical read/write point. 1999-07-04 Bruce Guenter * fdobuf_chownmod.cc: Added two new routines chown and chmod, which operate directly on the open fd. 1999-06-30 Bruce Guenter * fdibuf_mystring.cc (getline): Make this routine return the number of bytes actually read, including the delimiter, even though the delimiter is not added to the returned string. 1999-06-29 Bruce Guenter * fdibuf.cc (fdibuf): Added a 'seekfwd' function to seek forwards "o" bytes. * fdibuf_mystring.cc (getline): Added locking and set the count properly. 1999-06-28 Bruce Guenter * fdibuf.cc (get): Make sure count is set for get. 1999-06-06 Bruce Guenter * fdbuf.cc (fdbuf): Fixed long-standing bug -- I forgot to delete the buffer in the destructor. (close): Modified the code to ensure that the fd is not closed twice (as would happen when destructing the fdbuf). 1999-05-31 Bruce Guenter * fdobuf.cc: Redefined flush as nflush; added sync code to nflush; made flush and sync call nflush; added mutex lock calls to all public methods. * fdibuf.cc: Added mutex lock calls to all public methods. * fdbuf.cc: Added debugging implementations of lock() and unlock() mutex operators (to be removed before real use). 1999-05-28 Bruce Guenter * fdobuf.cc (fdobuf): Fixed missing initialization of bufpos in one of the two constructors. 1999-05-01 Bruce Guenter * fdobuf.cc (fdobuf): Added an optional "mode" parameter which defaults to 0666, which is the permissions for the new file. (sync): Wrote this function to fsync the file descriptor. 1999-04-27 Bruce Guenter * fdbuf.h (fdobuf): Removed definition for sync and nonblock mode, as they won't be handled correctly in the writing code. 1999-04-03 Bruce Guenter * fdobuf.cc (operator<<): Wrote an operator for signed and unsigned longs, with overloaded functions for ints and shorts that promote the parameters to longs. (write): Wrote a write routine specifically for a single character. 1999-04-01 Bruce Guenter * fdobuf.cc: Fixed handling of seek by adding a "bufpos" indicator that points to the current position in the buffer at which writes should go. buflength is effectively the maximum value of bufpos between flushes. * fdibuf.cc (get): Renamed getchar to get (to be potentially overloaded with other types). * fdbuf.h (fdbuf): Removed a bunch of write methods and replaced them with "operator<<", with similar capability to iostreams methods of the same names. * fdobuf.cc (endl): Wrote this manipulator to write an end-of-line and flush the buffer. 1999-03-31 Bruce Guenter * fdobuf_mystring.cc: Moved all the mystring-specific code from fdobuf.cc into this module to lessen link problems. * fdibuf_mystring.cc: Moved all the mystring-specific code from fdibuf.cc into this module to lessen link problems. * fdobuf.cc (seek): Wrote this seek routine to allow movement in an output file buffer. * fdibuf.cc (seek): Generalized the rewind routine to allow arbitrary seeks. It also checks to see if the seek point is within the current buffer and if so just repositions its pointers. * fdbuf.h: If BUFSIZE is not defined, set it here to 4096. (class fdbuf ): Rename length, start, and size to buflength, bufstart, and bufsize. Add a new field "offset" to indicate the current file seek offset. nullmailer-1.13/lib/fdbuf/fdbuf_copy.cc0000664000076400007640000000256711606077070015036 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "fdbuf.h" /////////////////////////////////////////////////////////////////////////////// // Other routines /////////////////////////////////////////////////////////////////////////////// bool fdbuf_copy(fdibuf& in, fdobuf& out, bool noflush) { if(in.eof()) return true; if(!in || !out) return false; do { char buf[FDBUF_SIZE]; if(!in.read(buf, FDBUF_SIZE) && in.last_count() == 0) break; if(!out.write(buf, in.last_count()) && out.last_count() < in.last_count()) return false; } while(!in.eof()); if(!noflush && !out.flush()) return false; return in.eof(); } nullmailer-1.13/lib/fdbuf/fdibuf.h0000664000076400007640000000371511743377301014015 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef FDBUF__FDIBUF__H__ #define FDBUF__FDIBUF__H__ #include "fdbuf.h" class fdibuf : protected fdbuf { public: fdibuf(const char* filename, unsigned bufsz = FDBUF_SIZE); fdibuf(int fdesc, bool dc = false, unsigned bufsz = FDBUF_SIZE); virtual ~fdibuf(); bool close() { lock(); bool r = fdbuf::close(); unlock(); return r; } bool eof() const; bool operator!() const ; operator bool() const { return !operator!(); } virtual bool get(char& ch); virtual bool getline(mystring& out, char terminator = '\n'); virtual bool getnetstring(mystring& out); virtual bool read(char*, unsigned); virtual bool read_large(char*, unsigned); bool read(unsigned char* b, unsigned l) { return read((char*)b, l); } bool read(signed char* b, unsigned l) { return read((char*)b, l); } unsigned last_count() { return count; } bool seek(unsigned o); bool seekfwd(unsigned o); bool rewind() { return seek(0); } unsigned tell() const { return offset-buflength+bufstart; } int error_number() const { return errnum; } protected: unsigned count; // Number of bytes read by last operation bool refill(); virtual ssize_t _read(char*, ssize_t); }; extern fdibuf fin; #endif // FDBUF__FDIBUF__H__ nullmailer-1.13/lib/fdbuf/fdobuf_signed.cc0000664000076400007640000000221611606077070015503 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "fdbuf.h" #include #define MAXSTRLEN ((sizeof(signed long)*CHAR_BIT)/3) fdobuf& fdobuf::operator<<(signed long i) { if(i == 0) return operator<<('0'); if(i < 0) { operator<<('-'); i = -i; } char buf[MAXSTRLEN+1]; char* ptr = buf+MAXSTRLEN; *ptr-- = 0; while(i) { *ptr-- = i % 10 + '0'; i /= 10; } return operator<<(ptr+1); } nullmailer-1.13/lib/fdbuf/fdobuf.h0000664000076400007640000000556711743377306014037 00000000000000// Copyright (C) 1999,2000 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef FDBUF__FDOBUF__H__ #define FDBUF__FDOBUF__H__ #include "fdbuf.h" class fdobuf : protected fdbuf { public: enum openflags { create=O_CREAT, excl=O_EXCL, trunc=O_TRUNC, append=O_APPEND }; fdobuf(const char* filename, int, int mode = 0666, unsigned bufsz = FDBUF_SIZE); fdobuf(int fdesc, bool dc=false, unsigned bufsz = FDBUF_SIZE); virtual ~fdobuf(); bool close(); bool operator!() const; operator bool() const { return !operator!(); } bool flush(); bool sync(); virtual bool write(char); bool write(unsigned char c) { return write((char)c); } bool write(signed char c) { return write((char)c); } virtual bool write(const char*, unsigned); bool write(const unsigned char* b, unsigned l) { return write((char*)b, l); } bool write(const signed char* b, unsigned l) { return write((char*)b, l); } virtual bool write_large(const char*, unsigned); unsigned last_count() { return count; } bool seek(unsigned o); bool rewind() { return seek(0); } unsigned tell() const { return offset + bufpos; } bool chown(uid_t, gid_t) const; bool chmod(mode_t) const; fdobuf& operator<<(const char* str) { write(str, strlen(str)); return *this; } fdobuf& operator<<(char ch) { write(ch); return *this; } fdobuf& operator<<(fdobuf& (*manip)(fdobuf&)) { return manip(*this); } fdobuf& operator<<(unsigned long); fdobuf& operator<<(signed long); fdobuf& operator<<(unsigned i) { return operator<<((unsigned long)i); } fdobuf& operator<<(signed i) { return operator<<((signed long)i); } fdobuf& operator<<(unsigned short i) { return operator<<((unsigned long)i); } fdobuf& operator<<(signed short i) { return operator<<((signed long)i); } int error_number() const { return errnum; } protected: virtual bool nflush(bool withsync); virtual ssize_t _write(const char* buf, ssize_t len); unsigned bufpos; // Current write position in the buffer unsigned count; // Number of bytes written by last operation }; fdobuf& endl(fdobuf& fd); extern fdobuf fout; extern fdobuf ferr; #endif // FDBUF__FDOBUF__H__ nullmailer-1.13/lib/fdbuf/tlsobuf.cc0000664000076400007640000000226511743377307014377 00000000000000// Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "tlsobuf.h" /////////////////////////////////////////////////////////////////////////////// // Class tlsobuf /////////////////////////////////////////////////////////////////////////////// tlsobuf::tlsobuf(gnutls_session_t s, unsigned bufsz) : fdobuf(-1, false, bufsz), session(s) { flags &= ~flag_closed; } ssize_t tlsobuf::_write(const char* buf, ssize_t len) { return gnutls_record_send(session, buf, len); } nullmailer-1.13/lib/base64.cc0000664000076400007640000000406111723561166012707 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "base64.h" static char basis[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; void base64_encode(const mystring& in, mystring& out) { size_t length; const unsigned char* ptr; char buf[4]; for (length = in.length(), ptr = (const unsigned char*)in.c_str(); length >= 3; length -= 3, ptr += 3) { base64_encode_chunk(ptr, 3, buf); out.append(buf, 4); } if (length > 0) { base64_encode_chunk(ptr, length, buf); out.append(buf, 4); } } void base64_encode_chunk(const unsigned char bin[3], unsigned len, char encoded[4]) { encoded[0] = basis[bin[0] >> 2]; switch(len) { case 1: encoded[1] = basis[(bin[0] << 4) & 0x3f]; encoded[2] = encoded[3] = '='; break; case 2: encoded[1] = basis[(bin[0] << 4 | bin[1] >> 4) & 0x3f]; encoded[2] = basis[(bin[1] << 2) & 0x3f]; encoded[3] = '='; break; case 3: encoded[1] = basis[(bin[0] << 4 | bin[1] >> 4) & 0x3f]; encoded[2] = basis[(bin[1] << 2 | bin[2] >> 6) & 0x3f]; encoded[3] = basis[bin[2] & 0x3f]; } } nullmailer-1.13/lib/ac/0000775000076400007640000000000012133011625011740 500000000000000nullmailer-1.13/lib/ac/time.h0000664000076400007640000000023612133011625012770 00000000000000#if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif nullmailer-1.13/lib/ac/dirent.h0000664000076400007640000000052312133011625013316 00000000000000#include #if HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) #else # define dirent direct # define NAMLEN(dirent) (dirent)->d_namlen # if HAVE_SYS_NDIR_H # include # endif # if HAVE_SYS_DIR_H # include # endif # if HAVE_NDIR_H # include # endif #endif nullmailer-1.13/lib/ac/wait.h0000664000076400007640000000035712133011625013002 00000000000000#include #if HAVE_SYS_WAIT_H # include #endif #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif nullmailer-1.13/doc/0000775000076400007640000000000012133011624011353 500000000000000nullmailer-1.13/doc/Makefile.am0000664000076400007640000000025612125146525013344 00000000000000# info_TEXINFOS = nullmailer.texi man_MANS = \ nullmailer-inject.1 \ sendmail.1 \ nullmailer.7 \ nullmailer-queue.8 \ nullmailer-send.8 EXTRA_DIST = diagram $(man_MANS) nullmailer-1.13/doc/Makefile.in0000664000076400007640000003351012133011470013341 00000000000000# Makefile.in generated by automake 1.10.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@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 = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man7dir)" \ "$(DESTDIR)$(man8dir)" man7dir = $(mandir)/man7 man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ 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 = @MKDIR@ 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@ RANLIB = @RANLIB@ RM = @RM@ 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@ ac_ct_CXX = @ac_ct_CXX@ 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@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # info_TEXINFOS = nullmailer.texi man_MANS = \ nullmailer-inject.1 \ sendmail.1 \ nullmailer.7 \ nullmailer-queue.8 \ nullmailer-send.8 EXTRA_DIST = diagram $(man_MANS) 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 doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $$i; then file=$$i; \ else file=$(srcdir)/$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done install-man7: $(man7_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man7dir)" || $(MKDIR_P) "$(DESTDIR)$(man7dir)" @list='$(man7_MANS) $(dist_man7_MANS) $(nodist_man7_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.7*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $$i; then file=$$i; \ else file=$(srcdir)/$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 7*) ;; \ *) ext='7' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man7dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man7dir)/$$inst"; \ done uninstall-man7: @$(NORMAL_UNINSTALL) @list='$(man7_MANS) $(dist_man7_MANS) $(nodist_man7_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.7*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 7*) ;; \ *) ext='7' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man7dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man7dir)/$$inst"; \ done install-man8: $(man8_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.8*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $$i; then file=$$i; \ else file=$(srcdir)/$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 8*) ;; \ *) ext='8' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ done uninstall-man8: @$(NORMAL_UNINSTALL) @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.8*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 8*) ;; \ *) ext='8' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(man8dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 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-man 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-man1 install-man7 install-man8 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-man uninstall-man: uninstall-man1 uninstall-man7 uninstall-man8 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-man7 install-man8 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-man \ uninstall-man1 uninstall-man7 uninstall-man8 # 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: nullmailer-1.13/doc/nullmailer-inject.10000664000076400007640000001373712125146525015020 00000000000000.TH nullmailer-inject 1 .SH NAME nullmailer-inject \- Reformat and inject a message into the queue. .SH SYNOPSIS .B nullmailer-inject [\-a] [\-b] [\-e] [\-f sender] [\-h] .I [recipient [recipient ...]] .SH DESCRIPTION This program reads a email message from standard input, reformats its header to comply with RFC822, and sends the resulting message to the queue. .SS HEADER FIELDS The following lines are parsed for recipient addresses: .IR To , .IR Cc , .IR Bcc , .IR Apparently-To , .IR Resent-To , .IR Resent-Cc , and .IR Resent-Bcc . The following sender address lines are parsed and rewritten: .IR Sender , .IR From , .IR Reply-To , .IR Return-Path , .IR Return-Receipt-To , .IR Errors-To , .IR Resent-Sender , .IR Resent-From , and .IR Resent-Reply-To . If the .I Return-Path header field is present and contains a single address, its contents will be used to set the envelope sender address. If the message contains any of the following fields, it is treated as a resent message: .IR Resent-Sender , .IR Resent-From , .IR Resent-Reply-To , .IR Resent-To , .IR Resent-Cc , .IR Resent-Bcc , .IR Resent-Date , .IR Resent-Message-ID . If the message is resent, only the recipient fields prefixed with .I Resent- are examined for addresses. Any occurrences of .IR Bcc , .IR Resent-Bcc , .IR Return-Path , or .I Content-Length are discarded after they are parsed (if necessary). If the header lacks a .I Message-Id field, a unique string is generated and added to the message. If the header lacks a .I Date field, the current local date and time in RFC822 format is appended to the message. If the message has no .I To or .I Cc fields, the following line is appended to the message: .EX Cc: recipient list not shown: ; .EE .SS ADDRESS LISTS Address lists are expected to follow the syntax set out in RFC822. The following is a simplified explanation of the syntax. An address list is list of addresses seperated by commas. An individual address may have one of the following three forms: .IR user@fqdn , .IR comment , or .IR phrase: address-list; . Any of the first two forms may be used within the address list of the third form. Any word containing special characters must be placed in double quotes and the special characters must be preceded with a backslash. Comments may be placed between addresses in parenthesis. All comments are ignored. Addresses lists are reformatted as they are parsed for ease of later re-parsing when the message reaches the destination(s). If an address is missing a fqdn, .B nullmailer-inject adds one. .SH OPTIONS .TP .I -a Use only the command line arguments as recipient addresses. Ignore the header recipient lines. .TP .I -b Use both the command line arguments and data from the message header as recipient addresses. .TP .I -e Use either the command line arguments (if there are any) or data from the message header (if there are no arguments) as the recipient addresses. .TP .I -f sender Set the envelope sender address to .I sender . .TP .I -h Use only data from the message header as the recipient addresses. .TP .I -n Do not queue the message, but print the reformatted contents to standard output. .TP .I -v Print out the envelope (sender and recipient addresses) preceding the message when printing the message to standard output. .SH RETURN VALUE Exits 0 if it was successful, otherwise it prints a diagnostic message to standard output and exits 1. .SH ENVIRONMENT The environment variable .BR NULLMAILER_FLAGS is parsed and the behavior of .B nullmailer-inject is modified if any of the following letters are present: .TP .B c Use "address (comment)" style in the generated .B From field instead of the default "comment
" style. .TP .B f Ignore and remove any .B From header lines and always insert a generated one. .TP .B i Ignore and remove any .B Message-Id header lines. .TP .B s Ignore and remove any .B Return-Path header lines. .TP .B t Insert a .BR To line containing a list of the recipients if the header does not contain either a .B To or a .B Cc field. If the message is determined to be a resent message (see above), a .B Resent-To field is added if the header does not contain either a .BR Resent-To or a .BR Resent-Cc field. .PP The user name is set by .BR NULLMAILER_USER , .BR MAILUSER , .BR USER , or .BR LOGNAME , whichever comes first. If none of the above are set the name is taken from the password file, or set to .I unknown if that fails. The host name is set by the canonicalized value of .BR NULLMAILER_HOST , .BR MAILHOST , or .BR HOSTNAME , whichever comes first, or the .I defaulthost config file if none of the above are set (see below). The full name of the user is set by .BR NULLMAILER_NAME , .BR MAILNAME , or .BR NAME , whichever comes first. The user and host name of the envelope sender default to the user and host name set above, but may be overridden by .BR NULLMAILER_SUSER and .BR NULLMAILER_SHOST . If .BR NULLMAILER_QUEUE is set, the program named is used in place of .B nullmailer-queue to queue the formatted message. .SH CONTROL FILES When reading the following files, a single line is read and stripped of all leading and trailing whitespace characters. .TP .B defaultdomain The content of this file is appended to any host name that does not contain a period (except .IR localhost ), including .BR defaulthost and .BR idhost . Defaults to the value of the .I me control file, if it exists, otherwise the literal name .IR defauldomain . .TP .B defaulthost The content of this file is appended to any address that is missing a host name. Defaults to the value of the .I me control file, if it exists, otherwise the literal name .IR defaulthost . .TP .B idhost The content of this file is used when building the message-id string for the message. Defaults to the canonicalized value of .BR defaulthost . .TP .B me The fully-qualifiled host name of the computer running nullmailer. Defaults to the literal name .IR me . .SH SEE ALSO nullmailer-queue(8) .SH NOTES This document glosses over very many details of how address parsing and rewriting actually works (among other things). nullmailer-1.13/doc/nullmailer-queue.80000664000076400007640000000331312120374703014660 00000000000000.TH nullmailer-queue 8 .SH NAME nullmailer-queue \- insert mail messages into the queue .SH SYNOPSIS .B nullmailer-queue .SH DESCRIPTION This program reads a formatted mail message from standard input and safely injects it into the outgoing mail queue. .PP The data sent into standard input is expected to have the following format: one line containing the envelope sender, one or more lines containing the recipients, a single blank line, and then the contents of the message exactly as it is to be transmitted to the destination. All lines are terminated with a single line-feed character. All addresses must contain a fully-qualified domain name. .PP .SH RETURN VALUE Exits 0 if it successfully queues the message. If it failed to queue the message, it exits 1 and prints an error message to stdandard output. .SH CONTROL FILES .TP .B adminaddr If this file is not empty, all recipients to users at either "localhost" (the literal string) or the canonical host name (from the .I me control file) are remapped to this address. This is provided to allow local daemons to be able to send email to "somebody@localhost" and have it go somewhere sensible instead of being bounced by your relay host. To send to multiple addresses, put them all on one line separated by a comma. .SH OTHER FILES .TP .B /var/nullmailer/queue The directory into which the completed messages are moved. .TP .B /var/nullmailer/tmp The directory in which messages are formed temporarily. .TP .B /var/nullmailer/trigger A pipe used to trigger .BR nullmailer-send to immediately start sending the message from the queue. .SH SEE ALSO nullmailer-inject(1), nullmailer-send(8) .SH LIMITATIONS This program should enforce system-wide configurable message length limits. nullmailer-1.13/doc/sendmail.10000664000076400007640000000246012133011317013152 00000000000000.TH sendmail 1 .SH NAME sendmail \- sendmail emulator interface for nullmailer .SH SYNOPSIS .B sendmail [ .B flags ] [ .I recipients ] < .I message .SH DESCRIPTION This program is a front end program for .BR nullmailer-inject . It is used by programs that expect a .I sendmail interface for sending email. After parsing the command-line arguments, this program executes .B nullmailer-inject directly. See the documentation for .B nullmailer-inject for details on how messages are reformatted and queued. .SH OPTIONS .TP .B \-B TYPE .TP .B \-C FILE .TP .B \-d DEBUG .TP .B \-h COUNT .TP .B \-i .TP .B \-L TAG .TP .B \-N DSN .TP .B \-n .TP .B \-O OPTION .TP .B \-o OPTION .TP .B \-p PROTOCOL .TP .B \-q TIME .TP .B \-R RETURN .TP .B \-U .TP .B \-V ENVID .TP .B \-v .TP .B \-X LOGFILE Ignored for compatibility .TP .B \-bm Read mail from standard input (default). .TP .B \-bp List information about mail queue. This executes .BR mailq . .TP .B \-bs Use the SMTP protocol on standard input and standard output. This executes .BR nullmailer-smtpd . .TP .B \-F ADDRESS Sets the full name of the sender. .TP .B \-f ADDRESS Sets the envelope sender address. .TP .B \-r ADDRESS An alternate and obsolete form of the -f flag. .TP .B \-t Read message for recipients and ignore the command-line arguments. .SH SEE ALSO nullmailer-inject(1) nullmailer-1.13/doc/nullmailer.70000664000076400007640000000146510702261073013542 00000000000000.TH nullmailer 7 .SH NAME nullmailer \- Overview of nullmailer documentation .SH INTRODUCTION .B nullmailer is a simple and secure relay-only mail transport agent. .P Documentation on how messages are reformatted and injected into the queue can be found in .BR nullmailer-inject (1). Documentation on how messages are actually inserted into the queue can be found in .BR nullmailer-queue (8). The process of sending queued messages is described in .BR nullmailer-send (8). .P The following table lists all the control files used by .BR nullmailer . .RS .nf .ta 5c control file used by .I adminaddr \fBnullmailer-queue .I defaultdomain \fBnullmailer-inject .I defaulthost \fBnullmailer-inject .I idhost \fBnullmailer-inject .I me \fBnullmailer-inject .I pausetime \fBnullmailer-send .I remotes \fBnullmailer-send .fi .RE nullmailer-1.13/doc/nullmailer-send.80000664000076400007640000000774112125146525014502 00000000000000.TH nullmailer-send 8 .SH NAME nullmailer-send \- Send queued messages .SH SYNOPSIS .B nullmailer-send .SH DESCRIPTION This program is responsible for coordinating the transmission of messages that have been queued by .BR nullmailer-queue . It uses a variety of protocol modules to deliver the messages from the queue to remote "smart" servers. .P When the program starts, the queue is scanned to build a list of messages to send. The queue is rescanned when either the trigger is pulled, or after .B pausetime seconds have elapsed after the last failed delivery. When there are no messages in the queue, nullmailer does no rescanning until the trigger is pulled. Pulling the trigger consists of opening up the trigger named pipe and writing a single byte to it, which causes this program to be awakened (if it's not already processing the queue). This procedure is done by .B nullmailer-queue to ensure that messages are delivered immediately. You can start delivery by hand from the command line like this: .EX echo 1 > trigger .EE .P Delivery of messages consists of reading the list of remote servers and then trying to deliver the messages to these servers as follows. For each remote in the list, the named protocol handler is executed once for each message remaining in the queue. If the protocol handler succeeds, the message is removed from the queue and processing continues with the next message. If it fails, the remote is skipped and processing of the remaing messages continues with the next remote. When all the remotes have been tried, .B nullmailer-send sleeps for a number of seconds specified by .B pausetime before retrying sending the contents of the queue. .SH CONTROL FILES All the control files are reread each time the queue is run. .TP .B helohost Sets the environment variable .B $HELOHOST which is used by the SMTP protocol module to set the parameter given to the .I HELO command. Defaults to the value of the .B me configuration file. .TP .B maxpause The maximum number of seconds to pause between successive queue runs (defaults to .IR 86400 ). .TP .B pausetime The minimum number of seconds to pause between successive queue runs when there are messages in the queue (defaults to .IR 60 ). Each time this timeout is reached, the timeout is doubled to a maximum of .BR maxpause . After new messages are injected, the timeout is reset. If this is set to .IR 0 , nullmailer-send will exit immediately after going through the queue once (one-shot mode). .TP .B remotes This file contains a list of remote servers to which to send each message. Each line of this file contains a remote host name or address followed by an optional protocol string, separated by white space. The protocol name defaults to .IR smtp , and may be followed by command-line arguments for that module. For example, to connect to port 2525 on your SMTP smart host, which also requires SMTP authentication, use: .EX smarthost.dom smtp --port=2525 --user=user --pass=pass .EE If your smarthost requires LOGIN authentication instead of the default PLAIN method, use: .EX smarthost.dom smtp --port=2525 --auth-login --user=user --pass=pass .EE Blank lines and lines starting with a pound are ignored. When called with the .B --help option, each protocol module will list its available command-line arguments: .EX /usr/local/libexec/nullmailer/smtp --help .EE .TP .B sendtimeout The number of seconds to wait for a remote module listed above to complete sending a message before killing it and trying again (defaults to .IR 3600 ). If this is set to .IR 0 , .B nullmailer-send will wait forever for messages to complete sending. .SH FILES .TP .B /var/nullmailer/queue The message queue. .TP .B /var/nullmailer/trigger A trigger file to cause immediate delivery. .TP .B /usr/local/etc/nullmailer The configuration directory. .TP .B /usr/local/libexec/nullmailer The protocol program directory. .SH SEE ALSO nullmailer-queue(8), nullmailer-inject(1), mailq(1), /usr/local/libexec/nullmailer/smtp --help, /usr/local/libexec/nullmailer/qmqp --help nullmailer-1.13/doc/diagram0000664000076400007640000000072210702261073012630 00000000000000qmail-inject sendmail \ / \ / \ / nullmailer-inject | | | nullmailer-queue | | | QUEUE/tmp -> QUEUE/queue | | | nullmailer-send | | | BIN/PROTOCOL nullmailer-1.13/NEWS0000664000076400007640000003524312133007473011243 00000000000000This file lists all the major user-visible changes to nullmailer. ------------------------------------------------------------------------------- Changes in version 1.13 - Fixed growing recipient list when using sendmail -bs to send multiple messages. Development of this version has been sponsored by FutureQuest, Inc. ossi@FutureQuest.net http://www.FutureQuest.net/ ------------------------------------------------------------------------------- Changes in version 1.12 - Added a quadratic backoff for resend times. - Added support for multiple admin addresses in nullmailer-queue. - SMTP sender now sends a QUIT on success too. - Fixed sendmail -bs mode to properly strip leading periods. - Fixed duplicated final header line when message has no body. Development of this version has been sponsored by FutureQuest, Inc. ossi@FutureQuest.net http://www.FutureQuest.net/ ------------------------------------------------------------------------------- Changes in version 1.11 - Simplify (and expand) handling of ignored sendmail options. - Fixed command-line interpretation of short options with values. - Added support for SSL/TLS client certificates. Development of this version has been sponsored by FutureQuest, Inc. ossi@FutureQuest.net http://www.FutureQuest.net/ ------------------------------------------------------------------------------- Changes in version 1.10 - Added support for SMTPS (SMTP over SSL/TLS) and STARTTLS. - Added support for auto-detection of login method in SMTP protocol. - Added support for -bp (mailq) and -bs (SMTP) mode in the sendmail wrapper. Development of this version has been sponsored by FutureQuest, Inc. ossi@FutureQuest.net http://www.FutureQuest.net/ ------------------------------------------------------------------------------- Changes in version 1.06 - Made nullmailer-queue sync and not just flush queued files to protect against crashes during sensitive operations. - Fixed handling of whitespace in quoted strings in headers. - Fixed handling of timeouts when sending. Development of this version has been sponsored by FutureQuest, Inc. ossi@FutureQuest.net http://www.FutureQuest.net/ ------------------------------------------------------------------------------- Changes in version 1.05 - Fixed compilation of src/selfpipe.cc on Solaris and other OSes. - Fixed handling of TM_HAS_ISDST on Solaris. - Fixed a few address parsing glitches. Development of this version has been sponsored by FutureQuest, Inc. ossi@FutureQuest.net http://www.FutureQuest.net/ ------------------------------------------------------------------------------- Changes in version 1.04 - Fixed rewriting mail to @localhost if defaultdomain is set by not appending .defaultdomain to *@localhost. - Added support for reporting the sender and recipients in mailq. - Added a send timeout in nullmailer-send, to kill sending messages that stall. - Added support in nullmailer-inject for $NULLMAILER_QUEUE to name the program which is used to queue messages. Development of this version has been sponsored by FutureQuest, Inc. ossi@FutureQuest.net http://www.FutureQuest.net/ ------------------------------------------------------------------------------- Changes in version 1.03 - Fixed the SMTP protocol module to send QUIT on protocol failures. - Added support for the SMTP AUTH LOGIN method. Thanks to Sean MacLennan for the suggestion. - Fixed the SMTP protocol module to send EHLO instead of HELO when doing authentication. Thanks to Norbert Tretkowski for pointing this out. - Fixed compile breakage on Solaris due to use of setenv. - Fixed netstring length bug in QMQP sending module. - If the sender name cannot be determined from the environment variables, try to pull it from /etc/passwd before using "unknown". Thanks Roderick Schertler. Development of this version has been sponsored by FutureQuest, Inc. ossi@FutureQuest.net http://www.FutureQuest.net/ ------------------------------------------------------------------------------- Changes in version 1.02 - Fixed bug in SMTP AUTH that would cause SMTP sending to crash with a segfault when it was used. Development of this version has been sponsored by FutureQuest, Inc. ossi@FutureQuest.net http://www.FutureQuest.net/ ------------------------------------------------------------------------------- Changes in version 1.01 - Added support for SMTP AUTH PLAIN. Thanks to Ace Jones for the initial implementation. - Fixed compile error in lib/list.h Development of this version has been sponsored by FutureQuest, Inc. ossi@FutureQuest.net http://www.FutureQuest.net/ ------------------------------------------------------------------------------- Changes in version 1.00 - Fixed problem with multiple arguments to protocol modules. Thanks Sascha Silbe. - Fixed extraneous spaces in SMTP sender. - Made permissions on queued files more strict. - Handle the "-bs" flag in the sendmail wrapper by dieing when we see it. - Fixed the address parser handling domain names with trailing periods. - Fixed bug in header parsing that would cause the last header line to be repeated if there was no body. - Fixed bug in handling headers containing CR+LF line endings. Development of this version has been sponsored by FutureQuest, Inc. ossi@FutureQuest.net http://www.FutureQuest.net/ ------------------------------------------------------------------------------- Changes in version 1.00RC7 - Fixed typo in smtp protocol module that caused HELO to be sent without a hostname. - Added a one-shot mode to nullmailer-send, triggered by setting the pausetime to zero. Development of this version has been sponsored by FutureQuest, Inc. ossi@FutureQuest.net http://www.FutureQuest.net/ ------------------------------------------------------------------------------- Changes in version 1.00RC6 - Protocol modules now report all failure and success messages. - Removed the whole gethostname/getdomainname mess and replaced it with code to read the hostname from the "me" control file, and the default domain name from the "defaultdomain" control file. - Fixed a bug that would cause lines starting with a period to have that period stripped when it was sent via SMTP. - Added some missing includes to fix compilation failures in various sources. - Fixed a bug in the setenv function in sendmail.cc. NOTE! Make sure to set up the new "me" control file before using this version. The RPM install does this automatically. Development of this version has been sponsored by FutureQuest, Inc. ossi@FutureQuest.net http://www.FutureQuest.net/ ------------------------------------------------------------------------------- Changes in version 1.00RC5 - Fixed getdomainname prototype in lib/hostname.cc. - Return proper error codes for permanent and temporary SMTP failures. - Adapted to use supervise-scripts 3. ------------------------------------------------------------------------------- Changes in version 1.00RC4 - Fixed the reversed logic in the named pipe bug check. - Updated the HOWTO notes. - Fixed a compile problem on Solaris (and possibly other systems). - Fixed address parsing to strip a trailing period in the domain name. ------------------------------------------------------------------------------- Changes in version 1.00RC3 - Treat the first non-header line in a message as the first line of the body, even if it isn't preceded by a blank line. - Fixed another host name bug causing compilation failures on systems without "domainname" in struct utsname. - Fixed some typos that would prevent proper TCP connections on many systems. - Handle systems that require both a reader and a writer on a named pipe to do a proper select. - Added a man page for the sendmail emulator, and an overall man page. - Fixed a bug in the fdbuf library that was causing data loss or damage. ------------------------------------------------------------------------------- Changes in version 1.00RC2 - Fixed a bug in the way host names are determined. This should fix problems with nullmailer-queue reporting an invalid envelope. - Fixed a portability bug in the mergelib.sh script. - Fixed a potential bug in the SMTP protocol response handling. ------------------------------------------------------------------------------- Changes in version 1.00RC1 - Imported latest fdbuf, mystring, and cli libraries. - Fixed a bug in the timezone handling on systems with tm_gmtoff. ------------------------------------------------------------------------------- Changes in version 0.40 - Fixed some compile problems to allow nullmailer to compile on FreeBSD. - Fixed a bug in the sendmail emulator to allow it to set the sender name and address from the command line properly. - Modified the CLI library to behave more like the standard getopt library. - Made a change to protocol between nullmailer-send and protocol modules. nullmailer-send now opens up the message files and passes them to the protocol module as FD 0 instead of passing a filename. - Added some notes to the nullmailer-send manual page explaining how messages are delivered. ------------------------------------------------------------------------------- Changes in version 0.39 - Fixed problems in nullmailer-send in parsing the "remotes" file. It previously did not handle comment lines or tabs or multiple white space. - Made nullmailer-inject stricter about header lines to ensure that they comply with RFC822. - Several minor updates to the libraries to bring them up to date. ------------------------------------------------------------------------------- Changes in version 0.38 - Fixed bug in nullmailer-send that caused it to refuse to send mail when the optional "pausetime" configuration file did not exist. ------------------------------------------------------------------------------- Changes in version 0.37 - Fixed bug in address parser that caused strings like "" (without a leading comment) to fail. - Make nullmailer-send rescan the mail queue each time it wakes up, rather than only if the timestamp changes to avoids race conditions. - Make nullmailer-send reload its config files ("remotes" and "pausetime" each time it scans the queue). - Fixed top-level install-root target to run chmod/chown on the right path to nullmailer-queue. - Added a configure test for libinet, libsocket, and libxnet libraries for systems that have their networking code seperate from the main C library (such as Solaris). ------------------------------------------------------------------------------- Changes in version 0.36 - Imported generic CLI library, to avoid the use of getopt on systems that don't have one. ------------------------------------------------------------------------------- Changes in version 0.35 - Protocols now take a "-p #" to specify the port number to connect to. - This option can be specified in the "remotes" file immediately after the protocol name. - nullmailer-send will now only rescan the mail queue if its timestamp has changed since the last scan. - Fixed an observed problem with empty domain names by using uname(2) instead of domainname and hostname. - The header address parsing code is rewritten to do a lexical tokenization before parsing. - Imported new fdbuf and mystring libraries - Updated init scripts and RPM spec to work with new daemontools 0.61 and supervise-scripts packages. ------------------------------------------------------------------------------- Changes in version 0.33 - fixed a bug in the "list" template class that caused nullmailer-send to only send out one message before sleeping - added a trivial address remapping facility to nullmailer-queue to allow local addresses to be redirected to a remote administrator address. ------------------------------------------------------------------------------- Changes in version 0.32 - the address parser now deals properly with quoted addresses ------------------------------------------------------------------------------- Changes in version 0.31 - added a HOWTO document - "make install-root" will now properly make nullmailer-queue setuid nullmail ------------------------------------------------------------------------------- Changes in version 0.30 - fixed bug in the I/O library that caused nullmailer-inject to return an error on messages with a single blank line following the header, even though the message was successfully sent to nullmailer-queue - in nullmailer-inject, the hostname of the sender is set from the defaulthost config file instead of hostname() (note that default is set from hostname() if the file does not exist) - fixed a bug in nullmailer-inject that would cause it to incorrectly clear its recipient list when using command-line recipients with a "resent" message ------------------------------------------------------------------------------- Changes in version 0.29 - included the testing framework (mostly empty) into the package - fixed some bugs in nullmailer-inject caused by incorrect offsets into the array of header fields - many bug fixes to the address parsing framework - nullmailer-inject now has an option to only print out the message instead of passing it on to nullmailer-queue - many sendmail flags are now ignored instead of causing errors in the sendmail front end to nullmailer-inject ------------------------------------------------------------------------------- Changes in version 0.28 - fixed the bugs in the spec and init script - nullmailer-inject now handles the "c" flag like qmail-inject - changed some error messages - the sendmail front end should have its header vs command-line recipients logic fixed now ------------------------------------------------------------------------------- Changes in version 0.27 - added a QMQP protocol module - fixed a missing NUL-termination when creating the Date header line - nullmailer-inject now parses the NULLMAILER_FLAGS -- see the man page ------------------------------------------------------------------------------- Changes in version 0.26 - nullmailer-queue and nullmailer-send now go into sbin instead of bin - bugfixes to the unique number generation routines - moved some files around internally ------------------------------------------------------------------------------- Changes in version 0.25 - nullmailer-send now reads a protocol name along with the remote host - nullmailer-inject now handles its command-line options properly, as well as reading and using defaulthost, defaultdomain, and idhost - fixed several bugs in the address parsing and date-generation code - revised the interface between nullmailer-send and the protocol modules to simplify the interface and nullmailer-send ------------------------------------------------------------------------------- Changes in version 0.22 - added simple sendmail front end ------------------------------------------------------------------------------- nullmailer-1.13/scripts/0000775000076400007640000000000012133011624012275 500000000000000nullmailer-1.13/scripts/nullmailer-log.run0000664000076400007640000000010210702261073015664 00000000000000#! /bin/sh exec setuidgid nullmail multilog t /var/log/nullmailer nullmailer-1.13/scripts/nullmailer.run0000664000076400007640000000010710702261073015112 00000000000000#! /bin/sh exec 2>&1 exec setuidgid nullmail /usr/sbin/nullmailer-send nullmailer-1.13/INSTALL0000664000076400007640000000100511743377277011604 00000000000000To build and install nullmailer, run: ./configure make sudo make install install-root To enable SSL/TLS support, add "--enable-tls" to the configure command line above. The default installation expects that a user and group "nullmail" have already been set up. The install steps will create all appropriate configuration and queue directories, and change their ownership as needed. You may set the installation directory and other parameters by options to ./configure. To see them, run: ./configure --help nullmailer-1.13/protocols/0000775000076400007640000000000012133011625012633 500000000000000nullmailer-1.13/protocols/Makefile.am0000664000076400007640000000073611743377307014637 00000000000000libexecdir = @libexecdir@/nullmailer libexec_PROGRAMS = smtp qmqp INCLUDES = -I../lib -I../lib/cli++ if TLS TLS_SOURCES = tls_gnutls.cc TLS_LDADD = -lgnutls else TLS_SOURCES = tls_none.cc TLS_LDADD = endif smtp_SOURCES = smtp.cc protocol.cc $(TLS_SOURCES) protocol.h smtp_LDADD = ../lib/cli++/libcli++.a ../lib/libnullmailer.a $(TLS_LDADD) qmqp_SOURCES = qmqp.cc protocol.cc $(TLS_SOURCES) protocol.h qmqp_LDADD = ../lib/cli++/libcli++.a ../lib/libnullmailer.a $(TLS_LDADD) nullmailer-1.13/protocols/Makefile.in0000664000076400007640000003454612133011471014633 00000000000000# Makefile.in generated by automake 1.10.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@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 = : libexec_PROGRAMS = smtp$(EXEEXT) qmqp$(EXEEXT) subdir = protocols DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(libexecdir)" libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(libexec_PROGRAMS) am__qmqp_SOURCES_DIST = qmqp.cc protocol.cc tls_none.cc tls_gnutls.cc \ protocol.h @TLS_FALSE@am__objects_1 = tls_none.$(OBJEXT) @TLS_TRUE@am__objects_1 = tls_gnutls.$(OBJEXT) am_qmqp_OBJECTS = qmqp.$(OBJEXT) protocol.$(OBJEXT) $(am__objects_1) qmqp_OBJECTS = $(am_qmqp_OBJECTS) am__DEPENDENCIES_1 = qmqp_DEPENDENCIES = ../lib/cli++/libcli++.a ../lib/libnullmailer.a \ $(am__DEPENDENCIES_1) am__smtp_SOURCES_DIST = smtp.cc protocol.cc tls_none.cc tls_gnutls.cc \ protocol.h am_smtp_OBJECTS = smtp.$(OBJEXT) protocol.$(OBJEXT) $(am__objects_1) smtp_OBJECTS = $(am_smtp_OBJECTS) smtp_DEPENDENCIES = ../lib/cli++/libcli++.a ../lib/libnullmailer.a \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(qmqp_SOURCES) $(smtp_SOURCES) DIST_SOURCES = $(am__qmqp_SOURCES_DIST) $(am__smtp_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ 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 = @MKDIR@ 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@ RANLIB = @RANLIB@ RM = @RM@ 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@ ac_ct_CXX = @ac_ct_CXX@ 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@/nullmailer 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@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = -I../lib -I../lib/cli++ @TLS_FALSE@TLS_SOURCES = tls_none.cc @TLS_TRUE@TLS_SOURCES = tls_gnutls.cc @TLS_FALSE@TLS_LDADD = @TLS_TRUE@TLS_LDADD = -lgnutls smtp_SOURCES = smtp.cc protocol.cc $(TLS_SOURCES) protocol.h smtp_LDADD = ../lib/cli++/libcli++.a ../lib/libnullmailer.a $(TLS_LDADD) qmqp_SOURCES = qmqp.cc protocol.cc $(TLS_SOURCES) protocol.h qmqp_LDADD = ../lib/cli++/libcli++.a ../lib/libnullmailer.a $(TLS_LDADD) all: all-am .SUFFIXES: .SUFFIXES: .cc .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) --gnu protocols/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu protocols/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libexecPROGRAMS: $(libexec_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" @list='$(libexec_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \ else :; fi; \ done uninstall-libexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(libexec_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(libexecdir)/$$f"; \ done clean-libexecPROGRAMS: -test -z "$(libexec_PROGRAMS)" || rm -f $(libexec_PROGRAMS) qmqp$(EXEEXT): $(qmqp_OBJECTS) $(qmqp_DEPENDENCIES) @rm -f qmqp$(EXEEXT) $(CXXLINK) $(qmqp_OBJECTS) $(qmqp_LDADD) $(LIBS) smtp$(EXEEXT): $(smtp_OBJECTS) $(smtp_DEPENDENCIES) @rm -f smtp$(EXEEXT) $(CXXLINK) $(smtp_OBJECTS) $(smtp_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qmqp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tls_gnutls.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tls_none.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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)$(libexecdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libexecPROGRAMS 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-libexecPROGRAMS 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-libexecPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libexecPROGRAMS ctags distclean distclean-compile \ 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-libexecPROGRAMS install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libexecPROGRAMS # 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: nullmailer-1.13/protocols/tls_gnutls.cc0000664000076400007640000001147311765725541015311 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include #include #include "errcodes.h" #include "mystring/mystring.h" #include "protocol.h" #include #include #include "fdbuf/tlsibuf.h" #include "fdbuf/tlsobuf.h" int tls_insecure = false; const char* tls_x509certfile = NULL; const char* tls_x509cafile = NULL; const char* tls_x509crlfile = NULL; int tls_x509derfmt = false; static int gnutls_wrap(int ret, const char* msg) { if (ret < 0) { mystring m = msg; m += ": "; m += gnutls_strerror(ret); protocol_fail(ERR_MSG_TEMPFAIL, m.c_str()); } return ret; } static int cert_verify(gnutls_session_t session) { if (tls_x509cafile != NULL && !tls_insecure) { // Verify the certificate unsigned int status = 0; gnutls_wrap(gnutls_certificate_verify_peers2(session, &status), "Could not verify SSL/TLS certificate"); if (status != 0) protocol_fail(ERR_MSG_TEMPFAIL, "Server SSL/TLS certificate is untrusted"); // Verify the hostname unsigned int cert_list_size = 0; const gnutls_datum_t* cert_list = gnutls_certificate_get_peers(session, &cert_list_size); const char* hostname = (const char*)gnutls_session_get_ptr(session); gnutls_x509_crt_t crt; gnutls_wrap(gnutls_x509_crt_init(&crt), "Error allocating memory"); gnutls_wrap(gnutls_x509_crt_import(crt, &cert_list[0], GNUTLS_X509_FMT_DER), "Error decoding SSL/TLS certificate"); if (gnutls_x509_crt_check_hostname(crt, hostname) == 0) protocol_fail(ERR_MSG_TEMPFAIL, "Server SSL/TLS certificate does not match hostname"); gnutls_x509_crt_deinit(crt); } // All verification errors cause protocol to exit return 0; } static gnutls_session_t tls_session; void tls_init(const char* remote) { gnutls_certificate_credentials_t creds; gnutls_wrap(gnutls_global_init(), "Error initializing TLS library"); gnutls_wrap(gnutls_certificate_allocate_credentials(&creds), "Error allocating TLS certificate"); gnutls_wrap(gnutls_init(&tls_session, GNUTLS_CLIENT), "Error creating TLS session"); gnutls_wrap(gnutls_priority_set_direct(tls_session, "NORMAL", NULL), "Error setting TLS options"); gnutls_wrap(gnutls_credentials_set(tls_session, GNUTLS_CRD_CERTIFICATE, creds), "Error setting TLS credentials"); gnutls_wrap(gnutls_server_name_set(tls_session, GNUTLS_NAME_DNS, remote, strlen(remote)), "Error setting TLS server name"); gnutls_session_set_ptr(tls_session, (void*)remote); #ifdef HAVE_GNUTLS_SET_VERIFY_FUNCTION gnutls_certificate_set_verify_function(creds, cert_verify); #endif gnutls_certificate_set_verify_flags(creds, 0); gnutls_x509_crt_fmt_t x509fmt = tls_x509derfmt ? GNUTLS_X509_FMT_DER : GNUTLS_X509_FMT_PEM; if (tls_x509certfile != NULL) gnutls_wrap(gnutls_certificate_set_x509_key_file(creds, tls_x509certfile, tls_x509certfile, x509fmt), "Error setting SSL/TLS X.509 client certificate"); if (tls_x509cafile == NULL && access(DEFAULT_CA_FILE, R_OK) == 0) tls_x509cafile = DEFAULT_CA_FILE; if (tls_x509cafile != NULL) gnutls_wrap(gnutls_certificate_set_x509_trust_file(creds, tls_x509cafile, x509fmt), "Error loading SSL/TLS X.509 trust file"); if (tls_x509crlfile != NULL) gnutls_wrap(gnutls_certificate_set_x509_crl_file(creds, tls_x509crlfile, x509fmt), "Error loading SSL/TLS X.509 CRL file"); } void tls_send(fdibuf& in, int fd) { int r; gnutls_transport_set_ptr(tls_session, (gnutls_transport_ptr_t)fd); do { r = gnutls_handshake(tls_session); if (gnutls_error_is_fatal(r)) gnutls_wrap(r, "Error completing TLS handshake"); } while (r < 0); #ifndef HAVE_GNUTLS_SET_VERIFY_FUNCTION cert_verify(tls_session); #endif tlsibuf tlsin(tls_session); tlsobuf tlsout(tls_session); if (!tlsin || !tlsout) protocol_fail(ERR_MSG_TEMPFAIL, "Error allocating I/O buffers"); protocol_send(in, tlsin, tlsout); } nullmailer-1.13/protocols/protocol.cc0000664000076400007640000000723411765725541014754 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include #include #include #include "connect.h" #include "errcodes.h" #include "protocol.h" #include "cli++.h" const char* user = 0; const char* pass = 0; int port = 0; int auth_method = AUTH_DETECT; int use_ssl = 0; int use_starttls = 0; const char* cli_help_suffix = ""; const char* cli_args_usage = "remote-address < mail-file"; const int cli_args_min = 1; const int cli_args_max = 1; cli_option cli_options[] = { { 'p', "port", cli_option::integer, 0, &port, "Set the port number on the remote host to connect to", 0 }, { 0, "user", cli_option::string, 0, &user, "Set the user name for authentication", 0 }, { 0, "pass", cli_option::string, 0, &pass, "Set the password for authentication", 0 }, { 0, "auth-login", cli_option::flag, AUTH_LOGIN, &auth_method, "Use AUTH LOGIN instead of auto-detecting in SMTP", 0 }, #ifdef HAVE_TLS { 0, "ssl", cli_option::flag, 1, &use_ssl, "Connect using SSL (on an alternate port by default)", 0 }, { 0, "starttls", cli_option::flag, 1, &use_starttls, "Use STARTTLS command", 0 }, { 0, "x509certfile", cli_option::string, 0, &tls_x509certfile, "Client certificate file", 0 }, { 0, "x509cafile", cli_option::string, 0, &tls_x509cafile, "Certificate authority trust file", DEFAULT_CA_FILE }, { 0, "x509crlfile", cli_option::string, 0, &tls_x509crlfile, "Certificate revocation list file", 0 }, { 0, "x509fmtder", cli_option::flag, true, &tls_x509derfmt, "X.509 files are in DER format", "PEM format" }, { 0, "insecure", cli_option::flag, true, &tls_insecure, "Don't abort if server certificate fails validation", 0 }, #endif {0, 0, cli_option::flag, 0, 0, 0, 0} }; void protocol_fail(int e, const char* msg) { ferr << cli_program << ": Failed: " << msg << endl; exit(e); } void protocol_succ(const char* msg) { ferr << cli_program << ": Succeeded: " << msg << endl; exit(0); } static void plain_send(fdibuf& in, int fd) { fdibuf netin(fd); fdobuf netout(fd); if (!netin || !netout) protocol_fail(ERR_MSG_TEMPFAIL, "Error allocating I/O buffers"); if (use_starttls) { protocol_starttls(netin, netout); tls_send(in, fd); } else protocol_send(in, netin, netout); } int cli_main(int, char* argv[]) { const char* remote = argv[0]; if (port == 0) port = use_ssl ? default_ssl_port : default_port; if (port < 0) protocol_fail(ERR_USAGE, "Invalid value for --port"); if (use_ssl || use_starttls) tls_init(remote); fdibuf in(0, true); protocol_prep(in); int fd = tcpconnect(remote, port); if(fd < 0) protocol_fail(-fd, "Connect failed"); if (use_ssl) tls_send(in, fd); else plain_send(in, fd); return 0; } nullmailer-1.13/protocols/protocol.h0000664000076400007640000000171111765725541014610 00000000000000#ifndef NULLMAILER__PROTOCOL__H__ #define NULLMAILER__PROTOCOL__H__ #include "fdbuf/fdbuf.h" #define DEFAULT_CA_FILE "/etc/ssl/certs/ca-certificates.crt" extern const int default_port; extern const int default_ssl_port; extern void protocol_fail(int e, const char* msg); extern void protocol_succ(const char* msg); #define AUTH_DETECT 0 #define AUTH_LOGIN 1 #define AUTH_PLAIN 2 extern const char* user; extern const char* pass; extern int auth_method; extern int port; extern int use_ssl; extern int use_starttls; extern int tls_insecure; extern void protocol_prep(fdibuf& in); extern void protocol_send(fdibuf& in, fdibuf& netin, fdobuf& netout); extern void protocol_starttls(fdibuf& netin, fdobuf& netout); extern int tls_insecure; extern const char* tls_x509certfile; extern const char* tls_x509cafile; extern const char* tls_x509crlfile; extern int tls_x509derfmt; extern void tls_init(const char* remote); extern void tls_send(fdibuf& in, int fd); #endif nullmailer-1.13/protocols/smtp.cc0000664000076400007640000001320512064500521014047 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include #include #include "base64.h" #include "connect.h" #include "errcodes.h" #include "fdbuf/fdbuf.h" #include "itoa.h" #include "mystring/mystring.h" #include "protocol.h" const int default_port = 25; const int default_ssl_port = 465; const char* cli_program = "smtp"; const char* cli_help_prefix = "Send an email message via SMTP\n"; class smtp { fdibuf& in; fdobuf& out; mystring caps; public: smtp(fdibuf& netin, fdobuf& netout); ~smtp(); int get(mystring& str); int put(mystring cmd, mystring& result); void docmd(mystring cmd, int range, mystring& result); void docmd(mystring cmd, int range); void dohelo(bool ehlo); bool hascap(const char* name, const char* word = NULL); void auth_login(void); void auth_plain(void); void send_data(fdibuf& msg); void send_envelope(fdibuf& msg); void send(fdibuf& msg); }; smtp::smtp(fdibuf& netin, fdobuf& netout) : in(netin), out(netout) { } smtp::~smtp() { } int smtp::get(mystring& str) { mystring tmp; str = ""; int code = -1; while(in.getline(tmp)) { if(tmp[tmp.length()-1] == '\r') tmp = tmp.left(tmp.length()-1); code = atoi(tmp.c_str()); if(!!str) str += "\n"; str += tmp; if(tmp[3] != '-') break; } return code; } int smtp::put(mystring cmd, mystring& result) { out << cmd << "\r\n"; if(!out.flush()) return -1; return get(result); } void smtp::docmd(mystring cmd, int range, mystring& result) { int code; if(!cmd) code = get(result); else code = put(cmd, result); if(code < range || code >= (range+100)) { int e; if(code >= 500) e = ERR_MSG_PERMFAIL; else if(code >= 400) e = ERR_MSG_TEMPFAIL; else e = ERR_PROTO; out << "QUIT\r\n"; out.flush(); protocol_fail(e, result.c_str()); } } void smtp::docmd(mystring cmd, int range) { mystring msg; docmd(cmd, range, msg); } void smtp::dohelo(bool ehlo) { mystring hh = getenv("HELOHOST"); if (!hh) protocol_fail(1, "$HELOHOST is not set"); docmd((ehlo ? "EHLO " : "HELO ") + hh, 200, caps); } static int issep(char ch) { return ch == ' ' || ch == '\n' || ch == '\0'; } bool smtp::hascap(const char* name, const char* word) { const size_t namelen = strlen(name); int i = -1; do { const char* s = caps.c_str() + i + 5; if (strncasecmp(s, name, namelen) == 0) { if (s[namelen] == '\n') return word == NULL; else if (s[namelen] == ' ') { if (word == NULL) return true; s += namelen + 1; const size_t wordlen = strlen(word); do { if (strncasecmp(s, word, wordlen) == 0 && issep(s[wordlen])) return true; while (!issep(*s)) ++s; } while (*s++ == ' '); return false; } } i = caps.find_first('\n', i+1); } while (i > 0); return false; } void smtp::auth_login(void) { mystring encoded; base64_encode(user, encoded); docmd("AUTH LOGIN " + encoded, 300); encoded = ""; base64_encode(pass, encoded); docmd(encoded, 200); } void smtp::auth_plain(void) { mystring plain(user); plain += '\0'; plain += user; plain += '\0'; plain += pass; mystring encoded = "AUTH PLAIN "; base64_encode(plain, encoded); docmd(encoded, 200); } void smtp::send_envelope(fdibuf& msg) { mystring tmp; msg.getline(tmp); docmd("MAIL FROM:<" + tmp + ">", 200); while(msg.getline(tmp) && !!tmp) docmd("RCPT TO:<" + tmp + ">", 200); } void smtp::send_data(fdibuf& msg) { docmd("DATA", 300); mystring tmp; while(msg.getline(tmp)) { if((tmp[0] == '.' && !(out << ".")) || !(out << tmp << "\r\n")) protocol_fail(ERR_MSG_WRITE, "Error sending message to remote"); } docmd(".", 200, tmp); out << "QUIT\r\n"; out.flush(); protocol_succ(tmp.c_str()); } void smtp::send(fdibuf& msg) { send_envelope(msg); send_data(msg); } void protocol_prep(fdibuf&) { } static int did_starttls = 0; void protocol_starttls(fdibuf& netin, fdobuf& netout) { smtp conn(netin, netout); conn.docmd("", 200); conn.dohelo(true); conn.docmd("STARTTLS", 200); did_starttls = 1; } void protocol_send(fdibuf& in, fdibuf& netin, fdobuf& netout) { smtp conn(netin, netout); if (!did_starttls) conn.docmd("", 200); if (user != 0 && pass != 0) { conn.dohelo(true); if (auth_method == AUTH_LOGIN) conn.auth_login(); else if (auth_method == AUTH_PLAIN) conn.auth_plain(); else { // Detect method if (conn.hascap("AUTH", "PLAIN")) conn.auth_plain(); else if (conn.hascap("AUTH", "LOGIN")) conn.auth_login(); else protocol_fail(ERR_MSG_TEMPFAIL, "Server does not advertise any supported authentication methods"); } } else conn.dohelo(false); conn.send(in); } nullmailer-1.13/protocols/qmqp.cc0000664000076400007640000000765211744115530014061 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "config.h" #include #include #include "errcodes.h" #include "fdbuf/fdbuf.h" #include "hostname.h" #include "itoa.h" #include "mystring/mystring.h" #include "netstring.h" #include "protocol.h" const int default_port = 628; const int default_ssl_port = -1; // No standard for QMQP over SSL exists const char* cli_program = "qmqp"; const char* cli_help_prefix = "Send an emal message via QMQP\n"; class qmqp { fdibuf& in; fdobuf& out; public: qmqp(fdibuf& netin, fdobuf& netout); ~qmqp(); void send(fdibuf& msg, unsigned long size, const mystring& env); }; qmqp::qmqp(fdibuf& netin, fdobuf& netout) : in(netin), out(netout) { } qmqp::~qmqp() { } bool skip_envelope(fdibuf& msg) { if(!msg.rewind()) return false; mystring tmp; while(msg.getline(tmp)) if(!tmp) break; return msg; } void qmqp::send(fdibuf& msg, unsigned long size, const mystring& env) { if(!skip_envelope(msg)) protocol_fail(ERR_MSG_READ, "Error re-reading message"); unsigned long fullsize = strlen(itoa(size)) + 1 + size + 1 + env.length(); out << itoa(fullsize) << ":"; // Start the "outer" netstring out << itoa(size) << ":"; // Start the message netstring fdbuf_copy(msg, out, true); // Send out the message out << "," // End the message netstring << env // The envelope is already encoded << ","; // End the "outer" netstring if(!out.flush()) protocol_fail(ERR_MSG_WRITE, "Error sending message to remote"); mystring response; if(!in.getnetstring(response)) protocol_fail(ERR_PROTO, "Response from remote was not a netstring"); switch(response[0]) { case 'K': protocol_succ(response.c_str()+1); break; case 'Z': protocol_fail(ERR_MSG_TEMPFAIL, response.c_str()+1); break; case 'D': protocol_fail(ERR_MSG_PERMFAIL, response.c_str()+1); break; default: protocol_fail(ERR_PROTO, "Invalid status byte in response"); } } bool compute_size(fdibuf& msg, unsigned long& size) { char buf[4096]; size = 0; while(msg.read(buf, 4096)) size += msg.last_count(); if(msg.eof()) size += msg.last_count(); return size > 0; } bool make_envelope(fdibuf& msg, mystring& env) { mystring tmp; while(msg.getline(tmp)) { if(!tmp) return true; env += str2net(tmp); } return false; } bool preload_data(fdibuf& msg, unsigned long& size, mystring& env) { return make_envelope(msg, env) && compute_size(msg, size); } static unsigned long msg_size; static mystring msg_envelope; void protocol_prep(fdibuf& in) { if(!preload_data(in, msg_size, msg_envelope)) protocol_fail(ERR_MSG_READ, "Error reading message"); } void protocol_starttls(fdibuf& netin, fdobuf& netout) { protocol_fail(ERR_USAGE, "QMQP does not support STARTTLS"); (void)netin; (void)netout; } void protocol_send(fdibuf& in, fdibuf& netin, fdobuf& netout) { alarm(60*60); // Connection must close after an hour qmqp conn(netin, netout); conn.send(in, msg_size, msg_envelope); } nullmailer-1.13/protocols/tls_none.cc0000664000076400007640000000244211743377314014725 00000000000000// nullmailer -- a simple relay-only MTA // Copyright (C) 2012 Bruce Guenter // // 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 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, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // You can contact me at . There is also a mailing list // available to discuss this package. To subscribe, send an email to // . #include "errcodes.h" #include "protocol.h" void tls_init(const char* remote) { protocol_fail(ERR_USAGE, "SSL/TLS not supported in this build"); (void)remote; } void tls_send(fdibuf& in, int fd) { protocol_fail(ERR_USAGE, "SSL/TLS not supported in this build"); (void)in; (void)fd; } nullmailer-1.13/configure.in0000664000076400007640000000332612133007476013055 00000000000000AC_INIT AC_LANG([C++]) AC_CONFIG_SRCDIR([lib/defines.h]) AM_INIT_AUTOMAKE(nullmailer, 1.13) AM_CONFIG_HEADER(config.h) AC_PROG_MAKE_SET dnl Checks for programs. AC_PROG_CC AC_PROG_CXX CXX_NO_RTTI CXX_NO_EXCEPTIONS CFLAGS="$CFLAGS -W -Wall" CXXFLAGS="$CXXFLAGS -W -Wall" AC_PROG_INSTALL AC_PROG_RANLIB AC_PATH_PROG(STRIP, strip) AC_PATH_PROG(RM, rm) AC_PATH_PROG(MKDIR, mkdir) dnl Checks for libraries. AC_CHECK_LIB(xnet, socket) AC_CHECK_LIB(inet, socket) AC_CHECK_LIB(socket, socket) dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME dnl AC_CHECK_HEADERS(fcntl.h shadow.h crypt.h) AC_CHECK_HEADERS(sys/time.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. dnl AC_TYPE_UID_T dnl AC_TYPE_SIGNAL dnl AC_C_INLINE dnl AC_TYPE_PID_T AC_TYPE_SIZE_T TEST_STRUCT_TM TEST_STRUCT_UTSNAME CHECK_NAMED_PIPE_BUG dnl Checks for library functions. dnl AC_CHECK_FUNCS(gettimeofday mkdir putenv rmdir socket) AC_CHECK_FUNCS(setenv srandom) AC_DEFINE(BUFSIZE, 4096, [Generic buffer size]) AM_CONDITIONAL(FDBUF_NO_MYSTRING, false) AC_ARG_ENABLE(tls, [ --enable-tls Enable SSL/TLS support], [case "${enableval}" in yes) tls=true; AC_DEFINE(HAVE_TLS, 1, [Build in support for TLS]) ;; no) tls=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-tls) ;; esac],[tls=false]) AM_CONDITIONAL(TLS, $tls) if $tls; then AC_CHECK_LIB(gnutls, gnutls_certificate_set_verify_function, [AC_DEFINE(HAVE_GNUTLS_SET_VERIFY_FUNCTION, 1, [libgnutls has gnutls_certificate_set_verify_function])]) fi AC_CONFIG_FILES([Makefile doc/Makefile lib/Makefile lib/cli++/Makefile lib/fdbuf/Makefile lib/mystring/Makefile protocols/Makefile src/Makefile test/Makefile]) AC_OUTPUT nullmailer-1.13/aclocal.m40000664000076400007640000010210712133011467012374 00000000000000# generated automatically by aclocal 1.10.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 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.10' 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.10.3], [], [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.10.3])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, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$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 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, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. 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 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$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, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # 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, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # 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 done .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 # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi 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, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi 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)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # 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 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]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # 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. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acinclude.m4]) nullmailer-1.13/README0000664000076400007640000000155212133007544011417 00000000000000nullmailer Simple relay-only mail transport agent Bruce Guenter Version 1.13 2013-04-15 This is nullmailer, a sendmail/qmail/etc replacement MTA for hosts which relay to a fixed set of smart relays. It is designed to be simple to configure, secure, and easily extendable. A mailing list has been set up to discuss this package. To subscribe, send an email to: nullmailer-subscribe@lists.untroubled.org A mailing list archive is available at: http://lists.untroubled.org/?list=nullmailer Development versions of @PACKAGE@ are available at GitHub: https://github.com/bruceg/nullmailer This package is Copyright(C) 2013 Bruce Guenter, and may be copied according to the GNU GENERAL PUBLIC LICENSE (GPL) Version 2 or a later version. A copy of this license is included with this package. This package comes with no warranty of any kind. nullmailer-1.13/config.h.in0000664000076400007640000000575212133011600012554 00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* Generic buffer size */ #undef BUFSIZE /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* libgnutls has gnutls_certificate_set_verify_function */ #undef HAVE_GNUTLS_SET_VERIFY_FUNCTION /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `inet' library (-linet). */ #undef HAVE_LIBINET /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the `xnet' library (-lxnet). */ #undef HAVE_LIBXNET /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `srandom' function. */ #undef HAVE_SRANDOM /* 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 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 header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Build in support for TLS */ #undef HAVE_TLS /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Named pipes have read/write bug */ #undef NAMEDPIPEBUG /* 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 /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* struct tm has tm_gmtoff member */ #undef TM_HAS_GMTOFF /* struct tm has tm_isdst member */ #undef TM_HAS_ISDST /* struct utsname has domainname member */ #undef UTSNAME_HAS_DOMAINNAME /* Version number of package */ #undef VERSION /* Define to `unsigned int' if does not define. */ #undef size_t