mwolson: Make progress on email delivery
authorroot@deleuze.hcoop.net <>
Sat, 17 Mar 2007 05:27:19 +0000 (01:27 -0400)
committerroot <root@deleuze.hcoop.net>
Sat, 17 Mar 2007 05:27:19 +0000 (01:27 -0400)
* exim4/conf.d/main/01_exim4-config_listmacrosdefs
  (MAILDIR_HOME_MAILDIR_LOCATION): Don't include $local_part here, in
  case it gets expanded too early.

* exim4/conf.d/router/550_exim4-get_token (get_token): Simplify to not
  use pagsh.openafs.

* exim4/conf.d/transport/30_exim4-config_maildir_home (maildir_home): Add
  $local_part here.  Set current_directory to "/" to avoid chdir errors.

* exim4/get-token: Various changes by megacz.

* init.d/apache2 (NO_START): Changes by others.

conf.d/main/01_exim4-config_listmacrosdefs
conf.d/router/550_exim4-get_token
conf.d/transport/30_exim4-config_maildir_home
get-token

index c0e06d2..0a792ae 100644 (file)
@@ -155,4 +155,4 @@ MAIN_LOG_SELECTOR = +tls_cipher +tls_peerdn
 SYSTEM_ALIASES_FILE_TRANSPORT = address_file
 
 # hcoop-change: deliver mail to AFS
-MAILDIR_HOME_MAILDIR_LOCATION = /afs/hcoop.net/common/email/$local_part
+MAILDIR_HOME_MAILDIR_LOCATION = /afs/hcoop.net/common/email
index aa05453..2bc47f4 100644 (file)
@@ -5,7 +5,7 @@
 get_token:
   driver = accept
   domains = +local_domains
-  condition = ${run{/usr/bin/pagsh.openafs -c /etc/exim4/get-token ${local_part}}{0}{0}}
+  condition = ${run{/etc/exim4/get-token ${local_part}}{0}{0}}
   transport = dev_null
   no_verify
   no_expn
index a872acc..dd48466 100644 (file)
@@ -5,11 +5,12 @@
 # Use this instead of mail_spool if you want to to deliver to Maildir in
 # home-directory - change the definition of LOCAL_DELIVERY
 #
+# hcoop-change: Deliver to MAILDIR_HOME_MAILDIR_LOCATION/$local_part
 maildir_home:
   debug_print = "T: maildir_home for $local_part@$domain"
   driver = appendfile
   .ifdef MAILDIR_HOME_MAILDIR_LOCATION
-  directory = MAILDIR_HOME_MAILDIR_LOCATION
+  directory = MAILDIR_HOME_MAILDIR_LOCATION/$local_part
   .else
   directory = $home/Maildir
   .endif
@@ -38,4 +39,6 @@ maildir_home:
   # $home is not accessible, this chdir fails and prevents delivery.
   # If you are in a setup where home directories might not be
   # accessible, uncomment the current_directory line below.
-  # current_directory = /
+  #
+  # hcoop-change: uncommented this
+  current_directory = /
index 3000e7d..23c32c0 100755 (executable)
--- a/get-token
+++ b/get-token
@@ -1,8 +1,14 @@
+#!/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