FreeBSD Bugzilla – Attachment 61321 Details for
Bug 91895
[patch] mail/dk-milter startup script to run multiple instances
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 4.14 KB, created by
Hirohisa Yamaguchi
on 2006-01-17 03:00:19 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Hirohisa Yamaguchi
Created:
2006-01-17 03:00:19 UTC
Size:
4.14 KB
patch
obsolete
>diff -rpu ports.orig/mail/dk-milter/files/milter-dk.sh.in ports/mail/dk-milter/files/milter-dk.sh.in >--- ports.orig/mail/dk-milter/files/milter-dk.sh.in Sun Jan 15 18:11:04 2006 >+++ ports/mail/dk-milter/files/milter-dk.sh.in Tue Jan 17 11:16:54 2006 >@@ -3,9 +3,9 @@ > # $FreeBSD: ports/mail/dk-milter/files/milter-dk.sh.in,v 1.2 2006/01/15 09:11:04 pav Exp $ > # > >-# PROVIDE: milterdk >+# PROVIDE: milter-dk > # REQUIRE: DAEMON >-# BEFORE: sendmail >+# BEFORE: mail > # KEYWORD: shutdown > > # Define these milterdk_* variables in one of these files: >@@ -13,28 +13,83 @@ > # /etc/rc.conf.local > # /etc/rc.conf.d/milterdk > # >+# milterdk_enable (bool): Set to "NO" by default. >+# Set it to "YES" to enable dk-milter >+# milterdk_profiles (list): Set to "" by default. >+# Define your profiles here. >+# milterdk_socket (str): Path to the milter socket. >+# milterdk_domain (str): Domainpart of From: in mails to sign. >+# milterdk_key (str): Path to the private key file to sign with. >+# milterdk_flags (str): Flags passed to start command. >+# >+# milterdk_${profile}_* : Variables per profile. >+# Sockets must be different from each other. >+# > # DO NOT CHANGE THESE DEFAULT VALUES HERE > # > milterdk_enable=${milterdk_enable:-"NO"} >+milterdk_profiles=${milterdk_profiles:-} > milterdk_socket=${milterdk_socket:-"local:/var/run/dk-filter"} >-milterdk_pid=${milterdk_pid:-"/var/run/dk-filter.pid"} > milterdk_domain=${milterdk_domain:-"example.com"} > milterdk_key=${milterdk_key:-"/var/db/domainkeys/default.key.pem"} >-milterdk_flags=${milterdk_flags:-"-d ${milterdk_domain} -c nofws -H -m MSA \ >--s ${milterdk_key} -S default"} >+## milterdk_flags expands escaped variables later. >+milterdk_flags=${milterdk_flags:-"-d \${milterdk_domain\} -c nofws -H -m MSA \ >+-s \${milterdk_key\} -S default"} > > . %%RC_SUBR%% > > name="milterdk" >-pidfile=${milterdk_pid} > rcvar=`set_rcvar` >+ >+start_precmd="dk_prepcmd" >+stop_postcmd="dk_prepcmd" > command="%%PREFIX%%/libexec/dk-filter" >-command_args="-l -p ${milterdk_socket} -P ${milterdk_pid}" >-stop_postcmd="dk_postcmd" >+_pidprefix="/var/run/dk-filter" >+pidfile="${_pidprefix}.pid" > > load_rc_config $name > >-dk_postcmd () >+if [ -n "$2" ]; then >+ profile="$2" >+ if [ "x${milterdk_profiles}" != "x" ]; then >+ pidfile="${_pidprefix}.${profile}.pid" >+ eval milterdk_enable="\${milterdk_${profile}_enable:-${milterdk_enable}}" >+ eval milterdk_socket="\${milterdk_${profile}_socket:-}" >+ if [ "x${milterdk_socket}" = "x" ];then >+ echo "You must define a socket (milterdk_${profile}_socket)" >+ exit 1 >+ fi >+ eval milterdk_domain="\${milterdk_${profile}_domain:-${milterdk_domain}}" >+ eval milterdk_key="\${milterdk_${profile}_key:-${milterdk_key}}" >+ eval milterdk_flags="\${milterdk_${profile}_flags:-${milterdk_flags}}" >+ command_args="-l -p ${milterdk_socket} -P ${pidfile}" >+ else >+ echo "$0: extra argument ignored" >+ fi >+else >+ if [ "x${milterdk_profiles}" != "x" -a "x$1" != "x" ]; then >+ if [ "x$1" != "xrestart" ]; then >+ for profile in ${milterdk_profiles}; do >+ echo "===> milterdk profile: ${profile}" >+ %%PREFIX%%/etc/rc.d/milter-dk.sh $1 ${profile} >+ retcode="$?" >+ if [ "0${retcode}" -ne 0 ]; then >+ failed="${profile} (${retcode}) ${failed:-}" >+ else >+ success="${profile} ${success:-}" >+ fi >+ done >+ exit 0 >+ else >+ restart_precmd="" >+ fi >+ else >+ milterdk_flags=${milterdk_flags} >+ command_args="-l -p ${milterdk_socket} -P ${pidfile}" >+ fi >+fi >+ >+dk_prepcmd () > { > if [ -S ${milterdk_socket##local:} ] ; then > rm -f ${milterdk_socket##local:} >diff -rpu ports.orig/mail/dk-milter/pkg-message ports/mail/dk-milter/pkg-message >--- ports.orig/mail/dk-milter/pkg-message Sun May 22 22:39:11 2005 >+++ ports/mail/dk-milter/pkg-message Tue Jan 17 11:22:32 2006 >@@ -8,4 +8,8 @@ INPUT_MAIL_FILTER(`dk-filter', `S=unix:/ > define(`confMILTER_MACROS_CONNECT', `j, {daemon_name}') > define(`confMILTER_MACROS_ENVFROM', `i, {auth_type}') > >+And to run the milter from startup, add milterdk_enable="YES" in >+your /etc/rc.conf. >+Extra options can be found in startup script. >+ > ************************************************************************
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 91895
: 61321