<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META content="MSHTML 5.50.4611.1300" name=GENERATOR>
<STYLE>@font-face {
font-family: Tahoma;
}
@font-face {
font-family: Comic Sans MS;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.emailstyle17 {
COLOR: windowtext; FONT-FAMILY: Arial
}
SPAN.EmailStyle18 {
COLOR: navy; FONT-FAMILY: Arial
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=925162219-18042003><FONT face="Comic Sans MS" color=#000080
size=2>You may have tweaked your pine config to force the FROM
address.</FONT></SPAN></DIV>
<DIV><SPAN class=925162219-18042003><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=925162219-18042003><FONT face="Comic Sans MS" color=#000080
size=2>As for sendmail, depending on what version of sendmail you're running, it
could be a simple tweak. Edit /etc/sendmail.cf and search for 'masquerade'
or '^DM' (without the quotes) and change accordingly. Here's a sample
tweak from my sendmail.cf file for one of my Linux hosts (lines 138-139) running
sendmail version 8.11.6:</FONT></SPAN></DIV>
<DIV><SPAN class=925162219-18042003><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=925162219-18042003><FONT face="Comic Sans MS" color=#000080
size=2># who I masquerade as (null for no masquerading) (see also
$=M)<BR>DMsprintspectrum.com<BR></FONT></SPAN></DIV>
<DIV><SPAN class=925162219-18042003><FONT face="Comic Sans MS" color=#000080
size=2>HTH.</FONT></SPAN></DIV>
<DIV><SPAN class=925162219-18042003><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=925162219-18042003><FONT face="Comic Sans MS" color=#000080
size=2>jc</FONT></SPAN></DIV>
<DIV><SPAN class=925162219-18042003><FONT face="Comic Sans MS" color=#000080
size=2> </DIV></FONT></SPAN>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Val Vechnyak
[mailto:val@nycity.com]<BR><B>Sent:</B> Friday, April 18, 2003 1:21
PM<BR><B>To:</B> Carroll, Jim P [Contractor];
nagios-users@lists.sourceforge.net<BR><B>Subject:</B> RE: [Nagios-users] Mail
FROM field needs to be changed<BR><BR></FONT></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Ummmmm, You are
right. My bad. That’s embarrassing.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> It works using
PINE, but not from the command line.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Don’t know what is
going on. Thanks and sorry I took your time.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<DIV>
<P class=MsoNormal><FONT face="Courier New" color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'">----------------------------------------------------------------------------</SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'">Val
Vechnyak</SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'">MCP</SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face="Courier New" color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'">Technical
support: <A
href="mailto:support@msohosting.com">support@msohosting.com</A></SPAN></FONT></P></DIV>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Carroll,
Jim P [Contractor] [mailto:jcarro10@sprintspectrum.com] <BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Friday, April 18, 2003
13:23<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> 'Val Vechnyak';
nagios-users@lists.sourceforge.net<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [Nagios-users] Mail FROM
field needs to be changed</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Comic Sans MS"
color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'">I'm not
convinced that your sendmail config is blameless. Try the
following:</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Comic Sans MS"
color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'"># su -
nagios</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Comic Sans MS"
color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'">$ echo
'hello' | /usr/lib/sendmail <A
href="mailto:val@nycity.com">val@nycity.com</A></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Comic Sans MS"
color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'">Let us know
what the FROM header looks like on the receiving end.</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Comic Sans MS"
color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'">jc</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<BLOCKQUOTE
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; MARGIN: 5pt 0in 5pt 3.75pt; BORDER-LEFT: navy 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
<P class=MsoNormal
style="MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0in"><FONT
face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Val
Vechnyak [mailto:val@nycity.com]<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Friday, April 18, 2003 10:15
AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
nagios-users@lists.sourceforge.net<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [Nagios-users] Mail FROM field
needs to be changed</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hello,</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I apologize if this was
discussed already in this list, but since I just signed up I did not
know.</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">My problem is when nagios is
sending email notifications it includes the entire hostname in MAIL FROM
field (i.e. <A
href="mailto:nagios@hostname.domainname.com">nagios@hostname.domainname.com</A>).
There is no problem when I send an email using PINE from nagios user, so my
sendmail is configured properly.</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">This is a problem for me because
some email servers lookup the MX record of the domain name and refuse email
if it does not match.</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">ADMINEMAIL in nagios.cfg is <A
href="mailto:nagios@myrealdomainname.com">nagios@myrealdomainname.com</A>,
but nagios still puts the hostname in the FROM field.</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Could anyone tell me where I can
configure it?</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks,</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Val</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN
style="FONT-SIZE: 12pt"></SPAN></FONT> </P></BLOCKQUOTE></DIV></BLOCKQUOTE></BODY></HTML>