sorry, sent too soon.
1) on the client side, if the message is from a local transport (e.g. system() source, unix-stream and the like), the hostname field will automatically be filled with the name of the host as set with the hostname command (e.g. /etc/hostname). you could change this logic by setting the $HOST macro to your local IP address.
2) on the server side, when we receive a message, we can either accept it as sent by the client (e.g. keep-hostname(yes) or keep-hostname(no)). If accepted, then we just accept the literal value as sent by the client. If you don't trust the client's idea of its hostname, simply set keep-hostname(no) on the server side. In this case the server will attempt to determine the HOST value based on the IP address of the sender. In this phase it either uses DNS (use-dns(yes) setting) or it doesn't. If it uses DNS, it will populate the HOST field with the reverse-resolved DNS name. If you set use-dns(no), you'll get an IP address.
Hope this helps,