[ingo] Ingo's Procmail vacation - /bin/sh: date: No such file or directory

David Powell (YANQ) tech at yanq.org.au
Sun Aug 3 22:45:54 UTC 2008


>>> /bin/sh: date: No such file or directory
>>> /bin/bash: line 0: test: -gt: unary operator expected
>>
>> I can fix these error messages by manually editing the 10th line in 
>> the procmail vacation script which by default reads:
>>
>>     DATE=`date +%s`
>>
>> I just change this to
>>
>>    DATE=`/bin/date +%s`
> 
> You should instead fix the PATH environment variable to include /bin.

Yes, good point.  This is weird however - /bin is already included in 
$PATH.  It is included by default in /etc/profile and I also checked 
specifically for the www-data user (i.e. sudo -u www-data echo $PATH).

>>> procmail: Skipped "* ^TO_NOSPAM at domain.org.au"
>>> procmail: Skipped "* !^X-Loop: NOSPAM at domain.org.au"
>>> procmail: Skipped "* !^X-Spam-Flag: YES"
>>> procmail: Skipped "* !^FROM_DAEMON"
>>> procmail: Skipped "| formail -rD 8192 
>>> ${VACATION_DIR:-.}/.vacation.NOSPAM at domain.org.au"
> 
> Try this: http://bugs.horde.org/ticket/?id=6509

This did the trick - but I amended line 476 to force it to specify the 
full path of the date command.

Cheers,

David

-- 
David Powell
Technical Officer
Youth Affairs Network of Queensland
30 Thomas, WEST END Q 4101
Tel: (07) 3844 7713
Fax: (07) 3844 7731
Email: tech at yanq.org.au
Web: http://www.yanq.org.au

NOTICE:This communication and all attachments contains information which 
is confidential and the copyright of Youth Affairs Network Qld (YANQ)or 
a third party. If you are not the intended recipient of this 
communication please delete and destroy all copies and telephone/email 
(details above) YANQ. If you are the intended recipient of this 
communication you should not copy, disclose or distribute this 
communication without the authority of YANQ. Any views expressed in this 
communication are those of the individual sender, except where the 
sender specifically states them to be the views of YANQ.  Except as 
required at law, YANQ does not represent, warrant and/or guarantee that 
the integrity of this communication has been maintained or that the 
communication is free of errors, virus, interception or interference.


More information about the ingo mailing list