I have previously used msmtp as my MDA. msmtp has a configuration file with username and password of the outgoing smtp server (eg gmail) stored in my home directory. I've recently changed distributions to CentOS 6.3 for reasons of support (only supported distribution for third party software). I tried to install msmtp but it wasn't available in any of the repositories. I finally got an rpm from fedora and installed that but it still doesn't work (can't find ca-certificates). So I decided I'd try with Postfix as it's the default on RHEL.

What I'm trying to do is set up sendmail (git and mutt) to send mail via my gmail account. I can't find where to set this up using Postfix. Everything I read suggests editing /etc/postfix/main.cf. But I don't want every user of my computer to be able to send email via my gmail account.

So my question is: how can I configure postfix per user (or can this not be done)?

update: I've got msmtp working now (had to edit the config due to distribution changing), but I'm still curious if this can be done (easily) in postfix

1 Answer 1


You may want to read this: http://www.postfix.org/SASL_README.html Search for "Configuring Sender-Dependent SASL authentication" on this page. It explains how to configure the sasl password map with usernames.

Is that what you are looking for?

  • close but ... (1) that doesn't look easy and (2) it saves each users password in /etc/postfix/main.cf instead of as set by each user.
    – dave
    Dec 15, 2012 at 13:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .