Problems sending using msmtp and mutts built in smtp
Hello all. New to mutt and to the mailing list. I have mutt working as far as being able to fetch my emails from an IMAP mail srver that I run. The issue is I can not send emails despite several nights trying to get the thing to work. Below is my .muttrc #muttrc by martin thanks to brisbin set realname = "Martin De" set imap_user = "mar...@mailserver.com" set folder=imaps://mail.mailserver.com:8993/ set spoolfile=+INBOX set record=imaps://mail.mailserver.com/Sent set imap_check_subscribed set certificate_file = ~/.mutt/cert_file # where to store certs set mailcap_path = ~/.mutt/mailcap # entrys for filetypes source ~/.mutt/colours set from="mar...@mailserver.com" #set sendmail = "/usr/bin/msmtp -a home -X /home/martin/.newmsmtp.log" #set ssl_verify_host = no #set ssl_verify_dates = no set use_from=yes set envelope_from=yes set my_user=mar...@mailserver.com set smtp_url=smtps://mar...@mailserver.com@mail.mailserver.com:8465/ set ssl_force_tls = yes # main options set beep_new # terminal bell on new message unset confirmappend # don't ask, just do set delete # don't ask, just do set mail_check = 0 # minimum time between scans unset markers # no ugly plus signs unset mark_old # read/new is good enough for me set menu_scroll # scroll in menus set pager_index_lines = 10 # number of index lines to show set pager_context = 5 # number of context lines to show set pager_stop # don't go to next message automatically set pipe_decode # strip headers and eval mimes when piping set reverse_alias # show names from alias file in index #set sort = threads # like gmail #set sort_aux = reverse-last-date-received # like gmail #unset sort_re # always thread set thorough_search # strip headers and eval mimes before searching set thread_received # sort threads by date received, not sent set tilde # show tildes like in vim set timeout = 3 # idle time before scanning unset wait_key # don't show "Press any key to continue" unset resolve # stops attachjments being downloaded # sidebar settings ### set sidebar_visible = yes set sidebar_width = 25 set sidebar_delim = '|' set status_format = "-%r- %v --+/ %f %m%?n? [+%n]?%?d? [-%d]?%?t? [*%t]? /%?p?---/ %p waiting to send /?-%>-(%P)---" # colors color sidebar_new brightyellow black # sidebar bindings bind index,pager \CJ sidebar-next bind index,pager \CK sidebar-prev bind index,pager \CB sidebar-open This fails with the following error. "SSL failed: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol" I have tried also using msmtp, this gives me the same error. My .msmtprc is below account home host mail.mailserver.com port 8465 protocol smtp logfile /home/martin/.newmsmtp.log auth plain user mar...@mailserver.com from mar...@mailserver.com tls on tls_certcheck off tls_starttls off tls_force_sslv3 on account default : home It gives me the exact same error, in fact, it doesn't even prompt me for a password which I would have thought t would have. I have now tried the same config on two different mutt builds in archlinux (see link following to my post on arch linux forums https://bbs.archlinux.org/viewtopic.php?id=141204) and both builds have the same error mentioned above despite some helpful input from the archlnux community. On a possibly related note the self-signed SSL cert will not save despite me selecting "a" when prompted during the retrieval of my email - perhaps this is a related error or something? Can someone possibly give me some guidance on how to fix this problem? Is there anything else I can provide that will help you help me? Thank you all. Martin
Re: Problems sending using msmtp and mutts built in smtp
On Sat, May 12, 2012 at 12:34 AM, Grant Edwards wrote: > On 2012-05-11, Chris Burdess wrote: >> Martin De'Pannone wrote: >>> I have mutt working as far as being able to fetch my emails from an >>> IMAP mail srver that I run. The issue is I can not send emails >>> despite several nights trying to get the thing to work. >> >> Presumably it bails before it even gets to authentication. Are you >> absolutely sure that mail.mailserver.com is running smtps on port 8465? >> You could try with some other clients like evolution for instance. It >> may well be running plain SMTP with the option to STARTTLS, which is no >> less secure - try telnetting to that port and seeing. > > The "openssl s_client -connect " command can be awfully > useful when diagnosing stuff like this... > > http://qmail.jms1.net/test-auth.shtml > > -- > Grant Edwards grant.b.edwards Yow! I want to mail a > at bronzed artichoke to > gmail.com Nicaragua! > Hi Grant. My mail server lives behind a proxy but as I can send on ther mail clients (thunderbird) and can send using msmtp from the CLI direct I'm not sure there is a problems with my mail server. IN any event, here is the result of the openssl command you suggested [martin@thinkpad ~]$ openssl s_client -connect mail.myserver.com:8465 CONNECTED(0003) depth=0 CN = Dash.local.kiwiland.net.nz verify error:num=18:self signed certificate verify return:1 depth=0 CN = Dash.local.kiwiland.net.nz verify return:1 --- Certificate chain 0 s:/CN=Dash.local.kiwiland.net.nz i:/CN=Dash.local.kiwiland.net.nz --- Server certificate -BEGIN CERTIFICATE- MIIBwTCCASoCCQCyPX4HrwWYtTANBgkqhkiG9w0BAQUFADAlMSMwIQYDVQQDExpE YXNoLmxvY2FsLmtpd2lsYW5kLm5ldC5uejAeFw0xMTEyMjQwODE2NDdaFw0yMTEy MjEwODE2NDdaMCUxIzAhBgNVBAMTGkRhc2gubG9jYWwua2l3aWxhbmQubmV0Lm56 MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDnkjC490hZsqtnT4i9x279JMpG xYZKCwcAeB25fdRtsJa84Dvstu2ZT+uY9wM57BjGFfKWTVoVpFSWjnWMTD12eXg/ ZCAGAZkVI+lY6ZHkZB9J8y4hd57J5cZutbpOnGGoZ0VOjhCPLUAnnQvMNj05sD11 LmVTMGpcEU3ooyZYzwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFI1W3Y9ZVqu0fzI zJQRXtNQfPHG7TYvos5q1dMxwhOFanQNr5PyHqAA7kDrWjvTLjPNtz8NzNml5wqZ FgTn0lcQaUJfbtwOnhqyu98HGzZ8j7F6XwULY6PkcQ8gdpuvhyrN1u1XdYmKHjPg SkN/uTSYwmjK546vdbwZs18stkZw -END CERTIFICATE- subject=/CN=Dash.local.kiwiland.net.nz issuer=/CN=Dash.local.kiwiland.net.nz --- No client certificate CA names sent --- SSL handshake has read 1171 bytes and written 426 bytes --- New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA Server public key is 1024 bit Secure Renegotiation IS supported Compression: zlib compression Expansion: zlib compression SSL-Session: Protocol : TLSv1 Cipher: DHE-RSA-AES256-SHA Session-ID: 7C7CFDF7F75D12E6B56AA06237C597B9B23D4F5194F4470F6EA62527149F26CC Session-ID-ctx: Master-Key: 508DED69B38206B389BFCE7CB6E66EFFEBA1D8571CDDA2825706CA77F9DA75C8ABFCDA9A56384B3BA682BDA6BA8BAEF5 Key-Arg : None PSK identity: None PSK identity hint: None SRP username: None TLS session ticket: - c2 e6 d3 66 11 a3 58 f6-30 00 8b 23 cc 3a 96 b6 ...f..X.0..#.:.. 0010 - 9b 8f bc 65 05 78 27 cb-cb ac 23 b7 4f 84 82 6c ...e.x'...#.O..l 0020 - 7b 69 09 25 e7 c4 7f 21-23 ff 71 12 0a 79 33 29 {i.%...!#.q..y3) 0030 - 53 39 26 8d e2 a8 fe 7f-e5 78 fd 5d b8 24 9c ac S9&..x.].$.. 0040 - c7 aa 97 91 f3 8e d4 fe-90 f4 be e8 ae 10 9d 97 0050 - 61 25 13 15 fb 14 1f 4a-cc 3f f9 42 48 25 9b dc a%.J.?.BH%.. 0060 - 56 79 67 d8 44 42 51 fb-54 35 8a 82 1f 79 f0 a2 Vyg.DBQ.T5...y.. 0070 - 55 62 10 f2 b2 ea 05 97-77 e0 6f 14 94 7b 37 a5 Ub..w.o..{7. 0080 - ba c1 1f 36 1c c3 c2 b9-17 ac a9 d6 46 a1 e1 70 ...6F..p 0090 - 02 10 68 2c ab 0e 16 3a-9b a1 7e 06 d6 db 65 32 ..h,...:..~...e2 Compression: 1 (zlib compression) Start Time: 1336776190 Timeout : 300 (sec) Verify return code: 18 (self signed certificate) --- 220 mail.myserver.com ESMTP Postfix (Would_you_like_to_play_a_game) Hope this helps.
Re: Problems sending using msmtp and mutts built in smtp
Hi Brian. I guess there are various ways to have the .muttrc and .msmtprc set up. My understanding is the -a switch specifies the account name to use if your .msmtprc has more than one (which mine does). As requested, here is the .msmtprc FY, tried sending an email from the CLI direct with msmtp specifying my home email address and it worked fine. account home host mail.myserver.com port 8465 protocol smtp logfile /home/martin/.newmsmtp.log auth plain user mar...@myserver.com from mar...@myserver.com tls on tls_certcheck off tls_starttls off tls_force_sslv3 on account default : home account gmail host smtp.gmail.com port 587 protocol smtp auth on from mar...@myserver.com tls on tls_nocertcheck Regards M On Sat, May 12, 2012 at 5:37 AM, Brian Salter-Duke wrote: > On Fri, May 11, 2012 at 10:33:33PM +0800, Martin De'Pannone wrote: >> Hello all. >> >> New to mutt and to the mailing list. >> >> I have mutt working as far as being able to fetch my emails from an >> IMAP mail srver that I run. ?The issue is I can not send emails >> despite several nights trying to get the thing to work. >> >> Below is my .muttrc >> >> >> #muttrc by martin thanks to brisbin >> >> >> set realname = "Martin De" >> set imap_user = "mar...@mailserver.com" >> set folder=imaps://mail.mailserver.com:8993/ >> set spoolfile=+INBOX >> set record=imaps://mail.mailserver.com/Sent >> set imap_check_subscribed >> set certificate_file ? ?= ~/.mutt/cert_file ? ? ? ? ? ? ? ? # where to >> store certs >> set mailcap_path ? ? ? ?= ~/.mutt/mailcap ? ? ? ? ? ? ? ? ? ? ? # >> entrys for filetypes >> source ~/.mutt/colours >> set from="mar...@mailserver.com" > >> #set sendmail = "/usr/bin/msmtp -a home -X /home/martin/.newmsmtp.log" > > I think after "-a" you need your mail account name. e.g. x...@gmail.com. > What is in your .msmtprc file? The account and logfile are best put > there. > > Brian. > >> #set ssl_verify_host = no >> #set ssl_verify_dates = no >> set use_from=yes >> set envelope_from=yes >> set my_user=mar...@mailserver.com >> set smtp_url=smtps://mar...@mailserver.com@mail.mailserver.com:8465/ >> set ssl_force_tls = yes >> >> >> >> # main options >> >> ? set beep_new ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?# >> terminal bell on new message >> unset confirmappend ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # >> don't ask, just do >> ? set delete ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?# >> don't ask, just do >> ? set mail_check ? ? ? ? ?= 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # >> minimum time between scans >> unset markers ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # no >> ugly plus signs >> unset mark_old ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?# >> read/new is good enough for me >> ? set menu_scroll ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # >> scroll in menus >> ? set pager_index_lines ? = 10 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?# >> number of index lines to show >> ? set pager_context ? ? ? = 5 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # >> number of context lines to show >> ? set pager_stop ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?# >> don't go to next message automatically >> ? set pipe_decode ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # >> strip headers and eval mimes when piping >> ? set reverse_alias ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # >> show names from alias file in index >> #set sort ? ? ? ? ? ? ? ?= threads ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # like gmail >> #set sort_aux ? ? ? ? ? ?= reverse-last-date-received ? ? ? ? ? ?# like gmail >> #unset sort_re ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # >> always thread >> ? set thorough_search ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # >> strip headers and eval mimes before searching >> ? set thread_received ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # >> sort threads by date received, not sent >> ? set tilde ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # >> show tildes like in vim >> ? set timeout ? ? ? ? ? ? = 3 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # >> idle time before scanning >> unset wait_key ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?# >> don't show "Press any key to continue" >> unset resolve ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?# >> stops attachjments being downloaded >> >> # sidebar settings >> ### >&g