<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thanks Lee,<div><br></div><div>     You're exactly right.  I changed all of the </div><div><span style="font-family: 'Times New Roman', Times, serif; font-size: 12pt;"><br></span></div><div><span style="font-family: 'Times New Roman', Times, serif; font-size: 12pt;"> </span><span style="font-family: 'Times New Roman', Times, serif; font-size: 12pt;">)| -t $MAILOPTS</span><p style="font-family: 'Times New Roman', Times, serif;">lines to</p><p style="font-family: 'Times New Roman', Times, serif;">  )| sendmail -t $MAILOPTS</p><p style="font-family: 'Times New Roman', Times, serif;"><br></p><p style="font-family: 'Times New Roman', Times, serif;">and mail is being sent.  Just need to get my aliases straightened out so that they get sent to the right email address.  Thanks!</p><div><br></div><br><div><hr id="stopSpelling">From: lee.e.rian@census.gov<br>To: grungelizard9@hotmail.com; namelessjoe@hotmail.com; rancid-discuss@shrubbery.net<br>Subject: Re: [rancid] Rancid 3.1 control_rancid errors when there are diffs<br>Date: Wed, 11 Mar 2015 16:58:22 +0000<br><br>


<style style="display:none;">
.ExternalClass P {
}

</style>


<div id="ecxdivtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:'Times New Roman', Times, serif;">
You don't have a program called "-t" so yes, it's going to complain about " -t: not found"<br>
<BR>
I have no idea how postfix works -- maybe piping the output of all those echo commands to<BR>
  postfix -t $MAILOPTS<BR>
will send you mail, in which case you need to change all the<BR>
  )| -t $MAILOPTS<BR>
lines to<BR>
  )| postfix -t $MAILOPTS<BR>
<br>
<BR>
Regards,<BR>
Lee<br>
<BR>
<br>
<BR>
<br>
<BR>
<div style="color:rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block;width:98%;">
<div id="ecxdivRplyFwdMsg" dir="ltr"><font style="font-size:11pt;" color="#000000" face="Calibri, sans-serif"><b>From:</b> Daniel Shields <grungelizard9@hotmail.com><br>
<b>Sent:</b> Wednesday, March 11, 2015 11:29 AM<br>
<b>To:</b> Lee Rian (CENSUS/TCO FED); Tanner Lyle; rancid-discuss@shrubbery.net<br>
<b>Subject:</b> RE: [rancid] Rancid 3.1 control_rancid errors when there are diffs</font>
<div> </div>
</div>
<div>
<div dir="ltr">I have a similar issue running 3.1.99, but using postfix.  I get the error "/home/rancid/bin/control_rancid: 631: /home/rancid/bin/control_rancid: -t: not found".  I had the same issue before upgrading (was running 3.1).  "        ) |  -t $MAILOPTS"
 is the line of the control_rancid where it hangs.  Any help is greatly appreciated.
<div><br>
</div>
<div>
<div> if [ $MAXSZ -eq 0 ] ; then</div>
<div>        (</div>
<div>          echo "To: $mailrcpt"</div>
<div>          echo "Subject: $subject"</div>
<div>          echo "$MAILHEADERS" | awk '{L = "";LN = $0;while (LN ~ /\\n/) { I = index(LN,"\\n");L = L substr(LN,0,I-1) "\n";LN = substr(LN,I+2,length(LN)-I-1);}print L LN;}'</div>
<div>          echo ""</div>
<div>          cat $TMP.diff</div>
<div>   <span style="background-color:rgb(255,255,0);">     ) |  -t $MAILOPTS</span></div>
<div><br>
</div>
<div><br>
</div>
<div># Additional options for sendmail(8).</div>
<div>#MAILOPTS="-f bounces.go.here@example.com"; export MAILOPTS</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>Trying to get all of the configs.</div>
<div>All routers sucessfully completed.</div>
<div><br>
</div>
<div>cvs diff: Diffing .</div>
<div>cvs diff: Diffing configs</div>
<div>cvs commit: Examining .</div>
<div>cvs commit: Examining configs</div>
<div>/home/rancid/var/rancid/CVS/demo-vpn/configs/imp_620,v  <--  configs/imp_620</div>
<div>new revision: 1.30; previous revision: 1.29</div>
<div>/home/rancid/bin/control_rancid: 631: /home/rancid/bin/control_rancid: -t: not found</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks!</div>
<div>
<hr id="ecxstopSpelling">
From: lee.e.rian@census.gov<br>
To: namelessjoe@hotmail.com; rancid-discuss@shrubbery.net<br>
Date: Wed, 11 Mar 2015 14:58:12 +0000<br>
Subject: Re: [rancid] Rancid 3.1 control_rancid errors when there are diffs<br>
<br>
<div id="ecxdivtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:'Times New Roman',Times,serif;">
I had the same problem after building rancid on a machine that didn't have sendmail installed.  Install sendmail and edit control_rancid to change all the<br>
  no -t $MAILOPTS<br>
to<br>
  sendmail -t $MAILOPTS<br>
<br>
<br>
Regards,<br>
Lee<br>
<br>
<br>
<br>
<br>
<div style="color:rgb(33,33,33);">
<hr tabindex="-1" style="display:inline-block;width:98%;">
<div id="ecxdivRplyFwdMsg" dir="ltr"><font style="font-size:11pt;" color="#000000" face="Calibri, sans-serif"><b>From:</b> Rancid-discuss <rancid-discuss-bounces@shrubbery.net> on behalf of Tanner Lyle <namelessjoe@hotmail.com><br>
<b>Sent:</b> Wednesday, March 11, 2015 10:07 AM<br>
<b>To:</b> rancid-discuss@shrubbery.net<br>
<b>Subject:</b> [rancid] Rancid 3.1 control_rancid errors when there are diffs</font>
<div> </div>
</div>
<div>
<div dir="ltr"><font size="4">I have installed rancid 3.1 and have it working on a Ubuntu install.  It works and collects diffs and shows them in the repository and i have the cvs web working, but i cannot get it to e-mail me the diffs and am getting an error
 in the var/logs only when there are diffs.  it errors on the control_rancid portion of it i can send mail through postfix with both the sendmail and mail command.  I installed postfix after sendmail fail as i thought it was my problem.  Below is the log of
 both and the control_rancid, and yes i am a newbie</font>
<div><br>
</div>
<div><br>
</div>
<div><font size="4"><br>
</font></div>
<div><font size="4"><b>rancid log when there are no changes</b></font></div>
<div><br>
</div>
<div>
<div>rancid@lyle ~/var/logs $ tail -f networking.20150311.080400 </div>
<div>starting: Wed Mar 11 08:04:00 CDT 2015</div>
<div><br>
</div>
<div><span style="font-size:12pt;">Trying to get all of the configs.</span></div>
<div>All routers sucessfully completed.</div>
<div><br>
</div>
<div>cvs diff: Diffing .</div>
<div>cvs diff: Diffing configs</div>
<div>cvs commit: Examining .</div>
<div>cvs commit: Examining configs</div>
<div><br>
</div>
<div>ending: Wed Mar 11 08:05:14 CDT 2015</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><font size="4"><b>rancid log when there are changes</b></font></div>
<div><br>
</div>
<div>
<div>rancid@lyle ~/var/logs $ tail -f networking.20150311.083546 </div>
<div>starting: Wed Mar 11 08:35:46 CDT 2015</div>
<div><br>
</div>
<div><span style="font-size:12pt;">Trying to get all of the configs.</span></div>
<div>All routers sucessfully completed.</div>
<div><br>
</div>
<div>cvs diff: Diffing .</div>
<div>cvs diff: Diffing configs</div>
<div>cvs commit: Examining .</div>
<div>cvs commit: Examining configs</div>
<div>/usr/local/rancid/var/CVS/networking/configs/foundryswitch,v  <--  configs/foundryswitch</div>
<div>new revision: 1.11; previous revision: 1.10</div>
<div>/usr/local/rancid/bin/control_rancid: 483: /usr/local/rancid/bin/control_rancid: no: not found</div>
<div><br>
</div>
<div>ending: Wed Mar 11 08:37:07 CDT 2015</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><font size="4"><b>control_rancid                  line 483 is the     ) | no -t $MAILOPTS</b></font></div>
<div><br>
</div>
<div>
<div># Mail out the diffs (if there are any).</div>
<div>if [ -s $TMP.diff ] ; then</div>
<div>    MAXSZ=${MAILSPLIT:=0}</div>
<div>    if [ $MAXSZ -ne 0 ] ; then</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>BLOCKSIZE=1024; export BLOCKSIZE</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>tmpk=`perl -e "my(@S) = stat(\"$TMP.diff\"); print int(\\$S[7] / 1024);"`</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>unset BLOCKSIZE</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>if [ $tmpk -lt $MAXSZ ] ; then</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   MAXSZ=0</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>fi</div>
<div>    fi</div>
<div>    if [ $MAXSZ -eq 0 ] ; then</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>(</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span> echo "To: $mailrcpt"</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span> echo "Subject: $subject"</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span> echo "$MAILHEADERS" | awk '{L = "";LN = $0;while (LN ~ /\\n/) { I = index(LN,"\\n");L = L substr(LN,0,I-1) "\n";LN = substr(LN,I+2,length(LN)-I-1);}print L LN;}'</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span> echo ""</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span> cat $TMP.diff</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span><b>) | no -t $MAILOPTS</b></div>
<div>    else</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>CDIR=`pwd`</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>SDIR=${TMPDIR:=/tmp}/rancid.$GROUP.$$.mail</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>error=`mkdir $SDIR`</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>if [ $? -ne 0 ] ; then</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   echo "Could not create $SDIR directory" >&2</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   echo $error >&2</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>else</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   cd $SDIR</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   split -b${MAXSZ}k $TMP.diff</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   nfiles=`ls | wc -l | sed -e 's/^ *//' |cut -d' ' -f1`</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   n=0</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   dt=`perl -e 'print time();'`</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   for file in `ls`; do</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>n=`expr $n + 1`</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>MSGID="<$dt.RANCID$GROUP$$${nfiles}${n}@`hostname`>"</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>(</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>echo "To: $mailrcpt"</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>echo "Subject: $n of ${nfiles}: $subject"</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>echo "Message-Id: $MSGID"</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>if [ $n -gt 1 ] ; then</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   echo "References: $LASTIDS"</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>fi</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>echo "$MAILHEADERS" | awk '{L = "";LN = $0;while (LN ~ /\\n/) { I = index(LN,"\\n");L = L substr(LN,0,I-1) "\n";LN = substr(LN,I+2,length(LN)-I-1);}print L LN;}'</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>echo ""</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>cat $file</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>) | no -t $MAILOPTS</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>LASTIDS="$LASTIDS $MSGID"</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>if [ $n -lt $nfiles ]; then</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   # this just tries to make the msgs order right in MUAs</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   sleep 1</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>fi</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   done</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   cd $CDIR</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>   rm -rf $SDIR</div>
<div><span class="ecxApple-tab-span" style="white-space:pre;"></span>fi</div>
<div>    fi</div>
<div>fi</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
<br>
_______________________________________________ Rancid-discuss mailing list Rancid-discuss@shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss</div>
</div>
</div>
</div>
</div>
</div></div></div>                                      </div></body>
</html>