mwolson: First attempt at delivering to AFS
[hcoop/zz_old/config/exim4-hopper.git] / conf.d / router / 900_exim4-config_local_user
index 423c729..ffa2b8e 100644 (file)
@@ -5,11 +5,14 @@
 # This router matches local user mailboxes. If the router fails, the error
 # message is "Unknown user".
 
 # This router matches local user mailboxes. If the router fails, the error
 # message is "Unknown user".
 
+# hcoop-change: acquire AFS token for the user
+
 local_user:
   debug_print = "R: local_user for $local_part@$domain"
   driver = accept
   domains = +local_domains
   check_local_user
   local_parts = ! root
 local_user:
   debug_print = "R: local_user for $local_part@$domain"
   driver = accept
   domains = +local_domains
   check_local_user
   local_parts = ! root
+  condition = ${run{/usr/bin/pagsh.openafs -c /etc/exim4/get-token ${local_part}}{1}{0}}
   transport = LOCAL_DELIVERY
   cannot_route_message = Unknown user
   transport = LOCAL_DELIVERY
   cannot_route_message = Unknown user