[70049] users/krischik/Utilities

krischik at macports.org krischik at macports.org
Wed Jul 28 07:31:32 PDT 2010


Revision: 70049
          http://trac.macports.org/changeset/70049
Author:   krischik at macports.org
Date:     2010-07-28 07:31:30 -0700 (Wed, 28 Jul 2010)
Log Message:
-----------
New Dovecot scripts

Added Paths:
-----------
    users/krischik/Utilities/Install_Dovecot.command
    users/krischik/Utilities/Make_Dovecot_Certificates.command
    users/krischik/Utilities/Make_Dovecot_Directories.command
    users/krischik/Utilities/Make_Dovecot_User.command
    users/krischik/Utilities/Restart_Dovecot.command

Copied: users/krischik/Utilities/Install_Dovecot.command (from rev 67705, users/krischik/Utilities/Install_SpamAssassin.command)
===================================================================
--- users/krischik/Utilities/Install_Dovecot.command	                        (rev 0)
+++ users/krischik/Utilities/Install_Dovecot.command	2010-07-28 14:31:30 UTC (rev 70049)
@@ -0,0 +1,34 @@
+#!/opt/local/bin/zsh
+############################################################## {{{1 ##########
+#   $Author: krischik at macports.org $
+#   $Revision: 52694 $
+#   $Date: 2009-06-21 20:48:35 +0200 (So, 21. Jun 2009) $
+#   $HeadURL: http://svn.macports.org/repository/macports/users/krischik/atari800/Upload.command $
+############################################################## }}}1 ##########
+
+source ${0:h}/Setup.command
+
+setopt X_Trace;
+
+if test "${USER}" = "root"; then
+    gcc_select gcc42
+
+    launchctl unload -w "/Library/LaunchDaemons/org.macports.dovecot.plist";
+
+    for I in							\
+	"dovecot"	;
+    do
+	Install_Update ${I} ${=General_Variants};
+    done; unset I
+
+    launchctl load -w "/Library/LaunchDaemons/org.macports.dovecot.plist";
+
+    gcc_select gnat-gcc
+else
+    setopt Multi_OS;
+    sudo ${0:a} 1>&1 2>&2 &>~/Library/Logs/${0:r:t}.out;
+fi;
+
+############################################################ {{{1 ###########
+# vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab :
+# vim: set textwidth=0 filetype=zsh foldmethod=marker nospell :

Added: users/krischik/Utilities/Make_Dovecot_Certificates.command
===================================================================
--- users/krischik/Utilities/Make_Dovecot_Certificates.command	                        (rev 0)
+++ users/krischik/Utilities/Make_Dovecot_Certificates.command	2010-07-28 14:31:30 UTC (rev 70049)
@@ -0,0 +1,46 @@
+#!/opt/local/bin/zsh
+############################################################## {{{1 ##########
+#   $Author: krischik at macports.org $
+#   $Revision: 52694 $
+#   $Date: 2009-06-21 20:48:35 +0200 (So, 21. Jun 2009) $
+#   $HeadURL: http://svn.macports.org/repository/macports/users/krischik/atari800/Upload.command $
+############################################################## }}}1 ##########
+
+setopt X_Trace;
+
+# Generates a self-signed certificate.
+# Edit dovecot-openssl.cnf before running this.
+
+OPENSSL=${OPENSSL-openssl}
+SSLDIR=${SSLDIR-/opt/local/etc/ssl}
+OPENSSLCONFIG=${OPENSSLCONFIG-dovecot-openssl.cnf}
+
+CERTFILE=$SSLDIR/certs/dovecot.pem
+KEYFILE=$SSLDIR/private/dovecot.pem
+
+if [ ! -d $SSLDIR/certs ]; then
+  echo "$SSLDIR/certs directory doesn't exist"
+fi
+
+if [ ! -d $SSLDIR/private ]; then
+  echo "$SSLDIR/private directory doesn't exist"
+fi
+
+if [ -f $CERTFILE ]; then
+  echo "$CERTFILE already exists, won't overwrite"
+  exit 1
+fi
+
+if [ -f $KEYFILE ]; then
+  echo "$KEYFILE already exists, won't overwrite"
+  exit 1
+fi
+
+$OPENSSL req -new -x509 -nodes -config $OPENSSLCONFIG -out $CERTFILE -keyout $KEYFILE -days 3650 || exit 2
+chmod 0600 $KEYFILE
+echo 
+$OPENSSL x509 -subject -fingerprint -noout -in $CERTFILE || exit 2
+
+############################################################ {{{1 ###########
+# vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab :
+# vim: set textwidth=0 filetype=zsh foldmethod=marker nospell :


Property changes on: users/krischik/Utilities/Make_Dovecot_Certificates.command
___________________________________________________________________
Added: svn:executable
   + *

Added: users/krischik/Utilities/Make_Dovecot_Directories.command
===================================================================
--- users/krischik/Utilities/Make_Dovecot_Directories.command	                        (rev 0)
+++ users/krischik/Utilities/Make_Dovecot_Directories.command	2010-07-28 14:31:30 UTC (rev 70049)
@@ -0,0 +1,29 @@
+#!/opt/local/bin/zsh
+############################################################## {{{1 ##########
+#   $Author: krischik at macports.org $
+#   $Revision: 52694 $
+#   $Date: 2009-06-21 20:48:35 +0200 (So, 21. Jun 2009) $
+#   $HeadURL: http://svn.macports.org/repository/macports/users/krischik/atari800/Upload.command $
+############################################################## }}}1 ##########
+
+setopt X_Trace;
+setopt No_Err_Exit;
+
+if test "${USER}" = "root"; then
+    gmkdir --parents --verbose /opt/local/var/log/dovecot
+    gmkdir --parents --verbose /opt/local/var/run/dovecot
+    gmkdir --parents --verbose /opt/local/etc/ssl/certs
+    gmkdir --parents --verbose /opt/local/etc/ssl/private
+    
+    gchown --recursive _dovecot:_dovecot /opt/local/var/log/dovecot
+    gchown --recursive _dovecot:_dovecot /opt/local/var/run/dovecot 
+    gchown --recursive _dovecot:_dovecot /opt/local/etc/dovecot 
+else
+    setopt Multi_OS;
+
+    sudo ${0:a} 1>&1 2>&2 &>~/Library/Logs/${0:r:t}.out;
+fi;
+
+############################################################ {{{1 ###########
+# vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab :
+# vim: set textwidth=0 filetype=zsh foldmethod=marker nospell :


Property changes on: users/krischik/Utilities/Make_Dovecot_Directories.command
___________________________________________________________________
Added: svn:executable
   + *

Added: users/krischik/Utilities/Make_Dovecot_User.command
===================================================================
--- users/krischik/Utilities/Make_Dovecot_User.command	                        (rev 0)
+++ users/krischik/Utilities/Make_Dovecot_User.command	2010-07-28 14:31:30 UTC (rev 70049)
@@ -0,0 +1,31 @@
+#!/opt/local/bin/zsh
+############################################################## {{{1 ##########
+#   $Author: krischik at macports.org $
+#   $Revision: 52694 $
+#   $Date: 2009-06-21 20:48:35 +0200 (So, 21. Jun 2009) $
+#   $HeadURL: http://svn.macports.org/repository/macports/users/krischik/atari800/Upload.command $
+############################################################## }}}1 ##########
+
+setopt X_Trace;
+setopt No_Err_Exit;
+
+if test "${USER}" = "root"; then
+    dscl . -create /Groups/_dovecot
+    dscl . -create /Groups/_dovecot UniqueID 30 
+    dscl . -create /Users/_dovecot
+    dscl . -create /Users/_dovecot UserShell /bin/false
+    dscl . -create /Users/_dovecot RealName "Dovecot IMAP Server"
+    dscl . -create /Users/_dovecot UniqueID 30
+    dscl . -create /Users/_dovecot PrimaryGroupID 30
+    dscl . -create /Users/_dovecot NFSHomeDirectory /opt/local/var/run/dovecot
+
+    defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add _fetchmail _dovecot
+else
+    setopt Multi_OS;
+
+    sudo ${0:a} 1>&1 2>&2 &>~/Library/Logs/${0:r:t}.out;
+fi;
+
+############################################################ {{{1 ###########
+# vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab :
+# vim: set textwidth=0 filetype=zsh foldmethod=marker nospell :


Property changes on: users/krischik/Utilities/Make_Dovecot_User.command
___________________________________________________________________
Added: svn:executable
   + *

Added: users/krischik/Utilities/Restart_Dovecot.command
===================================================================
--- users/krischik/Utilities/Restart_Dovecot.command	                        (rev 0)
+++ users/krischik/Utilities/Restart_Dovecot.command	2010-07-28 14:31:30 UTC (rev 70049)
@@ -0,0 +1,25 @@
+#!/opt/local/bin/zsh
+############################################################## {{{1 ##########
+#   $Author: krischik at macports.org $
+#   $Revision: 52694 $
+#   $Date: 2009-06-21 20:48:35 +0200 (So, 21. Jun 2009) $
+#   $HeadURL: http://svn.macports.org/repository/macports/users/krischik/atari800/Upload.command $
+############################################################## }}}1 ##########
+
+setopt X_Trace;
+setopt No_Err_Exit;
+
+if test "${USER}" = "root"; then
+    launchctl unload -w /Library/LaunchDaemons/org.macports.dovecot.plist
+    launchctl unload -w /Library/LaunchDaemons/org.macports.slapd.plist
+    launchctl load   -w /Library/LaunchDaemons/org.macports.slapd.plist
+    launchctl load   -w /Library/LaunchDaemons/org.macports.dovecot.plist
+else
+    setopt Multi_OS;
+
+    sudo ${0:a} 1>&1 2>&2 &>~/Library/Logs/${0:r:t}.out;
+fi;
+
+############################################################ {{{1 ###########
+# vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab :
+# vim: set textwidth=0 filetype=zsh foldmethod=marker nospell :


Property changes on: users/krischik/Utilities/Restart_Dovecot.command
___________________________________________________________________
Added: svn:executable
   + *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100728/5ca18eef/attachment.html>


More information about the macports-changes mailing list