Usage

[Note: this page assumes that Mailmin is operating in normal mode. See here for an explanation of restricted mode.]

Once Mailmin has been correctly configured, usage is quite simple. Just compose an email containing system commands and Mailmin directives (explained below), address, sign and encrypt it appropriately, and mail it. Mailmin will receive your mail, decrypt it and verify the signature, and execute the commands it contains via the shell.

Mailmin will collect the commands' output, place it into the body of an email message, sign and encrypt it, and send it back to you. [The current implementation sends it to the email address contained in the gpg key used to authorize the message.]

[Note that for technical reasons, Mailmin currently invokes a separate shell for each command. To execute multiple commands using the same shell, you can do something like this: place them in a file, attach the file to your message, and in the body of your message include the lines:

@save myfile
/bin/sh < myfile


(The @save Mailmin directive is explained below.)]

You can transfer files to and from the remote system and request web content with the @save, @attach and @wattach Mailmin directives respectively, as explained below.

Mailmin directives

Any line of your message whose first (non-whitespace) character is an '@' will be interpreted as a Mailmin directive; it will be intercepted and processed by Mailmin and not passed on to the shell.

The following directives are currently implemented:

Variable Assignment

Any line of your message whose first (non-whitespace) character is a '$' will be interpreted as a Mailmin variable assignment; it will be intercepted and processed by Mailmin and not passed on to the shell. DO NOT use quotes around the variable value.

For example, if Mailmin has been configured with an archive_type of gzip but you want it to send you some PKZIP style archived web content, you could use the following:

					@at = zip
					@wattach some_url
				

All (user configurable) Mailmin variables are documented in the sample configuration file.