Take a look at: http://www.postfix.org/transport.5.html http://postfix.1071664.n5.nabble.com/Postfix-Relayhost-exemptions-td43587.html
Anvar Kuchkartaev an...@anvartay.com Original Message From: S McGraw Sent: jueves, 19 de octubre de 2017 04:50 a.m. To: postfix-us...@cloud9.net Subject: noobie configuration problem I want what must be a very common mail arrangement that I can seem to make work... I have a local network with a "fake" domain name (.home) with several machines, each with postfix. I want any machine, say x.home, to be able to send to any other other machine, say y.home, directly. Any mail not addressed to a .home machine (and not for local delivery) I want to go my gmail relayhost. The problem is that .home mail goes to the relay host rather than the intended machine. Here are the salient parts (I think) of my main.cf: compatibility_level = 2 myhostname = ubtest.home mydomain = home myorigin = validdomain.com mydestination = $myhostname $mydomain localhost.$mydomain localhost mynetworks = 10.10.1.0/24 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 relayhost = smtp:[smtp.gmail.com]:587 [Postfix-3.1.4, ubuntu-17.04] One thing I wonder about... In: http://www.postfix.org/BASIC_CONFIGURATION_README.html (section "My own domain name") it says, "By default, it [$mydomain] is derived from $myhostname by stripping off the first part (unless the result would be a top-level domain). Is that part in parenthesis the source of my problem? That is, I have a single-level domain name. I didn't think so because I explicitly specify both $myhostname and $mydomain. What am I doing wrong?