On Mon, Mar 3, 2008 at 8:04 PM, Alessandro Vesely <[EMAIL PROTECTED]> wrote:
> rupert wrote:
> > ISDIR=0
> > # Let's check if /home/vmail/domain.tld/username exists
> > `if [ -d "$VHOME/$USERDOMAIN/$ACCOUNT" ];then ISDIR="1"; fi`
>
> Setting a variable in a child process has no effect. Try
>
>
> `test -d "$VHOME/$USERDOMAIN/$ACCOUNT"`
> if (!$RETURNCODE)
> {
> ISDIR="1";
> }
>
>
Hi Alessandro ,
thx for the answer,
Sadly this still does not work
Yesterday I did some tests, and it looks like no matter if the if
condition is zero or one,
it always executes the commandos inside the condition:
Look at the line "/etc/maildroprc(20): Evaluating IF condition." on
each section:
if( $ISDIR != 1 )
------------------------------------
/etc/maildroprc(1): SHELL="/bin/bash"
/etc/maildroprc(3): VHOME="/home/vmail/"
maildrop: Filtering through `echo "$LOGNAME" | cut -d@ -f1`
/etc/maildroprc(5): ACCOUNT="thomas"
maildrop: Filtering through `echo "$LOGNAME" | cut -d@ -f2`
/etc/maildroprc(7): USERDOMAIN="plusser.de"
/etc/maildroprc(9): VMAIL_LOGFILE="/home/vmail/maildrop-maildirmake.log"
/etc/maildroprc(11): MAILDIRMAKE="/usr/bin/maildirmake"
/etc/maildroprc(12): ISDIR="0"
maildrop: Filtering through `if [ -d "$VHOME/$USERDOMAIN/$ACCOUNT"
];then ISDIR="1"; fi`
/etc/maildroprc(20): Evaluating IF condition.
/etc/maildroprc(20): Operation on: 0 and 1 - not equal, result is 1
/etc/maildroprc(20): IF evaluated, result=1
maildrop: Filtering through `date`
/etc/maildroprc(22): MESSAGE_DATE="Mon Mar 3 15:09:26 UTC 2008"
maildrop: Filtering through `echo CREATION DATE: "$MESSAGE_DATE" >>
$VMAIL_LOGFILE`
maildrop: Filtering through `echo EMAIL DIRECTORY:
"$VHOME/$USERDOMAIN/$ACCOUNT" >> $VMAIL_LOGFILE`
maildrop: Filtering through `echo USER EMAIL LOGIN: "$LOGNAME" >>
$VMAIL_LOGFILE`
maildrop: Filtering through `echo " " >> $VMAIL_LOGFILE`
maildrop: Filtering through `test -d "$VHOME/$USERDOMAIN"`
/etc/maildroprc(34): Evaluating IF condition.
/etc/maildroprc(34): Operation on: 0 and 1 - equal, result is 0
/etc/maildroprc(34): IF evaluated, result=0
maildrop: Filtering through `echo CREATING DIRECTORY:
"$VHOME/$USERDOMAIN" >> $VMAIL_LOGFILE`
maildrop: Filtering through `mkdir -p "$VHOME/$USERDOMAIN"`
maildrop: Filtering through `echo " " >> $VMAIL_LOGFILE`
maildrop: Filtering through `$MAILDIRMAKE "$VHOME/$USERDOMAIN/$ACCOUNT"`
maildirmake: /home/vmail//plusser.de/thomas: File exists
maildrop: Filtering through `$MAILDIRMAKE -f Sent "$VHOME/$USERDOMAIN/$ACCOUNT"`
maildirmake: /home/vmail//plusser.de/thomas/.Sent: File exists
maildrop: Filtering through `echo INBOX.Sent >>
$VHOME/$USERDOMAIN/$ACCOUNT/courierimapsubscribed`
maildrop: Filtering through `$MAILDIRMAKE -f Trash
"$VHOME/$USERDOMAIN/$ACCOUNT"`
maildirmake: /home/vmail//plusser.de/thomas/.Trash: File exists
maildrop: Filtering through `echo INBOX.Trash >>
$VHOME/$USERDOMAIN/$ACCOUNT/courierimapsubscribed`
maildrop: Filtering through `touch $VHOME/$USERDOMAIN/$ACCOUNT/courierimapuiddb`
maildrop: Filtering through `mkdir -p
"$VHOME/$USERDOMAIN/$ACCOUNT/courierimapkeywords"`
maildrop: Filtering through `maildirmake -q 52428800S
$VHOME/$USERDOMAIN/$ACCOUNT`
/etc/maildroprc(71): Opening logfile /home/vmail/maildrop.log
/etc/maildroprc(76): Trapping exceptions.
/etc/maildroprc(78): Opening include file
/home/vmail/plusser.de/thomas/.mailfilter
/etc/maildroprc(76): Trapped exception.
/etc/maildroprc(84): SPAMFLD="plusser.de/thomas//.Junk/"
/etc/maildroprc(85): SUBSCRIPT="plusser.de/thomas//courierimapsubscribed"
maildrop: Filtering through `test -d "$SPAMFLD"`
/etc/maildroprc(90): Evaluating IF condition.
/etc/maildroprc(90): Operation on: 0 and 1 - equal, result is 0
/etc/maildroprc(90): IF evaluated, result=0
/etc/maildroprc(98): Evaluating IF condition.
Matching /^X-Spam-Status: Yes,/ against bla
Not matched.
/etc/maildroprc(98): Search of ^X-Spam-Status: Yes, = 0
/etc/maildroprc(98): IF evaluated, result=0
maildrop: Attempting .mailfilter
WARN: quota string '1000' not parseable
maildrop: Delivery complete.
if( $ISDIR == 1 )
------------------------------------
/etc/maildroprc(1): SHELL="/bin/bash"
/etc/maildroprc(3): VHOME="/home/vmail/"
maildrop: Filtering through `echo "$LOGNAME" | cut -d@ -f1`
/etc/maildroprc(5): ACCOUNT="thomas"
maildrop: Filtering through `echo "$LOGNAME" | cut -d@ -f2`
/etc/maildroprc(7): USERDOMAIN="plusser.de"
/etc/maildroprc(9): VMAIL_LOGFILE="/home/vmail/maildrop-maildirmake.log"
/etc/maildroprc(11): MAILDIRMAKE="/usr/bin/maildirmake"
/etc/maildroprc(12): ISDIR="0"
maildrop: Filtering through `if [ -d "$VHOME/$USERDOMAIN/$ACCOUNT"
];then ISDIR="1"; fi`
/etc/maildroprc(20): Evaluating IF condition.
/etc/maildroprc(20): Operation on: 0 and 1 - equal, result is 0
/etc/maildroprc(20): IF evaluated, result=0
maildrop: Filtering through `date`
/etc/maildroprc(22): MESSAGE_DATE="Mon Mar 3 15:10:34 UTC 2008"
maildrop: Filtering through `echo CREATION DATE: "$MESSAGE_DATE" >>
$VMAIL_LOGFILE`
maildrop: Filtering through `echo EMAIL DIRECTORY:
"$VHOME/$USERDOMAIN/$ACCOUNT" >> $VMAIL_LOGFILE`
maildrop: Filtering through `echo USER EMAIL LOGIN: "$LOGNAME" >>
$VMAIL_LOGFILE`
maildrop: Filtering through `echo " " >> $VMAIL_LOGFILE`
maildrop: Filtering through `test -d "$VHOME/$USERDOMAIN"`
/etc/maildroprc(34): Evaluating IF condition.
/etc/maildroprc(34): Operation on: 0 and 1 - equal, result is 0
/etc/maildroprc(34): IF evaluated, result=0
maildrop: Filtering through `echo CREATING DIRECTORY:
"$VHOME/$USERDOMAIN" >> $VMAIL_LOGFILE`
maildrop: Filtering through `mkdir -p "$VHOME/$USERDOMAIN"`
maildrop: Filtering through `echo " " >> $VMAIL_LOGFILE`
maildrop: Filtering through `$MAILDIRMAKE "$VHOME/$USERDOMAIN/$ACCOUNT"`
maildirmake: /home/vmail//plusser.de/thomas: File exists
maildrop: Filtering through `$MAILDIRMAKE -f Sent "$VHOME/$USERDOMAIN/$ACCOUNT"`
maildirmake: /home/vmail//plusser.de/thomas/.Sent: File exists
maildrop: Filtering through `echo INBOX.Sent >>
$VHOME/$USERDOMAIN/$ACCOUNT/courierimapsubscribed`
maildrop: Filtering through `$MAILDIRMAKE -f Trash
"$VHOME/$USERDOMAIN/$ACCOUNT"`
maildirmake: /home/vmail//plusser.de/thomas/.Trash: File exists
maildrop: Filtering through `echo INBOX.Trash >>
$VHOME/$USERDOMAIN/$ACCOUNT/courierimapsubscribed`
maildrop: Filtering through `touch $VHOME/$USERDOMAIN/$ACCOUNT/courierimapuiddb`
maildrop: Filtering through `mkdir -p
"$VHOME/$USERDOMAIN/$ACCOUNT/courierimapkeywords"`
maildrop: Filtering through `maildirmake -q 52428800S
$VHOME/$USERDOMAIN/$ACCOUNT`
/etc/maildroprc(71): Opening logfile /home/vmail/maildrop.log
/etc/maildroprc(76): Trapping exceptions.
/etc/maildroprc(78): Opening include file
/home/vmail/plusser.de/thomas/.mailfilter
/etc/maildroprc(76): Trapped exception.
/etc/maildroprc(84): SPAMFLD="plusser.de/thomas//.Junk/"
/etc/maildroprc(85): SUBSCRIPT="plusser.de/thomas//courierimapsubscribed"
maildrop: Filtering through `test -d "$SPAMFLD"`
/etc/maildroprc(90): Evaluating IF condition.
/etc/maildroprc(90): Operation on: 0 and 1 - equal, result is 0
/etc/maildroprc(90): IF evaluated, result=0
/etc/maildroprc(98): Evaluating IF condition.
Matching /^X-Spam-Status: Yes,/ against bla
Not matched.
/etc/maildroprc(98): Search of ^X-Spam-Status: Yes, = 0
/etc/maildroprc(98): IF evaluated, result=0
maildrop: Attempting .mailfilter
WARN: quota string '1000' not parseable
maildrop: Delivery complete.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> courier-users mailing list
> [email protected]
> Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users