--- cyrus-imapd-2.2-2.2.13.orig/debian/examples/mboxtocyrus +++ cyrus-imapd-2.2-2.2.13/debian/examples/mboxtocyrus @@ -0,0 +1,69 @@ +#!/bin/sh +# +# Script to import mbox-format mailboxes to Cyrus folders +# Requires formail (from procmail) +# +# Note: As this runs cyrdeliver directly, you'll need to be +# a member of the mail group for it to work. +# +# Note2: Make sure the user 'postman' is listed as an lmtp_admin +# that is allowed to proxy. +# +# Use this script at your own risk! I'm not responsible if +# it trashes your mail system :) +# +# By Michael-John Turner +# +# Changelog: +# Fri Dec 1 21:19:19 SAST 2000 +# - Incorporate some modifications from Tomas Pospisek +# + +USER=$1 +MAILBOX=$2 +CYRUSFOLDER=$3 +CYRDELIVER=/usr/sbin/cyrdeliver +FORMAIL=/usr/bin/formail + +if ! [ -x "$FORMAIL" ]; then + echo "" + echo "formail (from procmail) is required to run this script" + echo "" + exit 1 +fi + + +# This assumes id prints group names within parentheses +if ! `id | grep -q "(mail)"`; then + echo "" + echo "You must be a member of the mail group to run this script" + echo "" + exit 1 +fi + + +if [ "$USER" = "" ]; then + echo "" + echo "syntax: $0 user [mbox] [cyrus folder]" + echo "" + echo "If no mbox is specified, the user and mbox name are taken to be the same" + echo "If no cyrus folder is specified, the INBOX is used" + echo "" + exit 2 +fi + + + +if [ "$MAILBOX" == "" ]; then + MAILBOX=$USER +fi + +if [ "$CYRUSFOLDER" == "" ]; then + echo "Adding mailbox '$MAILBOX' to Cyrus INBOX of user '$USER'..." + $FORMAIL -I "From " < $MAILBOX -s $CYRDELIVER $USER + else + echo "Adding mailbox '$MAILBOX' to Cyrus folder '$CYRUSFOLDER' of user '$USER'..." + $FORMAIL -I "From " < $MAILBOX -s $CYRDELIVER -a postman -m $CYRUSFOLDER $USER +fi + + --- cyrus-imapd-2.2-2.2.13.orig/debian/examples/editsieve +++ cyrus-imapd-2.2-2.2.13/debian/examples/editsieve @@ -0,0 +1,252 @@ +#!/bin/bash +# +# This script is copyright 2006 Sven Mueller +# Released under the terms of the GNU General public license +# (GPL) version 2 +# Before distributing changed versions of the script, please ask +# the original author to include your changes into the original +# distribution files. Thanks. +# +umask 077 + +# generic defaults + +DEFAULTDOMAIN=incase.de +DEFAULTHOST=localhost +DEFAULTCONFDIR="${HOME}/.editsieve" + +# report usage help +function usage () { + echo "Usage: $0 -h" + echo " $0 --help" + echo " $0 [-c ] [-n ] [-d |--domain ] " + echo " [-p ] [-s ] " + echo "Parameters:" + echo " -h|--help : Display this help" + echo " -c | --confdir : Directory to store configuration and other" + echo " data in (like the user's sieve script)." + echo " The directory will be created if necessary." + echo " Default: ${DEFAULTCONFDIR}" + echo " -d |--domain : Specify domain for the user." + echo " Default: ${DEFAULTDOMAIN}" + echo " -n