"Christopher" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om
> I am looking for a way to do "smart" email routing in that our mail
> server will look at the address and direct it to different mail
> servers accordingly. More specifically I have two email addresses,
> one is my local or internal routing address formatted as
> (E-Mail Removed) and the other is my public address formatted as
> (E-Mail Removed).
>
> When I sent mail a local internal address, my local mail server
> retains that email and directs it to its respective mailbox. When I
> sent mail to a public address of someone internally, the message is
> routed from my local mail server to the mail server than handles the
> @dddd.com addresses. Then in turn the @dddd.com address sends that
> email back to the internal person at their @hhh.hh.dddd.com address.
>
> What I want to do is have mail that I sent to someone internal using
> their @dddd.com address instead of their @hhh.hh.dddd.com address
> routed locally instead of being routed through the server that handles
> the @dddd.com addresses. This would be more efficient than sending
> the email all through the network just to come back to the local
> recipient.
>
> Is this possible on Debian 3.0 Linux Kernel 2.4.16? I know this is an
> old version, but it works with out problems for me so I see no reason
> to upgrade at this point.
>
> Hope this makes sense. I can clarify for anyone that needs it.
I can't quite follow the reasoning given your notation, but it sounds as if
you want the functionality of the mailertable feature of sendmail.
From cf/README (you would use the "local" mailer in the RHS):
+--------------------+
| USING MAILERTABLES |
+--------------------+
To use FEATURE(`mailertable'), you will have to create an external
database containing the routing information for various domains.
For example, a mailertable file in text format might be:
.my.domain xnet:%1.my.domain
uuhost1.my.domain uucp-new:uuhost1
.bitnet smtp:relay.bit.net
This should normally be stored in /etc/mail/mailertable. The actual
database version of the mailertable is built using:
makemap hash /etc/mail/mailertable < /etc/mail/mailertable
The semantics are simple. Any LHS entry that does not begin with
a dot matches the full host name indicated. LHS entries beginning
with a dot match anything ending with that domain name (including
the leading dot) -- that is, they can be thought of as having a
leading ".+" regular expression pattern for a non-empty sequence of
characters. Matching is done in order of most-to-least qualified
-- for example, even though ".my.domain" is listed first in the
above example, an entry of "uuhost1.my.domain" will match the second
entry since it is more explicit. Note: e-mail to "(E-Mail Removed)"
does not match any entry in the above table. You need to have
something like:
my.domain esmtp:host.my.domain
The RHS should always be a "mailer:host" pair. The mailer is the
configuration name of a mailer (that is, an M line in the
sendmail.cf file). The "host" will be the hostname passed to
that mailer. In domain-based matches (that is, those with leading
dots) the "%1" may be used to interpolate the wildcarded part of
the host name. For example, the first line above sends everything
addressed to "anything.my.domain" to that same host name, but using
the (presumably experimental) xnet mailer.
--
use hotmail for email replies