broken mdboxes

2019-07-14 Thread Mike via dovecot
Hello,

I was forced to do an emergency server migration with about 3000
mailboxes and I botched it somewhat. Hoping to find some help here.

My symptoms are, users showing apparently deleted mail messages, some
replicated mail, and a time period of mail that is just 'missing'.

The source server is centos 6.10 with dovecot 2.2.5, and the destination
is ubuntu 16 / dovecot 2.2.22. User mailboxes are mdbox format and I did
an rsync from the old to the new. My screw up however was that my rsync
was not --delete files, and had to be run multiple times over the course
of a few weeks due to to bandwidth disparities and the sheer size of the
mail spool approaching 700GB (source server had 10mbps. Should have used
sneakernet instead). The bottom line however is that I wound up having
many extra m.* files in each user storage dir that were not actually
present on the source when the final, final sync was made and I went
live with the migration server.  I know this is my fsckup but now I have
to deal with it.

I first tried to fix the symptoms with a force-resync on the boxes not
realizing the above, and that seemed to make things worse by only
showing new mail as of the server migration date. Ugh.

New mail is being delivered and this does appear in user mail boxes. But
as I said, there seems to be some users with a problem with old mail
presumably deleted on the prior server suddenly re-appearing (probbly
due to the extraneous m.* mdbox files present). A more pressing problem
is that there is simply a time period of mail that is in user mailboxes
(on the old server) from before the migration, which is not displaying
now for these users on the new server.

I have investigated this and hacked on "mdbox-recover.pl" somewhat so
that it iterates over all mdbox files for a user and I can extract ALL
messages, and see that, yes, the mail really is present in the mdbox
files, but pop/imap never shows it. This is puzzling to me. I have a
test user that when I check imap, it shows only 21 message in inbox and
1 in sent. But if I extract the messages from the mdbox files, then I
actually have 1117 messages. 

I know I can't just rsync the source server again with the right
--delete flag, there has been lots of mail deliveries to the migrated
boxes and so I don't want to lose all of that and create yet more
problems. But I need to find some way to make these present mail
messages appear for my users again. Im thinking it's got to be a flag of
some kind since the data is there it's just ignored. Wondering what you
would reccomend?


Thanks.

Mike-



Re: broken mdboxes

2019-07-15 Thread Mike via dovecot
On 7/14/19 11:30 PM, Aki Tuomi via dovecot wrote:
>> Try with one mailbox first.
>>
>> Delete dovecot.index.map files and run force-resync.
>>
>> ---
>> Aki Tuomi
>
> Sorry I ment dovecot.map.index there



Hey, that seemed to work!


I'll need to do more testing because I still have those false mdbox
files in the directories that need to be cleared out but I have a
process for that too.


Thanks again!


Mike-



Listing expunged messages

2019-07-15 Thread Mike via dovecot

Hello,

	Following on my last question about broken mdboxes, removing 
dovecot.map.log and force-resync does work. My last problem now however 
is that after doing this, messages which were 'deleted' previously, come 
back in the inbox as new messages.


I have the original mailboxes and can subscribe to the expunged folders 
and everything in EXPUNGED/INBOX on the original, is appearing in INBOX 
on this migrated system. I would want to return everything to 
EXPUNDED/INBOX so my users don't see old dead resurrected messages. Is 
there a procedure to identify these?


Thanks.

Mike-


corrupt mdbox index / zero mails showing in imap

2019-07-25 Thread Mike via dovecot
Hi,


I have recently migrated (under emergency conditions) a dovecot imap/pop
based server to a new instance. The mailboxes used mdbox format and due
to various screwups I had corrupt indexes. I thought I'd cleaned this up
but then I found that this new instance hadn't been set up correctly for
nfs. Long story short, I still get users with new cases of corrupt
indexes. The symptom is imap either showing NO mail in their inbox, or,
not showing any recently delivered mail in the box, until I rm -f
dovecot.map.index / doveadm force-resync -u user.

It would be a huge help if there could be some method to detect if this
is the case for any given user and to proactively do the force-resync
process for them instead of waiting for that support call (or service
cancellation...). I have looked around and have not found any tool
capable of 'linting' an mdbox format inbox, and it seems like something
like this should have been or would be an extremely useful debugging
tool both during development as well as to troubleshoot stuff in the
field. I would love to know if anyone either has such a tool, or any
general suggestion how I could go about finding these cases and
addressing them. I believe I have the nfs issue resolved and will not be
creating new cases, so I just want to fix the ~3000 boxes I have now and
move forward.


Thank you.

Mike-



Re: Server administration

2019-09-01 Thread Mike via dovecot
On 9/1/19 5:41 AM, Aleksandr Mette via dovecot wrote:
>
> Dear Sirs,
>
>  
>
> There is Postfix+Dovecot+Sogo installation in our company.
>
>
> I have attentively red Installation and Configuration Guide.
>
> However, I could not find some information.
>
>  
>
> Could you give me an advise how to:
>
>  
>
> 1. Add/remove e-mail address
>
> 2. Change user e-mail address password
>
> 3. Add user e-mail address into mail alias
>
> 4. Forward e-mail
>
> 5. List all users e-mails
>
>
> What is the best GUI interface for Dovecot administration?
>


Hello,


    Have a look at iredmail (www.iredmail.org). Best server-in-a-box you
are going to find, and free. They do have an upgraded web interface if
you want to pay (worth it) and paid support, but for a single company,
this is your mail solution.

Mike-