aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-08-11 23:41:42 +0100
committerDaniel Golle <daniel@makrotopia.org>2021-08-12 03:11:40 +0100
commit31d12ead78e29837b6eb29d08684f36e8af9ce46 (patch)
tree2a0668e9aeeef636a9d56116a1b6ddb0ab4091c8
parentf518cfb2502b746b8e392a295e81ff551e2295e0 (diff)
exim: add default config and init script, enable lmtp
Ship default configuration /etc/exim/exim.conf as well as a simple procd init script. Enable building with LMTP for better integration with dovecot. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r--mail/exim/Makefile5
-rw-r--r--mail/exim/files/exim.init19
2 files changed, 24 insertions, 0 deletions
diff --git a/mail/exim/Makefile b/mail/exim/Makefile
index 013d8a140..289aa891b 100644
--- a/mail/exim/Makefile
+++ b/mail/exim/Makefile
@@ -159,6 +159,7 @@ define Build/Configure
$(SED) 's%# SUPPORT_MBX=yes%SUPPORT_MBX=yes%' $(PKG_BUILD_DIR)/Local/Makefile
# enable lookup modules
$(SED) 's%# LOOKUP_DSEARCH=yes%LOOKUP_DSEARCH=yes%' $(PKG_BUILD_DIR)/Local/Makefile
+ $(SED) 's%# TRANSPORT_LMTP=yes%TRANSPORT_LMTP=yes%' $(PKG_BUILD_DIR)/Local/Makefile
ifdef CONFIG_PACKAGE_exim-lookup-dbmdb
$(SED) 's%LOOKUP_DBM=yes%LOOKUP_DBM=2%' $(PKG_BUILD_DIR)/Local/Makefile
else
@@ -265,6 +266,10 @@ endef
define Package/exim/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/build-Linux-$(ARCH)/exim $(1)/usr/sbin
+ $(INSTALL_DIR) $(1)/etc/exim
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/configure.default $(1)/etc/exim/exim.conf
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/exim.init $(1)/etc/init.d/exim
endef
Package/exim-gnutls/install = $(Package/exim/install)
diff --git a/mail/exim/files/exim.init b/mail/exim/files/exim.init
new file mode 100644
index 000000000..ed4a97952
--- /dev/null
+++ b/mail/exim/files/exim.init
@@ -0,0 +1,19 @@
+#!/bin/sh /etc/rc.common
+
+START=80
+STOP=80
+
+USE_PROCD=1
+
+start_service() {
+ mkdir -p -m 0755 /var/lib/exim
+ mkdir -p -m 0755 /var/run/exim
+ chmod 0750 /var/lib/exim
+ procd_open_instance
+ procd_set_param command /usr/sbin/exim
+ procd_append_param command -C /etc/exim/exim.conf
+ procd_append_param command -bd -q15m
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+}