I try to send mail with Mutt through my own mail server. My mail server run Postfix and Dovecot. I configured it by following this tutorial. I can send / receive email on my server with Gnome Evolution and many other programs. I would like to use Mutt with this configuration :

set realname = "{name}"
set header_cache = ~/.mutt/cache/headers
set certificate_file = ~/.mutt/certificates
set message_cachedir = ~/.mutt/cache/bodies

set spoolfile = imaps://{server address}:993/INBOX
set imap_user = "{address}"
set imap_pass = "{password}"
set imap_passive = no

set smtp_url = "smtp://{server}:587"
set smtp_pass = "{password}"
set from = "{address}"
set use_envelope_from = yes

set ssl_starttls = yes
set ssl_force_tls = yes

I use Mutt on my laptop, as a client of my server, so Mutt is not launched from my server.
The problem is, every time I try to send a mail, I have got this error : SMTP session fail : Relay access denied

The corresponding logs in /var/log/mail.log are :

Jan  7 17:49:58 ns333449 postfix/submission/smtpd[15264]: connect from unknown[{my ip]
Jan  7 17:49:59 ns333449 postfix/submission/smtpd[15264]: NOQUEUE: reject: RCPT from unknown[{my ip}]: 554 5.7.1 <[email protected]>: Relay access denied; from=<{my address}> to=<{destination address}> proto=ESMTP helo=<{my computer}>
Jan  7 17:49:59 ns333449 postfix/submission/smtpd[15264]: lost connection after RCPT from unknown[{my ip}]
Jan  7 17:49:59 ns333449 postfix/submission/smtpd[15264]: disconnect from unknown[{my ip}]

I can't understand why. In Gnome Evolution, my mail server parameters are :

  • IMAP :
    • Server : {my server address}
    • Port : 993
    • User : {my mail address}
    • SSL on dedicated port
    • Authentication with password
  • SMTP :
    • Server : {my server address}
    • Port : 587
    • Server require an authentication
    • STARTTLS after connection
    • Plain authentication
    • User : {my mail address}

I hope I gave you enough information.

EDIT : As suggested by tarleb, I wrote smtpd_tls_loglevel = 1 in /etc/postfix/main.cf, this is what I get when I try to send a mail:

Jan  8 11:54:16 ns333449 postfix/submission/smtpd[13158]: connect from unknown[{my ip}]
Jan  8 11:54:17 ns333449 postfix/submission/smtpd[13158]: Anonymous TLS connection established from unknown[{my ip}]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Jan  8 11:54:20 ns333449 postfix/submission/smtpd[13158]: warning: unknown[{my ip}]: SASL PLAIN authentication failed:
Jan  8 11:54:21 ns333449 postfix/submission/smtpd[13158]: lost connection after AUTH from unknown[{my ip}]
Jan  8 11:54:21 ns333449 postfix/submission/smtpd[13158]: disconnect from unknown[{my ip}]

1 Answer 1


It looks like mutt isn't authenticating itself to the server. I expect the simplest way to solve this to change the smtp_url to

set smtp_url = "smtp://$imap_user@{server}:587"

This tells mutt to login using your $imap_user. Change if your SMTP user is different from your IMAP user. Without this, mutt doesn't know it has to login before it can send mail.

  • I tried this, but I get a "SASL Authentication Failed", even if my credentials are correct. This occurs only with Mutt.
    – Quentin
    Commented Jan 8, 2016 at 10:09
  • 1
    @naccyde Maybe STARTTLS isn't called, which would make authentication impossible. Could you add smtpd_tls_loglevel = 1 to your /etc/postfix/main.cf and post the log after trying to send?
    – tarleb
    Commented Jan 8, 2016 at 10:25
  • I edited the first post with log message from smtpd_tls_loglevel = 1
    – Quentin
    Commented Jan 8, 2016 at 10:55
  • Huh, interesting. TLS works and authentication is attempted, but fails. Could you try set smtp_url = "smtp://$imap_user:$imap_pass@{server}:587"?
    – tarleb
    Commented Jan 8, 2016 at 11:13
  • Same problem with "smtp://$imap_user:$imap_pass@{server}:587" : SASL Authentication Failed. By the way, if I try to connect to my server through command line with openssl s_client -connect {server}:587 -starttls smtp and EHLO mail then AUTH PLAIN or AUTH LOGIN, authentication fail for the password. The password typed is the same as in Gnome Evolution but in base64 :/
    – Quentin
    Commented Jan 8, 2016 at 13:23

You must log in to answer this question.

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