Re: [exim] maildir file creation mode depending on who the r…

Pàgina inicial
Delete this message
Reply to this message
Autor: Marc Sherman
Data:  
A: exim-users
Assumpte: Re: [exim] maildir file creation mode depending on who the recipient is ?
[Gary, please keep exim-related topics on the mailing list, so the first
person who replies to your questions isn't obligated to continue
supporting you.]

gary ng wrote:
> thanks, I just begin to look into exim and think your
> suggestion of seperate transport depending on the user
> should be the easiest and flexible. But the syntax of
> exim is all alien to me.
>
> How can I decide what transport to use based on the
> user name ? may be the easiest just just a flat file
> with each line containing the name that I want to be
> in shared mode and do a lookup(lsearch).


Yes, that's exactly what I'd recommend for a simple setup. I'm using a
heavily modified conf file, and I'm not 100% sure what the default confs
are like for your situation, so I'll leave it to someone else to suggest
exact syntax based on the default conf file. But basically, in your
local delivery router, you want to replace something like (warning,
untested, may be buggy or just plain wrong!):

transport = local_maildir

with

   transport = ${lookup{$local_part}lsearch{/etc/exim/shared}\
               {local_maildir_shared}{local_maildir}


and then create a local_maildir_shared transport that's identical to
your existing local_maildir transport, with the addition of

mode = 0640

- Marc