Assume the name of your home PC is A, and office workstation is B.
You want to send a command from machine A to machine B.
Suppose the email account name on machine A is 'accountA' and the password is 'pswdA'.
For machine B, the account and password are 'accountB' and 'pswdB' respectively.
Before you start, you need to setup the following options on both
machines A and B:
Client ($HOME/.actimrc) | Server ($HOME/.actimdrc) |
emailAddress | IMAP4_server |
emailAccount | SMTP_server |
emailPassword | mailSubject |
actimdThen request to start a polling for emails from an user's mailbox. Such that on machine B, enter:
actim -C POLL EMAIL SETUP_USERNote that once polling for emails is started, it will continue to poll forever until the user requests to end the polling on that machine. (END_USER is not implemented yet)
actim -E -e "ps -ef" -d "B@wabot.com" -RAlternatively, if you don't want to expose your emailAccount and emailPassword in your actimrc file, you need to start polling explicitly. Then submit your request.
actim -C POLL EMAIL SETUP_USER accountA pswdAIf actim displays the return message of a successful login to IMAP4_server, then on machine A enter:
actim -E -e "ps -ef" -d "B@wabot.com" -RThen sit back and do something else while waiting for the result.
However instead of starting to poll explicitly first, if you have your emailAccount and emailAddress setup in the actimrc file, then you can invoke an event request anyway. Once the actimd server receives an event, it checks whether a polling has been started. If not, start one and send the email request.
If you want to request XML output, then you can do the following:
actim -C QUEUE_INFO ALL --xmlOutThe XML output should look similar to the following:
<Result> <ReturnCode>0<\ReturnCode> <Type value="0">Command<\Type> <Output> Hello message from 'pebbles' <\Output> <Error> <\Error> <\Result> <Result> <ReturnCode>0<\ReturnCode> <Type value="0">Command<\Type> <Output> <Queue length="0">CLIENTS_RESULT<\Queue> <Queue length="1">SUBMITTED<\Queue> <Queue length="0">INCOMING<\Queue> <Queue length="0">RAW_RESULT<\Queue> <Queue length="0">HOLD_RESULT<\Queue> <\Output> <Error> <\Error> <\Result>