Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm setting up my email client (mutt) on a new laptop (running Mac OSX Lion). I want to use SMTP with TLS for sending email. Searching for SMTP+Mutt+TLS reveals that Mutt's inbuilt secure SMTP stuff is vulnerable to man-in-the-middle attacks. That's okay as I can use an external MTA to send the mail. However, as I want to use TLS then I need to provide it with a username and password. Trouble is, if I want to have that done automatically then all the MTAs I've looked at so far (such as postfix) seem to store the password in an easily accessible manner (well, in a manner a bit too plain for my paranoid liking).

So my question is: Is there an MTA with SMTP+TLS support which can store the password in a secure manner?

share|improve this question
How can it be stored "securely" if the client must know the plaintext? – grawity Jun 12 '12 at 8:44
@grawity I don't know much about how SMTP+TLS authentication works - does the client send the password in plaintext? How do programs like Thunderbird or OSX's Mail store the password securely? – Loop Space Jun 12 '12 at 8:48
up vote 1 down vote accepted

The msmtp MTA can store credentials in OS X Keychain, if it was compiled with --with-macosx-keyring option. (See, for example, msmtp on MacPorts.)

To use this functionality, create a keychain item named smtp://<smtp-host> of kind "Internet password" (replacing <smtp-host> with your SMTP server's address):

    Name: smtp.freemail.example
    Kind: Internet password
 Account: joe.smith
   Where: smtp://smtp.freemail.example
share|improve this answer
This works just great! Thank you very much for figuring out what I wanted. – Loop Space Jun 12 '12 at 17:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.