You are not logged in.
I have decided to make the switch to mutt, and the MTA is the last puzzle piece that I cannot seem to get working on Arch. I was able to get it working just fine on my wife's OpenSuSE box at home, but not on Arch.
I followed this guide: http://wiki.archlinux.org/index.php/Msmtp
Here's my config:
account gmail
host smtp.gmail.com
port 587
protocol smtp
auth on
from <username>@gmail.com
user <username>@gmail.com
password <password>
tls on
tls_starttls on
tls_trust_file /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt //(also tried Thawte cert & no cert check)
Here's my test case & results:
echo "testing msmtp via gmail" | msmtp -a gmail <username>@gmail.com
msmtp: cannot connect to smtp.gmail.com, port 587: Connection refused
msmtp: could not send mail (account gmail from /home/<user>/.msmtprc)
Anyone have any ideas why this isn't functioning when the same config works on my wife's computer?
Thanks
Offline
Don't have gmail set-up with msmtp (though I use it otherwise and keep meaning to set it up), but a few thoughts:
Have you checked that nothing is blocking port 587 between you and Google (like a firewall)?
Edit to add, you could try SSL (which is on a different port and more likely to be open?) too.
Have you checked that the certificate files are there (or the path's correct)?
You could also follow these instructions:
http://msmtp.sourceforge.net/doc/msmtp. … r-Security
and check which file it's looking for.
Last edited by skanky (2010-01-28 16:43:48)
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
Make sure the permissions are 600 on the .msmtp file.
/etc/rc.d/ is where daemons reside. Beware.
Offline
a while back i had to ditch the cert crap.
mine for comparison:
//blue/0/~/ cat .msmtprc
# msmtp config file
# gmail
account gmail
host smtp.gmail.com
port 587
protocol smtp
auth on
from pbrisbin@gmail.com
user pbrisbin@gmail.com
password XXXXX
tls on
tls_nocertcheck
# gmx
account gmx
host mail.gmx.com
port 587
protocol smtp
auth on
from pbrisbin@gmx.com
user pbrisbin@gmx.com
password XXXXX
tls on
tls_nocertcheck
# use gmail as default
account default : gmail
works like a dream.
//github/
Offline
Thanks for the replies.
@skanky:
It's not likely that port 587 is being blocked, because I've used it with other email clients from within my company network, but I suppose it's not impossible. Also tried port 465 with no success. Thanks for the informative link.
@kitty:
Permissions are set to 600. In fact, msmtp refuses to run if it's not.
@brisbin33:
Interesting... using your exact settings (but with my email/passwd), I get the same error "Connection Refused". Same thing happens if I try using port 465. Perhaps this is a bug in the most recent update? I am on version 1.4.19
*sigh*
Offline
Long shot I know, but do you have iptables set-up? If so, could it be something in that config?
Can you telnet to the port(s)?
Two other ones to try are connecting to smtp.googlemail.com and changing your outgoing ip address (Google have been known to be a bit forward in blocking at times).
Otherwise, it might be worth checking on the msmtp mailing list - I haven't found a bug list for the app. yet (though I haven't searched hard).
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
No iptables here.
Tried smtp.googlemail.com with no luck.
Do you mean telnet to smtp.gmail.com on those ports? No, I cannot.
I'll post on the msmtp mailing list. Thanks for all the help.
Offline
No iptables here.
Tried smtp.googlemail.com with no luck.
Do you mean telnet to smtp.gmail.com on those ports? No, I cannot.
I'll post on the msmtp mailing list. Thanks for all the help.
The telnet failure strongly it's not msmtp, as I can telnet to smtp.gmail.com port 587 from here (not an Arch machine).
I'm a bit stuck as to what it can be though, if others on the same network can connect.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
do a traceroute from the borked box and then from a working box, see what's different.
/etc/rc.d/ is where daemons reside. Beware.
Offline
do a traceroute from the borked box and then from a working box, see what's different.
Good idea.
Should've thought of that myself.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
@brisbin33:
Interesting... using your exact settings (but with my email/passwd), I get the same error "Connection Refused". Same thing happens if I try using port 465. Perhaps this is a bug in the most recent update? I am on version 1.4.19
bit of bad news, i'm on the same version and it's working fine. something else is going on .
//github/
Offline
Checked here as well, version 1.4.19-1, and gmail smtp works fine. I changed certificate some time ago and uses this one now:
tls on
tls_starttls on
tls_trust_file /usr/share/ca-certificates/mozilla/Thawte_Premium_Server_CA.crt
I can't see anything wrong either, but I'm just using the plain msmtp as well. There are of course several Thawte certificates in the folder so maybe you did choose another one. I don't even remember if this is one that resided there from the beginning or a certificate I downloaded from VeriSigned, might be.
Last edited by KimTjik (2010-01-29 19:17:28)
Offline
Well that's disheartening. Running a traceroute to smtp.gmail.com never completes - looks like it gets hung up at our corporate firewall or some other point within the corporate network... How lame.
Glad to know it's not a bug in msmtp.
Thanks for the help.
Offline
And this command gives you no output as well?
msmtp --serverinfo --host=smtp.gmail.com --tls=on --port=587 --tls-certcheck=off
Offline
msmtp: cannot connect to smtp.gmail.com, port 587: Connection refused
I just called our corporate office and talked with one of our IT guys and discovered that virtually all outbound traffic is locked down *sigh*. I suppose I can send all personal email via the company smtp server.
Thanks for all the help.
Offline