jaromail

a commandline tool to easily and privately handle your e-mail
git clone git://parazyd.org/jaromail.git
Log | Files | Refs | Submodules | README

commit 55a9ac66c0729f6a9f6649f9164edc823f17904a
parent ab9a28381bb480fed01122726d0831ca0460fce4
Author: Jaromil <jaromil@dyne.org>
Date:   Wed,  2 May 2012 10:19:05 +0300

mkdir use is not ridicolous anymore

Diffstat:
Msrc/postino | 28++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/postino b/src/postino @@ -32,7 +32,8 @@ for arg in ${argv}; do OLDARGS+=($arg); done QUIET=0 DEBUG=1 -umask 007 # James Bond :^) +# which command to use when creating dirs +mkdir="mkdir -m 700 -p" ########################## @@ -78,8 +79,9 @@ if [ $? != 0 ]; then fi # make sure we have a temp and cache dir -mkdir -p $WORKDIR/tmp $WORKDIR/cache -chmod 700 $WORKDIR/tmp $WORKDIR/cache +$mkdir $WORKDIR/tmp +$mkdir $WORKDIR/cache + # make sure tmp is wiped from sensitive data in case of sigINT TRAPINT() { @@ -150,11 +152,10 @@ maildirmake() { return fi - mkdir -p ${1}/cur - mkdir -p ${1}/new - mkdir -p ${1}/tmp - - chmod -R 700 $1 + $mkdir -p ${1}/cur + $mkdir -p ${1}/new + $mkdir -p ${1}/tmp + } queue() { @@ -165,7 +166,7 @@ queue() { # add mails to the sendout queue umask 007 - mkdir -p $MAILDIRS/outbox + $mkdir $MAILDIRS/outbox cd $MAILDIRS/outbox || return 1 notice "Adding mail to the outbox queue" # Create new unique filenames of the form @@ -311,19 +312,18 @@ update() { func "MAILDIRS: $MAILDIRS" # make sure maildirs where to put mails exist - mkdir -p $MAILDIRS - chmod 700 $MAILDIRS + $mkdir $MAILDIRS maildirmake $MAILDIRS/known maildirmake $MAILDIRS/sent maildirmake $MAILDIRS/priv maildirmake $MAILDIRS/postponed maildirmake $MAILDIRS/unsorted - mkdir -p $MAILDIRS/outbox + $mkdir $MAILDIRS/outbox ###### # MUTT if ! [ -z $MUTTDIR ]; then - mkdir -p $MUTTDIR + $mkdir $MUTTDIR rm -f $MUTTDIR/rc cat<<EOF > $MUTTDIR/rc # mutt config generated by postino @@ -362,7 +362,7 @@ EOF ########## # PROCMAIL - mkdir -p $PROCMAILDIR + $mkdir $PROCMAILDIR rm -f $PROCMAILDIR/rc touch $PROCMAILDIR/rc cat<<EOF >> $PROCMAILDIR/rc