From b425cc8444de4cef2f04bc1d6e8ed41c22d35a98 Mon Sep 17 00:00:00 2001 From: nynex Date: Wed, 13 May 2015 15:08:13 +0000 Subject: [PATCH] add mail packages --- trunk/package/mail/alpine/Makefile | 123 ++ .../100-no-openssl-check-cross-compile.patch | 29 + trunk/package/mail/bogofilter/Makefile | 58 + .../mail/bogofilter/files/postfix-bogofilter | 34 + trunk/package/mail/dovecot/Makefile | 98 ++ trunk/package/mail/dovecot/files/dovecot.init | 16 + .../dovecot/patches/001-configure_in.patch | 31 + trunk/package/mail/exim4/Makefile | 65 + trunk/package/mail/exim4/files/Makefile | 1336 +++++++++++++++++ trunk/package/mail/exim4/files/exim.init | 23 + .../exim4/patches/001-Makefile-Base.patch | 13 + trunk/package/mail/fdm/Config.in | 10 + trunk/package/mail/fdm/Makefile | 86 ++ trunk/package/mail/fdm/files/etc/fdm.conf | 36 + .../mail/fdm/patches/001-base64-fix.patch | 14 + .../mail/fdm/patches/002-base64-fix.patch | 20 + trunk/package/mail/fdm/src/compat/b64_ntop.c | 183 +++ trunk/package/mail/fdm/src/compat/b64_pton.c | 393 +++++ trunk/package/mail/mailman/Makefile | 126 ++ trunk/package/mail/mailman/files/mailman.init | 22 + .../mail/mailman/patches/100-postfix.patch | 12 + .../mailman/patches/200-nohostdnspython.patch | 68 + .../mailman/patches/300-targetpython.patch | 12 + .../mail/mailman/patches/400-modules.patch | 35 + trunk/package/mail/mailsend/Makefile | 73 + trunk/package/mail/msmtp/Makefile | 141 ++ trunk/package/mail/nail/Makefile | 59 + .../100-handle-openssl-without-sslv2.patch | 16 + trunk/package/mail/postfix/Makefile | 243 +++ .../mail/postfix/files/main.cf.default | 840 +++++++++++ trunk/package/mail/postfix/files/postfix.init | 64 + .../mail/postfix/patches/100-fsstat.patch | 12 + .../mail/postfix/patches/200-manpages.patch | 80 + .../patches/300-bdb_hash_segfault.patch | 14 + .../mail/postfix/patches/400-cdb.patch | 14 + .../postfix/patches/500-crosscompile.patch | 27 + .../mail/postfix/patches/600-nopostconf.patch | 44 + .../postfix/patches/700-defaultconfig.patch | 93 ++ .../mail/postfix/patches/800-fmt.patch | 12 + trunk/package/mail/ssmtp/Makefile | 64 + .../mail/ssmtp/patches/002-fix_pointer.patch | 466 ++++++ 41 files changed, 5105 insertions(+) create mode 100644 trunk/package/mail/alpine/Makefile create mode 100644 trunk/package/mail/alpine/patches/100-no-openssl-check-cross-compile.patch create mode 100644 trunk/package/mail/bogofilter/Makefile create mode 100755 trunk/package/mail/bogofilter/files/postfix-bogofilter create mode 100644 trunk/package/mail/dovecot/Makefile create mode 100644 trunk/package/mail/dovecot/files/dovecot.init create mode 100644 trunk/package/mail/dovecot/patches/001-configure_in.patch create mode 100644 trunk/package/mail/exim4/Makefile create mode 100644 trunk/package/mail/exim4/files/Makefile create mode 100644 trunk/package/mail/exim4/files/exim.init create mode 100644 trunk/package/mail/exim4/patches/001-Makefile-Base.patch create mode 100644 trunk/package/mail/fdm/Config.in create mode 100644 trunk/package/mail/fdm/Makefile create mode 100644 trunk/package/mail/fdm/files/etc/fdm.conf create mode 100644 trunk/package/mail/fdm/patches/001-base64-fix.patch create mode 100644 trunk/package/mail/fdm/patches/002-base64-fix.patch create mode 100644 trunk/package/mail/fdm/src/compat/b64_ntop.c create mode 100644 trunk/package/mail/fdm/src/compat/b64_pton.c create mode 100644 trunk/package/mail/mailman/Makefile create mode 100644 trunk/package/mail/mailman/files/mailman.init create mode 100644 trunk/package/mail/mailman/patches/100-postfix.patch create mode 100644 trunk/package/mail/mailman/patches/200-nohostdnspython.patch create mode 100644 trunk/package/mail/mailman/patches/300-targetpython.patch create mode 100644 trunk/package/mail/mailman/patches/400-modules.patch create mode 100644 trunk/package/mail/mailsend/Makefile create mode 100644 trunk/package/mail/msmtp/Makefile create mode 100644 trunk/package/mail/nail/Makefile create mode 100644 trunk/package/mail/nail/patches/100-handle-openssl-without-sslv2.patch create mode 100644 trunk/package/mail/postfix/Makefile create mode 100644 trunk/package/mail/postfix/files/main.cf.default create mode 100644 trunk/package/mail/postfix/files/postfix.init create mode 100644 trunk/package/mail/postfix/patches/100-fsstat.patch create mode 100644 trunk/package/mail/postfix/patches/200-manpages.patch create mode 100644 trunk/package/mail/postfix/patches/300-bdb_hash_segfault.patch create mode 100644 trunk/package/mail/postfix/patches/400-cdb.patch create mode 100644 trunk/package/mail/postfix/patches/500-crosscompile.patch create mode 100644 trunk/package/mail/postfix/patches/600-nopostconf.patch create mode 100644 trunk/package/mail/postfix/patches/700-defaultconfig.patch create mode 100644 trunk/package/mail/postfix/patches/800-fmt.patch create mode 100644 trunk/package/mail/ssmtp/Makefile create mode 100644 trunk/package/mail/ssmtp/patches/002-fix_pointer.patch diff --git a/trunk/package/mail/alpine/Makefile b/trunk/package/mail/alpine/Makefile new file mode 100644 index 00000000..322e954b --- /dev/null +++ b/trunk/package/mail/alpine/Makefile @@ -0,0 +1,123 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=alpine +PKG_VERSION:=2.20 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://patches.freeiz.com/alpine/release/src/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MD5SUM:=043b67666af73b26f9627ad97e2aaf92 + +PKG_MAINTAINER:=Antti Seppälä +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +PKG_INSTALL:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/alpine/Default + SECTION:=mail + CATEGORY:=Mail + DEPENDS:=+libopenssl +libncurses +libpthread +libpam $(ICONV_DEPENDS) $(INTL_DEPENDS) + TITLE:=Alternatively Licensed Program for Internet News and Email + URL:=http://www.washington.edu/alpine +endef + +define Package/alpine/Default/description + Alpine (Alternatively Licenced Program for Internet News and Email) is a + free software email client developed at the University of Washington. + It is suitable for both the inexperienced email user as well as for + the most demanding power user. +endef + +define Package/alpine +$(call Package/alpine/Default) + TITLE+= (with OpenSSL support) + DEPENDS+= +libcrypto +libopenssl + VARIANT:=ssl +endef + +define Package/alpine/description +$(call Package/alpine/Default/description) + This package is built with OpenSSL support. +endef + +define Package/alpine-nossl +$(call Package/alpine/Default) + TITLE+= (without OpenSSL support) + VARIANT:=nossl +endef + +define Package/alpine-nossl/description +$(call Package/alpine/Default/description) + This package is built without OpenSSL support. +endef + +CONFIGURE_ARGS += \ + --with-libiconv-prefix=$(ICONV_PREFIX) \ + --with-libintl-prefix=$(INTL_PREFIX) \ + --without-tcl \ + --without-ldap \ + --without-krb5 \ + --with-system-pinerc=/etc/pine.conf \ + --with-system-fixed-pinerc=/etc/pine.conf.fixed \ + --with-supplied-regex \ + --with-default-sshpath=/usr/bin/ssh \ + --disable-debug \ + --disable-mouse \ + --with-c-client-target=slx \ + +CONFIGURE_VARS += \ + top_builddir=$(PKG_BUILD_DIR) + +ifeq ($(BUILD_VARIANT),ssl) + CONFIGURE_ARGS += \ + --with-ssl-include-dir=$(STAGING_DIR)/usr/include/openssl/. \ + --with-ssl-lib-dir=$(STAGING_DIR)/usr/lib +endif + +ifeq ($(BUILD_VARIANT),nossl) + CONFIGURE_ARGS += \ + --without-ssl +endif + +ifeq ($(CONFIG_BUILD_NLS),y) + DISABLE_NLS:= +endif + +ifeq ($(CONFIG_IPV6),y) + DISABLE_IPV6:= +else + DISABLE_IPV6:=--without-ipv6 +endif + +define Build/Compile + ( cd $(PKG_BUILD_DIR)/pith ; \ + $(HOSTCC) help_h_gen.c -c -o help_h_gen.o ; \ + $(HOSTCC) help_h_gen.o -o help_h_gen ; \ + $(HOSTCC) help_c_gen.c -c -o help_c_gen.o ; \ + $(HOSTCC) help_c_gen.o -o help_c_gen ; \ + ) + $(call Build/Compile/Default) +endef + +define Package/alpine/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME) +endef + +Package/alpine-nossl/install = $(Package/alpine/install) + +$(eval $(call BuildPackage,alpine)) +$(eval $(call BuildPackage,alpine-nossl)) diff --git a/trunk/package/mail/alpine/patches/100-no-openssl-check-cross-compile.patch b/trunk/package/mail/alpine/patches/100-no-openssl-check-cross-compile.patch new file mode 100644 index 00000000..40430986 --- /dev/null +++ b/trunk/package/mail/alpine/patches/100-no-openssl-check-cross-compile.patch @@ -0,0 +1,29 @@ +diff -Nru alpine-2.20-orig/configure alpine-2.20/configure +--- alpine-2.20-orig/configure 2015-01-18 09:00:42.100645053 +0200 ++++ alpine-2.20/configure 2015-01-25 12:01:11.831015443 +0200 +@@ -17643,10 +17643,8 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Openssl library version >= 1.0.1c" >&5 + $as_echo_n "checking Openssl library version >= 1.0.1c... " >&6; } + if test "$cross_compiling" = yes; then : +- { { $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 test program while cross compiling +-See \`config.log' for more details" "$LINENO" 5; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5 ++$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;} + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +diff -Nru alpine-2.20-orig/configure.ac alpine-2.20/configure.ac +--- alpine-2.20-orig/configure.ac 2015-01-18 08:38:08.893495949 +0200 ++++ alpine-2.20/configure.ac 2015-01-25 12:01:02.773015236 +0200 +@@ -1370,7 +1370,8 @@ + } + ]])], + [ AC_MSG_RESULT(yes) ], +- [ alpine_SSLTYPE="none" ]) ++ [ alpine_SSLTYPE="none" ], ++ [ AC_MSG_WARN([cross compiling: not checking])]) + + if test "x$alpine_SSLTYPE" = "xnone" ; then + AC_MSG_ERROR(Install openssl version >= 1.0.1c) diff --git a/trunk/package/mail/bogofilter/Makefile b/trunk/package/mail/bogofilter/Makefile new file mode 100644 index 00000000..d31dfa8c --- /dev/null +++ b/trunk/package/mail/bogofilter/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bogofilter +PKG_VERSION:=1.2.4 +PKG_RELEASE:=3 + +PKG_LICENSE:=GPLv2 +PKG_LICENSE_FILES:=COPYING + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/bogofilter +PKG_MD5SUM:=d0a5eebb3274b23ceabe766a6443a1c5 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/bogofilter + SECTION:=mail + CATEGORY:=Mail + DEPENDS:=+libdb47 + TITLE:=bogofilter + MAINTAINER:=W. Michael Petullo + URL:=http://bogofilter.sourceforge.net/ +endef + +define Package/bogofilter/description + Bogofilter is a fast Bayesian spam filter +endef + +CONFIGURE_ARGS += \ + --disable-unicode \ + --with-libdb-prefix=$(STAGING_DIR) \ + --with-included-gsl + +define Package/bogofilter/install + $(INSTALL_DIR) $(1)/etc/ \ + $(1)/usr/bin \ + $(1)/usr/sbin + $(INSTALL_CONF) $(PKG_BUILD_DIR)/bogofilter.cf.example $(1)/etc/bogofilter.cf + $(INSTALL_BIN) ./files/postfix-bogofilter $(1)/usr/sbin/postfix-bogofilter + $(CP) $(PKG_INSTALL_DIR)/usr/bin/bf_compact $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/bf_copy $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/bf_tar $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/bogofilter $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/bogolexer $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/bogotune $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/bogoutil $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,bogofilter)) diff --git a/trunk/package/mail/bogofilter/files/postfix-bogofilter b/trunk/package/mail/bogofilter/files/postfix-bogofilter new file mode 100755 index 00000000..952d8cda --- /dev/null +++ b/trunk/package/mail/bogofilter/files/postfix-bogofilter @@ -0,0 +1,34 @@ +#!/bin/sh + +FILTER=/usr/bin/bogofilter +FILTER_DIR=/mnt/sda1/var/spool/bogofilter +# WARNING! The -i is crucial, else you may see +# messages truncated at the first period that is alone on a line +# (which can happen with several kinds of messages, particularly +# quoted-printable) +# -G is ignored before Postfix 2.3 and tells it that the message +# does not originate on the local system (Gateway submission), +# so Postfix avoids some of the local expansions that can leave +# misleading traces in headers, such as local address +# canonicalizations. +POSTFIX="/usr/sbin/sendmail -G -i" +export BOGOFILTER_DIR=/etc/bogofilter + +# Exit codes from +EX_TEMPFAIL=75 +EX_UNAVAILABLE=69 + +cd $FILTER_DIR || \ + { echo $FILTER_DIR does not exist; exit $EX_TEMPFAIL; } + +# Clean up when done or when aborting. +trap "rm -f msg.$$ ; exit $EX_TEMPFAIL" 0 1 2 3 15 + +# bogofilter -e returns: 0 for OK, nonzero for error +rm -f msg.$$ || exit $EX_TEMPFAIL +$FILTER -p -e > msg.$$ || exit $EX_TEMPFAIL + +exec + URL:=http://www.dovecot.org/ + USERID:=dovecot=59:dovecot=59 +endef + +define Package/dovecot/description + Dovecot is a program which provides POP3 and IMAP services. +endef + +define Package/dovecot/config + menu "Select dovecot build options" + depends on PACKAGE_dovecot + config DOVECOT_LDAP + bool "LDAP support" + default n + help + Implements LDAP support in dovecot. + endmenu +endef + +CONFIGURE_ARGS += \ + --without-gssapi \ + --without-pam \ + --with-moduledir=/usr/lib/dovecot/modules \ + --with-notify=dnotify \ + --without-lzma \ + --without-lz4 + +ifneq ($(strip $(CONFIG_DOVECOT_LDAP)),) + CONFIGURE_ARGS+= \ + --with-ldap=yes +else + CONFIGURE_ARGS+= \ + --with-ldap=no +endif + +CONFIGURE_VARS += \ + RPCGEN= \ + i_cv_signed_size_t=no \ + i_cv_signed_time_t=no \ + i_cv_gmtime_max_time_t=32 \ + i_cv_mmap_plays_with_write=yes \ + i_cv_fd_passing=yes \ + i_cv_c99_vsnprintf=yes \ + lib_cv_va_copy=yes \ + lib_cv_va_copy=yes \ + lib_cv___va_copy=yes \ + lib_cv_va_val_copy=yes + +define Package/dovecot/install + $(INSTALL_DIR) $(1)/etc/init.d \ + $(1)/etc/dovecot \ + $(1)/usr/share/doc/dovecot/example-config \ + $(1)/usr/lib/dovecot \ + $(1)/usr/bin \ + $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/example-config + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot + rm $(1)/usr/lib/dovecot/dovecot-config + find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm +endef + +$(eval $(call BuildPackage,dovecot)) diff --git a/trunk/package/mail/dovecot/files/dovecot.init b/trunk/package/mail/dovecot/files/dovecot.init new file mode 100644 index 00000000..1f831842 --- /dev/null +++ b/trunk/package/mail/dovecot/files/dovecot.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2013 OpenWrt.org + +START=75 +STOP=75 + +USE_PROCD=1 + +start_service() { + mkdir -p -m 0755 /var/lib/dovecot + mkdir -p -m 0755 /var/run/dovecot + chmod 0750 /var/lib/dovecot + procd_open_instance + procd_set_param command /usr/sbin/dovecot -F + procd_close_instance +} diff --git a/trunk/package/mail/dovecot/patches/001-configure_in.patch b/trunk/package/mail/dovecot/patches/001-configure_in.patch new file mode 100644 index 00000000..70642d64 --- /dev/null +++ b/trunk/package/mail/dovecot/patches/001-configure_in.patch @@ -0,0 +1,31 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -504,9 +504,9 @@ have_ioloop=no + + if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then + AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[ +- AC_TRY_RUN([ ++ AC_TRY_LINK([ + #include +- ++ ], [ + int main() + { + return epoll_create(5) < 1; +@@ -639,7 +639,7 @@ fi + dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it. + dnl * It may also be broken in AIX. + AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[ +- AC_TRY_RUN([ ++ AC_TRY_LINK([ + #define _XOPEN_SOURCE 600 + #include + #include +@@ -648,6 +648,7 @@ AC_CACHE_CHECK([whether posix_fallocate( + #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7) + possibly broken posix_fallocate + #endif ++ ], [ + int main() { + int fd = creat("conftest.temp", 0600); + int ret; diff --git a/trunk/package/mail/exim4/Makefile b/trunk/package/mail/exim4/Makefile new file mode 100644 index 00000000..1dc25033 --- /dev/null +++ b/trunk/package/mail/exim4/Makefile @@ -0,0 +1,65 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=exim4 +PKG_VERSION:=4.85 +PKG_RELEASE:=1 + +PKG_SOURCE:=exim-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://mirror.switch.ch/ftp/mirror/exim/exim/exim4/ +PKG_MD5SUM:=56c1840a1491e03b3bff25855de3c17c + +PKG_BUILD_DIR:=$(BUILD_DIR)/exim-$(PKG_VERSION) + +CC="$(TARGET_CC)" + +include $(INCLUDE_DIR)/package.mk + +define Package/exim4 + SECTION:=mail + CATEGORY:=Mail + TITLE:=Exim Internet Mailer Version 4 + DEPENDS:=+libdb47 +libiconv +libpcre +@CCACHE + URL:=http://www.exim.org/ +endef + +define Package/exim4/description + Exim is a mail transfer agent used on Unix-like operating systems. + Exim is free software distributed under the terms of the GNU General Public + License, and it aims to be a general and flexible mailer with extensive + facilities for checking incoming e-mail. +endef + +define Build/Configure + cp ./files/Makefile $(PKG_BUILD_DIR)/Local/Makefile +endef + +define Build/Compile + cd $(PKG_BUILD_DIR) && EXIM_ARCHTYPE=i386 make +endef + +define Package/exim4/install + $(INSTALL_DIR) $(1)/usr/exim/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exim $(1)/usr/exim/bin/exim + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exim_dumpdb $(1)/usr/exim/bin/exim_dumpdb + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exim_fixdb $(1)/usr/exim/bin/exim_fixdb + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exim_tidydb $(1)/usr/exim/bin/exim_tidydb + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exinext $(1)/usr/exim/bin/exinext + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exiwhat $(1)/usr/exim/bin/exiwhat + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exim_dbmbuild $(1)/usr/exim/bin/exim_dbmbuild + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exicyclog $(1)/usr/exim/bin/exicyclog + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exigrep $(1)/usr/exim/bin/exigrep + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/eximstats $(1)/usr/exim/bin/eximstats + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exipick $(1)/usr/exim/bin/exipick + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exiqgrep $(1)/usr/exim/bin/exiqgrep + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exiqsumm $(1)/usr/exim/bin/exiqsumm + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exim_lock $(1)/usr/exim/bin/exim_lock + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exim_checkaccess $(1)/usr/exim/bin/exim_checkaccess + + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-i386/exim $(1)/usr/sbin/exim4 + + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/exim.init $(1)/etc/init.d/exim +endef + +$(eval $(call BuildPackage,exim4)) diff --git a/trunk/package/mail/exim4/files/Makefile b/trunk/package/mail/exim4/files/Makefile new file mode 100644 index 00000000..bc747f05 --- /dev/null +++ b/trunk/package/mail/exim4/files/Makefile @@ -0,0 +1,1336 @@ +################################################## +# The Exim mail transport agent # +################################################## + +# This is the template for Exim's main build-time configuration file. It +# contains settings that are independent of any operating system. These are +# things that are mostly sysadmin choices. The items below are divided into +# those you must specify, those you probably want to specify, those you might +# often want to specify, and those that you almost never need to mention. + +# Edit this file and save the result to a file called Local/Makefile within the +# Exim distribution directory before running the "make" command. + +# Things that depend on the operating system have default settings in +# OS/Makefile-Default, but these are overridden for some OS by files called +# called OS/Makefile-. You can further override these by creating files +# called Local/Makefile-, where "" stands for the name of your +# operating system - look at the names in the OS directory to see which names +# are recognized. + +# However, if you are building Exim for a single OS only, you don't need to +# worry about setting up Local/Makefile-. Any build-time configuration +# settings you require can in fact be placed in the one file called +# Local/Makefile. It is only if you are building for several OS from the same +# source files that you need to worry about splitting off your own OS-dependent +# settings into separate files. (There's more explanation about how this all +# works in the toplevel README file, under "Modifying the building process", as +# well as in the Exim specification.) + +# One OS-specific thing that may need to be changed is the command for running +# the C compiler; the overall default is gcc, but some OS Makefiles specify cc. +# You can override anything that is set by putting CC=whatever in your +# Local/Makefile. +CC=ccache_cc + +# NOTE: You should never need to edit any of the distributed Makefiles; all +# overriding can be done in your Local/Makefile(s). This will make it easier +# for you when the next release comes along. + +# The location of the X11 libraries is something else that is quite variable +# even between different versions of the same operating system (and indeed +# there are different versions of X11 as well, of course). The four settings +# concerned here are X11, XINCLUDE, XLFLAGS (linking flags) and X11_LD_LIB +# (dynamic run-time library). You need not worry about X11 unless you want to +# compile the Exim monitor utility. Exim itself does not use X11. + +# Another area of variability between systems is the type and location of the +# DBM library package. Exim has support for ndbm, gdbm, tdb, and Berkeley DB. +# By default the code assumes ndbm; this often works with gdbm or DB, provided +# they are correctly installed, via their compatibility interfaces. However, +# Exim can also be configured to use the native calls for Berkeley DB (obsolete +# versions 1.85, 2.x, 3.x, or the current 4.x version) and also for gdbm. + +# For some operating systems, a default DBM library (other than ndbm) is +# selected by a setting in the OS-specific Makefile. Most modern OS now have +# a DBM library installed as standard, and in many cases this will be selected +# for you by the OS-specific configuration. If Exim compiles without any +# problems, you probably do not have to worry about the DBM library. If you +# do want or need to change it, you should first read the discussion in the +# file doc/dbm.discuss.txt, which also contains instructions for testing Exim's +# interface to the DBM library. + +# In Local/Makefiles blank lines and lines starting with # are ignored. It is +# also permitted to use the # character to add a comment to a setting, for +# example +# +# EXIM_GID=42 # the "mail" group +# +# However, with some versions of "make" this works only if there is no white +# space between the end of the setting and the #, so perhaps it is best +# avoided. A consequence of this facility is that it is not possible to have +# the # character present in any setting, but I can't think of any cases where +# this would be wanted. +############################################################################### + + + +############################################################################### +# THESE ARE THINGS YOU MUST SPECIFY # +############################################################################### + +# Exim will not build unless you specify BIN_DIRECTORY, CONFIGURE_FILE, and +# EXIM_USER. You also need EXIM_GROUP if EXIM_USER specifies a uid by number. + +# If you don't specify SPOOL_DIRECTORY, Exim won't fail to build. However, it +# really is a very good idea to specify it here rather than at run time. This +# is particularly true if you let the logs go to their default location in the +# spool directory, because it means that the location of the logs is known +# before Exim has read the run time configuration file. + +#------------------------------------------------------------------------------ +# BIN_DIRECTORY defines where the exim binary will be installed by "make +# install". The path is also used internally by Exim when it needs to re-invoke +# itself, either to send an error message, or to recover root privilege. Exim's +# utility binaries and scripts are also installed in this directory. There is +# no "standard" place for the binary directory. Some people like to keep all +# the Exim files under one directory such as /usr/exim; others just let the +# Exim binaries go into an existing directory such as /usr/sbin or +# /usr/local/sbin. The installation script will try to create this directory, +# and any superior directories, if they do not exist. + +BIN_DIRECTORY=/usr/exim/bin + + +#------------------------------------------------------------------------------ +# CONFIGURE_FILE defines where Exim's run time configuration file is to be +# found. It is the complete pathname for the file, not just a directory. The +# location of all other run time files and directories can be changed in the +# run time configuration file. There is a lot of variety in the choice of +# location in different OS, and in the preferences of different sysadmins. Some +# common locations are in /etc or /etc/mail or /usr/local/etc or +# /usr/local/etc/mail. Another possibility is to keep all the Exim files under +# a single directory such as /usr/exim. Whatever you choose, the installation +# script will try to make the directory and any superior directories if they +# don't exist. It will also install a default runtime configuration if this +# file does not exist. + +CONFIGURE_FILE=/usr/exim/configure + +# It is possible to specify a colon-separated list of files for CONFIGURE_FILE. +# In this case, Exim will use the first of them that exists when it is run. +# However, if a list is specified, the installation script no longer tries to +# make superior directories or to install a default runtime configuration. + + +#------------------------------------------------------------------------------ +# The Exim binary must normally be setuid root, so that it starts executing as +# root, but (depending on the options with which it is called) it does not +# always need to retain the root privilege. These settings define the user and +# group that is used for Exim processes when they no longer need to be root. In +# particular, this applies when receiving messages and when doing remote +# deliveries. (Local deliveries run as various non-root users, typically as the +# owner of a local mailbox.) Specifying these values as root is not supported. + +EXIM_USER=110 + +# If you specify EXIM_USER as a name, this is looked up at build time, and the +# uid number is built into the binary. However, you can specify that this +# lookup is deferred until runtime. In this case, it is the name that is built +# into the binary. You can do this by a setting of the form: + +# EXIM_USER=ref:exim + +# In other words, put "ref:" in front of the user name. If you set EXIM_USER +# like this, any value specified for EXIM_GROUP is also passed "by reference". +# Although this costs a bit of resource at runtime, it is convenient to use +# this feature when building binaries that are to be run on multiple systems +# where the name may refer to different uids. It also allows you to build Exim +# on a system where there is no Exim user defined. + +# If the setting of EXIM_USER is numeric (e.g. EXIM_USER=42), there must +# also be a setting of EXIM_GROUP. If, on the other hand, you use a name +# for EXIM_USER (e.g. EXIM_USER=exim), you don't need to set EXIM_GROUP unless +# you want to use a group other than the default group for the given user. + +EXIM_GROUP=110 + +# Many sites define a user called "exim", with an appropriate default group, +# and use +# +# EXIM_USER=exim +# +# while leaving EXIM_GROUP unspecified (commented out). + + +#------------------------------------------------------------------------------ +# SPOOL_DIRECTORY defines the directory where all the data for messages in +# transit is kept. It is strongly recommended that you define it here, though +# it is possible to leave this till the run time configuration. + +# Exim creates the spool directory if it does not exist. The owner and group +# will be those defined by EXIM_USER and EXIM_GROUP, and this also applies to +# all the files and directories that are created in the spool directory. + +# Almost all installations choose this: + +#TODO +SPOOL_DIRECTORY=/var/spool/exim + + + +############################################################################### +# THESE ARE THINGS YOU PROBABLY WANT TO SPECIFY # +############################################################################### + +# If you need extra header file search paths on all compiles, put the -I +# options in INCLUDE. If you want the extra searches only for certain +# parts of the build, see more specific xxx_INCLUDE variables below. + +# INCLUDE=-I/example/include + +# You need to specify some routers and transports if you want the Exim that you +# are building to be capable of delivering mail. You almost certainly need at +# least one type of lookup. You should consider whether you want to build +# the Exim monitor or not. + + +#------------------------------------------------------------------------------ +# These settings determine which individual router drivers are included in the +# Exim binary. There are no defaults in the code; those routers that are wanted +# must be defined here by setting the appropriate variables to the value "yes". +# Including a router in the binary does not cause it to be used automatically. +# It has also to be configured in the run time configuration file. By +# commenting out those you know you don't want to use, you can make the binary +# a bit smaller. If you are unsure, leave all of these included for now. + +ROUTER_ACCEPT=yes +ROUTER_DNSLOOKUP=yes +ROUTER_IPLITERAL=yes +ROUTER_MANUALROUTE=yes +ROUTER_QUERYPROGRAM=yes +ROUTER_REDIRECT=yes + +# This one is very special-purpose, so is not included by default. + +# ROUTER_IPLOOKUP=yes + + +#------------------------------------------------------------------------------ +# These settings determine which individual transport drivers are included in +# the Exim binary. There are no defaults; those transports that are wanted must +# be defined here by setting the appropriate variables to the value "yes". +# Including a transport in the binary does not cause it to be used +# automatically. It has also to be configured in the run time configuration +# file. By commenting out those you know you don't want to use, you can make +# the binary a bit smaller. If you are unsure, leave all of these included for +# now. + +TRANSPORT_APPENDFILE=yes +TRANSPORT_AUTOREPLY=yes +TRANSPORT_PIPE=yes +TRANSPORT_SMTP=yes + +# This one is special-purpose, and commonly not required, so it is not +# included by default. + +# TRANSPORT_LMTP=yes + + +#------------------------------------------------------------------------------ +# The appendfile transport can write messages to local mailboxes in a number +# of formats. The code for three specialist formats, maildir, mailstore, and +# MBX, is included only when requested. If you do not know what this is about, +# leave these settings commented out. + +SUPPORT_MAILDIR=yes +# SUPPORT_MAILSTORE=yes +# SUPPORT_MBX=yes + + +#------------------------------------------------------------------------------ +# See below for dynamic lookup modules. +# +# If not using package management but using this anyway, then think about how +# you perform upgrades and revert them. You should consider the benefit of +# embedding the Exim version number into LOOKUP_MODULE_DIR, so that you can +# maintain two concurrent sets of modules. +# +# *BEWARE*: ability to modify the files in LOOKUP_MODULE_DIR is equivalent to +# the ability to modify the Exim binary, which is often setuid root! The Exim +# developers only intend this functionality be used by OS software packagers +# and we suggest that such packagings' integrity checks should be paranoid +# about the permissions of the directory and the files within. + +# LOOKUP_MODULE_DIR=/usr/lib/exim/lookups/ + +# To build a module dynamically, you'll need to define CFLAGS_DYNAMIC for +# your platform. Eg: +# CFLAGS_DYNAMIC=-shared -rdynamic +# CFLAGS_DYNAMIC=-shared -rdynamic -fPIC + +#------------------------------------------------------------------------------ +# These settings determine which file and database lookup methods are included +# in the binary. See the manual chapter entitled "File and database lookups" +# for discussion. DBM and lsearch (linear search) are included by default. If +# you are unsure about the others, leave them commented out for now. +# LOOKUP_DNSDB does *not* refer to general mail routing using the DNS. It is +# for the specialist case of using the DNS as a general database facility (not +# common). +# If set to "2" instead of "yes" then the corresponding lookup will be +# built as a module and must be installed into LOOKUP_MODULE_DIR. You need to +# add -export-dynamic -rdynamic to EXTRALIBS. You may also need to add -ldl to +# EXTRALIBS so that dlopen() is available to Exim. You need to define +# LOOKUP_MODULE_DIR above so the exim binary actually loads dynamic lookup +# modules. +# Also, instead of adding all the libraries/includes to LOOKUP_INCLUDE and +# LOOKUP_LIBS, add them to the respective LOOKUP_*_INCLUDE and LOOKUP_*_LIBS +# (where * is the name as given here in this list). That ensures that only +# the dynamic library and not the exim binary will be linked against the +# library. +# NOTE: LDAP cannot be built as a module! +# +# If your system has pkg-config then the _INCLUDE/_LIBS setting can be +# handled for you automatically by also defining the _PC variable to reference +# the name of the pkg-config package, if such is available. + +LOOKUP_DBM=no +LOOKUP_LSEARCH=yes +LOOKUP_DNSDB=yes + +# LOOKUP_CDB=yes +# LOOKUP_DSEARCH=yes +# LOOKUP_IBASE=yes +# LOOKUP_LDAP=yes +# LOOKUP_MYSQL=yes +# LOOKUP_NIS=yes +# LOOKUP_NISPLUS=yes +# LOOKUP_ORACLE=yes +# LOOKUP_PASSWD=yes +# LOOKUP_PGSQL=yes +# LOOKUP_SQLITE=yes +# LOOKUP_SQLITE_PC=sqlite3 +# LOOKUP_WHOSON=yes + +# These two settings are obsolete; all three lookups are compiled when +# LOOKUP_LSEARCH is enabled. However, we retain these for backward +# compatibility. Setting one forces LOOKUP_LSEARCH if it is not set. + +# LOOKUP_WILDLSEARCH=yes +# LOOKUP_NWILDLSEARCH=yes + + +#------------------------------------------------------------------------------ +# If you have set LOOKUP_LDAP=yes, you should set LDAP_LIB_TYPE to indicate +# which LDAP library you have. Unfortunately, though most of their functions +# are the same, there are minor differences. Currently Exim knows about four +# LDAP libraries: the one from the University of Michigan (also known as +# OpenLDAP 1), OpenLDAP 2, the Netscape SDK library, and the library that comes +# with Solaris 7 onwards. Uncomment whichever of these you are using. + +# LDAP_LIB_TYPE=OPENLDAP1 +# LDAP_LIB_TYPE=OPENLDAP2 +# LDAP_LIB_TYPE=NETSCAPE +# LDAP_LIB_TYPE=SOLARIS + +# If you don't set any of these, Exim assumes the original University of +# Michigan (OpenLDAP 1) library. + + +#------------------------------------------------------------------------------ +# The PCRE library is required for exim. There is no longer an embedded +# version of the PCRE library included with the source code, instead you +# must use a system library or build your own copy of PCRE. +# In either case you must specify the library link info here. If the +# PCRE header files are not in the standard search path you must also +# modify the INCLUDE path (above) +# +# Use PCRE_CONFIG to query the pcre-config command (first found in $PATH) +# to find the include files and libraries, else use PCRE_LIBS and set INCLUDE +# too if needed. + +PCRE_CONFIG=yes +# PCRE_LIBS=-lpcre + + +#------------------------------------------------------------------------------ +# Additional libraries and include directories may be required for some +# lookup styles (e.g. LDAP, MYSQL or PGSQL). LOOKUP_LIBS is included only on +# the command for linking Exim itself, not on any auxiliary programs. You +# don't need to set LOOKUP_INCLUDE if the relevant directories are already +# specified in INCLUDE. The settings below are just examples; -lpq is for +# PostgreSQL, -lgds is for Interbase, -lsqlite3 is for SQLite. +# +# You do not need to use this for any lookup information added via pkg-config. + +# LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include +# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds -lsqlite3 + + +#------------------------------------------------------------------------------ +# Compiling the Exim monitor: If you want to compile the Exim monitor, a +# program that requires an X11 display, then EXIM_MONITOR should be set to the +# value "eximon.bin". Comment out this setting to disable compilation of the +# monitor. The locations of various X11 directories for libraries and include +# files are defaulted in the OS/Makefile-Default file, but can be overridden in +# local OS-specific make files. + +#EXIM_MONITOR=eximon.bin + + +#------------------------------------------------------------------------------ +# Compiling Exim with content scanning support: If you want to compile Exim +# with support for message body content scanning, set WITH_CONTENT_SCAN to +# the value "yes". This will give you malware and spam scanning in the DATA ACL, +# and the MIME ACL. Please read the documentation to learn more about these +# features. + +# WITH_CONTENT_SCAN=yes + +# If you want to use the deprecated "demime" condition in the DATA ACL, +# uncomment the line below. Doing so will also explicitly turn on the +# WITH_CONTENT_SCAN option. If possible, use the MIME ACL instead of +# the "demime" condition. + +# WITH_OLD_DEMIME=yes + +# If you're using ClamAV and are backporting fixes to an old version, instead +# of staying current (which is the more usual approach) then you may need to +# use an older API which uses a STREAM command, now deprecated, instead of +# zINSTREAM. If you need to set this, please let the Exim developers know, as +# if nobody reports a need for it, we'll remove this option and clean up the +# code. zINSTREAM was introduced with ClamAV 0.95. +# +# WITH_OLD_CLAMAV_STREAM=yes + +#------------------------------------------------------------------------------ +# By default Exim includes code to support DKIM (DomainKeys Identified +# Mail, RFC4871) signing and verification. Verification of signatures is +# turned on by default. See the spec for information on conditionally +# disabling it. To disable the inclusion of the entire feature, set +# DISABLE_DKIM to "yes" + +# DISABLE_DKIM=yes + + +#------------------------------------------------------------------------------ +# By default, Exim has support for checking the AD bit in a DNS response, to +# determine if DNSSEC validation was successful. If your system libraries +# do not support that bit, then set DISABLE_DNSSEC to "yes" + +# DISABLE_DNSSEC=yes + + +#------------------------------------------------------------------------------ +# Compiling Exim with experimental features. These are documented in +# experimental-spec.txt. "Experimental" means that the way these features are +# implemented may still change. Backward compatibility is not guaranteed. + +# Uncomment the following line to add support for talking to dccifd. This +# defaults the socket path to /usr/local/dcc/var/dccifd. + +# EXPERIMENTAL_DCC=yes + +# Uncomment the following lines to add SPF support. You need to have libspf2 +# installed on your system (www.libspf2.org). Depending on where it is installed +# you may have to edit the CFLAGS and LDFLAGS lines. + +# EXPERIMENTAL_SPF=yes +# CFLAGS += -I/usr/local/include +# LDFLAGS += -lspf2 + +# Uncomment the following lines to add SRS (Sender rewriting scheme) support. +# You need to have libsrs_alt installed on your system (srs.mirtol.com). +# Depending on where it is installed you may have to edit the CFLAGS and +# LDFLAGS lines. + +# EXPERIMENTAL_SRS=yes +# CFLAGS += -I/usr/local/include +# LDFLAGS += -lsrs_alt + +# Uncomment the following lines to add Brightmail AntiSpam support. You need +# to have the Brightmail client SDK installed. Please check the experimental +# documentation for implementation details. You need to edit the CFLAGS and +# LDFLAGS lines. + +# EXPERIMENTAL_BRIGHTMAIL=yes +# CFLAGS += -I/opt/brightmail/bsdk-6.0/include +# LDFLAGS += -lxml2_single -lbmiclient_single -L/opt/brightmail/bsdk-6.0/lib + +# Uncomment the following line to add OCSP stapling support in TLS, if Exim +# was built using OpenSSL. + +# EXPERIMENTAL_OCSP=yes + +# Uncomment the following line to add DMARC checking capability, implemented +# using libopendmarc libraries. +# EXPERIMENTAL_DMARC=yes +# CFLAGS += -I/usr/local/include +# LDFLAGS += -lopendmarc + +# Uncomment the following line to add Per-Recipient-Data-Response support. +# EXPERIMENTAL_PRDR=yes + +# Uncomment the following line to support Transport post-delivery actions, +# eg. for logging to a database. +# EXPERIMENTAL_TPDA=yes + +# Uncomment the following line to add Redis lookup support +# You need to have hiredis installed on your system (https://github.com/redis/hiredis). +# Depending on where it is installed you may have to edit the CFLAGS and LDFLAGS lines. +# EXPERIMENTAL_REDIS=yes +# CFLAGS += -I/usr/local/include +# LDFLAGS += -lhiredis + + +############################################################################### +# THESE ARE THINGS YOU MIGHT WANT TO SPECIFY # +############################################################################### + +# The items in this section are those that are commonly changed according to +# the sysadmin's preferences, but whose defaults are often acceptable. The +# first five are concerned with security issues, where differing levels of +# paranoia are appropriate in different environments. Sysadmins also vary in +# their views on appropriate levels of defence in these areas. If you do not +# understand these issues, go with the defaults, which are used by many sites. + + +#------------------------------------------------------------------------------ +# Although Exim is normally a setuid program, owned by root, it refuses to run +# local deliveries as root by default. There is a runtime option called +# "never_users" which lists the users that must never be used for local +# deliveries. There is also the setting below, which provides a list that +# cannot be overridden at runtime. This guards against problems caused by +# unauthorized changes to the runtime configuration. You are advised not to +# remove "root" from this option, but you can add other users if you want. The +# list is colon-separated. It must NOT contain any spaces. + +# FIXED_NEVER_USERS=root:bin:daemon +FIXED_NEVER_USERS=root + + +#------------------------------------------------------------------------------ +# By default, Exim insists that its configuration file be owned by root. You +# can specify one additional permitted owner here. + +# CONFIGURE_OWNER= + +# If the configuration file is group-writeable, Exim insists by default that it +# is owned by root. You can specify one additional permitted group owner here. + +# CONFIGURE_GROUP= + +# If you specify CONFIGURE_OWNER or CONFIGURE_GROUP as a name, this is looked +# up at build time, and the uid or gid number is built into the binary. +# However, you can specify that the lookup is deferred until runtime. In this +# case, it is the name that is built into the binary. You can do this by a +# setting of the form: + +# CONFIGURE_OWNER=ref:mail +# CONFIGURE_GROUP=ref:sysadmin + +# In other words, put "ref:" in front of the user or group name. Although this +# costs a bit of resource at runtime, it is convenient to use this feature when +# building binaries that are to be run on multiple systems where the names may +# refer to different uids or gids. It also allows you to build Exim on a system +# where the relevant user or group is not defined. + + +#------------------------------------------------------------------------------ +# The -C option allows Exim to be run with an alternate runtime configuration +# file. When this is used by root, root privilege is retained by the binary +# (for any other caller including the Exim user, it is dropped). You can +# restrict the location of alternate configurations by defining a prefix below. +# Any file used with -C must then start with this prefix (except that /dev/null +# is also permitted if the caller is root, because that is used in the install +# script). If the prefix specifies a directory that is owned by root, a +# compromise of the Exim account does not permit arbitrary alternate +# configurations to be used. The prefix can be more restrictive than just a +# directory (the second example). + +# ALT_CONFIG_PREFIX=/some/directory/ +# ALT_CONFIG_PREFIX=/some/directory/exim.conf- + + +#------------------------------------------------------------------------------ +# When a user other than root uses the -C option to override the configuration +# file (including the Exim user when re-executing Exim to regain root +# privileges for local message delivery), this will normally cause Exim to +# drop root privileges. The TRUSTED_CONFIG_LIST option, specifies a file which +# contains a list of trusted configuration filenames, one per line. If the -C +# option is used by the Exim user or by the user specified in the +# CONFIGURE_OWNER setting, to specify a configuration file which is listed in +# the TRUSTED_CONFIG_LIST file, then root privileges are not dropped by Exim. + +# TRUSTED_CONFIG_LIST=/usr/exim/trusted_configs + + +#------------------------------------------------------------------------------ +# Uncommenting this option disables the use of the -D command line option, +# which changes the values of macros in the runtime configuration file. +# This is another protection against somebody breaking into the Exim account. + +# DISABLE_D_OPTION=yes + + +#------------------------------------------------------------------------------ +# By contrast, you might be maintaining a system which relies upon the ability +# to override values with -D and assumes that these will be passed through to +# the delivery processes. As of Exim 4.73, this is no longer the case by +# default. Going forward, we strongly recommend that you use a shim Exim +# configuration file owned by root stored under TRUSTED_CONFIG_LIST. +# That shim can set macros before .include'ing your main configuration file. +# +# As a strictly transient measure to ease migration to 4.73, the +# WHITELIST_D_MACROS value definies a colon-separated list of macro-names +# which are permitted to be overridden from the command-line which will be +# honoured by the Exim user. So these are macros that can persist to delivery +# time. +# Examples might be -DTLS or -DSPOOL=/some/dir. The values on the +# command-line are filtered to only permit: [A-Za-z0-9_/.-]* +# +# This option is highly likely to be removed in a future release. It exists +# only to make 4.73 as easy as possible to migrate to. If you use it, we +# encourage you to schedule time to rework your configuration to not depend +# upon it. Most people should not need to use this. +# +# By default, no macros are whitelisted for -D usage. + +# WHITELIST_D_MACROS=TLS:SPOOL + +#------------------------------------------------------------------------------ +# Exim has support for the AUTH (authentication) extension of the SMTP +# protocol, as defined by RFC 2554. If you don't know what SMTP authentication +# is, you probably won't want to include this code, so you should leave these +# settings commented out. If you do want to make use of SMTP authentication, +# you must uncomment at least one of the following, so that appropriate code is +# included in the Exim binary. You will then need to set up the run time +# configuration to make use of the mechanism(s) selected. + +AUTH_CRAM_MD5=yes +# AUTH_CYRUS_SASL=yes +# AUTH_DOVECOT=yes +# AUTH_GSASL=yes +# AUTH_GSASL_PC=libgsasl +# AUTH_HEIMDAL_GSSAPI=yes +# AUTH_HEIMDAL_GSSAPI_PC=heimdal-gssapi +AUTH_PLAINTEXT=yes +# AUTH_SPA=yes + + +#------------------------------------------------------------------------------ +# If you specified AUTH_CYRUS_SASL above, you should ensure that you have the +# Cyrus SASL library installed before trying to build Exim, and you probably +# want to uncomment the first line below. +# Similarly for GNU SASL, unless pkg-config is used via AUTH_GSASL_PC. +# Ditto for AUTH_HEIMDAL_GSSAPI(_PC). + +# AUTH_LIBS=-lsasl2 +# AUTH_LIBS=-lgsasl +# AUTH_LIBS=-lgssapi -lheimntlm -lkrb5 -lhx509 -lcom_err -lhcrypto -lasn1 -lwind -lroken -lcrypt + + +#------------------------------------------------------------------------------ +# When Exim is decoding MIME "words" in header lines, most commonly for use +# in the $header_xxx expansion, it converts any foreign character sets to the +# one that is set in the headers_charset option. The default setting is +# defined by this setting: + +HEADERS_CHARSET="ISO-8859-1" + +# If you are going to make use of $header_xxx expansions in your configuration +# file, or if your users are going to use them in filter files, and the normal +# character set on your host is something other than ISO-8859-1, you might +# like to specify a different default here. This value can be overridden in +# the runtime configuration, and it can also be overridden in individual filter +# files. +# +# IMPORTANT NOTE: The iconv() function is needed for character code +# conversions. Please see the next item... + + +#------------------------------------------------------------------------------ +# Character code conversions are possible only if the iconv() function is +# installed on your operating system. There are two places in Exim where this +# is relevant: (a) The $header_xxx expansion (see the previous item), and (b) +# the Sieve filter support. For those OS where iconv() is known to be installed +# as standard, the file in OS/Makefile-xxxx contains +# +# HAVE_ICONV=yes +# +# If you are not using one of those systems, but have installed iconv(), you +# need to uncomment that line above. In some cases, you may find that iconv() +# and its header file are not in the default places. You might need to use +# something like this: +# +HAVE_ICONV=no +# CFLAGS=-O -I/usr/local/include +# EXTRALIBS_EXIM=-L/usr/local/lib -liconv +# +# but of course there may need to be other things in CFLAGS and EXTRALIBS_EXIM +# as well. +#CFLAGS="-Os -pipe -march=i486 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable" +#CFLAGS="$(TARGET_CFLAGS)" +# todo: Makefile.arch with -march=XYZ if it doesn't compile correctly +CFLAGS=-O -I/usr/local/include + + +#------------------------------------------------------------------------------ +# The passwords for user accounts are normally encrypted with the crypt() +# function. Comparisons with encrypted passwords can be done using Exim's +# "crypteq" expansion operator. (This is commonly used as part of the +# configuration of an authenticator for use with SMTP AUTH.) At least one +# operating system has an extended function called crypt16(), which uses up to +# 16 characters of a password (the normal crypt() uses only the first 8). Exim +# supports the use of crypt16() as well as crypt() but note the warning below. + +# You can always indicate a crypt16-encrypted password by preceding it with +# "{crypt16}". If you want the default handling (without any preceding +# indicator) to use crypt16(), uncomment the following line: + +# DEFAULT_CRYPT=crypt16 + +# If you do that, you can still access the basic crypt() function by preceding +# an encrypted password with "{crypt}". For more details, see the description +# of the "crypteq" condition in the manual chapter on string expansions. + +# Some operating systems do not include a crypt16() function, so Exim has one +# of its own, which it uses unless HAVE_CRYPT16 is defined. Normally, that will +# be set in an OS-specific Makefile for the OS that have such a function, so +# you should not need to bother with it. + +# *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** +# It turns out that the above is not entirely accurate. As well as crypt16() +# there is a function called bigcrypt() that some operating systems have. This +# may or may not use the same algorithm, and both of them may be different to +# Exim's built-in crypt16() that is used unless HAVE_CRYPT16 is defined. +# +# However, since there is now a move away from the traditional crypt() +# functions towards using SHA1 and other algorithms, tidying up this area of +# Exim is seen as very low priority. In practice, if you need to, you can +# define DEFAULT_CRYPT to the name of any function that has the same interface +# as the traditional crypt() function. +# *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** + + +#------------------------------------------------------------------------------ +# Exim can be built to support the SMTP STARTTLS command, which implements +# Transport Layer Security using SSL (Secure Sockets Layer). To do this, you +# must install the OpenSSL library package or the GnuTLS library. Exim contains +# no cryptographic code of its own. Uncomment the following lines if you want +# to build Exim with TLS support. If you don't know what this is all about, +# leave these settings commented out. + +# This setting is required for any TLS support (either OpenSSL or GnuTLS) +# SUPPORT_TLS=yes + +# Uncomment one of these settings if you are using OpenSSL; pkg-config vs not +# USE_OPENSSL_PC=openssl +# TLS_LIBS=-lssl -lcrypto + +# Uncomment the first and either the second or the third of these if you +# are using GnuTLS. If you have pkg-config, then the second, else the third. +# USE_GNUTLS=yes +# USE_GNUTLS_PC=gnutls +# TLS_LIBS=-lgnutls -ltasn1 -lgcrypt + +# The security fix we provide with the gnutls_allow_auto_pkcs11 option +# (4.82 PP/09) introduces a compatibility regression. The symbol is +# not available if GnuTLS is build without p11-kit (--without-p11-kit +# configure option). In this case use AVOID_GNUTLS_PKCS11=yes when +# building Exim. +# AVOID_GNUTLS_PKCS11=yes + +# If you are running Exim as a server, note that just building it with TLS +# support is not all you need to do. You also need to set up a suitable +# certificate, and tell Exim about it by means of the tls_certificate +# and tls_privatekey run time options. You also need to set tls_advertise_hosts +# to specify the hosts to which Exim advertises TLS support. On the other hand, +# if you are running Exim only as a client, building it with TLS support +# is all you need to do. + +# If you are using pkg-config then you should not need to worry where the +# libraries and headers are installed, as the pkg-config .pc specification +# should include all -L/-I information necessary. If not using pkg-config +# then you might need to specify the locations too. + +# Additional libraries and include files are required for both OpenSSL and +# GnuTLS. The TLS_LIBS settings above assume that the libraries are installed +# with all your other libraries. If they are in a special directory, you may +# need something like + +# TLS_LIBS=-L/usr/local/openssl/lib -lssl -lcrypto +# or +# TLS_LIBS=-L/opt/gnu/lib -lgnutls -ltasn1 -lgcrypt + +# TLS_LIBS is included only on the command for linking Exim itself, not on any +# auxiliary programs. If the include files are not in a standard place, you can +# set TLS_INCLUDE to specify where they are, for example: + +# TLS_INCLUDE=-I/usr/local/openssl/include/ +# or +# TLS_INCLUDE=-I/opt/gnu/include + +# You don't need to set TLS_INCLUDE if the relevant directories are already +# specified in INCLUDE. + + +#------------------------------------------------------------------------------ +# The default distribution of Exim contains only the plain text form of the +# documentation. Other forms are available separately. If you want to install +# the documentation in "info" format, first fetch the Texinfo documentation +# sources from the ftp directory and unpack them, which should create files +# with the extension "texinfo" in the doc directory. You may find that the +# version number of the texinfo files is different to your Exim version number, +# because the main documentation isn't updated as often as the code. For +# example, if you have Exim version 4.43, the source tarball upacks into a +# directory called exim-4.43, but the texinfo tarball unpacks into exim-4.40. +# In this case, move the contents of exim-4.40/doc into exim-4.43/doc after you +# have unpacked them. Then set INFO_DIRECTORY to the location of your info +# directory. This varies from system to system, but is often /usr/share/info. +# Once you have done this, "make install" will build the info files and +# install them in the directory you have defined. + +# INFO_DIRECTORY=/usr/share/info + + +#------------------------------------------------------------------------------ +# Exim log directory and files: Exim creates several log files inside a +# single log directory. You can define the directory and the form of the +# log file name here. If you do not set anything, Exim creates a directory +# called "log" inside its spool directory (see SPOOL_DIRECTORY above) and uses +# the filenames "mainlog", "paniclog", and "rejectlog". If you want to change +# this, you can set LOG_FILE_PATH to a path name containing one occurrence of +# %s. This will be replaced by one of the strings "main", "panic", or "reject" +# to form the final file names. Some installations may want something like this: + +# LOG_FILE_PATH=/var/log/exim_%slog + +# which results in files with names /var/log/exim_mainlog, etc. The directory +# in which the log files are placed must exist; Exim does not try to create +# it for itself. It is also your responsibility to ensure that Exim is capable +# of writing files using this path name. The Exim user (see EXIM_USER above) +# must be able to create and update files in the directory you have specified. + +# You can also configure Exim to use syslog, instead of or as well as log +# files, by settings such as these + +# LOG_FILE_PATH=syslog +# LOG_FILE_PATH=syslog:/var/log/exim_%slog + +# The first of these uses only syslog; the second uses syslog and also writes +# to log files. Do not include white space in such a setting as it messes up +# the building process. + + +#------------------------------------------------------------------------------ +# When logging to syslog, the following option caters for syslog replacements +# that are able to accept log entries longer than the 1024 characters allowed +# by RFC 3164. It is up to you to make sure your syslog daemon can handle this. +# Non-printable characters are usually unacceptable regardless, so log entries +# are still split on newline characters. + +# SYSLOG_LONG_LINES=yes + +# If you are not interested in the process identifier (pid) of the Exim that is +# making the call to syslog, then comment out the following line. + +SYSLOG_LOG_PID=yes + + +#------------------------------------------------------------------------------ +# Cycling log files: this variable specifies the maximum number of old +# log files that are kept by the exicyclog log-cycling script. You don't have +# to use exicyclog. If your operating system has other ways of cycling log +# files, you can use them instead. The exicyclog script isn't run by default; +# you have to set up a cron job for it if you want it. + +EXICYCLOG_MAX=10 + + +#------------------------------------------------------------------------------ +# The compress command is used by the exicyclog script to compress old log +# files. Both the name of the command and the suffix that it adds to files +# need to be defined here. See also the EXICYCLOG_MAX configuration. + +COMPRESS_COMMAND=/usr/bin/gzip +COMPRESS_SUFFIX=gz + + +#------------------------------------------------------------------------------ +# If the exigrep utility is fed compressed log files, it tries to uncompress +# them using this command. + +ZCAT_COMMAND=/usr/bin/zcat + + +#------------------------------------------------------------------------------ +# Compiling in support for embedded Perl: If you want to be able to +# use Perl code in Exim's string manipulation language and you have Perl +# (version 5.004 or later) installed, set EXIM_PERL to perl.o. Using embedded +# Perl costs quite a lot of resources. Only do this if you really need it. + +# EXIM_PERL=perl.o + + +#------------------------------------------------------------------------------ +# Support for dynamically-loaded string expansion functions via ${dlfunc. If +# you are using gcc the dynamically-loaded object must be compiled with the +# -shared option, and you will need to add -export-dynamic to EXTRALIBS so +# that the local_scan API is made available by the linker. You may also need +# to add -ldl to EXTRALIBS so that dlopen() is available to Exim. + +# EXPAND_DLFUNC=yes + + +#------------------------------------------------------------------------------ +# Exim has support for PAM (Pluggable Authentication Modules), a facility +# which is available in the latest releases of Solaris and in some GNU/Linux +# distributions (see http://ftp.kernel.org/pub/linux/libs/pam/). The Exim +# support, which is intended for use in conjunction with the SMTP AUTH +# facilities, is included only when requested by the following setting: + +# SUPPORT_PAM=yes + +# You probably need to add -lpam to EXTRALIBS, and in some releases of +# GNU/Linux -ldl is also needed. + + +#------------------------------------------------------------------------------ +# Support for authentication via Radius is also available. The Exim support, +# which is intended for use in conjunction with the SMTP AUTH facilities, +# is included only when requested by setting the following parameter to the +# location of your Radius configuration file: + +# RADIUS_CONFIG_FILE=/etc/radiusclient/radiusclient.conf +# RADIUS_CONFIG_FILE=/etc/radius.conf + +# If you have set RADIUS_CONFIG_FILE, you should also set one of these to +# indicate which RADIUS library is used: + +# RADIUS_LIB_TYPE=RADIUSCLIENT +# RADIUS_LIB_TYPE=RADIUSCLIENTNEW +# RADIUS_LIB_TYPE=RADLIB + +# RADIUSCLIENT is the radiusclient library; you probably need to add +# -lradiusclient to EXTRALIBS. +# +# The API for the radiusclient library was changed at release 0.4.0. +# Unfortunately, the header file does not define a version number that clients +# can use to support both the old and new APIs. If you are using version 0.4.0 +# or later of the radiusclient library, you should use RADIUSCLIENTNEW. +# +# RADLIB is the Radius library that comes with FreeBSD (the header file is +# called radlib.h); you probably need to add -lradius to EXTRALIBS. +# +# If you do not set RADIUS_LIB_TYPE, Exim assumes the radiusclient library, +# using the original API. + + +#------------------------------------------------------------------------------ +# Support for authentication via the Cyrus SASL pwcheck daemon is available. +# Note, however, that pwcheck is now deprecated in favour of saslauthd (see +# next item). The Exim support for pwcheck, which is intented for use in +# conjunction with the SMTP AUTH facilities, is included only when requested by +# setting the following parameter to the location of the pwcheck daemon's +# socket. +# +# There is no need to install all of SASL on your system. You just need to run +# ./configure --with-pwcheck, cd to the pwcheck directory within the sources, +# make and make install. You must create the socket directory (default +# /var/pwcheck) and chown it to exim's user and group. Once you have installed +# pwcheck, you should arrange for it to be started by root at boot time. + +# CYRUS_PWCHECK_SOCKET=/var/pwcheck/pwcheck + + +#------------------------------------------------------------------------------ +# Support for authentication via the Cyrus SASL saslauthd daemon is available. +# The Exim support, which is intented for use in conjunction with the SMTP AUTH +# facilities, is included only when requested by setting the following +# parameter to the location of the saslauthd daemon's socket. +# +# There is no need to install all of SASL on your system. You just need to run +# ./configure --with-saslauthd (and any other options you need, for example, to +# select or deselect authentication mechanisms), cd to the saslauthd directory +# within the sources, make and make install. You must create the socket +# directory (default /var/state/saslauthd) and chown it to exim's user and +# group. Once you have installed saslauthd, you should arrange for it to be +# started by root at boot time. + +# CYRUS_SASLAUTHD_SOCKET=/var/state/saslauthd/mux + + +#------------------------------------------------------------------------------ +# TCP wrappers: If you want to use tcpwrappers from within Exim, uncomment +# this setting. See the manual section entitled "Use of tcpwrappers" in the +# chapter on building and installing Exim. +# +# USE_TCP_WRAPPERS=yes +# +# You may well also have to specify a local "include" file and an additional +# library for TCP wrappers, so you probably need something like this: +# +# USE_TCP_WRAPPERS=yes +# CFLAGS=-O -I/usr/local/include +# EXTRALIBS_EXIM=-L/usr/local/lib -lwrap +# +# but of course there may need to be other things in CFLAGS and EXTRALIBS_EXIM +# as well. +# +# To use a name other than exim in the tcpwrappers config file, +# e.g. if you're running multiple daemons with different access lists, +# or multiple MTAs with the same access list, define +# TCP_WRAPPERS_DAEMON_NAME accordingly +# +# TCP_WRAPPERS_DAEMON_NAME="exim" + + +#------------------------------------------------------------------------------ +# The default action of the exim_install script (which is run by "make +# install") is to install the Exim binary with a unique name such as +# exim-4.43-1, and then set up a symbolic link called "exim" to reference it, +# moving the symbolic link from any previous version. If you define NO_SYMLINK +# (the value doesn't matter), the symbolic link is not created or moved. You +# will then have to "turn Exim on" by setting up the link manually. + +# NO_SYMLINK=yes + + +#------------------------------------------------------------------------------ +# Another default action of the install script is to install a default runtime +# configuration file if one does not exist. This configuration has a router for +# expanding system aliases. The default assumes that these aliases are kept +# in the traditional file called /etc/aliases. If such a file does not exist, +# the installation script creates one that contains just comments (no actual +# aliases). The following setting can be changed to specify a different +# location for the system alias file. + +SYSTEM_ALIASES_FILE=/etc/aliases + + +#------------------------------------------------------------------------------ +# There are some testing options (-be, -bt, -bv) that read data from the +# standard input when no arguments are supplied. By default, the input lines +# are read using the standard fgets() function. This does not support line +# editing during interactive input (though the terminal's "erase" character +# works as normal). If your operating system has the readline() function, and +# in addition supports dynamic loading of library functions, you can cause +# Exim to use readline() for the -be testing option (only) by uncommenting the +# following setting. Dynamic loading is used so that the library is loaded only +# when the -be testing option is given; by the time the loading occurs, +# Exim has given up its root privilege and is running as the calling user. This +# is the reason why readline() is NOT supported for -bt and -bv, because Exim +# runs as root or as exim, respectively, for those options. When USE_READLINE +# is "yes", as well as supporting line editing, a history of input lines in the +# current run is maintained. + +# USE_READLINE=yes + +# You may need to add -ldl to EXTRALIBS when you set USE_READLINE=yes. +# Note that this option adds to the size of the Exim binary, because the +# dynamic loading library is not otherwise included. + + +#------------------------------------------------------------------------------ +# Uncomment this setting to include IPv6 support. + +HAVE_IPV6=yes + +############################################################################### +# THINGS YOU ALMOST NEVER NEED TO MENTION # +############################################################################### + +# The settings in this section are available for use in special circumstances. +# In the vast majority of installations you need not change anything below. + + +#------------------------------------------------------------------------------ +# The following commands live in different places in some OS. Either the +# ultimate default settings, or the OS-specific files should already point to +# the right place, but they can be overridden here if necessary. These settings +# are used when building various scripts to ensure that the correct paths are +# used when the scripts are run. They are not used in the Makefile itself. Perl +# is not necessary for running Exim unless you set EXIM_PERL (see above) to get +# it embedded, but there are some utilities that are Perl scripts. If you +# haven't got Perl, Exim will still build and run; you just won't be able to +# use those utilities. + +# CHOWN_COMMAND=/usr/bin/chown +# CHGRP_COMMAND=/usr/bin/chgrp +# CHMOD_COMMAND=/usr/bin/chmod +# MV_COMMAND=/bin/mv +# RM_COMMAND=/bin/rm +# TOUCH_COMMAND=/usr/bin/touch +# PERL_COMMAND=/usr/bin/perl + + +#------------------------------------------------------------------------------ +# The following macro can be used to change the command for building a library +# of functions. By default the "ar" command is used, with options "cq". +# Only in rare circumstances should you need to change this. + +# AR=ar cq + + +#------------------------------------------------------------------------------ +# In some operating systems, the value of the TMPDIR environment variable +# controls where temporary files are created. Exim does not make use of +# temporary files, except when delivering to MBX mailboxes. However, if Exim +# calls any external libraries (e.g. DBM libraries), they may use temporary +# files, and thus be influenced by the value of TMPDIR. For this reason, when +# Exim starts, it checks the environment for TMPDIR, and if it finds it is set, +# it replaces the value with what is defined here. Commenting this setting +# suppresses the check altogether. + +TMPDIR="/tmp" + + +#------------------------------------------------------------------------------ +# The following macros can be used to change the default modes that are used +# by the appendfile transport. In most installations the defaults are just +# fine, and in any case, you can change particular instances of the transport +# at run time if you want. + +# APPENDFILE_MODE=0600 +# APPENDFILE_DIRECTORY_MODE=0700 +# APPENDFILE_LOCKFILE_MODE=0600 + + +#------------------------------------------------------------------------------ +# In some installations there may be multiple machines sharing file systems, +# where a different configuration file is required for Exim on the different +# machines. If CONFIGURE_FILE_USE_NODE is defined, then Exim will first look +# for a configuration file whose name is that defined by CONFIGURE_FILE, +# with the node name obtained by uname() tacked on the end, separated by a +# period (for example, /usr/exim/configure.host.in.some.domain). If this file +# does not exist, then the bare configuration file name is tried. + +# CONFIGURE_FILE_USE_NODE=yes + + +#------------------------------------------------------------------------------ +# In some esoteric configurations two different versions of Exim are run, +# with different setuid values, and different configuration files are required +# to handle the different cases. If CONFIGURE_FILE_USE_EUID is defined, then +# Exim will first look for a configuration file whose name is that defined +# by CONFIGURE_FILE, with the effective uid tacked on the end, separated by +# a period (for eximple, /usr/exim/configure.0). If this file does not exist, +# then the bare configuration file name is tried. In the case when both +# CONFIGURE_FILE_USE_EUID and CONFIGURE_FILE_USE_NODE are set, four files +# are tried: .., ., ., and . + +# CONFIGURE_FILE_USE_EUID=yes + + +#------------------------------------------------------------------------------ +# The size of the delivery buffers: These specify the sizes (in bytes) of +# the buffers that are used when copying a message from the spool to a +# destination. There is rarely any need to change these values. + +# DELIVER_IN_BUFFER_SIZE=8192 +# DELIVER_OUT_BUFFER_SIZE=8192 + + +#------------------------------------------------------------------------------ +# The mode of the database directory: Exim creates a directory called "db" +# in its spool directory, to hold its databases of hints. This variable +# determines the mode of the created directory. The default value in the +# source is 0750. + +# EXIMDB_DIRECTORY_MODE=0750 + + +#------------------------------------------------------------------------------ +# Database file mode: The mode of files created in the "db" directory defaults +# to 0640 in the source, and can be changed here. + +# EXIMDB_MODE=0640 + + +#------------------------------------------------------------------------------ +# Database lock file mode: The mode of zero-length files created in the "db" +# directory to use for locking purposes defaults to 0640 in the source, and +# can be changed here. + +# EXIMDB_LOCKFILE_MODE=0640 + + +#------------------------------------------------------------------------------ +# This parameter sets the maximum length of the header portion of a message +# that Exim is prepared to process. The default setting is one megabyte. The +# limit exists in order to catch rogue mailers that might connect to your SMTP +# port, start off a header line, and then just pump junk at it for ever. The +# message_size_limit option would also catch this, but it may not be set. +# The value set here is the default; it can be changed at runtime. + +# HEADER_MAXSIZE="(1024*1024)" + + +#------------------------------------------------------------------------------ +# The mode of the input directory: The input directory is where messages are +# kept while awaiting delivery. Exim creates it if necessary, using a mode +# which can be defined here (default 0750). + +# INPUT_DIRECTORY_MODE=0750 + + +#------------------------------------------------------------------------------ +# The mode of Exim's log directory, when it is created by Exim inside the spool +# directory, defaults to 0750 but can be changed here. + +# LOG_DIRECTORY_MODE=0750 + + +#------------------------------------------------------------------------------ +# The log files themselves are created as required, with a mode that defaults +# to 0640, but which can be changed here. + +# LOG_MODE=0640 + + +#------------------------------------------------------------------------------ +# The TESTDB lookup is for performing tests on the handling of lookup results, +# and is not useful for general running. It should be included only when +# debugging the code of Exim. + +# LOOKUP_TESTDB=yes + + +#------------------------------------------------------------------------------ +# /bin/sh is used by default as the shell in which to run commands that are +# defined in the makefiles. This can be changed if necessary, by uncommenting +# this line and specifying another shell, but note that a Bourne-compatible +# shell is expected. + +# MAKE_SHELL=/bin/sh + + +#------------------------------------------------------------------------------ +# The maximum number of named lists of each type (address, domain, host, and +# local part) can be increased by changing this value. It should be set to +# a multiple of 16. + +# MAX_NAMED_LIST=16 + + +#------------------------------------------------------------------------------ +# Network interfaces: Unless you set the local_interfaces option in the runtime +# configuration file to restrict Exim to certain interfaces only, it will run +# code to find all the interfaces there are on your host. Unfortunately, +# the call to the OS that does this requires a buffer large enough to hold +# data for all the interfaces - it was designed in the days when a host rarely +# had more than three or four interfaces. Nowadays hosts can have very many +# virtual interfaces running on the same hardware. If you have more than 250 +# virtual interfaces, you will need to uncomment this setting and increase the +# value. + +# MAXINTERFACES=250 + + +#------------------------------------------------------------------------------ +# Per-message logs: While a message is in the process of being delivered, +# comments on its progress are written to a message log, for the benefit of +# human administrators. These logs are held in a directory called "msglog" +# in the spool directory. Its mode defaults to 0750, but can be changed here. +# The message log directory is also used for storing files that are used by +# transports for returning data to a message's sender (see the "return_output" +# option for transports). + +# MSGLOG_DIRECTORY_MODE=0750 + + +#------------------------------------------------------------------------------ +# There are three options which are used when compiling the Perl interface and +# when linking with Perl. The default values for these are placed automatically +# at the head of the Makefile by the script which builds it. However, if you +# want to override them, you can do so here. + +# PERL_CC= +# PERL_CCOPTS= +# PERL_LIBS= + + +#------------------------------------------------------------------------------ +# If you wish to disable valgrind in the binary, define NVALGRIND=1. +# This should not be needed. + +# NVALGRIND=1 + +#------------------------------------------------------------------------------ +# Identifying the daemon: When an Exim daemon starts up, it writes its pid +# (process id) to a file so that it can easily be identified. The path of the +# file can be specified here. Some installations may want something like this: + +PID_FILE_PATH=/var/run/exim.pid + +# If PID_FILE_PATH is not defined, Exim writes a file in its spool directory +# using the name "exim-daemon.pid". + +# If you start up a daemon without the -bd option (for example, with just +# the -q15m option), a pid file is not written. Also, if you override the +# configuration file with the -oX option, no pid file is written. In other +# words, the pid file is written only for a "standard" daemon. + + +#------------------------------------------------------------------------------ +# If Exim creates the spool directory, it is given this mode, defaulting in the +# source to 0750. + +# SPOOL_DIRECTORY_MODE=0750 + + +#------------------------------------------------------------------------------ +# The mode of files on the input spool which hold the contents of messages can +# be changed here. The default is 0640 so that information from the spool is +# available to anyone who is a member of the Exim group. + +# SPOOL_MODE=0640 + + +#------------------------------------------------------------------------------ +# Moving frozen messages: If the following is uncommented, Exim is compiled +# with support for automatically moving frozen messages out of the main spool +# directory, a facility that is found useful by some large installations. A +# run time option is required to cause the moving actually to occur. Such +# messages become "invisible" to the normal management tools. + +# SUPPORT_MOVE_FROZEN_MESSAGES=yes + + +#------------------------------------------------------------------------------ +# Expanding match_* second paramters: BE CAREFUL IF ENABLING THIS! +# It has proven too easy in practice for administrators to configure security +# problems into their Exim install, by treating match_domain{}{} and friends +# as a form of string comparison, where the second string comes from untrusted +# data. Because these options take lists, which can include lookup;LOOKUPDATA +# style elements, a foe can then cause Exim to, eg, execute an arbitrary MySQL +# query, dropping tables. +# From Exim 4.77 onwards, the second parameter is not expanded; it can still +# be a list literal, or a macro, or a named list reference. There is also +# the new expansion condition "inlisti" which does expand the second parameter, +# but treats it as a list of strings; also, there's "eqi" which is probably +# what is normally wanted. +# +# If you really need to have the old behaviour, know what you are doing and +# will not complain if your system is compromised as a result of doing so, then +# uncomment this option to get the old behaviour back. + +# EXPAND_LISTMATCH_RHS=yes + +#------------------------------------------------------------------------------ +# Disabling the use of fsync(): DO NOT UNCOMMENT THE FOLLOWING LINE unless you +# really, really, really know what you are doing. And even then, think again. +# You should never uncomment this when compiling a binary for distribution. +# Use it only when compiling Exim for your own use. +# +# Uncommenting this line enables the use of a runtime option called +# disable_fsync, which can be used to stop Exim using fsync() to ensure that +# files are written to disc before proceeding. When this is disabled, crashes +# and hardware problems such as power outages can cause data to be lost. This +# feature should only be used in very exceptional circumstances. YOU HAVE BEEN +# WARNED. + +# ENABLE_DISABLE_FSYNC=yes + +# End of EDITME for Exim 4. diff --git a/trunk/package/mail/exim4/files/exim.init b/trunk/package/mail/exim4/files/exim.init new file mode 100644 index 00000000..a565baba --- /dev/null +++ b/trunk/package/mail/exim4/files/exim.init @@ -0,0 +1,23 @@ +#!/bin/sh /etc/rc.common +# Exim + +START=88 +STOP=12 +PIDFILE=/var/run/exim.pid + +start() { + chown root:exim /usr/exim/configure + chmod 640 /usr/exim/configure + /usr/exim/bin/exim -bd -q30m +} + +stop() { + kill $(cat "$PIDFILE") + rm "$PIDFILE" +} + +restart() { + stop + start +} + diff --git a/trunk/package/mail/exim4/patches/001-Makefile-Base.patch b/trunk/package/mail/exim4/patches/001-Makefile-Base.patch new file mode 100644 index 00000000..4e1a6789 --- /dev/null +++ b/trunk/package/mail/exim4/patches/001-Makefile-Base.patch @@ -0,0 +1,13 @@ +--- a/OS/Makefile-Base ++++ b/OS/Makefile-Base +@@ -112,8 +112,8 @@ allexim: config.h $(EXIM_MONITOR) exicyclog exinext exiwhat \ + + # Targets for special-purpose configuration header builders + buildconfig: buildconfig.c +- @echo "$(CC) buildconfig.c" +- $(FE)$(CC) $(CFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS) ++ @echo "$(HOSTCC_WRAPPER) buildconfig.c" ++ $(FE)$(HOSTCC_WRAPPER) $(CFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS) + + + # Target for the exicyclog utility script diff --git a/trunk/package/mail/fdm/Config.in b/trunk/package/mail/fdm/Config.in new file mode 100644 index 00000000..084695b1 --- /dev/null +++ b/trunk/package/mail/fdm/Config.in @@ -0,0 +1,10 @@ +menu "Configuration" + depends on PACKAGE_fdm + +config FDM_WITH_PCRE + bool + default y + select libpcre + prompt "Enable PCRE support (elsewhere POSIX regex)" + +endmenu diff --git a/trunk/package/mail/fdm/Makefile b/trunk/package/mail/fdm/Makefile new file mode 100644 index 00000000..49c02f15 --- /dev/null +++ b/trunk/package/mail/fdm/Makefile @@ -0,0 +1,86 @@ +# +# Copyright (C) 2007-2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=fdm +PKG_VERSION:=1.7 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-2-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/fdm +PKG_MD5SUM:=aea0421571e8f3ec8f747a5d72c84348 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/fdm + SECTION:=mail + CATEGORY:=Mail + TITLE:=fetch mail and deliver + URL:=http://fdm.sourceforge.net/ + MAINTAINER:=Dmitry V. Zimin + MENU:=1 + DEPENDS:=+tdb +zlib +libopenssl +FDM_WITH_PCRE:libpcre + USERID:=_fdm=99:_fdm=99 +endef + +define Package/fdm/description + fdm is a simple, lightweight replacement for mail fetch, filter + and delivery programs such as fetchmail and procmail. It can + fetch using POP3 or IMAP (with SSL) or from stdin, and deliver + to a pipe, file, maildir, mbox or SMTP server, based on $(if $(CONFIG_FDM_WITH_PCRE),PCRE,POSIX regexp) +endef + +MAKE_FLAGS += \ + PREFIX="/usr"\ + $(if $(CONFIG_FDM_WITH_PCRE),PCRE=1) + +define Build/Prepare + $(call Build/Prepare/Default) + $(CP) ./src/compat/* $(PKG_BUILD_DIR)/ +endef + +define Package/fdm/config + source "$(SOURCE)/Config.in" +endef + +define Package/fdm/conffiles +/etc/fdm.conf +endef + +define Package/fdm/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/etc/* $(1)/etc/ + $(INSTALL_DIR) $(1)/opt/fdm + chmod a+rwx $(1)/opt/fdm +endef + +define Package/fdm/postinst +#!/bin/sh +if [ -z "$${IPKG_INSTROOT}" ]; then + echo "Creating cron job template for user _fdm..." + (crontab -l -u _fdm 2>/dev/null; echo "# */13 * * * * fdm -q fetch") | crontab -u _fdm - + echo "Please, edit file /etc/fdm.conf and enable cron job!" +fi +exit 0 +endef + +define Package/fdm/prerm +#!/bin/sh +if [ -z "$${IPKG_INSTROOT}" ]; then + echo "Don't forget disable cron job!" + echo "# crontab -r -u _fdm" +fi +exit 0 +endef + +$(eval $(call BuildPackage,fdm)) diff --git a/trunk/package/mail/fdm/files/etc/fdm.conf b/trunk/package/mail/fdm/files/etc/fdm.conf new file mode 100644 index 00000000..56c9db48 --- /dev/null +++ b/trunk/package/mail/fdm/files/etc/fdm.conf @@ -0,0 +1,36 @@ +# /etc/fdm.conf example file +# 1. Edit this file +# 2. Test: fdm -vv fetch +# 3. Enable cron job: crontab -e -u _fdm + +set maximum-size 3M +set delete-oversized +set queue-high 1 +set queue-low 0 +set purge-after 5 +set unmatched-mail keep + +action "drop" drop +action "keep" keep + +action "wakeup" exec "wol -h 192.168.0.255 -p 9 00:11:22:33:44:55" +action "my-test-action" exec "echo \"OK\" > /tmp/fdm.ok" + +# This action extract *.torrent files from incoming email and put it +# to watch-dir your torrect client application + +action "torrent-add" pipe "munpack -f -q -C /your-path/watch-dir/ ; for i in /your-path/watch-dir/*.torrent ; do chmod a+r \$i ; done" + +account "xbmc" disabled + pop3s + server "pop.yandex.ru" + port 995 + user "username-enter-here" + pass "password-enter-here" + new-only + cache "/opt/fdm/cache" + +match "^Subject:[ \t]+openwrt:[ \t]*wakeup[ \t]*$" in headers actions { "wakeup" "drop" } +match "^Subject:[ \t]+openwrt:[ \t]*torrent[ \t]+add[ \t]*\$" in headers actions { "torrent-add" "drop" } +match "^Subject:[ \t]+openwrt:[ \t]*test[ \t]*$" in headers actions { "my-test-action" "drop" } +match all action "keep" diff --git a/trunk/package/mail/fdm/patches/001-base64-fix.patch b/trunk/package/mail/fdm/patches/001-base64-fix.patch new file mode 100644 index 00000000..ad9239bf --- /dev/null +++ b/trunk/package/mail/fdm/patches/001-base64-fix.patch @@ -0,0 +1,14 @@ +--- a/fdm.h 2011-10-10 17:36:29.000000000 +0400 ++++ b/fdm.h 2014-11-13 12:56:59.217083683 +0300 +@@ -719,6 +719,11 @@ + size_t strlcat(char *, const char *, size_t); + #endif + ++int local_b64_ntop(uint8_t const *src, size_t srclength, char *target, ++ size_t targsize); ++ ++int local_b64_pton(char const *src, uint8_t *target, size_t targsize); ++ + /* shm.c */ + char *shm_path(struct shm *); + void *shm_create(struct shm *, size_t); diff --git a/trunk/package/mail/fdm/patches/002-base64-fix.patch b/trunk/package/mail/fdm/patches/002-base64-fix.patch new file mode 100644 index 00000000..7f798a6e --- /dev/null +++ b/trunk/package/mail/fdm/patches/002-base64-fix.patch @@ -0,0 +1,20 @@ +--- a/imap-common.c 2011-12-20 00:19:03.000000000 +0400 ++++ b/imap-common.c 2014-11-13 12:56:06.930418446 +0300 +@@ -206,7 +206,7 @@ + + size = (strlen(in) * 2) + 1; + out = xcalloc(1, size); +- if (b64_ntop(in, strlen(in), out, size) < 0) { ++ if (local_b64_ntop(in, strlen(in), out, size) < 0) { + xfree(out); + return (NULL); + } +@@ -222,7 +222,7 @@ + + size = (strlen(in) * 4) + 1; + out = xcalloc(1, size); +- if (b64_pton(in, out, size) < 0) { ++ if (local_b64_pton(in, out, size) < 0) { + xfree(out); + return (NULL); + } diff --git a/trunk/package/mail/fdm/src/compat/b64_ntop.c b/trunk/package/mail/fdm/src/compat/b64_ntop.c new file mode 100644 index 00000000..0d222cf1 --- /dev/null +++ b/trunk/package/mail/fdm/src/compat/b64_ntop.c @@ -0,0 +1,183 @@ +/* + * Copyright (c) 1996, 1998 by Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +/* + * Portions Copyright (c) 1995 by International Business Machines, Inc. + * + * International Business Machines, Inc. (hereinafter called IBM) grants + * permission under its copyrights to use, copy, modify, and distribute this + * Software with or without fee, provided that the above copyright notice and + * all paragraphs of this notice appear in all copies, and that the name of IBM + * not be used in connection with the marketing of any product incorporating + * the Software or modifications thereof, without specific, written prior + * permission. + * + * To the extent it has a right to do so, IBM grants an immunity from suit + * under its patents, if any, for the use, sale or manufacture of products to + * the extent that such products are used for performing Domain Name System + * dynamic updates in TCP/IP networks by means of the Software. No immunity is + * granted for any product per se or for any other function of any product. + * + * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, + * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ +//#include + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include "fdm.h" + +#define Assert(Cond) if (!(Cond)) abort() + +static const char Base64[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +static const char Pad64 = '='; + +/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt) + The following encoding technique is taken from RFC 1521 by Borenstein + and Freed. It is reproduced here in a slightly edited form for + convenience. + + A 65-character subset of US-ASCII is used, enabling 6 bits to be + represented per printable character. (The extra 65th character, "=", + is used to signify a special processing function.) + + The encoding process represents 24-bit groups of input bits as output + strings of 4 encoded characters. Proceeding from left to right, a + 24-bit input group is formed by concatenating 3 8-bit input groups. + These 24 bits are then treated as 4 concatenated 6-bit groups, each + of which is translated into a single digit in the base64 alphabet. + + Each 6-bit group is used as an index into an array of 64 printable + characters. The character referenced by the index is placed in the + output string. + + Table 1: The Base64 Alphabet + + Value Encoding Value Encoding Value Encoding Value Encoding + 0 A 17 R 34 i 51 z + 1 B 18 S 35 j 52 0 + 2 C 19 T 36 k 53 1 + 3 D 20 U 37 l 54 2 + 4 E 21 V 38 m 55 3 + 5 F 22 W 39 n 56 4 + 6 G 23 X 40 o 57 5 + 7 H 24 Y 41 p 58 6 + 8 I 25 Z 42 q 59 7 + 9 J 26 a 43 r 60 8 + 10 K 27 b 44 s 61 9 + 11 L 28 c 45 t 62 + + 12 M 29 d 46 u 63 / + 13 N 30 e 47 v + 14 O 31 f 48 w (pad) = + 15 P 32 g 49 x + 16 Q 33 h 50 y + + Special processing is performed if fewer than 24 bits are available + at the end of the data being encoded. A full encoding quantum is + always completed at the end of a quantity. When fewer than 24 input + bits are available in an input group, zero bits are added (on the + right) to form an integral number of 6-bit groups. Padding at the + end of the data is performed using the '=' character. + + Since all base64 input is an integral number of octets, only the + following cases can arise: + + (1) the final quantum of encoding input is an integral + multiple of 24 bits; here, the final unit of encoded + output will be an integral multiple of 4 characters + with no "=" padding, + (2) the final quantum of encoding input is exactly 8 bits; + here, the final unit of encoded output will be two + characters followed by two "=" padding characters, or + (3) the final quantum of encoding input is exactly 16 bits; + here, the final unit of encoded output will be three + characters followed by one "=" padding character. + */ + +int +local_b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) { + size_t datalength = 0; + uint8_t input[3]; + uint8_t output[4]; + size_t i; + + while (2 < srclength) { + input[0] = *src++; + input[1] = *src++; + input[2] = *src++; + srclength -= 3; + + output[0] = input[0] >> 2; + output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); + output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); + output[3] = input[2] & 0x3f; + Assert(output[0] < 64); + Assert(output[1] < 64); + Assert(output[2] < 64); + Assert(output[3] < 64); + + if (datalength + 4 > targsize) + return (-1); + target[datalength++] = Base64[output[0]]; + target[datalength++] = Base64[output[1]]; + target[datalength++] = Base64[output[2]]; + target[datalength++] = Base64[output[3]]; + } + + /* Now we worry about padding. */ + if (0 != srclength) { + /* Get what's left. */ + input[0] = input[1] = input[2] = '\0'; + for (i = 0; i < srclength; i++) + input[i] = *src++; + output[0] = input[0] >> 2; + output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); + output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); + Assert(output[0] < 64); + Assert(output[1] < 64); + Assert(output[2] < 64); + + if (datalength + 4 > targsize) + return (-1); + target[datalength++] = Base64[output[0]]; + target[datalength++] = Base64[output[1]]; + if (srclength == 1) + target[datalength++] = Pad64; + else + target[datalength++] = Base64[output[2]]; + target[datalength++] = Pad64; + } + if (datalength >= targsize) + return (-1); + target[datalength] = '\0'; /* Returned value doesn't count \0. */ + return (datalength); +} diff --git a/trunk/package/mail/fdm/src/compat/b64_pton.c b/trunk/package/mail/fdm/src/compat/b64_pton.c new file mode 100644 index 00000000..0e9363a9 --- /dev/null +++ b/trunk/package/mail/fdm/src/compat/b64_pton.c @@ -0,0 +1,393 @@ +/* + * Copyright (c) 1996, 1998 by Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +/* + * Portions Copyright (c) 1995 by International Business Machines, Inc. + * + * International Business Machines, Inc. (hereinafter called IBM) grants + * permission under its copyrights to use, copy, modify, and distribute this + * Software with or without fee, provided that the above copyright notice and + * all paragraphs of this notice appear in all copies, and that the name of IBM + * not be used in connection with the marketing of any product incorporating + * the Software or modifications thereof, without specific, written prior + * permission. + * + * To the extent it has a right to do so, IBM grants an immunity from suit + * under its patents, if any, for the use, sale or manufacture of products to + * the extent that such products are used for performing Domain Name System + * dynamic updates in TCP/IP networks by means of the Software. No immunity is + * granted for any product per se or for any other function of any product. + * + * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, + * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ +//#include + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include "fdm.h" + +#define Assert(Cond) if (!(Cond)) abort() + +static const char Base64[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +static const char Pad64 = '='; + +/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt) + The following encoding technique is taken from RFC 1521 by Borenstein + and Freed. It is reproduced here in a slightly edited form for + convenience. + + A 65-character subset of US-ASCII is used, enabling 6 bits to be + represented per printable character. (The extra 65th character, "=", + is used to signify a special processing function.) + + The encoding process represents 24-bit groups of input bits as output + strings of 4 encoded characters. Proceeding from left to right, a + 24-bit input group is formed by concatenating 3 8-bit input groups. + These 24 bits are then treated as 4 concatenated 6-bit groups, each + of which is translated into a single digit in the base64 alphabet. + + Each 6-bit group is used as an index into an array of 64 printable + characters. The character referenced by the index is placed in the + output string. + + Table 1: The Base64 Alphabet + + Value Encoding Value Encoding Value Encoding Value Encoding + 0 A 17 R 34 i 51 z + 1 B 18 S 35 j 52 0 + 2 C 19 T 36 k 53 1 + 3 D 20 U 37 l 54 2 + 4 E 21 V 38 m 55 3 + 5 F 22 W 39 n 56 4 + 6 G 23 X 40 o 57 5 + 7 H 24 Y 41 p 58 6 + 8 I 25 Z 42 q 59 7 + 9 J 26 a 43 r 60 8 + 10 K 27 b 44 s 61 9 + 11 L 28 c 45 t 62 + + 12 M 29 d 46 u 63 / + 13 N 30 e 47 v + 14 O 31 f 48 w (pad) = + 15 P 32 g 49 x + 16 Q 33 h 50 y + + Special processing is performed if fewer than 24 bits are available + at the end of the data being encoded. A full encoding quantum is + always completed at the end of a quantity. When fewer than 24 input + bits are available in an input group, zero bits are added (on the + right) to form an integral number of 6-bit groups. Padding at the + end of the data is performed using the '=' character. + + Since all base64 input is an integral number of octets, only the + following cases can arise: + + (1) the final quantum of encoding input is an integral + multiple of 24 bits; here, the final unit of encoded + output will be an integral multiple of 4 characters + with no "=" padding, + (2) the final quantum of encoding input is exactly 8 bits; + here, the final unit of encoded output will be two + characters followed by two "=" padding characters, or + (3) the final quantum of encoding input is exactly 16 bits; + here, the final unit of encoded output will be three + characters followed by one "=" padding character. + */ + +/* skips all whitespace anywhere. + converts characters, four at a time, starting at (or after) + src from base - 64 numbers into three 8 bit bytes in the target area. + it returns the number of data bytes stored at the target, or -1 on error. + */ + +static int b64rmap_initialized = 0; +static uint8_t b64rmap[256]; + +static const uint8_t b64rmap_special = 0xf0; +static const uint8_t b64rmap_end = 0xfd; +static const uint8_t b64rmap_space = 0xfe; +static const uint8_t b64rmap_invalid = 0xff; + +/** + * Initializing the reverse map is not thread safe. + * Which is fine for NSD. For now... + **/ +static void +b64_initialize_rmap () +{ + int i; + char ch; + + /* Null: end of string, stop parsing */ + b64rmap[0] = b64rmap_end; + + for (i = 1; i < 256; ++i) { + ch = (char)i; + /* Whitespaces */ + if (isspace(ch)) + b64rmap[i] = b64rmap_space; + /* Padding: stop parsing */ + else if (ch == Pad64) + b64rmap[i] = b64rmap_end; + /* Non-base64 char */ + else + b64rmap[i] = b64rmap_invalid; + } + + /* Fill reverse mapping for base64 chars */ + for (i = 0; Base64[i] != '\0'; ++i) + b64rmap[(uint8_t)Base64[i]] = i; + + b64rmap_initialized = 1; +} + +static int +b64_pton_do(char const *src, uint8_t *target, size_t targsize) +{ + int tarindex, state, ch; + uint8_t ofs; + + state = 0; + tarindex = 0; + + while (1) + { + ch = *src++; + ofs = b64rmap[ch]; + + if (ofs >= b64rmap_special) { + /* Ignore whitespaces */ + if (ofs == b64rmap_space) + continue; + /* End of base64 characters */ + if (ofs == b64rmap_end) + break; + /* A non-base64 character. */ + return (-1); + } + + switch (state) { + case 0: + if ((size_t)tarindex >= targsize) + return (-1); + target[tarindex] = ofs << 2; + state = 1; + break; + case 1: + if ((size_t)tarindex + 1 >= targsize) + return (-1); + target[tarindex] |= ofs >> 4; + target[tarindex+1] = (ofs & 0x0f) + << 4 ; + tarindex++; + state = 2; + break; + case 2: + if ((size_t)tarindex + 1 >= targsize) + return (-1); + target[tarindex] |= ofs >> 2; + target[tarindex+1] = (ofs & 0x03) + << 6; + tarindex++; + state = 3; + break; + case 3: + if ((size_t)tarindex >= targsize) + return (-1); + target[tarindex] |= ofs; + tarindex++; + state = 0; + break; + default: + abort(); + } + } + + /* + * We are done decoding Base-64 chars. Let's see if we ended + * on a byte boundary, and/or with erroneous trailing characters. + */ + + if (ch == Pad64) { /* We got a pad char. */ + ch = *src++; /* Skip it, get next. */ + switch (state) { + case 0: /* Invalid = in first position */ + case 1: /* Invalid = in second position */ + return (-1); + + case 2: /* Valid, means one byte of info */ + /* Skip any number of spaces. */ + for ((void)NULL; ch != '\0'; ch = *src++) + if (b64rmap[ch] != b64rmap_space) + break; + /* Make sure there is another trailing = sign. */ + if (ch != Pad64) + return (-1); + ch = *src++; /* Skip the = */ + /* Fall through to "single trailing =" case. */ + /* FALLTHROUGH */ + + case 3: /* Valid, means two bytes of info */ + /* + * We know this char is an =. Is there anything but + * whitespace after it? + */ + for ((void)NULL; ch != '\0'; ch = *src++) + if (b64rmap[ch] != b64rmap_space) + return (-1); + + /* + * Now make sure for cases 2 and 3 that the "extra" + * bits that slopped past the last full byte were + * zeros. If we don't check them, they become a + * subliminal channel. + */ + if (target[tarindex] != 0) + return (-1); + } + } else { + /* + * We ended by seeing the end of the string. Make sure we + * have no partial bytes lying around. + */ + if (state != 0) + return (-1); + } + + return (tarindex); +} + + +static int +b64_pton_len(char const *src) +{ + int tarindex, state, ch; + uint8_t ofs; + + state = 0; + tarindex = 0; + + while (1) + { + ch = *src++; + ofs = b64rmap[ch]; + + if (ofs >= b64rmap_special) { + /* Ignore whitespaces */ + if (ofs == b64rmap_space) + continue; + /* End of base64 characters */ + if (ofs == b64rmap_end) + break; + /* A non-base64 character. */ + return (-1); + } + + switch (state) { + case 0: + state = 1; + break; + case 1: + tarindex++; + state = 2; + break; + case 2: + tarindex++; + state = 3; + break; + case 3: + tarindex++; + state = 0; + break; + default: + abort(); + } + } + + /* + * We are done decoding Base-64 chars. Let's see if we ended + * on a byte boundary, and/or with erroneous trailing characters. + */ + + if (ch == Pad64) { /* We got a pad char. */ + ch = *src++; /* Skip it, get next. */ + switch (state) { + case 0: /* Invalid = in first position */ + case 1: /* Invalid = in second position */ + return (-1); + + case 2: /* Valid, means one byte of info */ + /* Skip any number of spaces. */ + for ((void)NULL; ch != '\0'; ch = *src++) + if (b64rmap[ch] != b64rmap_space) + break; + /* Make sure there is another trailing = sign. */ + if (ch != Pad64) + return (-1); + ch = *src++; /* Skip the = */ + /* Fall through to "single trailing =" case. */ + /* FALLTHROUGH */ + + case 3: /* Valid, means two bytes of info */ + /* + * We know this char is an =. Is there anything but + * whitespace after it? + */ + for ((void)NULL; ch != '\0'; ch = *src++) + if (b64rmap[ch] != b64rmap_space) + return (-1); + + } + } else { + /* + * We ended by seeing the end of the string. Make sure we + * have no partial bytes lying around. + */ + if (state != 0) + return (-1); + } + + return (tarindex); +} + + +int +local_b64_pton(char const *src, uint8_t *target, size_t targsize) +{ + if (!b64rmap_initialized) + b64_initialize_rmap (); + + if (target) + return b64_pton_do (src, target, targsize); + else + return b64_pton_len (src); +} diff --git a/trunk/package/mail/mailman/Makefile b/trunk/package/mail/mailman/Makefile new file mode 100644 index 00000000..eee50f85 --- /dev/null +++ b/trunk/package/mail/mailman/Makefile @@ -0,0 +1,126 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mailman +PKG_RELEASE:=1 +PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/mailman/ http://ftp.gnu.org/gnu/mailman/ +PKG_VERSION:=2.1.20 +PKG_MD5SUM:=96819640406f90a12bc28edd3dc09d4a +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_MAINTAINER:=Denis Shulyaka +PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE_FILES:=gnu-COPYING-GPL + +include $(INCLUDE_DIR)/package.mk + +define Package/mailman + SECTION:=mail + CATEGORY:=Mail + TITLE:=The GNU Mailing List Manager + URL:=http://www.gnu.org/software/mailman/ + DEPENDS:=+postfix +python +uhttpd +python-dns +endef + +define Package/mailman/description + Mailman is free software for managing electronic mail discussion and e-newsletter lists. +endef + +prefix=/usr/local/mailman + +define Package/mailman/conffiles +$(prefix)/Mailman/mm_cfg.py +endef + +CONFIGURE_ARGS += \ + --prefix="$(prefix)" \ + --exec-prefix="$(prefix)" \ + --with-username="root" \ + --with-groupname="root" \ + --with-mail-gid="nogroup" \ + --with-cgi-gid="root" \ + --without-permcheck \ + +define Build/Compile +endef + +define Package/mailman/install + $(INSTALL_DIR) $(1)$(prefix) + cd $(PKG_BUILD_DIR); $(MAKE) DESTDIR=$(1) install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/mailman.init $(1)/etc/init.d/mailman + $(INSTALL_DIR) $(1)/usr/www + ln -s $(prefix)/cgi-bin/ $(1)/usr/www/mailman + ln -s $(prefix)/archives/public/ $(1)/usr/www/pipermail + ln -s $(prefix)/icons $(1)/usr/www/icons +endef + +define Package/mailman/postinst +#!/bin/sh +# check if we are on real system +if [ -z "$${IPKG_INSTROOT}" ]; then + + if [ `postconf alias_maps | grep -ci mailman` -eq 0 ] + then + postconf -e "`postconf alias_maps`, cdb:$(prefix)/data/aliases" + fi + cd $(prefix) + hostname=`cat /proc/sys/kernel/hostname` + if [ ! -f data/aliases ] + then + ./bin/genaliases + fi + newaliases + if [ `grep -c DEFAULT_URL_HOST Mailman/mm_cfg.py` -eq 0 ] + then + echo "DEFAULT_EMAIL_HOST = '$$hostname'" >> Mailman/mm_cfg.py + echo "DEFAULT_URL_HOST = '$$hostname'" >> Mailman/mm_cfg.py + echo "add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)" >> Mailman/mm_cfg.py + echo "QRUNNERS.remove(('NewsRunner',1))" >> Mailman/mm_cfg.py + fi + if [ `./bin/list_lists | grep -ci mailman` -eq 0 ] + then + ./bin/newlist --urlhost=$$hostname --emailhost=$$hostname --quiet mailman root@$$hostname mailman + ./bin/config_list -i data/sitelist.cfg mailman + echo "NOTE: A default site-wide mailing list Mailman with password 'mailman' has been created. Please review it and change the password." + ./bin/mmsitepass mailman + echo "NOTE: The default site password 'mailman' has been created." + fi + # /etc/init.d/mailman enable + if [ `ps | grep "mailman/bin/qrunner" | grep -cv grep` -gt 0 ] + then + $(prefix)/bin/mailmanctl -q restart + fi + if [ `grep -c mailman /etc/config/uhttpd` -eq 0 ] + then #we assume that the server is not configured yet, thus print out some help for the first time: + echo "NOTE: Please set the site password using $(prefix)/bin/mmsitepass " + echo "Please add uhttpd config section to your /etc/config/uhttpd like this:" + echo "config uhttpd mailman" + echo " list listen_http 0.0.0.0:80" + echo " option home /usr/www" + echo " option cgi_prefix /mailman" + echo " no_symlinks 0" + echo "Don't forget to setup firewall for accessing this website!" + echo "To add a mailing list go to http://$$hostname/mailman/create." + fi +fi +endef + +define Package/mailman/prerm +#!/bin/sh +# check if we are on real system +if [ -z "$${IPKG_INSTROOT}" ]; then + + if [ `ps | grep "mailman/bin/qrunner" | grep -cv grep` -gt 0 ] + then + $(prefix)/bin/mailmanctl stop + fi +fi +endef + +$(eval $(call BuildPackage,mailman)) diff --git a/trunk/package/mail/mailman/files/mailman.init b/trunk/package/mail/mailman/files/mailman.init new file mode 100644 index 00000000..f68a4567 --- /dev/null +++ b/trunk/package/mail/mailman/files/mailman.init @@ -0,0 +1,22 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2014 OpenWrt.org + +START=50 +STOP=50 + +PYTHON=/usr/bin/python +MAILMANHOME=/usr/local/mailman +MAILMANCTL=$MAILMANHOME/bin/mailmanctl + +start() { + #rm -f $MAILMANHOME/locks/* + $PYTHON $MAILMANCTL -s -q start +} + +stop() { + $PYTHON $MAILMANCTL -q stop +} + +restart() { + $PYTHON $MAILMANCTL -q restart +} diff --git a/trunk/package/mail/mailman/patches/100-postfix.patch b/trunk/package/mail/mailman/patches/100-postfix.patch new file mode 100644 index 00000000..22fec1ea --- /dev/null +++ b/trunk/package/mail/mailman/patches/100-postfix.patch @@ -0,0 +1,12 @@ +diff -rupN mailman-2.1.14-1/Mailman/Defaults.py.in mailman-2.1.14-1_patched/Mailman/Defaults.py.in +--- mailman-2.1.14-1/Mailman/Defaults.py.in 2011-03-01 23:35:57.000000000 +0300 ++++ mailman-2.1.14-1_patched/Mailman/Defaults.py.in 2011-03-09 12:26:10.000000000 +0300 +@@ -461,7 +461,7 @@ DELIVERY_MODULE = 'SMTPDirect' + # standard out (or send an email to the site list owner) for manual twiddling + # of an /etc/aliases style file. Use 'Postfix' if you are using the Postfix + # MTA -- but then also see POSTFIX_STYLE_VIRTUAL_DOMAINS. +-MTA = 'Manual' ++MTA = 'Postfix' + + # If you set MTA='Postfix', then you also want to set the following variable, + # depending on whether you're using virtual domains in Postfix, and which diff --git a/trunk/package/mail/mailman/patches/200-nohostdnspython.patch b/trunk/package/mail/mailman/patches/200-nohostdnspython.patch new file mode 100644 index 00000000..e3211066 --- /dev/null +++ b/trunk/package/mail/mailman/patches/200-nohostdnspython.patch @@ -0,0 +1,68 @@ +diff -Naur mailman-2.1.18-1/configure mailman-2.1.18-1_patched/configure +--- mailman-2.1.18-1/configure 2014-10-26 12:00:38.090360119 +0300 ++++ mailman-2.1.18-1_patched/configure 2014-10-26 12:00:21.323016430 +0300 +@@ -2236,35 +2236,35 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $version" >&5 + $as_echo "$version" >&6; } + +-# See if dnspython is installed. +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dnspython" >&5 +-$as_echo_n "checking dnspython... " >&6; } +- +-cat > conftest.py < or +-***** " "$LINENO" 5 +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $havednspython" >&5 +-$as_echo "$havednspython" >&6; } ++## See if dnspython is installed. ++#{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dnspython" >&5 ++#$as_echo_n "checking dnspython... " >&6; } ++# ++#cat > conftest.py < or ++#***** " "$LINENO" 5 ++#fi ++#{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $havednspython" >&5 ++#$as_echo "$havednspython" >&6; } + + # Check the email package version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's email package" >&5 diff --git a/trunk/package/mail/mailman/patches/300-targetpython.patch b/trunk/package/mail/mailman/patches/300-targetpython.patch new file mode 100644 index 00000000..1dd2859f --- /dev/null +++ b/trunk/package/mail/mailman/patches/300-targetpython.patch @@ -0,0 +1,12 @@ +diff -Naur mailman-2.1.18-1/configure mailman-2.1.18-1_patched/configure +--- mailman-2.1.18-1/configure 2014-05-06 20:43:56.000000000 +0400 ++++ mailman-2.1.18-1_patched/configure 2014-11-04 15:02:32.892666331 +0300 +@@ -3927,6 +3927,8 @@ + $as_echo "$URLHOST" >&6; } + rm -f conftest.out conftest.py + ++PYTHON=/usr/bin/python ++ + # Checks for libraries. + + for ac_func in strerror setregid syslog diff --git a/trunk/package/mail/mailman/patches/400-modules.patch b/trunk/package/mail/mailman/patches/400-modules.patch new file mode 100644 index 00000000..9fa72a26 --- /dev/null +++ b/trunk/package/mail/mailman/patches/400-modules.patch @@ -0,0 +1,35 @@ +diff -Naur mailman-2.1.18-1/Mailman/MailList.py mailman-2.1.18-1_patched/Mailman/MailList.py +--- mailman-2.1.18-1/Mailman/MailList.py 2014-05-06 20:43:56.000000000 +0400 ++++ mailman-2.1.18-1_patched/Mailman/MailList.py 2014-11-04 15:57:06.832636147 +0300 +@@ -30,7 +30,7 @@ + import shutil + import socket + import urllib +-import cPickle ++import pickle as cPickle + + from cStringIO import StringIO + from UserDict import UserDict +diff -Naur mailman-2.1.18-1/misc/paths.py.in mailman-2.1.18-1_patched/misc/paths.py.in +--- mailman-2.1.18-1/misc/paths.py.in 2014-05-06 20:43:56.000000000 +0400 ++++ mailman-2.1.18-1_patched/misc/paths.py.in 2014-11-04 15:55:49.594941540 +0300 +@@ -66,14 +66,14 @@ + # In a normal interactive Python environment, the japanese.pth and korean.pth + # files would be imported automatically. But because we inhibit the importing + # of the site module, we need to be explicit about importing these codecs. +-if not jaok: +- import japanese ++#if not jaok: ++# import japanese + # As of KoreanCodecs 2.0.5, you had to do the second import to get the Korean + # codecs installed, however leave the first import in there in case an upgrade + # changes this. +-if not kook: +- import korean +- import korean.aliases ++#if not kook: ++# import korean ++# import korean.aliases + # Arabic and Hebrew (RFC-1556) encoding aliases. (temporary solution) + import encodings.aliases + encodings.aliases.aliases.update({ diff --git a/trunk/package/mail/mailsend/Makefile b/trunk/package/mail/mailsend/Makefile new file mode 100644 index 00000000..f9480f15 --- /dev/null +++ b/trunk/package/mail/mailsend/Makefile @@ -0,0 +1,73 @@ +# +# Copyright (C) 2014-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mailsend +PKG_VERSION:=1.17b15 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/muquit/mailsend/archive/$(PKG_VERSION) +PKG_MD5SUM:=60103c411a8627e893d35e7836f904e8 + +PKG_MAINTAINER:=Ted Hess + +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=COPYRIGHT + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/mailsend/default + SECTION:=mail + CATEGORY:=Mail + TITLE:=A command-line mail sender + URL:=https://github.com/muquit/mailsend +endef + +define Package/mailsend-nossl + $(call Package/mailsend/default) + TITLE+= (without SSL) + VARIANT:=nossl +endef + +define Package/mailsend + $(call Package/mailsend/default) + TITLE+= (with SSL) + DEPENDS:=+libopenssl + VARIANT:=ssl +endef + +ifeq ($(BUILD_VARIANT),ssl) + CONFIGURE_ARGS+= --with-openssl=$(STAGING_DIR)/usr +endif + +define Package/mailsend/description + $(call Package/mailsend-nossl/description) + . + SSL supported is provided by OpenSSL. +endef + +define Package/mailsend-nossl/description + Mailsend is a simple command line program to send mail via SMTP protocol. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) +endef + +define Package/mailsend/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mailsend $(1)/usr/bin/ +endef + +Package/mailsend-nossl/install=$(Package/mailsend/install) + +$(eval $(call BuildPackage,mailsend)) +$(eval $(call BuildPackage,mailsend-nossl)) diff --git a/trunk/package/mail/msmtp/Makefile b/trunk/package/mail/msmtp/Makefile new file mode 100644 index 00000000..8c91a95b --- /dev/null +++ b/trunk/package/mail/msmtp/Makefile @@ -0,0 +1,141 @@ +# +# Copyright (C) 2009 David Cooper +# Copyright (C) 2009-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=msmtp +PKG_VERSION:=1.6.1 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@SF/msmtp +PKG_MD5SUM:=6ebba4809bbc665b8a665a018d1a5ee1 + +PKG_LICENSE:=GPL-3.0+ +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Nicolas Thill + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/msmtp/Default + SECTION:=mail + CATEGORY:=Mail + TITLE:=Simple sendmail SMTP forwarding + URL:=http://msmtp.sourceforge.net/ +endef + +define Package/msmtp/Default/description + msmtp is an SMTP client. In the default mode, it transmits a mail to + an SMTP server (for example at a free mail provider) which does the + delivery. To use this program with your mail user agent (MUA), create + a configuration file with your mail account(s) and tell your MUA to + call msmtp instead of /usr/sbin/sendmail. +endef + +define Package/msmtp +$(call Package/msmtp/Default) + DEPENDS+= +libopenssl + TITLE+= (with SSL support) + VARIANT:=ssl +endef + +define Package/msmtp/conffiles +/etc/msmtprc +endef + +define Package/msmtp/description +$(call Package/msmtp/Default/description) + This package is built with SSL support. +endef + +define Package/msmtp-nossl +$(call Package/msmtp/Default) + TITLE+= (without SSL support) + VARIANT:=nossl +endef + +define Package/msmtp-nossl/description +$(call Package/msmtp/Default/description) + This package is built without SSL support. +endef + +define Package/msmtp-queue +$(call Package/msmtp/Default) + DEPENDS+= +bash + TITLE+= (queue scripts) +endef + +define Package/msmtp-queue/description +$(call Package/msmtp/Default/description) + This package contains the msmtp queue scripts. +endef + +CONFIGURE_ARGS += \ + --disable-rpath \ + --without-libintl-prefix \ + --without-libgsasl \ + --without-libidn \ + --without-libsecret \ + --without-macosx-keyring \ + +ifneq ($(CONFIG_USE_UCLIBC),) + CONFIGURE_ARGS += --disable-gai-idn +endif + +MAKE_FLAGS := + +ifeq ($(BUILD_VARIANT),ssl) + CONFIGURE_ARGS += \ + --with-tls=openssl +endif + +ifeq ($(BUILD_VARIANT),nossl) + CONFIGURE_ARGS += \ + --with-tls=no +endif + +define Package/msmtp/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/msmtprc-system.example \ + $(1)/etc/msmtprc + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/msmtp $(1)/usr/bin/ +endef + +define Package/msmtp/postinst + [ -e $${IPKG_INSTROOT}/usr/sbin/sendmail ] || { + mkdir -p $${IPKG_INSTROOT}/usr/sbin + ln -sf ../bin/msmtp $${IPKG_INSTROOT}/usr/sbin/sendmail + } +endef + +define Package/msmtp/prerm + [ "../bin/msmtp" = "$(readlink -qs $${IPKG_INSTROOT}/usr/sbin/sendmail)" ] && { + rm -f $${IPKG_INSTROOT}/usr/sbin/sendmail + } +endef + +Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles) +Package/msmtp-nossl/install = $(Package/msmtp/install) +Package/msmtp-nossl/postinst = $(Package/msmtp/postinst) +Package/msmtp-nossl/prerm = $(Package/msmtp/prerm) + +define Package/msmtp-queue/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpq/msmtp{q,-queue} $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-{en,list,run}queue.sh $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,msmtp)) +$(eval $(call BuildPackage,msmtp-nossl)) +$(eval $(call BuildPackage,msmtp-queue)) diff --git a/trunk/package/mail/nail/Makefile b/trunk/package/mail/nail/Makefile new file mode 100644 index 00000000..541d203c --- /dev/null +++ b/trunk/package/mail/nail/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2007-2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nail +PKG_VERSION:=12.5 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-2-Clause + +PKG_SOURCE:=heirloom-mailx_$(PKG_VERSION).orig.tar.gz +PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/h/heirloom-mailx/ +PKG_MD5SUM:=29a6033ef1412824d02eb9d9213cb1f2 +PKG_BUILD_DIR:=$(BUILD_DIR)/heirloom-mailx-$(PKG_VERSION) + +PKG_INSTALL:=0 + +include $(INCLUDE_DIR)/package.mk + +define Package/nail + SECTION:=mail + CATEGORY:=Mail + TITLE:=Heirloom mailx (nail) + URL:=http://heirloom.sourceforge.net/mailx.html + MAINTAINER:=Dmitry V. Zimin + DEPENDS:=+libopenssl +endef + +define Package/nail/description + Heirloom mailx (formerly known as "nail") is intended provide + the functionality of the POSIX mailx command with additional + support for MIME messages, IMAP (including caching), POP3, + SMTP, S/MIME, message threading/sorting, scoring, and filtering +endef + +define Package/nail/conffiles +/etc/nail.rc +endef + +define Build/Install + $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/bin + $(CP) $(PKG_BUILD_DIR)/mailx $(PKG_INSTALL_DIR)/usr/bin/ + $(INSTALL_DIR) $(PKG_INSTALL_DIR)/etc + $(CP) $(PKG_BUILD_DIR)/nail.rc $(PKG_INSTALL_DIR)/etc/ +endef + +define Package/nail/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/* $(1)/etc/ +endef + +$(eval $(call BuildPackage,nail)) + diff --git a/trunk/package/mail/nail/patches/100-handle-openssl-without-sslv2.patch b/trunk/package/mail/nail/patches/100-handle-openssl-without-sslv2.patch new file mode 100644 index 00000000..4352fe87 --- /dev/null +++ b/trunk/package/mail/nail/patches/100-handle-openssl-without-sslv2.patch @@ -0,0 +1,16 @@ +--- a/openssl.c ++++ b/openssl.c +@@ -216,9 +216,12 @@ ssl_select_method(const char *uhp) + + cp = ssl_method_string(uhp); + if (cp != NULL) { ++#ifndef OPENSSL_NO_SSL2 + if (equal(cp, "ssl2")) + method = SSLv2_client_method(); +- else if (equal(cp, "ssl3")) ++ else ++#endif ++ if (equal(cp, "ssl3")) + method = SSLv3_client_method(); + else if (equal(cp, "tls1")) + method = TLSv1_client_method(); diff --git a/trunk/package/mail/postfix/Makefile b/trunk/package/mail/postfix/Makefile new file mode 100644 index 00000000..36c0f76f --- /dev/null +++ b/trunk/package/mail/postfix/Makefile @@ -0,0 +1,243 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=postfix +PKG_RELEASE:=1 +PKG_SOURCE_URL:=ftp://ftp.porcupine.org/mirrors/postfix-release/official/ +PKG_VERSION:=3.0.0 +PKG_MD5SUM:=a4a83f8d729f31c803bf9c2277701d56 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MAINTAINER:=Denis Shulyaka +PKG_LICENSE:=IPL-1.0 +PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_DEPENDS:=+POSTFIX_CDB:tinycdb + +include $(INCLUDE_DIR)/package.mk + +define Package/postfix + SECTION:=mail + CATEGORY:=Mail + TITLE:=Postfix Mail Transmit Agent + URL:=http://www.postfix.org/ + DEPENDS:=+POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +libpcre +endef + +define Package/postfix/description + Postfix is Wietse Venema's mailer that started life as an alternative to the widely-used Sendmail program. Postfix attempts to be fast, easy to administer, and secure, while at the same time being sendmail compatible enough to not upset existing users. Thus, the outside has a sendmail-ish flavor, but the inside is completely different. +endef + +define Package/postfix/config + menu "Select postfix build options" + config POSTFIX_TLS + bool "TLS support" + default y + help + Implements TLS support in postfix (using OpenSSL). + config POSTFIX_SASL + bool "SASL support" + default y + help + Implements SASL support in postfix (using Cyrus SASL). + config POSTFIX_LDAP + bool "LDAP support" + default y + help + Implements LDAP support in postfix (using OpenLDAP). + config POSTFIX_DB + bool "BerkeleyDB support" + default n + help + Implements support for btree files using Berkeley DB. Note that hash files support is not compiled into Berkeley DB OpenWRT distribution + config POSTFIX_CDB + bool "CDB support" + default y + help + Implements support for cdb files using tinycdb + endmenu +endef + +CCARGS=-DNO_EPOLL -DNO_SIGSETJMP -DNO_NIS -DNO_EAI +AUXLIBS=-L$(STAGING_DIR)/usr/lib +default_database_type=cdb + +ifdef CONFIG_POSTFIX_TLS + CCARGS+=-DUSE_TLS + AUXLIBS+=-lssl -lcrypto +endif + +ifdef CONFIG_POSTFIX_SASL + CCARGS+=-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I$(STAGING_DIR)/usr/include/sasl + AUXLIBS+=-lsasl2 +endif + +ifdef CONFIG_POSTFIX_LDAP + CCARGS+=-DHAS_LDAP + AUXLIBS+=-lldap -llber +endif + +ifdef CONFIG_POSTFIX_CDB + CCARGS+=-DHAS_CDB + AUXLIBS+=-lcdb +endif + +ifdef CONFIG_POSTFIX_DB + AUXLIBS+=-ldb + CCARGS+=-DHAS_DB + ifndef CONFIG_POSTFIX_CDB + default_database_type=btree + endif +else + CCARGS+=-DNO_DB +endif + +CCARGS+=-DDEF_DB_TYPE=\"$(default_database_type)\" + +config_directory=/etc/postfix# also add this to postfix init file +sample_directory=/etc/postfix +command_directory=/usr/sbin +daemon_directory=/usr/libexec/postfix +data_directory=/usr/var/lib/postfix +queue_directory=/usr/var/spool/postfix +mail_spool_directory=/usr/var/mail +html_directory=no +manpage_directory=no +readme_directory=no +sendmail_path=/usr/sbin/sendmail +newaliases_path=/usr/bin/newaliases +mailq_path=/usr/bin/mailq +shlib_directory=/usr/lib/postfix +meta_directory=/etc/postfix + +ln_suffix=.postfix +ln_old_suffix=.old + +define Package/postfix/conffiles +$(config_directory)/main.cf +$(config_directory)/master.cf +$(config_directory)/aliases +endef + +define Build/Configure + if [ "$(CONFIG_POSTFIX_DB)" = "" -a "$(CONFIG_POSTFIX_CDB)" = "" ]; then\ + echo "Build error: You must select at least one of the DB types";\ + exit 1;\ + fi + + cd $(PKG_BUILD_DIR); $(MAKE) makefiles CCARGS='$(CCARGS)' $(TARGET_CONFIGURE_OPTS) AUXLIBS="$(AUXLIBS)" +endef + +# Steps to regenerate files/main.cf.default: +# +# 1. Compile the package with current file +# 2. Execute the following command on target device: +# postconf -d > /tmp/main.cf.new +# 3. Transfer /tmp/main.cf.new file to the build system +# 4. Execute the following command: +# cat /tmp/main.cf.new | ( echo '# DO NOT EDIT THIS FILE. EDIT THE MAIN.CF FILE INSTEAD. THE'; echo '# TEXT HERE JUST SHOWS DEFAULT SETTINGS BUILT INTO POSTFIX.'; echo '#'; grep -v ^alias_maps\ = |grep -v ^alias_database\ = |grep -v ^command_directory\ = |grep -v ^config_directory\ = |grep -v ^daemon_directory\ = |grep -v ^data_directory\ = |grep -v ^default_database_type\ = |grep -v ^html_directory\ = |grep -v ^mail_spool_directory\ = |grep -v ^mailq_path\ = |grep -v ^manpage_directory\ = |grep -v ^meta_directory\ = |grep -v ^mydomain\ = |grep -v ^myhostname\ = |grep -v ^mynetworks\ = |grep -v ^mynetworks_style\ = |grep -v ^newaliases_path\ = |grep -v ^queue_directory\ = |grep -v ^readme_directory\ = |grep -v ^sample_directory\ = |grep -v ^sendmail_path\ = |grep -v ^shlib_directory\ = |grep -v ^smtputf8_enable\ = ) > files/main.cf.default +# 5. Done. Now you can rebuild the package with new main.cf.default. +# + +define Build/Compile + # Currently postfix has a bug with Makefiles that CCARGS are not passed to the compiler, so we are copying them to CC + cd $(PKG_BUILD_DIR); $(MAKE) $(TARGET_CONFIGURE_OPTS) CC='$(TARGET_CC) $(CCARGS)' + cp ./files/main.cf.default $(PKG_BUILD_DIR)/conf/main.cf.default + echo "default_database_type = $(default_database_type)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "alias_database = $(default_database_type):$(config_directory)/aliases" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "alias_maps = $(default_database_type):$(config_directory)/aliases" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "sendmail_path = $(sendmail_path)$(ln_suffix)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "newaliases_path = $(newaliases_path)$(ln_suffix)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "mailq_path = $(mailq_path)$(ln_suffix)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "html_directory = $(html_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "manpage_directory = $(manpage_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "sample_directory = $(sample_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "readme_directory = $(readme_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "command_directory = $(command_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "daemon_directory = $(daemon_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "data_directory = $(data_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "queue_directory = $(queue_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "config_directory = $(config_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "mail_spool_directory = $(mail_spool_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "shlib_directory = $(shlib_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "meta_directory = $(meta_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default + echo "smtputf8_enable = no" >> $(PKG_BUILD_DIR)/conf/main.cf.default +endef + +define Package/postfix/install + cd $(PKG_BUILD_DIR); $(MAKE) install_root=$(1) command_directory=$(command_directory) daemon_directory=$(daemon_directory) data_directory=$(data_directory) html_directory=$(html_directory) mail_owner=postfix mailq_path=$(mailq_path)$(ln_suffix) manpage_directory=$(manpage_directory) newaliases_path=$(newaliases_path)$(ln_suffix) queue_directory=$(queue_directory) readme_directory=$(readme_directory) sendmail_path=$(sendmail_path)$(ln_suffix) setgid_group=postdrop sample_directory=$(sample_directory) config_directory=$(config_directory) shlib_directory=$(shlib_directory) meta_directory=$(meta_directory) mail_version=$(PKG_VERSION) non-interactive-package + $(INSTALL_DIR) $(1)$(mail_spool_directory) + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/postfix.init $(1)/etc/init.d/postfix +endef + +define Package/postfix/postinst +#!/bin/sh + + if [ -f "$${IPKG_INSTROOT}$(sendmail_path)" -a "$$(readlink "$${IPKG_INSTROOT}$(sendmail_path)")" != "$(sendmail_path)$(ln_suffix)" ]; then + mv "$${IPKG_INSTROOT}$(sendmail_path)" "$${IPKG_INSTROOT}$(sendmail_path)$(ln_old_suffix)" + echo "Warning: $${IPKG_INSTROOT}$(sendmail_path) saved as $${IPKG_INSTROOT}$(sendmail_path)$(ln_old_suffix)" + fi + if [ ! -f "$${IPKG_INSTROOT}$(sendmail_path)" ]; then + ln -s "$${IPKG_INSTROOT}$(sendmail_path)$(ln_suffix)" "$(sendmail_path)" + fi + + if [ -f "$${IPKG_INSTROOT}$(newaliases_path)" -a "$$(readlink "$${IPKG_INSTROOT}$(newaliases_path)")" != "$(newaliases_path)$(ln_suffix)" ]; then + mv "$${IPKG_INSTROOT}$(newaliases_path)" "$${IPKG_INSTROOT}$(newaliases_path)$(ln_old_suffix)" + echo "Warning: $${IPKG_INSTROOT}$(newaliases_path) saved as $${IPKG_INSTROOT}$(newaliases_path)$(ln_old_suffix)" + fi + if [ ! -f "$${IPKG_INSTROOT}$(newaliases_path)" ]; then + ln -s "$${IPKG_INSTROOT}$(newaliases_path)$(ln_suffix)" "$(newaliases_path)" + fi + + if [ -f "$${IPKG_INSTROOT}$(mailq_path)" -a "$$(readlink "$${IPKG_INSTROOT}$(mailq_path)")" != "$(mailq_path)$(ln_suffix)" ]; then + mv "$${IPKG_INSTROOT}$(mailq_path)" "$${IPKG_INSTROOT}$(mailq_path)$(ln_old_suffix)" + echo "Warning: $${IPKG_INSTROOT}$(mailq_path) saved as $${IPKG_INSTROOT}$(mailq_path)$(ln_old_suffix)" + fi + if [ ! -f "$(mailq_path)" ]; then + ln -s "$${IPKG_INSTROOT}$(mailq_path)$(ln_suffix)" "$(mailq_path)" + fi + + grep -qc main\.cf "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null || echo "$(config_directory)/main.cf" >> "$${IPKG_INSTROOT}"/etc/sysupgrade.conf + grep -qc master\.cf "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null || echo "$(config_directory)/master.cf" >> "$${IPKG_INSTROOT}"/etc/sysupgrade.conf + grep -qc aliases "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null || echo "$(config_directory)/aliases" >> "$${IPKG_INSTROOT}"/etc/sysupgrade.conf + + touch "$${IPKG_INSTROOT}$(config_directory)"/opkg_postinst + + if [ -z "$${IPKG_INSTROOT}" ]; then + ps | grep "postfix/master" | grep -cvq grep >/dev/null && /etc/init.d/postfix reload + fi + +endef + +define Package/postfix/prerm +#!/bin/sh + ps | grep "postfix/master" | grep -cvq grep >/dev/null && postfix stop + /etc/init.d/postfix disable +endef + +define Package/postfix/postrm +#!/bin/sh + rm -f $${IPKG_INSTROOT}$(config_directory)/aliases.cdb $${IPKG_INSTROOT}$(config_directory)/aliases.db $${IPKG_INSTROOT}$(data_directory)/master.lock + + rm -f "$${IPKG_INSTROOT}$(sendmail_path)" "$${IPKG_INSTROOT}$(newaliases_path)" "$${IPKG_INSTROOT}$(mailq_path)" + + if [ -f "$${IPKG_INSTROOT}$(sendmail_path)$(ln_old_suffix)" ]; then + mv "$${IPKG_INSTROOT}$(sendmail_path)$(ln_old_suffix)" "$${IPKG_INSTROOT}$(sendmail_path)" + echo "Warning: $${IPKG_INSTROOT}$(sendmail_path) restored from $${IPKG_INSTROOT}$(sendmail_path)$(ln_old_suffix)" + fi + if [ -f "$${IPKG_INSTROOT}$(newaliases_path)$(ln_old_suffix)" ]; then + mv "$${IPKG_INSTROOT}$(newaliases_path)$(ln_old_suffix)" "$${IPKG_INSTROOT}$(newaliases_path)" + echo "Warning: $${IPKG_INSTROOT}$(newaliases_path) restored from $${IPKG_INSTROOT}$(newaliases_path)$(ln_old_suffix)" + fi + if [ -f "$${IPKG_INSTROOT}$(mailq_path)$(ln_old_suffix)" ]; then + mv "$${IPKG_INSTROOT}$(mailq_path)$(ln_old_suffix)" "$${IPKG_INSTROOT}$(mailq_path)" + echo "Warning: $${IPKG_INSTROOT}$(mailq_path) restored from $${IPKG_INSTROOT}$(mailq_path)$(ln_old_suffix)" + fi +endef + +$(eval $(call BuildPackage,postfix)) diff --git a/trunk/package/mail/postfix/files/main.cf.default b/trunk/package/mail/postfix/files/main.cf.default new file mode 100644 index 00000000..d9eec99e --- /dev/null +++ b/trunk/package/mail/postfix/files/main.cf.default @@ -0,0 +1,840 @@ +# DO NOT EDIT THIS FILE. EDIT THE MAIN.CF FILE INSTEAD. THE +# TEXT HERE JUST SHOWS DEFAULT SETTINGS BUILT INTO POSTFIX. +# +2bounce_notice_recipient = postmaster +access_map_defer_code = 450 +access_map_reject_code = 554 +address_verify_cache_cleanup_interval = 12h +address_verify_default_transport = $default_transport +address_verify_local_transport = $local_transport +address_verify_map = btree:$data_directory/verify_cache +address_verify_negative_cache = yes +address_verify_negative_expire_time = 3d +address_verify_negative_refresh_time = 3h +address_verify_poll_count = ${stress?{1}:{3}} +address_verify_poll_delay = 3s +address_verify_positive_expire_time = 31d +address_verify_positive_refresh_time = 7d +address_verify_relay_transport = $relay_transport +address_verify_relayhost = $relayhost +address_verify_sender = $double_bounce_sender +address_verify_sender_dependent_default_transport_maps = $sender_dependent_default_transport_maps +address_verify_sender_dependent_relayhost_maps = $sender_dependent_relayhost_maps +address_verify_sender_ttl = 0s +address_verify_service_name = verify +address_verify_transport_maps = $transport_maps +address_verify_virtual_transport = $virtual_transport +allow_mail_to_commands = alias, forward +allow_mail_to_files = alias, forward +allow_min_user = no +allow_percent_hack = yes +allow_untrusted_routing = no +alternate_config_directories = +always_add_missing_headers = no +always_bcc = +anvil_rate_time_unit = 60s +anvil_status_update_time = 600s +append_at_myorigin = yes +append_dot_mydomain = ${{$compatibility_level} < {1} ? {yes} : {no}} +application_event_drain_time = 100s +authorized_flush_users = static:anyone +authorized_mailq_users = static:anyone +authorized_submit_users = static:anyone +backwards_bounce_logfile_compatibility = yes +berkeley_db_create_buffer_size = 16777216 +berkeley_db_read_buffer_size = 131072 +best_mx_transport = +biff = yes +body_checks = +body_checks_size_limit = 51200 +bounce_notice_recipient = postmaster +bounce_queue_lifetime = 5d +bounce_service_name = bounce +bounce_size_limit = 50000 +bounce_template_file = +broken_sasl_auth_clients = no +canonical_classes = envelope_sender, envelope_recipient, header_sender, header_recipient +canonical_maps = +cleanup_service_name = cleanup +command_execution_directory = +command_expansion_filter = 1234567890!@%-_=+:,./abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ +command_time_limit = 1000s +compatibility_level = 0 +confirm_delay_cleared = no +connection_cache_protocol_timeout = 5s +connection_cache_service_name = scache +connection_cache_status_update_time = 600s +connection_cache_ttl_limit = 2s +content_filter = +cyrus_sasl_config_path = +daemon_table_open_error_is_fatal = no +daemon_timeout = 18000s +debug_peer_level = 2 +debug_peer_list = +debugger_command = +default_delivery_slot_cost = 5 +default_delivery_slot_discount = 50 +default_delivery_slot_loan = 3 +default_delivery_status_filter = +default_destination_concurrency_failed_cohort_limit = 1 +default_destination_concurrency_limit = 20 +default_destination_concurrency_negative_feedback = 1 +default_destination_concurrency_positive_feedback = 1 +default_destination_rate_delay = 0s +default_destination_recipient_limit = 50 +default_extra_recipient_limit = 1000 +default_filter_nexthop = +default_minimum_delivery_slots = 3 +default_privs = nobody +default_process_limit = 100 +default_rbl_reply = $rbl_code Service unavailable; $rbl_class [$rbl_what] blocked using $rbl_domain${rbl_reason?; $rbl_reason} +default_recipient_limit = 20000 +default_recipient_refill_delay = 5s +default_recipient_refill_limit = 100 +default_transport = smtp +default_verp_delimiters = += +defer_code = 450 +defer_service_name = defer +defer_transports = +delay_logging_resolution_limit = 2 +delay_notice_recipient = postmaster +delay_warning_time = 0h +deliver_lock_attempts = 20 +deliver_lock_delay = 1s +destination_concurrency_feedback_debug = no +detect_8bit_encoding_header = yes +disable_dns_lookups = no +disable_mime_input_processing = no +disable_mime_output_conversion = no +disable_verp_bounces = no +disable_vrfy_command = no +dnsblog_reply_delay = 0s +dnsblog_service_name = dnsblog +dont_remove = 0 +double_bounce_sender = double-bounce +duplicate_filter_limit = 1000 +empty_address_default_transport_maps_lookup_key = <> +empty_address_recipient = MAILER-DAEMON +empty_address_relayhost_maps_lookup_key = <> +enable_long_queue_ids = no +enable_original_recipient = yes +error_delivery_slot_cost = $default_delivery_slot_cost +error_delivery_slot_discount = $default_delivery_slot_discount +error_delivery_slot_loan = $default_delivery_slot_loan +error_destination_concurrency_failed_cohort_limit = $default_destination_concurrency_failed_cohort_limit +error_destination_concurrency_limit = $default_destination_concurrency_limit +error_destination_concurrency_negative_feedback = $default_destination_concurrency_negative_feedback +error_destination_concurrency_positive_feedback = $default_destination_concurrency_positive_feedback +error_destination_rate_delay = $default_destination_rate_delay +error_destination_recipient_limit = $default_destination_recipient_limit +error_extra_recipient_limit = $default_extra_recipient_limit +error_initial_destination_concurrency = $initial_destination_concurrency +error_minimum_delivery_slots = $default_minimum_delivery_slots +error_notice_recipient = postmaster +error_recipient_limit = $default_recipient_limit +error_recipient_refill_delay = $default_recipient_refill_delay +error_recipient_refill_limit = $default_recipient_refill_limit +error_service_name = error +execution_directory_expansion_filter = 1234567890!@%-_=+:,./abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ +expand_owner_alias = no +export_environment = TZ MAIL_CONFIG LANG +fallback_transport = +fallback_transport_maps = +fast_flush_domains = $relay_domains +fast_flush_purge_time = 7d +fast_flush_refresh_time = 12h +fault_injection_code = 0 +flush_service_name = flush +fork_attempts = 5 +fork_delay = 1s +forward_expansion_filter = 1234567890!@%-_=+:,./abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ +forward_path = $home/.forward${recipient_delimiter}${extension}, $home/.forward +frozen_delivered_to = yes +hash_queue_depth = 1 +hash_queue_names = deferred, defer +header_address_token_limit = 10240 +header_checks = +header_size_limit = 102400 +helpful_warnings = yes +home_mailbox = +hopcount_limit = 50 +ignore_mx_lookup_error = no +import_environment = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY LANG=C +in_flow_delay = 1s +inet_interfaces = all +inet_protocols = all +initial_destination_concurrency = 5 +internal_mail_filter_classes = +invalid_hostname_reject_code = 501 +ipc_idle = 5s +ipc_timeout = 3600s +ipc_ttl = 1000s +line_length_limit = 2048 +lmdb_map_size = 16777216 +lmtp_address_preference = any +lmtp_address_verify_target = rcpt +lmtp_assume_final = no +lmtp_bind_address = +lmtp_bind_address6 = +lmtp_body_checks = +lmtp_cname_overrides_servername = no +lmtp_connect_timeout = 0s +lmtp_connection_cache_destinations = +lmtp_connection_cache_on_demand = yes +lmtp_connection_cache_time_limit = 2s +lmtp_connection_reuse_count_limit = 0 +lmtp_connection_reuse_time_limit = 300s +lmtp_data_done_timeout = 600s +lmtp_data_init_timeout = 120s +lmtp_data_xfer_timeout = 180s +lmtp_defer_if_no_mx_address_found = no +lmtp_delivery_slot_cost = $default_delivery_slot_cost +lmtp_delivery_slot_discount = $default_delivery_slot_discount +lmtp_delivery_slot_loan = $default_delivery_slot_loan +lmtp_delivery_status_filter = $default_delivery_status_filter +lmtp_destination_concurrency_failed_cohort_limit = $default_destination_concurrency_failed_cohort_limit +lmtp_destination_concurrency_limit = $default_destination_concurrency_limit +lmtp_destination_concurrency_negative_feedback = $default_destination_concurrency_negative_feedback +lmtp_destination_concurrency_positive_feedback = $default_destination_concurrency_positive_feedback +lmtp_destination_rate_delay = $default_destination_rate_delay +lmtp_destination_recipient_limit = $default_destination_recipient_limit +lmtp_discard_lhlo_keyword_address_maps = +lmtp_discard_lhlo_keywords = +lmtp_dns_reply_filter = +lmtp_dns_resolver_options = +lmtp_dns_support_level = +lmtp_enforce_tls = no +lmtp_extra_recipient_limit = $default_extra_recipient_limit +lmtp_generic_maps = +lmtp_header_checks = +lmtp_host_lookup = dns +lmtp_initial_destination_concurrency = $initial_destination_concurrency +lmtp_lhlo_name = $myhostname +lmtp_lhlo_timeout = 300s +lmtp_line_length_limit = 998 +lmtp_mail_timeout = 300s +lmtp_mime_header_checks = +lmtp_minimum_delivery_slots = $default_minimum_delivery_slots +lmtp_mx_address_limit = 5 +lmtp_mx_session_limit = 2 +lmtp_nested_header_checks = +lmtp_per_record_deadline = no +lmtp_pix_workaround_delay_time = 10s +lmtp_pix_workaround_maps = +lmtp_pix_workaround_threshold_time = 500s +lmtp_pix_workarounds = disable_esmtp,delay_dotcrlf +lmtp_quit_timeout = 300s +lmtp_quote_rfc821_envelope = yes +lmtp_randomize_addresses = yes +lmtp_rcpt_timeout = 300s +lmtp_recipient_limit = $default_recipient_limit +lmtp_recipient_refill_delay = $default_recipient_refill_delay +lmtp_recipient_refill_limit = $default_recipient_refill_limit +lmtp_reply_filter = +lmtp_rset_timeout = 20s +lmtp_sasl_auth_cache_name = +lmtp_sasl_auth_cache_time = 90d +lmtp_sasl_auth_enable = no +lmtp_sasl_auth_soft_bounce = yes +lmtp_sasl_mechanism_filter = +lmtp_sasl_password_maps = +lmtp_sasl_path = +lmtp_sasl_security_options = noplaintext, noanonymous +lmtp_sasl_tls_security_options = $lmtp_sasl_security_options +lmtp_sasl_tls_verified_security_options = $lmtp_sasl_tls_security_options +lmtp_sasl_type = cyrus +lmtp_send_dummy_mail_auth = no +lmtp_send_xforward_command = no +lmtp_sender_dependent_authentication = no +lmtp_skip_5xx_greeting = yes +lmtp_skip_quit_response = no +lmtp_starttls_timeout = 300s +lmtp_tcp_port = 24 +lmtp_tls_CAfile = +lmtp_tls_CApath = +lmtp_tls_block_early_mail_reply = no +lmtp_tls_cert_file = +lmtp_tls_ciphers = export +lmtp_tls_dcert_file = +lmtp_tls_dkey_file = $lmtp_tls_dcert_file +lmtp_tls_eccert_file = +lmtp_tls_eckey_file = $lmtp_tls_eccert_file +lmtp_tls_enforce_peername = yes +lmtp_tls_exclude_ciphers = +lmtp_tls_fingerprint_cert_match = +lmtp_tls_fingerprint_digest = md5 +lmtp_tls_force_insecure_host_tlsa_lookup = no +lmtp_tls_key_file = $lmtp_tls_cert_file +lmtp_tls_loglevel = 0 +lmtp_tls_mandatory_ciphers = medium +lmtp_tls_mandatory_exclude_ciphers = +lmtp_tls_mandatory_protocols = !SSLv2 +lmtp_tls_note_starttls_offer = no +lmtp_tls_per_site = +lmtp_tls_policy_maps = +lmtp_tls_protocols = !SSLv2 +lmtp_tls_scert_verifydepth = 9 +lmtp_tls_secure_cert_match = nexthop +lmtp_tls_security_level = +lmtp_tls_session_cache_database = +lmtp_tls_session_cache_timeout = 3600s +lmtp_tls_trust_anchor_file = +lmtp_tls_verify_cert_match = hostname +lmtp_tls_wrappermode = no +lmtp_use_tls = no +lmtp_xforward_timeout = 300s +local_command_shell = +local_delivery_slot_cost = $default_delivery_slot_cost +local_delivery_slot_discount = $default_delivery_slot_discount +local_delivery_slot_loan = $default_delivery_slot_loan +local_delivery_status_filter = $default_delivery_status_filter +local_destination_concurrency_failed_cohort_limit = $default_destination_concurrency_failed_cohort_limit +local_destination_concurrency_limit = 2 +local_destination_concurrency_negative_feedback = $default_destination_concurrency_negative_feedback +local_destination_concurrency_positive_feedback = $default_destination_concurrency_positive_feedback +local_destination_rate_delay = $default_destination_rate_delay +local_destination_recipient_limit = 1 +local_extra_recipient_limit = $default_extra_recipient_limit +local_header_rewrite_clients = permit_inet_interfaces +local_initial_destination_concurrency = $initial_destination_concurrency +local_minimum_delivery_slots = $default_minimum_delivery_slots +local_recipient_limit = $default_recipient_limit +local_recipient_maps = proxy:unix:passwd.byname $alias_maps +local_recipient_refill_delay = $default_recipient_refill_delay +local_recipient_refill_limit = $default_recipient_refill_limit +local_transport = local:$myhostname +luser_relay = +mail_name = Postfix +mail_owner = postfix +mail_release_date = 20150208 +mail_version = 3.0.0 +mailbox_command = +mailbox_command_maps = +mailbox_delivery_lock = fcntl, dotlock +mailbox_size_limit = 51200000 +mailbox_transport = +mailbox_transport_maps = +maps_rbl_domains = +maps_rbl_reject_code = 554 +masquerade_classes = envelope_sender, header_sender, header_recipient +masquerade_domains = +masquerade_exceptions = +master_service_disable = +max_idle = 100s +max_use = 100 +maximal_backoff_time = 4000s +maximal_queue_lifetime = 5d +message_drop_headers = bcc, content-length, resent-bcc, return-path +message_reject_characters = +message_size_limit = 10240000 +message_strip_characters = +milter_command_timeout = 30s +milter_connect_macros = j {daemon_name} v +milter_connect_timeout = 30s +milter_content_timeout = 300s +milter_data_macros = i +milter_default_action = tempfail +milter_end_of_data_macros = i +milter_end_of_header_macros = i +milter_header_checks = +milter_helo_macros = {tls_version} {cipher} {cipher_bits} {cert_subject} {cert_issuer} +milter_macro_daemon_name = $myhostname +milter_macro_v = $mail_name $mail_version +milter_mail_macros = i {auth_type} {auth_authen} {auth_author} {mail_addr} {mail_host} {mail_mailer} +milter_protocol = 6 +milter_rcpt_macros = i {rcpt_addr} {rcpt_host} {rcpt_mailer} +milter_unknown_command_macros = +mime_boundary_length_limit = 2048 +mime_header_checks = $header_checks +mime_nesting_limit = 100 +minimal_backoff_time = 300s +multi_instance_directories = +multi_instance_enable = no +multi_instance_group = +multi_instance_name = +multi_instance_wrapper = +multi_recipient_bounce_reject_code = 550 +mydestination = $myhostname, localhost.$mydomain, localhost +myorigin = $myhostname +nested_header_checks = $header_checks +non_fqdn_reject_code = 504 +non_smtpd_milters = +notify_classes = resource, software +owner_request_special = yes +parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,relay_domains,smtpd_access_maps +permit_mx_backup_networks = +pickup_service_name = pickup +pipe_delivery_status_filter = $default_delivery_status_filter +plaintext_reject_code = 450 +postmulti_control_commands = reload flush +postmulti_start_commands = start +postmulti_stop_commands = stop abort drain quick-stop +postscreen_access_list = permit_mynetworks +postscreen_bare_newline_action = ignore +postscreen_bare_newline_enable = no +postscreen_bare_newline_ttl = 30d +postscreen_blacklist_action = ignore +postscreen_cache_cleanup_interval = 12h +postscreen_cache_map = btree:$data_directory/postscreen_cache +postscreen_cache_retention_time = 7d +postscreen_client_connection_count_limit = $smtpd_client_connection_count_limit +postscreen_command_count_limit = 20 +postscreen_command_filter = +postscreen_command_time_limit = ${stress?{10}:{300}}s +postscreen_disable_vrfy_command = $disable_vrfy_command +postscreen_discard_ehlo_keyword_address_maps = $smtpd_discard_ehlo_keyword_address_maps +postscreen_discard_ehlo_keywords = $smtpd_discard_ehlo_keywords +postscreen_dnsbl_action = ignore +postscreen_dnsbl_reply_map = +postscreen_dnsbl_sites = +postscreen_dnsbl_threshold = 1 +postscreen_dnsbl_timeout = 10s +postscreen_dnsbl_ttl = 1h +postscreen_dnsbl_whitelist_threshold = 0 +postscreen_enforce_tls = $smtpd_enforce_tls +postscreen_expansion_filter = $smtpd_expansion_filter +postscreen_forbidden_commands = $smtpd_forbidden_commands +postscreen_greet_action = ignore +postscreen_greet_banner = $smtpd_banner +postscreen_greet_ttl = 1d +postscreen_greet_wait = ${stress?{2}:{6}}s +postscreen_helo_required = $smtpd_helo_required +postscreen_non_smtp_command_action = drop +postscreen_non_smtp_command_enable = no +postscreen_non_smtp_command_ttl = 30d +postscreen_pipelining_action = enforce +postscreen_pipelining_enable = no +postscreen_pipelining_ttl = 30d +postscreen_post_queue_limit = $default_process_limit +postscreen_pre_queue_limit = $default_process_limit +postscreen_reject_footer = $smtpd_reject_footer +postscreen_tls_security_level = $smtpd_tls_security_level +postscreen_upstream_proxy_protocol = +postscreen_upstream_proxy_timeout = 5s +postscreen_use_tls = $smtpd_use_tls +postscreen_watchdog_timeout = 10s +postscreen_whitelist_interfaces = static:all +prepend_delivered_header = command, file, forward +process_id = 25939 +process_id_directory = pid +process_name = postconf +propagate_unmatched_extensions = canonical, virtual +proxy_interfaces = +proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $sender_bcc_maps $recipient_bcc_maps $smtp_generic_maps $lmtp_generic_maps $alias_maps $smtpd_client_restrictions $smtpd_helo_restrictions $smtpd_sender_restrictions $smtpd_relay_restrictions $smtpd_recipient_restrictions +proxy_write_maps = $smtp_sasl_auth_cache_name $lmtp_sasl_auth_cache_name $address_verify_map $postscreen_cache_map +proxymap_service_name = proxymap +proxywrite_service_name = proxywrite +qmgr_clog_warn_time = 300s +qmgr_daemon_timeout = 1000s +qmgr_fudge_factor = 100 +qmgr_ipc_timeout = 60s +qmgr_message_active_limit = 20000 +qmgr_message_recipient_limit = 20000 +qmgr_message_recipient_minimum = 10 +qmqpd_authorized_clients = +qmqpd_client_port_logging = no +qmqpd_error_delay = 1s +qmqpd_timeout = 300s +queue_file_attribute_count_limit = 100 +queue_minfree = 0 +queue_run_delay = 300s +queue_service_name = qmgr +rbl_reply_maps = +receive_override_options = +recipient_bcc_maps = +recipient_canonical_classes = envelope_recipient, header_recipient +recipient_canonical_maps = +recipient_delimiter = +reject_code = 554 +reject_tempfail_action = defer_if_permit +relay_clientcerts = +relay_delivery_slot_cost = $default_delivery_slot_cost +relay_delivery_slot_discount = $default_delivery_slot_discount +relay_delivery_slot_loan = $default_delivery_slot_loan +relay_destination_concurrency_failed_cohort_limit = $default_destination_concurrency_failed_cohort_limit +relay_destination_concurrency_limit = $default_destination_concurrency_limit +relay_destination_concurrency_negative_feedback = $default_destination_concurrency_negative_feedback +relay_destination_concurrency_positive_feedback = $default_destination_concurrency_positive_feedback +relay_destination_rate_delay = $default_destination_rate_delay +relay_destination_recipient_limit = $default_destination_recipient_limit +relay_domains = ${{$compatibility_level} < {2} ? {$mydestination} : {}} +relay_domains_reject_code = 554 +relay_extra_recipient_limit = $default_extra_recipient_limit +relay_initial_destination_concurrency = $initial_destination_concurrency +relay_minimum_delivery_slots = $default_minimum_delivery_slots +relay_recipient_limit = $default_recipient_limit +relay_recipient_maps = +relay_recipient_refill_delay = $default_recipient_refill_delay +relay_recipient_refill_limit = $default_recipient_refill_limit +relay_transport = relay +relayhost = +relocated_maps = +remote_header_rewrite_domain = +require_home_directory = no +reset_owner_alias = no +resolve_dequoted_address = yes +resolve_null_domain = no +resolve_numeric_domain = no +retry_delivery_slot_cost = $default_delivery_slot_cost +retry_delivery_slot_discount = $default_delivery_slot_discount +retry_delivery_slot_loan = $default_delivery_slot_loan +retry_destination_concurrency_failed_cohort_limit = $default_destination_concurrency_failed_cohort_limit +retry_destination_concurrency_limit = $default_destination_concurrency_limit +retry_destination_concurrency_negative_feedback = $default_destination_concurrency_negative_feedback +retry_destination_concurrency_positive_feedback = $default_destination_concurrency_positive_feedback +retry_destination_rate_delay = $default_destination_rate_delay +retry_destination_recipient_limit = $default_destination_recipient_limit +retry_extra_recipient_limit = $default_extra_recipient_limit +retry_initial_destination_concurrency = $initial_destination_concurrency +retry_minimum_delivery_slots = $default_minimum_delivery_slots +retry_recipient_limit = $default_recipient_limit +retry_recipient_refill_delay = $default_recipient_refill_delay +retry_recipient_refill_limit = $default_recipient_refill_limit +rewrite_service_name = rewrite +send_cyrus_sasl_authzid = no +sender_bcc_maps = +sender_canonical_classes = envelope_sender, header_sender +sender_canonical_maps = +sender_dependent_default_transport_maps = +sender_dependent_relayhost_maps = +sendmail_fix_line_endings = always +service_throttle_time = 60s +setgid_group = postdrop +show_user_unknown_table_name = yes +showq_service_name = showq +smtp_address_preference = any +smtp_address_verify_target = rcpt +smtp_always_send_ehlo = yes +smtp_bind_address = +smtp_bind_address6 = +smtp_body_checks = +smtp_cname_overrides_servername = no +smtp_connect_timeout = 30s +smtp_connection_cache_destinations = +smtp_connection_cache_on_demand = yes +smtp_connection_cache_time_limit = 2s +smtp_connection_reuse_count_limit = 0 +smtp_connection_reuse_time_limit = 300s +smtp_data_done_timeout = 600s +smtp_data_init_timeout = 120s +smtp_data_xfer_timeout = 180s +smtp_defer_if_no_mx_address_found = no +smtp_delivery_slot_cost = $default_delivery_slot_cost +smtp_delivery_slot_discount = $default_delivery_slot_discount +smtp_delivery_slot_loan = $default_delivery_slot_loan +smtp_delivery_status_filter = $default_delivery_status_filter +smtp_destination_concurrency_failed_cohort_limit = $default_destination_concurrency_failed_cohort_limit +smtp_destination_concurrency_limit = $default_destination_concurrency_limit +smtp_destination_concurrency_negative_feedback = $default_destination_concurrency_negative_feedback +smtp_destination_concurrency_positive_feedback = $default_destination_concurrency_positive_feedback +smtp_destination_rate_delay = $default_destination_rate_delay +smtp_destination_recipient_limit = $default_destination_recipient_limit +smtp_discard_ehlo_keyword_address_maps = +smtp_discard_ehlo_keywords = +smtp_dns_reply_filter = +smtp_dns_resolver_options = +smtp_dns_support_level = +smtp_enforce_tls = no +smtp_extra_recipient_limit = $default_extra_recipient_limit +smtp_fallback_relay = $fallback_relay +smtp_generic_maps = +smtp_header_checks = +smtp_helo_name = $myhostname +smtp_helo_timeout = 300s +smtp_host_lookup = dns +smtp_initial_destination_concurrency = $initial_destination_concurrency +smtp_line_length_limit = 998 +smtp_mail_timeout = 300s +smtp_mime_header_checks = +smtp_minimum_delivery_slots = $default_minimum_delivery_slots +smtp_mx_address_limit = 5 +smtp_mx_session_limit = 2 +smtp_nested_header_checks = +smtp_never_send_ehlo = no +smtp_per_record_deadline = no +smtp_pix_workaround_delay_time = 10s +smtp_pix_workaround_maps = +smtp_pix_workaround_threshold_time = 500s +smtp_pix_workarounds = disable_esmtp,delay_dotcrlf +smtp_quit_timeout = 300s +smtp_quote_rfc821_envelope = yes +smtp_randomize_addresses = yes +smtp_rcpt_timeout = 300s +smtp_recipient_limit = $default_recipient_limit +smtp_recipient_refill_delay = $default_recipient_refill_delay +smtp_recipient_refill_limit = $default_recipient_refill_limit +smtp_reply_filter = +smtp_rset_timeout = 20s +smtp_sasl_auth_cache_name = +smtp_sasl_auth_cache_time = 90d +smtp_sasl_auth_enable = no +smtp_sasl_auth_soft_bounce = yes +smtp_sasl_mechanism_filter = +smtp_sasl_password_maps = +smtp_sasl_path = +smtp_sasl_security_options = noplaintext, noanonymous +smtp_sasl_tls_security_options = $smtp_sasl_security_options +smtp_sasl_tls_verified_security_options = $smtp_sasl_tls_security_options +smtp_sasl_type = cyrus +smtp_send_dummy_mail_auth = no +smtp_send_xforward_command = no +smtp_sender_dependent_authentication = no +smtp_skip_5xx_greeting = yes +smtp_skip_quit_response = yes +smtp_starttls_timeout = 300s +smtp_tls_CAfile = +smtp_tls_CApath = +smtp_tls_block_early_mail_reply = no +smtp_tls_cert_file = +smtp_tls_ciphers = export +smtp_tls_dcert_file = +smtp_tls_dkey_file = $smtp_tls_dcert_file +smtp_tls_eccert_file = +smtp_tls_eckey_file = $smtp_tls_eccert_file +smtp_tls_enforce_peername = yes +smtp_tls_exclude_ciphers = +smtp_tls_fingerprint_cert_match = +smtp_tls_fingerprint_digest = md5 +smtp_tls_force_insecure_host_tlsa_lookup = no +smtp_tls_key_file = $smtp_tls_cert_file +smtp_tls_loglevel = 0 +smtp_tls_mandatory_ciphers = medium +smtp_tls_mandatory_exclude_ciphers = +smtp_tls_mandatory_protocols = !SSLv2 +smtp_tls_note_starttls_offer = no +smtp_tls_per_site = +smtp_tls_policy_maps = +smtp_tls_protocols = !SSLv2 +smtp_tls_scert_verifydepth = 9 +smtp_tls_secure_cert_match = nexthop, dot-nexthop +smtp_tls_security_level = +smtp_tls_session_cache_database = +smtp_tls_session_cache_timeout = 3600s +smtp_tls_trust_anchor_file = +smtp_tls_verify_cert_match = hostname +smtp_tls_wrappermode = no +smtp_use_tls = no +smtp_xforward_timeout = 300s +smtpd_authorized_verp_clients = $authorized_verp_clients +smtpd_authorized_xclient_hosts = +smtpd_authorized_xforward_hosts = +smtpd_banner = $myhostname ESMTP $mail_name +smtpd_client_connection_count_limit = 50 +smtpd_client_connection_rate_limit = 0 +smtpd_client_event_limit_exceptions = ${smtpd_client_connection_limit_exceptions:$mynetworks} +smtpd_client_message_rate_limit = 0 +smtpd_client_new_tls_session_rate_limit = 0 +smtpd_client_port_logging = no +smtpd_client_recipient_rate_limit = 0 +smtpd_client_restrictions = +smtpd_command_filter = +smtpd_data_restrictions = +smtpd_delay_open_until_valid_rcpt = yes +smtpd_delay_reject = yes +smtpd_discard_ehlo_keyword_address_maps = +smtpd_discard_ehlo_keywords = +smtpd_dns_reply_filter = +smtpd_end_of_data_restrictions = +smtpd_enforce_tls = no +smtpd_error_sleep_time = 1s +smtpd_etrn_restrictions = +smtpd_expansion_filter = \t\40!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +smtpd_forbidden_commands = CONNECT GET POST +smtpd_hard_error_limit = ${stress?{1}:{20}} +smtpd_helo_required = no +smtpd_helo_restrictions = +smtpd_history_flush_threshold = 100 +smtpd_junk_command_limit = ${stress?{1}:{100}} +smtpd_log_access_permit_actions = +smtpd_milters = +smtpd_noop_commands = +smtpd_null_access_lookup_key = <> +smtpd_peername_lookup = yes +smtpd_per_record_deadline = ${stress?{yes}:{no}} +smtpd_policy_service_default_action = 451 4.3.5 Server configuration problem +smtpd_policy_service_max_idle = 300s +smtpd_policy_service_max_ttl = 1000s +smtpd_policy_service_request_limit = 0 +smtpd_policy_service_retry_delay = 1s +smtpd_policy_service_timeout = 100s +smtpd_policy_service_try_limit = 2 +smtpd_proxy_ehlo = $myhostname +smtpd_proxy_filter = +smtpd_proxy_options = +smtpd_proxy_timeout = 100s +smtpd_recipient_limit = 1000 +smtpd_recipient_overshoot_limit = 1000 +smtpd_recipient_restrictions = +smtpd_reject_footer = +smtpd_reject_unlisted_recipient = yes +smtpd_reject_unlisted_sender = no +smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination +smtpd_restriction_classes = +smtpd_sasl_auth_enable = no +smtpd_sasl_authenticated_header = no +smtpd_sasl_exceptions_networks = +smtpd_sasl_local_domain = +smtpd_sasl_path = smtpd +smtpd_sasl_security_options = noanonymous +smtpd_sasl_service = smtp +smtpd_sasl_tls_security_options = $smtpd_sasl_security_options +smtpd_sasl_type = cyrus +smtpd_sender_login_maps = +smtpd_sender_restrictions = +smtpd_service_name = smtpd +smtpd_soft_error_limit = 10 +smtpd_starttls_timeout = ${stress?{10}:{300}}s +smtpd_timeout = ${stress?{10}:{300}}s +smtpd_tls_CAfile = +smtpd_tls_CApath = +smtpd_tls_always_issue_session_ids = yes +smtpd_tls_ask_ccert = no +smtpd_tls_auth_only = no +smtpd_tls_ccert_verifydepth = 9 +smtpd_tls_cert_file = +smtpd_tls_ciphers = export +smtpd_tls_dcert_file = +smtpd_tls_dh1024_param_file = +smtpd_tls_dh512_param_file = +smtpd_tls_dkey_file = $smtpd_tls_dcert_file +smtpd_tls_eccert_file = +smtpd_tls_eckey_file = $smtpd_tls_eccert_file +smtpd_tls_eecdh_grade = strong +smtpd_tls_exclude_ciphers = +smtpd_tls_fingerprint_digest = md5 +smtpd_tls_key_file = $smtpd_tls_cert_file +smtpd_tls_loglevel = 0 +smtpd_tls_mandatory_ciphers = medium +smtpd_tls_mandatory_exclude_ciphers = +smtpd_tls_mandatory_protocols = !SSLv2 +smtpd_tls_protocols = +smtpd_tls_received_header = no +smtpd_tls_req_ccert = no +smtpd_tls_security_level = +smtpd_tls_session_cache_database = +smtpd_tls_session_cache_timeout = 3600s +smtpd_tls_wrappermode = no +smtpd_upstream_proxy_protocol = +smtpd_upstream_proxy_timeout = 5s +smtpd_use_tls = no +smtputf8_autodetect_classes = sendmail, verify +soft_bounce = no +stale_lock_time = 500s +stress = +strict_7bit_headers = no +strict_8bitmime = no +strict_8bitmime_body = no +strict_mailbox_ownership = yes +strict_mime_encoding_domain = no +strict_rfc821_envelopes = no +strict_smtputf8 = no +sun_mailtool_compatibility = no +swap_bangpath = yes +syslog_facility = mail +syslog_name = ${multi_instance_name?{$multi_instance_name}:{postfix}} +tcp_windowsize = 0 +tls_append_default_CA = no +tls_daemon_random_bytes = 32 +tls_dane_digest_agility = on +tls_dane_digests = sha512 sha256 +tls_dane_trust_anchor_digest_enable = yes +tls_disable_workarounds = +tls_eecdh_strong_curve = prime256v1 +tls_eecdh_ultra_curve = secp384r1 +tls_export_cipherlist = aNULL:-aNULL:ALL:+RC4:@STRENGTH +tls_high_cipherlist = aNULL:-aNULL:ALL:!EXPORT:!LOW:!MEDIUM:+RC4:@STRENGTH +tls_legacy_public_key_fingerprints = no +tls_low_cipherlist = aNULL:-aNULL:ALL:!EXPORT:+RC4:@STRENGTH +tls_medium_cipherlist = aNULL:-aNULL:ALL:!EXPORT:!LOW:+RC4:@STRENGTH +tls_null_cipherlist = eNULL:!aNULL +tls_preempt_cipherlist = no +tls_random_bytes = 32 +tls_random_exchange_name = ${data_directory}/prng_exch +tls_random_prng_update_period = 3600s +tls_random_reseed_period = 3600s +tls_random_source = dev:/dev/urandom +tls_session_ticket_cipher = aes-128-cbc +tls_ssl_options = +tls_wildcard_matches_multiple_labels = yes +tlsmgr_service_name = tlsmgr +tlsproxy_enforce_tls = $smtpd_enforce_tls +tlsproxy_service_name = tlsproxy +tlsproxy_tls_CAfile = $smtpd_tls_CAfile +tlsproxy_tls_CApath = $smtpd_tls_CApath +tlsproxy_tls_always_issue_session_ids = $smtpd_tls_always_issue_session_ids +tlsproxy_tls_ask_ccert = $smtpd_tls_ask_ccert +tlsproxy_tls_ccert_verifydepth = $smtpd_tls_ccert_verifydepth +tlsproxy_tls_cert_file = $smtpd_tls_cert_file +tlsproxy_tls_ciphers = $smtpd_tls_ciphers +tlsproxy_tls_dcert_file = $smtpd_tls_dcert_file +tlsproxy_tls_dh1024_param_file = $smtpd_tls_dh1024_param_file +tlsproxy_tls_dh512_param_file = $smtpd_tls_dh512_param_file +tlsproxy_tls_dkey_file = $smtpd_tls_dkey_file +tlsproxy_tls_eccert_file = $smtpd_tls_eccert_file +tlsproxy_tls_eckey_file = $smtpd_tls_eckey_file +tlsproxy_tls_eecdh_grade = $smtpd_tls_eecdh_grade +tlsproxy_tls_exclude_ciphers = $smtpd_tls_exclude_ciphers +tlsproxy_tls_fingerprint_digest = $smtpd_tls_fingerprint_digest +tlsproxy_tls_key_file = $smtpd_tls_key_file +tlsproxy_tls_loglevel = $smtpd_tls_loglevel +tlsproxy_tls_mandatory_ciphers = $smtpd_tls_mandatory_ciphers +tlsproxy_tls_mandatory_exclude_ciphers = $smtpd_tls_mandatory_exclude_ciphers +tlsproxy_tls_mandatory_protocols = $smtpd_tls_mandatory_protocols +tlsproxy_tls_protocols = $smtpd_tls_protocols +tlsproxy_tls_req_ccert = $smtpd_tls_req_ccert +tlsproxy_tls_security_level = $smtpd_tls_security_level +tlsproxy_use_tls = $smtpd_use_tls +tlsproxy_watchdog_timeout = 10s +trace_service_name = trace +transport_maps = +transport_retry_time = 60s +trigger_timeout = 10s +undisclosed_recipients_header = +unknown_address_reject_code = 450 +unknown_address_tempfail_action = $reject_tempfail_action +unknown_client_reject_code = 450 +unknown_helo_hostname_tempfail_action = $reject_tempfail_action +unknown_hostname_reject_code = 450 +unknown_local_recipient_reject_code = 550 +unknown_relay_recipient_reject_code = 550 +unknown_virtual_alias_reject_code = 550 +unknown_virtual_mailbox_reject_code = 550 +unverified_recipient_defer_code = 450 +unverified_recipient_reject_code = 450 +unverified_recipient_reject_reason = +unverified_recipient_tempfail_action = $reject_tempfail_action +unverified_sender_defer_code = 450 +unverified_sender_reject_code = 450 +unverified_sender_reject_reason = +unverified_sender_tempfail_action = $reject_tempfail_action +verp_delimiter_filter = -=+ +virtual_alias_address_length_limit = 1000 +virtual_alias_domains = $virtual_alias_maps +virtual_alias_expansion_limit = 1000 +virtual_alias_maps = $virtual_maps +virtual_alias_recursion_limit = 1000 +virtual_delivery_slot_cost = $default_delivery_slot_cost +virtual_delivery_slot_discount = $default_delivery_slot_discount +virtual_delivery_slot_loan = $default_delivery_slot_loan +virtual_delivery_status_filter = $default_delivery_status_filter +virtual_destination_concurrency_failed_cohort_limit = $default_destination_concurrency_failed_cohort_limit +virtual_destination_concurrency_limit = $default_destination_concurrency_limit +virtual_destination_concurrency_negative_feedback = $default_destination_concurrency_negative_feedback +virtual_destination_concurrency_positive_feedback = $default_destination_concurrency_positive_feedback +virtual_destination_rate_delay = $default_destination_rate_delay +virtual_destination_recipient_limit = $default_destination_recipient_limit +virtual_extra_recipient_limit = $default_extra_recipient_limit +virtual_gid_maps = +virtual_initial_destination_concurrency = $initial_destination_concurrency +virtual_mailbox_base = +virtual_mailbox_domains = $virtual_mailbox_maps +virtual_mailbox_limit = 51200000 +virtual_mailbox_lock = fcntl, dotlock +virtual_mailbox_maps = +virtual_minimum_delivery_slots = $default_minimum_delivery_slots +virtual_minimum_uid = 100 +virtual_recipient_limit = $default_recipient_limit +virtual_recipient_refill_delay = $default_recipient_refill_delay +virtual_recipient_refill_limit = $default_recipient_refill_limit +virtual_transport = virtual +virtual_uid_maps = diff --git a/trunk/package/mail/postfix/files/postfix.init b/trunk/package/mail/postfix/files/postfix.init new file mode 100644 index 00000000..1f3bc5e8 --- /dev/null +++ b/trunk/package/mail/postfix/files/postfix.init @@ -0,0 +1,64 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2014 OpenWrt.org + +START=50 +STOP=50 + +upgrade() { + config_directory="$IPKG_INSTROOT"/etc/postfix + + if [ -f "$config_directory"/opkg_postinst ]; then + rm -f "$config_directory"/opkg_postinst + + group_exists postfix || group_add postfix 87 + user_exists postfix || user_add postfix 87 + group_exists postdrop || group_add postdrop 88 + + echo "myhostname = $(uci get system.@system[0].hostname)" >> "$config_directory"/main.cf.default + echo "mydomain = $(uci get system.@system[0].hostname|sed -e "s/[^\.]*\.\(.*\)/\1/")" >> "$config_directory"/main.cf.default + ifconfig | grep "inet addr" | sed -e "s/.*inet addr:\([0-9.]*\).*Mask:/\1 /" | while read IP NETMASK; do eval "$(ipcalc.sh $IP $NETMASK)"; echo "$NETWORK/$PREFIX"; done | xargs echo "mynetworks =" >> "$config_directory"/main.cf.default + echo "mynetworks_style = subnet" >> "$config_directory"/main.cf.default + + grep -qc "^sendmail_path[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^sendmail_path =" "$config_directory"/main.cf.default)" + grep -qc "^newaliases_path[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^newaliases_path =" "$config_directory"/main.cf.default)" + grep -qc "^mailq_path[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^mailq_path =" "$config_directory"/main.cf.default)" + grep -qc "^html_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^html_directory =" "$config_directory"/main.cf.default)" + grep -qc "^manpage_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^manpage_directory =" "$config_directory"/main.cf.default)" + grep -qc "^sample_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^sample_directory =" "$config_directory"/main.cf.default)" + grep -qc "^readme_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^readme_directory =" "$config_directory"/main.cf.default)" + grep -qc "^command_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^command_directory =" "$config_directory"/main.cf.default)" + grep -qc "^daemon_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^daemon_directory =" "$config_directory"/main.cf.default)" + grep -qc "^data_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^data_directory =" "$config_directory"/main.cf.default)" + grep -qc "^queue_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^queue_directory =" "$config_directory"/main.cf.default)" + grep -qc "^config_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^config_directory =" "$config_directory"/main.cf.default)" + grep -qc "^mail_spool_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^mail_spool_directory =" "$config_directory"/main.cf.default)" + grep -qc "^mail_owner[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^mail_owner =" "$config_directory"/main.cf.default)" + grep -qc "^setgid_group[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^setgid_group =" "$config_directory"/main.cf.default)" + grep -qc "^myhostname[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^myhostname =" "$config_directory"/main.cf.default)" + grep -qc "^mydomain[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^mydomain =" "$config_directory"/main.cf.default)" + grep -qc "^mynetworks[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^mynetworks =" "$config_directory"/main.cf.default)" + grep -qc "^mynetworks_style[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^mynetworks_style =" "$config_directory"/main.cf.default)" + grep -qc "^shlib_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^shlib_directory =" "$config_directory"/main.cf.default)" + grep -qc "^meta_directory[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^meta_directory =" "$config_directory"/main.cf.default)" + grep -qc "^smtputf8_enable[^_]" "$config_directory"/main.cf >/dev/null || postconf -e "$(grep "^smtputf8_enable =" "$config_directory"/main.cf.default)" + + postfix set-permissions + postfix post-install upgrade-source + postfix upgrade-configuration + newaliases + fi +} + +start() { + upgrade + postfix start +} + +stop() { + postfix stop +} + +reload() { + upgrade + postfix reload +} diff --git a/trunk/package/mail/postfix/patches/100-fsstat.patch b/trunk/package/mail/postfix/patches/100-fsstat.patch new file mode 100644 index 00000000..ca43025c --- /dev/null +++ b/trunk/package/mail/postfix/patches/100-fsstat.patch @@ -0,0 +1,12 @@ +diff -rupN postfix-2.8.1/src/smtpd/smtpd_check.c postfix-2.8.1_patched/src/smtpd/smtpd_check.c +--- postfix-2.8.1/src/smtpd/smtpd_check.c 2011-01-04 22:03:50.000000000 +0300 ++++ postfix-2.8.1_patched/src/smtpd/smtpd_check.c 2011-03-06 19:35:39.000000000 +0300 +@@ -5277,7 +5277,7 @@ char *smtpd_check_queue(SMTPD_STATE *s + */ + #define BLOCKS(x) ((x) / fsbuf.block_size) + +- fsspace(".", &fsbuf); ++ fsspace("/overlay", &fsbuf); + if (msg_verbose) + msg_info("%s: blocks %lu avail %lu min_free %lu msg_size_limit %lu", + myname, diff --git a/trunk/package/mail/postfix/patches/200-manpages.patch b/trunk/package/mail/postfix/patches/200-manpages.patch new file mode 100644 index 00000000..6344e93b --- /dev/null +++ b/trunk/package/mail/postfix/patches/200-manpages.patch @@ -0,0 +1,80 @@ +diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-install +--- postfix-2.10.2/conf/post-install 2013-06-13 18:07:46.000000000 +0400 ++++ postfix-2.10.2_patched/conf/post-install 2013-11-19 21:17:49.572820573 +0400 +@@ -359,10 +359,10 @@ + + # Sanity checks + +-case $manpage_directory in +- no) echo $0: Error: manpage_directory no longer accepts \"no\" values. 1>&2 +- echo Try again with \"$0 manpage_directory=/pathname ...\". 1>&2; exit 1;; +-esac ++#case $manpage_directory in ++# no) echo $0: Error: manpage_directory no longer accepts \"no\" values. 1>&2 ++# echo Try again with \"$0 manpage_directory=/pathname ...\". 1>&2; exit 1;; ++#esac + + case $setgid_group in + no) echo $0: Error: setgid_group no longer accepts \"no\" values. 1>&2 +@@ -370,7 +370,7 @@ + esac + + for path in "$daemon_directory" "$command_directory" "$queue_directory" \ +- "$sendmail_path" "$newaliases_path" "$mailq_path" "$manpage_directory" \ ++ "$sendmail_path" "$newaliases_path" "$mailq_path" \ + "$meta_directory" + do + case "$path" in +@@ -379,7 +379,7 @@ + esac + done + +-for path in "$html_directory" "$readme_directory" "$shlib_directory" ++for path in "$html_directory" "$readme_directory" "$shlib_directory" "$manpage_directory" + do + case "$path" in + /*) ;; +diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install +--- postfix-2.10.2/postfix-install 2012-05-22 23:40:29.000000000 +0400 ++++ postfix-2.10.2_patched/postfix-install 2013-11-19 21:12:20.694160734 +0400 +@@ -543,13 +543,13 @@ + exit 1;; + esac + +-case "$manpage_directory" in +- no) (echo $0: Error: the manpage_directory parameter no longer accepts +- echo \"no\" values. Try again with \"manpage_directory=/path/name\" +- echo on the command line or execute \"make install\" and specify +- echo manpage_directory interactively.) | ${FMT} 1>&2 +- exit 1;; +-esac ++#case "$manpage_directory" in ++# no) (echo $0: Error: the manpage_directory parameter no longer accepts ++# echo \"no\" values. Try again with \"manpage_directory=/path/name\" ++# echo on the command line or execute \"make install\" and specify ++# echo manpage_directory interactively.) | ${FMT} 1>&2 ++# exit 1;; ++#esac + + for path in "$html_directory" "$readme_directory" "$shlib_directory" + do +@@ -562,7 +562,7 @@ + done + + for path in "$daemon_directory" "$data_directory" "$command_directory" "$queue_directory" \ +- "$sendmail_path" "$newaliases_path" "$mailq_path" "$manpage_directory" \ ++ "$sendmail_path" "$newaliases_path" "$mailq_path" \ + "$meta_directory" + do + case "$path" in +@@ -758,8 +758,8 @@ + compare_or_replace $mode "$owner" "$group" html/$file \ + $HTML_DIRECTORY/$file || exit 1;; + '$manpage_directory') +- check_parent $MANPAGE_DIRECTORY/$file || exit 1 +- compare_or_replace $mode "$owner" "$group" man/$file \ ++ test "$manpage_directory" = "no" || check_parent $MANPAGE_DIRECTORY/$file || exit 1 ++ test "$manpage_directory" = "no" || compare_or_replace $mode "$owner" "$group" man/$file \ + $MANPAGE_DIRECTORY/$file || exit 1;; + '$readme_directory') + test "$readme_directory" = "no" || diff --git a/trunk/package/mail/postfix/patches/300-bdb_hash_segfault.patch b/trunk/package/mail/postfix/patches/300-bdb_hash_segfault.patch new file mode 100644 index 00000000..1a9d8e9d --- /dev/null +++ b/trunk/package/mail/postfix/patches/300-bdb_hash_segfault.patch @@ -0,0 +1,14 @@ +diff -Naur postfix-2.11.3/src/util/dict_db.c postfix-2.11.3_patched/src/util/dict_db.c +--- postfix-2.11.3/src/util/dict_db.c 2012-01-25 04:41:08.000000000 +0400 ++++ postfix-2.11.3_patched/src/util/dict_db.c 2014-11-01 12:36:44.287641712 +0300 +@@ -687,8 +687,8 @@ + msg_panic("db_create null result"); + if ((errno = db->set_cachesize(db, 0, dict_db_cache_size, 0)) != 0) + msg_fatal("set DB cache size %d: %m", dict_db_cache_size); +- if (type == DB_HASH && db->set_h_nelem(db, DICT_DB_NELM) != 0) +- msg_fatal("set DB hash element count %d: %m", DICT_DB_NELM); ++// if (type == DB_HASH && db->set_h_nelem(db, DICT_DB_NELM) != 0) ++// msg_fatal("set DB hash element count %d: %m", DICT_DB_NELM); + #if DB_VERSION_MAJOR == 6 || DB_VERSION_MAJOR == 5 || \ + (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0) + if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0) diff --git a/trunk/package/mail/postfix/patches/400-cdb.patch b/trunk/package/mail/postfix/patches/400-cdb.patch new file mode 100644 index 00000000..8aeaea5e --- /dev/null +++ b/trunk/package/mail/postfix/patches/400-cdb.patch @@ -0,0 +1,14 @@ +diff -Naur postfix-2.11.1/src/util/sys_defs.h postfix-2.11.1.patched/src/util/sys_defs.h +--- postfix-2.11.1/src/util/sys_defs.h 2013-09-30 00:51:55.000000000 +0400 ++++ postfix-2.11.1.patched/src/util/sys_defs.h 2014-09-29 03:11:48.962277971 +0400 +@@ -768,9 +768,8 @@ + #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK + #define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */ + #define HAS_FSYNC +-#define HAS_DB + #define NATIVE_DB_TYPE "hash" +-#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases" ++#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/postfix/aliases" + #ifndef NO_NIS + #define HAS_NIS + #endif diff --git a/trunk/package/mail/postfix/patches/500-crosscompile.patch b/trunk/package/mail/postfix/patches/500-crosscompile.patch new file mode 100644 index 00000000..e4123ef0 --- /dev/null +++ b/trunk/package/mail/postfix/patches/500-crosscompile.patch @@ -0,0 +1,27 @@ +--- postfix-2.10.2/makedefs 2013-02-04 05:33:13.000000000 +0400 ++++ postfix-2.10.2_patched/makedefs 2013-11-19 22:48:50.528560454 +0400 +@@ -190,9 +190,9 @@ + + case $# in + # Officially supported usage. +- 0) SYSTEM=`(uname -s) 2>/dev/null` +- RELEASE=`(uname -r) 2>/dev/null` +- VERSION=`(uname -v) 2>/dev/null` ++ 0) SYSTEM="Linux" ++ RELEASE="3.10.18" ++ VERSION="OpenWRT" + case "$VERSION" in + dcosx*) SYSTEM=$VERSION;; + esac;; +@@ -522,9 +522,9 @@ + esac + for name in nsl resolv + do +- for lib in /usr/lib64 /lib64 /usr/lib /usr/lib/* /lib /lib/* ++ for lib in /usr/lib64 /usr/lib64/* /usr/lib /usr/lib/* /lib /lib/* + do +- test -e $lib/lib$name.a -o -e $lib/lib$name.so && { ++ test -e $PKG_BUILD_DIR/$lib/lib$name.a -o -e $PKG_BUILD_DIR/$lib/lib$name.so && { + SYSLIBS="$SYSLIBS -l$name" + break + } diff --git a/trunk/package/mail/postfix/patches/600-nopostconf.patch b/trunk/package/mail/postfix/patches/600-nopostconf.patch new file mode 100644 index 00000000..6140e23f --- /dev/null +++ b/trunk/package/mail/postfix/patches/600-nopostconf.patch @@ -0,0 +1,44 @@ +diff -Naur postfix-2.11.1/postfix-install postfix-2.11.1.patched/postfix-install +--- postfix-2.11.1/postfix-install 2014-10-05 20:43:58.598876904 +0400 ++++ postfix-2.11.1.patched/postfix-install 2014-10-05 20:47:36.076700082 +0400 +@@ -830,23 +830,23 @@ + esac + done + +-bin/postconf -c $CONFIG_DIRECTORY -e \ +- "daemon_directory = $daemon_directory" \ +- "data_directory = $data_directory" \ +- "command_directory = $command_directory" \ +- "queue_directory = $queue_directory" \ +- "mail_owner = $mail_owner" \ +- "setgid_group = $setgid_group" \ +- "sendmail_path = $sendmail_path" \ +- "mailq_path = $mailq_path" \ +- "newaliases_path = $newaliases_path" \ +- "html_directory = $html_directory" \ +- "manpage_directory = $manpage_directory" \ +- "sample_directory = $sample_directory" \ +- "readme_directory = $readme_directory" \ +- "shlib_directory = $shlib_directory" \ +- "meta_directory = $meta_directory" \ +-|| exit 1 ++#bin/postconf -c $CONFIG_DIRECTORY -e \ ++# "daemon_directory = $daemon_directory" \ ++# "data_directory = $data_directory" \ ++# "command_directory = $command_directory" \ ++# "queue_directory = $queue_directory" \ ++# "mail_owner = $mail_owner" \ ++# "setgid_group = $setgid_group" \ ++# "sendmail_path = $sendmail_path" \ ++# "mailq_path = $mailq_path" \ ++# "newaliases_path = $newaliases_path" \ ++# "html_directory = $html_directory" \ ++# "manpage_directory = $manpage_directory" \ ++# "sample_directory = $sample_directory" \ ++# "readme_directory = $readme_directory" \ ++# "shlib_directory = $shlib_directory" \ ++# "meta_directory = $meta_directory" \ ++#|| exit 1 + + # If Postfix is being installed locally from source code, do the + # post-install processing now. diff --git a/trunk/package/mail/postfix/patches/700-defaultconfig.patch b/trunk/package/mail/postfix/patches/700-defaultconfig.patch new file mode 100644 index 00000000..99088d19 --- /dev/null +++ b/trunk/package/mail/postfix/patches/700-defaultconfig.patch @@ -0,0 +1,93 @@ +diff -Naur postfix-2.11.1/conf/main.cf postfix-2.11.1.patched/conf/main.cf +--- postfix-2.11.1/conf/main.cf 2013-12-24 18:57:25.000000000 +0400 ++++ postfix-2.11.1.patched/conf/main.cf 2014-10-05 21:35:53.427534410 +0400 +@@ -40,43 +40,8 @@ + # + #soft_bounce = no + +-# LOCAL PATHNAME INFORMATION +-# +-# The queue_directory specifies the location of the Postfix queue. +-# This is also the root directory of Postfix daemons that run chrooted. +-# See the files in examples/chroot-setup for setting up Postfix chroot +-# environments on different UNIX systems. +-# +-queue_directory = /var/spool/postfix +- +-# The command_directory parameter specifies the location of all +-# postXXX commands. +-# +-command_directory = /usr/sbin +- +-# The daemon_directory parameter specifies the location of all Postfix +-# daemon programs (i.e. programs listed in the master.cf file). This +-# directory must be owned by root. +-# +-daemon_directory = /usr/libexec/postfix +- +-# The data_directory parameter specifies the location of Postfix-writable +-# data files (caches, random numbers). This directory must be owned +-# by the mail_owner account (see below). +-# +-data_directory = /var/lib/postfix +- + # QUEUE AND PROCESS OWNERSHIP + # +-# The mail_owner parameter specifies the owner of the Postfix queue +-# and of most Postfix daemon processes. Specify the name of a user +-# account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS +-# AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In +-# particular, don't specify nobody or daemon. PLEASE USE A DEDICATED +-# USER. +-# +-mail_owner = postfix +- + # The default_privs parameter specifies the default rights used by + # the local delivery agent for delivery to external file or command. + # These rights are used in the absence of a recipient user context. +@@ -632,45 +597,4 @@ + # -dmS $process_name gdb $daemon_directory/$process_name + # $process_id & sleep 1 + +-# INSTALL-TIME CONFIGURATION INFORMATION +-# +-# The following parameters are used when installing a new Postfix version. +-# +-# sendmail_path: The full pathname of the Postfix sendmail command. +-# This is the Sendmail-compatible mail posting interface. +-# +-sendmail_path = +- +-# newaliases_path: The full pathname of the Postfix newaliases command. +-# This is the Sendmail-compatible command to build alias databases. +-# +-newaliases_path = +- +-# mailq_path: The full pathname of the Postfix mailq command. This +-# is the Sendmail-compatible mail queue listing command. +-# +-mailq_path = +- +-# setgid_group: The group for mail submission and queue management +-# commands. This must be a group name with a numerical group ID that +-# is not shared with other accounts, not even with the Postfix account. +-# +-setgid_group = +- +-# html_directory: The location of the Postfix HTML documentation. +-# +-html_directory = +- +-# manpage_directory: The location of the Postfix on-line manual pages. +-# +-manpage_directory = +- +-# sample_directory: The location of the Postfix sample configuration files. +-# This parameter is obsolete as of Postfix 2.1. +-# +-sample_directory = +- +-# readme_directory: The location of the Postfix README files. +-# +-readme_directory = + inet_protocols = ipv4 diff --git a/trunk/package/mail/postfix/patches/800-fmt.patch b/trunk/package/mail/postfix/patches/800-fmt.patch new file mode 100644 index 00000000..97a165c3 --- /dev/null +++ b/trunk/package/mail/postfix/patches/800-fmt.patch @@ -0,0 +1,12 @@ +diff -Naur postfix-2.11.1/conf/post-install postfix-2.11.1.patched/conf/post-install +--- postfix-2.11.1/conf/post-install 2014-10-05 20:43:58.597876946 +0400 ++++ postfix-2.11.1.patched/conf/post-install 2014-10-11 16:28:01.258874097 +0400 +@@ -319,7 +319,7 @@ + case `uname -s` in + HP-UX*) FMT=cat;; + SunOS*) FMT=fake_fmt;; +- *) FMT=fmt;; ++ *) FMT="xargs echo";; + esac + + # If a parameter is not set via the command line or environment, diff --git a/trunk/package/mail/ssmtp/Makefile b/trunk/package/mail/ssmtp/Makefile new file mode 100644 index 00000000..3d243947 --- /dev/null +++ b/trunk/package/mail/ssmtp/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2007-2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ssmtp +PKG_VERSION:=2.64 +PKG_RELEASE:=1.1 +PKG_MAINTAINER:=Dirk Brenken +PKG_LICENSE:=GPL-2.0+ + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.bz2 +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/s/ssmtp +PKG_MD5SUM:=65b4e0df4934a6cd08c506cabcbe584f + +include $(INCLUDE_DIR)/package.mk + +TARGET_CFLAGS += $(TARGET_CPPFLAGS) + +define Package/ssmtp + SECTION:=mail + CATEGORY:=Mail + DEPENDS:=+libopenssl + TITLE:=A minimal and secure mail sender with ssl support + URL:=http://packages.debian.org/ssmtp +endef + +define Package/ssmtp/description + A secure, effective and simple way of getting mail off a system to your + mail hub. It contains no suid-binaries or other dangerous things - no + mail spool to poke around in, and no daemons running in the background. + Mail is simply forwarded to the configured mailhost. Extremely easy + configuration. +endef + +define Package/ssmtp/conffiles +/etc/ssmtp/ssmtp.conf +/etc/ssmtp/revaliases +endef + +CONFIGURE_VARS += \ + LIBS="$(TARGET_LDFLAGS) -lcrypto -lssl" + +CONFIGURE_ARGS += \ + --enable-ssl + +define Package/ssmtp/install + $(INSTALL_DIR) $(1)/etc/ssmtp + $(INSTALL_CONF) $(PKG_BUILD_DIR)/ssmtp.conf $(1)/etc/ssmtp/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/revaliases $(1)/etc/ssmtp/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ssmtp $(1)/usr/sbin/ +endef + +define Package/ssmtp/postinst +#!/bin/sh +ln -sf ssmtp $${IPKG_INSTROOT}/usr/sbin/sendmail +endef + +$(eval $(call BuildPackage,ssmtp)) diff --git a/trunk/package/mail/ssmtp/patches/002-fix_pointer.patch b/trunk/package/mail/ssmtp/patches/002-fix_pointer.patch new file mode 100644 index 00000000..f22e3d61 --- /dev/null +++ b/trunk/package/mail/ssmtp/patches/002-fix_pointer.patch @@ -0,0 +1,466 @@ +--- a/ssmtp.c ++++ b/ssmtp.c +@@ -55,21 +55,21 @@ bool_t use_oldauth = False; /* use old + + #define ARPADATE_LENGTH 32 /* Current date in RFC format */ + char arpadate[ARPADATE_LENGTH]; +-char *auth_user = (char)NULL; +-char *auth_pass = (char)NULL; +-char *auth_method = (char)NULL; /* Mechanism for SMTP authentication */ +-char *mail_domain = (char)NULL; +-char *from = (char)NULL; /* Use this as the From: address */ ++char *auth_user = NULL; ++char *auth_pass = NULL; ++char *auth_method = NULL; /* Mechanism for SMTP authentication */ ++char *mail_domain = NULL; ++char *from = NULL; /* Use this as the From: address */ + char *hostname; + char *mailhost = "mailhub"; +-char *minus_f = (char)NULL; +-char *minus_F = (char)NULL; ++char *minus_f = NULL; ++char *minus_F = NULL; + char *gecos; +-char *prog = (char)NULL; ++char *prog = NULL; + char *root = NULL; + char *tls_cert = "/etc/ssl/certs/ssmtp.pem"; /* Default Certificate */ +-char *uad = (char)NULL; +-char *config_file = (char)NULL; /* alternate configuration file */ ++char *uad = NULL; ++char *config_file = NULL; /* alternate configuration file */ + + headers_t headers, *ht; + +@@ -261,7 +261,7 @@ char *strip_post_ws(char *str) + + p = (str + strlen(str)); + while(isspace(*--p)) { +- *p = (char)NULL; ++ *p = '\0'; + } + + return(p); +@@ -279,7 +279,7 @@ char *addr_parse(char *str) + #endif + + /* Simple case with email address enclosed in <> */ +- if((p = strdup(str)) == (char *)NULL) { ++ if((p = strdup(str)) == NULL) { + die("addr_parse(): strdup()"); + } + +@@ -287,7 +287,7 @@ char *addr_parse(char *str) + q++; + + if((p = strchr(q, '>'))) { +- *p = (char)NULL; ++ *p = '\0'; + } + + #if 0 +@@ -310,7 +310,7 @@ char *addr_parse(char *str) + q = strip_post_ws(p); + if(*q == ')') { + while((*--q != '(')); +- *q = (char)NULL; ++ *q = '\0'; + } + (void)strip_post_ws(p); + +@@ -349,7 +349,6 @@ standardise() -- Trim off '\n's and doub + */ + bool_t standardise(char *str, bool_t *linestart) + { +- size_t sl; + char *p; + bool_t leadingdot = False; + +@@ -363,7 +362,7 @@ bool_t standardise(char *str, bool_t *li + *linestart = False; + + if((p = strchr(str, '\n'))) { +- *p = (char)NULL; ++ *p = '\0'; + *linestart = True; + } + return(leadingdot); +@@ -384,7 +383,7 @@ void revaliases(struct passwd *pw) + while(fgets(buf, sizeof(buf), fp)) { + /* Make comments invisible */ + if((p = strchr(buf, '#'))) { +- *p = (char)NULL; ++ *p = '\0'; + } + + /* Ignore malformed lines and comments */ +@@ -519,11 +518,11 @@ void rcpt_save(char *str) + #endif + + /* Ignore missing usernames */ +- if(*str == (char)NULL) { ++ if(*str == '\0') { + return; + } + +- if((rt->string = strdup(str)) == (char *)NULL) { ++ if((rt->string = strdup(str)) == NULL) { + die("rcpt_save() -- strdup() failed"); + } + +@@ -548,7 +547,7 @@ void rcpt_parse(char *str) + (void)fprintf(stderr, "*** rcpt_parse(): str = [%s]\n", str); + #endif + +- if((p = strdup(str)) == (char *)NULL) { ++ if((p = strdup(str)) == NULL) { + die("rcpt_parse(): strdup() failed"); + } + q = p; +@@ -576,7 +575,7 @@ void rcpt_parse(char *str) + } + + /* End of string? */ +- if(*(q + 1) == (char)NULL) { ++ if(*(q + 1) == '\0') { + got_addr = True; + } + +@@ -584,7 +583,7 @@ void rcpt_parse(char *str) + if((*q == ',') && (in_quotes == False)) { + got_addr = True; + +- *q = (char)NULL; ++ *q = '\0'; + } + + if(got_addr) { +@@ -668,7 +667,7 @@ void header_save(char *str) + (void)fprintf(stderr, "header_save(): str = [%s]\n", str); + #endif + +- if((p = strdup(str)) == (char *)NULL) { ++ if((p = strdup(str)) == NULL) { + die("header_save() -- strdup() failed"); + } + ht->string = p; +@@ -676,7 +675,7 @@ void header_save(char *str) + if(strncasecmp(ht->string, "From:", 5) == 0) { + #if 1 + /* Hack check for NULL From: line */ +- if(*(p + 6) == (char)NULL) { ++ if(*(p + 6) == '\0') { + return; + } + #endif +@@ -739,19 +738,19 @@ header_parse() -- Break headers into sep + void header_parse(FILE *stream) + { + size_t size = BUF_SZ, len = 0; +- char *p = (char *)NULL, *q; ++ char *p = NULL, *q; + bool_t in_header = True; +- char l = (char)NULL; ++ char l = '\0'; + int c; + + while(in_header && ((c = fgetc(stream)) != EOF)) { + /* Must have space for up to two more characters, since we + may need to insert a '\r' */ +- if((p == (char *)NULL) || (len >= (size - 1))) { ++ if((p == NULL) || (len >= (size - 1))) { + size += BUF_SZ; + + p = (char *)realloc(p, (size * sizeof(char))); +- if(p == (char *)NULL) { ++ if(p == NULL) { + die("header_parse() -- realloc() failed"); + } + q = (p + len); +@@ -776,9 +775,9 @@ void header_parse(FILE *stream) + in_header = False; + + default: +- *q = (char)NULL; ++ *q = '\0'; + if((q = strrchr(p, '\n'))) { +- *q = (char)NULL; ++ *q = '\0'; + } + header_save(p); + +@@ -809,9 +808,9 @@ void header_parse(FILE *stream) + in_header = False; + + default: +- *q = (char)NULL; ++ *q = '\0'; + if((q = strrchr(p, '\n'))) { +- *q = (char)NULL; ++ *q = '\0'; + } + header_save(p); + +@@ -876,11 +875,11 @@ bool_t read_config() + char *rightside; + /* Make comments invisible */ + if((p = strchr(buf, '#'))) { +- *p = (char)NULL; ++ *p = '\0'; + } + + /* Ignore malformed lines and comments */ +- if(strchr(buf, '=') == (char *)NULL) continue; ++ if(strchr(buf, '=') == NULL) continue; + + /* Parse out keywords */ + p=firsttok(&begin, "= \t\n"); +@@ -890,7 +889,7 @@ bool_t read_config() + } + if(p && q) { + if(strcasecmp(p, "Root") == 0) { +- if((root = strdup(q)) == (char *)NULL) { ++ if((root = strdup(q)) == NULL) { + die("parse_config() -- strdup() failed"); + } + +@@ -904,7 +903,7 @@ bool_t read_config() + port = atoi(r); + } + +- if((mailhost = strdup(q)) == (char *)NULL) { ++ if((mailhost = strdup(q)) == NULL) { + die("parse_config() -- strdup() failed"); + } + +@@ -949,7 +948,7 @@ bool_t read_config() + mail_domain = strdup(q); + } + +- if(mail_domain == (char *)NULL) { ++ if(mail_domain == NULL) { + die("parse_config() -- strdup() failed"); + } + rewrite_domain = True; +@@ -1025,7 +1024,7 @@ bool_t read_config() + } + } + else if(strcasecmp(p, "TLSCert") == 0) { +- if((tls_cert = strdup(q)) == (char *)NULL) { ++ if((tls_cert = strdup(q)) == NULL) { + die("parse_config() -- strdup() failed"); + } + +@@ -1036,7 +1035,7 @@ bool_t read_config() + #endif + /* Command-line overrides these */ + else if(strcasecmp(p, "AuthUser") == 0 && !auth_user) { +- if((auth_user = strdup(q)) == (char *)NULL) { ++ if((auth_user = strdup(q)) == NULL) { + die("parse_config() -- strdup() failed"); + } + +@@ -1045,7 +1044,7 @@ bool_t read_config() + } + } + else if(strcasecmp(p, "AuthPass") == 0 && !auth_pass) { +- if((auth_pass = strdup(q)) == (char *)NULL) { ++ if((auth_pass = strdup(q)) == NULL) { + die("parse_config() -- strdup() failed"); + } + +@@ -1054,7 +1053,7 @@ bool_t read_config() + } + } + else if(strcasecmp(p, "AuthMethod") == 0 && !auth_method) { +- if((auth_method = strdup(q)) == (char *)NULL) { ++ if((auth_method = strdup(q)) == NULL) { + die("parse_config() -- strdup() failed"); + } + +@@ -1119,14 +1118,11 @@ int smtp_open(char *host, int port) + char buf[(BUF_SZ + 1)]; + + /* Init SSL stuff */ +- SSL_CTX *ctx; +- SSL_METHOD *meth; ++ SSL_CTX *ctx = NULL; + X509 *server_cert; +- + SSL_load_error_strings(); + SSLeay_add_ssl_algorithms(); +- meth=SSLv23_client_method(); +- ctx = SSL_CTX_new(meth); ++ ctx = SSL_CTX_new(SSLv23_client_method()); + if(!ctx) { + log_event(LOG_ERR, "No SSL support initiated\n"); + return(-1); +@@ -1310,7 +1306,7 @@ char *fd_gets(char *buf, int size, int f + buf[i++] = c; + } + } +- buf[i] = (char)NULL; ++ buf[i] = '\0'; + + return(buf); + } +@@ -1434,14 +1430,14 @@ int ssmtp(char *argv[]) + } + + if((p = strtok(pw->pw_gecos, ";,"))) { +- if((gecos = strdup(p)) == (char *)NULL) { ++ if((gecos = strdup(p)) == NULL) { + die("ssmtp() -- strdup() failed"); + } + } + revaliases(pw); + + /* revaliases() may have defined this */ +- if(uad == (char *)NULL) { ++ if(uad == NULL) { + uad = append_domain(pw->pw_name); + } + +@@ -1489,7 +1485,7 @@ int ssmtp(char *argv[]) + /* Try to log in if username was supplied */ + if(auth_user) { + #ifdef MD5AUTH +- if(auth_pass == (char *)NULL) { ++ if(auth_pass == NULL) { + auth_pass = strdup(""); + } + +@@ -1508,7 +1504,7 @@ int ssmtp(char *argv[]) + else { + #endif + memset(buf, 0, bufsize); +- to64frombits(buf, auth_user, strlen(auth_user)); ++ to64frombits(buf, (unsigned char *)auth_user, strlen(auth_user)); + if (use_oldauth) { + outbytes += smtp_write(sock, "AUTH LOGIN %s", buf); + } +@@ -1520,7 +1516,7 @@ int ssmtp(char *argv[]) + } + /* we assume server asked us for Username */ + memset(buf, 0, bufsize); +- to64frombits(buf, auth_user, strlen(auth_user)); ++ to64frombits(buf, (unsigned char *)auth_user, strlen(auth_user)); + outbytes += smtp_write(sock, buf); + } + +@@ -1530,7 +1526,7 @@ int ssmtp(char *argv[]) + } + memset(buf, 0, bufsize); + +- to64frombits(buf, auth_pass, strlen(auth_pass)); ++ to64frombits(buf, (unsigned char *)auth_pass, strlen(auth_pass)); + #ifdef MD5AUTH + } + #endif +@@ -1737,7 +1733,7 @@ char **parse_options(int argc, char *arg + j = 0; + + add = 1; +- while(argv[i][++j] != (char)NULL) { ++ while(argv[i][++j] != '\0') { + switch(argv[i][j]) { + #ifdef INET6 + case '6': +@@ -1755,14 +1751,14 @@ char **parse_options(int argc, char *arg + if((!argv[i][(j + 1)]) + && argv[(i + 1)]) { + auth_user = strdup(argv[i+1]); +- if(auth_user == (char *)NULL) { ++ if(auth_user == NULL) { + die("parse_options() -- strdup() failed"); + } + add++; + } + else { + auth_user = strdup(argv[i]+j+1); +- if(auth_user == (char *)NULL) { ++ if(auth_user == NULL) { + die("parse_options() -- strdup() failed"); + } + } +@@ -1772,14 +1768,14 @@ char **parse_options(int argc, char *arg + if((!argv[i][(j + 1)]) + && argv[(i + 1)]) { + auth_pass = strdup(argv[i+1]); +- if(auth_pass == (char *)NULL) { ++ if(auth_pass == NULL) { + die("parse_options() -- strdup() failed"); + } + add++; + } + else { + auth_pass = strdup(argv[i]+j+1); +- if(auth_pass == (char *)NULL) { ++ if(auth_pass == NULL) { + die("parse_options() -- strdup() failed"); + } + } +@@ -1870,14 +1866,14 @@ char **parse_options(int argc, char *arg + case 'F': + if((!argv[i][(j + 1)]) && argv[(i + 1)]) { + minus_F = strdup(argv[(i + 1)]); +- if(minus_F == (char *)NULL) { ++ if(minus_F == NULL) { + die("parse_options() -- strdup() failed"); + } + add++; + } + else { + minus_F = strdup(argv[i]+j+1); +- if(minus_F == (char *)NULL) { ++ if(minus_F == NULL) { + die("parse_options() -- strdup() failed"); + } + } +@@ -1889,14 +1885,14 @@ char **parse_options(int argc, char *arg + case 'r': + if((!argv[i][(j + 1)]) && argv[(i + 1)]) { + minus_f = strdup(argv[(i + 1)]); +- if(minus_f == (char *)NULL) { ++ if(minus_f == NULL) { + die("parse_options() -- strdup() failed"); + } + add++; + } + else { + minus_f = strdup(argv[i]+j+1); +- if(minus_f == (char *)NULL) { ++ if(minus_f == NULL) { + die("parse_options() -- strdup() failed"); + } + } +--- a/base64.c ++++ b/base64.c +@@ -31,7 +31,7 @@ static const char base64val[] = { + }; + #define DECODE64(c) (isascii(c) ? base64val[c] : BAD) + +-void to64frombits(unsigned char *out, const unsigned char *in, int inlen) ++void to64frombits(char *out, const unsigned char *in, int inlen) + /* raw bytes in quasi-big-endian order to base 64 string (NUL-terminated) */ + { + for (; inlen >= 3; inlen -= 3) +@@ -57,7 +57,7 @@ void to64frombits(unsigned char *out, co + *out = '\0'; + } + +-int from64tobits(char *out, const char *in) ++int from64tobits(unsigned char *out, const char *in) + /* base 64 to raw bytes in quasi-big-endian order, returning count of bytes */ + { + int len = 0; +--- a/ssmtp.h ++++ b/ssmtp.h +@@ -41,5 +41,5 @@ typedef struct string_list rcpt_t; + void get_arpadate(char *); + + /* base64.c */ +-void to64frombits(unsigned char *, const unsigned char *, int); +-int from64tobits(char *, const char *); ++void to64frombits(char *, const unsigned char *, int); ++int from64tobits(unsigned char *, const char *); -- 2.25.1