+#!/bin/bash
# Get an AFS token for the given user.
#
# This is used to deliver mail with the appropriate credentials.
-KRB5CCNAME=FILE:/tmp/krb5cc_$1.email
+USER=$1
+export KRB5CCNAME=FILE:/tmp/krb5cc_$USER.email
+kdestroy
+unlog
-kinit -kt /etc/keytabs/$1.email.keytab
-aklog
+#echo kinit -kt /etc/keytabs/$USER.email.keytab $USER/mailfilter@HCOOP.NET > /tmp/script-log
+kinit -kt /etc/keytabs/$USER.email.keytab $USER/mailfilter@HCOOP.NET
+#aklog
+#tokens