Re: [exim] Using + to specify delivery folders in addresses

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Eli
Data:  
Para: exim-users
Asunto: Re: [exim] Using + to specify delivery folders in addresses
> and appended "${if eq {$local_part_suffix}{} {}{/.Public
> Folders.${substr_1:$local_part_suffix}}}" (without the quotes) to my
> directory option for the transport (right after the $local_part
> variable which forms part of the system path).


Just for anyone following this, I changed this part since it was allowing
Exim to create arbitrary IMAP folders based on the $local_part_suffix.

I ended up using this in place:

    directory = ${lookup mysql {SELECT ...}}/$local_part\
        ${if and {\
                {!eq {$local_part_suffix}{}}\
                {exists {${lookup mysql {SELECT
...}}/$local_part/.Public Folders.${substr_1:$local_part_suffix}}}\
            } {/.Public
Folders.${substr_1:$local_part_suffix}}{}\
        }


The "SELECT ..." lines return a base path for the user, for ex
"/mail/user.name". The exists test ensures that the path already exists
before trying to store mail there, otherwise it will just be dropped in to
the INBOX.

I'm still unsure about quoting/escaping the path...

(next on the list is modifying user verification routers so that path
suffixes that don't exist are rejected as bad addresses, rather than
accepted and delivered to the INBOX)

Eli.