[26609] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r25651 - trunk/debathena/config/msmtp-config/debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Fri Jul 20 18:52:28 2012

Date: Fri, 20 Jul 2012 18:52:26 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201207202252.q6KMqQDS010628@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2012-07-20 18:52:26 -0400 (Fri, 20 Jul 2012)
New Revision: 25651

Modified:
   trunk/debathena/config/msmtp-config/debian/changelog
   trunk/debathena/config/msmtp-config/debian/debathena-msmtp
   trunk/debathena/config/msmtp-config/debian/sendmail.8
Log:
In msmtp-config:
  * Send authenticated mail by default (Trac: #1140)


Modified: trunk/debathena/config/msmtp-config/debian/changelog
===================================================================
--- trunk/debathena/config/msmtp-config/debian/changelog	2012-07-20 21:25:51 UTC (rev 25650)
+++ trunk/debathena/config/msmtp-config/debian/changelog	2012-07-20 22:52:26 UTC (rev 25651)
@@ -1,8 +1,9 @@
-debathena-msmtp-config (1.9.1) UNRELEASED; urgency=low
+debathena-msmtp-config (1.9.1) unstable; urgency=low
 
   * Bump debian/compat to 6
+  * Send authenticated mail by default (Trac: #1140)
 
- -- Jonathan Reed <jdreed@mit.edu>  Sun, 01 Jul 2012 12:21:35 -0400
+ -- Jonathan Reed <jdreed@mit.edu>  Fri, 20 Jul 2012 18:34:03 -0400
 
 debathena-msmtp-config (1.9.0) unstable; urgency=low
 

Modified: trunk/debathena/config/msmtp-config/debian/debathena-msmtp
===================================================================
--- trunk/debathena/config/msmtp-config/debian/debathena-msmtp	2012-07-20 21:25:51 UTC (rev 25650)
+++ trunk/debathena/config/msmtp-config/debian/debathena-msmtp	2012-07-20 22:52:26 UTC (rev 25651)
@@ -15,7 +15,7 @@
 }
 
 my $kuser;
-my $want_auth = $ENV{'DEBATHENA_SENDMAIL_AUTH'} || '';
+my $want_auth = $ENV{'DEBATHENA_SENDMAIL_AUTH'} || 'yes';
 
 system(qw(klist -s));
 if (($? == 0) &&
@@ -42,6 +42,9 @@
 
 sub from_address {
   # If we have tickets, use them
+  if ($ENV{'DEBATHENA_SENDMAIL_FROM'}) {
+    return "--from=" . $ENV{'DEBATHENA_SENDMAIL_FROM'};
+  }
   if ($kuser) {
     return "--from=" . join('@', $kuser, 'mit.edu');
   }
@@ -68,12 +71,12 @@
     push @aliases, $parser->expand($arg);
 }
 
-if ($kuser && (($want_auth eq 'yes') || ($want_auth eq '')) ) {
+if ($kuser) {
     #send auth
     debug(qw{msmtp --host=outgoing.mit.edu --port=587 --auth=gssapi}, "--user=$kuser", from_address(), @aliases);
     exec(qw{msmtp --host=outgoing.mit.edu --port=587 --auth=gssapi}, "--user=$kuser", from_address(), @aliases);
 }
-elsif ($want_auth eq 'yes') {
+elsif ($want_auth ne 'fallback') {
     $! = 1;
     die "Could not find valid ATHENA.MIT.EDU Kerberos tickets.\n";
 }

Modified: trunk/debathena/config/msmtp-config/debian/sendmail.8
===================================================================
--- trunk/debathena/config/msmtp-config/debian/sendmail.8	2012-07-20 21:25:51 UTC (rev 25650)
+++ trunk/debathena/config/msmtp-config/debian/sendmail.8	2012-07-20 22:52:26 UTC (rev 25651)
@@ -8,13 +8,13 @@
 .SH DESCRIPTION
 .BR sendmail
 sends a message to one or more recipients.  Flags and addresses are
-passed to msmtp, which is invoked with the requisite options.  If
-possible, the message is sent authenticated, but will fall back to
-unauthenticated smtp.  Authentication can be forced by setting the
-variable \fIDEBATHENA_SENDMAIL_AUTH\fP to "yes".  If authentication is
-forced, but no valid Kerberos tickets can be found to authenticate the
-user, the script will exit with status 1.  See mstmp(1) for possible
-values for \fIflags\fP.
+passed to msmtp, which is invoked with the requisite options.  The
+message is sent authenticated, and will fail if tickets are not
+available.  Fallback to unauthenticated SMTP can be permitted by setting
+the variable \fIDEBATHENA_SENDMAIL_AUTH\fP to "fallback".  If
+authentication is forced, but no valid Kerberos tickets can be found to
+authenticate the user, the script will exit with status 1.  See mstmp(1)
+for possible values for \fIflags\fP.
 
 .SH BUGS
 
@@ -30,8 +30,13 @@
 \fIReturn-Path\fP will be set to the msmtp-constructed address, and
 thus you might miss bounces or other errors.  While you can specify
 \fIErrors-To:\fP, and most MTAs will honor it, it's discouraged (per
-RFC 2076).  So really, don't send mail with host tickets.
+RFC 2076).  You can force a Return-Path or From by setting the
+environment variable \fIDEBATHENA_SENDMAIL_FROM\fP.  The contents of the
+variable are passed verbatim.
 
+Really, this is not an MTA.  In the time it took you to read this
+section, you could have installed postfix or exim.  Just sayin'.
+
 .SH SEE ALSO
 
 msmtp(1)


home help back first fref pref prev next nref lref last post