msmtpΒΆ

msmtp is tool for sending mail. By default it sends email messages provided by standard input. It can be used to send email with scripts or some mail clients, such as mutt.

To set up msmtp:

  1. Open an SSH session to your account.

  2. Download the msmtp source tar file. Enter wget url, where url is the URL for the source archive (see the msmtp files page for the latest version), and press Enter. The source file (typically of the form msmtp-version.tar.bz2) is created in the current directory.

  3. Unpack the archive. Enter tar -xf archive, where archive is the name of the tar file containing the msmtp source, and press Enter. A directory containing the msmtp source is created in the current directory.

  4. Switch to the msmtp source directory. Enter cd source, where source is the path to the directory containing the source files, and press Enter.

  5. Configure the installation. Enter ./configure --prefix=$HOME and press Enter.

  6. Build msmtp. Enter make and press Enter.

  7. Install msmtp. Enter make install and press Enter.

  8. Create a $HOME/.msmtprc configuration file, if it does not already exist. Enter touch $HOME/.msmtprc and press Enter. The file is created.

  9. Set user-only read and write permissions on the configuration file. Enter chmod 600 $HOME/.msmtprc and press Enter.

  10. Open the $HOME/.msmtprc file in a text editor.

  11. Add the following lines to the file:

    account default
    host smtp.webfaction.com
    port 587
    from email_address
    auth on
    user mailbox_name
    password mysecret
    tls on
    tls_trust_file certificate_file
    

    where email_address is the email address you configured in the WebFaction control panel, mailbox_name is the name of a WebFaction mailbox, mysecret is the mailbox password, and certificate_file is the path to your certificate authority file. Alternatively, you may substitute the tls_trust_file setting with tls_certcheck off to disable the verification of certificates.

  12. Save and close the file.

You have configured msmtp. To verify your settings work, enter msmtp -S and press Enter.

Table Of Contents


Search the documentation


Example: "configure email"
or "create database"