Re: sendmail outbound relaying
On Friday 27 January 2006 18:13, David Bishop wrote:
> On Friday 27 January 2006 12:04, Chris Knadle wrote:
> > On Friday 27 January 2006 13:29, David Bishop wrote:
> > > So in summary: serverx.boz.com is the final destination for foo.com.
> > > When using serverx to send mail, mail from foo.com needs to be relayed
> > > through bar.com.
> >
> > If I understand you correctly, you're essentially asking how to do
> > source email routing rather than simply destination email routing, and
> > that as such a sendmail 'mailertable' entry will not suffice. Is that
> > essentially the situation?
>
> Yes, in a nutshell. (caveat: a quick google for source email routing
> brought up examples of user%dest@myserver.com, which isn't what I mean. I
> don't think its what you meant either, but I thought I'd clarify)
No it wasn't, although there are a couple of interesting email addresses that
include routing such as the 'percent hack' as well as multiple @'s:
http://www.remote.org/jochen/mail/info/address.html
That's likely not what you or your client wants, though.
Looks like one way of doing this would be to masquerade the outbound email
address using the 'genericstable' (3.3.1) and 'genericsdomain' (3.3.2):
http://www.skillreactor.org/tutortxt/mailserv.htm
I believe what will happen is that the 'apparent to' that the receiver sees on
the opposite end will not change, but the actual routing email address will.
I think the following is beyond what you need at this point, but you may
eventually want to consider it for later, which is email routing via LDAP
which can allow for custom destinations per email address:
http://www.manuals.ichistory.org/ldap/ldap_sys_adm/1565924916_ldapsa-chp-7-sect-3.html
Note that when I last did this I had used the inetLocalMailRecipient schema
which is now considered expired, in favor of what looks like a much more
complicated sendmail schema.
Another option might be to insert a custom ruleset to handle the outbound
rerouting, but I haven't yet found something suitably specific and I don't
have my Sendmail book available to me until Monday.
Let me know if his helps, Dave.
--
Chris Knadle
Chris.Knadle@coredump.us
Reply to: