PDA

View Full Version : SpamSnake 8.04 - Cron Daemon: postmap:command not found


FatalError
31st August 2009, 19:42
Every day I get an error emailed to me from Cron Daemon stating:

/usr/bin/update-relay-recipients.sh: line 4: postmap: command not found

Here is my crontab entry:

30 2 * * * /usr/bin/update-relay-recipients.sh

And the contents of /usr/bin/update-relay-recipients.sh:

#!/bin/sh
/usr/bin/getadsmtp.pl
cd /etc/postfix
postmap relay_recipients

If I run the script manually I don't get any errors. Ideas?

By the way, Rocky, great tutorial! I'm loving the 28,000+ connections that are bounced before ever getting to my Exchange server. Spam is almost yesterday's news after running this snake for a week.

falko
1st September 2009, 16:27
What's the output of which postmap?

FatalError
1st September 2009, 16:30
/usr/sbin/postmap

falko
2nd September 2009, 14:46
Ok, use the full path in the script:

#!/bin/sh
/usr/bin/getadsmtp.pl
cd /etc/postfix
/usr/sbin/postmap relay_recipients

FatalError
2nd September 2009, 16:15
Worked perfectly! Thank you.