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