mathog
2011-Sep-07 23:39 UTC
[Dovecot] copy and empty userA folder1, append to /var/mail/userB
Dovecot 2.0.13 on a 64 bit linux. We have an archiver account on one machine. Most mailing lists that handles go directly to it and everything is fine. However, there is one campus list that will only send to real people. So for that one I subscribed. When one of these messages comes in, which is 1-2x per week, I copy it to an export folder and then manually run a script which does: cat ~me/mail/export >>/var/mail/archiver echo "" > ~me/mail/export That worked fine on our last system, but dovecot doesn't like it. It leaves the imap indices for the export mailbox in an inconsistent state, so that roundcube (through dovecot) refuses to drop messages into it. The error message roundcube emits is: ServerError: Mailbox isn't a valid mbox file. Presumably the second half is from dovecot. I need a supported way to go about this, so that the next time one comes in I can copy to that folder again. The export mailbox is always completely emptied. It would suffice if there was some way to force dovecot to create "empty"" .imap/export: dovecot.index.cache dovecot.index.log files. Note this isn't a problem for the archiver itself, since it doesn't have any imap indexed files. Suggestions? Thank you, David Mathog mathog at caltech.edu Manager, Sequence Analysis Facility, Biology Division, Caltech
Timo Sirainen
2011-Sep-08 07:24 UTC
[Dovecot] copy and empty userA folder1, append to /var/mail/userB
On Wed, 2011-09-07 at 16:39 -0700, mathog wrote:> Dovecot 2.0.13 on a 64 bit linux. > > echo "" > ~me/mail/export > > That worked fine on our last system, but dovecot doesn't like it. It > leaves the imap indices for the > export mailbox in an inconsistent state, so that roundcube (through > dovecot) refuses to drop > messages into it. The error message roundcube emits is: > > ServerError: Mailbox isn't a valid mbox file.You change the "export" mbox to be one byte size containing LF. It should instead be completely zero size. For example echo -n > ~me/mail/export Alternative could be to simply rm it?
Seemingly Similar Threads
- mdadm --readonly which device in halt?
- upgrade broke XP workstation logins, variably
- netlogon initially fails after moving samba server to new machine.
- Re: netlogon initially fails after moving samba server to new machine.
- fixed delay logging onto Samba3.3 from Vista Business