Answer the question
In order to leave comments, you need to log in
How to run a bash script that starts another program?
#!/bin/bash
zmprov ca [email protected] Managers
zmprov sp [email protected] $2
zmmailbox -z -m [email protected] createFolder /Inbox/Facebook
zmmailbox -z -m [email protected] createFolder /sent/office
zmmailbox
aa -u https://zimbra.jo admin adminadmin
selectmailbox $1
addFilterRule rule1 address "test1" all not_is "@domain" fileinto /inbox/office
Answer the question
In order to leave comments, you need to log in
Create a separate list of commands for zmmailbox, don't forget to add exit or quit at the end so bash can continue and run it like this using the document here construct:
zmmailbox <<EOF
aa -u https://zimbra.jo admin adminadmin
selectmailbox $1
addFilterRule rule1 address "test1" all not_is "@domain" fileinto /inbox/office
exit
EOF
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question