emailrelay: added configuration options
- moved from net to mail category - removed no-ssl package and added ssl support as configuration option (default enabled) - added configuration option to support extended logging (default disabled) - disabled build of test tools - added LEDE compatibility (support for openssl without SSL3) Signed-off-by: Federico Di Marco <fededim@gmail.com>
This commit is contained in:
parent
e1aa1994ce
commit
5758939831
4 changed files with 53 additions and 42 deletions
|
@ -9,45 +9,51 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=emailrelay
|
PKG_NAME:=emailrelay
|
||||||
PKG_VERSION:=1.9
|
PKG_VERSION:=1.9
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
|
||||||
PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION)
|
PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION)
|
||||||
PKG_MD5SUM:=0892fbf993407c6b5a16f96e23299b62
|
PKG_MD5SUM:=0892fbf993407c6b5a16f96e23299b62
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
|
||||||
|
PKG_CONFIG_DEPENDS:=CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG CONFIG_EMAILRELAY_SSL
|
||||||
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/uclibc++.mk
|
include $(INCLUDE_DIR)/uclibc++.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/emailrelay/Default
|
define Package/emailrelay
|
||||||
SECTION:=net
|
SECTION:=mail
|
||||||
SUBMENU:=Web Servers/Proxies
|
CATEGORY:=Mail
|
||||||
CATEGORY:=Network
|
DEPENDS:=$(CXX_DEPENDS) +EMAILRELAY_SSL:libopenssl
|
||||||
DEPENDS:=$(CXX_DEPENDS)
|
|
||||||
TITLE:=A simple SMTP proxy and MTA
|
TITLE:=A simple SMTP proxy and MTA
|
||||||
URL:=http://emailrelay.sourceforge.net/
|
URL:=http://emailrelay.sourceforge.net/
|
||||||
MAINTAINER:=Federico Di Marco <fededim@gmail.com>
|
MAINTAINER:=Federico Di Marco <fededim@gmail.com>
|
||||||
|
MENU:=1
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
define Package/emailrelay
|
define Package/emailrelay/config
|
||||||
$(call Package/emailrelay/Default)
|
config EMAILRELAY_SUPPORT_VERBOSE_DBG
|
||||||
TITLE+= (with OpenSSL support)
|
bool "Enable support for extended logging"
|
||||||
DEPENDS+=+libopenssl
|
depends on PACKAGE_emailrelay
|
||||||
VARIANT:=ssl
|
default n
|
||||||
endef
|
help
|
||||||
|
Enables support for extended logging (must also be explicitely enabled by using command line switch --debug when starting emailrelay)
|
||||||
|
|
||||||
define Package/emailrelay-nossl
|
config EMAILRELAY_SSL
|
||||||
$(call Package/emailrelay/Default)
|
bool "Enable support for OpenSSL"
|
||||||
TITLE+= (no SSL support)
|
depends on PACKAGE_emailrelay
|
||||||
VARIANT:=nossl
|
default y
|
||||||
|
select PACKAGE_libopenssl
|
||||||
|
help
|
||||||
|
Builds the package with OpenSSL support (SSMTP is supported).
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
define Package/emailrelay/Default/description
|
define Package/emailrelay/description
|
||||||
Emailrelay is a simple SMTP proxy and store-and-forward message transfer agent (MTA).
|
Emailrelay is a simple SMTP proxy and store-and-forward message transfer agent (MTA).
|
||||||
|
|
||||||
When running as a proxy all e-mail messages can be passed through
|
When running as a proxy all e-mail messages can be passed through
|
||||||
|
@ -59,43 +65,38 @@ define Package/emailrelay/Default/description
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
define Package/emailrelay/description
|
|
||||||
$(call Package/emailrelay/Default/description)
|
|
||||||
|
|
||||||
This package is built with OpenSSL support (SSMTP is supported).
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/emailrelay-nossl/description
|
|
||||||
$(call Package/emailrelay/Default/description)
|
|
||||||
|
|
||||||
This package is built without SSL support (no SSMTP)
|
|
||||||
endef
|
|
||||||
|
|
||||||
|
|
||||||
define Package/emailrelay/conffiles
|
define Package/emailrelay/conffiles
|
||||||
/etc/emailrelay.auth
|
/etc/emailrelay.auth
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/emailrelay-nossl/conffiles
|
|
||||||
/etc/emailrelay.auth
|
|
||||||
endef
|
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
CONFIGURE_ARGS += \
|
||||||
--with-pam=no
|
--with-pam=no \
|
||||||
|
--enable-testing=no
|
||||||
|
|
||||||
CONFIGURE_VARS += \
|
CONFIGURE_VARS += \
|
||||||
CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
|
CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
|
||||||
|
|
||||||
ifeq ($(BUILD_VARIANT),ssl)
|
|
||||||
|
ifeq ($(CONFIG_EMAILRELAY_SSL),y)
|
||||||
CONFIGURE_ARGS += \
|
CONFIGURE_ARGS += \
|
||||||
--with-openssl
|
--with-openssl
|
||||||
endif
|
else
|
||||||
|
|
||||||
ifeq ($(BUILD_VARIANT),nossl)
|
|
||||||
CONFIGURE_ARGS += \
|
CONFIGURE_ARGS += \
|
||||||
--with-openssl=no
|
--with-openssl=no
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG),y)
|
||||||
|
CONFIGURE_ARGS += \
|
||||||
|
--enable-debug=yes
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_OPENSSL_WITH_SSL3),y)
|
||||||
|
CONFIGURE_VARS += \
|
||||||
|
CXXFLAGS="$$$$CXXFLAGS -DSSL3_SUPPORT"
|
||||||
|
endif
|
||||||
|
|
||||||
define Package/emailrelay/install
|
define Package/emailrelay/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/
|
||||||
|
@ -109,8 +110,5 @@ define Package/emailrelay/install
|
||||||
$(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
|
$(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
Package/emailrelay-nossl/install = $(Package/emailrelay/install)
|
|
||||||
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,emailrelay))
|
$(eval $(call BuildPackage,emailrelay))
|
||||||
$(eval $(call BuildPackage,emailrelay-nossl))
|
|
13
mail/emailrelay/patches/010-ssl3-fix.patch
Normal file
13
mail/emailrelay/patches/010-ssl3-fix.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
--- a/src/gssl/gssl_openssl.cpp
|
||||||
|
+++ b/src/gssl/gssl_openssl.cpp
|
||||||
|
@@ -292,8 +292,10 @@ GSsl::Context::Context( const std::strin
|
||||||
|
{
|
||||||
|
if( (flags&3U) == 2U )
|
||||||
|
m_ssl_ctx = SSL_CTX_new(SSLv23_method()) ;
|
||||||
|
+#ifdef SSL3_SUPPORT
|
||||||
|
else if( (flags&3U) == 3U )
|
||||||
|
m_ssl_ctx = SSL_CTX_new(SSLv3_method()) ;
|
||||||
|
+#endif
|
||||||
|
else
|
||||||
|
m_ssl_ctx = SSL_CTX_new(TLSv1_method()) ;
|
||||||
|
|
Loading…
Reference in a new issue