This is very simply if you are behind a router and this way you do not turn on open relaying which would be bad for you IP. This may even result to a closed account.
All you have to do is put a entry in you /etc/hosts that lets you domain email from your gateway address:
192.168.1.? domain
the ? is where you would put all ip’s for the each machine you which to email from.