#!/bin/bash # Used to update maildirsize via PostfixAdmin 'edit' page. # $1 is the domain # $2 is the user name # $3 is the quota set -e mail_home="/var/vmail" if [ ! -e $mail_home ] ; then echo "mail_home '$mail_home' does not exist; bailing out." exit 1 fi if [ -d $mail_home/$1/$2 ] ; then cd "$mail_home/$1" maildirmake.maildrop -q "$3S" $2 chown vmail:vmail $mail_home/$1/$2/maildirsize chmod 640 $mail_home/$1/$2/maildirsize else echo "Error: $mail_home/$1/$2 does not exist; bailing out." fi