From 07c5291f0732e5d3dd251d60a2f1170444f1b9f3 Mon Sep 17 00:00:00 2001 From: Graeme Walker Date: Sun, 18 Nov 2007 12:00:00 +0000 Subject: [PATCH] v1.7 --- AUTHORS | 9 + ChangeLog | 8 + LICENSE | 93 +++ Makefile.am | 2 +- Makefile.in | 6 +- acinclude.m4 | 189 +++--- bin/Makefile.am | 4 +- bin/Makefile.in | 8 +- bin/doxygen.sh_ | 41 ++ bin/emailrelay-notify.sh_ | 2 +- bin/emailrelay-resubmit.sh_ | 4 +- config.h.in | 3 + configure | 230 ++++++-- configure.ac | 16 +- doc/Makefile.am | 12 +- doc/Makefile.in | 16 +- doc/doxygen_missing.html | 14 + doc/emailrelay-filter-copy.1 | 42 ++ doc/emailrelay-man.html | 22 +- doc/emailrelay.1 | 18 +- doc/emailrelay.css | 5 +- doc/gnet-classes.png | Bin 61096 -> 29078 bytes doc/reference.txt | 26 +- doc/userguide.txt | 15 + doc/windows.txt | 28 +- emailrelay.spec | 9 +- etc/Makefile.in | 4 + lib/Makefile.in | 4 + lib/gcc2.95/Makefile.in | 4 + lib/msvc6.0/Makefile.in | 4 + lib/sunpro5/Makefile.in | 4 + src/Makefile.am | 2 +- src/Makefile.in | 6 +- src/glib/Makefile.in | 4 + src/glib/gpath.h | 35 +- src/glib/gslot.h | 6 +- src/glib/gstatemachine.h | 7 +- src/glib/gtest.cpp | 2 +- src/gnet/Makefile.am | 28 +- src/gnet/Makefile.in | 43 +- src/gnet/gbufferedclient.cpp | 85 --- src/gnet/gbufferedclient.h | 87 --- src/gnet/gbufferedserverpeer.cpp | 59 +- src/gnet/gbufferedserverpeer.h | 42 +- src/gnet/gclient.cpp | 2 +- src/gnet/gclient.h | 10 +- src/gnet/geventhandler.cpp | 3 +- src/gnet/gresolver.h | 6 - src/gnet/gresolver_unix.cpp | 189 +++--- src/gnet/gresolver_win32.cpp | 12 - src/gnet/gsender.cpp | 123 ---- src/gnet/gsender.h | 89 --- src/gnet/gserver.cpp | 45 +- src/gnet/gserver.h | 28 +- src/gnet/gsimpleclient.cpp | 121 ++-- src/gnet/gsimpleclient.h | 42 +- src/gnet/gsimpleclient_unix.cpp | 4 + src/gnet/gsocket.cpp | 24 +- src/gnet/gsocket.h | 44 +- src/gnet/gsocketprotocol.cpp | 500 ++++++++++++++++ src/gnet/gsocketprotocol.h | 113 ++++ src/gnet/mingw.mak | 3 +- src/gpop/Makefile.in | 4 + src/gpop/gpopserver.cpp | 4 + src/gpop/gpopserver.h | 3 + src/gsmtp/Makefile.am | 4 +- src/gsmtp/Makefile.in | 8 +- src/gsmtp/gadminserver.cpp | 4 + src/gsmtp/gadminserver.h | 3 + src/gsmtp/gclientprotocol.cpp | 100 +++- src/gsmtp/gclientprotocol.h | 25 +- src/gsmtp/gnewfile.h | 2 +- src/gsmtp/grequestclient.cpp | 4 + src/gsmtp/grequestclient.h | 3 + src/gsmtp/gsasl.h | 17 +- src/gsmtp/{gsasl_cyrus.cpp => gsasl_gnu.cpp} | 6 +- src/gsmtp/gsasl_native.cpp | 175 +++--- src/gsmtp/gserverprotocol.cpp | 128 ++-- src/gsmtp/gserverprotocol.h | 19 +- src/gsmtp/gsmtpclient.cpp | 13 +- src/gsmtp/gsmtpclient.h | 5 +- src/gsmtp/gsmtpserver.cpp | 12 +- src/gsmtp/gsmtpserver.h | 5 +- src/gsmtp/gspamclient.cpp | 4 + src/gsmtp/gspamclient.h | 3 + src/gssl/Makefile.am | 29 + src/gssl/Makefile.in | 431 ++++++++++++++ src/gssl/gssl.cpp | 29 + src/gssl/gssl.h | 131 +++++ src/gssl/gssl_none.cpp | 109 ++++ src/gssl/gssl_openssl.cpp | 581 +++++++++++++++++++ src/gssl/mingw.mak | 34 ++ src/gui/Info.plist | 2 +- src/gui/Makefile.in | 4 + src/gui/boot.cpp | 2 +- src/gui/dir.cpp | 9 +- src/gui/dir.h | 4 - src/gui/dir_unix.cpp | 3 +- src/gui/dir_win32.cpp | 35 +- src/gui/gdialog.cpp | 1 + src/gui/gpage.cpp | 1 + src/gui/gunpack.cpp | 6 +- src/gui/gunpack.h | 2 +- src/gui/installer.cpp | 4 + src/gui/legal.cpp | 14 + src/gui/legal.h | 3 + src/gui/mingw.mak | 36 +- src/gui/pack.cpp | 22 +- src/gui/pages.cpp | 11 +- src/gui/pages.h | 2 + src/main/Makefile.am | 14 +- src/main/Makefile.in | 26 +- src/main/commandline.cpp | 53 +- src/main/commandline.h | 7 +- src/main/common.dsp | 62 +- src/main/configuration.cpp | 10 + src/main/configuration.h | 8 + src/main/doxygen.cfg | 16 +- src/main/emailrelay.dsp | 6 +- src/main/filter.cpp | 165 ++++++ src/main/filter.dsp | 4 + src/main/filter.h | 35 ++ src/main/filter_copy.cpp | 179 +----- src/main/mingw.mak | 14 +- src/main/run.cpp | 12 +- src/main/service.dsp | 4 + src/main/service_install.cpp | 56 +- src/main/service_remove.cpp | 55 ++ src/main/service_remove.h | 28 + src/main/service_wrapper.cpp | 38 +- src/main/winform.cpp | 10 +- src/mingw-common.mak | 34 +- src/win32/Makefile.in | 4 + test/Makefile.am | 11 +- test/Makefile.in | 21 +- test/emailrelay-soak-test.sh_ | 2 +- test/emailrelay-test.pl_ | 14 +- test/emailrelay-test.sh_ | 14 +- test/emailrelay_test_scanner.cpp | 10 + test/emailrelay_test_server.cpp | 100 +++- 140 files changed, 4128 insertions(+), 1546 deletions(-) create mode 100644 LICENSE create mode 100644 bin/doxygen.sh_ create mode 100644 doc/doxygen_missing.html create mode 100644 doc/emailrelay-filter-copy.1 delete mode 100644 src/gnet/gbufferedclient.cpp delete mode 100644 src/gnet/gbufferedclient.h delete mode 100644 src/gnet/gsender.cpp delete mode 100644 src/gnet/gsender.h create mode 100644 src/gnet/gsocketprotocol.cpp create mode 100644 src/gnet/gsocketprotocol.h rename src/gsmtp/{gsasl_cyrus.cpp => gsasl_gnu.cpp} (91%) create mode 100644 src/gssl/Makefile.am create mode 100644 src/gssl/Makefile.in create mode 100644 src/gssl/gssl.cpp create mode 100644 src/gssl/gssl.h create mode 100644 src/gssl/gssl_none.cpp create mode 100644 src/gssl/gssl_openssl.cpp create mode 100644 src/gssl/mingw.mak create mode 100644 src/main/filter.cpp create mode 100644 src/main/filter.h create mode 100644 src/main/service_remove.cpp create mode 100644 src/main/service_remove.h diff --git a/AUTHORS b/AUTHORS index 5ba83a0..853a322 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,3 +2,12 @@ AUTHORS ======= Graeme Walker +Binary distributions +-------------------- +Binary distributions of E-MailRelay may include code from: +* OpenSSL Toolkit (http://www.openssl.org) +* MinGW (http://www.mingw.org) +* Trolltech Qt (http://trolltech.com) + +This product includes software developed by the OpenSSL Project +for use in the OpenSSL Toolkit. (http://www.openssl.org/) diff --git a/ChangeLog b/ChangeLog index 7706955..587a158 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,14 @@ E-MailRelay Change Log ====================== +1.6 -> 1.7 +---------- +* TLS/SSL support for SMTP using OpenSSL ("./configure --with-openssl" with "--client-tls" and "--server-tls"). +* Authentication mechanism "PLAIN" added. +* Some tightening up of the SMTP server protocol. +* Windows service wrapper has an "--uninstall" option. +* Windows installation GUI uninstalls the service before reinstalling it. + 1.5 -> 1.6 ---------- * GPLv3 licence (see "http://gplv3.fsf.org"). diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7055b7b --- /dev/null +++ b/LICENSE @@ -0,0 +1,93 @@ +Licenses +======== + +Source distributions +-------------------- +Permission to copy E-MailRelay is under the terms of the GPLv3 license. The text +of the license is in the file "COPYING". + +Binary distributions +-------------------- +Binary distributions of E-MailRelay may also include code from: +* OpenSSL Toolkit (http://www.openssl.org) +* MinGW (http://www.mingw.org) +* Trolltech Qt (http://trolltech.com) + +OpenSSL +------- +This product includes software developed by the OpenSSL Project +for use in the OpenSSL Toolkit. (http://www.openssl.org/) + +OpenSSL is dual-licensed, including the following: + + /* ==================================================================== + * Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + +MinGW +----- +The MinGW runtime that is included in the Windows binary distributions of +E-MailRelay is uncopyrighted and in the public domain. + +Trolltech Qt +------------ +The Qt runtime that is included in the Windows binary distributions of +E-MailRelay is dual-licensed, including the GPLv2 (see http://www.gnu.org). +E-MailRelay is not a derived work and so the terms of the GPLv2 only apply to +the Qt runtime files within the E-MailRelay binary distribution. + +The Qt GUI Toolkit is Copyright (C) 1994-2006 Trolltech ASA. + +Qt source code is available from the Trolltech web site, +http://trolltech.com. + diff --git a/Makefile.am b/Makefile.am index 9f315d5..04ee43d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,7 +14,7 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . # -EXTRA_DIST = emailrelay.spec ChangeLog README.windows +EXTRA_DIST = emailrelay.spec ChangeLog README.windows LICENSE SUBDIRS = src bin lib etc doc test e_doc_DATA = NEWS README ChangeLog uninstall-local: diff --git a/Makefile.in b/Makefile.in index 0c371cb..5b11b5b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -136,6 +136,10 @@ QT_LIBS = @QT_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL = @SSL@ +SSL_LIBS = @SSL_LIBS@ +STATIC_END = @STATIC_END@ +STATIC_START = @STATIC_START@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -190,7 +194,7 @@ top_srcdir = @top_srcdir@ # # -EXTRA_DIST = emailrelay.spec ChangeLog README.windows +EXTRA_DIST = emailrelay.spec ChangeLog README.windows LICENSE SUBDIRS = src bin lib etc doc test e_doc_DATA = NEWS README ChangeLog all: config.h diff --git a/acinclude.m4 b/acinclude.m4 index d9cf4a1..341e5b7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -15,19 +15,18 @@ dnl along with this program. If not, see . dnl === dnl socketlen_t -dnl derived from lars brinkhoff... dnl AC_DEFUN([ACLOCAL_TYPE_SOCKLEN_T], -[AC_CACHE_CHECK([for socklen_t], aclocal_cv_type_socklen_t, +[AC_CACHE_CHECK([for socklen_t],[aclocal_type_socklen_t], [ - AC_TRY_COMPILE( - [#include -#include ], - [socklen_t len = 42; return len;], - aclocal_cv_type_socklen_t=yes, - aclocal_cv_type_socklen_t=no ) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include +#include ]], + [[socklen_t len = 42; return len;]])], + aclocal_type_socklen_t=yes, + aclocal_type_socklen_t=no ) ]) - if test $aclocal_cv_type_socklen_t = yes; then + if test $aclocal_type_socklen_t = yes; then AC_DEFINE(HAVE_SOCKLEN_T, 1,[Define to 1 if socklen_t type definition in sys/socket.h]) else AC_DEFINE(HAVE_SOCKLEN_T, 0,[Define to 1 if socklen_t type definition in sys/socket.h]) @@ -37,18 +36,18 @@ AC_DEFUN([ACLOCAL_TYPE_SOCKLEN_T], dnl ipv6 dnl AC_DEFUN([ACLOCAL_CHECK_IPV6], -[AC_CACHE_CHECK([for ipv6], aclocal_cv_ipv6, +[AC_CACHE_CHECK([for ipv6],[aclocal_ipv6], [ - AC_TRY_COMPILE( - [#include + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include #include #include -#include ], - [sockaddr_in6 * p = 0;], - aclocal_cv_ipv6=yes , - aclocal_cv_ipv6=no ) +#include ]], + [[sockaddr_in6 * p = 0;]])], + aclocal_ipv6=yes , + aclocal_ipv6=no ) ]) - if test $aclocal_cv_ipv6 = yes; then + if test $aclocal_ipv6 = yes; then AC_DEFINE(HAVE_IPV6,1,[Define to 1 if ipv6 is available]) else AC_DEFINE(HAVE_IPV6,0,[Define to 1 if ipv6 is available]) @@ -58,19 +57,19 @@ AC_DEFUN([ACLOCAL_CHECK_IPV6], dnl getipnodebyname for ipv6 rfc2553 dnl AC_DEFUN([ACLOCAL_CHECK_GETIPNODEBYNAME], -[AC_CACHE_CHECK([for getipnodebyname], aclocal_cv_getipnodebyname, +[AC_CACHE_CHECK([for getipnodebyname],[aclocal_getipnodebyname], [ - AC_TRY_COMPILE( - [#include + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include #include #include #include -#include ], - [int i=0; getipnodebyname("",AF_INET6,AI_DEFAULT,&i);], - aclocal_cv_getipnodebyname=yes , - aclocal_cv_getipnodebyname=no ) +#include ]], + [[int i=0; getipnodebyname("",AF_INET6,AI_DEFAULT,&i);]])], + aclocal_getipnodebyname=yes , + aclocal_getipnodebyname=no ) ]) - if test $aclocal_cv_getipnodebyname = yes; then + if test $aclocal_getipnodebyname = yes; then AC_DEFINE(HAVE_GETIPNODEBYNAME,1,[Define to 1 if getipnodebyname() is available]) else AC_DEFINE(HAVE_GETIPNODEBYNAME,0,[Define to 1 if getipnodebyname() is available]) @@ -80,17 +79,17 @@ AC_DEFUN([ACLOCAL_CHECK_GETIPNODEBYNAME], dnl check for sin6_len in sockaddr_in6 dnl AC_DEFUN([ACLOCAL_CHECK_SIN6_LEN], -[AC_CACHE_CHECK([for sin6_len], aclocal_cv_sin6_len, +[AC_CACHE_CHECK([for sin6_len],[aclocal_sin6_len], [ - AC_TRY_COMPILE( - [#include + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include #include -#include ], - [struct sockaddr_in6 s; s.sin6_len = 1;], - aclocal_cv_sin6_len=yes , - aclocal_cv_sin6_len=no ) +#include ]], + [[struct sockaddr_in6 s; s.sin6_len = 1;]])], + aclocal_sin6_len=yes , + aclocal_sin6_len=no ) ]) - if test $aclocal_cv_sin6_len = yes; then + if test $aclocal_sin6_len = yes; then AC_DEFINE(HAVE_SIN6_LEN,1,[Define to 1 if sockaddr_in6 has a sin6_len member]) else AC_DEFINE(HAVE_SIN6_LEN,0,[Define to 1 if sockaddr_in6 has a sin6_len member]) @@ -100,17 +99,17 @@ AC_DEFUN([ACLOCAL_CHECK_SIN6_LEN], dnl setgroups dnl AC_DEFUN([ACLOCAL_CHECK_SETGROUPS], -[AC_CACHE_CHECK([for setgroups], aclocal_cv_setgroups, +[AC_CACHE_CHECK([for setgroups],[aclocal_setgroups], [ - AC_TRY_COMPILE( - [#include + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include #include -#include ], - [setgroups(0,0) ;], - aclocal_cv_setgroups=yes , - aclocal_cv_setgroups=no ) +#include ]], + [[setgroups(0,0) ;]])], + aclocal_setgroups=yes , + aclocal_setgroups=no ) ]) - if test $aclocal_cv_setgroups = yes; then + if test $aclocal_setgroups = yes; then AC_DEFINE(HAVE_SETGROUPS,1,[Define to 1 if setgroups is available]) else AC_DEFINE(HAVE_SETGROUPS,0,[Define to 1 if setgroups is available]) @@ -120,15 +119,15 @@ AC_DEFUN([ACLOCAL_CHECK_SETGROUPS], dnl gmtime_r dnl AC_DEFUN([ACLOCAL_CHECK_GMTIME_R], -[AC_CACHE_CHECK([for gmtime_r], aclocal_cv_gmtime_r, +[AC_CACHE_CHECK([for gmtime_r],[aclocal_gmtime_r], [ - AC_TRY_COMPILE( - [#include ], - [gmtime_r((time_t*)0,(struct tm*)0) ;], - aclocal_cv_gmtime_r=yes , - aclocal_cv_gmtime_r=no ) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include ]], + [[gmtime_r((time_t*)0,(struct tm*)0) ;]])], + aclocal_gmtime_r=yes , + aclocal_gmtime_r=no ) ]) - if test $aclocal_cv_gmtime_r = yes; then + if test $aclocal_gmtime_r = yes; then AC_DEFINE(HAVE_GMTIME_R,1,[Define to 1 if gmtime_r in time.h]) else AC_DEFINE(HAVE_GMTIME_R,0,[Define to 1 if gmtime_r in time.h]) @@ -138,15 +137,15 @@ AC_DEFUN([ACLOCAL_CHECK_GMTIME_R], dnl localtime_r dnl AC_DEFUN([ACLOCAL_CHECK_LOCALTIME_R], -[AC_CACHE_CHECK([for localtime_r], aclocal_cv_localtime_r, +[AC_CACHE_CHECK([for localtime_r],[aclocal_localtime_r], [ - AC_TRY_COMPILE( - [#include ], - [localtime_r((time_t*)0,(struct tm*)0) ;], - aclocal_cv_localtime_r=yes , - aclocal_cv_localtime_r=no ) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include ]], + [[localtime_r((time_t*)0,(struct tm*)0) ;]])], + aclocal_localtime_r=yes , + aclocal_localtime_r=no ) ]) - if test $aclocal_cv_localtime_r = yes; then + if test $aclocal_localtime_r = yes; then AC_DEFINE(HAVE_LOCALTIME_R,1,[Define to 1 if localtime_r in time.h]) else AC_DEFINE(HAVE_LOCALTIME_R,0,[Define to 1 if localtime_r in time.h]) @@ -157,16 +156,16 @@ dnl buggy ctime dnl sunpro5 ctime + unistd.h doesnt compile -- fix with time.h first dnl AC_DEFUN([ACLOCAL_CHECK_BUGGY_CTIME], -[AC_CACHE_CHECK([for buggy ctime], aclocal_cv_buggy_ctime, +[AC_CACHE_CHECK([for buggy ctime],[aclocal_buggy_ctime], [ - AC_TRY_COMPILE( - [#include -#include ], - [] , - aclocal_cv_buggy_ctime=no , - aclocal_cv_buggy_ctime=yes ) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include +#include ]], + [[ ]])] , + aclocal_buggy_ctime=no , + aclocal_buggy_ctime=yes ) ]) - if test $aclocal_cv_buggy_ctime = yes; then + if test $aclocal_buggy_ctime = yes; then AC_DEFINE(HAVE_BUGGY_CTIME,1,[Define to 1 if requires ]) else AC_DEFINE(HAVE_BUGGY_CTIME,0,[Define to 1 if requires ]) @@ -209,7 +208,7 @@ if test "$enable_gui" = "no" then AC_DEFINE(HAVE_GUI,0,[Define to 1 to enable gui code]) else - PKG_CHECK_MODULES(QT,QtGui >= 4.0.1,[qt4=yes],[AC_MSG_RESULT([no])]) + PKG_CHECK_MODULES(QT,QtGui >= 4.0.1,[qt4=yes],[AC_MSG_RESULT([no])]) if test "$qt4" = "yes" then MOC="${e_qtmoc}" @@ -243,9 +242,9 @@ AC_DEFUN([ENABLE_IPV6], [ if test "$enable_ipv6" = "yes" then - if test "$aclocal_cv_ipv6" != "yes" + if test "$aclocal_ipv6" != "yes" then - AC_MSG_WARN(ignoring --enable-ipv6) + AC_MSG_WARN([ignoring --enable-ipv6]) IP="ipv4" else IP="ipv6" @@ -256,6 +255,60 @@ fi AC_SUBST(IP) ]) +dnl with-openssl +dnl +AC_DEFUN([WITH_OPENSSL], +if test "$with_openssl" != "no" +then +[AC_CACHE_CHECK([for openssl],[aclocal_openssl], +[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include ]], + [[SSL_CTX * p = 0 ; return 1;]])], + aclocal_openssl=yes, + aclocal_openssl=no ) +]) + if test "$aclocal_openssl" = "yes" + then + AC_DEFINE(HAVE_OPENSSL,1,[Define to 1 to enable tls/ssh code using openssl]) + SSL_LIBS="-lssl -lcrypto" + SSL="openssl" + else + if test "$with_openssl" = "yes" + then + AC_MSG_WARN([ignoring --with-openssl, check config.log and try setting CFLAGS]) + fi + AC_DEFINE(HAVE_OPENSSL,0,[Define to 1 to enable tls/ssh code using openssl]) + SSL_LIBS="" + SSL="none" + fi +else + AC_DEFINE(HAVE_OPENSSL,0,[Define to 1 to enable tls/ssh code using openssl]) + SSL_LIBS="" + SSL="none" +fi +AC_SUBST(SSL_LIBS) +AC_SUBST(SSL) +]) + +dnl enable-static-linking +dnl +dnl TODO remove -ldl +dnl +AC_DEFUN([ENABLE_STATIC_LINKING], +[ +if test "$enable_static_linking" = "yes" +then + STATIC_START="-Xlinker -Bstatic" + STATIC_END="-Xlinker -Bdynamic -ldl" +else + STATIC_START="" + STATIC_END="" +fi +AC_SUBST(STATIC_START) +AC_SUBST(STATIC_END) +]) + dnl with-workshop dnl AC_DEFUN([WITH_WORKSHOP], @@ -276,7 +329,7 @@ if test "$with_doxygen" != "" then if test "$with_doxygen" = "yes" -a "$HAVE_DOXYGEN" != "yes" then - AC_MSG_WARN(ignoring --with-doxygen) + AC_MSG_WARN([ignoring --with-doxygen]) else HAVE_DOXYGEN="$with_doxygen" AC_SUBST(HAVE_DOXYGEN) @@ -292,7 +345,7 @@ if test "$with_man2html" != "" then if test "$with_man2html" = "yes" -a "$HAVE_MAN2HTML" != "yes" then - AC_MSG_WARN(ignoring --with-man2html) + AC_MSG_WARN([ignoring --with-man2html]) else HAVE_MAN2HTML="$with_man2html" AC_SUBST(HAVE_MAN2HTML) diff --git a/bin/Makefile.am b/bin/Makefile.am index f82ec6e..dbac6ef 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -15,8 +15,8 @@ ## along with this program. If not, see . # -EXTRA_DIST = emailrelay.sh_ txt2html.sh_ txt2mu.sh_ mu2html.sh_ mu2docbook.sh_ expand.sh_ emailrelay-notify.sh_ emailrelay-resubmit.sh_ emailrelay-deliver.sh_ emailrelay-process.sh_ emailrelay-runperl.js emailrelay-resubmit.js emailrelay-submit.sh_ -work_scripts = txt2mu.sh mu2html.sh mu2docbook.sh expand.sh txt2html.sh emailrelay.sh +EXTRA_DIST = emailrelay.sh_ doxygen.sh_ txt2html.sh_ txt2mu.sh_ mu2html.sh_ mu2docbook.sh_ expand.sh_ emailrelay-notify.sh_ emailrelay-resubmit.sh_ emailrelay-deliver.sh_ emailrelay-process.sh_ emailrelay-runperl.js emailrelay-resubmit.js emailrelay-submit.sh_ +work_scripts = doxygen.sh txt2mu.sh mu2html.sh mu2docbook.sh expand.sh txt2html.sh emailrelay.sh noinst_SCRIPTS = emailrelay-runperl.js emailrelay-resubmit.js $(work_scripts) e_init_SCRIPTS = emailrelay e_examples_DATA = emailrelay-process.sh emailrelay-notify.sh emailrelay-deliver.sh emailrelay-resubmit.sh emailrelay-submit.sh diff --git a/bin/Makefile.in b/bin/Makefile.in index c9fda15..3e3419b 100644 --- a/bin/Makefile.in +++ b/bin/Makefile.in @@ -116,6 +116,10 @@ QT_LIBS = @QT_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL = @SSL@ +SSL_LIBS = @SSL_LIBS@ +STATIC_END = @STATIC_END@ +STATIC_START = @STATIC_START@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -167,8 +171,8 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = emailrelay.sh_ txt2html.sh_ txt2mu.sh_ mu2html.sh_ mu2docbook.sh_ expand.sh_ emailrelay-notify.sh_ emailrelay-resubmit.sh_ emailrelay-deliver.sh_ emailrelay-process.sh_ emailrelay-runperl.js emailrelay-resubmit.js emailrelay-submit.sh_ -work_scripts = txt2mu.sh mu2html.sh mu2docbook.sh expand.sh txt2html.sh emailrelay.sh +EXTRA_DIST = emailrelay.sh_ doxygen.sh_ txt2html.sh_ txt2mu.sh_ mu2html.sh_ mu2docbook.sh_ expand.sh_ emailrelay-notify.sh_ emailrelay-resubmit.sh_ emailrelay-deliver.sh_ emailrelay-process.sh_ emailrelay-runperl.js emailrelay-resubmit.js emailrelay-submit.sh_ +work_scripts = doxygen.sh txt2mu.sh mu2html.sh mu2docbook.sh expand.sh txt2html.sh emailrelay.sh noinst_SCRIPTS = emailrelay-runperl.js emailrelay-resubmit.js $(work_scripts) e_init_SCRIPTS = emailrelay e_examples_DATA = emailrelay-process.sh emailrelay-notify.sh emailrelay-deliver.sh emailrelay-resubmit.sh emailrelay-submit.sh diff --git a/bin/doxygen.sh_ b/bin/doxygen.sh_ new file mode 100644 index 0000000..e8c65a0 --- /dev/null +++ b/bin/doxygen.sh_ @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Copyright (C) 2001-2007 Graeme Walker +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# === +# +# doxygen.sh +# +# Used by doc/Makefile to run doxygen with a bit of +# post-processing. +# +# usage: doxygen +# + +HAVE_DOXYGEN="$1" +top_srcdir="$2" +top_builddir="$3" + +if test "$HAVE_DOXYGEN" = "yes" -o -z "$HAVE_DOXYGEN" +then + cat "${top_srcdir}/src/main/doxygen.cfg" | \ + sed "s:__TOP_SRC__:${top_srcdir}:g" | \ + sed "s:__TOP_BUILD__:${top_builddir}:g" | \ + doxygen - +else + mkdir doxygen 2>/dev/null + cp -f "${top_srcdir}/doc/doxygen_missing.html" doxygen/index.html +fi + diff --git a/bin/emailrelay-notify.sh_ b/bin/emailrelay-notify.sh_ index 437a5c7..355dfb6 100644 --- a/bin/emailrelay-notify.sh_ +++ b/bin/emailrelay-notify.sh_ @@ -113,7 +113,7 @@ do # deliver the notification using procmail # echo `basename $0`: delivering `basename ${content}` to ${deliver_to} - ${procmail} -d ${deliver_to} < ${tmp} + ${procmail} -d "${deliver_to}" < ${tmp} rc=$? # clean up diff --git a/bin/emailrelay-resubmit.sh_ b/bin/emailrelay-resubmit.sh_ index 55516dc..62fbd41 100644 --- a/bin/emailrelay-resubmit.sh_ +++ b/bin/emailrelay-resubmit.sh_ @@ -52,8 +52,8 @@ do failures="`fgrep MailRelay-Reason: < ${file} | wc -l`" if test "${failures}" -lt "${retry_limit}" then - good_file="`echo ${file} | sed 's/\.bad$//'`" - mv -f ${file} ${good_file} + good_file="`echo \"${file}\" | sed 's/\.bad$//'`" + mv -f "${file}" "${good_file}" fi fi done diff --git a/config.h.in b/config.h.in index 56a7b5b..cc80e8f 100644 --- a/config.h.in +++ b/config.h.in @@ -34,6 +34,9 @@ /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H +/* Define to 1 to enable tls/ssh code using openssl */ +#undef HAVE_OPENSSL + /* Define to 1 if setgroups is available */ #undef HAVE_SETGROUPS diff --git a/configure b/configure index 1b3f682..3f0807a 100755 --- a/configure +++ b/configure @@ -714,6 +714,10 @@ QT_LIBS MOC GUI_TRUE GUI_FALSE +SSL_LIBS +SSL +STATIC_START +STATIC_END e_docdir e_initdir e_spooldir @@ -1321,6 +1325,8 @@ Optional Features: --enable-ipv6 enable ipv6 (default disabled) --enable-gui enable configuration gui (requires Qt4) (default auto) + --enable-static-linking prefer static linking for some libraries (default + no) --enable-fhs force FHS-compliant directories, ignoring --prefix etc (default disabled) @@ -1333,6 +1339,8 @@ Optional Packages: (default auto) --with-man2html convert man pages to html using man2html (default auto) + --with-openssl use openssl for smtp client tls extension (default + auto) Some influential environment variables: CC C compiler command @@ -2108,7 +2116,7 @@ fi # Define the identity of the package. PACKAGE=emailrelay - VERSION=1.6 + VERSION=1.7 cat >>confdefs.h <<_ACEOF @@ -5987,7 +5995,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } -if test "${aclocal_cv_type_socklen_t+set}" = set; then +if test "${aclocal_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6024,20 +6032,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - aclocal_cv_type_socklen_t=yes + aclocal_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - aclocal_cv_type_socklen_t=no + aclocal_type_socklen_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $aclocal_cv_type_socklen_t" >&5 -echo "${ECHO_T}$aclocal_cv_type_socklen_t" >&6; } - if test $aclocal_cv_type_socklen_t = yes; then +{ echo "$as_me:$LINENO: result: $aclocal_type_socklen_t" >&5 +echo "${ECHO_T}$aclocal_type_socklen_t" >&6; } + if test $aclocal_type_socklen_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKLEN_T 1 @@ -6053,7 +6061,7 @@ _ACEOF { echo "$as_me:$LINENO: checking for ipv6" >&5 echo $ECHO_N "checking for ipv6... $ECHO_C" >&6; } -if test "${aclocal_cv_ipv6+set}" = set; then +if test "${aclocal_ipv6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6092,20 +6100,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - aclocal_cv_ipv6=yes + aclocal_ipv6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - aclocal_cv_ipv6=no + aclocal_ipv6=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $aclocal_cv_ipv6" >&5 -echo "${ECHO_T}$aclocal_cv_ipv6" >&6; } - if test $aclocal_cv_ipv6 = yes; then +{ echo "$as_me:$LINENO: result: $aclocal_ipv6" >&5 +echo "${ECHO_T}$aclocal_ipv6" >&6; } + if test $aclocal_ipv6 = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_IPV6 1 @@ -6121,7 +6129,7 @@ _ACEOF { echo "$as_me:$LINENO: checking for getipnodebyname" >&5 echo $ECHO_N "checking for getipnodebyname... $ECHO_C" >&6; } -if test "${aclocal_cv_getipnodebyname+set}" = set; then +if test "${aclocal_getipnodebyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6161,20 +6169,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - aclocal_cv_getipnodebyname=yes + aclocal_getipnodebyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - aclocal_cv_getipnodebyname=no + aclocal_getipnodebyname=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $aclocal_cv_getipnodebyname" >&5 -echo "${ECHO_T}$aclocal_cv_getipnodebyname" >&6; } - if test $aclocal_cv_getipnodebyname = yes; then +{ echo "$as_me:$LINENO: result: $aclocal_getipnodebyname" >&5 +echo "${ECHO_T}$aclocal_getipnodebyname" >&6; } + if test $aclocal_getipnodebyname = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETIPNODEBYNAME 1 @@ -6190,7 +6198,7 @@ _ACEOF { echo "$as_me:$LINENO: checking for sin6_len" >&5 echo $ECHO_N "checking for sin6_len... $ECHO_C" >&6; } -if test "${aclocal_cv_sin6_len+set}" = set; then +if test "${aclocal_sin6_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6228,20 +6236,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - aclocal_cv_sin6_len=yes + aclocal_sin6_len=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - aclocal_cv_sin6_len=no + aclocal_sin6_len=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $aclocal_cv_sin6_len" >&5 -echo "${ECHO_T}$aclocal_cv_sin6_len" >&6; } - if test $aclocal_cv_sin6_len = yes; then +{ echo "$as_me:$LINENO: result: $aclocal_sin6_len" >&5 +echo "${ECHO_T}$aclocal_sin6_len" >&6; } + if test $aclocal_sin6_len = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SIN6_LEN 1 @@ -6257,7 +6265,7 @@ _ACEOF { echo "$as_me:$LINENO: checking for buggy ctime" >&5 echo $ECHO_N "checking for buggy ctime... $ECHO_C" >&6; } -if test "${aclocal_cv_buggy_ctime+set}" = set; then +if test "${aclocal_buggy_ctime+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6294,20 +6302,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - aclocal_cv_buggy_ctime=no + aclocal_buggy_ctime=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - aclocal_cv_buggy_ctime=yes + aclocal_buggy_ctime=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $aclocal_cv_buggy_ctime" >&5 -echo "${ECHO_T}$aclocal_cv_buggy_ctime" >&6; } - if test $aclocal_cv_buggy_ctime = yes; then +{ echo "$as_me:$LINENO: result: $aclocal_buggy_ctime" >&5 +echo "${ECHO_T}$aclocal_buggy_ctime" >&6; } + if test $aclocal_buggy_ctime = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_BUGGY_CTIME 1 @@ -6323,7 +6331,7 @@ _ACEOF { echo "$as_me:$LINENO: checking for gmtime_r" >&5 echo $ECHO_N "checking for gmtime_r... $ECHO_C" >&6; } -if test "${aclocal_cv_gmtime_r+set}" = set; then +if test "${aclocal_gmtime_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6359,20 +6367,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - aclocal_cv_gmtime_r=yes + aclocal_gmtime_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - aclocal_cv_gmtime_r=no + aclocal_gmtime_r=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $aclocal_cv_gmtime_r" >&5 -echo "${ECHO_T}$aclocal_cv_gmtime_r" >&6; } - if test $aclocal_cv_gmtime_r = yes; then +{ echo "$as_me:$LINENO: result: $aclocal_gmtime_r" >&5 +echo "${ECHO_T}$aclocal_gmtime_r" >&6; } + if test $aclocal_gmtime_r = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_GMTIME_R 1 @@ -6388,7 +6396,7 @@ _ACEOF { echo "$as_me:$LINENO: checking for localtime_r" >&5 echo $ECHO_N "checking for localtime_r... $ECHO_C" >&6; } -if test "${aclocal_cv_localtime_r+set}" = set; then +if test "${aclocal_localtime_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6424,20 +6432,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - aclocal_cv_localtime_r=yes + aclocal_localtime_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - aclocal_cv_localtime_r=no + aclocal_localtime_r=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $aclocal_cv_localtime_r" >&5 -echo "${ECHO_T}$aclocal_cv_localtime_r" >&6; } - if test $aclocal_cv_localtime_r = yes; then +{ echo "$as_me:$LINENO: result: $aclocal_localtime_r" >&5 +echo "${ECHO_T}$aclocal_localtime_r" >&6; } + if test $aclocal_localtime_r = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LOCALTIME_R 1 @@ -6453,7 +6461,7 @@ _ACEOF { echo "$as_me:$LINENO: checking for setgroups" >&5 echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; } -if test "${aclocal_cv_setgroups+set}" = set; then +if test "${aclocal_setgroups+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6491,20 +6499,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - aclocal_cv_setgroups=yes + aclocal_setgroups=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - aclocal_cv_setgroups=no + aclocal_setgroups=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $aclocal_cv_setgroups" >&5 -echo "${ECHO_T}$aclocal_cv_setgroups" >&6; } - if test $aclocal_cv_setgroups = yes; then +{ echo "$as_me:$LINENO: result: $aclocal_setgroups" >&5 +echo "${ECHO_T}$aclocal_setgroups" >&6; } + if test $aclocal_setgroups = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SETGROUPS 1 @@ -6664,7 +6672,7 @@ fi if test "$enable_ipv6" = "yes" then - if test "$aclocal_cv_ipv6" != "yes" + if test "$aclocal_ipv6" != "yes" then { echo "$as_me:$LINENO: WARNING: ignoring --enable-ipv6" >&5 echo "$as_me: WARNING: ignoring --enable-ipv6" >&2;} @@ -6906,6 +6914,119 @@ echo "$as_me: WARNING: ignoring --with-man2html" >&2;} fi + +# Check whether --with-openssl was given. +if test "${with_openssl+set}" = set; then + withval=$with_openssl; +fi + +if test "$with_openssl" != "no" +then +{ echo "$as_me:$LINENO: checking for openssl" >&5 +echo $ECHO_N "checking for openssl... $ECHO_C" >&6; } +if test "${aclocal_openssl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +SSL_CTX * p = 0 ; return 1; + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + aclocal_openssl=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + aclocal_openssl=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $aclocal_openssl" >&5 +echo "${ECHO_T}$aclocal_openssl" >&6; } + if test "$aclocal_openssl" = "yes" + then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_OPENSSL 1 +_ACEOF + + SSL_LIBS="-lssl -lcrypto" + SSL="openssl" + else + if test "$with_openssl" = "yes" + then + { echo "$as_me:$LINENO: WARNING: ignoring --with-openssl, check config.log and try setting CFLAGS" >&5 +echo "$as_me: WARNING: ignoring --with-openssl, check config.log and try setting CFLAGS" >&2;} + fi + +cat >>confdefs.h <<\_ACEOF +#define HAVE_OPENSSL 0 +_ACEOF + + SSL_LIBS="" + SSL="none" + fi +else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_OPENSSL 0 +_ACEOF + + SSL_LIBS="" + SSL="none" +fi + + + + +# Check whether --enable-static-linking was given. +if test "${enable_static_linking+set}" = set; then + enableval=$enable_static_linking; +fi + + +if test "$enable_static_linking" = "yes" +then + STATIC_START="-Xlinker -Bstatic" + STATIC_END="-Xlinker -Bdynamic -ldl" +else + STATIC_START="" + STATIC_END="" +fi + + + + # Check whether --enable-fhs was given. if test "${enable_fhs+set}" = set; then enableval=$enable_fhs; @@ -6961,7 +7082,7 @@ then fi -ac_config_files="$ac_config_files Makefile src/Makefile src/glib/Makefile src/gnet/Makefile src/gsmtp/Makefile src/gpop/Makefile src/main/Makefile src/win32/Makefile src/gui/Makefile lib/Makefile lib/gcc2.95/Makefile lib/msvc6.0/Makefile lib/sunpro5/Makefile bin/Makefile doc/Makefile etc/Makefile test/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile src/glib/Makefile src/gssl/Makefile src/gnet/Makefile src/gsmtp/Makefile src/gpop/Makefile src/main/Makefile src/win32/Makefile src/gui/Makefile lib/Makefile lib/gcc2.95/Makefile lib/msvc6.0/Makefile lib/sunpro5/Makefile bin/Makefile doc/Makefile etc/Makefile test/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -7566,6 +7687,7 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/glib/Makefile") CONFIG_FILES="$CONFIG_FILES src/glib/Makefile" ;; + "src/gssl/Makefile") CONFIG_FILES="$CONFIG_FILES src/gssl/Makefile" ;; "src/gnet/Makefile") CONFIG_FILES="$CONFIG_FILES src/gnet/Makefile" ;; "src/gsmtp/Makefile") CONFIG_FILES="$CONFIG_FILES src/gsmtp/Makefile" ;; "src/gpop/Makefile") CONFIG_FILES="$CONFIG_FILES src/gpop/Makefile" ;; @@ -7784,6 +7906,10 @@ QT_LIBS!$QT_LIBS$ac_delim MOC!$MOC$ac_delim GUI_TRUE!$GUI_TRUE$ac_delim GUI_FALSE!$GUI_FALSE$ac_delim +SSL_LIBS!$SSL_LIBS$ac_delim +SSL!$SSL$ac_delim +STATIC_START!$STATIC_START$ac_delim +STATIC_END!$STATIC_END$ac_delim e_docdir!$e_docdir$ac_delim e_initdir!$e_initdir$ac_delim e_spooldir!$e_spooldir$ac_delim @@ -7795,7 +7921,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 13; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 17; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.ac b/configure.ac index 440b2a4..4a0f626 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ dnl Process this file with autoconf to produce a configure script. dnl AC_INIT(src/gsmtp/gsmtp.h) -AM_INIT_AUTOMAKE(emailrelay,1.6) +AM_INIT_AUTOMAKE(emailrelay,1.7) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE @@ -107,6 +107,18 @@ dnl AC_ARG_WITH(man2html,AC_HELP_STRING([--with-man2html],[convert man pages to html using man2html (default auto)])) WITH_MAN2HTML +dnl === +dnl "--with-openssl" +dnl +AC_ARG_WITH(openssl,AC_HELP_STRING([--with-openssl],[use openssl for smtp client tls extension (default auto)])) +WITH_OPENSSL + +dnl === +dnl "--enable-static-linking" +dnl +AC_ARG_ENABLE(static-linking,AC_HELP_STRING([--enable-static-linking],[prefer static linking for some libraries (default no)])) +ENABLE_STATIC_LINKING + dnl === dnl directory tweaking and "--enable-fhs" ... dnl @@ -135,5 +147,5 @@ ENABLE_FHS dnl === dnl generate files... dnl -AC_OUTPUT(Makefile src/Makefile src/glib/Makefile src/gnet/Makefile src/gsmtp/Makefile src/gpop/Makefile src/main/Makefile src/win32/Makefile src/gui/Makefile lib/Makefile lib/gcc2.95/Makefile lib/msvc6.0/Makefile lib/sunpro5/Makefile bin/Makefile doc/Makefile etc/Makefile test/Makefile) +AC_OUTPUT(Makefile src/Makefile src/glib/Makefile src/gssl/Makefile src/gnet/Makefile src/gsmtp/Makefile src/gpop/Makefile src/main/Makefile src/win32/Makefile src/gui/Makefile lib/Makefile lib/gcc2.95/Makefile lib/msvc6.0/Makefile lib/sunpro5/Makefile bin/Makefile doc/Makefile etc/Makefile test/Makefile) diff --git a/doc/Makefile.am b/doc/Makefile.am index bda7a99..c129ea0 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -17,15 +17,15 @@ stylesheet=emailrelay.css txt_files=developer.txt reference.txt userguide.txt windows.txt -man_files_in=emailrelay.1 emailrelay-passwd.1 emailrelay-poke.1 emailrelay-submit.1 -man_files_out=emailrelay.1.gz emailrelay-passwd.1.gz emailrelay-poke.1.gz emailrelay-submit.1.gz +man_files_in=emailrelay.1 emailrelay-passwd.1 emailrelay-poke.1 emailrelay-submit.1 emailrelay-filter-copy.1 +man_files_out=emailrelay.1.gz emailrelay-passwd.1.gz emailrelay-poke.1.gz emailrelay-submit.1.gz emailrelay-filter-copy.1.gz html_files_in=doxygen_header.html html_files_thru=index.html emailrelay-man.html $(stylesheet) html_files_out=readme.html developer.html reference.html userguide.html windows.html changelog.html docbook_files_out=emailrelay.docbook png_files=gsmtp-classes.png gnet-classes.png sequence-3.png gnet-client.png gsmtp-serverprotocol.png auth.png -EXTRA_DIST = $(man_files_in) $(txt_files) $(html_files_in) $(html_files_thru) $(png_files) +EXTRA_DIST = $(man_files_in) $(txt_files) $(html_files_in) $(html_files_thru) $(png_files) doxygen_missing.html noinst_SCRIPTS = .dox .docbook man1_MANS = $(man_files_in) e_doc_DATA = $(txt_files) $(html_files_out) $(html_files_thru) $(png_files) $(docbook_files_out) @@ -38,6 +38,7 @@ converter_txt2mu=$(top_builddir)/bin/txt2mu.sh converter_mu2html=$(top_builddir)/bin/mu2html.sh converter_expand=$(top_builddir)/bin/expand.sh converter_mu2docbook=$(top_builddir)/bin/mu2docbook.sh +run_doxygen=$(top_builddir)/bin/doxygen.sh .txt.html: $(converter_html) -a "$(AWK)" $(top_srcdir)/doc/$*.txt $(stylesheet) > $*.html @@ -61,7 +62,7 @@ emailrelay.docbook: head.db tail.db userguide.db reference.db developer.db -xmlto -o docbook html emailrelay.docbook && touch .docbook && cp *.png docbook/ .dox: - if test "$(HAVE_DOXYGEN)" = "yes" ; then cat $(top_srcdir)/src/main/doxygen.cfg | sed "s:__TOP_SRC__:$(top_srcdir):g" | sed "s:__TOP_BUILD__:$(top_builddir):g" | doxygen - && touch .dox ; else echo no doxygen ; fi + $(run_doxygen) "$(HAVE_DOXYGEN)" "$(top_srcdir)" "$(top_builddir)" && touch .dox emailrelay-man.html: emailrelay.1 if test "$(HAVE_MAN2HTML)" = "yes" ; then man2html -r -L. emailrelay.1 < /dev/null > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; grep -v '^Content-type:' < emailrelay-man.html > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; fi @@ -85,6 +86,9 @@ emailrelay-passwd.1.gz : emailrelay-passwd.1 emailrelay-submit.1.gz : emailrelay-submit.1 if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-submit.1 > emailrelay-submit.1.gz ; fi +emailrelay-filter-copy.1.gz : emailrelay-filter-copy.1 + if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-filter-copy.1 > emailrelay-filter-copy.1.gz ; fi + emailrelay-poke.1.gz: emailrelay-poke.1 if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-poke.1 > emailrelay-poke.1.gz ; fi diff --git a/doc/Makefile.in b/doc/Makefile.in index 03f2c51..b483c11 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -117,6 +117,10 @@ QT_LIBS = @QT_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL = @SSL@ +SSL_LIBS = @SSL_LIBS@ +STATIC_END = @STATIC_END@ +STATIC_START = @STATIC_START@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -170,14 +174,14 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ stylesheet = emailrelay.css txt_files = developer.txt reference.txt userguide.txt windows.txt -man_files_in = emailrelay.1 emailrelay-passwd.1 emailrelay-poke.1 emailrelay-submit.1 -man_files_out = emailrelay.1.gz emailrelay-passwd.1.gz emailrelay-poke.1.gz emailrelay-submit.1.gz +man_files_in = emailrelay.1 emailrelay-passwd.1 emailrelay-poke.1 emailrelay-submit.1 emailrelay-filter-copy.1 +man_files_out = emailrelay.1.gz emailrelay-passwd.1.gz emailrelay-poke.1.gz emailrelay-submit.1.gz emailrelay-filter-copy.1.gz html_files_in = doxygen_header.html html_files_thru = index.html emailrelay-man.html $(stylesheet) html_files_out = readme.html developer.html reference.html userguide.html windows.html changelog.html docbook_files_out = emailrelay.docbook png_files = gsmtp-classes.png gnet-classes.png sequence-3.png gnet-client.png gsmtp-serverprotocol.png auth.png -EXTRA_DIST = $(man_files_in) $(txt_files) $(html_files_in) $(html_files_thru) $(png_files) +EXTRA_DIST = $(man_files_in) $(txt_files) $(html_files_in) $(html_files_thru) $(png_files) doxygen_missing.html noinst_SCRIPTS = .dox .docbook man1_MANS = $(man_files_in) e_doc_DATA = $(txt_files) $(html_files_out) $(html_files_thru) $(png_files) $(docbook_files_out) @@ -188,6 +192,7 @@ converter_txt2mu = $(top_builddir)/bin/txt2mu.sh converter_mu2html = $(top_builddir)/bin/mu2html.sh converter_expand = $(top_builddir)/bin/expand.sh converter_mu2docbook = $(top_builddir)/bin/mu2docbook.sh +run_doxygen = $(top_builddir)/bin/doxygen.sh all: all-am .SUFFIXES: @@ -442,7 +447,7 @@ emailrelay.docbook: head.db tail.db userguide.db reference.db developer.db -xmlto -o docbook html emailrelay.docbook && touch .docbook && cp *.png docbook/ .dox: - if test "$(HAVE_DOXYGEN)" = "yes" ; then cat $(top_srcdir)/src/main/doxygen.cfg | sed "s:__TOP_SRC__:$(top_srcdir):g" | sed "s:__TOP_BUILD__:$(top_builddir):g" | doxygen - && touch .dox ; else echo no doxygen ; fi + $(run_doxygen) "$(HAVE_DOXYGEN)" "$(top_srcdir)" "$(top_builddir)" && touch .dox emailrelay-man.html: emailrelay.1 if test "$(HAVE_MAN2HTML)" = "yes" ; then man2html -r -L. emailrelay.1 < /dev/null > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; grep -v '^Content-type:' < emailrelay-man.html > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; fi @@ -466,6 +471,9 @@ emailrelay-passwd.1.gz : emailrelay-passwd.1 emailrelay-submit.1.gz : emailrelay-submit.1 if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-submit.1 > emailrelay-submit.1.gz ; fi +emailrelay-filter-copy.1.gz : emailrelay-filter-copy.1 + if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-filter-copy.1 > emailrelay-filter-copy.1.gz ; fi + emailrelay-poke.1.gz: emailrelay-poke.1 if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-poke.1 > emailrelay-poke.1.gz ; fi diff --git a/doc/doxygen_missing.html b/doc/doxygen_missing.html new file mode 100644 index 0000000..7a40b5c --- /dev/null +++ b/doc/doxygen_missing.html @@ -0,0 +1,14 @@ + + + + E-MailRelay source code documentation missing + + + +
+

E-MailRelay Source Code

+

No doxygen documentation available locally, try online.

+
+ + + diff --git a/doc/emailrelay-filter-copy.1 b/doc/emailrelay-filter-copy.1 new file mode 100644 index 0000000..ee28814 --- /dev/null +++ b/doc/emailrelay-filter-copy.1 @@ -0,0 +1,42 @@ +.\" Copyright (C) 2001-2007 Graeme Walker +.\" +.\" This program is free software: you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation, either version 3 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program. If not, see . +.TH EMAILRELAY-FILTER-COPY 1 local +.SH NAME +emailrelay-filter-copy \- an E-MailRelay filter for pop-by-name +.SH SYNOPSIS +.B emailrelay-filter-copy +.I +.LP +.B emailrelay-filter-copy +[--help] +.SH DESCRIPTION +The +.I emailrelay-filter-copy +utility can be used as an +.B E-MailRelay +.I "--filter" +pre-processor program to copy e-mail messages from the main spool +directory into all available sub-directories. When using the +.I "--pop-by-name" +feature of the +.B E-MailRelay +server this results in messages being copied all POP clients. +.LP +Only the message envelope is copied; the content file stays in +the main directory. +.SH SEE ALSO +.BR emailrelay (1), +.SH AUTHOR +Graeme Walker, mailto:graeme_walker@users.sourceforge.net diff --git a/doc/emailrelay-man.html b/doc/emailrelay-man.html index bec5c73..10b7350 100644 --- a/doc/emailrelay-man.html +++ b/doc/emailrelay-man.html @@ -95,15 +95,19 @@ Runs as a server: equivalent to --log --close-stderr.
-C, --client-auth <file>
-Enables smtp authentication with remote server, using the given secrets file. +Enables smtp authentication with the remote server, using the given secrets file.
-Y, --client-filter <program>
Specifies an external program to process messages when they are forwarded. +
-j, --client-tls + +
+Enables tls/ssl layer for smtp client (if openssl built in).
-e, --close-stderr
-Closes the standard error stream after start-up. +Closes the standard error stream soon after start-up.
-U, --connection-timeout <time>
@@ -127,7 +131,7 @@ Specifies an external program to process messages as they are stored.
-W, --filter-timeout <time>
-Sets the timeout (in seconds) for running the --filter processor. +Sets the timeout (in seconds) for running the --filter processor (default is 300).
-f, --forward
@@ -147,7 +151,7 @@ Enables immediate forwarding of messages as soon as they are received (requires
-I, --interface <ip-address>
-Defines the listening interface for new connections. +Defines the listening interface for incoming connections.
-l, --log
@@ -179,7 +183,7 @@ Enables polling of the spool directory for messages to be forwarded with the spe
-B, --pop
-Enables the pop server if compiled-in. +Enables the pop server.
-F, --pop-auth <file>
@@ -216,6 +220,10 @@ Sets the response timeout (in seconds) when talking to a remote server (default
Enables authentication of remote clients, using the given secrets file. +
-K, --server-tls <pem-file> + +
+Enables tls/ssl layer for smtp server using the given openssl certificate file (if openssl built in).
-s, --spool-dir <dir>
@@ -223,7 +231,7 @@ Specifies the spool directory (default is /var/spool/emailrelay).
-k, --syslog
-Force syslog output if logging is enabled (overrides --no-syslog). +Forces syslog output if logging is enabled (overrides --no-syslog).
-u, --user <username>
@@ -372,7 +380,7 @@ Graeme Walker, mailto:graem This document was created by man2html, using the manual pages.
-Time: 16:32:15 GMT, August 27, 2007 +Time: 00:56:15 GMT, September 19, 2007 diff --git a/doc/emailrelay.1 b/doc/emailrelay.1 index 2f5d5e2..baad3c6 100644 --- a/doc/emailrelay.1 +++ b/doc/emailrelay.1 @@ -71,13 +71,16 @@ Runs as a proxy: equivalent to \fI--log\fR \fI--close-stderr\fR \fI--immediate\f Runs as a server: equivalent to \fI--log\fR \fI--close-stderr\fR. .TP .B \-C, --client-auth \fI\fR -Enables smtp authentication with remote server, using the given secrets file. +Enables smtp authentication with the remote server, using the given secrets file. .TP .B \-Y, --client-filter \fI\fR Specifies an external program to process messages when they are forwarded. .TP +.B \-j, --client-tls +Enables tls/ssl layer for smtp client (if openssl built in). +.TP .B \-e, --close-stderr -Closes the standard error stream after start-up. +Closes the standard error stream soon after start-up. .TP .B \-U, --connection-timeout \fI