csup - Crystal rewrite of sup email client

Csup Configuration
Login

Csup Configuration

Here are the steps you can take to ensure that Csup works properly with notmuch, and is able to receive, display, and send mail.

Make bash the default shell

In order for Csup hooks to work properly, you must change the default shell from dash to bash. Run this command:

sudo dpkg-reconfigure dash

When you are asked whether you want dash to be the default shell, select "No".

Receiving email

If you chose not to use a notmuch hook to fetch mail, you can create a Csup hook to do the same. See the before-poll hook for more information.

Displaying MIME-encoded emails

You can tell Csup how to display MIME-encoded emails through the use of a hook. See the mime-decode hook for more information.

Viewing MIME-encoded attachments

You can tell Csup how to view MIME-encoded attachments (such as PDFs and images) through the use of a hook. See the mime-view hook for more information.

Configuration files

Csup expects all of its configuration files to be located in the ~/.csup directory. There are three configuration files:

Additionally, csup will create several more files in the ~/.csup directory in response to user commands:

There is also a hooks directory containing optional hook scripts.

config.yaml

At startup, Csup reads its configuration information from the file ~/.csup/config.yaml. If this file does not exist, Csup will create it with default values. The file is compatible with the Sup config file, but has some additional information that is specific to Csup.

The keys in config.yaml can be symbols (names with a ':' prefix) for Sup compatibility, or ordinary names (without the ':' prefix). But when Csup exits, it saves config.yaml using ordinary names for keys.

Notmuch config options

There are two new Notmuch-related configuration options that can be set in config.yaml:

Sending email via SMTP

Because Csup has its own SMTP client for sending email, the account section in config.yaml has additional information related to the SMTP server for that account:

Example:

accounts:
  default:
    name: Joe User
    email: joeuser@example.com
    signature: /home/joeuser/.signature
    smtp_server: smtp.example.com
    smtp_port: 587
    smtp_user: joeuser@example.com
    smtp_password: SmTpPaSsWoRd

Sending email via SMTP2GO

If your host is blocked from using SMTP (as is the case with many cloud VPS providers now), you can use the SMTP2GO API to send email. You don't need any of the smtp_* settings described above. Instead, add an smtp2go_api_key field containing your API key to the account section in config.yaml. Example:

accounts:
  apiuser:
    name: API User
    email: apiuser@example.com
    signature: /home/apiuser/.signature
    smtp2go_api_key: api-E49E262BF4C366CFFE5B9919F1B9E6CA

To ensure that SMTP2GO will accept your email, the email setting should be a verified sender.

Confirm no attachments

:confirm_no_attachments

If true, and you use words like "attach", "attachment", or "attached" in your email and don't have any attachments, Csup will prompt you before sending. This will be true when a default config.yaml is generated, but are considered false if not explicitly specified.

Confirm top posting

:confirm_top_posting

If true, and you top-post, Sup will tell you that you are a bad person and will prompt you to confirm that before posting. By default this is true.

Ask for fields

:ask_for_cc
:ask_for_bcc
:ask_for_subject

These true/false fields determine which fields you're asked for when composing and (except for subject) forwarding messages.

Continuous scrolling

:continuous_scroll

Continuous scrolling is enabled when this is true. By default this is false; continuous scrolling can be intensive and slow down csup when viewing long threads and lists.

Sample config.yaml

Here is a sample config.yaml:

---
editor: microemacs
edit_signature: false
ask_for_from: false
ask_for_to: true
ask_for_cc: false
ask_for_bcc: false
ask_for_subject: true
account_selector: true
confirm_no_attachments: true
confirm_top_posting: true
jump_to_open_message: true
default_attachment_save_dir: ""
sent_folder: sent
draft_folder: draft
archive_sent: false
poll_interval: 300
wrap_width: 0
slip_rows: 10
indent_spaces: 2
col_jump: 2
stem_language: english
continuous_scroll: false
crypto: false
hidden_labels: []
mouse: true
accounts:
  default:
    name: Joe User
    email: joeuser@example.com
    signature: /home/joeuser/.signature
    smtp_server: smtp.example.com
    smtp_port: 587
    smtp_user: joeuser@example.com
    smtp_password: SmTpPaSsWoRd
  apiuser:
    name: API User
    email: apiuser@example.com
    signature: /home/apiuser/.signature
    smtp2go_api_key: api-E49E262BF4C366CFFE5B9919F1B9E6CA

colors.yaml

At startup, Csup reads the user interface color scheme from the file ~/.csup/colors.yaml. For more information, see Customizing Colors.

keymap.yaml

Csup has a new feature not available in Sup: user-configurable key bindings. For for more information, see Customizing Key Bindings.