Lumail - The console email client

Lua primitives: hostname()

NOTE: Lumail-legacy has been superseded by Lumail 2.x, which has a wholly unified Lua API.

This function will attempt to return the name of the current host.

This is a useful function if you're aiming to write configuration files that are portable across a number of hosts, and which need to have conditional handling.

Simple usage would be:


NOTE: If you do not like the value returned by this function you can set the environmental variable HOSTNAME.

For example:

$ ./lumail --rcfile ./lumail.lua --eval "abort(hostname()

$ export
$ ./lumail --rcfile ./lumail.lua --eval "abort(hostname()


This function has been available since version 0.23.