Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to setup email notifications for my continuous integration server. I have a script which uses nail to send the email when the build works:

echo "Build Worked!" | nail -A myisp -s 'Build Success'

When I run this from the command line with sh build-worked, it works and I receive the email. However, when I start the continuous integration server which executes the same script, I get the following error:

nail: /opt/bitnami/common/lib/ no version information available (required by nail)
nail: /opt/bitnami/common/lib/ no version information available (required by nail)
Error with certificate at depth: 0
 issuer = /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/
 subject = /C=US/ST=California/L=Mountain View/O=Google Inc/
 err 20: unable to get local issuer certificate
Continue (y/n)? could not initiate SSL/TLS connection: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
. . . message not sent.

I must be messing some configuration, any ideas?

share|improve this question
I've never used nail before but I'd use 'su - ' to become the user that the script runs as and then debug from there. It may be that on the first interactive run it'll ask you to confirm that the ssl certificate is correct and then it'll run ok scripted. – kaerast Apr 10 '10 at 16:58
up vote 1 down vote accepted

Problems where something runs from the shell but won't from cron or init or daemon or some other environment are usually caused by differences in the environment.

  • Use absolute paths to executables and data files
  • Explicitly set your PATH variable to make sure it includes what you need
  • Explicitly set other environment variables that your process needs

Since it looks like nail is complaining about some libraries, it's likely that an environment variable points one way in one environment and another (or not at all) in another.

I'm not familiar with BitNami, but on my system those libraries are in /lib and /usr/lib (and /lib/i586 and similar).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.