So your setting up a mail relay or mail agent and your want to strip off the hostname or subdomain before the message gets to the internet: for example your relay gets it as root@max.blog.jgriffiths.org but you want it to look like root@jgriffiths.org well this is really simple with postfix. Just load up your main.cf and add the following line
masquerade_domains = jgriffiths.org
This will strip off everything after jgriffiths.org. You can add additional domain by placing spaces between hosts.