Hints for developers


I created this topic as a place to put development hints instead of cluttering up Github “Issues”.


Regarding How do you access and modify the interval and keepalive settings? asked in https://github.com/mailpile/Mailpile/issues/2272

All the settings are saved in the file mailpile.cfg in the data directory for a Mailpile profile. This file is encrypted so you can’t look at it directly. But, you can dump it to the console or to another file using the Mailpile CLI. The CLI is available if you run Mailpile from the command line. If you enter help at the CLI a bunch of commands are listed including cat and pipe. To dump the configuration file to the console:

cat /Mailpile$/mailpile.cfg

To dump the configuration file in plaintext (decrypted) to another file mailpile.cfg.txt:

pipe > /Mailpile$/mailpile.cfg.txt -- cat /Mailpile$/mailpile.cfg

Note that /Mailpile$/ is interpreted by Mailpile as pointing to its home data directory for the profile that is in use. In Linux this is typically ~/.local/share/Mailpile/default.

Individual configuration settings can be displayed in the CLI with the print command and set with the set command. For example, the dumped mailpile.cfg.txt might contain

[config/sources/4545925b5537: Incoming message sources]
auth_type = password ; Authentication scheme
enabled = True ; Is this mail source enabled?
host = mail.messagingengine.com ; Host
interval = 300 ; (default) How frequently to check for mail
keepalive = False ; (default) Keep server connections alive
etc -- etc --etc

and in that case you can print the interval parameter with

print sources/4545925b5537/interval

and set its value with

set sources/4545925b5537/interval = 100

The modified value will be saved in mailpile.cfg when Mailpile terminates and possibly before.


The examples of “print” and “set” above contain an error: the “/” characters in the commands should be “.”. So the example should read

and in that case you can print the interval parameter with

print sources.4545925b5537.interval

and set its value with

set sources.4545925b5537.interval = 100

My abject apologies for any frustration this error has caused!


Testing access to Mailpile Community after problem reported by @greenpark.