-
Notifications
You must be signed in to change notification settings - Fork 1k
Troubleshooting
This is currently a catch all page for people who run into issues with new or existing installs of Mailpile that get broken due to upgrading and such! Feel free to submit situations you encounter and how you manage to resolve the issue.
If you use development version and follow updates, it's possible your search index get damaged at some point (e.g: format change), the symptom is only recent messages are searchable. To rebuild your whole search index:
- remove
~/.mailpile/kw-journal.dat
file (if any) - remove
~/.mailpile/search/
directory - in mailpile shell, do an empty search:
search
- in mailpile shell, do a
rescan all
and be patient :).
This operation is harmless (does not destroy tag information or anything else), but it may take a while!
You can use the print
command to print out the relevant section(s) of the Mailpile configuration. Since the output can be quite verbose, you may prefer to use the -flat
argument to avoid looking at all the data at once. If you need to double-check your passwords, you'll use the -secrets
argument.
Some examples:
# List which mail sources exist
mailpile> print -flat sources
{
"sources": {
"9e6bc04lzz8": "{ ... }",
"x7skvlsdk3f": "{ ... }"
}
}
# Examine one of them in more detail
mailpile> print -flat sources.9e6bc04lzz8
{
"sources.9e6bc04lzz8": {
"discovery": "{ ... }",
"enabled": true,
"host": "imap.gmail.com",
"interval": 300,
"keepalive": false,
"mailbox": "{ ... }",
"name": "GMail",
"password": "(SUPPRESSED)",
"port": 993,
"post_command": "",
"pre_command": "",
"protocol": "imap_ssl",
"username": "[email protected]"
}
}
# To look at the password, you could do this:
mailpile> print -flat -secrets sources.9e6bc04lzz8
# or this:
mailpile> print sources.9e6bc04lzz8.password
...
It is a good idea to make a backup of any mail you have downloaded, before performing manual surgery on your Mailpile's mailboxes and mail sources. The steps are as follows:
- Use
print
to figure out the mailbox ID or IDs you want to back up - Use
order
to disable threading in search results - Use
search
to find the mail in that mailbox - Use
export
to make a copy of the mail - Use
add
to re-add the exported mail to your Mailpile (optional)
Note: this procedure applies to any mail you can find with a search, not just mail source data.
Examples:
# Print a list of mailboxes associated with a particular mail source
# The list may be long, in this example we just show the INBOX entry
mailpile> print sources.9e6bc04lzz8.mailbox
...
"0006": {
"apply_tags": {
"0000": "c"
},
"local": "/home/user/.local/share/Mailpile/default/mail/df30f",
"name": "INBOX",
"path": "@0006",
"policy": "read",
"primary_tag": "16",
"process_new": true
},
...
# Disable threading in this session
mailpile> order rev-flat-date
...
# Search for mail found in that mailbox:
mailpile> search mailbox:0006
...
# If you want to include messages that have been trashed or marked
# as spam, you need to do this:
mailpile> search all:mail +in:trash +in:spam mailbox:0006
# Save the results of the previous search to a file
mailpile> export -flat all mbox:/home/user/exported-0006.mbx
# If you only want to save messages 5, 6 and 11:
mailpile> export -flat 5 6 11 mbox:/home/user/exported-0006.mbx
# To re-import exported mail, put the mbox file somewhere nice and:
mailpile> add /path/to/exported-0006.mbx
If you have the feeling that too much or too little mail is being downloaded, you can try to reset the local copy of a remote mail source and see if things behave better. The procedure is as follows:
- Find the mailbox ID of the copy you want reset
- Make a backup of the mail (optional, see above)
- Shut down Mailpile
- Delete the pickled mailbox state file,
.../Mailpile/default/pickled-mailbox.XXID
- Delete the downloaded mail,
.../Mailpile/default/mail/XXXXX
- Restart Mailpile
- Add the backups as a local mailbox (optional)
- Rescan your mail
See above for hints on how to find your Mailpile folder and for the basics on finding your mail source settings.
Examples of relevant commands:
# Finding mailbox details - here you can see the mailbox with the ID 0006
# stores local mail here: /home/user/.local/share/Mailpile/default/mail/df30f
#
mailpile> print sources.SOURCEID.mailbox
...
"0006": {
"apply_tags": {
"0000": "c"
},
"local": "/home/user/.local/share/Mailpile/default/mail/df30f",
"name": "INBOX",
"path": "@0006",
"policy": "read",
"primary_tag": "16",
"process_new": true
},
...
# Rescanning your mail (press CTRL-C to abort at any time)
mailpile> rescan both