emailrelay: add some runtime options
authorOthmar Truniger <github@truniger.ch>
Mon, 20 Aug 2018 17:18:08 +0000 (19:18 +0200)
committerOthmar Truniger <github@truniger.ch>
Mon, 20 Aug 2018 17:29:41 +0000 (19:29 +0200)
Signed-off-by: Othmar Truniger <github@truniger.ch>
mail/emailrelay/Makefile
mail/emailrelay/files/emailrelay.config
mail/emailrelay/files/emailrelay.init

index 6b61380fdb218f1a5b273944dc45bcad45c6688e..616a1efa1b4119328faeb7f1c42237729a1a5a96 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=emailrelay
 PKG_VERSION:=2.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
 PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION)
index 1a4eb6758f1a7faedeae172f1eec61dc6d87a032..7b73de89608107a6403ff629c6abb02643d8a5e1 100644 (file)
@@ -3,6 +3,9 @@ config emailrelay 'server'
        option mode 'server'
        option port '25'
        option remote_clients '0'
+#      option address_verifier '/usr/local/bin/address-verifier.sh'
+#      option domain 'my.example.com'
+#      option anonymous '1'
 #      option server_tls '/etc/path/to/certificate'
 #      option server_auth '/etc/emailrelay.auth'
 #      option extra_cmdline ''
@@ -13,6 +16,9 @@ config emailrelay 'proxy'
        option smarthost '192.0.2.1:25'
        option port '25'
        option remote_clients '0'
+#      option address_verifier '/usr/local/bin/address-verifier.sh'
+#      option domain 'my.example.com'
+#      option anonymous '1'
 #      option server_tls '/etc/path/to/certificate'
 #      option server_auth '/etc/emailrelay.auth'
 #      option client_tls '1'
index 5b78f2170a60869bc9723234d5e8560ca5a11444..28f1fdd04987d4244b350f7b70cd5795957d1523 100644 (file)
@@ -9,7 +9,7 @@ NAME=emailrelay
 
 emailrelay_instance()
 {
-       local enabled mode port remote_clients server_tls server_auth extra_cmdline smarthost client_tls client_auth
+       local enabled mode port remote_clients server_tls server_auth extra_cmdline smarthost client_tls client_auth address_verifier domain anonymous
 
        config_get_bool enabled "$1" enabled
        config_get mode "$1" mode
@@ -21,7 +21,9 @@ emailrelay_instance()
        config_get smarthost "$1" smarthost
        config_get_bool client_tls "$1" client_tls
        config_get client_auth "$1" client_auth
-
+       config_get address_verifier "$1" address_verifier
+       config_get domain "$1" domain
+       config_get_bool anonymous "$1" anonymous
 
        [ "$enabled" = 0 ] && return 1
 
@@ -39,6 +41,9 @@ emailrelay_instance()
                        [ -n "$server_auth" ] && procd_append_param command --server-auth "$server_auth"
                        [ "$client_tls" = 1 ] && procd_append_param command --client-tls
                        [ -n "$client_auth" ] && procd_append_param command --client-auth "$client_auth"
+                       [ -n "$address_verifier" ] && procd_append_param command --address-verifier "$address_verifier"
+                       [ -n "$domain" ] && procd_append_param command --domain "$domain"
+                       [ "$anonymous" = 1 ] && procd_append_param command --anonymous
                        ;;
                "cmdline")
                        # empty by intention (just append extra_cmdline)