Mutt with SSMTP

Here is how you set up Mutt without a working sendmail or exim installation. Most linux boxes I work with already have some kind of mail transfer agent installed by default, so I never really had to do this. My cygwin install on the other hand only had a bare bones, minimalistic ssmtp application that forwards emails to an SMTP server. This is in fact perfect for my needs. Here is how you set it up.

First you tell mutt where is your MTA – add this line to your .muttrc:

set sendmail="/usr/sbin/ssmtp"

You may need to configure your ssmtp to send out the emails properly. Here is what you should have in /etc/ssmtp/ssmtp.conf:

Note that mailhub is the address of the SMTP server provided by your ISP. For example, in my case I would use as mailhub, but and everywhere else.

SSMTP has an annoying tendency to rewrite the From line as it sends out emails. In my case it ended up being instead of

To prevent this put this line into your /etc/ssmtp/revaliasses:

This should do it. Enjoy! :)

[tags]mutt, ssmtp, mut smtp, smtp, sendmail, mta, email[/tags]

This entry was posted in Uncategorized. Bookmark the permalink.

6 Responses to Mutt with SSMTP

  1. Peter Andersson SWEDEN Opera FreeBSD says:

    Thanks alot, I found this extremely useful, my ISP blocks port 25 so I have to forward my mails when using mutt. I had never heard about ssmtp, works like a charm now :)

    Reply  |  Quote
  2. Arturo Rdz MEXICO Mozilla Firefox Ubuntu Linux says:

    Thanks a lot Sir.
    Very useful , you can type too:
    mutt -s “Testing from MUTT” Hola
    > que tal
    > probando
    > test
    > EOF

    ..and the message goes… great!.

    Reply  |  Quote
  3. Luke UNITED STATES Mozilla Firefox Windows says:

    Glad I could help. :)

    Reply  |  Quote
  4. Pingback: Terminally Incoherent » Blog Archive » A day without X UNITED STATES WordPress

  5. Pingback: Un giorno senza X… « Note su LINUX UNITED STATES WordPress

  6. ikaruga UNITED STATES Mozilla Firefox Linux says:

    I know this is an old post, but does this thing work with multiple addresses at the same account?
    In my yahoo I have multiple (disposable) addresses that I use depending on who I send. Ex: email to the mutt mailing list use one address, email to forums use another address, etc. And they all go to the same inbox.
    I set up mutt so that the reply email varies as necessary. Can ssmtp work with this?

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *