Gordon Tyler wrote:
Marc Perkel wrote:
I'm using Exim for my MTA. I set up a trick to deliver directly to IMAP folders by using a "-" to separate the name from the folder.
user-folder@domain.com
This delivers to user@domain.com and puts it in the IMAP "folder" for that user. The folder has to already exists for this to work. It's very popular with my users too because it's like each folder has it's own email address.
I'd be interested to know how you configured Exim to do this? I use Exim with Maildrop as LDA.
Ciao, Gordon
Gordon, A lot of this is specific to my setup. But Exim is addaptable to any setup. You'll have to recode it for your configuration.
Router:
################################################### # This router matches virtual local user imap folders. # Folders are addresses folder-name@domain
virtual_localuser_folder:
driver = accept
local_part_suffix=-*
condition = ${lookup {$local_part} lsearch {/etc/vmail/passwd.$domain}
{$value}}
domains = +virtual_local_domains
require_files = /etc/vmail/passwd.$domain:
/vhome/$domain/home/$local_part/${sg {$local_part_suffix}{-}{}}
retry_use_local_part
transport = virtual_local_folder_delivery
user = root
Transport:
virtual_local_folder_delivery: driver = appendfile allow_symlink create_directory delivery_date_add directory_mode = 600 envelope_to_add file = /vhome/$domain/home/$local_part/${sg {$local_part_suffix}{-}{}} group = mail mode = 600 return_path_add user = ${extract{2} {:} {${lookup {$local_part} lsearch {/etc/vmail/passwd.$domain} {$value}}}}