I'm configuring a IMAP server with Exim/Dovecot on a Debian machine serving multiple domains with distinct users. To active this I configured a router and a transport:
dovecot_router:
driver = accept
require_files = +/home/imap/${domain}/${local_part}/
transport = dovecot_transport
dovecot_transport:
driver = appendfile
user = imap
group = imap
mode = 0600
directory=/home/imap/${lc:$domain}/${lc:$local_part}/
maildir_format = true
mode_fail_narrower = false
envelope_to_add = true
return_path_add = true
This works well, if the path /home/imap/domain1/user1 exists, the maildir structure is created with the file-owner (and existing user) imap.
But: The complete path to /home/imap/domain1/user1 must be be readable for all system users (o+rx). If I remove this, I can test it
exim -bt user1@domain1
R: system_aliases for user1@domain1
user1@domain1
router = dovecot_router, transport = dovecot_transport
but while receiving mails via SMTP they get rejected: 2011-09-12 17:16:22 H=(test.local) [192.168.165.251] F=<me@domain2> rejected RCPT <user1@domain1>: Unrouteable address