client.domain. IN MX 10 mailserver.client.domain. client.domain. IN MX 20 mailserver.my.domain. mailserver.client.domain. IN MX 10 mailserver.client.domain. mailserver.client.domain. IN MX 20 mailserver.my.domain.The last two records are there "just in case" (someone forgot masquerading).
Instead of using MX records that point to mailserver.client.domain, you can use the FEATURE(mailertable) on mailserver.my.domain as explained in cf/README for routing e-mails.
client.domain. IN MX 20 mailserver.my.domain. mailserver.client.domain. IN MX 20 mailserver.my.domain.The last record is there "just in case" (someone forgot masquerading).
Setup FEATURE(mailertable) on mailserver.my.domain as explained in cf/README for routing e-mails:
client.domain esmtp:[mailserver.client.domain] .client.domain esmtp:[mailserver.client.domain]
If you know enough about MIME and some C programming, then take a look at sendmail 8.11 and the libmilter/README. It now offers the functionality to achieve this goal. However, it is unsupported by me and sendmail.org! Please don't ask us questions about libmilter (however, we will fix bugs!)
fgrep '@(#)' sendmail.cfor (newer versions)
fgrep '$Id:' sendmail.cfThen use the basic guidelines from cf/README to build a .mc file with those options. Create a .cf file from that .mc file and compare it with your current version. Find out what's different and try to include it in your .mc file. Follow the instructions in cf/README. Beware: if you use a different sendmail version to create the .cf file, there might be a lot of differences! So make sure you use the same version. After you have created the correct .mc file, you can use it with your current sendmail version to create the new .cf file.
553 relay.domain.net config error: mail loops back to myself 554 <email@example.com>... Local configuration errorand both hints didn't solve your problem?
So here is another hint what might be wrong: You use a
LOCAL_RULE_0in your sendmail.mc (which is S98 in sendmail.cf)? This rule is evaluated before the local recognition of S0 happens. So if you use some rule here, which (by accident) also matches your local host but doesn't resolve to local, you have a problem. Try to debug that address and see where it fails (where it gets resolved to another mailer than local).