kdave / btrfsmaintenance

Scripts for btrfs maintenance tasks like periodic scrub, balance, trim or defrag on selected mountpoints or directories.
GNU General Public License v2.0
900 stars 79 forks source link

Add support for custom MAILTO #32

Closed quirxmode closed 6 years ago

quirxmode commented 7 years ago

Output of the jobs is mailed to root@localhost per default. It would be nice if one could specify an email address where the output of the jobs is to be sent.

ian-kelling commented 7 years ago

System cronjobs do not typically support that. The standard way to do this is to redirect mail to root@localhost to somewhere else through various supported standard means, such as /etc/aliases .forward file, sieve rules, etc. IMO, close this bug as won't fix, or github has no bug status I guess, so just close and do nothing.

kdave commented 6 years ago

Thanks for the insights, I'm not against adding a mail reporting capability. Currently there's at BTRFS_LOG_OUTPUT with various output targets, which is quite simple to configure. Adding a mail target would require to add an external template, so the output has at least timestamp, hostname and descriptive subject. And maybe this would also require multiple target specification, because the logs should be also stored on the machine itself.

kdave commented 6 years ago

An alternate way for this feature is available, there's not enough interest to implemet that inside this project. Closing.

MartinX3 commented 1 year ago

An alternate way for this feature is available, there's not enough interest to implemet that inside this project. Closing.

Which alternate way? I'm glad if I find a ways to report btrfs raid, checksum, etc errors to an email via s-nail (mail), msmtp or msmtp-mta (sendmail alias).