I'm having trouble getting my mailertable to work....
/etc/mail/sendmail.mc contains this line
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
/etc/mail/mailertable contains this line
I ran these to "recompile" the settings...
makemap hash /etc/mail/mailertable.db < /etc/mail/mailertable
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
service sendmail restart
Then tried to send a test
$ mail -s "test email" firstname.lastname@example.org
$ tail -f /var/log/maillog
May 9 10:03:14 npsetl005 sendmail: p49E3EG0027777: to=<email@example.com>, ctladdr=<firstname.lastname@example.org> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120350, relay=www.domain1.com. [172.16.1.47], dsn=4.0.0, stat=Deferred: Connection refused by www.domain1.com.
We have this stupid problem on our internal network where DNS and MX records aren't really set up 100 percent correctly. Getting permission to change it, and test it are way beyond the scope of this question; So I just want sendmail to ignore what's in DNS and fire messages straight to our internal relay server (which works for dozens of other clients) - but it's not doing that. You can see that it's rewriting the addresses to email@example.com because the parent *.domain1.com is a cname to www.domain1.com (someone did this as a poor mans redirect. So if a user tries to go to a subdomain that doesn't exist, they go to the root website instead... I know. I know.)