dependency (S-nail) improperly configured

Bug #1877169 reported by Matt Klyn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apcupsd (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ubuntu 20.04:

If there is no mail/mailx command, then installing apcupsd will require to install s-nail, probably as a replacement of the former 'heirloom-mailx'. S-nail is a replacement for mail/mailx, with the same syntax. Installing s-nail only provides s-nail command though, and not the mail/mailx commands (as heirloom-mailx used to make) expected by apcupsd.

Steps:

1. Bug/proof: install apcupsd, unplug and replug APC. It does not send any email to root from root.

2. Fix: Of course you can always hack the and add some email commands in /etc/apcupsd/apccontrol but this is not correcting the bug at its root. To correct issue properly, simply issue

* sudo ln -s /usr/bin/s-nail /etc/alternatives/mailx (optionnal)
* sudo ln -s /etc/alternatives/mailx /usr/bin/mailx (optionnal)

* sudo ln -s /usr/bin/s-nail /etc/alternatives/mail
* sudo ln -s /etc/alternatives/mail /usr/bin/mail

try again to unplug and plug back UPS. You now get email messages for each events as it should w//o changing apccontrol file.

In clear, s-nail dependency is useless, unless we add the 2 simlinks. Only mail, not mailx is really needed (i guess this is because of the mail command in /etc/default/apcupsd) , but it's nice to have both mail/mailx anyway if installing s-nail. I'm not sure if this is a pure apcupsd issue, or s-nail issue. Those 2 links to mail and mailx are not done by s-nail itself, probably for a reason, so I suggest this is more a apcupsd install/config issue.

Regards -- mk

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.