FreeBSD Bugzilla – Attachment 61320 Details for
Bug 91894
[maintainer] mail/dkim-milter startup script now can handle multiple instantiation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 4.31 KB, created by
Hirohisa Yamaguchi
on 2006-01-17 02:50:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Hirohisa Yamaguchi
Created:
2006-01-17 02:50:02 UTC
Size:
4.31 KB
patch
obsolete
>diff -rpu ports.orig/mail/dkim-milter/files/milter-dkim.sh.in ports/mail/dkim-milter/files/milter-dkim.sh.in >--- ports.orig/mail/dkim-milter/files/milter-dkim.sh.in Wed Jan 11 22:50:22 2006 >+++ ports/mail/dkim-milter/files/milter-dkim.sh.in Tue Jan 17 10:45:17 2006 >@@ -3,9 +3,9 @@ > # $FreeBSD: ports/mail/dkim-milter/files/milter-dkim.sh.in,v 1.1 2006/01/11 13:50:22 ehaupt Exp $ > # > >-# PROVIDE: milterdkim >+# PROVIDE: milter-dkim > # REQUIRE: DAEMON >-# BEFORE: sendmail >+# BEFORE: mail > # KEYWORD: shutdown > > # Define these milterdkim_* variables in one of these files: >@@ -13,28 +13,83 @@ > # /etc/rc.conf.local > # /etc/rc.conf.d/milterdkim > # >+# milterdkim_enable (bool): Set to "NO" by default. >+# Set it to "YES" to enable dkim-milter >+# milterdkim_profiles (list): Set to "" by default. >+# Define your profiles here. >+# milterdkim_socket (str): Path to the milter socket. >+# milterdkim_domain (str): Domainpart of From: in mails to sign. >+# milterdkim_key (str): Path to the private key file to sign with. >+# milterdkim_flags (str): Flags passed to start command. >+# >+# milterdkim_${profile}_* : Variables per profile. >+# Sockets must be different from each other. >+# > # DO NOT CHANGE THESE DEFAULT VALUES HERE > # > milterdkim_enable=${milterdkim_enable:-"NO"} >+milterdkim_profiles=${milterdkim_profiles:-} > milterdkim_socket=${milterdkim_socket:-"local:/var/run/dkim-filter"} >-milterdkim_pid=${milterdkim_pid:-"/var/run/dkim-filter.pid"} > milterdkim_domain=${milterdkim_domain:-"example.com"} > milterdkim_key=${milterdkim_key:-"/var/db/domainkeys/default.key.pem"} >-milterdkim_flags=${milterdkim_flags:-"-d ${milterdkim_domain} -c nowsp -m MSA \ >--s ${milterdkim_key} -S default"} >+## milterdkim_flags expands escaped variables later. >+milterdkim_flags=${milterdkim_flags:-"-d \${milterdkim_domain\} -c nowsp -m MSA \ >+-s \${milterdkim_key\} -S default"} > > . %%RC_SUBR%% > > name="milterdkim" >-pidfile=${milterdkim_pid} > rcvar=`set_rcvar` >+ >+start_precmd="dkim_prepcmd" >+stop_postcmd="dkim_prepcmd" > command="%%PREFIX%%/libexec/dkim-filter" >-command_args="-l -p ${milterdkim_socket} -P ${milterdkim_pid}" >-stop_postcmd="dkim_postcmd" >+_pidprefix="/var/run/dkim-filter" >+pidfile="${_pidprefix}.pid" > > load_rc_config $name > >-dkim_postcmd () >+if [ -n "$2" ]; then >+ profile="$2" >+ if [ "x${milterdkim_profiles}" != "x" ]; then >+ pidfile="${_pidprefix}.${profile}.pid" >+ eval milterdkim_enable="\${milterdkim_${profile}_enable:-${milterdkim_enable}}" >+ eval milterdkim_socket="\${milterdkim_${profile}_socket:-}" >+ if [ "x${milterdkim_socket}" = "x" ];then >+ echo "You must define a socket (milterdkim_${profile}_socket)" >+ exit 1 >+ fi >+ eval milterdkim_domain="\${milterdkim_${profile}_domain:-${milterdkim_domain}}" >+ eval milterdkim_key="\${milterdkim_${profile}_key:-${milterdkim_key}}" >+ eval milterdkim_flags="\${milterdkim_${profile}_flags:-${milterdkim_flags}}" >+ command_args="-l -p ${milterdkim_socket} -P ${pidfile}" >+ else >+ echo "$0: extra argument ignored" >+ fi >+else >+ if [ "x${milterdkim_profiles}" != "x" -a "x$1" != "x" ]; then >+ if [ "x$1" != "xrestart" ]; then >+ for profile in ${milterdkim_profiles}; do >+ echo "===> milterdkim profile: ${profile}" >+ %%PREFIX%%/etc/rc.d/milter-dkim.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 >+ milterdkim_flags=${milterdkim_flags} >+ command_args="-l -p ${milterdkim_socket} -P ${pidfile}" >+ fi >+fi >+ >+dkim_prepcmd () > { > if [ -S ${milterdkim_socket##local:} ] ; then > rm -f ${milterdkim_socket##local:} >diff -rpu ports.orig/mail/dkim-milter/pkg-message ports/mail/dkim-milter/pkg-message >--- ports.orig/mail/dkim-milter/pkg-message Wed Jan 11 22:50:22 2006 >+++ ports/mail/dkim-milter/pkg-message Tue Jan 17 05:47:36 2006 >@@ -8,4 +8,8 @@ INPUT_MAIL_FILTER(`dkim-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 milterdkim_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 91894
: 61320