SpamSnake 8.04 - Cron Daemon: postmap:command not found

Discussion in 'HOWTO-Related Questions' started by FatalError, Aug 31, 2009.

  1. FatalError

    FatalError New Member

    Every day I get an error emailed to me from Cron Daemon stating:

    Code:
    /usr/bin/update-relay-recipients.sh: line 4: postmap: command not found
    Here is my crontab entry:

    Code:
    30 2 * * * /usr/bin/update-relay-recipients.sh
    And the contents of /usr/bin/update-relay-recipients.sh:

    Code:
    #!/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.
     
  2. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    which postmap
    ?
     
  3. FatalError

    FatalError New Member

    Code:
    /usr/sbin/postmap
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Ok, use the full path in the script:

    Code:
    #!/bin/sh
    /usr/bin/getadsmtp.pl
    cd /etc/postfix
    [B][COLOR="Red"]/usr/sbin/[/COLOR][/B]postmap relay_recipients
     
  5. FatalError

    FatalError New Member

    Worked perfectly! Thank you.
     

Share This Page