Summary: | apcupsd sends mail with an error in the headers | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sylvain Demers <demerss> |
Component: | [OLD] Core system | Assignee: | Michael Imhof (RETIRED) <tantive> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | swtaylor |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Patch for my suggestions |
Description
Sylvain Demers
2003-11-01 08:36:39 UTC
Created attachment 20062 [details, diff]
Patch for my suggestions
Note: this is the first time I create a patch, so I'd like somebody to check
if
it's done ok first.
I made a directory called "old" with the original files and a "new" directory
with my modified files, the called "diff -u old new > apcupsd.patch".
I tried applying patches with "patch -p1 < apcupsd.patch" while in the
/etc/apcupsd directory, and it seems to work.
This patch removes the changes 'echo " "' to 'echo', adds a "To" line and
removes the -s switch to the sendmail command because Postfix doesn't like
it.
qmail will not even send any email when the -s "$MSG" is in the command line. Isn't that redundant anyway since the message itself contains the "Subject:" header? I'm all in favor of adding more complete headers too. Please! strip the -s "$MSG" from the scripts, and while you're at it, copy or symlink the /etc/apcupsd/onbattery to also run as /etc/apcupsd/powerout - apparently different models send different signals for a power failure. I checked in an corrected ebuild (the 3.10.6.ebuild one) with -the patch and with -ln -s onbattery powerout. Please check if everything is fine. Thanks! It peacefully coexists with qmail now. After several simulated power outages, I actually got one onbattery alert (the first one I've ever seen here) but it never missed the powerout alerts. This closes #30716 as well. Here's the scripts that actually got called. Getting an occasional extra email updating the status from powerout to onbattery is far better in my book than getting a mystery email that power has returned without having a power failure to match it up with... /etc/apcupsd/powerout BERTHOUD 1 0 /etc/apcupsd/mainsback BERTHOUD 1 0 /etc/apcupsd/powerout BERTHOUD 1 0 /etc/apcupsd/mainsback BERTHOUD 1 0 /etc/apcupsd/powerout BERTHOUD 1 0 /etc/apcupsd/onbattery BERTHOUD 1 0 /etc/apcupsd/mainsback BERTHOUD 1 0 I'm happy with that! Case closed as far as I'm concerned! Thanks! Good news for me :) I closes #30716 and will close this one now. Thanks for your testing. Feel free to report any other bugs you find within apcupsd. |