mwolson: Mail delivery works now. Yay!
[hcoop/zz_old/config/exim4-hopper.git] / get-token
CommitLineData
8f42d430 1#!/bin/bash
cf08a29f 2# Get an AFS token for the given user.
3#
4# This is used to deliver mail with the appropriate credentials.
5
5092a970 6touch /tmp/get-token-was-called
7
8exec 2>&1
9exec >& /tmp/get-token-log
10
11echo ==============================================================================
12echo invoked: get-token $@
13echo userid: `who am i`
14
8f42d430 15USER=$1
16export KRB5CCNAME=FILE:/tmp/krb5cc_$USER.email
17kdestroy
18unlog
cf08a29f 19
5092a970 20KEYTAB=/etc/keytabs/email/$USER.email.keytab
21echo kinit -kt $KEYTAB $USER/mailfilter@HCOOP.NET
22kinit -kt $KEYTAB $USER/mailfilter@HCOOP.NET
23aklog
24tokens
25echo ..............................................................................
26