From 8f42d430290715104a6e38d0aabc07ac861fd2bf Mon Sep 17 00:00:00 2001 From: "root@deleuze.hcoop.net" <> Date: Sat, 17 Mar 2007 01:27:19 -0400 Subject: [PATCH] mwolson: Make progress on email delivery * 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 | 2 +- conf.d/router/550_exim4-get_token | 2 +- conf.d/transport/30_exim4-config_maildir_home | 7 +++++-- get-token | 12 +++++++++--- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/conf.d/main/01_exim4-config_listmacrosdefs b/conf.d/main/01_exim4-config_listmacrosdefs index c0e06d2..0a792ae 100644 --- a/conf.d/main/01_exim4-config_listmacrosdefs +++ b/conf.d/main/01_exim4-config_listmacrosdefs @@ -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 diff --git a/conf.d/router/550_exim4-get_token b/conf.d/router/550_exim4-get_token index aa05453..2bc47f4 100644 --- a/conf.d/router/550_exim4-get_token +++ b/conf.d/router/550_exim4-get_token @@ -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 diff --git a/conf.d/transport/30_exim4-config_maildir_home b/conf.d/transport/30_exim4-config_maildir_home index a872acc..dd48466 100644 --- a/conf.d/transport/30_exim4-config_maildir_home +++ b/conf.d/transport/30_exim4-config_maildir_home @@ -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 = / diff --git a/get-token b/get-token index 3000e7d..23c32c0 100755 --- 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 -- 2.20.1