Discussion:
[rancid] RANCID Log Messages: "sendmail: not found" with no mailed diffs
Traiano Welcome
2009-09-17 08:05:25 UTC
Permalink
Hi List

I've been getting the following log messages in my rancid logs recently,
along with no emailed diffs (although the cvs updates are happening):

---
/usr/lib/rancid/bin/control_rancid: 397: sendmail: not found
---

What might the cause of these messages be? As far as I can tell, it
looks like control_rancid is not finding any diffs to mail when called,
even though running "cvs log <filename>" shows the most recent committed
changes correctly.

Thanks,
Traiano
Ryan West
2009-09-17 13:09:29 UTC
Permalink
Traiano,

The software is attempting to send you the diffs, but it seems you've removed sendmail. It might be easiest to just go back into the rancid source directory, check your config.log and see how you ran the configure script and re-run it. Then 'make install' and it should use whatever new program you're using now.


-ryan

-----Original Message-----
From: rancid-discuss-***@shrubbery.net [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Traiano Welcome
Sent: Thursday, September 17, 2009 4:05 AM
To: rancid-***@shrubbery.net
Subject: [rancid] RANCID Log Messages: "sendmail: not found" with no mailed diffs

Hi List

I've been getting the following log messages in my rancid logs recently,
along with no emailed diffs (although the cvs updates are happening):

---
/usr/lib/rancid/bin/control_rancid: 397: sendmail: not found
---

What might the cause of these messages be? As far as I can tell, it
looks like control_rancid is not finding any diffs to mail when called,
even though running "cvs log <filename>" shows the most recent committed
changes correctly.

Thanks,
Traiano
Traiano Welcome
2009-09-17 13:30:59 UTC
Permalink
Hi Ryan
Post by Ryan West
Traiano,
The software is attempting to send you the diffs, but it seems you've removed sendmail.
That was also my first suspicion, but I've checked that I can still use
sendmail on my server ( "| sendmail -t" as is used in the control_rancid
script). Also, I snipped a bit out of control_rancid that actually sends
the diff and tested that it sends mail, for example, this bit works if
put into a shell script:

---
#!/bin/sh
( echo "To: ***@tenet.ac.za"
echo "Subject: no /usr/lib/rancid/router.db file"
echo "Precedence: bulk"
echo ""
echo "router.db does not exist."
) | sendmail -t
---

These are the details of sendmail on my box (it's actually a wrapper
around exim4, but it's always been that way):

---

***@cyclops:~/analysis/ranci# which sendmail
/usr/sbin/sendmail

***@cyclops:~/analysis/ranci# file `which sendmail`
/usr/sbin/sendmail: symbolic link to `exim4'

---

Hmmm, I'm at a loss.

Traiano
Post by Ryan West
It might be easiest to just go back into the rancid source directory, check your config.log and see how you ran the configure script and re-run it. Then 'make install' and it should use whatever new program you're using now.
-ryan
-----Original Message-----
Sent: Thursday, September 17, 2009 4:05 AM
Subject: [rancid] RANCID Log Messages: "sendmail: not found" with no mailed diffs
Hi List
I've been getting the following log messages in my rancid logs recently,
---
/usr/lib/rancid/bin/control_rancid: 397: sendmail: not found
---
What might the cause of these messages be? As far as I can tell, it
looks like control_rancid is not finding any diffs to mail when called,
even though running "cvs log <filename>" shows the most recent committed
changes correctly.
Thanks,
Traiano
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Ryan West
2009-09-17 13:37:28 UTC
Permalink
Can you check your config.log and compare to your which for sendmail, sounds like they might not match up.

-ryan

-----Original Message-----
From: Traiano Welcome [mailto:***@tenet.ac.za]
Sent: Thursday, September 17, 2009 9:31 AM
To: Ryan West
Cc: rancid-***@shrubbery.net
Subject: Re: [rancid] RANCID Log Messages: "sendmail: not found" with no mailed diffs

Hi Ryan
Post by Ryan West
Traiano,
The software is attempting to send you the diffs, but it seems you've removed sendmail.
That was also my first suspicion, but I've checked that I can still use
sendmail on my server ( "| sendmail -t" as is used in the control_rancid
script). Also, I snipped a bit out of control_rancid that actually sends
the diff and tested that it sends mail, for example, this bit works if
put into a shell script:

---
#!/bin/sh
( echo "To: ***@tenet.ac.za"
echo "Subject: no /usr/lib/rancid/router.db file"
echo "Precedence: bulk"
echo ""
echo "router.db does not exist."
) | sendmail -t
---

These are the details of sendmail on my box (it's actually a wrapper
around exim4, but it's always been that way):

---

***@cyclops:~/analysis/ranci# which sendmail
/usr/sbin/sendmail

***@cyclops:~/analysis/ranci# file `which sendmail`
/usr/sbin/sendmail: symbolic link to `exim4'

---

Hmmm, I'm at a loss.

Traiano
Post by Ryan West
It might be easiest to just go back into the rancid source directory, check your config.log and see how you ran the configure script and re-run it. Then 'make install' and it should use whatever new program you're using now.
-ryan
-----Original Message-----
Sent: Thursday, September 17, 2009 4:05 AM
Subject: [rancid] RANCID Log Messages: "sendmail: not found" with no mailed diffs
Hi List
I've been getting the following log messages in my rancid logs recently,
---
/usr/lib/rancid/bin/control_rancid: 397: sendmail: not found
---
What might the cause of these messages be? As far as I can tell, it
looks like control_rancid is not finding any diffs to mail when called,
even though running "cvs log <filename>" shows the most recent committed
changes correctly.
Thanks,
Traiano
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Traiano Welcome
2009-09-17 14:24:08 UTC
Permalink
I'm using Ubuntu based on lenn/sid, so this was installed using the
debian package management system - it doesn't look like a config.log was
kept ... Is there a way to check this on debian like systems?
Post by Ryan West
Can you check your config.log and compare to your which for sendmail, sounds like they might not match up.
-ryan
-----Original Message-----
Sent: Thursday, September 17, 2009 9:31 AM
To: Ryan West
Subject: Re: [rancid] RANCID Log Messages: "sendmail: not found" with no mailed diffs
Hi Ryan
Post by Ryan West
Traiano,
The software is attempting to send you the diffs, but it seems you've removed sendmail.
That was also my first suspicion, but I've checked that I can still use
sendmail on my server ( "| sendmail -t" as is used in the control_rancid
script). Also, I snipped a bit out of control_rancid that actually sends
the diff and tested that it sends mail, for example, this bit works if
---
#!/bin/sh
echo "Subject: no /usr/lib/rancid/router.db file"
echo "Precedence: bulk"
echo ""
echo "router.db does not exist."
) | sendmail -t
---
These are the details of sendmail on my box (it's actually a wrapper
---
/usr/sbin/sendmail
/usr/sbin/sendmail: symbolic link to `exim4'
---
Hmmm, I'm at a loss.
Traiano
Post by Ryan West
It might be easiest to just go back into the rancid source directory, check your config.log and see how you ran the configure script and re-run it. Then 'make install' and it should use whatever new program you're using now.
-ryan
-----Original Message-----
Sent: Thursday, September 17, 2009 4:05 AM
Subject: [rancid] RANCID Log Messages: "sendmail: not found" with no mailed diffs
Hi List
I've been getting the following log messages in my rancid logs recently,
---
/usr/lib/rancid/bin/control_rancid: 397: sendmail: not found
---
What might the cause of these messages be? As far as I can tell, it
looks like control_rancid is not finding any diffs to mail when called,
even though running "cvs log <filename>" shows the most recent committed
changes correctly.
Thanks,
Traiano
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Jethro R Binks
2009-09-17 14:32:12 UTC
Permalink
Post by Traiano Welcome
I'm using Ubuntu based on lenn/sid, so this was installed using the
debian package management system - it doesn't look like a config.log was
kept ... Is there a way to check this on debian like systems?
Check that the PATH you have in rancid.conf contains sendmail, which is
sourced by rancid-run and hence inherit by control_rancid.

Jethro.
Post by Traiano Welcome
Post by Ryan West
Can you check your config.log and compare to your which for sendmail, sounds like they might not match up.
-ryan
-----Original Message-----
Sent: Thursday, September 17, 2009 9:31 AM
To: Ryan West
Subject: Re: [rancid] RANCID Log Messages: "sendmail: not found" with no mailed diffs
Hi Ryan
Post by Ryan West
Traiano,
The software is attempting to send you the diffs, but it seems you've removed sendmail.
That was also my first suspicion, but I've checked that I can still use
sendmail on my server ( "| sendmail -t" as is used in the control_rancid
script). Also, I snipped a bit out of control_rancid that actually sends
the diff and tested that it sends mail, for example, this bit works if
---
#!/bin/sh
echo "Subject: no /usr/lib/rancid/router.db file"
echo "Precedence: bulk"
echo ""
echo "router.db does not exist."
) | sendmail -t
---
These are the details of sendmail on my box (it's actually a wrapper
---
/usr/sbin/sendmail
/usr/sbin/sendmail: symbolic link to `exim4'
---
Hmmm, I'm at a loss.
Traiano
Post by Ryan West
It might be easiest to just go back into the rancid source directory, check your config.log and see how you ran the configure script and re-run it. Then 'make install' and it should use whatever new program you're using now.
-ryan
-----Original Message-----
Sent: Thursday, September 17, 2009 4:05 AM
Subject: [rancid] RANCID Log Messages: "sendmail: not found" with no mailed diffs
Hi List
I've been getting the following log messages in my rancid logs recently,
---
/usr/lib/rancid/bin/control_rancid: 397: sendmail: not found
---
What might the cause of these messages be? As far as I can tell, it
looks like control_rancid is not finding any diffs to mail when called,
even though running "cvs log <filename>" shows the most recent committed
changes correctly.
Thanks,
Traiano
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK
Traiano Welcome
2009-09-17 14:46:27 UTC
Permalink
Hi Jethro
Post by Jethro R Binks
Post by Traiano Welcome
I'm using Ubuntu based on lenn/sid, so this was installed using the
debian package management system - it doesn't look like a config.log was
kept ... Is there a way to check this on debian like systems?
Check that the PATH you have in rancid.conf contains sendmail, which is
sourced by rancid-run and hence inherit by control_rancid.
Jethro.
This is what's in rancid.conf

---
% grep PATH /etc/rancid/rancid.conf
PATH=/usr/lib/rancid/bin:/usr/bin:/bin:/usr/local/bin; export PATH
---

It looks like the path to sendmail is in the shell environment as well:

---
% env | grep PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
---
Post by Jethro R Binks
Post by Traiano Welcome
Post by Ryan West
Can you check your config.log and compare to your which for sendmail, sounds like they might not match up.
-ryan
-----Original Message-----
Sent: Thursday, September 17, 2009 9:31 AM
To: Ryan West
Subject: Re: [rancid] RANCID Log Messages: "sendmail: not found" with no mailed diffs
Hi Ryan
Post by Ryan West
Traiano,
The software is attempting to send you the diffs, but it seems you've removed sendmail.
That was also my first suspicion, but I've checked that I can still use
sendmail on my server ( "| sendmail -t" as is used in the control_rancid
script). Also, I snipped a bit out of control_rancid that actually sends
the diff and tested that it sends mail, for example, this bit works if
---
#!/bin/sh
echo "Subject: no /usr/lib/rancid/router.db file"
echo "Precedence: bulk"
echo ""
echo "router.db does not exist."
) | sendmail -t
---
These are the details of sendmail on my box (it's actually a wrapper
---
/usr/sbin/sendmail
/usr/sbin/sendmail: symbolic link to `exim4'
---
Hmmm, I'm at a loss.
Traiano
Post by Ryan West
It might be easiest to just go back into the rancid source directory, check your config.log and see how you ran the configure script and re-run it. Then 'make install' and it should use whatever new program you're using now.
-ryan
-----Original Message-----
Sent: Thursday, September 17, 2009 4:05 AM
Subject: [rancid] RANCID Log Messages: "sendmail: not found" with no mailed diffs
Hi List
I've been getting the following log messages in my rancid logs recently,
---
/usr/lib/rancid/bin/control_rancid: 397: sendmail: not found
---
What might the cause of these messages be? As far as I can tell, it
looks like control_rancid is not finding any diffs to mail when called,
even though running "cvs log <filename>" shows the most recent committed
changes correctly.
Thanks,
Traiano
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Jethro R Binks
2009-09-17 15:05:40 UTC
Permalink
Post by Traiano Welcome
This is what's in rancid.conf
---
% grep PATH /etc/rancid/rancid.conf
PATH=/usr/lib/rancid/bin:/usr/bin:/bin:/usr/local/bin; export PATH
---
---
% env | grep PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
When I su to rancid and test using my script, I get a mail.
So it's a classic case of a cron job having a different environment to the
shell.
Post by Traiano Welcome
/usr/sbin/sendmail: symbolic link to `exim4'
You need to add "/usr/sbin" to the path in rancid.conf.

Jethro.
Post by Traiano Welcome
---
Post by Jethro R Binks
Post by Ryan West
Post by Ryan West
Can you check your config.log and compare to your which for sendmail,
sounds like they might not match up.
-ryan
-----Original Message-----
September 17, 2009 9:31 AM
To: Ryan West
Subject: Re: [rancid] RANCID Log Messages: "sendmail: not found" with no
mailed diffs
Hi Ryan
Post by Ryan West
Traiano,
The software is attempting to send you the diffs, but it seems you've
removed sendmail.
That was also my first suspicion, but I've checked that I can still use
sendmail on my server ( "| sendmail -t" as is used in the control_rancid
script). Also, I snipped a bit out of control_rancid that actually sends
the diff and tested that it sends mail, for example, this bit works if
---
#!/bin/sh
echo "Subject: no /usr/lib/rancid/router.db file"
echo "Precedence: bulk"
echo ""
echo "router.db does not exist."
) | sendmail -t
---
These are the details of sendmail on my box (it's actually a wrapper
---
/usr/sbin/sendmail
/usr/sbin/sendmail: symbolic link to `exim4'
---
Hmmm, I'm at a loss.
Traiano
Post by Ryan West
It might be easiest to just go back into the rancid source directory,
check your config.log and see how you ran the configure script and
re-run it. Then 'make install' and it should use whatever new program
you're using now.
-ryan
-----Original Message-----
Welcome
Sent: Thursday, September 17, 2009 4:05 AM
Subject: [rancid] RANCID Log Messages: "sendmail: not found" with no
mailed diffs
Hi List
I've been getting the following log messages in my rancid logs
recently, along with no emailed diffs (although the cvs updates are
---
/usr/lib/rancid/bin/control_rancid: 397: sendmail: not found
---
What might the cause of these messages be? As far as I can tell, it
looks like control_rancid is not finding any diffs to mail when
called, even though running "cvs log <filename>" shows the most recent
committed changes correctly.
Thanks,
Traiano
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK
Traiano Welcome
2009-09-18 09:12:42 UTC
Permalink
Post by Jethro R Binks
Post by Traiano Welcome
This is what's in rancid.conf
---
% grep PATH /etc/rancid/rancid.conf
PATH=/usr/lib/rancid/bin:/usr/bin:/bin:/usr/local/bin; export PATH
---
---
% env | grep PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
When I su to rancid and test using my script, I get a mail.
So it's a classic case of a cron job having a different environment to the
shell.
*ahem* :-) Yes. Thanks, time to institute change control ...
Post by Jethro R Binks
Post by Traiano Welcome
/usr/sbin/sendmail: symbolic link to `exim4'
You need to add "/usr/sbin" to the path in rancid.conf.
Jethro.
Post by Traiano Welcome
---
Post by Jethro R Binks
Post by Ryan West
Post by Ryan West
Can you check your config.log and compare to your which for sendmail,
sounds like they might not match up.
-ryan
-----Original Message-----
September 17, 2009 9:31 AM
To: Ryan West
Subject: Re: [rancid] RANCID Log Messages: "sendmail: not found" with no
mailed diffs
Hi Ryan
Post by Ryan West
Traiano,
The software is attempting to send you the diffs, but it seems you've
removed sendmail.
That was also my first suspicion, but I've checked that I can still use
sendmail on my server ( "| sendmail -t" as is used in the control_rancid
script). Also, I snipped a bit out of control_rancid that actually sends
the diff and tested that it sends mail, for example, this bit works if
---
#!/bin/sh
echo "Subject: no /usr/lib/rancid/router.db file"
echo "Precedence: bulk"
echo ""
echo "router.db does not exist."
) | sendmail -t
---
These are the details of sendmail on my box (it's actually a wrapper
---
/usr/sbin/sendmail
/usr/sbin/sendmail: symbolic link to `exim4'
---
Hmmm, I'm at a loss.
Traiano
Post by Ryan West
It might be easiest to just go back into the rancid source directory,
check your config.log and see how you ran the configure script and
re-run it. Then 'make install' and it should use whatever new program
you're using now.
-ryan
-----Original Message-----
Welcome
Sent: Thursday, September 17, 2009 4:05 AM
Subject: [rancid] RANCID Log Messages: "sendmail: not found" with no mailed diffs
Hi List
I've been getting the following log messages in my rancid logs
recently, along with no emailed diffs (although the cvs updates are
---
/usr/lib/rancid/bin/control_rancid: 397: sendmail: not found
---
What might the cause of these messages be? As far as I can tell, it
looks like control_rancid is not finding any diffs to mail when
called, even though running "cvs log <filename>" shows the most recent
committed changes correctly.
Thanks,
Traiano
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Ron Whitney
2009-09-17 14:10:32 UTC
Permalink
Post by Traiano Welcome
That was also my first suspicion, but I've checked that I can
still use sendmail on my server ( "| sendmail -t" as is used in the
control_rancid script).
Can you still use sendmail when logged in as the rancid user? IOW,
could this be a path/permissions issue? Just a thought.
Traiano Welcome
2009-09-17 14:27:52 UTC
Permalink
Hi Ron
Post by Ron Whitney
Post by Traiano Welcome
That was also my first suspicion, but I've checked that I can
still use sendmail on my server ( "| sendmail -t" as is used in the
control_rancid script).
Can you still use sendmail when logged in as the rancid user? IOW,
could this be a path/permissions issue? Just a thought.
I've tested this bit as well, it doesn't look like a paths/permissions
issue. When I su to rancid and test using my script, I get a mail.
Here's the output of the sendmail wrapper when called by the rancid user:

---
% id
uid=1007(rancid) gid=1007(rancid) groups=1007(rancid)

% which sendmail
/usr/sbin/sendmail

% sendmail
Exim is a Mail Transfer Agent. It is normally called by Mail User Agents,
not directly from a shell command line. Options and/or arguments control
what it does when called. For a list of options, see the Exim documentation.

% pwd
/var/lib/rancid
%
---
Ron Whitney
2009-09-17 14:57:56 UTC
Permalink
Post by Traiano Welcome
PATH=/usr/lib/rancid/bin:/usr/bin:/bin:/usr/local/bin; export PATH
Loading...