server extracts hostnames from messages and stores them in an array