Home Forums OS X Server and Client Discussion Mail Script: mailback doesn’t restart Postfix

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #359861
    Kayners
    Participant

    Hello,

    I’m using the mailback script generously provided by AFP548. There’s a function for starting Postfix back up, but it’s not working. Here’s the function:

    # this starts the mail system
    #

    start_server() {
    echo “Starting the mail system”
    /usr/sbin/serveradmin start mail

    # sometimes serveradmin is dumb and doesn’t start postfix
    # if it’s already running this should just error nicely
    # although we send it to /dev/null anyway
    postfix start 2> /dev/null
    echo done
    }

    If I issue the command “sudo /usr/sbin/serveradmin start mail” in the terminal, it does start up, but that’s after I’ve returned in the morning and we’ve missed a bunch of mail.

    Is there some way to make this work within the script so we don’t lose mail?

    Steve.

    #359877
    Kayners
    Participant

    Thanks Joel.

    I just copied the first start item (i.e. serveradmin) into a new script and run that one minute later via cron. That worked for last night.

    Seems like it’s a timing issue, since it will start OK if run the command from the terminal, or after the mailback script has finished.

    It’s just an Xserve 1.33DP. I wouldn’t think that’s too fast.

    Steve.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comments are closed