[Rt-commit] rt branch, 4.0/digests-no-mail-on-success, created. rt-4.0.12-12-g96bc1ce

Alex Vandiver alexmv at bestpractical.com
Mon May 13 15:33:09 EDT 2013


The branch, 4.0/digests-no-mail-on-success has been created
        at  96bc1cebe3836ab63559df01dfba3612cdb4b1de (commit)

- Log -----------------------------------------------------------------
commit 96bc1cebe3836ab63559df01dfba3612cdb4b1de
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon May 13 15:31:13 2013 -0400

    Remove STDOUT output for successfully sent digests
    
    Most commonly, digests are sent from cron jobs, where any output to
    STDOUT is sent to the administrator.  Printing on every successfully
    sent digest will thus lead to the administrator getting sent daily mail
    which is essentially content-less.  This might lead them to redirect the
    output to /dev/null, which would cause them to be ignorant when sending
    messages _failed_.
    
    Restrict output to STDOUT to only when messages failed to send.

diff --git a/sbin/rt-email-digest.in b/sbin/rt-email-digest.in
index 68f0b4c..cb6bd1b 100644
--- a/sbin/rt-email-digest.in
+++ b/sbin/rt-email-digest.in
@@ -134,7 +134,6 @@ sub run {
         my ( $contents_list, $contents_body ) = build_digest_for_user( $user, $all_digest->{$user} );
         # Now we have a content head and a content body.  We can send a message.
         if ( send_digest( $user, $contents_list, $contents_body ) ) {
-            print "Sent message to $user\n";
             mark_transactions_sent( $frequency, $user, values %{$sent_transactions->{$user}} ) unless ($print);
         } else {
             print "Failed to send message to $user\n";

-----------------------------------------------------------------------


More information about the Rt-commit mailing list