<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'><br><div><div dir="ltr">I have postfix installed and it has a sendmail clone function that works from the command line i changed the<div><br></div><div> no -t $MAILOPTS <br><br>to sendmail -t $MAILOPTS and i still get an error is it a path issue or what am i not understanding</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>/usr/local/rancid/var/CVS/networking/configs/198.210.70.10,v  <--  configs/198.210.70.10</div><div>new revision: 1.12; previous revision: 1.11</div><div>/usr/local/rancid/bin/control_rancid: 483: /usr/local/rancid/bin/control_rancid: sendmail: not found</div><div><br></div><div>ending: Wed Mar 11 10:27:32 CDT 2015</div></div><div><br></div><div><div><hr id="ecxstopSpelling">From: grungelizard9@hotmail.com<br>To: lee.e.rian@census.gov; 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 11:29:18 -0400<br><br>

<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}


--></style>
<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>


<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;">
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><style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

--></style>                                      </div></body>
</html>