-
Notifications
You must be signed in to change notification settings - Fork 0
Removing A Source
Sup doesn't have a command to remove a source, but you can effectively do so by carefully following the instructions below. These steps show how to remove a source by editing a sup internal file and then rebuilding the index from scratch. Open heart surgery ahead, steady hands only!
-
Quit any running instances of sup.
-
Back up your sup configuration directory, so when something goes wrong, you can try again.
$ cd ~ $ cp -r .sup .sup_backup
-
Go to the sup configuration directory in your home directory.
$ cd ~/.sup
-
Dump sup's index. This stores the state of all mails like labels and read status to a text file.
$ sup-dump > index-dump.txt
-
Delete sup's index.
$ rm -r xapian
-
Open the file
sources.yaml
in your favourite text editor, and delete all lines belonging to the source you want to remove. In this case, we're removing the inbox for the mail from my university, so we delete lines 2 up to and including 9. Save and exit.Be careful not to mess with anything else.
The ids of the sources are then no longer contiguous, but sup doesn't mind.
1 ---
2 - !supmua.org,2006-10-01/Redwood/Maildir
3 uri: maildir:/home/mkl/MailRU/INBOX/
4 usual: true
5 archived: false
6 sync_back: true
7 id: 5
8 labels:
9 - ru
10 - !supmua.org,2006-10-01/Redwood/Maildir
11 uri: maildir:/home/mkl/MailPosteo/
12 usual: true
13 archived: false
14 sync_back: true
15 id: 7
16 labels: []
17 - !supmua.org,2006-10-01/Redwood/Maildir
18 uri: maildir:/home/mkl/Mail
19 usual: true
20 archived: false
21 sync_back: true
22 id: 8
23 labels:
24 - gmx
25 - !supmua.org,2006-10-01/Redwood/Maildir
26 uri: maildir:/home/mkl/MailM.Klinik/
27 usual: true
28 archived: true
29 sync_back: true
30 id: 6
31 labels:
32 - mklinik
33 - !supmua.org,2006-10-01/Redwood/SentLoader {}
-
Rebuild the index. Depending on how many mails you have, this may take some minutes.
$ sup-sync --restore index-dump.txt
And that's it. At this point, you have a database that is exactly like before, except all mails from the removed source are missing.