Hi,

Bernd Kuhls wrote:
It managed to copy the contents of a mbox from /var/mail/$user to
/home/$user/.imap_mail/inbox, well done!

I have yet to conduct more testing

I did that now and I found another problem.

If /var/mail/$user does not exist, its created by Exim when
delivering a mail, the content of the file looks like this:

From [EMAIL PROTECTED] Sun Jun 10 22:00:16 2007
Return-path: <[EMAIL PROTECTED]>
Envelope-to: [EMAIL PROTECTED]
Delivery-date: Sun, 10 Jun 2007 22:00:16 +0200
Received: from withoutHELO (noIP)
        by localhost (Exim 4.63)
        id 1HxTa9-0005dE-0Q; Sun, 10 Jun 2007 22:00:13 +0200
To: [EMAIL PROTECTED]
Subject: test
Date: Sun, 10 Jun 2007 22:00:16 +0200

test
>

This mailbox is snarfed by Dovecot each time the Inbox is opened,
because the mail is not deleted from /var/mail$user, although Dovecot
successfully snarfed the mail to /home/$user/.imap_mail/inbox.
/home/$user is not overquota.

I found the reason for this, in contrast to the bevaviour described
above my first test was done with a /var/mail/$user mbox which had
an uw-imap style index, like this:

From MAILER_DAEMON  Sat Apr 21 19:48:13 2007
Date: Sat, 21 Apr 2007 19:48:13 +0200
From: Mail System Internal Data <[EMAIL PROTECTED]>
Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
Message-ID: <[EMAIL PROTECTED]>
X-IMAP: 1177169873 0000000082 NonJunk
Status: RO

This text is part of the internal format of your mail folder, and is not
a real message.  It is created automatically by the mail system software.
If deleted, important folder data will be lost, and it will be re-created
with the data reset to initial values.


After Exim delivered a mail to a file having this content, Dovecot
is able to snarf the mail to /home/$user/.imap_mail/inbox _and_
delete it from /var/mail/$user.

How to solve this problem? /var/mail is normally empty and only used
by Exim delivering mails when the user is overquota. I could use a
cronjob-script-solution to create mbox files with uw-imap indexes
for all users present on the system, but it would be an ugly hack.

Greetings, Bernd Kuhls

Reply via email to