The overall context for this is that I am sending mail from a web application on one machine through sendmail on another machine, to final destination being a pop account on mx.google.com. The latter sendmail machine has 2 ip numbers because it doubles as a database server. When I look at the headers after receiving the message, the ip number references is the wrong ip number. The number is not random; it is the ip number for the database server (i.e. same physical machine).
Here is the symptom. My Eudora email client reports this header: Received from good.mydomain.com (bad.mydomain.com. [x.x.x.10]) by mx.google.com with ESMTPS id ...
The phrase 'good.mydomain.com' is correct and seems to originate from the confDOMAIN_NAME line in /etc/mail/sendmail.mc. The 'bad.mydomain.com' is the rdns for x.x.x.10. I want that to be x.x.x.66 which has RDNS to good.mydomain.com already set up and working. This uses public DNS, no special etc/hosts entries.
I have this line in /etc/mail/sendmail.mc which seems to be binding the receiving side of things to the desired .66 number: DAEMON_OPTIONS(`Port=smtp,Addr=x.x.x.x.66, Name=MTA')dnl
I gather that my x.x.x.10 ip number is somehow "first" on the network card, and I do not really want to change that. I just want to make Sendmail stick to the .66 number for the relay to mx.google.com.
No worries about an open relay, the firewall is set and only accepts connections from my web server machine.
i do know that I have to run make after each change to the macros, and that I have to restart the sendmail service too.
Thank you for considering my question.