14 messages in net.sourceforge.lists.courier-maildrop[maildropl] Re: syntax problem (did s...
FromSent OnAttachments
Benjamin TomhaveApr 9, 2003 3:23 pm 
Sam VarshavchikApr 9, 2003 3:49 pm 
Benjamin TomhaveApr 10, 2003 8:25 am 
Sam VarshavchikApr 10, 2003 8:48 am 
Benjamin TomhaveApr 10, 2003 9:28 am 
Sam VarshavchikApr 10, 2003 10:09 am 
Devin RubiaApr 10, 2003 10:19 am 
Benjamin TomhaveApr 10, 2003 11:14 am 
Benjamin TomhaveApr 10, 2003 11:15 am 
Rolan YangApr 10, 2003 11:22 am 
Benjamin TomhaveApr 10, 2003 11:44 am 
Devin RubiaApr 11, 2003 6:04 am 
Fernando La GambaApr 14, 2003 12:40 pm 
Gatis GailisApr 14, 2003 1:46 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] Re: syntax problem (did something change from 1.3.8 to 1.5.2?)Actions...
From:Sam Varshavchik (mrs@courier-mta.com)
Date:Apr 9, 2003 3:49:41 pm
List:net.sourceforge.lists.courier-maildrop

Benjamin Tomhave writes:

---------- more elaborate test ------------- import EXT import HOST VPOP="| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox" VHOME=`/home/vpopmail/bin/vuserinfo -d $EXT@$HOST`

`test -d $VHOME/Maildir` if ( $RETURNCODE == 1 ) { echo "Sorry, no mailbox here by that name. (#5.1.1)" EXITCODE=100 exit }

`test -d $VHOME/Maildir/.Spam` if ( $RETURNCODE == 1 ) { `/usr/bin/maildirmake -f Spam $VHOME/Maildir` `echo Inbox.Spam >> $VHOME/Maildir/courierimapsubscribed` }

to "$VPOP" exit ---------- end -------------

The question, then is why do these IF statements fail?

The `...` operator runs the command, and whatever output the command generates replaces the original `...` operator.

Even if no output is produced, the result is still parsed as an empty string. Essentially, you have three lines in the script whose contents are

""

Obviously that's not a valid statement.

You need to use a dummy variable, each time

DUMMY=`...`