Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Sep 2023 10:25:47 GMT
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 6a5b0380b37a - main - mail/postsrsd: Update to 2.0.8
Message-ID:  <202309051025.385APlIb080695@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6a5b0380b37a05794c67bed898b2cf1acc339817

commit 6a5b0380b37a05794c67bed898b2cf1acc339817
Author:     Krzysztof <ports@bsdserwis.com>
AuthorDate: 2023-09-05 10:10:58 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2023-09-05 10:22:09 +0000

    mail/postsrsd: Update to 2.0.8
    
    This release is a new generation of postsrsd. This update includes:
    
    * support for redis
    * support for sqlite3
    * disable installing postsrsd.secret - it is generated during first
      start of postsrsd (startup script)
    * add pkg-message which informs about changes in configuration
    * some cleanup suggested by portlint
    
    Changelog: https://github.com/roehling/postsrsd/releases/tag/2.0.8
    
    PR:             273571
---
 mail/postsrsd/Makefile                         |  32 +++--
 mail/postsrsd/distinfo                         |   6 +-
 mail/postsrsd/files/patch-CMakeLists.txt       | 160 ++++++++++++-------------
 mail/postsrsd/files/patch-postinstall.cmake.in |  69 -----------
 mail/postsrsd/files/patch-src_config.c         |  10 ++
 mail/postsrsd/files/patch-src_srs.c            |  10 ++
 mail/postsrsd/files/pkg-message.in             |  11 ++
 mail/postsrsd/files/postsrsd.in                |  18 ---
 8 files changed, 137 insertions(+), 179 deletions(-)

diff --git a/mail/postsrsd/Makefile b/mail/postsrsd/Makefile
index 18b7bee90abb..cf906a7d0d4a 100644
--- a/mail/postsrsd/Makefile
+++ b/mail/postsrsd/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	postsrsd
-DISTVERSION=	1.10
+PORTVERSION=	2.0.8
 PORTEPOCH=	1
 CATEGORIES=	mail
 
@@ -7,29 +7,45 @@ MAINTAINER=	ports@bsdserwis.com
 COMMENT=	Postfix Sender Rewriting Scheme daemon
 WWW=		https://github.com/roehling/postsrsd
 
-LICENSE=	GPLv2+
-LICENSE_FILE=	${WRKSRC}/LICENSE
+LICENSE=	BSD3CLAUSE GPLv3+
+LICENSE_COMB=	dual
 
-BUILD_DEPENDS=	help2man:misc/help2man
+LIB_DEPENDS=	libconfuse.so:devel/libconfuse
 
 USES=		cmake cpe pkgconfig
+
 CPE_VENDOR=	${PORTNAME}_project
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	roehling
+USE_LDCONFIG=	yes
 USE_RC_SUBR=	${PORTNAME}
 
 CMAKE_ARGS=	--no-warn-unused-cli \
+		-DBUILD_TESTING=OFF \
+		-DCMAKE_BUILD_TYPE=Release \
+		-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS \
 		-DCMAKE_INCLUDE_PATH="${LOCALBASE}/include" \
 		-DCMAKE_LIBRARY_PATH="${LOCALBASE}/lib"
 
-PLIST_FILES=	man/man8/postsrsd.8.gz \
-		sbin/postsrsd
+SUB_FILES=	pkg-message
+
+PLIST_FILES=	\
+		sbin/postsrsd \
+		"@dir /var/db/${PORTNAME}"
 
-PORTDOCS=	README.md README_UPGRADE.md main.cf.ex
+PORTDOCS=	CHANGELOG.rst README.rst postsrsd.conf
 
-OPTIONS_DEFINE=	DOCS
+OPTIONS_DEFINE=	DOCS REDIS SQLITE
 
 DOCS_CMAKE_BOOL=	ENABLE_DOCS
 
+REDIS_DESC=		Store envelope senders in redis
+REDIS_LIB_DEPENDS=	libhiredis.so:databases/hiredis
+REDIS_CMAKE_BOOL=	WITH_REDIS
+
+SQLITE_DESC=	Use sqlite3 backebd for storing envelope senders
+SQLITE_USES=	sqlite
+SQLITE_CMAKE_BOOL=	WITH_SQLITE
+
 .include <bsd.port.mk>
diff --git a/mail/postsrsd/distinfo b/mail/postsrsd/distinfo
index 9957be2425e4..2de4b450292e 100644
--- a/mail/postsrsd/distinfo
+++ b/mail/postsrsd/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1488207086
-SHA256 (roehling-postsrsd-1.10_GH0.tar.gz) = 4880bf12f1a75791f10a995e46a7fce26ee760d1d6942b4602244d2026d4e64a
-SIZE (roehling-postsrsd-1.10_GH0.tar.gz) = 34844
+TIMESTAMP = 1693511528
+SHA256 (roehling-postsrsd-2.0.8_GH0.tar.gz) = c2eb4af90ce42ec394adf7b9b94f700b851e3a6a6a8a2a843a57dc9f45260f8e
+SIZE (roehling-postsrsd-2.0.8_GH0.tar.gz) = 64185
diff --git a/mail/postsrsd/files/patch-CMakeLists.txt b/mail/postsrsd/files/patch-CMakeLists.txt
index c4e43dfaf237..551653c47e84 100644
--- a/mail/postsrsd/files/patch-CMakeLists.txt
+++ b/mail/postsrsd/files/patch-CMakeLists.txt
@@ -1,88 +1,86 @@
---- CMakeLists.txt.orig	2020-12-12 09:55:17 UTC
+--- CMakeLists.txt.orig	2023-08-25 21:10:07 UTC
 +++ CMakeLists.txt
-@@ -7,12 +7,15 @@ include(CTest)
- 
- option(GENERATE_SRS_SECRET "Generate a random SRS secret if none exists during install" ON)
- option(USE_APPARMOR "Enable AppArmor profile" OFF)
+@@ -49,7 +49,7 @@ set(POSTSRSD_CONFIGDIR
+         "The default directory where PostSRSd should look for configuration files"
+ )
+ set(POSTSRSD_DATADIR
+-    "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/${PROJECT_NAME}"
++    "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/db/${PROJECT_NAME}"
+     CACHE PATH "The default directory where PostSRSd should put runtime data"
+ )
+ set(POSTSRSD_CHROOTDIR
+@@ -73,24 +73,21 @@ option(WITH_REDIS
+        OFF
+ )
+ add_feature_info(WITH_REDIS WITH_REDIS "use Redis as database backend")
++set(DOC_DIR "share/doc/${PROJECT_NAME}" CACHE PATH "Path for documentation files")
 +option(MK_CHROOT_DIR "Chroot jail for daemon" OFF)
- option(USE_SELINUX "Enable SELinux policy module" OFF)
- 
-+if(MK_CHROOT_DIR)
- set(CHROOT_DIR "${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}" CACHE PATH "Chroot jail for daemon")
-+endif()
- set(SYSCONF_DIR "/etc" CACHE PATH "Global system configuration folder")
- set(SYSD_UNIT_DIR "${SYSCONF_DIR}/systemd/system" CACHE PATH "Systemd unit file folder")
--set(CONFIG_DIR "${SYSCONF_DIR}/default" CACHE PATH "Location of startup configuration file")
-+set(CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/etc" CACHE PATH "Location of startup configuration file")
- set(DOC_DIR "share/doc/${PROJECT_NAME}" CACHE PATH "Path for documentation files")
- mark_as_advanced(CHROOT_DIR SYSCONF_DIR SYSD_UNIT_DIR CONFIG_DIR DOC_DIR)
- 
-@@ -20,8 +23,6 @@ find_program(HELP2MAN help2man DOC "path to help2man e
- find_program(DD dd DOC "path to dd executable")
- find_program(BASE64 base64 DOC "path to base64 executable")
- find_program(OPENSSL openssl DOC "path to OpenSSL executable")
--find_program(INSSERV insserv DOC "path to insserv executable")
--find_program(CHKCONFIG chkconfig DOC "path to chkconfig executable")
- find_program(SYSTEMCTL systemctl DOC "path to systemctl executable")
- 
- if(CMAKE_SYSTEM_NAME MATCHES "SunOS")
-@@ -69,23 +70,6 @@ endif()
- check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
- add_definitions(-DSIZEOF_UNSIGNED_LONG=${SIZEOF_UNSIGNED_LONG})
- 
--if(NOT DEFINED INIT_FLAVOR)
--    if(SYSTEMCTL)
--        message(STATUS "Detected init flavor: systemd")
--        set(INIT_FLAVOR "systemd" CACHE STRING "Init daemon of this system")
--    elseif(IS_DIRECTORY "${SYSCONF_DIR}/init.d" AND EXISTS "${SYSCONF_DIR}/init.d/functions")
--        message(STATUS "Detected init flavor: sysv-redhat")
--        set(INIT_FLAVOR "sysv-redhat" CACHE STRING "Init daemon of this system")
--    elseif(IS_DIRECTORY "${SYSCONF_DIR}/init.d" AND EXISTS "/lib/lsb/init-functions")
--        message(STATUS "Detected init flavor: sysv-lsb")
--        set(INIT_FLAVOR "sysv-lsb" CACHE STRING "Init daemon of this system")
--    else()
--        message(STATUS "Detected init flavor: none")
--        message(STATUS "System startup files will not be installed")
--        set(INIT_FLAVOR "" CACHE STRING "Init daemon of this system")
--    endif()
--endif()
--
- add_definitions(-DPOSTSRSD_VERSION=\"${PROJECT_VERSION}\")
- add_executable(${PROJECT_NAME} postsrsd.c sha1.c srs2.c)
- 
-@@ -95,16 +79,8 @@ if(CMAKE_SYSTEM_NAME MATCHES "SunOS")
- endif()
- 
- set(POSTSRSD "${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
--set(APPARMOR_PROFILE "${CMAKE_INSTALL_PREFIX}/sbin/${POSTSRSD}")
--string(REGEX REPLACE "^/+" "" APPARMOR_PROFILE "${APPARMOR_PROFILE}")
--string(REPLACE "/" "." APPARMOR_PROFILE "${APPARMOR_PROFILE}")
- 
--configure_file(init/${PROJECT_NAME}.sysv-lsb.in ${PROJECT_NAME}.sysv-lsb @ONLY)
--configure_file(init/${PROJECT_NAME}.sysv-redhat.in ${PROJECT_NAME}.sysv-redhat @ONLY)
--configure_file(init/${PROJECT_NAME}.apparmor.in ${PROJECT_NAME}.apparmor @ONLY)
--configure_file(init/${PROJECT_NAME}.systemd.in ${PROJECT_NAME}.systemd @ONLY)
- configure_file(init/${PROJECT_NAME}.default.in ${PROJECT_NAME}.default @ONLY)
--configure_file(init/${PROJECT_NAME}-systemd-launcher.in ${PROJECT_NAME}-systemd-launcher @ONLY)
+ option(TESTS_WITH_ASAN "Run test suite with AddressSanitizer" ON)
+ option(DEVELOPER_BUILD "Add strict compiler options for development only" OFF)
+-option(GENERATE_SRS_SECRET "Generate and install a postsrsd.secret" ON)
++option(GENERATE_SRS_SECRET "Generate and install a postsrsd.secret" OFF)
+ add_feature_info(
+     GENERATE_SRS_SECRET
+     GENERATE_SRS_SECRET
+     "generate missing ${CMAKE_INSTALL_FULL_SYSCONFDIR}/${PROJECT_NAME}.secret on install"
+ )
+-option(INSTALL_SYSTEMD_SERVICE "Install the systemd postsrsd.service unit" ON)
++option(INSTALL_SYSTEMD_SERVICE "Install the systemd postsrsd.service unit" OFF)
+ add_feature_info(
+     INSTALL_SYSTEMD_SERVICE INSTALL_SYSTEMD_SERVICE
+     "install the systemd postsrsd.service unit"
+ )
+-find_systemd_unit_destination(DETECTED_SYSTEMD_UNITDIR)
+-set(SYSTEMD_UNITDIR
+-    "${DETECTED_SYSTEMD_UNITDIR}"
+-    CACHE PATH "Install destination for the systemd postsrsd.service unit"
+-)
+ find_systemd_sysusers_destination(DETECTED_SYSTEMD_SYSUSERSDIR)
+ set(SYSTEMD_SYSUSERSDIR
+     "${DETECTED_SYSTEMD_SYSUSERSDIR}"
+@@ -118,7 +115,6 @@ mark_as_advanced(
+     TESTS_WITH_ASAN
+     GENERATE_SRS_SECRET
+     DEVELOPER_BUILD
+-    SYSTEMD_UNITDIR
+     POSTSRSD_CONFIGDIR
+     POSTSRSD_CHROOTDIR
+     POSTSRSD_DATADIR
+@@ -200,11 +196,7 @@ endif()
+ set(THREADS_PREFER_PTHREAD_FLAG TRUE)
+ find_package(Threads QUIET)
  
- configure_file(postinstall.cmake.in postinstall.cmake @ONLY)
+-add_autotools_dependency(
+-    Confuse
+-    LIBRARY_NAME confuse
+-    EXPORTED_TARGET Confuse::Confuse
+-)
++find_package(Confuse REQUIRED)
  
-@@ -118,7 +94,7 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
- 	COMMAND ${HELP2MAN} ARGS -s8 -o${PROJECT_NAME}.8 -n "Postfix Sender Rewriting Scheme daemon" -N -h-h -v-v ${CMAKE_CURRENT_BINARY_DIR}/${POSTSRSD}
- 	VERBATIM
+ if(WITH_REDIS)
+     set(DISABLE_TESTS
+@@ -221,6 +213,7 @@ if(WITH_REDIS)
+             DIRECTORY "${hiredis_SOURCE_DIR}" PROPERTY EXCLUDE_FROM_ALL TRUE
+         )
+     endif()
++    find_package(Hiredis REQUIRED)
+     if(TARGET hiredis::hiredis_static)
+         set(HIREDIS_TARGET hiredis::hiredis_static)
+     elseif(TARGET hiredis::hiredis)
+@@ -364,13 +357,9 @@ install(TARGETS postsrsd RUNTIME DESTINATION ${CMAKE_I
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.conf"
+         DESTINATION "${CMAKE_INSTALL_DATADIR}/doc/${PROJECT_NAME}"
  )
--install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.8 DESTINATION "share/man/man8")
-+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.8 DESTINATION "man/man8")
- endif()
- 
- if(USE_APPARMOR)
-@@ -135,6 +111,8 @@ if(USE_SELINUX)
+-if(INSTALL_SYSTEMD_SERVICE)
+-    install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.service"
+-            DESTINATION "${SYSTEMD_UNITDIR}"
+-    )
+-    install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sysusers.d/${PROJECT_NAME}.conf"
+-            DESTINATION "${SYSTEMD_SYSUSERSDIR}"
+-    )
++
++if(ENABLE_DOCS)
++       install(FILES README.rst CHANGELOG.rst doc/postsrsd.conf DESTINATION "${DOC_DIR}" )
  endif()
  
- install(TARGETS ${PROJECT_NAME} DESTINATION "sbin")
--install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-systemd-launcher DESTINATION "share/${PROJECT_NAME}")
-+if(ENABLE_DOCS)
-+	install(FILES README.md README_UPGRADE.md main.cf.ex DESTINATION "${DOC_DIR}")
-+endif()
- install(FILES README.md README_UPGRADE.md main.cf.ex DESTINATION "${DOC_DIR}")
- install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/postinstall.cmake")
+ if(GENERATE_SRS_SECRET)
diff --git a/mail/postsrsd/files/patch-postinstall.cmake.in b/mail/postsrsd/files/patch-postinstall.cmake.in
deleted file mode 100644
index 91b345d09cf8..000000000000
--- a/mail/postsrsd/files/patch-postinstall.cmake.in
+++ /dev/null
@@ -1,69 +0,0 @@
---- postinstall.cmake.in.orig	2015-12-13 08:56:05 UTC
-+++ postinstall.cmake.in
-@@ -1,4 +1,3 @@
--set(GENERATE_SRS_SECRET "@GENERATE_SRS_SECRET@")
- set(SYSCONF_DIR "@SYSCONF_DIR@")
- set(SYSD_UNIT_DIR "@SYSD_UNIT_DIR@")
- set(CHROOT_DIR "@CHROOT_DIR@")
-@@ -7,51 +6,13 @@ set(INIT_FLAVOR "@INIT_FLAVOR@")
- set(SECRET_FILE "@PROJECT_NAME@.secret")
- set(DD "@DD@")
- set(BASE64_ENCODE "@BASE64_ENCODE@")
--set(INSSERV "@INSSERV@")
--set(CHKCONFIG "@CHKCONFIG@")
- 
- if(CHROOT_DIR AND NOT EXISTS "$ENV{DESTDIR}${CHROOT_DIR}")
- 	message(STATUS "Chroot jail: $ENV{DESTDIR}${CHROOT_DIR}")
- 	file(MAKE_DIRECTORY "$ENV{DESTDIR}${CHROOT_DIR}")
- endif()
- 
--if(INIT_FLAVOR)
--	if (NOT EXISTS "$ENV{DESTDIR}${CONFIG_DIR}/@PROJECT_NAME@")
--		file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.default" DESTINATION "${CONFIG_DIR}" RENAME "@PROJECT_NAME@")
--	else()
--		file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.default" DESTINATION "${CONFIG_DIR}" RENAME "@PROJECT_NAME@.new")
--		message(STATUS "")
--		message(STATUS "*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*")
--		message(STATUS "*!* ${CONFIG_DIR}/@PROJECT_NAME@ will NOT be overwritten!")
--		message(STATUS "*!* Please note the changes from @PROJECT_NAME@.new in the same folder and")
--		message(STATUS "*!* update your configuration accordinly.")
--		message(STATUS "*!* See also README_UPGRADE.md for details")
--		message(STATUS "*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*")
--		message(STATUS "")
--	endif()
--endif()
--
--if(INIT_FLAVOR STREQUAL "sysv-lsb")
--	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.sysv-lsb" TYPE PROGRAM DESTINATION "${SYSCONF_DIR}/init.d" RENAME "@PROJECT_NAME@")
--	if(INSSERV)
--		execute_process(
--			COMMAND ${INSSERV} -p "$ENV{DESTDIR}${SYSCONF_DIR}/init.d" @PROJECT_NAME@
--		)
--	endif()
--elseif(INIT_FLAVOR STREQUAL "sysv-redhat")
--	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.sysv-redhat" TYPE PROGRAM DESTINATION "${SYSCONF_DIR}/init.d" RENAME "@PROJECT_NAME@")
--	if(CHKCONFIG AND NOT "$ENV{DESTDIR}")
--		execute_process(
--			COMMAND ${CHKCONFIG} --add @PROJECT_NAME@
--		)
--	endif()
--elseif(INIT_FLAVOR STREQUAL "upstart")
--	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.upstart" DESTINATION "${SYSCONF_DIR}/init" RENAME "@PROJECT_NAME@.conf")
--elseif(INIT_FLAVOR STREQUAL "systemd")
--	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.systemd" DESTINATION "${SYSD_UNIT_DIR}" RENAME "@PROJECT_NAME@.service")
--endif()
--
--if(GENERATE_SRS_SECRET AND DD AND BASE64_ENCODE AND EXISTS "/dev/urandom" AND NOT EXISTS "$ENV{DESTDIR}${SYSCONF_DIR}/${SECRET_FILE}")
-+if(GENERATE_SRS_SECRET AND DD AND BASE64_ENCODE AND EXISTS "/dev/urandom")
- 	message(STATUS "Generating secret key")
- 	execute_process(
- 		COMMAND ${DD} if=/dev/urandom bs=18 count=1
-@@ -60,7 +21,7 @@ if(GENERATE_SRS_SECRET AND DD AND BASE64
- 		ERROR_QUIET
- 		OUTPUT_STRIP_TRAILING_WHITESPACE
- 	)
--file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}" DESTINATION "${SYSCONF_DIR}" RENAME "${SECRET_FILE}" PERMISSIONS OWNER_READ OWNER_WRITE)
-+file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}" DESTINATION "${CONFIG_DIR}" RENAME "${SECRET_FILE}" PERMISSIONS OWNER_READ OWNER_WRITE)
- file(REMOVE "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}")
- endif()
- 
diff --git a/mail/postsrsd/files/patch-src_config.c b/mail/postsrsd/files/patch-src_config.c
new file mode 100644
index 000000000000..9373b010cad3
--- /dev/null
+++ b/mail/postsrsd/files/patch-src_config.c
@@ -0,0 +1,10 @@
+--- src/config.c.orig	2023-07-15 18:53:41 UTC
++++ src/config.c
+@@ -21,6 +21,7 @@
+ #include "util.h"
+ 
+ #include <errno.h>
++#include <getopt.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/mail/postsrsd/files/patch-src_srs.c b/mail/postsrsd/files/patch-src_srs.c
new file mode 100644
index 000000000000..9472800e6613
--- /dev/null
+++ b/mail/postsrsd/files/patch-src_srs.c
@@ -0,0 +1,10 @@
+--- src/srs.c.orig	2023-07-15 18:53:41 UTC
++++ src/srs.c
+@@ -21,6 +21,7 @@
+ 
+ #include <ctype.h>
+ #include <string.h>
++#include <strings.h>
+ 
+ char* postsrsd_forward(const char* addr, const char* domain, srs_t* srs,
+                        database_t* db, domain_set_t* local_domains, bool* error,
diff --git a/mail/postsrsd/files/pkg-message.in b/mail/postsrsd/files/pkg-message.in
new file mode 100644
index 000000000000..001856c6f371
--- /dev/null
+++ b/mail/postsrsd/files/pkg-message.in
@@ -0,0 +1,11 @@
+[
+{ type: install
+  message: <<EOM
+If you upgrading from postsrsd 1.x you should remember to check
+and modify postsrsd.conf file. postsrsd dropped support for command line
+parameters.
+  Additional setup instructions and sample config file can be found at:
+    %%DOCSDIR%%
+EOM
+}
+]
diff --git a/mail/postsrsd/files/postsrsd.in b/mail/postsrsd/files/postsrsd.in
index e41d540f9ed0..a4625245439c 100644
--- a/mail/postsrsd/files/postsrsd.in
+++ b/mail/postsrsd/files/postsrsd.in
@@ -13,12 +13,6 @@
 # postsrsd_enable (bool):   Set to "NO" by default.
 #                           Set it to "YES" to enable postsrsd.
 # postsrsd_uid (str):       Set username to run postsrsd.
-# postsrsd_secret (str):    Secret file file. See postsrsd(8)
-# postsrsd_domain (str):    Local domain name: rewrite to originate from this domain
-# postsrsd_exclude_domains (str):      Domains to exclude (comma-separated list)
-# postsrsd_forward_port (int): Port to listen for forward map
-# postsrsd_reverse_port (int): Port to listen for reverse map
-# postsrsd_idle_timeout (int): Timeout for idle client connection
 # postsrsd_flags (str):     Flags passed to start command.
 
 . /etc/rc.subr
@@ -38,24 +32,12 @@ load_rc_config $name
 # DO NOT CHANGE THESE DEFAULT VALUES HERE
 #
 : ${postsrsd_enable="NO"}
-: ${postsrsd_domain=`/bin/hostname`}
 : ${postsrsd_uid="mailnull"}
-: ${postsrsd_secret="%%PREFIX%%/etc/postsrsd.secret"}
-: ${postsrsd_forward_port="10001"}
-: ${postsrsd_reverse_port="10002"}
-: ${postsrsd_idle_timeout="1800"}
-: ${postsrsd_exclude_domains=""}
 
 # Options other than above can be set with $postsrsd_flags.
 # see postsrsd documentation for detail.
 
 [ -n "${postsrsd_uid}" ] && _uid_prefix="-u"
-[ -n "${postsrsd_domain}" ] && cmd_args="-d ${postsrsd_domain}"
-[ -n "${postsrsd_secret}" ] && cmd_args="${cmd_args} -s ${postsrsd_secret}"
-[ -n "${postsrsd_forward_port}" ] && cmd_args="${cmd_args} -f ${postsrsd_forward_port}"
-[ -n "${postsrsd_reverse_port}" ] && cmd_args="${cmd_args} -r ${postsrsd_reverse_port}"
-[ -n "${postsrsd_idle_timeout}" ] && cmd_args="${cmd_args} -t ${postsrsd_idle_timeout}"
-[ -n "${postsrsd_exclude_domains}" ] && cmd_args="${cmd_args} -X${postsrsd_exclude_domains}"
 
 command_args=" -D ${_uid_prefix} ${postsrsd_uid} -p ${pidfile} ${cmd_args} ${postsrsd_flags}"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202309051025.385APlIb080695>