[Exim] setting home for filter transport doesn't work

Página Inicial
Delete this message
Reply to this message
Autor: Sven Huster
Data:  
Para: exim-users
Assunto: [Exim] setting home for filter transport doesn't work
hi there,

i now switched from postfix to exim-4 for you site
it's great and integrated happily with you mysql db
as well as our ldap server.

but i still got one problem.
there are only virtual users on the server. Each
one has a "homedir" like
/var/customer/mail/${domain}/'md5 hashed data'/user@???

within this homedir there is one folder 'Maildir',
which i use for mail delivery.

exim get's the dir from the db is quite easily delivers mail
to the Maildir.

now i wanted to use exim's filter ability to filter mail to different
imap folder, which i use with courier-imap.

i don't want to specify the hole path to the Maildir in the
filter file, so i tried to set homedir for the transport and then
use $home in the filter but this does not work.
exim always tries to create the dir '/Maildir/'.

any suggestions?
at the end you find my config for the router, transport, a sample
filter file and the log entry.

thanks
kind regards
sven

## Router
userforward:
driver = redirect
condition = ${lookup mysql{select mail from user where mail = '$local_part@$domain'}{1}{0}}
allow_filter
file = ${lookup mysql{select concat(homedir,'/.filter') from user where mail='$local_part@$domain'}{$value}fail}
no_verify
no_expn
check_ancestor
user = vmail
ignore_enotdir = true
ignore_eacces = true
directory_transport = address_directory

## Transport
address_directory:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add
maildir_format = true
maildir_tag = ,S=$message_size
quota_size_regex = S=(\d+)
user = vmail
mode = 0660
create_directory = true
directory_mode = 0750
quota = ${lookup mysql{select 0+substring_index(quota,',',1) from user where mail ='$local_part@$domain'}{$value}{0}}
quota_filecount = ${lookup mysql{select 0+substring_index(quota,',',-1) from user where mail ='$local_part@$domain'}{$value}{0}}
home_directory = ${lookup mysql{select homedir from user where mail='$local_part@$domain'}{$value}fail}


## filter file
# Exim filter

if error_message then finish endif
save $home/Maildir/

## log
2002-03-18 11:04:09 /Maildir/ <shu@???> R=userforward T=address_directory defer (13): Permission denied: cannot create /Maildir/