Results 1 to 2 of 2

Thread: nut can't use mailutils "mail" command

  1. #1
    Join Date
    Aug 2007
    Location
    Hasselt, Belgium
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    nut can't use mailutils "mail" command

    Hi guys,

    So I installed and configured nut. used the help of 2 tutorials,
    http://keystoneit.wordpress.com/2006...nut-on-ubuntu/
    http://blog.mansonthomas.com/2008/10...tu-server.html
    But I got most of just reading the comments in the /etc/nut configfiles and modifying them as described there (tut's where slightly outdated) .

    So I pull out the plug and nothing happens. The script I invoke with the nut user returns a execute error 127 (shows in daemon.log). So I execute the command (with argument) as my user, and that works. when executing it as the nut user I get.
    Code:
    Cannot open `/root/.mailrc': Permission denied
    This because I invoke a mail command by the script.
    Code:
    echo "Spanning is weg! Da spel wordt hier afgesloten als de batterie plat is!" | /usr/bin/mail -s"UPS monitor" mutrax@localhost
    So My question is simple. How do I get nut mailing without to much risk? It'll probeably be something simple, but I don't want to grant evry troublesom thing admin rights.

    Anyway, If someone is intrested how I configured nut, I'll be glad to post it here.

    Regards,
    No matter how great your product is, if you don't throw time and money against it it's a sh#tt# system. ubuntu <-> apple <-> microsoft

  2. #2
    Join Date
    Aug 2007
    Location
    Hasselt, Belgium
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: nut can't use mailutils "mail" command

    Ok, I've shamefully fixed the problem...

    Typo in command script location of upssched.conf .

    Anyways, thanks for taking the time for reading.
    No matter how great your product is, if you don't throw time and money against it it's a sh#tt# system. ubuntu <-> apple <-> microsoft

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •