• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Crontab qmail remove issue

G

guerramx

Guest
With hundreds of bounces of spam in the queue I decided to install qmail remove and make a crontab every 30 min to delete them, the file with the script works well when called in the shell, but when called by the crontab it sends me a mail with an error.

The script looks like this:

#!/bin/bash
#
/etc/init.d/qmail stop
/usr/sbin/qmail-remove -p 'MAILER-DAEMON' -d
/etc/init.d/qmail start

And the mail with the error:

/etc/init.d/qmail: line 152: start-stop-daemon: command not found
17826035: no
17826886: no
17827691: no
17826867: no
17827465: no
17827258: no
17827120: no
17826913: no
17827212: no
17826034: no
17826724: no
17827138: no
17825988: no
17826971: no
17827063: no
17827385: no
17827086: no
17827362: no
17827098: no
17827121: no
17827029: no
17827719: no
17827397: no
17826730: no
17826891: no
17826893: no
17827123: no
17827192: no
17827376: no
17827421: no
17827283: no
17827030: no
17826731: no
17826984: no
17826915: no
17827382: no
17827451: no
17827106: no
17827221: no
17826738: no
17826922: no
17826853: no
17826864: no
17827140: no
17826910: no
17826030: no
17827203: no
17826904: no
17827066: no
17825824: no
17827411: no
17827004: no
17827579: no
17826958: no
17827119: no
17827073: no
17826756: no
17826917: no
17826940: no
17827331: no
17827101: no
17826894: no
17826947: no
17827108: no
17827545: no
17827269: no
17827706: no
17827016: no
17827035: no
17826736: no
17826989: no
17826897: no
17825825: no
17825986: no
17827274: no
17827343: no
17826952: no
17827182: no
17827072: remove mess/21/17826792
remove remote/21/17826792
remove info/21/17826792
remove mess/14/17826854
remove remote/14/17826854
remove info/14/17826854
2 file(s) match
no
17826773: no
17827279: no
17827095: no
17826865: no
17827302: no
17827148: no
17826895: no
17827082: no
17827057: no
17827333: no
17827816: no
17827126: no
17827448: no
17827149: no
17826949: no
17827041: no
17826926: no
17827202: no
17827229: no
17826792: yes
17827574: no
17827459: no
17827344: no
17827137: no
17827268: no
17827038: no
17827360: no
17827452: no
17826854: yes
17826992: no
17826969: no
17827222: no
Starting qmail: done

Any ideas how to fix this?

Thanks.
 
Back
Top