Networking Forums

Networking Forums > Computer Networking > Linux Networking > Email routing in Linux

Reply
Thread Tools Display Modes

Email routing in Linux

 
 
Christopher
Guest
Posts: n/a

 
      06-04-2004, 03:41 PM
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.
 
Reply With Quote
 
 
 
 
ynotssor
Guest
Posts: n/a

 
      06-04-2004, 07:13 PM
"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

 
Reply With Quote
 
Cameron Kerr
Guest
Posts: n/a

 
      06-06-2004, 10:39 PM
Christopher <(E-Mail Removed)> wrote:
> 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.


This is relatively easy, and a feature that is present in practically
every MTA available for Linux, including Exim.

> 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.


Do yourself a favour and get hold of 'Exim: The Definitive Guide',
published by O'Reilly. It's written by the guy that wrote Exim, and when
I read it, it helped a lot. The book does cover version 4.x though, so
there will be some differences. (A good reason to upgrade to Sarge when
it comes out).

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables email routing Brian Ronk Linux Networking 1 04-07-2007 01:09 AM
email extractor , site , solutions , email based marketing , email marketing solution , email extractor , newsletter software , mass email , e-mail marketing , email marketing solutions , bulk email software , web advertising , email marketing , mark Nuclear Incorporation. www.nuclear-inc.com Broadband 0 04-05-2007 08:38 PM
email extractor , site , solutions , email based marketing , email marketing solution , email extractor , newsletter software , mass email , e-mail marketing , email marketing solutions , bulk email software , web advertising , email marketing , mark Nuclear Incorporation. www.nuclear-inc.com Home Networking 0 04-05-2007 08:31 PM
If I replace my existing Linksys box with Linux Router, how can I know what kind of Routing to be enabled on my Linux Box? santa19992000@yahoo.com Linux Networking 3 01-06-2005 01:18 PM
Email Routing Michael C. Linux Networking 2 09-22-2003 06:38 PM



1 2 3 4 5 6 7 8 9 10 11