Bug 5043 - RFE: Email status on completion of sa-update run
Summary: RFE: Email status on completion of sa-update run
Status: RESOLVED WONTFIX
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: sa-update (show other bugs)
Version: unspecified
Hardware: All All
: P5 enhancement
Target Milestone: 3.3.0
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-11 16:21 UTC by DAve Goodrich
Modified: 2010-01-08 11:07 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description DAve Goodrich 2006-08-11 16:21:05 UTC
A nice feature would be to have sa-update email a completion report after an
update run. Something as simple as

"channel <such&such> updated successfuly" 

"channel <such&such> failed, please rerun with debugging enabled for more
information" 

would suffice normally.
Comment 1 Theo Van Dinter 2006-08-11 16:59:08 UTC
This idea came up on the list, specifically w/ the suggestion of mailing the
report to the "report_contact" setting.  I'm against that idea, since
report_contact is a generic string which may or may not have an email address in
a  unknown context.  So the easy way to solve this would be for the proposed
optional --report parameter to take a list of email addrs, separated via commas
(so it can easily be put into the message's "To" field).

My other issue with this idea is related to having to have sa-update learn how
to send email.

Generally though, I like the idea and just need to think about the issue.  It
would definitely be useful in some environments to get something like:

Subject: sa-update report <timestamp>

Channel updates.spamassassin.org:
Previous version: 123456
Updated version : 123457
No failures, install successful.

Channel someotherplace.example.com:
Previous version: 4
Updated version : 12
Channel failed to update due to GPG signature failure.
Comment 2 Justin Mason 2006-08-11 17:18:41 UTC
can we assume that it's being run from cron?  if so, we can just print that to
STDOUT, and cron will take care of the mailing part.
Comment 3 Theo Van Dinter 2006-08-11 17:39:26 UTC
(In reply to comment #2)
> can we assume that it's being run from cron?  if so, we can just print that to
> STDOUT, and cron will take care of the mailing part.

Perhaps:

--report => send to stdout
--report email1,email2,... => send to email

?

cron is likely on *nix, but not Windows, etc.
Comment 4 Theo Van Dinter 2006-08-11 22:04:00 UTC
oh, I would assume that the STDOUT version would be more terse than the email
option, so that anyone manually running the script doesn't have to deal with a
huge amount of output.  maybe just one line per channel or something.
Comment 5 DAve Goodrich 2006-08-12 02:31:54 UTC
I generally put my cron type jobs inside wrappers and trap exit codes for other
purposes, like analyzing tables only if a dump succeeded, zipping logs if a
script did not fail, etc. So even on Unix STDOUT can't be counted on. I like the
idea of a --report option. I don't know what kind of issues that creates for
Windows installs though.

I do believe nothing more than my orignal proposal for report content would be
needed. If the response was eighty pages of verbose error text, I would still go
run "sa-update -D", wouldn't anyone else?
Comment 6 Justin Mason 2006-12-12 12:40:21 UTC
moving RFEs and low-priority stuff to 3.3.0 target
Comment 7 Mark Martinec 2010-01-08 11:07:00 UTC
I don't think this will happen, especially now that sa-update is
getting a --verbose option with SA 3.3.0 - as per comment 2, cron can
take care of mail delivery of the produced report.

Otherwise, a shell script wrapper can send an appropriate message based
on the exit status of sa-update. Configuring admin mail address and
selecting/implementing a mechanism to be used for submitting a mail message
is well outside of scope of a simple utility like sa-update.

Closing. Please reopen if someone thinks otherwise.