Re: [exim] Nhash and Imap

Top Page
Delete this message
Reply to this message
Author: W B Hacker
Date:  
To: exim users
Subject: Re: [exim] Nhash and Imap
Torsten wrote:
> Just to make at clear.
> I want exim to store mails like this:
> file = "/var/mail/${nhash_127:$local_part}/$local_part/INBOX"
> So if I understood it right, Exim builds a hash from "$localpart" and builds
> a directory structure like this:
> /var/mail/0/totty or /var/mail/127/bill


Not hard. Just an extra level to what is already done.

Exim writes where it is told to write - fixed or 'calculated'.

>
> How can the Imap daemon know where to find the maildir for Totty or Bill?
> Is there a buildin hash tool or something like that?


The IMAP daemon reads where it is told to read - fixed or 'calculated'.

Both can be driven 100% from a file, table, or DB, 100% 'calculated', or any mix
of the two that their respective variables and string-manip tools can stand.

(NB - Exim and Dovecot play very well together on that score - similar conventions).

All you need to do is insure that Exim and the IMAP daemon either use the same
'hard coded' record or parts thereof, and/or perform the same calculation.

Inserting hash or other functions is not greatly different from the use of
$local_part and $domain as 'variables'.

Note that w/r the use of a 'computed' location - hash or otherwise - neither has
to understand it - merely be assured of generating the same one.

Or NOT [1]

> I searched a lot, but I couldn`t get an answer how Courier, Cyrus or other
> MUA`s handle that directory structure.
>


Much the same as any other, really. It is just an added level in an
already-multi-level dirtree.

> Thanks
> Torsten
>


HTH,

Bill


[1] CAVEAT: Not a general-purpose recommendation.

We use SQL selects, and Exim & Dovecot *may* be set to see the storage
differently, as their records are synced by choice.

Or not.

This allows us to share incoming across departmental or functional lines,
(Helpdesk, NOC), transparantly alias, forward, duplicate, auto-respond,
sub-sort, quarantine, 'hand over' the correspondence history of a departing
staff member to their replacement, and selectively archive - all w/o touching
the Exim configure or re-HUp'ing.







>
>> Your IMAP daemon's docs are your starting point.
>>
>> 'basics' - so long as the folders are under the appropriate Maildir for a
>> given
>> user, with the same perms, AND the MUA is NOT limited to 'show subscribed
>> folders only' Dovecot, to name one, picks them up.
>>
>> Courier-IMAP is a little pickier about where they are (under INBOX) and
>> whether
>> they have a "." prefix.
>>
>> Bincimap, GW-IMAP, Cyrus, and others I haven't had hands-on for several
>> years.
>>
>> In all cases, just configure Exim to name and drop with whatever the IMAP
>> daemon
>> expects.
>>
>> HTH,
>>
>> Bill
>>
>> --
>> ## List details at http://www.exim.org/mailman/listinfo/exim-users
>> ## Exim details at http://www.exim.org/
>> ## Please use the Wiki with this list - http://www.exim.org/eximwiki/
>>
>
>