Skip to content

Instantly share code, notes, and snippets.

@azumakuniyuki
Last active December 11, 2015 06:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save azumakuniyuki/4562591 to your computer and use it in GitHub Desktop.
Save azumakuniyuki/4562591 to your computer and use it in GitHub Desktop.
maildroprc for Virtual Mailbox
# $Id: maildroprc.in,v 1.1 2010/02/02 03:41:35 ak Exp $
#
# maildroprc for virtual mailbox
#
PATH='/usr/local/virtmail/bin:/usr/local/virtmail/sbin:/usr/local/bin:/usr/bin:/bin:.'
SHELL='/bin/sh'
UMASK='077'
logfile '/var/log/maildrop-virtual.log'
RECIPIENT="$1"
VIRTUALROOT="$HOME"
VIRTUALUSER=`echo $RECIPIENT | cut -d@ -f1`
VIRTUALHOST=`echo $RECIPIENT | cut -d@ -f2`
MAILDIR="$VIRTUALROOT/$VIRTUALHOST/$VIRTUALUSER/Maildir/"
DEFAULT="$MAILDIR"
`test -e $MAILDIR`
if( $RETURNCODE != 0 )
{
log "Maildir/ does not exist: $MAILDIR"
`for D in cur new tmp; do mkdir -p $MAILDIR/$D; done`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment