  | |  | Sendmail masquerading not working | Sendmail masquerading not working 2005-06-07 - By IECISA.Ortega Gonzalez, Carlos
Back Ed Wilts wrote:
>Are you testing with a non-root user? By default, root is exposed so it won't be masqueraded. Here's what I'm doing for >my home system:
>
>MASQUERADE_AS(`ewilts.org')dnl
>FEATURE(masquerade_envelope)dnl FEATURE(masquerade_entire_domain)dnl
>MASQUERADE_DOMAIN(ewilts.home)dnl
>dnl EXPOSED_USER(`root')dnl
>
>I've prevented root from being exposed since I use a smart host and it will reject any e-mails from root@(protected) >(since it's a bogus domain in the Internet world).
I have sent mails both as root and as a normal user. And I've tried your configuration, to no avail.
Greg Hosler wrote:
>Your original mail had 2 "MASQUERADE_AS" lines. I believe that you don't want that. only one.
Ok, understood. I only copied what appeared in the RHEL 3.0 reference guide. Maybe it's a typo.
>
>as for your most recent question, to quote or not to quote, I believe either is acceptable. the quotes (single open, and >single close) prevent expansion. Otherwise, any wildcard characters in the text string might get expanded.
>(ref: /usr/share/sendmail-cf/README)
Thanks, I've taken a look at that readme.
>
>and as originally noted, you probably do NOT want a trailing dot in any of your MASQUERADE lines.
You're right.
>finally, the MASQUERADE_DOMAIN is used to map one domain (the listed domain in
>MASQUERADE_DOMAIN) to another domain (the listed MASQUERADE_AS one, which is why you do NOT want more than one >MASQUERADE_AS line!)
>
>it's not clear whether using MASQUERADE_AS *along with* MASQUERADE_DOMAIN will map the local domain ALONG WITH the >specified domain (i.e. the MASQUERADE_AS
>domain) or not. (You might be getting bit here if it does not!). i.e. you are showing BOTH
>
> MASQUERADE_AS(`bigcorp.com')
>and
> MASQUERADE_DOMAIN(`bigcorp.com')
>
>That almost certainly is NOT what you want. i.e. you want something like this:
>
> MASQUERADE_AS(`<your external domain name>')
>and
> MASQUERADE_DOMAIN(`<your internal DIFFERENT from external domain name>')
>
>If you have several internal domain names to masquerade, (or some that you do NOT want to masquerade!) that is all >covered in /usr/share/sendmail-cf/README!
Thanks, I didn't understand this part clearly.
>
>The noted README file has quite a bit of information on the various sendmail.mc options. You might want to search for >MASQUERADE and review the various sections.
>
>Hope that is helpful,
Thanks a lot for your help (both of you). I've tried everything you have told me, but still it doesn't work. However, I have managed to send mails with the desired address without modifying the sendmail configuration. I happened to put:
<the machine's ip> <the machine's name> <the alternate domain>
in the /etc/hosts file, and now all outgoing emails have <user>@<the alternate domain> in the from field, instead of <user>@<the machine's name>
I'm a bit puzzled, because the systems behaves as I desire, but I think it's not properly configured. Any ideas?
Regards,
Carlos Ortega Gonz?lez
Iberia Sistemas
DS/SP/Unidad Prod. Ordenadores
email: HYPERLINK "mailto:iecisa.cortegag@(protected)"iecisa.cortegag@(protected)
Extensi?n: 4691
-- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.5.1 - Release Date: 02/06/2005
-- ---- ---- ---- ---- ---- ---- ---- ---- --- Has decidido el mejor precio. Has decidido IBERIA.com You?ve chosen the best price. You?ve chosen IBERIA.com -- ---- ---- ---- ---- ---- ---- ---- ---- --- http://www.iberia.com
<html>
<head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} span.EstiloCorreo17 {font-family:Arial; color:windowtext;} @(protected) Section1 {size:595.3pt 841.9pt; margin:70.85pt 3.0cm 70.85pt 3.0cm;} div.Section1 {page:Section1;} --> </style>
</head>
<body lang=ES link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10 .0pt; font-family:"Courier New"'>Ed Wilts wrote:</span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10 .0pt; font-family:"Courier New"'> </span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>Are you testing with a non-root user?? By default, root is exposed so it won't be masqueraded.? Here's what I'm doing for >my home system:</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>></span></font ></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>MASQUERADE_AS (`ewilts.org')dnl</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>FEATURE (masquerade_envelope)dnl FEATURE(masquerade_entire_domain)dnl</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>MASQUERADE _DOMAIN(ewilts.home)dnl</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>dnl EXPOSED _USER(`root')dnl</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>></span></font ></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>I've prevented root from being exposed since I use a smart host and it will reject any e-mails from root@(protected) >(since it's a bogus domain in the Internet world).</span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'> </span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>I have sent mails both as root and as a normal user. And I've tried your configuration, to no avail.</span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'> </span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10 .0pt; font-family:"Courier New"'>Greg Hosler wrote:</span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10 .0pt; font-family:"Courier New"'> </span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>Your original mail had 2 "MASQUERADE_AS" lines. I believe that you don't want that. only one.</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'> </span>< /font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>Ok, understood. I only copied what appeared in the RHEL 3.0 reference guide. Maybe it's a typo.</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'> </span>< /font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>></span></font ></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>as for your most recent question, to quote or not to quote, I believe either is acceptable. the quotes (single open, and >single close) prevent expansion. Otherwise, any wildcard characters in the text string might get expanded.</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>(ref: /usr/share/sendmail-cf/README)</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'> </span>< /font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>Thanks, I've taken a look at that readme.</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'> </span>< /font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>></span></font ></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>and as originally noted, you probably do NOT want a trailing dot in any of your MASQUERADE lines.</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'> </span>< /font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>You're right.</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'> </span>< /font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>finally, the MASQUERADE_DOMAIN is used to map one domain (the listed domain in</span></font> </p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>MASQUERADE _DOMAIN) to another domain (the listed MASQUERADE_AS one, which is why you do NOT want more than one >MASQUERADE_AS line!)</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>></span></font ></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>it's not clear whether using MASQUERADE_AS *along with* MASQUERADE_DOMAIN will map the local domain ALONG WITH the >specified domain (i.e. the MASQUERADE_AS</span> </font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>domain) or not. (You might be getting bit here if it does not!). i.e. you are showing BOTH </span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>></span></font ></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>??? MASQUERADE_AS(`bigcorp.com')</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>and</span>< /font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>??? MASQUERADE_DOMAIN(`bigcorp.com')</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>></span></font ></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>That almost certainly is NOT what you want. i.e. you want something like this:</span></font ></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>></span></font ></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>??? MASQUERADE_AS(`<your external domain name>')</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>and</span>< /font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>??? MASQUERADE_DOMAIN(`<your internal DIFFERENT from external domain name>')< /span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>></span></font ></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>If you have several internal domain names to masquerade, (or some that you do NOT want to masquerade!) that is all >covered in /usr/share/sendmail-cf/README!</span>< /font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'> </span>< /font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>Thanks, I didn't understand this part clearly.</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'> </span>< /font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>></span></font ></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>>The noted README file has quite a bit of information on the various sendmail.mc options. You might want to search for >MASQUERADE and review the various sections.</span> </font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>></span></font ></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"> <span style='font-size:10.0pt;font-family:"Courier New"'>>Hope that is helpful,< /span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size: 10.0pt;font-family:Arial'>Thanks a lot for your help (both of you). I've tried everything you have told me, but still it doesn't work. However, I have managed to send mails with the desired address without modifying the sendmail configuration. I happened to put:</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size: 10.0pt;font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size: 10.0pt;font-family:Arial'>??????????? <the machine's ip>??????? <the machine's name> ???<the alternate domain></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size: 10.0pt;font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size: 10.0pt;font-family:Arial'>in the /etc/hosts file, and now all outgoing emails have <user>@<the alternate domain> in the from field, instead of <user>@<the machine's name></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size: 10.0pt;font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size: 10.0pt;font-family:Arial'>I'm a bit puzzled, because the systems behaves as I desire, but I think it's not properly configured. Any ideas?</span></font> </p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size: 10.0pt;font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size: 10.0pt;font-family:Arial'>Regards,</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size: 10.0pt;font-family:Arial'> </span></font></p>
<p class=MsoNormal><strong><b><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Carlos Ortega</span></font></b></strong><strong><b> <font face="Times New Roman"> Gonz?lez</font></b></strong></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size: 10.0pt'> Iberia Sistemas</span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size: 10.0pt'> DS/SP/Unidad Prod. Ordenadores</span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size: 10.0pt'> email: <a href="mailto:iecisa.cortegag@(protected)">iecisa .cortegag@(protected)</a> </span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size: 10.0pt'> Extensi?n: 4691</span></font></p>
</div>
</body>
</html> <BR>
<P><FONT SIZE=2>--<BR> No virus found in this outgoing message.<BR> Checked by AVG Anti-Virus.<BR> Version: 7.0.323 / Virus Database: 267.5.1 - Release Date: 02/06/2005<BR> </FONT> </P> <BR>
<P><B><FONT SIZE=2 FACE="Arial">-- ---- ---- ---- ---- ---- ---- ---- ---- ---< /FONT></B></P>
<P><B><FONT SIZE=2 FACE="Arial">Has decidido el mejor precio. Has decidido IBERIA.com </FONT></B></P>
<P><FONT SIZE=2 FACE="Arial">You?ve chosen the best price. You?ve chosen IBERIA.com </FONT></P>
<P><FONT SIZE=2 FACE="Arial">-- ---- ---- ---- ---- ---- ---- ---- ---- ---< /FONT></P>
<P><B><FONT SIZE=2 FACE="Arial">http://www.iberia.com </FONT></B></P> <BR>
-- Taroon-list mailing list Taroon-list@(protected) http://www.redhat.com/mailman/listinfo/taroon-list
Earn $52 per hosting referral at Lunarpages.
|
|
 |