Skip to content
Permalink
Browse files

Moved couriergrey from internal repository to public one.

  • Loading branch information...
mawis committed Oct 27, 2011
0 parents commit c8509c33ad8693a5c1c687d50a970171c342eac2
Showing with 1,348 additions and 0 deletions.
  1. +1 −0 AUTHORS
  2. +18 −0 ChangeLog
  3. +28 −0 Makefile.am
  4. +19 −0 NEWS
  5. 0 README
  6. +11 −0 TODO
  7. +14 −0 ac-helpers/ac_define_dir.m4
  8. +8 −0 bootstrap
  9. +106 −0 configure.ac
  10. +669 −0 couriergrey.cc
  11. +178 −0 couriergrey.h
  12. +69 −0 gettext.h
  13. +19 −0 license-header.txt
  14. +1 −0 m4/Makefile.am
  15. +41 −0 po/Makevars
  16. +1 −0 po/POTFILES.in
  17. +165 −0 whitelist_ip.dist
@@ -0,0 +1 @@
Matthias Wimmer <m@tthias.eu>
@@ -0,0 +1,18 @@
2011-10-20 Matthias Wimmer <m@tthias.eu>

* configure.ac: minor updates in the build environment

2007-09-30 Matthias Wimmer <m@tthias.eu>

* couriergrey.cc: whitelisting support
* couriergrey.h: same

2007-09-26 Matthias Wimmer <m@tthias.eu>

* couriergrey.cc: use SMTP code 451 instead of 450, it is said some
servers will handle that better

2007-09-21 Matthias Wimmer <m@tthias.eu>

* couriergrey.h: detect mail that has been received by authenticated SMTP
* couriergrey.cc: same
@@ -0,0 +1,28 @@
SUBDIRS = intl m4 po

bin_PROGRAMS = couriergrey

noinst_HEADERS = couriergrey.h

sysconf_DATA = whitelist_ip.dist

couriergrey_SOURCES = couriergrey.cc

couriergrey_LDFLAGS = @LDFLAGS@

ACLOCAL_AMFLAGS = -I m4

EXTRA_DIST = config.rpath whitelist_ip.dist

DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@

install-data-hook:
@list='$(sysconf_DATA)'; for p in $$list; do \
dest=`echo $$p | sed -e s/.dist//`; \
if test -f $(DESTDIR)$(sysconfdir)/$$dest; then \
echo "$@ will not overwrite existing $(DESTDIR)$(sysconfdir)/$$dest"; \
else \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$dest"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$dest; \
fi; \
done
19 NEWS
@@ -0,0 +1,19 @@
Version 0.2.0

- Support for whitelists.

Version 0.1.2

- Use SMTP code 451 instead of 450 if mail is rejected for greylisting.
It is said, that some mail server have problems handling SMTP response
code 450 as they consider it to be a locking problem and will do
very fast retries.

Version 0.1.1

- Detection of mails that have been received authenticated. Such mails
will not get greylisted.

Version 0.1.0

- Initial version.
0 README
No changes.
11 TODO
@@ -0,0 +1,11 @@
What is left to do
==================

- Detect mail that has been received with authentication
(AUTH in the first Received header from the right IP
address.)
- Whitelisting by IP and/or destination
- Configuration file for locations and greylisting time
- Cleanup of aged entries in the database
- Think about reducing the blocksize of the database
- Autowhitelisting for senders that have received mails
@@ -0,0 +1,14 @@
dnl Available from the GNU Autoconf Macro Archive at:
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_define_dir.html
dnl
AC_DEFUN([AC_DEFINE_DIR], [
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo [$]$2`
ac_define_dir=`eval echo [$]ac_define_dir`
$1="$ac_define_dir"
AC_SUBST($1)
ifelse($3, ,
AC_DEFINE_UNQUOTED($1, "$ac_define_dir"),
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
])
@@ -0,0 +1,8 @@
#!/bin/sh

if test ! -d intl; then
autopoint
fi

# Fire up autotools
libtoolize --force && aclocal $ACLOCAL_FLAGS && autoheader && automake --include-deps --add-missing && autoconf
@@ -0,0 +1,106 @@
AC_PREREQ(2.61)

AC_INIT(couriergrey.h)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE(couriergrey,0.2.2)
AM_CONFIG_HEADER(config.h)
AC_LANG(C++)
AC_GNU_SOURCE

sinclude(ac-helpers/ac_define_dir.m4)

dnl Check for programs
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AM_ICONV

AM_GNU_GETTEXT
AM_GNU_GETTEXT_VERSION(0.16.1)
ALL_LINGUAS=""

AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)

AC_SUBST([localedir], ['${datadir}/locale'])

dnl headers we need
AC_HEADER_STDC

dnl static builds
AC_MSG_CHECKING(if static builds enabled)
AC_ARG_ENABLE(all-static, AC_HELP_STRING([--enable-all-static], [Build static binaries]), all_static=yes, all_static=no)
if test "x-$all_static" = "x-yes" ; then
LDFLAGS="$LDFLAGS -Wl,-static -static"
fi
AC_MSG_RESULT($all_static)

AC_MSG_CHECKING(if partial static builds enabled)
AC_ARG_ENABLE(partial-static, AC_HELP_STRING([--enable-partial-static], [Build partially static binaries]), partial_static=yes, partial_static=no)
if test "x-$partial_static" = "x-yes" ; then
LDFLAGS="$LDFLAGS -Wl,-lc,-static -static"
fi
AC_MSG_RESULT($partial_static)

AC_DEFINE_DIR(LOCALSTATEDIR, localstatedir, [base where spool can be found])

dnl check for libpopt
AC_ARG_WITH(libpopt, AC_HELP_STRING([--with-libpopt=DIR],
[Where to find libpopt (required)]),
libpopt=$withval, libpopt=yes)
if test "$libpopt" != "no"; then
if test "$libpopt" != "yes"; then
LDFLAGS="${LDFLAGS} -L$libpopt/lib -R$libpopt/lib"
CPPFLAGS="${CPPFLAGS} -I$libpopt/include"
fi
AC_CHECK_HEADER(popt.h,
AC_CHECK_LIB(popt, poptStrerror,
[libpopt=yes LIBS="${LIBS} -lpopt"], libpopt=no),
libpopt=no)
fi
if test "$libpopt" != "yes"; then
AC_MSG_ERROR([Couldn't find required libpopt installation])
fi

dnl check for glibmm-2.4
PKG_CHECK_MODULES(GLIBMM, glibmm-2.4 >= 2.12.0, hasglibmm=yes, hasglibmm=no)
if test $hasglibmm = "no" ; then
AC_MSG_ERROR($GLIBMM_PKG_ERRORS)
fi
CPPFLAGS="$CPPFLAGS $GLIBMM_CFLAGS"
LIBS="$LIBS $GLIBMM_LIBS"

dnl check for gthread
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.0.0, hasgthread=yes, hasgthread=no)
if test $hasgthread = "no" ; then
AC_MSG_ERROR($GTHREAD_PKG_ERRORS)
fi
CPPFLAGS="$CPPFLAGS $GTHREAD_CFLAGS"
LIBS="$LIBS $GTHREAD_LIBS"

dnl check for libgdbm
AC_ARG_WITH(libgdbm, AC_HELP_STRING([--with-libgdbm=DIR],
[Where to find libgdbm (required)]),
libgdbm=$withval, libgdbm=yes)
if test "$libgdbm" != "no"; then
if test "$libgdbm" != "yes"; then
LDFLAGS="${LDFLAGS} -L$libgdbm/lib -R$libgdbm/lib"
CPPFLAGS="${CPPFLAGS} -I$libgdbm/include"
fi
AC_CHECK_HEADER(gdbm.h,
AC_CHECK_LIB(gdbm, gdbm_open,
[libgdbm=yes LIBS="${LIBS} -lgdbm"], libgdbm=no),
libgdbm=no)
fi
if test "$libgdbm" != "yes"; then
AC_MSG_ERROR([Couldn't find required libgdbm installation])
fi

dnl define where the configuration file is located
AC_DEFINE_DIR(CONFIG_DIR,sysconfdir,[where the configuration file can be found])

AC_DEFINE_DIR(STATE_DIR,localstatedir,[where the socket is created in])

dnl Create the makefiles
AC_OUTPUT(Makefile intl/Makefile po/Makefile.in m4/Makefile )

0 comments on commit c8509c3

Please sign in to comment.
You can’t perform that action at this time.