[Rt-commit] rt branch, 4.2/mail-sending, updated. rt-4.1.5-50-g063c596

Alex Vandiver alexmv at bestpractical.com
Wed Dec 19 14:29:56 EST 2012


The branch, 4.2/mail-sending has been updated
       via  063c596af84f921cd3d6dd8d88b9d148924aabe1 (commit)
       via  2f5cde31b5e5f8ec0c18a8ed47f5b535a3094c08 (commit)
      from  072bd5391ccc53ec41354c3eb691efcb3e29a7c6 (commit)

Summary of changes:
 docs/UPGRADING-4.2 | 2 +-
 lib/RT/Config.pm   | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 2f5cde31b5e5f8ec0c18a8ed47f5b535a3094c08
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Dec 19 14:25:15 2012 -0500

    Fall back to sendmailpipe on unknown $MailConfig settings
    
    This provides the most sane default that we can; if sendmail or
    equivalent is not installed, outgoing mail will trigger RT to records
    the "cannot send outgoing mail" transaction.

diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index eb844f5..831814b 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -596,9 +596,10 @@ our %META = (
         PostLoadCheck => sub {
             my $self = shift;
             my $value = $self->Get('MailCommand');
-            $RT::Logger->error("Unknown outgoing mail configuration: $value")
-                unless ref($value) eq "CODE"
-                    or $value =~/^(sendmail|sendmailpipe|qmail|testfile)$/;
+            return if ref($value) eq "CODE"
+                or $value =~/^(sendmail|sendmailpipe|qmail|testfile)$/;
+            $RT::Logger->error("Unknown outgoing mail configuration: $value; defaulting to sendmailpipe");
+            $self->Set( MailCommand => 'sendmailpipe' );
         },
     },
     MailPlugins  => { Type => 'ARRAY' },

commit 063c596af84f921cd3d6dd8d88b9d148924aabe1
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Dec 19 14:29:50 2012 -0500

    Update documentation to suggest the correct option

diff --git a/docs/UPGRADING-4.2 b/docs/UPGRADING-4.2
index cf22144..6a7fbae 100644
--- a/docs/UPGRADING-4.2
+++ b/docs/UPGRADING-4.2
@@ -24,5 +24,5 @@ UPGRADING FROM RT 4.0.0 and greater
   subclass.
 
 * The 'smtp' $MailCommand has been removed, as it did not guarantee
-  delivery.  Use a local MTA for outgoing mail, via the 'sendmail'
+  delivery.  Use a local MTA for outgoing mail, via the 'sendmailpipe'
   setting.

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


More information about the Rt-commit mailing list