<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 5/1/13 4:23 PM, Lightner, Jeff
wrote:<br>
</div>
<blockquote
cite="mid:040B89C8B1E1D945AE2700C511A039E9CBA2E3@ATMEXDB03.dsw.net"
type="cite">
<!-- Template generated by Exclaimer Mail Disclaimers on 04:23:17 Wednesday, 1 May 2013 -->
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<style type="text/css">P.3a2ecc6e-67ce-41ad-86a4-be45ea4894ed {
        MARGIN: 0cm 0cm 0pt
}
LI.3a2ecc6e-67ce-41ad-86a4-be45ea4894ed {
        MARGIN: 0cm 0cm 0pt
}
DIV.3a2ecc6e-67ce-41ad-86a4-be45ea4894ed {
        MARGIN: 0cm 0cm 0pt
}
TABLE.3a2ecc6e-67ce-41ad-86a4-be45ea4894edTable {
        MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
        page: Section1
}
</style>
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Note: I am NOT asking about aliasing of
INBOUND emails. I am asking about emails being sent OUTBOUND.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We have a need to send emails via different
internal email relay servers based on the return sender
associated with the email. Previously I did this in HP-UX
using sendmail’s “smarttable” facility.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We now need to replicate the setup on RHEL5
which also uses sendmail. I haven’t really had a chance to
look into it myself as I’m tasked with other priorities but
the co-worker that tried to do this last year and the new one
trying to do it now don’t seem to be getting anywhere in
replicating this.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The idea would be if I send an email and
set the return sender as say
<a moz-do-not-send="true" href="mailto:billybob@mydomain1.com">billybob@mydomain1.com</a>
it would relay through our MS Exchange server. On the other
hand if I set the return sender as
<a moz-do-not-send="true"
href="mailto:billybob@otherdomain.com">billybob@otherdomain.com</a>
it would relay through a separate Sendmail server I have for
that purpose. The difference here is that the Exchange
server and Sendmail both send their email via different
internet facing IPs.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
<blockquote
cite="mid:040B89C8B1E1D945AE2700C511A039E9CBA2E3@ATMEXDB03.dsw.net"
type="cite">
<div class="WordSection1">
<p class="MsoNormal">Does anyone know how to do this in Linux
Sendmail successfully? Is there a better way to do it these
days in sendmail? I setup the UNIX stuff around 2006 and its
been working ever since. Maybe by use of a milter?<o:p></o:p>
</p>
</div>
</blockquote>
Sure, use Postfix instead<br>
<o:p> </o:p>
<blockquote
cite="mid:040B89C8B1E1D945AE2700C511A039E9CBA2E3@ATMEXDB03.dsw.net"
type="cite">
<div class="WordSection1">
<p class="MsoNormal">Please don’t suggest we move to Postfix
unless you know how to accomplish the task described above in
Postfix.
<o:p></o:p></p>
</div>
</blockquote>
<br>
Oh man, that's not fair ;-)<br>
<br>
look at the sender_dependent_relayhost_maps option in Postfix<br>
<br>
For a simple example, you could have something like<br>
<br>
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay_map<br>
<br>
in main.cf, and then in /etc/postfix/sender_relay_map you have
something like<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:billybob@mydomain1.com">billybob@mydomain1.com</a> [exchange.server.com]:25<br>
<a class="moz-txt-link-abbreviated" href="mailto:billybob@otherdomain.com">billybob@otherdomain.com</a> [real.server.com]:25<br>
@mydomain2.com [other.server.com]:587<br>
<br>
(so <a class="moz-txt-link-abbreviated" href="mailto:billybob@mydomain1.com">billybob@mydomain1.com</a> relays through exchange.server.com port
25 and <a class="moz-txt-link-abbreviated" href="mailto:billybob@otherdomain.com">billybob@otherdomain.com</a> relays through real.server.com port
25, and all users @mydomain2.com relay through other.server.com port
587)<br>
<br>
<br>
</body>
</html>