source: trunk/debathena/config/msmtp-config/debian/debathena-msmtp @ 22902

Revision 22902, 608 bytes checked in by tabbott, 16 years ago (diff)
Trivial fix to new debathena-msmtp-config package.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2if [ -z "$DEBATHENA_SENDMAIL_AUTH" ]; then
3    if klist -s 2>/dev/null; then
4        DEBATHENA_SENDMAIL_AUTH=yes
5    fi
6fi
7if [ "$DEBATHENA_SENDMAIL_AUTH" = "yes" ]; then
8    kuser=$(klist 2>/dev/null | sed -n 's/^Default principal: \(.*\)@ATHENA\.MIT\.EDU/\1/ p')
9    if [ -z "$kuser" ]; then
10        echo "Could not find valid ATHENA.MIT.EDU Kerberos tickets." >&2
11        exit 1
12    fi
13    exec msmtp --host=outgoing.mit.edu --port=587 --auth=gssapi --user="$kuser" --auto-from=on --maildomain=mit.edu "$@"
14else
15    exec msmtp --host=outgoing.mit.edu --port=25 --auth=off --auto-from=on --maildomain=mit.edu "$@"
16fi
Note: See TracBrowser for help on using the repository browser.