<?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: Garbage using sendmail in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/garbage-using-sendmail/m-p/3984116#M754802</link>
    <description>&amp;gt; what's the big difference in SLES 9?&lt;BR /&gt;&lt;BR /&gt;Not the best question for an HP-UX forum?&lt;BR /&gt;&lt;BR /&gt;"man sendmail" may show its command-line&lt;BR /&gt;options.  The "sendmail" program itself and&lt;BR /&gt;its configuration tend to differ among&lt;BR /&gt;different systems.&lt;BR /&gt;&lt;BR /&gt;The stuff with "M" at the beginning of each&lt;BR /&gt;line is what you get out of "uuencode".&lt;BR /&gt;What's your complaint about that?&lt;BR /&gt;&lt;BR /&gt;On HP-UX, I'd tend to use "mailx" instead of&lt;BR /&gt;"sendmail" for this sort of thing, but many&lt;BR /&gt;things are possible.</description>
    <pubDate>Wed, 18 Apr 2007 12:16:18 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2007-04-18T12:16:18Z</dc:date>
    <item>
      <title>Garbage using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/garbage-using-sendmail/m-p/3984115#M754801</link>
      <description>Hello&lt;BR /&gt;I am writing a script to send, through sendmail, a Ascii file to certain people. Here is the script:&lt;BR /&gt;SENDMAIL=/usr/sbin/sendmail&lt;BR /&gt;UUENCODE=/usr/bin/uuencode&lt;BR /&gt;USER_LIST="garvin"&lt;BR /&gt;DOMAIN=my.domain.com&lt;BR /&gt;LOG_FILE=/var/log/messages&lt;BR /&gt;#&lt;BR /&gt;for USER in $USER_LIST&lt;BR /&gt;#&lt;BR /&gt;do&lt;BR /&gt;#&lt;BR /&gt; echo "Subject: Output Log $0  \n` cat $LOG_FILE | $UUENCODE $LOG_FILE`" | $SENDMAIL $USER@$DOMAIN&lt;BR /&gt;#&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;I can receive the email but:&lt;BR /&gt;1.  "To" line shows 'undisclosed-recipients:;&lt;BR /&gt;2.  "Subject" line shows ./send2.test (this is the name of the script I am running) then \nbegin 644 /var/log/messages&lt;BR /&gt;3.   As far as what is to be attached... comes up  M07!R(#$Q(#`T.C$U.C$Y('1H;V]S83$@&lt;WES&gt;&lt;/WES&gt;M="X*07!R(#$Q(#`T.C$U.C$Y('1H;V]S83$@&lt;W4Z&gt;&lt;/W4Z&gt;M(&amp;amp;]N(&amp;amp;YO;F4*07!R(#$Q(#`T.C$U.C$Y('1H;V]S83$@&lt;W4Z&gt;&lt;/W4Z&gt;M,CH@&lt;V5S&gt;&lt;/V5S&gt;M"D%P&lt;B&gt;#(Z('-E&lt;W-I&gt;&lt;/W-I&gt;&lt;BR /&gt;This isn't all but you get the idea.&lt;BR /&gt;&lt;BR /&gt;As you can see from the script we are using sendmail and postfix is the engine underneath&lt;BR /&gt;&lt;BR /&gt;If possible I don't wish to use mutt or anything else.  This script works well in HPUX&lt;BR /&gt;but what's the big difference in SLES 9?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/B&gt;</description>
      <pubDate>Wed, 18 Apr 2007 11:28:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/garbage-using-sendmail/m-p/3984115#M754801</guid>
      <dc:creator>ROSS HANSON</dc:creator>
      <dc:date>2007-04-18T11:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/garbage-using-sendmail/m-p/3984116#M754802</link>
      <description>&amp;gt; what's the big difference in SLES 9?&lt;BR /&gt;&lt;BR /&gt;Not the best question for an HP-UX forum?&lt;BR /&gt;&lt;BR /&gt;"man sendmail" may show its command-line&lt;BR /&gt;options.  The "sendmail" program itself and&lt;BR /&gt;its configuration tend to differ among&lt;BR /&gt;different systems.&lt;BR /&gt;&lt;BR /&gt;The stuff with "M" at the beginning of each&lt;BR /&gt;line is what you get out of "uuencode".&lt;BR /&gt;What's your complaint about that?&lt;BR /&gt;&lt;BR /&gt;On HP-UX, I'd tend to use "mailx" instead of&lt;BR /&gt;"sendmail" for this sort of thing, but many&lt;BR /&gt;things are possible.</description>
      <pubDate>Wed, 18 Apr 2007 12:16:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/garbage-using-sendmail/m-p/3984116#M754802</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-04-18T12:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/garbage-using-sendmail/m-p/3984117#M754803</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;If you are using an stmp relay it could be making your mail into garbage.&lt;BR /&gt;&lt;BR /&gt;Otherwise compare your script to a production working script and see if there is something that helps.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.hpux.ws/mailfile1" target="_blank"&gt;http://www.hpux.ws/mailfile1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 18 Apr 2007 12:38:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/garbage-using-sendmail/m-p/3984117#M754803</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-04-18T12:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/garbage-using-sendmail/m-p/3984118#M754804</link>
      <description>Sep,&lt;BR /&gt;The url you have sent does not work. I received:&lt;BR /&gt;Not Found&lt;BR /&gt;&lt;BR /&gt;The requested URL /mailfile1 was not found on this server.&lt;BR /&gt;&lt;BR /&gt;Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.&lt;BR /&gt;&lt;BR /&gt;Does it work on your end?</description>
      <pubDate>Wed, 18 Apr 2007 12:45:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/garbage-using-sendmail/m-p/3984118#M754804</guid>
      <dc:creator>ROSS HANSON</dc:creator>
      <dc:date>2007-04-18T12:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/garbage-using-sendmail/m-p/3984119#M754805</link>
      <description>In SLES the echo command does not work like in HP-UX.&lt;BR /&gt;Perhaps this helps:&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;SENDMAIL=/usr/sbin/sendmail&lt;BR /&gt;UUENCODE=/usr/bin/uuencode&lt;BR /&gt;USER_LIST="garvin"&lt;BR /&gt;DOMAIN=my.domain.com&lt;BR /&gt;LOG_FILE=/var/log/messages&lt;BR /&gt;#&lt;BR /&gt;for USER in $USER_LIST&lt;BR /&gt;do&lt;BR /&gt;{ echo "Subject: Output Log $0"&lt;BR /&gt;  echo "To: $USER@$DOMAIN" &lt;BR /&gt;  cat $LOG_FILE | $UUENCODE $LOG_FILE&lt;BR /&gt;} | $SENDMAIL -t&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;#------------------------------------&lt;BR /&gt;It might be better not to uuencode the message and rather settle for a more detailed mail header and files which have been processed a bit in advance.&lt;BR /&gt;&lt;BR /&gt;Here is some lines to study and give some ideas...&lt;BR /&gt;#-----------------------------------------&lt;BR /&gt; BODYTXT="/tmp/mailbody.$$"&lt;BR /&gt; CSVREPOT="/tmp/report.$$"&lt;BR /&gt;#&lt;BR /&gt;# some script to generate mailbody and CSV report files&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;# Then send the mail with the CSV report as attachment named "datasheet.csv"&lt;BR /&gt; echo "Subject: My Subject"&lt;BR /&gt; echo "To: $RECIPIENTS "&lt;BR /&gt; echo "Reply-To: $REPLYTO"&lt;BR /&gt; echo "Mime-Version: 1.0"&lt;BR /&gt; echo "Content-Type: multipart/mixed; boundary=\"boundary-line\""&lt;BR /&gt; echo "\nThis is a MIME multipart mail message.\n"&lt;BR /&gt; echo "--boundary-line"&lt;BR /&gt; echo "Content-Type: text/html; charset=us-ascii\n"&lt;BR /&gt; cat -v $NOTTXT&lt;BR /&gt; echo "\n--boundary-line"&lt;BR /&gt; echo "Content-Type: application/ms-excel;"&lt;BR /&gt; echo " name=\"datasheet.csv\""&lt;BR /&gt; echo "Content-Transfer-Encoding: us-ascii"&lt;BR /&gt; echo "Content-Disposition: attachment;"&lt;BR /&gt; echo " filename=\"datasheet.csv\"\n"&lt;BR /&gt; sleep 1&lt;BR /&gt; cat -v $REPFILE&lt;BR /&gt;} | sendmail -t&lt;BR /&gt;&lt;BR /&gt;#----------------------------------------&lt;BR /&gt;Some more lines if you would like to pipe to a notification script&lt;BR /&gt;&lt;BR /&gt;#! /bin/sh&lt;BR /&gt;# Script to forward mail with sendmail&lt;BR /&gt;#&lt;BR /&gt;# How it works:&lt;BR /&gt;# This script will use the parameters to define subject and recipients.&lt;BR /&gt;# All standard input will be added as mailbody&lt;BR /&gt;# The mail is sent by user: sysadmin&lt;BR /&gt;#&lt;BR /&gt;# Usage: notify {your subject} : {comma separated recipients}&lt;BR /&gt;LINE="$*"&lt;BR /&gt;SUBJECT="$(echo "${LINE}"|cut -d: -f1)"&lt;BR /&gt;RECIPIENTS="$(echo "${LINE}"|cut -d: -f2)"&lt;BR /&gt;# Send mail to specified recipient&lt;BR /&gt;{ echo "Subject: $SUBJECT"&lt;BR /&gt;  echo "To: $RECIPIENTS "&lt;BR /&gt;  echo "Reply-To: sysadmin@my.domain"&lt;BR /&gt;  echo 'MIME-Version: 1.0'&lt;BR /&gt;  echo 'Content-Type: text/html; charset=us-ascii'&lt;BR /&gt;  cat&lt;BR /&gt;} | su - sysadmin -c "sendmail -t" 1&amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;# ---------------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;&lt;BR /&gt;/Tor-Arne&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Apr 2007 14:27:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/garbage-using-sendmail/m-p/3984119#M754805</guid>
      <dc:creator>Tor-Arne Nostdal</dc:creator>
      <dc:date>2007-04-19T14:27:28Z</dc:date>
    </item>
  </channel>
</rss>

