trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: December 2015

Re: Re: imaping an existing kmail maild atabase

From: deloptes <deloptes@...>
Date: Thu, 03 Dec 2015 16:35:28 +0100
Gene Heskett wrote:

> On Thursday 03 December 2015 06:56:53 deloptes wrote:
> 
>> > How hard would it be to setup an imap server on this machine, that
>> > uses the existing email corpus database, /home/gene/Mail, and serves
>> > it to any other kmail agents running on my local network?
>>
>> I am using devecot imap on the server at home and access the mailbox
>> on that server from multiple clients. There is nothing special for
>> that.
>>
>> You have to tell dovecot where your mail is and in which format.
>> usually I would configure the server side mailbox aside from the home
>> directory.
>> You could use imap to copy your local mailbox data to the server dir
>> after you set it up once.
> 
> Thats quite a few gigabytes, and a duplication operation.

I would allocate a partition for mail in that case, but you'll save the same
amount of space in the user home.

> 
>> This is in /etc/dovecot/conf.d/10-mail.conf
>>
>> you can use anything like fetchmail to get mails to the mailbox and
>> serve it to all clients. If you have any other pop3 accounts. This is
>> what I would do. Thus you collect your mails in one mailbox and access
>> them via imap by any client.
> 
> Here, fetchmail hands off to procmail which delivers that which survives
> the spamassassin an clam inspections, and delivers it delivers to 1 of
> 3 /var/spool/mail/mailfiles.

all good so far - only regarding /var/spool/mail - this looks like local
mailbox in flat file format where you move the message using Kmail into
another mailbox and sub dir in maildir format

> 
> Me, a niece, and virii.  inotifywait sees the file closing, and if its me
> or the niece, sends kmail over the message buss flavor of the week, a
> get the mail message.  kmail goes and gets it, sorting it to the correct
> folder, so the incoming mail lands in foldername/cur.  And there are
> about 40 some foldernames.
> 
> One copy of the email corpus should be sufficient. Can dovecot be trained
> to go look in ~/Mail/*/cur?

(if it has Mail/*/cur - it is a maildir format - which is faster and good)

What I don't understand why would you do this. You would probably better
rework all of this and end up with a single maildir

        /var/spool/dovecot/<USERNAME>/Mail/

So in theory you could move your Mail dir to /var/spool/dovecot/<USERNAME>/
or point dovecot to your maildir.

I setup the template in exim to point to the users dovecot maildir, where it
gets served

        MAILDIR_HOME_MAILDIR_LOCATION = /var/spool/dovecot/$local_part/Mail

and this is it

I think however you are still mixing up the local Mail provided by Kmail
default and the one that is offered by imap server. It took me also a while
back then to get it.
With imap you won't have to keep a local copy of the mail and you have
option to create filters etc and manage the individual mails.

> 
>> I also had my mailbox set in the user home years ago and this was I
>> guess by default set by Kmail, but turned to be misleading.
>>
>> However the flexibility of all this is so big that there is surely a
>> way to get what you want or get it really wrong.
> 
> Its the really wrong that bothers me.

Well - this means make a backup and turn off your fetchers - play arround
and see what you'll get

> 
>> I hope this helps
>>
> Perhaps.  I'll install it and the docs and do some reading.
> 
> Does dovecot do a broadcast so that clients can find it, or is a complex
> kmail setup required at the client side?

The setup is really simple on Kmail client side - same/similar as pop3
account.

The challenge for me was to read all the exim/dovecot docs and bound all to
fit together. Since then it is a pleasure.

I hope this helps

regards