Dovecot LDA with Exim ===================== System users ------------ Change the localuser router to use dovecot_delivery transport: ---%<------------------------------------------------------------------------- localuser: driver = accept check_local_user # local_part_suffix = +* : -* # local_part_suffix_optional transport = dovecot_delivery ---%<------------------------------------------------------------------------- 'check_local_user' is required. It makes Exim execute the transport with the user's UID and GID and it also sets HOME environment. Next create a new transport for Dovecot deliver: ---%<------------------------------------------------------------------------- dovecot_delivery: driver = pipe command = /usr/local/libexec/dovecot/deliver # use /usr/lib/dovecot/deliver if using Debian's package message_prefix = message_suffix = log_output delivery_date_add envelope_to_add return_path_add #group = mail #mode = 0660 temp_errors = 64 : 69 : 70: 71 : 72 : 73 : 74 : 75 : 78 ---%<------------------------------------------------------------------------- Deliver is now run using the local user's UID and GID. The mail is delivered to the location specified by [MailLocation.txt] setting. Note that the above configuration doesn't do any [UserDatabase.txt] lookups, so you can't have any per-user configuration. If you want that, see the virtual user setup below. Virtual users ------------- Make sure that 'check_local_user' isn't set in the router. Single UID ---------- Configure the transport to run as the user you want, for example vmail: ---%<------------------------------------------------------------------------- dovecot_virtual_delivery: driver = pipe command = /usr/local/libexec/dovecot/deliver -d $local_part@$domain -f $sender_address # v1.1+: command = /usr/local/libexec/dovecot/deliver -d $local_part@$domain -f $sender_address -a $original_local_part@$original_domain message_prefix = message_suffix = delivery_date_add envelope_to_add return_path_add log_output user = vmail temp_errors = 64 : 69 : 70: 71 : 72 : 73 : 74 : 75 : 78 ---%<------------------------------------------------------------------------- You'll also need to have a master authentication socket and give vmail user access to it. See for more information. List of temp_errors can be found in '/usr/include/sysexits.h'. Multiple UIDs ------------- If you need multiple uids/gids you'll need to set deliver setuid root. See the main page how to do this securely. You could alternatively set 'user = root', but this requires that you built Exim without root being in FIXED_NEVER_USERS list. (This file was created from the wiki on 2009-10-16 04:42)