[afnog] exim cannot chdir to Maildir when with userdb

Fisayo Adeleke fisayo at exnesys.com
Sat Jul 15 10:28:20 EAT 2006


Quoting Brian Candler <B.Candler at pobox.com>:

> On Fri, Jul 14, 2006 at 06:01:01PM +0100, Fisayo Adeleke wrote:
>> I created a test
>> 'configure' for exim and used the -C option to test delivery but I 
>> keep getting
>> an error message that exim cannot chdir to Maildir
>
> Also, show us your 'courier' router and 'local_delivery_courier' transport.

Below is my 'courier' router and 'local_delivery_courier' transport

#courier router
authdaemon_lookup:
driver = manualroute
route_data =
domains = lsearch;/usr/exim/virtualdoms
address_data = ${sg{${readsocket{/var/spool/authdaemon/socket}{PRE . exim
$local_part@$domain\n}}}{([^=]+)=([^\n]+)\n}{\$1="\$2" }}
# note the space between "\$2" and }}

courier:
driver = accept
transport = local_delivery_courier
domains = lsearch;/usr/exim/virtualdoms
condition = ${extract{HOME}{$address_data}{1}{0}}

courier_bounce:
driver = redirect
domains = lsearch;/usr/exim/virtualdoms
data = ${if match{$address_data}{FAIL}{:fail:unknown user}fail}
allow_fail
fail_verify

# Transport for courier
local_delivery_courier:
driver = appendfile
directory =
${extract{HOME}{$address_data}}/${extract{MAILDIR}{$address_data}{$value}{Maildir}}/
maildir_format
maildir_use_size_file
delivery_date_add
envelope_to_add
return_path_add
#  user = exim
#  group = exim
maildir_tag = ,S=$message_size
quota_size_regex = ,S=(\d+)
quota = ${if match {${extract{QUOTA}{$address_data}}}{([0-9]+)S}{$1}{}}
quota_filecount = ${if match
{${extract{QUOTA}{$address_data}}}{([0-9]+)C}{$1}{}}
quota_warn_threshold = 85%

>
> Is exim setuid root? (e.g. ls -l /usr/exim/bin/exim-4.xx). If so, it can
> change to whatever uid it likes when delivering mail, so it's important that
> your router and transport are correct.

[root at spider exim]# ls -l /usr/exim/bin/exim-4.62-5
-rwsr-xr-x    1 root     normal        696646 Jul 27 10:50
/usr/exim/bin/exim-4.62-5

-Fisayo
>
> Regards,
>
> Brian.
>






More information about the afnog mailing list