git: 3f78f6fb2bbc - main - mail/mailhog: Add sysrc variable to set hostname parameter
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 31 Jul 2023 08:45:08 UTC
The branch main has been updated by eduardo:
URL: https://cgit.FreeBSD.org/ports/commit/?id=3f78f6fb2bbc195969745c4fccb2ca7d0a581e40
commit 3f78f6fb2bbc195969745c4fccb2ca7d0a581e40
Author: Einar Bjarni Halldórsson <einar@isnic.is>
AuthorDate: 2023-07-31 08:42:14 +0000
Commit: Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-07-31 08:42:14 +0000
mail/mailhog: Add sysrc variable to set hostname parameter
This patch adds the sysrc variable "mailhog_hostname".
By setting the variable, we can configure the hostname mailhog uses for
EHLO/HELO and message IDs
PR: 272130
---
mail/mailhog/Makefile | 2 +-
mail/mailhog/files/mailhog.in | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/mail/mailhog/Makefile b/mail/mailhog/Makefile
index fd91f010684a..3d7b477975e9 100644
--- a/mail/mailhog/Makefile
+++ b/mail/mailhog/Makefile
@@ -1,7 +1,7 @@
PORTNAME= mailhog
DISTVERSIONPREFIX= v
DISTVERSION= 1.0.1
-PORTREVISION= 11
+PORTREVISION= 12
CATEGORIES= mail devel
MAINTAINER= mops@punkt.de
diff --git a/mail/mailhog/files/mailhog.in b/mail/mailhog/files/mailhog.in
index 1187e79eb67a..67e10b359d82 100644
--- a/mail/mailhog/files/mailhog.in
+++ b/mail/mailhog/files/mailhog.in
@@ -16,6 +16,8 @@
# mailhog_ui_port (int): Port to listen on for UI. 8025 (same as API)
# by default.
# mailhog_runtimeuser (string): User mailhog should run as. 'nobody' by default.
+# mailhog_hostname (string): Hostname to use for EHLO/HELO and message IDs.
+# mailhog.example.com by default.
#
# Please think twice before exposing this server to the Internet. This is an
# insecure tool without any authentication specifically to aid development
@@ -34,10 +36,11 @@ pidfile="/var/run/${name}.pid"
: ${mailhog_api_port:="8025"}
: ${mailhog_ui_port:="8025"}
: ${mailhog_runtimeuser:="nobody"}
+: ${mailhog_hostname:="mailhog.example"}
load_rc_config "${name}"
command="/usr/sbin/daemon"
-command_args="-c -r -f -P ${pidfile} -u ${mailhog_runtimeuser} %%PREFIX%%/bin/${name} -api-bind-addr ${mailhog_bind_addr}:${mailhog_api_port} -ui-bind-addr ${mailhog_bind_addr}:${mailhog_ui_port} -smtp-bind-addr ${mailhog_bind_addr}:${mailhog_smtp_port}"
+command_args="-c -r -f -P ${pidfile} -u ${mailhog_runtimeuser} %%PREFIX%%/bin/${name} -api-bind-addr ${mailhog_bind_addr}:${mailhog_api_port} -ui-bind-addr ${mailhog_bind_addr}:${mailhog_ui_port} -smtp-bind-addr ${mailhog_bind_addr}:${mailhog_smtp_port} -hostname ${mailhog_hostname}"
run_rc_command "$1"