[rancid] router config diffs
Wayne Eisenberg
Wayne.Eisenberg at CarolinasIT.com
Fri Oct 26 08:20:40 UTC 2018
Thanks, that's an interesting idea although what I was really thinking of was turning off the emailing of diffs, not totally disabling mail. (It would still be important to know if rancid lost contact with devices.)
If that were part of the official control_rancid, then it could be controlled by a variable in the rancid.conf file. Just a newbie idea.
-----Original Message-----
From: Lee [mailto:ler762 at gmail.com]
Sent: Thursday, October 25, 2018 4:17 AM
To: Wayne Eisenberg <Wayne.Eisenberg at CarolinasIT.com>
Cc: rancid-discuss at shrubbery.net
Subject: Re: [rancid] router config diffs
On 10/25/18, Wayne Eisenberg <Wayne.Eisenberg at carolinasit.com> wrote:
>> I'd go with changing control_rancid. Search for
>>
>> # Mail out the diffs (if there are any).
>> if [ -s $TMP.diff ] ; then
>
> Bingo. I found my tweak. Thanks, Lee! Instead of actually sending the
> email, I had just redirected it to /dev/null.
>
> - ) | $SENDMAIL -t $MAILOPTS
> + ) > /dev/null
>
> Maybe that could be a config choice in rancid.conf (if it were a
> global
> switch) or .cloginrc (if you wanted to turn off mail for specific
> devices or groups)?
For a global switch just use your version of sendmail instead of the system version:
$ cat sendmail
#!/bin/sh
#
# rancid insists on having sendmail
# so give it one
#
echo "" >> /tmp/sendmail.txt
date >> /tmp/sendmail.txt
echo "$*" >> /tmp/sendmail.txt
while read LINE
do
echo $LINE >> /tmp/sendmail.txt
done
echo "" >> /tmp/sendmail.txt
altho you'd probably want it to be just
exit
and if you ever want rancid to actually send mail, have your sendmail be a link to the real one.
Regards,
Lee
________________________________
The information in this Internet e-mail (and any attachments) is confidential, may be legally privileged and is intended solely for the Addressee(s) named above. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, then any dissemination or copying of this e-mail (and any attachments) is prohibited and may be unlawful. If you received this e-mail in error, please immediately notify us by e-mail or telephone, then delete the message. Thank you.
More information about the Rancid-discuss
mailing list