summaryrefslogtreecommitdiff
path: root/mail/postfix35/files/postfix.in
diff options
context:
space:
mode:
authorOlli Hauer <ohauer@FreeBSD.org>2021-05-06 19:09:50 +0200
committerOlli Hauer <ohauer@FreeBSD.org>2021-05-06 19:09:50 +0200
commitefa868ac9533de8e3f73b9cc6c938af81bc9caaf (patch)
treecd2b51bab57ff64d6c0811ce23a8768cce6f599d /mail/postfix35/files/postfix.in
parentgraphics/tkpng: Pass maintainership to submitter (diff)
mail/postfix35 add new port
Postfix 3.6 requires minimum OpenSSL 1.1.1, this port is an alternative for FreeBSD 11 users using 'OpenSSL base' and will be removed if FreeBSD 11 is EoL
Diffstat (limited to 'mail/postfix35/files/postfix.in')
-rw-r--r--mail/postfix35/files/postfix.in50
1 files changed, 50 insertions, 0 deletions
diff --git a/mail/postfix35/files/postfix.in b/mail/postfix35/files/postfix.in
new file mode 100644
index 000000000000..597da191fd16
--- /dev/null
+++ b/mail/postfix35/files/postfix.in
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# PROVIDE: postfix mail
+# REQUIRE: %%REQUIRE%%
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable postfix:
+# postfix_enable (bool): Set it to "YES" to enable postfix.
+# Default is "NO".
+# postfix_pidfile (path): Set full path to master.pid.
+# Default is "/var/spool/postfix/pid/master.pid".
+# postfix_procname (command): Set command that start master. Used to verify if
+# postfix is running.
+# Default is "%%PREFIX%%/libexec/postfix/master".
+# postfix_flags (str): Flags passed to postfix-script on startup.
+# Default is "".
+#
+
+. /etc/rc.subr
+
+name="postfix"
+rcvar=postfix_enable
+
+load_rc_config $name
+
+: ${postfix_enable:="NO"}
+: ${postfix_pidfile:="/var/spool/postfix/pid/master.pid"}
+: ${postfix_procname:="%%PREFIX%%/libexec/postfix/master"}
+
+start_cmd=${name}_start
+stop_cmd=${name}_stop
+extra_commands="reload"
+reload_cmd="${name}_reload"
+
+pidfile=${postfix_pidfile}
+procname=${postfix_procname}
+
+postfix_start() {
+ %%PREFIX%%/sbin/postfix ${postfix_flags} start
+}
+
+postfix_stop() {
+ %%PREFIX%%/sbin/postfix ${postfix_flags} stop
+}
+
+postfix_reload() {
+ %%PREFIX%%/sbin/postfix ${postfix_flags} reload
+}
+
+run_rc_command "$1"