xs@kittenz.org wrote:
perhaps your MTAs cannot find the routes to each other. normally this is done via mx records in a dns zone. with hosts files, you don't get any such records.
with postfix, you can set up transport rules that allow you to bypass (or in your case, simply not use) dns MX records. so for example, you may want on machine2:
machine2.mydomain local: machine1.mydomain smtp:[machine1]
if you plop this in /etc/postfix/transport, then run: # postmap /etc/postfix/transport and add:
transport_maps = hash:/etc/postfix/transport
to /etc/postfix/main.cf. mail to something@machine1.mydomain should work. fingers crossed. this is documented in the transport(5) man page. trivial-rewrite(8) does the work. i use this to change the route of mail to hosts with silly spam protection, to go via another relay host less likely to be rejected.
you may need to force postfix to rehash with a "postfix reload" after a "postfix check" to make sure it's a happy with the config.
exim probably has something similar. qmail does, in the form of smtproutes, iirc.
Followed all your Postfix instructions and I can now send mail from machine2 to machine1. Many thanks for that.
What doesn't work is if I try to send an email from machine2 (Postfix) out to the internet via machine1 (Exim). Is that likely to be a problem with the setup on machine2 or machine1?
I get the following error:
(Name service error for machine1.mynetwork: Host not found, try again) bjsamuels@beenthere-donethat.org.uk
Machine1 is set up as a gateway and machine2 can browse the Web via machine1.
Kind regards
Barry Samuels