You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

288 lines
8.5 KiB

postfix: fix uid/gid conflicts, general cleanup Fix uid/gid conflict with package icecast (uid=87, gid=87) and package pianod (uid=88, gid=88) by claiming uid/gid 25 for postfix instead of 87 and uid/gid 26 for postconf instead of 88. Remove main.cf.default that is not used by any Postfix module. The default configuration parameters are hardcoded into postconf and they are available via "postconf -d <parameter>". main.cf.default is therefore unnecessary. "mydomain" parameter should be deduced from the domain configuration setting in /e/c/dhcp rather than from "hostname" in /e/c/system which is often just a hostname without the domain name component. "mynetworks" parameter is unnecessary where "mynetworks_style" is defined. The change of the location of data_directory, queue_directory and mail_spool_directory from /var/lib/postfix, /var/spool/postfix and /var/mail to /data/postfix/lib, /data/postfix/spool and /data/postfix/mail has been postponed until the author of this commit and the maintainer of this package has had a meaningful opportunity to consult with LEDE/OpenWrt developers on the preferred mount point for the persistent data storage device. Change the criteria for executing the post-installation script. Invoke postinst() where the value of "myhostname" parameter in main.cf is not defined rather than where "$config_directory"/opkg_postinst is present with the value of "$config_directory" hardcoded to "$IPKG_INSTROOT"/etc/postfix in /etc/init.d/postfix. Enable PCRE support by default. Remove the code making entries in /etc/sysupgrade.conf and instead define configuration files to be saved during a sysupgrade in Makefile's Package/postfix/conffiles section. Move the creation of mail_spool_directory from host to target in order to enable change of directory ownership to 'postfix' when postinit() is executed on the target. Avoid postfix restart in postinst script that results in an error message during opkg install process. Enable Postfix autostart by creating a link in /etc/rc.d/ on installation. Make the code less verbose. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
7 years ago
postfix: fix uid/gid conflicts, general cleanup Fix uid/gid conflict with package icecast (uid=87, gid=87) and package pianod (uid=88, gid=88) by claiming uid/gid 25 for postfix instead of 87 and uid/gid 26 for postconf instead of 88. Remove main.cf.default that is not used by any Postfix module. The default configuration parameters are hardcoded into postconf and they are available via "postconf -d <parameter>". main.cf.default is therefore unnecessary. "mydomain" parameter should be deduced from the domain configuration setting in /e/c/dhcp rather than from "hostname" in /e/c/system which is often just a hostname without the domain name component. "mynetworks" parameter is unnecessary where "mynetworks_style" is defined. The change of the location of data_directory, queue_directory and mail_spool_directory from /var/lib/postfix, /var/spool/postfix and /var/mail to /data/postfix/lib, /data/postfix/spool and /data/postfix/mail has been postponed until the author of this commit and the maintainer of this package has had a meaningful opportunity to consult with LEDE/OpenWrt developers on the preferred mount point for the persistent data storage device. Change the criteria for executing the post-installation script. Invoke postinst() where the value of "myhostname" parameter in main.cf is not defined rather than where "$config_directory"/opkg_postinst is present with the value of "$config_directory" hardcoded to "$IPKG_INSTROOT"/etc/postfix in /etc/init.d/postfix. Enable PCRE support by default. Remove the code making entries in /etc/sysupgrade.conf and instead define configuration files to be saved during a sysupgrade in Makefile's Package/postfix/conffiles section. Move the creation of mail_spool_directory from host to target in order to enable change of directory ownership to 'postfix' when postinit() is executed on the target. Avoid postfix restart in postinst script that results in an error message during opkg install process. Enable Postfix autostart by creating a link in /etc/rc.d/ on installation. Make the code less verbose. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
7 years ago
postfix: fix uid/gid conflicts, general cleanup Fix uid/gid conflict with package icecast (uid=87, gid=87) and package pianod (uid=88, gid=88) by claiming uid/gid 25 for postfix instead of 87 and uid/gid 26 for postconf instead of 88. Remove main.cf.default that is not used by any Postfix module. The default configuration parameters are hardcoded into postconf and they are available via "postconf -d <parameter>". main.cf.default is therefore unnecessary. "mydomain" parameter should be deduced from the domain configuration setting in /e/c/dhcp rather than from "hostname" in /e/c/system which is often just a hostname without the domain name component. "mynetworks" parameter is unnecessary where "mynetworks_style" is defined. The change of the location of data_directory, queue_directory and mail_spool_directory from /var/lib/postfix, /var/spool/postfix and /var/mail to /data/postfix/lib, /data/postfix/spool and /data/postfix/mail has been postponed until the author of this commit and the maintainer of this package has had a meaningful opportunity to consult with LEDE/OpenWrt developers on the preferred mount point for the persistent data storage device. Change the criteria for executing the post-installation script. Invoke postinst() where the value of "myhostname" parameter in main.cf is not defined rather than where "$config_directory"/opkg_postinst is present with the value of "$config_directory" hardcoded to "$IPKG_INSTROOT"/etc/postfix in /etc/init.d/postfix. Enable PCRE support by default. Remove the code making entries in /etc/sysupgrade.conf and instead define configuration files to be saved during a sysupgrade in Makefile's Package/postfix/conffiles section. Move the creation of mail_spool_directory from host to target in order to enable change of directory ownership to 'postfix' when postinit() is executed on the target. Avoid postfix restart in postinst script that results in an error message during opkg install process. Enable Postfix autostart by creating a link in /etc/rc.d/ on installation. Make the code less verbose. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
7 years ago
postfix: fix uid/gid conflicts, general cleanup Fix uid/gid conflict with package icecast (uid=87, gid=87) and package pianod (uid=88, gid=88) by claiming uid/gid 25 for postfix instead of 87 and uid/gid 26 for postconf instead of 88. Remove main.cf.default that is not used by any Postfix module. The default configuration parameters are hardcoded into postconf and they are available via "postconf -d <parameter>". main.cf.default is therefore unnecessary. "mydomain" parameter should be deduced from the domain configuration setting in /e/c/dhcp rather than from "hostname" in /e/c/system which is often just a hostname without the domain name component. "mynetworks" parameter is unnecessary where "mynetworks_style" is defined. The change of the location of data_directory, queue_directory and mail_spool_directory from /var/lib/postfix, /var/spool/postfix and /var/mail to /data/postfix/lib, /data/postfix/spool and /data/postfix/mail has been postponed until the author of this commit and the maintainer of this package has had a meaningful opportunity to consult with LEDE/OpenWrt developers on the preferred mount point for the persistent data storage device. Change the criteria for executing the post-installation script. Invoke postinst() where the value of "myhostname" parameter in main.cf is not defined rather than where "$config_directory"/opkg_postinst is present with the value of "$config_directory" hardcoded to "$IPKG_INSTROOT"/etc/postfix in /etc/init.d/postfix. Enable PCRE support by default. Remove the code making entries in /etc/sysupgrade.conf and instead define configuration files to be saved during a sysupgrade in Makefile's Package/postfix/conffiles section. Move the creation of mail_spool_directory from host to target in order to enable change of directory ownership to 'postfix' when postinit() is executed on the target. Avoid postfix restart in postinst script that results in an error message during opkg install process. Enable Postfix autostart by creating a link in /etc/rc.d/ on installation. Make the code less verbose. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
7 years ago
postfix: fix uid/gid conflicts, general cleanup Fix uid/gid conflict with package icecast (uid=87, gid=87) and package pianod (uid=88, gid=88) by claiming uid/gid 25 for postfix instead of 87 and uid/gid 26 for postconf instead of 88. Remove main.cf.default that is not used by any Postfix module. The default configuration parameters are hardcoded into postconf and they are available via "postconf -d <parameter>". main.cf.default is therefore unnecessary. "mydomain" parameter should be deduced from the domain configuration setting in /e/c/dhcp rather than from "hostname" in /e/c/system which is often just a hostname without the domain name component. "mynetworks" parameter is unnecessary where "mynetworks_style" is defined. The change of the location of data_directory, queue_directory and mail_spool_directory from /var/lib/postfix, /var/spool/postfix and /var/mail to /data/postfix/lib, /data/postfix/spool and /data/postfix/mail has been postponed until the author of this commit and the maintainer of this package has had a meaningful opportunity to consult with LEDE/OpenWrt developers on the preferred mount point for the persistent data storage device. Change the criteria for executing the post-installation script. Invoke postinst() where the value of "myhostname" parameter in main.cf is not defined rather than where "$config_directory"/opkg_postinst is present with the value of "$config_directory" hardcoded to "$IPKG_INSTROOT"/etc/postfix in /etc/init.d/postfix. Enable PCRE support by default. Remove the code making entries in /etc/sysupgrade.conf and instead define configuration files to be saved during a sysupgrade in Makefile's Package/postfix/conffiles section. Move the creation of mail_spool_directory from host to target in order to enable change of directory ownership to 'postfix' when postinit() is executed on the target. Avoid postfix restart in postinst script that results in an error message during opkg install process. Enable Postfix autostart by creating a link in /etc/rc.d/ on installation. Make the code less verbose. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
7 years ago
postfix: fix uid/gid conflicts, general cleanup Fix uid/gid conflict with package icecast (uid=87, gid=87) and package pianod (uid=88, gid=88) by claiming uid/gid 25 for postfix instead of 87 and uid/gid 26 for postconf instead of 88. Remove main.cf.default that is not used by any Postfix module. The default configuration parameters are hardcoded into postconf and they are available via "postconf -d <parameter>". main.cf.default is therefore unnecessary. "mydomain" parameter should be deduced from the domain configuration setting in /e/c/dhcp rather than from "hostname" in /e/c/system which is often just a hostname without the domain name component. "mynetworks" parameter is unnecessary where "mynetworks_style" is defined. The change of the location of data_directory, queue_directory and mail_spool_directory from /var/lib/postfix, /var/spool/postfix and /var/mail to /data/postfix/lib, /data/postfix/spool and /data/postfix/mail has been postponed until the author of this commit and the maintainer of this package has had a meaningful opportunity to consult with LEDE/OpenWrt developers on the preferred mount point for the persistent data storage device. Change the criteria for executing the post-installation script. Invoke postinst() where the value of "myhostname" parameter in main.cf is not defined rather than where "$config_directory"/opkg_postinst is present with the value of "$config_directory" hardcoded to "$IPKG_INSTROOT"/etc/postfix in /etc/init.d/postfix. Enable PCRE support by default. Remove the code making entries in /etc/sysupgrade.conf and instead define configuration files to be saved during a sysupgrade in Makefile's Package/postfix/conffiles section. Move the creation of mail_spool_directory from host to target in order to enable change of directory ownership to 'postfix' when postinit() is executed on the target. Avoid postfix restart in postinst script that results in an error message during opkg install process. Enable Postfix autostart by creating a link in /etc/rc.d/ on installation. Make the code less verbose. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
7 years ago
postfix: fix uid/gid conflicts, general cleanup Fix uid/gid conflict with package icecast (uid=87, gid=87) and package pianod (uid=88, gid=88) by claiming uid/gid 25 for postfix instead of 87 and uid/gid 26 for postconf instead of 88. Remove main.cf.default that is not used by any Postfix module. The default configuration parameters are hardcoded into postconf and they are available via "postconf -d <parameter>". main.cf.default is therefore unnecessary. "mydomain" parameter should be deduced from the domain configuration setting in /e/c/dhcp rather than from "hostname" in /e/c/system which is often just a hostname without the domain name component. "mynetworks" parameter is unnecessary where "mynetworks_style" is defined. The change of the location of data_directory, queue_directory and mail_spool_directory from /var/lib/postfix, /var/spool/postfix and /var/mail to /data/postfix/lib, /data/postfix/spool and /data/postfix/mail has been postponed until the author of this commit and the maintainer of this package has had a meaningful opportunity to consult with LEDE/OpenWrt developers on the preferred mount point for the persistent data storage device. Change the criteria for executing the post-installation script. Invoke postinst() where the value of "myhostname" parameter in main.cf is not defined rather than where "$config_directory"/opkg_postinst is present with the value of "$config_directory" hardcoded to "$IPKG_INSTROOT"/etc/postfix in /etc/init.d/postfix. Enable PCRE support by default. Remove the code making entries in /etc/sysupgrade.conf and instead define configuration files to be saved during a sysupgrade in Makefile's Package/postfix/conffiles section. Move the creation of mail_spool_directory from host to target in order to enable change of directory ownership to 'postfix' when postinit() is executed on the target. Avoid postfix restart in postinst script that results in an error message during opkg install process. Enable Postfix autostart by creating a link in /etc/rc.d/ on installation. Make the code less verbose. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
7 years ago
postfix: fix uid/gid conflicts, general cleanup Fix uid/gid conflict with package icecast (uid=87, gid=87) and package pianod (uid=88, gid=88) by claiming uid/gid 25 for postfix instead of 87 and uid/gid 26 for postconf instead of 88. Remove main.cf.default that is not used by any Postfix module. The default configuration parameters are hardcoded into postconf and they are available via "postconf -d <parameter>". main.cf.default is therefore unnecessary. "mydomain" parameter should be deduced from the domain configuration setting in /e/c/dhcp rather than from "hostname" in /e/c/system which is often just a hostname without the domain name component. "mynetworks" parameter is unnecessary where "mynetworks_style" is defined. The change of the location of data_directory, queue_directory and mail_spool_directory from /var/lib/postfix, /var/spool/postfix and /var/mail to /data/postfix/lib, /data/postfix/spool and /data/postfix/mail has been postponed until the author of this commit and the maintainer of this package has had a meaningful opportunity to consult with LEDE/OpenWrt developers on the preferred mount point for the persistent data storage device. Change the criteria for executing the post-installation script. Invoke postinst() where the value of "myhostname" parameter in main.cf is not defined rather than where "$config_directory"/opkg_postinst is present with the value of "$config_directory" hardcoded to "$IPKG_INSTROOT"/etc/postfix in /etc/init.d/postfix. Enable PCRE support by default. Remove the code making entries in /etc/sysupgrade.conf and instead define configuration files to be saved during a sysupgrade in Makefile's Package/postfix/conffiles section. Move the creation of mail_spool_directory from host to target in order to enable change of directory ownership to 'postfix' when postinit() is executed on the target. Avoid postfix restart in postinst script that results in an error message during opkg install process. Enable Postfix autostart by creating a link in /etc/rc.d/ on installation. Make the code less verbose. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
7 years ago
postfix: fix uid/gid conflicts, general cleanup Fix uid/gid conflict with package icecast (uid=87, gid=87) and package pianod (uid=88, gid=88) by claiming uid/gid 25 for postfix instead of 87 and uid/gid 26 for postconf instead of 88. Remove main.cf.default that is not used by any Postfix module. The default configuration parameters are hardcoded into postconf and they are available via "postconf -d <parameter>". main.cf.default is therefore unnecessary. "mydomain" parameter should be deduced from the domain configuration setting in /e/c/dhcp rather than from "hostname" in /e/c/system which is often just a hostname without the domain name component. "mynetworks" parameter is unnecessary where "mynetworks_style" is defined. The change of the location of data_directory, queue_directory and mail_spool_directory from /var/lib/postfix, /var/spool/postfix and /var/mail to /data/postfix/lib, /data/postfix/spool and /data/postfix/mail has been postponed until the author of this commit and the maintainer of this package has had a meaningful opportunity to consult with LEDE/OpenWrt developers on the preferred mount point for the persistent data storage device. Change the criteria for executing the post-installation script. Invoke postinst() where the value of "myhostname" parameter in main.cf is not defined rather than where "$config_directory"/opkg_postinst is present with the value of "$config_directory" hardcoded to "$IPKG_INSTROOT"/etc/postfix in /etc/init.d/postfix. Enable PCRE support by default. Remove the code making entries in /etc/sysupgrade.conf and instead define configuration files to be saved during a sysupgrade in Makefile's Package/postfix/conffiles section. Move the creation of mail_spool_directory from host to target in order to enable change of directory ownership to 'postfix' when postinit() is executed on the target. Avoid postfix restart in postinst script that results in an error message during opkg install process. Enable Postfix autostart by creating a link in /etc/rc.d/ on installation. Make the code less verbose. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
7 years ago
postfix: fix uid/gid conflicts, general cleanup Fix uid/gid conflict with package icecast (uid=87, gid=87) and package pianod (uid=88, gid=88) by claiming uid/gid 25 for postfix instead of 87 and uid/gid 26 for postconf instead of 88. Remove main.cf.default that is not used by any Postfix module. The default configuration parameters are hardcoded into postconf and they are available via "postconf -d <parameter>". main.cf.default is therefore unnecessary. "mydomain" parameter should be deduced from the domain configuration setting in /e/c/dhcp rather than from "hostname" in /e/c/system which is often just a hostname without the domain name component. "mynetworks" parameter is unnecessary where "mynetworks_style" is defined. The change of the location of data_directory, queue_directory and mail_spool_directory from /var/lib/postfix, /var/spool/postfix and /var/mail to /data/postfix/lib, /data/postfix/spool and /data/postfix/mail has been postponed until the author of this commit and the maintainer of this package has had a meaningful opportunity to consult with LEDE/OpenWrt developers on the preferred mount point for the persistent data storage device. Change the criteria for executing the post-installation script. Invoke postinst() where the value of "myhostname" parameter in main.cf is not defined rather than where "$config_directory"/opkg_postinst is present with the value of "$config_directory" hardcoded to "$IPKG_INSTROOT"/etc/postfix in /etc/init.d/postfix. Enable PCRE support by default. Remove the code making entries in /etc/sysupgrade.conf and instead define configuration files to be saved during a sysupgrade in Makefile's Package/postfix/conffiles section. Move the creation of mail_spool_directory from host to target in order to enable change of directory ownership to 'postfix' when postinit() is executed on the target. Avoid postfix restart in postinst script that results in an error message during opkg install process. Enable Postfix autostart by creating a link in /etc/rc.d/ on installation. Make the code less verbose. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
7 years ago
postfix: fix uid/gid conflicts, general cleanup Fix uid/gid conflict with package icecast (uid=87, gid=87) and package pianod (uid=88, gid=88) by claiming uid/gid 25 for postfix instead of 87 and uid/gid 26 for postconf instead of 88. Remove main.cf.default that is not used by any Postfix module. The default configuration parameters are hardcoded into postconf and they are available via "postconf -d <parameter>". main.cf.default is therefore unnecessary. "mydomain" parameter should be deduced from the domain configuration setting in /e/c/dhcp rather than from "hostname" in /e/c/system which is often just a hostname without the domain name component. "mynetworks" parameter is unnecessary where "mynetworks_style" is defined. The change of the location of data_directory, queue_directory and mail_spool_directory from /var/lib/postfix, /var/spool/postfix and /var/mail to /data/postfix/lib, /data/postfix/spool and /data/postfix/mail has been postponed until the author of this commit and the maintainer of this package has had a meaningful opportunity to consult with LEDE/OpenWrt developers on the preferred mount point for the persistent data storage device. Change the criteria for executing the post-installation script. Invoke postinst() where the value of "myhostname" parameter in main.cf is not defined rather than where "$config_directory"/opkg_postinst is present with the value of "$config_directory" hardcoded to "$IPKG_INSTROOT"/etc/postfix in /etc/init.d/postfix. Enable PCRE support by default. Remove the code making entries in /etc/sysupgrade.conf and instead define configuration files to be saved during a sysupgrade in Makefile's Package/postfix/conffiles section. Move the creation of mail_spool_directory from host to target in order to enable change of directory ownership to 'postfix' when postinit() is executed on the target. Avoid postfix restart in postinst script that results in an error message during opkg install process. Enable Postfix autostart by creating a link in /etc/rc.d/ on installation. Make the code less verbose. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
7 years ago
postfix: fix uid/gid conflicts, general cleanup Fix uid/gid conflict with package icecast (uid=87, gid=87) and package pianod (uid=88, gid=88) by claiming uid/gid 25 for postfix instead of 87 and uid/gid 26 for postconf instead of 88. Remove main.cf.default that is not used by any Postfix module. The default configuration parameters are hardcoded into postconf and they are available via "postconf -d <parameter>". main.cf.default is therefore unnecessary. "mydomain" parameter should be deduced from the domain configuration setting in /e/c/dhcp rather than from "hostname" in /e/c/system which is often just a hostname without the domain name component. "mynetworks" parameter is unnecessary where "mynetworks_style" is defined. The change of the location of data_directory, queue_directory and mail_spool_directory from /var/lib/postfix, /var/spool/postfix and /var/mail to /data/postfix/lib, /data/postfix/spool and /data/postfix/mail has been postponed until the author of this commit and the maintainer of this package has had a meaningful opportunity to consult with LEDE/OpenWrt developers on the preferred mount point for the persistent data storage device. Change the criteria for executing the post-installation script. Invoke postinst() where the value of "myhostname" parameter in main.cf is not defined rather than where "$config_directory"/opkg_postinst is present with the value of "$config_directory" hardcoded to "$IPKG_INSTROOT"/etc/postfix in /etc/init.d/postfix. Enable PCRE support by default. Remove the code making entries in /etc/sysupgrade.conf and instead define configuration files to be saved during a sysupgrade in Makefile's Package/postfix/conffiles section. Move the creation of mail_spool_directory from host to target in order to enable change of directory ownership to 'postfix' when postinit() is executed on the target. Avoid postfix restart in postinst script that results in an error message during opkg install process. Enable Postfix autostart by creating a link in /etc/rc.d/ on installation. Make the code less verbose. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
7 years ago
  1. #
  2. # Copyright (C) 2014-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=postfix
  9. PKG_VERSION:=3.5.8
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:= \
  13. https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \
  14. http://ftp.porcupine.org/mirrors/postfix-release/official/
  15. PKG_HASH:=22582628cf3edc18c5155c9ff44543dd95a9435fb68135d76a99f572cb07456f
  16. PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
  17. PKG_LICENSE:=IPL-1.0
  18. PKG_LICENSE_FILES:=LICENSE
  19. PKG_CPE_ID:=cpe:/a:postfix:postfix
  20. PKG_CONFIG_DEPENDS:= \
  21. CONFIG_POSTFIX_TLS \
  22. CONFIG_POSTFIX_SASL \
  23. CONFIG_POSTFIX_LDAP \
  24. CONFIG_POSTFIX_CDB \
  25. CONFIG_POSTFIX_DB \
  26. CONFIG_POSTFIX_SQLITE \
  27. CONFIG_POSTFIX_MYSQL \
  28. CONFIG_POSTFIX_PGSQL \
  29. CONFIG_POSTFIX_PCRE \
  30. CONFIG_POSTFIX_EAI \
  31. include $(INCLUDE_DIR)/package.mk
  32. define Package/postfix
  33. SECTION:=mail
  34. CATEGORY:=Mail
  35. TITLE:=Postfix Mail Transmit Agent
  36. USERID:= \
  37. postfix=25:postfix=25 \
  38. postdrop=26:postdrop=26
  39. URL:=http://www.postfix.org/
  40. DEPENDS:=+POSTFIX_CDB:tinycdb +POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +POSTFIX_SQLITE:libsqlite3 +POSTFIX_MYSQL:libmysqlclient +POSTFIX_PGSQL:libpq +POSTFIX_EAI:icu +POSTFIX_PCRE:libpcre
  41. MENU:=1
  42. endef
  43. define Package/postfix/description
  44. 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.
  45. endef
  46. define Package/postfix/config
  47. config POSTFIX_TLS
  48. depends on PACKAGE_postfix
  49. bool "TLS support"
  50. default y
  51. help
  52. Implements TLS support in postfix (using OpenSSL).
  53. config POSTFIX_SASL
  54. depends on PACKAGE_postfix
  55. bool "SASL support"
  56. default y
  57. help
  58. Implements SASL support in postfix (using Cyrus SASL).
  59. config POSTFIX_LDAP
  60. depends on PACKAGE_postfix
  61. bool "LDAP support"
  62. default y
  63. help
  64. Implements LDAP support in postfix (using OpenLDAP).
  65. config POSTFIX_DB
  66. depends on PACKAGE_postfix
  67. bool "BerkeleyDB support"
  68. default n
  69. help
  70. Implements support for btree and hash files using Berkeley DB.
  71. config POSTFIX_CDB
  72. depends on PACKAGE_postfix
  73. bool "CDB support"
  74. default y
  75. help
  76. Implements support for cdb files using tinycdb
  77. config POSTFIX_SQLITE
  78. depends on PACKAGE_postfix
  79. bool "SQLITE support"
  80. default y
  81. help
  82. Implements support for SQLite3 DB
  83. config POSTFIX_MYSQL
  84. depends on PACKAGE_postfix
  85. bool "MYSQL support"
  86. default n
  87. help
  88. Implements support for MySQL
  89. config POSTFIX_PGSQL
  90. depends on PACKAGE_postfix
  91. bool "PostgreSQL support"
  92. default n
  93. help
  94. Implement support for PostgreSQL
  95. config POSTFIX_PCRE
  96. depends on PACKAGE_postfix
  97. bool "PCRE support"
  98. default y
  99. help
  100. Implement support for Perl Compatible Regular Expressions
  101. config POSTFIX_EAI
  102. depends on PACKAGE_postfix
  103. bool "SMTPUTF8 support"
  104. default n
  105. help
  106. Enable Postfix support for Email Address Internationalization
  107. (EAI) as defined in RFC 6531 (SMTPUTF8 extension), RFC 6532
  108. (Internationalized email headers) and RFC 6533
  109. (Internationalized delivery status notifications).
  110. Since version 3.0, Postfix fully supports UTF-8 email
  111. addresses and UTF-8 message header values.
  112. endef
  113. CCARGS=-DNO_NIS -fcommon
  114. AUXLIBS=-L$(STAGING_DIR)/usr/lib
  115. ifdef CONFIG_POSTFIX_TLS
  116. CCARGS+=-DUSE_TLS
  117. AUXLIBS+=-lssl -lcrypto
  118. endif
  119. ifdef CONFIG_POSTFIX_SASL
  120. CCARGS+=-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I$(STAGING_DIR)/usr/include/sasl
  121. AUXLIBS+=-lsasl2
  122. endif
  123. ifdef CONFIG_POSTFIX_LDAP
  124. CCARGS+=-DHAS_LDAP
  125. AUXLIBS+=-lldap -llber
  126. endif
  127. ifdef CONFIG_POSTFIX_CDB
  128. CCARGS+=-DHAS_CDB
  129. AUXLIBS+=-lcdb
  130. ifndef default_database_type
  131. default_database_type=cdb
  132. endif
  133. endif
  134. ifdef CONFIG_POSTFIX_DB
  135. AUXLIBS+=-ldb
  136. CCARGS+=-DHAS_DB
  137. ifndef default_database_type
  138. default_database_type=btree
  139. endif
  140. else
  141. CCARGS+=-DNO_DB
  142. endif
  143. ifdef CONFIG_POSTFIX_SQLITE
  144. CCARGS+=-DHAS_SQLITE -I$(STAGING_DIR)/usr/include/
  145. AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lsqlite3 -lpthread
  146. endif
  147. ifdef CONFIG_POSTFIX_MYSQL
  148. CCARGS+=-DHAS_MYSQL -I$(STAGING_DIR)/usr/include/mysql
  149. AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lmysqlclient -lz -lm
  150. endif
  151. ifdef CONFIG_POSTFIX_PGSQL
  152. CCARGS+=-DHAS_PGSQL -I$(STAGING_DIR)/usr/include/
  153. AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lpq
  154. endif
  155. ifdef CONFIG_POSTFIX_PCRE
  156. CCARGS+=-DHAS_PCRE -I$(STAGING_DIR)/usr/include/
  157. AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lpcre
  158. else
  159. CCARGS+=-DNO_PCRE
  160. endif
  161. ifdef CONFIG_POSTFIX_EAI
  162. AUXLIBS+=-licuuc
  163. CCARGS+=-DHAS_EAI
  164. smtputf8_conf = yes
  165. else
  166. CCARGS+=-DNO_EAI
  167. smtputf8_conf = no
  168. endif
  169. CCARGS+=-DDEF_DB_TYPE=\"$(default_database_type)\"
  170. TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lresolv)
  171. # prevent postfix-install from executing postconf at build time
  172. # by explicitly providing the default values to postfix-install
  173. config_directory=/etc/postfix
  174. sample_directory=/etc/postfix
  175. command_directory=/usr/sbin
  176. daemon_directory=/usr/libexec/postfix
  177. html_directory=no
  178. manpage_directory=no
  179. readme_directory=no
  180. sendmail_path=/usr/sbin/sendmail
  181. newaliases_path=/usr/bin/newaliases
  182. mailq_path=/usr/bin/mailq
  183. shlib_directory=/usr/lib/postfix
  184. meta_directory=/etc/postfix
  185. data_directory=/usr/var/lib/postfix
  186. queue_directory=/usr/var/spool/postfix
  187. mail_spool_directory=/usr/var/mail
  188. ln_suffix=.postfix
  189. ln_suffix_pre_pf=.pre-postfix
  190. ln_suffix_legacy=.old
  191. define Package/postfix/conffiles
  192. $(config_directory)
  193. endef
  194. define Build/Configure
  195. if [ "$(default_database_type)" = "" ]; then \
  196. echo "Build error: CDB or BerkeleyDB support must be enabled."; \
  197. exit 1; \
  198. fi
  199. cd $(PKG_BUILD_DIR); $(MAKE) makefiles CCARGS='$(CCARGS)' $(TARGET_CONFIGURE_OPTS) AUXLIBS="$(AUXLIBS)"
  200. endef
  201. define Build/Compile
  202. # 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
  203. cd $(PKG_BUILD_DIR); $(MAKE) $(TARGET_CONFIGURE_OPTS) CC='$(TARGET_CC) $(CCARGS) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)'
  204. $(foreach p, \
  205. default_database_type config_directory command_directory daemon_directory \
  206. shlib_directory manpage_directory data_directory queue_directory \
  207. mail_spool_directory, \
  208. echo "$(p) = $($(p))" >> $(PKG_BUILD_DIR)/conf/main.cf;)
  209. endef
  210. define Package/postfix/install
  211. 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
  212. $(INSTALL_DIR) $(1)/etc/init.d/
  213. $(INSTALL_BIN) ./files/postfix.init $(1)/etc/init.d/postfix
  214. endef
  215. define Package/postfix/postinst
  216. #!/bin/sh
  217. for syml in $(sendmail_path) $(newaliases_path) $(mailq_path); do
  218. file=$${IPKG_INSTROOT}$${syml}
  219. if [ -f "$${file}$(ln_suffix_legacy)" ]; then
  220. # update files saved by legacy versions of Postfix postinst script
  221. mv "$${file}$(ln_suffix_legacy)" "$${file}$(ln_suffix_pre_pf)"
  222. fi
  223. if [ -f "$${file}" ]; then
  224. linktarget=$$(basename $$(readlink "$${file}"))
  225. postfixf=$$(basename "$${syml}")$(ln_suffix)
  226. if [ $${linktarget} != $${postfixf} ]; then
  227. mv "$${file}" "$${file}$(ln_suffix_pre_pf)"
  228. echo "Info: $${file} saved as $${file}$(ln_suffix_pre_pf)"
  229. fi
  230. fi
  231. if [ ! -f "$${file}" ]; then
  232. ln -s "$${syml}$(ln_suffix)" "$${file}"
  233. fi
  234. done
  235. # fix file/dir ownership in data_directory and queue_directory
  236. if [ -z "$${IPKG_INSTROOT}" ]; then
  237. postfix set-permissions
  238. fi
  239. endef
  240. define Package/postfix/postrm
  241. #!/bin/sh
  242. rm -f "$(sendmail_path)" "$(newaliases_path)" "$(mailq_path)"
  243. for syml in "$(sendmail_path)" "$(newaliases_path)" "$(mailq_path)"; do
  244. file=$${IPKG_INSTROOT}$${syml}
  245. if [ -f "$${file}$(ln_suffix_legacy)" ]; then
  246. # update files saved by legacy versions of Postfix postinst script
  247. mv "$${file}$(ln_suffix_legacy)" "$${file}$(ln_suffix_pre_pf)"
  248. fi
  249. if [ -f "$${syml}$(ln_suffix_pre_pf)" ]; then
  250. mv "$${syml}$(ln_suffix_pre_pf)" "$${syml}"
  251. echo "Info: $${syml}$(ln_suffix_pre_pf) restored as $${syml}"
  252. fi
  253. done
  254. endef
  255. $(eval $(call BuildPackage,postfix))