<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Changing the from line in sendmail. in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933433#M46260</link>
    <description>You can use DM macro, &lt;BR /&gt;#  Masquerade as (DM):                                                         #&lt;BR /&gt;#                                                                              #&lt;BR /&gt;#      If you wish to have mail appear to be from some host or location        #&lt;BR /&gt;#      other than the local host, set macro M to the name you wish to          #&lt;BR /&gt;#      masquerade as.  This is also know as site hiding and was set using      #&lt;BR /&gt;#      the DY macro in previous releases of hp-ux.</description>
    <pubDate>Thu, 13 Oct 2005 23:57:09 GMT</pubDate>
    <dc:creator>Arunvijai_4</dc:creator>
    <dc:date>2005-10-13T23:57:09Z</dc:date>
    <item>
      <title>Changing the from line in sendmail.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933427#M46254</link>
      <description>Hi everyone,&lt;BR /&gt;&lt;BR /&gt;Here's the challenge, I want my email notifications from my Red Hat Enterprise Linux 4ES nodes to look just like my HP-UX nodes.&lt;BR /&gt;&lt;BR /&gt;By default, the HP-UX nodes have a from both displayed and the actual address of:&lt;BR /&gt;&lt;BR /&gt;username@hostname.domain.com&lt;BR /&gt;&lt;BR /&gt;Such as root@banana.hp.com&lt;BR /&gt;&lt;BR /&gt;When I receive a message from a Linux node, it shows a displayed name as the username and the email address as the full address.&lt;BR /&gt;&lt;BR /&gt;So, in your email you see a message from:&lt;BR /&gt;&lt;BR /&gt;root&lt;BR /&gt;&lt;BR /&gt;Who has an address of:&lt;BR /&gt;&lt;BR /&gt;root@linuxnode.domain.com&lt;BR /&gt;&lt;BR /&gt;I'd like it to look just like HP-UX.&lt;BR /&gt;&lt;BR /&gt;Does anyone have any ideas where I should start? I've tried comparing the sendmail.cf files, but, well, they're brutal.&lt;BR /&gt;&lt;BR /&gt;Another quick one. Why is it that some documentation says you should make changes to the sendmail.mc file and run m4 to generate the sendmail.cf file, and others say just to edit the sendmail.cf.&lt;BR /&gt;&lt;BR /&gt;From what I've seen, both files are awful to work with, so I don't see any benefit in workin with the .mc then having to deal with a script tool as well. Am I wrong here?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Don</description>
      <pubDate>Thu, 13 Oct 2005 11:34:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933427#M46254</guid>
      <dc:creator>Don Mallory</dc:creator>
      <dc:date>2005-10-13T11:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the from line in sendmail.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933428#M46255</link>
      <description>An entry in /etc/mail/virtusertable and possibly /etc/mail/genericstable will do it.&lt;BR /&gt;&lt;BR /&gt;You'll need to do this on each machine.&lt;BR /&gt;&lt;BR /&gt;Don't have to touch sendmail.cf sendmail.mc or even restart the sendmail daemon.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 13 Oct 2005 12:08:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933428#M46255</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-10-13T12:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the from line in sendmail.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933429#M46256</link>
      <description>I did not understood your question. From the linux, do you receive root@hostname.domain or just root@domain?&lt;BR /&gt;&lt;BR /&gt;The sendmail.mc is a macro file that allows you to generate a sendmail.cf file. It's popular because it's really easy configure sendmail with that, but also, you can edit directly the sendmail.cf file.&lt;BR /&gt;&lt;BR /&gt;The good thing of sendmail.mc is that, when you upgrade the version of sendmail, you can quickly generate a new .cf file.</description>
      <pubDate>Thu, 13 Oct 2005 14:18:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933429#M46256</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-10-13T14:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the from line in sendmail.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933430#M46257</link>
      <description>Forgot to add, you can control the domain part using the MASQUERADE_AS option in the sendmail.mc file, or configure the Dj (j is the host name) and DM (M is the masquerade as) in the sendmail.cf file</description>
      <pubDate>Thu, 13 Oct 2005 14:30:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933430#M46257</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-10-13T14:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the from line in sendmail.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933431#M46258</link>
      <description>Hmm.. perhaps I should give specific examples instead. It would probably help with me not being quite so obtuse.&lt;BR /&gt;&lt;BR /&gt;If I log into an HP-UX 11.11 box and enter the following:&lt;BR /&gt;&lt;BR /&gt;echo done | mailx -s "testing" username@domain.ca&lt;BR /&gt;&lt;BR /&gt;I get the following message header in my email:&lt;BR /&gt;&lt;BR /&gt;Received: from hpux.domain.ca ([192.168.1.32]) by smtphost.domain.ca with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)&lt;BR /&gt; id 4KNAG76Z; Thu, 13 Oct 2005 20:15:04 -0400&lt;BR /&gt;Received: (from root@localhost)&lt;BR /&gt; by hpux.domain.ca (8.9.3 (PHNE_29774)/8.9.3) id UAA17263&lt;BR /&gt; for username@domain.ca; Thu, 13 Oct 2005 20:15:17 -0400 (EDT)&lt;BR /&gt;Date: Thu, 13 Oct 2005 20:15:17 -0400 (EDT)&lt;BR /&gt;From: root@hpux.domain.ca&lt;BR /&gt;Message-Id: &amp;lt;200510140015.UAA17263@hpux.domain.ca&amp;gt;&lt;BR /&gt;To: username@domain.ca&lt;BR /&gt;Subject: testing&lt;BR /&gt;Mime-Version: 1.0&lt;BR /&gt;Content-Type: text/plain; charset=us-ascii&lt;BR /&gt;Content-Transfer-Encoding: 7bit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If I log into a Red Hat Enterprise Linux 4ES box and enter:&lt;BR /&gt;&lt;BR /&gt;echo testing | mail -s "testing" username@domain.ca&lt;BR /&gt;&lt;BR /&gt;I get this header:&lt;BR /&gt;&lt;BR /&gt;Received: from linux.domain.ca ([192.168.1.34]) by smtphost.domain.ca with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)&lt;BR /&gt; id 4KNAG76R; Thu, 13 Oct 2005 20:14:28 -0400&lt;BR /&gt;Received: (from root@localhost)&lt;BR /&gt; by linux.domain.ca (8.13.1/8.13.1/Submit) id j9E0ER80003318&lt;BR /&gt; for username@domain.ca; Thu, 13 Oct 2005 20:14:27 -0400&lt;BR /&gt;Date: Thu, 13 Oct 2005 20:14:27 -0400&lt;BR /&gt;From: root &lt;ROOT&gt;&lt;BR /&gt;Message-Id: &amp;lt;200510140014.j9E0ER80003318@linux.domain.ca&amp;gt;&lt;BR /&gt;To: username@domain.ca&lt;BR /&gt;Subject: testing&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;How do I make the Linux one be just like the HP-UX one?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SEP: Since I've read many sendmail responses from you, I don't doubt that what you are suggesting will solve the problem.. (what can I say, you seem to be a sendmail god.. ;-) The thing is, my HP-UX boxes don't have either of those files, and they work just fine...&lt;BR /&gt;&lt;BR /&gt;I'm going to attach the sendmail.cf from one of each of my linux and hpux nodes so you can see what I see...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/ROOT&gt;</description>
      <pubDate>Thu, 13 Oct 2005 19:47:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933431#M46258</guid>
      <dc:creator>Don Mallory</dc:creator>
      <dc:date>2005-10-13T19:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the from line in sendmail.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933432#M46259</link>
      <description>And the linux sendmail.cf file.</description>
      <pubDate>Thu, 13 Oct 2005 19:48:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933432#M46259</guid>
      <dc:creator>Don Mallory</dc:creator>
      <dc:date>2005-10-13T19:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the from line in sendmail.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933433#M46260</link>
      <description>You can use DM macro, &lt;BR /&gt;#  Masquerade as (DM):                                                         #&lt;BR /&gt;#                                                                              #&lt;BR /&gt;#      If you wish to have mail appear to be from some host or location        #&lt;BR /&gt;#      other than the local host, set macro M to the name you wish to          #&lt;BR /&gt;#      masquerade as.  This is also know as site hiding and was set using      #&lt;BR /&gt;#      the DY macro in previous releases of hp-ux.</description>
      <pubDate>Thu, 13 Oct 2005 23:57:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933433#M46260</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2005-10-13T23:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the from line in sendmail.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933434#M46261</link>
      <description>I found only one difference between hpux sendmail.cf and linux as,&lt;BR /&gt;&lt;BR /&gt;O MaxHeadersLength=32768&lt;BR /&gt;&lt;BR /&gt;Enable this in linux and restart sendmail.&lt;BR /&gt;&lt;BR /&gt;Try it and post results.&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Fri, 14 Oct 2005 03:07:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933434#M46261</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-14T03:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the from line in sendmail.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933435#M46262</link>
      <description>use `sendmail -fuser@host.com toaddr@host.com`&lt;BR /&gt;&lt;BR /&gt;The -f specifies the from address to be user@host.com&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Tom Callahan</description>
      <pubDate>Tue, 18 Oct 2005 11:39:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933435#M46262</guid>
      <dc:creator>Tom Callahan_1</dc:creator>
      <dc:date>2005-10-18T11:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the from line in sendmail.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933436#M46263</link>
      <description>I recognise that your suggestion will work (and it does) the thing is, I don't have to do that on the HP-UX boxes, and what you are suggesting will require re-writing a large number of scripts, when I can just fix the configuration of sendmail instead...</description>
      <pubDate>Tue, 18 Oct 2005 16:05:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933436#M46263</guid>
      <dc:creator>Don Mallory</dc:creator>
      <dc:date>2005-10-18T16:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the from line in sendmail.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933437#M46264</link>
      <description>File that's used for outgoing email on RHEL is /etc/mail/submit.cf.&lt;BR /&gt;&lt;BR /&gt;In this file you will find the following line (in the "Format of headers" section)&lt;BR /&gt;&lt;BR /&gt;H?F?From: $?x$x &amp;lt;$g&amp;gt;$|$g$.&lt;BR /&gt;&lt;BR /&gt;This is where your From header is set and it is sendmail's equivalent of if statement.&lt;BR /&gt;&lt;BR /&gt;if ($x is set)&lt;BR /&gt;then&lt;BR /&gt;set From: to $x &amp;lt;$g&amp;gt;&lt;BR /&gt;else&lt;BR /&gt;set From: to $g&lt;BR /&gt;&lt;BR /&gt;$x is full name of the sender (gecos field from the /etc/passwd).&lt;BR /&gt;$g is sender's address&lt;BR /&gt;&lt;BR /&gt;SO one way to transform "root &lt;ROOT&gt;" to just "root@..." in "From:" field is to simply  leave gecos field for root account in /etc/passwd empty.&lt;BR /&gt;&lt;BR /&gt;i.e.&lt;BR /&gt;&lt;BR /&gt;change&lt;BR /&gt;&lt;BR /&gt;root:x:0:0:root:/root:/bin/bash&lt;BR /&gt;&lt;BR /&gt;to&lt;BR /&gt;&lt;BR /&gt;root:x:0:0::/root:/bin/bash&lt;BR /&gt;&lt;BR /&gt;Hope that makes sense.&lt;/ROOT&gt;</description>
      <pubDate>Wed, 19 Oct 2005 01:39:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933437#M46264</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2005-10-19T01:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the from line in sendmail.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933438#M46265</link>
      <description>That's awesome! I completely forgot about the submit.cf!&lt;BR /&gt;&lt;BR /&gt;I changed:&lt;BR /&gt;&lt;BR /&gt;#H?F?From: $?x$x &amp;lt;$g&amp;gt;$|$g$.&lt;BR /&gt;&lt;BR /&gt;To:&lt;BR /&gt;&lt;BR /&gt;H?F?From: $g$&lt;BR /&gt;&lt;BR /&gt;And it does exactly what I'm looking for.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot!&lt;BR /&gt;Don</description>
      <pubDate>Wed, 19 Oct 2005 20:01:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/changing-the-from-line-in-sendmail/m-p/4933438#M46265</guid>
      <dc:creator>Don Mallory</dc:creator>
      <dc:date>2005-10-19T20:01:54Z</dc:date>
    </item>
  </channel>
</rss>

