[26729] in Source-Commits
Re: /svn/athena r25651 -
daemon@ATHENA.MIT.EDU (Jonathan Reed)
Wed Aug 8 10:27:49 2012
Date: Wed, 8 Aug 2012 10:27:46 -0400 (EDT)
From: Jonathan Reed <jdreed@MIT.EDU>
To: Jonathon Weiss <jweiss@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <201207232100.q6NL0lAR023789@outgoing.mit.edu>
Message-ID: <alpine.DEB.2.02.1208081027390.8697@INFINITE-LOOP.MIT.EDU>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Committed in r25714 and rebuilt into -dev
On Mon, 23 Jul 2012, Jonathon Weiss wrote:
>
> I'd recommend that the error message in the case of no tickets suggest
> "renew". I'd also nuke the manpage sentence about "If authentication is
> forced..." since it seems to mostly be covered by your new text above.
>
> Jonathon
>
>
> Jonathan D Reed <jdreed@MIT.EDU> wrote:
>
>> 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)
>>
>