Re: [Exim] /var/mail/b/a/bar mailbox with exim

Etusivu
Poista viesti
Vastaa
Lähettäjä: Sheldon Hearn
Päiväys:  
Vastaanottaja: Yann Golanski
Kopio: AINA ALAIN PATRICK, exim-users
Aihe: Re: [Exim] /var/mail/b/a/bar mailbox with exim

On Tue, 22 May 2001 13:14:52 +0100, Yann Golanski wrote:

> On Tue, May 22, 2001 at 01:05:03PM +0000, AINA ALAIN PATRICK quothed:
> > How can i configure exim to deliver local mails to a /var/mail/b/a/bar
> > mailbox ?
>
> RTFM: www.exim.org


I don't think that response was useful. This question doesn't seem
to be answered in the FAQ and it takes a bit of putting two and two
together to figure out. This is VERY hard to search for in the mailing
list archives if you don't already know the answer.

Although nhash certainly tends to distribute mailboxes evenly across
subdirectories, people usually ask this question because they need this
behaviour to interoperate with other applications. Also, the proposed
splitting scheme has the advantage of being easy for humans to use.

The answer, for the benefit of the original poster, is that you replace
what you usually have under the local_delivery transport

file = /var/mail/${local_part}

with this

  # Store fishybob's mail as /var/mail/f/i/fishybob
  #
  file = \
    /var/mail/${length_1:$local_part}/${substr_1_1:$local_part}/${local_part}


or this (more common in other applications, such as POP3 servers)

  # Store fishybob's mail as /var/mail/f/fi/fishybob:
  #
  file = \
    /var/mail/${length_1:$local_part}/${length_2:$local_part}/${local_part}


The Exim User Guide explains the length and substr expansion items in
detail.

Ciao,
Sheldon.