Recovering deleted mailbox

Narcis Garcia debianlists at actiu.net
Thu Apr 28 06:56:11 UTC 2022


__________
I'm using this dedicated address because personal addresses aren't 
masked enough at this mail public archive. Public archive administrator 
should fix this against automated addresses collectors.
El 28/4/22 a les 7:48, Aki Tuomi ha escrit:
> 
>> On 28/04/2022 08:33 Shawn Heisey <elyograg at elyograg.org> wrote:
>>
>>   
>> On 4/27/2022 11:27 PM, Aki Tuomi wrote:
>>> There is no reason to delete the dovecot files after recovery. You can run `doveadm force-resync` to ensure everything is synced. Removing the files just cause more problems than benefit usually.
>>
>> Thanks for that information!  Very helpful for future fiddling.
>>
>> Does that resync command also maybe force a full FTS reindex?  I'm using
>> fts_solr.  The way that I currently manage a full reindex is with the
>> following shell script:
>>
>> ---
>> #!/bin/sh
>> DOVECOT_SOLR_URL_BASE="http://localhost:8983/solr/dovecot"
>> MAIL_ROOT=/var/vmail
>>
>> # DO NOT MODIFY BELOW
>> # WITHOUT GOOD REASON
>> #
>> DEL_ALL_QUERY_XML="<delete><query>*:*</query></delete>"
>> service dovecot stop
>> curl \
>>     "${DOVECOT_SOLR_URL_BASE}/update?commit=true&optimize=true" \
>>     -H "Content-Type: text/xml" \
>>     --data-binary "${DEL_ALL_QUERY_XML}"
>> find ${MAIL_ROOT} -name "dovecot.*index*" -print0 | xargs -0 rm -f
>> service dovecot start
>> doveadm index -A -q '*'
>> ---
>>
>> -s
> 
> # drop fts data
> doveadm fts rescan -u user
> # rebuild index
> doveadm index -u user "*"
> 
> Aki

I took note of this:
# Repair
doveadm -v force-resync -u $User '*'
# Drop fts data
doveadm -v fts rescan -u $User
# Rebuild index
doveadm -v index -u $User '*'

But I'm not clear about $User it it's for my system "vmail" account that 
run Dovecot services, or it refers to mail account.
In first case, how to specify mail account or maildir tree to act to?

Thank you.


More information about the dovecot mailing list