Mutt not sending email when specifying smtp server

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2















I am trying to use mutt as my email client, and it works fine for my gmail account. But when I use my work email, it does not send the emails. It doesn't give any error, it just doesn't send them. The line in my .muttrc file that causes this problem is:




set smtp_url = "smtp://mail.my_work_email_server.com:587"




The behaviour does not change when adding the smtp_pass, nor does it by altering the name of the email server (i.e. using a 'fictional' server address).










share|improve this question






















  • What about smtp login?

    – Pavel Šimerda
    May 5 '14 at 18:55











  • That's really weird it doesn't give any error message. Are you sure smtp_url is set? Is it possible to confirm with mutt -D | grep smtp_url ?

    – derobert
    May 5 '14 at 18:58












  • yes, it's definitely set....

    – user2426172
    May 5 '14 at 19:07











  • Any messages in syslog? I suppose its possible it decided to write logs there...

    – derobert
    Apr 22 '15 at 19:27















2















I am trying to use mutt as my email client, and it works fine for my gmail account. But when I use my work email, it does not send the emails. It doesn't give any error, it just doesn't send them. The line in my .muttrc file that causes this problem is:




set smtp_url = "smtp://mail.my_work_email_server.com:587"




The behaviour does not change when adding the smtp_pass, nor does it by altering the name of the email server (i.e. using a 'fictional' server address).










share|improve this question






















  • What about smtp login?

    – Pavel Šimerda
    May 5 '14 at 18:55











  • That's really weird it doesn't give any error message. Are you sure smtp_url is set? Is it possible to confirm with mutt -D | grep smtp_url ?

    – derobert
    May 5 '14 at 18:58












  • yes, it's definitely set....

    – user2426172
    May 5 '14 at 19:07











  • Any messages in syslog? I suppose its possible it decided to write logs there...

    – derobert
    Apr 22 '15 at 19:27













2












2








2


3






I am trying to use mutt as my email client, and it works fine for my gmail account. But when I use my work email, it does not send the emails. It doesn't give any error, it just doesn't send them. The line in my .muttrc file that causes this problem is:




set smtp_url = "smtp://mail.my_work_email_server.com:587"




The behaviour does not change when adding the smtp_pass, nor does it by altering the name of the email server (i.e. using a 'fictional' server address).










share|improve this question














I am trying to use mutt as my email client, and it works fine for my gmail account. But when I use my work email, it does not send the emails. It doesn't give any error, it just doesn't send them. The line in my .muttrc file that causes this problem is:




set smtp_url = "smtp://mail.my_work_email_server.com:587"




The behaviour does not change when adding the smtp_pass, nor does it by altering the name of the email server (i.e. using a 'fictional' server address).







mutt smtp






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 5 '14 at 18:51









user2426172user2426172

128114




128114












  • What about smtp login?

    – Pavel Šimerda
    May 5 '14 at 18:55











  • That's really weird it doesn't give any error message. Are you sure smtp_url is set? Is it possible to confirm with mutt -D | grep smtp_url ?

    – derobert
    May 5 '14 at 18:58












  • yes, it's definitely set....

    – user2426172
    May 5 '14 at 19:07











  • Any messages in syslog? I suppose its possible it decided to write logs there...

    – derobert
    Apr 22 '15 at 19:27

















  • What about smtp login?

    – Pavel Šimerda
    May 5 '14 at 18:55











  • That's really weird it doesn't give any error message. Are you sure smtp_url is set? Is it possible to confirm with mutt -D | grep smtp_url ?

    – derobert
    May 5 '14 at 18:58












  • yes, it's definitely set....

    – user2426172
    May 5 '14 at 19:07











  • Any messages in syslog? I suppose its possible it decided to write logs there...

    – derobert
    Apr 22 '15 at 19:27
















What about smtp login?

– Pavel Šimerda
May 5 '14 at 18:55





What about smtp login?

– Pavel Šimerda
May 5 '14 at 18:55













That's really weird it doesn't give any error message. Are you sure smtp_url is set? Is it possible to confirm with mutt -D | grep smtp_url ?

– derobert
May 5 '14 at 18:58






That's really weird it doesn't give any error message. Are you sure smtp_url is set? Is it possible to confirm with mutt -D | grep smtp_url ?

– derobert
May 5 '14 at 18:58














yes, it's definitely set....

– user2426172
May 5 '14 at 19:07





yes, it's definitely set....

– user2426172
May 5 '14 at 19:07













Any messages in syslog? I suppose its possible it decided to write logs there...

– derobert
Apr 22 '15 at 19:27





Any messages in syslog? I suppose its possible it decided to write logs there...

– derobert
Apr 22 '15 at 19:27










5 Answers
5






active

oldest

votes


















3














Are you able to successfully send mail via SMTP with another mail client on that machine? Are you able to telnet to your SMTP server and establish a connection? Are you using STARTTLS?



In mutt, you use the protocol smtps to denote a connection that is secured from the beginning with TLS/SSL. If your mail server is expecting that (and many do these days), that could be your problem.



However, if your mail server expects to use STARTTLS, then you use the regular smtp:// protocol in smtp_url and make sure to set ssl_starttls=yes.



Here's an example telnet session which shows a mailserver that uses STARTTLS:



$ telnet smtp.example.com 587
Trying 127.0.0.1...
Connected to smtp.example.com.
Escape character is '^]'.
220 smtp.example.com ESMTP Postfix (Debian/GNU)
EHLO test
250-
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
QUIT
221 2.0.0 Bye
Connection closed by foreign host.





share|improve this answer

























  • Ok,I'm not an expert in this, so I'll try to give you as much information as possible: 1) I normally use Thunderbird for emailing, and my work account works fine (both receiving and sending). 2) I copied all the info (server name etc) from the Thunderbird account settings to my .muttrc file. 3) On the other hand, mutt works fine using my gmail account. 4) I could establish a telnet connection to my work email server. 5) I don't know how to use STARTTLS in mutt, although I do use it in Thunderbird.

    – user2426172
    May 6 '14 at 2:16












  • If I understood you correctly, I should write something like set smtp_url = "smtps://mail.my_work_email_server.com:587" in my .muttrc file (same as with the gmail account). When I do so, I get the following error: gnutls_handshake: An unexpected TLS packet was received.

    – user2426172
    May 6 '14 at 2:47












  • @user2426172: what happens if you run telnet mail.my_work_email_server.com 587 and then after the 220 welcome message type EHLO test? Do you get a 250-STARTTLS?

    – JoeNahmias
    May 6 '14 at 3:00











  • yes, I do get a 250-STARTTLS. I tried adding set ssl_starttls=yes to my .muttrc file, but to no avail.

    – user2426172
    May 6 '14 at 4:35



















3














I had the same thing and this is what worked for me.



set ssl_starttls=yes
set ssl_force_tls=yes

set imap_user = "user@example.com"
set imap_pass = "!HASHEDPASSWORD!"
set folder = imap://mail.example.com/
set spoolfile = imap://mail.example.com/INBOX

# SMTP user auth
# # fill in the right user and pass based on your setup
# # protocols: smtp for TLS (25/587), smtps for SSL (465)
set smtp_url = "smtp://$imap_user@mail.example.com:587"
set smtp_pass = "$imap_pass"

# Where to save copies of outgoing mail
set record = '+Sent'


What made it NOT work for me was the order in which things were in the config file and a definition for 'set record' to a folder which was a link to a non existing folder.



When answering 'no' to the question of creating the Folder it was hanging and no traffic was seen towards the SMTP server.



PS: check sourced config files, they might specify conflicting settings and/or in the wrong order.



HTH






share|improve this answer

























  • How do you get a hashed password?

    – bgStack15
    Feb 2 '17 at 16:52


















0














Below config in ~/.muttrc works for me, for sending mail to gmail:



set from = "user@gmail.com"
set realname = "user"
set imap_user = "user@gmail.com"
set imap_pass = "pwd"
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "imaps://imap.gmail.com/INBOX"
set postponed ="+[Gmail]/Drafts"
set header_cache =~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates
set smtp_url = "smtps://user@gmail.com@smtp.gmail.com:465/"
set smtp_pass = "pwd"
set move = no
set imap_keepalive = 900





share|improve this answer
































    0














    I realize this is an old thread, but yesterday I spent two hours tracking down why the above-mentioned configurations didn't work for me, and I want to share the solution to save other people time.



    The problem was that I needed to accept the certificate from Google's SMTP server at least once, and this requires running mutt without its input redirected, otherwise mutt cannot prompt you to accept the certificate.



    By the way, you should select (a) for always, in order for the certificate to be stored in .mutt/certificates. If you select (o) for once, it will use the supplied certificate, but not store it in .mutt/certificates.



    So run mutt without redirecting the input (this includes piping to standard input), then accept the offered certificate always. After that, the next time you run mutt, it should just work because it is using the stored certificate.






    share|improve this answer
































      0














      I spent a whole day figuring this out and tweaking MANY combinations between different SSL/TLS and ports configurations with no success, until today I finally tried this specifically:



      set ssl_starttls = no



      It seems mutt's default behavior is to try STARTTLS, so you have to specifically tell it DON'T



      No other configuration was needed besides the obvious smtp_url and smtp_pass.
      I can now perfectly send mail with this .muttrc



      set ssl_starttls = no
      set smtp_url = "smtp://user@example.com@mail.example.com:587/"
      set smtp_pass = "password"


      That worked with the Not recommended configurations of SSL from my email provider. I'm still not able to use the recommended config using 465 port.



      This are all the configurations I have tweaked that affects sending mail, if any one else want to try:



      set ssl_starttls = no # apparently yes is default.
      set ssl_force_tls = yes
      set smtp_authenticators = "login"

      set smtp_url = "smtp[s]://..."
      set certificate_file = "~/.mutt/certificates" # some recommend creating the file first: mkdir ~/.mutt && touch ~/.mutt/certificates

      set ssl_verify_host = no
      set ssl_verify_dates = no





      share|improve this answer
























        Your Answer








        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "106"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f128004%2fmutt-not-sending-email-when-specifying-smtp-server%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        5 Answers
        5






        active

        oldest

        votes








        5 Answers
        5






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        3














        Are you able to successfully send mail via SMTP with another mail client on that machine? Are you able to telnet to your SMTP server and establish a connection? Are you using STARTTLS?



        In mutt, you use the protocol smtps to denote a connection that is secured from the beginning with TLS/SSL. If your mail server is expecting that (and many do these days), that could be your problem.



        However, if your mail server expects to use STARTTLS, then you use the regular smtp:// protocol in smtp_url and make sure to set ssl_starttls=yes.



        Here's an example telnet session which shows a mailserver that uses STARTTLS:



        $ telnet smtp.example.com 587
        Trying 127.0.0.1...
        Connected to smtp.example.com.
        Escape character is '^]'.
        220 smtp.example.com ESMTP Postfix (Debian/GNU)
        EHLO test
        250-
        250-PIPELINING
        250-SIZE 10240000
        250-ETRN
        250-STARTTLS
        250-ENHANCEDSTATUSCODES
        250-8BITMIME
        250 DSN
        QUIT
        221 2.0.0 Bye
        Connection closed by foreign host.





        share|improve this answer

























        • Ok,I'm not an expert in this, so I'll try to give you as much information as possible: 1) I normally use Thunderbird for emailing, and my work account works fine (both receiving and sending). 2) I copied all the info (server name etc) from the Thunderbird account settings to my .muttrc file. 3) On the other hand, mutt works fine using my gmail account. 4) I could establish a telnet connection to my work email server. 5) I don't know how to use STARTTLS in mutt, although I do use it in Thunderbird.

          – user2426172
          May 6 '14 at 2:16












        • If I understood you correctly, I should write something like set smtp_url = "smtps://mail.my_work_email_server.com:587" in my .muttrc file (same as with the gmail account). When I do so, I get the following error: gnutls_handshake: An unexpected TLS packet was received.

          – user2426172
          May 6 '14 at 2:47












        • @user2426172: what happens if you run telnet mail.my_work_email_server.com 587 and then after the 220 welcome message type EHLO test? Do you get a 250-STARTTLS?

          – JoeNahmias
          May 6 '14 at 3:00











        • yes, I do get a 250-STARTTLS. I tried adding set ssl_starttls=yes to my .muttrc file, but to no avail.

          – user2426172
          May 6 '14 at 4:35
















        3














        Are you able to successfully send mail via SMTP with another mail client on that machine? Are you able to telnet to your SMTP server and establish a connection? Are you using STARTTLS?



        In mutt, you use the protocol smtps to denote a connection that is secured from the beginning with TLS/SSL. If your mail server is expecting that (and many do these days), that could be your problem.



        However, if your mail server expects to use STARTTLS, then you use the regular smtp:// protocol in smtp_url and make sure to set ssl_starttls=yes.



        Here's an example telnet session which shows a mailserver that uses STARTTLS:



        $ telnet smtp.example.com 587
        Trying 127.0.0.1...
        Connected to smtp.example.com.
        Escape character is '^]'.
        220 smtp.example.com ESMTP Postfix (Debian/GNU)
        EHLO test
        250-
        250-PIPELINING
        250-SIZE 10240000
        250-ETRN
        250-STARTTLS
        250-ENHANCEDSTATUSCODES
        250-8BITMIME
        250 DSN
        QUIT
        221 2.0.0 Bye
        Connection closed by foreign host.





        share|improve this answer

























        • Ok,I'm not an expert in this, so I'll try to give you as much information as possible: 1) I normally use Thunderbird for emailing, and my work account works fine (both receiving and sending). 2) I copied all the info (server name etc) from the Thunderbird account settings to my .muttrc file. 3) On the other hand, mutt works fine using my gmail account. 4) I could establish a telnet connection to my work email server. 5) I don't know how to use STARTTLS in mutt, although I do use it in Thunderbird.

          – user2426172
          May 6 '14 at 2:16












        • If I understood you correctly, I should write something like set smtp_url = "smtps://mail.my_work_email_server.com:587" in my .muttrc file (same as with the gmail account). When I do so, I get the following error: gnutls_handshake: An unexpected TLS packet was received.

          – user2426172
          May 6 '14 at 2:47












        • @user2426172: what happens if you run telnet mail.my_work_email_server.com 587 and then after the 220 welcome message type EHLO test? Do you get a 250-STARTTLS?

          – JoeNahmias
          May 6 '14 at 3:00











        • yes, I do get a 250-STARTTLS. I tried adding set ssl_starttls=yes to my .muttrc file, but to no avail.

          – user2426172
          May 6 '14 at 4:35














        3












        3








        3







        Are you able to successfully send mail via SMTP with another mail client on that machine? Are you able to telnet to your SMTP server and establish a connection? Are you using STARTTLS?



        In mutt, you use the protocol smtps to denote a connection that is secured from the beginning with TLS/SSL. If your mail server is expecting that (and many do these days), that could be your problem.



        However, if your mail server expects to use STARTTLS, then you use the regular smtp:// protocol in smtp_url and make sure to set ssl_starttls=yes.



        Here's an example telnet session which shows a mailserver that uses STARTTLS:



        $ telnet smtp.example.com 587
        Trying 127.0.0.1...
        Connected to smtp.example.com.
        Escape character is '^]'.
        220 smtp.example.com ESMTP Postfix (Debian/GNU)
        EHLO test
        250-
        250-PIPELINING
        250-SIZE 10240000
        250-ETRN
        250-STARTTLS
        250-ENHANCEDSTATUSCODES
        250-8BITMIME
        250 DSN
        QUIT
        221 2.0.0 Bye
        Connection closed by foreign host.





        share|improve this answer















        Are you able to successfully send mail via SMTP with another mail client on that machine? Are you able to telnet to your SMTP server and establish a connection? Are you using STARTTLS?



        In mutt, you use the protocol smtps to denote a connection that is secured from the beginning with TLS/SSL. If your mail server is expecting that (and many do these days), that could be your problem.



        However, if your mail server expects to use STARTTLS, then you use the regular smtp:// protocol in smtp_url and make sure to set ssl_starttls=yes.



        Here's an example telnet session which shows a mailserver that uses STARTTLS:



        $ telnet smtp.example.com 587
        Trying 127.0.0.1...
        Connected to smtp.example.com.
        Escape character is '^]'.
        220 smtp.example.com ESMTP Postfix (Debian/GNU)
        EHLO test
        250-
        250-PIPELINING
        250-SIZE 10240000
        250-ETRN
        250-STARTTLS
        250-ENHANCEDSTATUSCODES
        250-8BITMIME
        250 DSN
        QUIT
        221 2.0.0 Bye
        Connection closed by foreign host.






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited May 6 '14 at 3:12

























        answered May 6 '14 at 1:58









        JoeNahmiasJoeNahmias

        384




        384












        • Ok,I'm not an expert in this, so I'll try to give you as much information as possible: 1) I normally use Thunderbird for emailing, and my work account works fine (both receiving and sending). 2) I copied all the info (server name etc) from the Thunderbird account settings to my .muttrc file. 3) On the other hand, mutt works fine using my gmail account. 4) I could establish a telnet connection to my work email server. 5) I don't know how to use STARTTLS in mutt, although I do use it in Thunderbird.

          – user2426172
          May 6 '14 at 2:16












        • If I understood you correctly, I should write something like set smtp_url = "smtps://mail.my_work_email_server.com:587" in my .muttrc file (same as with the gmail account). When I do so, I get the following error: gnutls_handshake: An unexpected TLS packet was received.

          – user2426172
          May 6 '14 at 2:47












        • @user2426172: what happens if you run telnet mail.my_work_email_server.com 587 and then after the 220 welcome message type EHLO test? Do you get a 250-STARTTLS?

          – JoeNahmias
          May 6 '14 at 3:00











        • yes, I do get a 250-STARTTLS. I tried adding set ssl_starttls=yes to my .muttrc file, but to no avail.

          – user2426172
          May 6 '14 at 4:35


















        • Ok,I'm not an expert in this, so I'll try to give you as much information as possible: 1) I normally use Thunderbird for emailing, and my work account works fine (both receiving and sending). 2) I copied all the info (server name etc) from the Thunderbird account settings to my .muttrc file. 3) On the other hand, mutt works fine using my gmail account. 4) I could establish a telnet connection to my work email server. 5) I don't know how to use STARTTLS in mutt, although I do use it in Thunderbird.

          – user2426172
          May 6 '14 at 2:16












        • If I understood you correctly, I should write something like set smtp_url = "smtps://mail.my_work_email_server.com:587" in my .muttrc file (same as with the gmail account). When I do so, I get the following error: gnutls_handshake: An unexpected TLS packet was received.

          – user2426172
          May 6 '14 at 2:47












        • @user2426172: what happens if you run telnet mail.my_work_email_server.com 587 and then after the 220 welcome message type EHLO test? Do you get a 250-STARTTLS?

          – JoeNahmias
          May 6 '14 at 3:00











        • yes, I do get a 250-STARTTLS. I tried adding set ssl_starttls=yes to my .muttrc file, but to no avail.

          – user2426172
          May 6 '14 at 4:35

















        Ok,I'm not an expert in this, so I'll try to give you as much information as possible: 1) I normally use Thunderbird for emailing, and my work account works fine (both receiving and sending). 2) I copied all the info (server name etc) from the Thunderbird account settings to my .muttrc file. 3) On the other hand, mutt works fine using my gmail account. 4) I could establish a telnet connection to my work email server. 5) I don't know how to use STARTTLS in mutt, although I do use it in Thunderbird.

        – user2426172
        May 6 '14 at 2:16






        Ok,I'm not an expert in this, so I'll try to give you as much information as possible: 1) I normally use Thunderbird for emailing, and my work account works fine (both receiving and sending). 2) I copied all the info (server name etc) from the Thunderbird account settings to my .muttrc file. 3) On the other hand, mutt works fine using my gmail account. 4) I could establish a telnet connection to my work email server. 5) I don't know how to use STARTTLS in mutt, although I do use it in Thunderbird.

        – user2426172
        May 6 '14 at 2:16














        If I understood you correctly, I should write something like set smtp_url = "smtps://mail.my_work_email_server.com:587" in my .muttrc file (same as with the gmail account). When I do so, I get the following error: gnutls_handshake: An unexpected TLS packet was received.

        – user2426172
        May 6 '14 at 2:47






        If I understood you correctly, I should write something like set smtp_url = "smtps://mail.my_work_email_server.com:587" in my .muttrc file (same as with the gmail account). When I do so, I get the following error: gnutls_handshake: An unexpected TLS packet was received.

        – user2426172
        May 6 '14 at 2:47














        @user2426172: what happens if you run telnet mail.my_work_email_server.com 587 and then after the 220 welcome message type EHLO test? Do you get a 250-STARTTLS?

        – JoeNahmias
        May 6 '14 at 3:00





        @user2426172: what happens if you run telnet mail.my_work_email_server.com 587 and then after the 220 welcome message type EHLO test? Do you get a 250-STARTTLS?

        – JoeNahmias
        May 6 '14 at 3:00













        yes, I do get a 250-STARTTLS. I tried adding set ssl_starttls=yes to my .muttrc file, but to no avail.

        – user2426172
        May 6 '14 at 4:35






        yes, I do get a 250-STARTTLS. I tried adding set ssl_starttls=yes to my .muttrc file, but to no avail.

        – user2426172
        May 6 '14 at 4:35














        3














        I had the same thing and this is what worked for me.



        set ssl_starttls=yes
        set ssl_force_tls=yes

        set imap_user = "user@example.com"
        set imap_pass = "!HASHEDPASSWORD!"
        set folder = imap://mail.example.com/
        set spoolfile = imap://mail.example.com/INBOX

        # SMTP user auth
        # # fill in the right user and pass based on your setup
        # # protocols: smtp for TLS (25/587), smtps for SSL (465)
        set smtp_url = "smtp://$imap_user@mail.example.com:587"
        set smtp_pass = "$imap_pass"

        # Where to save copies of outgoing mail
        set record = '+Sent'


        What made it NOT work for me was the order in which things were in the config file and a definition for 'set record' to a folder which was a link to a non existing folder.



        When answering 'no' to the question of creating the Folder it was hanging and no traffic was seen towards the SMTP server.



        PS: check sourced config files, they might specify conflicting settings and/or in the wrong order.



        HTH






        share|improve this answer

























        • How do you get a hashed password?

          – bgStack15
          Feb 2 '17 at 16:52















        3














        I had the same thing and this is what worked for me.



        set ssl_starttls=yes
        set ssl_force_tls=yes

        set imap_user = "user@example.com"
        set imap_pass = "!HASHEDPASSWORD!"
        set folder = imap://mail.example.com/
        set spoolfile = imap://mail.example.com/INBOX

        # SMTP user auth
        # # fill in the right user and pass based on your setup
        # # protocols: smtp for TLS (25/587), smtps for SSL (465)
        set smtp_url = "smtp://$imap_user@mail.example.com:587"
        set smtp_pass = "$imap_pass"

        # Where to save copies of outgoing mail
        set record = '+Sent'


        What made it NOT work for me was the order in which things were in the config file and a definition for 'set record' to a folder which was a link to a non existing folder.



        When answering 'no' to the question of creating the Folder it was hanging and no traffic was seen towards the SMTP server.



        PS: check sourced config files, they might specify conflicting settings and/or in the wrong order.



        HTH






        share|improve this answer

























        • How do you get a hashed password?

          – bgStack15
          Feb 2 '17 at 16:52













        3












        3








        3







        I had the same thing and this is what worked for me.



        set ssl_starttls=yes
        set ssl_force_tls=yes

        set imap_user = "user@example.com"
        set imap_pass = "!HASHEDPASSWORD!"
        set folder = imap://mail.example.com/
        set spoolfile = imap://mail.example.com/INBOX

        # SMTP user auth
        # # fill in the right user and pass based on your setup
        # # protocols: smtp for TLS (25/587), smtps for SSL (465)
        set smtp_url = "smtp://$imap_user@mail.example.com:587"
        set smtp_pass = "$imap_pass"

        # Where to save copies of outgoing mail
        set record = '+Sent'


        What made it NOT work for me was the order in which things were in the config file and a definition for 'set record' to a folder which was a link to a non existing folder.



        When answering 'no' to the question of creating the Folder it was hanging and no traffic was seen towards the SMTP server.



        PS: check sourced config files, they might specify conflicting settings and/or in the wrong order.



        HTH






        share|improve this answer















        I had the same thing and this is what worked for me.



        set ssl_starttls=yes
        set ssl_force_tls=yes

        set imap_user = "user@example.com"
        set imap_pass = "!HASHEDPASSWORD!"
        set folder = imap://mail.example.com/
        set spoolfile = imap://mail.example.com/INBOX

        # SMTP user auth
        # # fill in the right user and pass based on your setup
        # # protocols: smtp for TLS (25/587), smtps for SSL (465)
        set smtp_url = "smtp://$imap_user@mail.example.com:587"
        set smtp_pass = "$imap_pass"

        # Where to save copies of outgoing mail
        set record = '+Sent'


        What made it NOT work for me was the order in which things were in the config file and a definition for 'set record' to a folder which was a link to a non existing folder.



        When answering 'no' to the question of creating the Folder it was hanging and no traffic was seen towards the SMTP server.



        PS: check sourced config files, they might specify conflicting settings and/or in the wrong order.



        HTH







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 22 '15 at 19:00









        SailorCire

        1,8681921




        1,8681921










        answered Apr 22 '15 at 18:25









        Bee DeeBee Dee

        311




        311












        • How do you get a hashed password?

          – bgStack15
          Feb 2 '17 at 16:52

















        • How do you get a hashed password?

          – bgStack15
          Feb 2 '17 at 16:52
















        How do you get a hashed password?

        – bgStack15
        Feb 2 '17 at 16:52





        How do you get a hashed password?

        – bgStack15
        Feb 2 '17 at 16:52











        0














        Below config in ~/.muttrc works for me, for sending mail to gmail:



        set from = "user@gmail.com"
        set realname = "user"
        set imap_user = "user@gmail.com"
        set imap_pass = "pwd"
        set folder = "imaps://imap.gmail.com:993"
        set spoolfile = "imaps://imap.gmail.com/INBOX"
        set postponed ="+[Gmail]/Drafts"
        set header_cache =~/.mutt/cache/headers
        set message_cachedir =~/.mutt/cache/bodies
        set certificate_file =~/.mutt/certificates
        set smtp_url = "smtps://user@gmail.com@smtp.gmail.com:465/"
        set smtp_pass = "pwd"
        set move = no
        set imap_keepalive = 900





        share|improve this answer





























          0














          Below config in ~/.muttrc works for me, for sending mail to gmail:



          set from = "user@gmail.com"
          set realname = "user"
          set imap_user = "user@gmail.com"
          set imap_pass = "pwd"
          set folder = "imaps://imap.gmail.com:993"
          set spoolfile = "imaps://imap.gmail.com/INBOX"
          set postponed ="+[Gmail]/Drafts"
          set header_cache =~/.mutt/cache/headers
          set message_cachedir =~/.mutt/cache/bodies
          set certificate_file =~/.mutt/certificates
          set smtp_url = "smtps://user@gmail.com@smtp.gmail.com:465/"
          set smtp_pass = "pwd"
          set move = no
          set imap_keepalive = 900





          share|improve this answer



























            0












            0








            0







            Below config in ~/.muttrc works for me, for sending mail to gmail:



            set from = "user@gmail.com"
            set realname = "user"
            set imap_user = "user@gmail.com"
            set imap_pass = "pwd"
            set folder = "imaps://imap.gmail.com:993"
            set spoolfile = "imaps://imap.gmail.com/INBOX"
            set postponed ="+[Gmail]/Drafts"
            set header_cache =~/.mutt/cache/headers
            set message_cachedir =~/.mutt/cache/bodies
            set certificate_file =~/.mutt/certificates
            set smtp_url = "smtps://user@gmail.com@smtp.gmail.com:465/"
            set smtp_pass = "pwd"
            set move = no
            set imap_keepalive = 900





            share|improve this answer















            Below config in ~/.muttrc works for me, for sending mail to gmail:



            set from = "user@gmail.com"
            set realname = "user"
            set imap_user = "user@gmail.com"
            set imap_pass = "pwd"
            set folder = "imaps://imap.gmail.com:993"
            set spoolfile = "imaps://imap.gmail.com/INBOX"
            set postponed ="+[Gmail]/Drafts"
            set header_cache =~/.mutt/cache/headers
            set message_cachedir =~/.mutt/cache/bodies
            set certificate_file =~/.mutt/certificates
            set smtp_url = "smtps://user@gmail.com@smtp.gmail.com:465/"
            set smtp_pass = "pwd"
            set move = no
            set imap_keepalive = 900






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 30 '15 at 7:59









            Mathieu

            1,93311419




            1,93311419










            answered Dec 30 '15 at 6:46









            badaribadari

            1




            1





















                0














                I realize this is an old thread, but yesterday I spent two hours tracking down why the above-mentioned configurations didn't work for me, and I want to share the solution to save other people time.



                The problem was that I needed to accept the certificate from Google's SMTP server at least once, and this requires running mutt without its input redirected, otherwise mutt cannot prompt you to accept the certificate.



                By the way, you should select (a) for always, in order for the certificate to be stored in .mutt/certificates. If you select (o) for once, it will use the supplied certificate, but not store it in .mutt/certificates.



                So run mutt without redirecting the input (this includes piping to standard input), then accept the offered certificate always. After that, the next time you run mutt, it should just work because it is using the stored certificate.






                share|improve this answer





























                  0














                  I realize this is an old thread, but yesterday I spent two hours tracking down why the above-mentioned configurations didn't work for me, and I want to share the solution to save other people time.



                  The problem was that I needed to accept the certificate from Google's SMTP server at least once, and this requires running mutt without its input redirected, otherwise mutt cannot prompt you to accept the certificate.



                  By the way, you should select (a) for always, in order for the certificate to be stored in .mutt/certificates. If you select (o) for once, it will use the supplied certificate, but not store it in .mutt/certificates.



                  So run mutt without redirecting the input (this includes piping to standard input), then accept the offered certificate always. After that, the next time you run mutt, it should just work because it is using the stored certificate.






                  share|improve this answer



























                    0












                    0








                    0







                    I realize this is an old thread, but yesterday I spent two hours tracking down why the above-mentioned configurations didn't work for me, and I want to share the solution to save other people time.



                    The problem was that I needed to accept the certificate from Google's SMTP server at least once, and this requires running mutt without its input redirected, otherwise mutt cannot prompt you to accept the certificate.



                    By the way, you should select (a) for always, in order for the certificate to be stored in .mutt/certificates. If you select (o) for once, it will use the supplied certificate, but not store it in .mutt/certificates.



                    So run mutt without redirecting the input (this includes piping to standard input), then accept the offered certificate always. After that, the next time you run mutt, it should just work because it is using the stored certificate.






                    share|improve this answer















                    I realize this is an old thread, but yesterday I spent two hours tracking down why the above-mentioned configurations didn't work for me, and I want to share the solution to save other people time.



                    The problem was that I needed to accept the certificate from Google's SMTP server at least once, and this requires running mutt without its input redirected, otherwise mutt cannot prompt you to accept the certificate.



                    By the way, you should select (a) for always, in order for the certificate to be stored in .mutt/certificates. If you select (o) for once, it will use the supplied certificate, but not store it in .mutt/certificates.



                    So run mutt without redirecting the input (this includes piping to standard input), then accept the offered certificate always. After that, the next time you run mutt, it should just work because it is using the stored certificate.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Mar 31 '17 at 0:22









                    G-Man

                    13.4k93667




                    13.4k93667










                    answered Mar 30 '17 at 23:50









                    user4645user4645

                    11




                    11





















                        0














                        I spent a whole day figuring this out and tweaking MANY combinations between different SSL/TLS and ports configurations with no success, until today I finally tried this specifically:



                        set ssl_starttls = no



                        It seems mutt's default behavior is to try STARTTLS, so you have to specifically tell it DON'T



                        No other configuration was needed besides the obvious smtp_url and smtp_pass.
                        I can now perfectly send mail with this .muttrc



                        set ssl_starttls = no
                        set smtp_url = "smtp://user@example.com@mail.example.com:587/"
                        set smtp_pass = "password"


                        That worked with the Not recommended configurations of SSL from my email provider. I'm still not able to use the recommended config using 465 port.



                        This are all the configurations I have tweaked that affects sending mail, if any one else want to try:



                        set ssl_starttls = no # apparently yes is default.
                        set ssl_force_tls = yes
                        set smtp_authenticators = "login"

                        set smtp_url = "smtp[s]://..."
                        set certificate_file = "~/.mutt/certificates" # some recommend creating the file first: mkdir ~/.mutt && touch ~/.mutt/certificates

                        set ssl_verify_host = no
                        set ssl_verify_dates = no





                        share|improve this answer





























                          0














                          I spent a whole day figuring this out and tweaking MANY combinations between different SSL/TLS and ports configurations with no success, until today I finally tried this specifically:



                          set ssl_starttls = no



                          It seems mutt's default behavior is to try STARTTLS, so you have to specifically tell it DON'T



                          No other configuration was needed besides the obvious smtp_url and smtp_pass.
                          I can now perfectly send mail with this .muttrc



                          set ssl_starttls = no
                          set smtp_url = "smtp://user@example.com@mail.example.com:587/"
                          set smtp_pass = "password"


                          That worked with the Not recommended configurations of SSL from my email provider. I'm still not able to use the recommended config using 465 port.



                          This are all the configurations I have tweaked that affects sending mail, if any one else want to try:



                          set ssl_starttls = no # apparently yes is default.
                          set ssl_force_tls = yes
                          set smtp_authenticators = "login"

                          set smtp_url = "smtp[s]://..."
                          set certificate_file = "~/.mutt/certificates" # some recommend creating the file first: mkdir ~/.mutt && touch ~/.mutt/certificates

                          set ssl_verify_host = no
                          set ssl_verify_dates = no





                          share|improve this answer



























                            0












                            0








                            0







                            I spent a whole day figuring this out and tweaking MANY combinations between different SSL/TLS and ports configurations with no success, until today I finally tried this specifically:



                            set ssl_starttls = no



                            It seems mutt's default behavior is to try STARTTLS, so you have to specifically tell it DON'T



                            No other configuration was needed besides the obvious smtp_url and smtp_pass.
                            I can now perfectly send mail with this .muttrc



                            set ssl_starttls = no
                            set smtp_url = "smtp://user@example.com@mail.example.com:587/"
                            set smtp_pass = "password"


                            That worked with the Not recommended configurations of SSL from my email provider. I'm still not able to use the recommended config using 465 port.



                            This are all the configurations I have tweaked that affects sending mail, if any one else want to try:



                            set ssl_starttls = no # apparently yes is default.
                            set ssl_force_tls = yes
                            set smtp_authenticators = "login"

                            set smtp_url = "smtp[s]://..."
                            set certificate_file = "~/.mutt/certificates" # some recommend creating the file first: mkdir ~/.mutt && touch ~/.mutt/certificates

                            set ssl_verify_host = no
                            set ssl_verify_dates = no





                            share|improve this answer















                            I spent a whole day figuring this out and tweaking MANY combinations between different SSL/TLS and ports configurations with no success, until today I finally tried this specifically:



                            set ssl_starttls = no



                            It seems mutt's default behavior is to try STARTTLS, so you have to specifically tell it DON'T



                            No other configuration was needed besides the obvious smtp_url and smtp_pass.
                            I can now perfectly send mail with this .muttrc



                            set ssl_starttls = no
                            set smtp_url = "smtp://user@example.com@mail.example.com:587/"
                            set smtp_pass = "password"


                            That worked with the Not recommended configurations of SSL from my email provider. I'm still not able to use the recommended config using 465 port.



                            This are all the configurations I have tweaked that affects sending mail, if any one else want to try:



                            set ssl_starttls = no # apparently yes is default.
                            set ssl_force_tls = yes
                            set smtp_authenticators = "login"

                            set smtp_url = "smtp[s]://..."
                            set certificate_file = "~/.mutt/certificates" # some recommend creating the file first: mkdir ~/.mutt && touch ~/.mutt/certificates

                            set ssl_verify_host = no
                            set ssl_verify_dates = no






                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Feb 15 at 15:47

























                            answered Feb 15 at 15:12









                            MadacolMadacol

                            11




                            11



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f128004%2fmutt-not-sending-email-when-specifying-smtp-server%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown






                                Popular posts from this blog

                                How to check contact read email or not when send email to Individual?

                                Displaying single band from multi-band raster using QGIS

                                How many registers does an x86_64 CPU actually have?