do shell script postfix status problems

Hi all,

I’m trying to get the status of postfix but my shell command giving me the error: “The command exited with a non-zero status.” I can check the postfix status using Terminal but I just can’t seem to get any results from applescript. Here’s my command:

do shell script "sudo postfix status" user name myuser password mypasswd with administrator privileges

Thanks for your time,
Nik

Model: MacBook Pro
AppleScript: 2.1.2
Browser: Safari 525.18
Operating System: Mac OS X (10.6)

Hi,

sudo is the same as with administrator privileges, so don’t use it in the same line


do shell script "postfix status" user name myuser password mypasswd with administrator privileges

If postfix expects the credentials explicitly in Terminal (like password encryption of zip files), it cannot be used with do shell script

Hi Stefan,

Many thanks for your reply and it’s great to see that you’re still here offering people help!

Unfortunately I’m still getting the same error so maybe, as you suggest I can’t get any result from do shell script!

Thanks,
Nik

P.S. keep up the good work there’s lots of us that need you invaluable help