enormous inbox

Damien Cassou damien at cassou.me
Mon Oct 23 18:01:58 UTC 2017


Sandra Snan <sandra.snan at idiomdrottning.org> writes:
> But, just to clarify, as I try to understand these shell scripts:
>
> 1. Do you run these on the mail server or on the client computer?


I manually run backup_mails.sh once every year on my laptop. This script
calls backup_1_mail.sh for each email not yet archived that is from the
year passed as parameter. backup_1_mail.sh moves each mail from
Mail/ServerX/* to Mail/archives/ServerX/*. Offlineimap is configured to
synchronize Mail/ServerX and does not know anything about
Mail/archives. As a result, each mail moved by backup_1_mail.sh is
considered deleted by offlineimap.

After backup_mails.sh has finished, the next run to offlineimap will
delete old emails from the server automatically (because they
disappeared from the local replica).

> 2. Do you have notmuch set up on both?


I don't control the server at all. Everything is local. As a result,
notmuch only exists on my laptop. Notmuch is only used to get a list of
old emails. When I was using mu4e, I was doing exactly the same thing
with nearly the same command:

    mu find date:"$year/01/01..$year/12/31" --exec="backup_1_mail.sh $year"


> 3. How do you prevent collisions, i.e. your notmuch scripts on the
>    server running at the same time as offlineimap is accessing the
>    maildirs remotely?


I don't run offlineimap while my backup scripts run.


> This does sound like the way to go for me. I can just go into the
> maildirs that dovecot has for me on the server, and clean it up there.


or do it locally and let offlineimap synchronize. I believe that's much
simpler.

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



More information about the OfflineIMAP-project mailing list