Hello everyone.
I have a postfix / maildrop combo and I am trying to get autoresponders working
from the global
maildroprc file.
I have configured everything from various faqs and examples on the web.
The problem I am having is that maildrop throws a syntax error when it reaches
an else statement in
the maildroprc file.
If anyone can loan me a clue on this, I would appreciate it.
Example 1, this one works fine.
# test for vacation file, if it exists, send autoresponse
#
`test -f $HOME/$DEFAULT/vacation.txt`
if ($RETURNCODE==0)
{
cc "| mailbot -t $HOME/$DEFAULT/vacation.txt -A 'From: $LOGNAME'
/usr/sbin/sendmail -t -f ''"
}
Example 2, this one throws an error at the else statement.
`test -f $HOME/$DEFAULT/vacation.txt`
if ($RETURNCODE==0)
{
`test -f $HOME/$DEFAULT/vacation_subject.txt`
if ($RETURNCODE==0)
{
SUBJECT=`cat $HOME/$DEFAULT/vacation_subject.txt`
cc "| mailbot -t $HOME/$DEFAULT/vacation.txt -A 'From: $LOGNAME' -A
'Subject: $SUBJECT'
/usr/sbin/sendmail -t -f ''"
}
else
{
cc "| mailbot -t $HOME/$DEFAULT/vacation.txt -A 'From: $LOGNAME'
/usr/sbin/sendmail -t -f ''"
}