|
@ -8,10 +8,10 @@ |
|
|
include $(TOPDIR)/rules.mk |
|
|
include $(TOPDIR)/rules.mk |
|
|
|
|
|
|
|
|
PKG_NAME:=postfix |
|
|
PKG_NAME:=postfix |
|
|
PKG_RELEASE:=2 |
|
|
|
|
|
|
|
|
PKG_RELEASE:=1 |
|
|
PKG_SOURCE_URL:=ftp://ftp.porcupine.org/mirrors/postfix-release/official/ |
|
|
PKG_SOURCE_URL:=ftp://ftp.porcupine.org/mirrors/postfix-release/official/ |
|
|
PKG_VERSION:=3.0.1 |
|
|
|
|
|
PKG_MD5SUM:=3ec1416e7d4fba9566297c8fcf7a348c |
|
|
|
|
|
|
|
|
PKG_VERSION:=3.0.3 |
|
|
|
|
|
PKG_MD5SUM:=61caffae689c11d09b4c972a394ae3b1 |
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
|
|
PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com> |
|
|
PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com> |
|
|
PKG_LICENSE:=IPL-1.0 |
|
|
PKG_LICENSE:=IPL-1.0 |
|
@ -25,7 +25,7 @@ define Package/postfix |
|
|
CATEGORY:=Mail |
|
|
CATEGORY:=Mail |
|
|
TITLE:=Postfix Mail Transmit Agent |
|
|
TITLE:=Postfix Mail Transmit Agent |
|
|
URL:=http://www.postfix.org/ |
|
|
URL:=http://www.postfix.org/ |
|
|
DEPENDS:=+POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +libpcre |
|
|
|
|
|
|
|
|
DEPENDS:=+POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +POSTFIX_EAI:icu +libpcre |
|
|
endef |
|
|
endef |
|
|
|
|
|
|
|
|
define Package/postfix/description |
|
|
define Package/postfix/description |
|
@ -59,10 +59,20 @@ define Package/postfix/config |
|
|
default y |
|
|
default y |
|
|
help |
|
|
help |
|
|
Implements support for cdb files using tinycdb |
|
|
Implements support for cdb files using tinycdb |
|
|
|
|
|
config POSTFIX_EAI |
|
|
|
|
|
bool "SMTPUTF8 support" |
|
|
|
|
|
default n |
|
|
|
|
|
help |
|
|
|
|
|
Enable Postfix support for Email Address Internationalization |
|
|
|
|
|
(EAI) as defined in RFC 6531 (SMTPUTF8 extension), RFC 6532 |
|
|
|
|
|
(Internationalized email headers) and RFC 6533 |
|
|
|
|
|
(Internationalized delivery status notifications). |
|
|
|
|
|
Since version 3.0, Postfix fully supports UTF-8 email |
|
|
|
|
|
addresses and UTF-8 message header values. |
|
|
endmenu |
|
|
endmenu |
|
|
endef |
|
|
endef |
|
|
|
|
|
|
|
|
CCARGS=-DNO_EPOLL -DNO_SIGSETJMP -DNO_NIS -DNO_EAI |
|
|
|
|
|
|
|
|
CCARGS=-DNO_NIS |
|
|
AUXLIBS=-L$(STAGING_DIR)/usr/lib |
|
|
AUXLIBS=-L$(STAGING_DIR)/usr/lib |
|
|
default_database_type=cdb |
|
|
default_database_type=cdb |
|
|
|
|
|
|
|
@ -96,6 +106,15 @@ else |
|
|
CCARGS+=-DNO_DB |
|
|
CCARGS+=-DNO_DB |
|
|
endif |
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
ifdef CONFIG_POSTFIX_EAI |
|
|
|
|
|
AUXLIBS+=-licuuc |
|
|
|
|
|
CCARGS+=-DHAS_EAI |
|
|
|
|
|
smtputf8_conf = yes |
|
|
|
|
|
else |
|
|
|
|
|
CCARGS+=-DNO_EAI |
|
|
|
|
|
smtputf8_conf = no |
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
CCARGS+=-DDEF_DB_TYPE=\"$(default_database_type)\" |
|
|
CCARGS+=-DDEF_DB_TYPE=\"$(default_database_type)\" |
|
|
|
|
|
|
|
|
config_directory=/etc/postfix# also add this to postfix init file |
|
|
config_directory=/etc/postfix# also add this to postfix init file |
|
@ -121,6 +140,7 @@ define Package/postfix/conffiles |
|
|
$(config_directory)/main.cf |
|
|
$(config_directory)/main.cf |
|
|
$(config_directory)/master.cf |
|
|
$(config_directory)/master.cf |
|
|
$(config_directory)/aliases |
|
|
$(config_directory)/aliases |
|
|
|
|
|
$(config_directory)/virtual |
|
|
endef |
|
|
endef |
|
|
|
|
|
|
|
|
define Build/Configure |
|
|
define Build/Configure |
|
@ -139,17 +159,18 @@ endef |
|
|
# postconf -d > /tmp/main.cf.new
|
|
|
# postconf -d > /tmp/main.cf.new
|
|
|
# 3. Transfer /tmp/main.cf.new file to the build system
|
|
|
# 3. Transfer /tmp/main.cf.new file to the build system
|
|
|
# 4. Execute the following command:
|
|
|
# 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
|
|
|
|
|
|
|
|
|
# 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\ = |grep -v ^virtual_maps\ = ) > files/main.cf.default
|
|
|
# 5. Done. Now you can rebuild the package with new main.cf.default.
|
|
|
# 5. Done. Now you can rebuild the package with new main.cf.default.
|
|
|
#
|
|
|
#
|
|
|
|
|
|
|
|
|
define Build/Compile |
|
|
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 |
|
|
|
|
|
|
|
|
# Currently postfix has a bug with Makefiles that CCARGS are not passed to the compiler, so we are copying them to CC as a workaround |
|
|
cd $(PKG_BUILD_DIR); $(MAKE) $(TARGET_CONFIGURE_OPTS) CC='$(TARGET_CC) $(CCARGS)' |
|
|
cd $(PKG_BUILD_DIR); $(MAKE) $(TARGET_CONFIGURE_OPTS) CC='$(TARGET_CC) $(CCARGS)' |
|
|
cp ./files/main.cf.default $(PKG_BUILD_DIR)/conf/main.cf.default |
|
|
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 "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_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 "alias_maps = $(default_database_type):$(config_directory)/aliases" >> $(PKG_BUILD_DIR)/conf/main.cf.default |
|
|
|
|
|
echo "virtual_maps = $(default_database_type):$(config_directory)/virtual" >> $(PKG_BUILD_DIR)/conf/main.cf.default |
|
|
echo "sendmail_path = $(sendmail_path)$(ln_suffix)" >> $(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 "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 "mailq_path = $(mailq_path)$(ln_suffix)" >> $(PKG_BUILD_DIR)/conf/main.cf.default |
|
@ -165,7 +186,7 @@ define Build/Compile |
|
|
echo "mail_spool_directory = $(mail_spool_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 "shlib_directory = $(shlib_directory)" >> $(PKG_BUILD_DIR)/conf/main.cf.default |
|
|
echo "meta_directory = $(meta_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 |
|
|
|
|
|
|
|
|
echo "smtputf8_enable = $(smtputf8_conf)" >> $(PKG_BUILD_DIR)/conf/main.cf.default |
|
|
endef |
|
|
endef |
|
|
|
|
|
|
|
|
define Package/postfix/install |
|
|
define Package/postfix/install |
|
@ -205,11 +226,12 @@ define Package/postfix/postinst |
|
|
grep -qc main\.cf "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null || echo "$(config_directory)/main.cf" >> "$${IPKG_INSTROOT}"/etc/sysupgrade.conf |
|
|
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 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 |
|
|
grep -qc aliases "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null || echo "$(config_directory)/aliases" >> "$${IPKG_INSTROOT}"/etc/sysupgrade.conf |
|
|
|
|
|
grep -qc virtual "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null || echo "$(config_directory)/virtual" >> "$${IPKG_INSTROOT}"/etc/sysupgrade.conf |
|
|
|
|
|
|
|
|
touch "$${IPKG_INSTROOT}$(config_directory)"/opkg_postinst |
|
|
touch "$${IPKG_INSTROOT}$(config_directory)"/opkg_postinst |
|
|
|
|
|
|
|
|
if [ -z "$${IPKG_INSTROOT}" ]; then |
|
|
if [ -z "$${IPKG_INSTROOT}" ]; then |
|
|
ps | grep "postfix/master" | grep -cvq grep >/dev/null && /etc/init.d/postfix reload |
|
|
|
|
|
|
|
|
ps | grep "postfix/master" | grep -cvq grep >/dev/null && /etc/init.d/postfix restart |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
endef |
|
|
endef |
|
@ -224,6 +246,8 @@ define Package/postfix/postrm |
|
|
#!/bin/sh
|
|
|
#!/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}$(config_directory)/aliases.cdb $${IPKG_INSTROOT}$(config_directory)/aliases.db $${IPKG_INSTROOT}$(data_directory)/master.lock |
|
|
|
|
|
|
|
|
|
|
|
rm -f $${IPKG_INSTROOT}$(config_directory)/virtual.cdb $${IPKG_INSTROOT}$(config_directory)/virtual.db |
|
|
|
|
|
|
|
|
rm -f "$${IPKG_INSTROOT}$(sendmail_path)" "$${IPKG_INSTROOT}$(newaliases_path)" "$${IPKG_INSTROOT}$(mailq_path)" |
|
|
rm -f "$${IPKG_INSTROOT}$(sendmail_path)" "$${IPKG_INSTROOT}$(newaliases_path)" "$${IPKG_INSTROOT}$(mailq_path)" |
|
|
|
|
|
|
|
|
if [ -f "$${IPKG_INSTROOT}$(sendmail_path)$(ln_old_suffix)" ]; then |
|
|
if [ -f "$${IPKG_INSTROOT}$(sendmail_path)$(ln_old_suffix)" ]; then |
|
|