You are not logged in.
Pages: 1
Topic closed
Im trying top get msmtp to play nice with gmail, my account passwords are stored in my .netrc file. So far I keep getting authentication errors when i try to send a test mail (msmtp wait for quite a while, then spews this out):
$ cat blah | msmtp -a gmail ***@****
msmtp: authentication failed (method PLAIN)
msmtp: server message: 535-5.7.1 Username and Password not accepted. Learn more at
msmtp: server message: 535 5.7.1 http://mail.google.com/support/bin/answer.py?answer=14257 j49sm4290067wer.38
msmtp: could not send mail (account gmail from /home/vision/.msmtprc)
Im not asked to enter a password, which suggests that msmtp does find .netrc data just fine, but something else throws it off..
So, here is my .msmtprc:
# Accounts will inherit settings from this section
defaults
auth on
tls on
[ ... ]
# Other account info here
[ .. ]
######################################################
account gmail
host smtp.gmail.com
port 587
protocol smtp
from ***@gmail.com
user ***@gmail.com
tls_trust_file /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt
# Gmail is not the default account..
account default : ***
logfile /var/log/msmtp.log
And here is my .netrc it works file with offlineimap..
machine imap.gmail.com
login ***@***
password ***
machine smtp.gmail.com
login ***@***
password ***
If you can shed some light as to why msmtp doesnt work, please do so ))
Last edited by GalacticArachnid (2010-12-26 19:11:08)
Offline
You need a password entry (blank). This works for me:
.msmtprc
account GMail
host smtp.gmail.com
port 587
protocol smtp
auth on
from jasonwryan@gmail.com
user jasonwryan@gmail.com
password
tls on
tls_nocertcheck
.netrc
machine smtp.gmail.com
login jasonwryan@gmail.com
password **********
Offline
Cheers for the reply jason,
I tried adding a blank password field but that hasn't made a difference unfortunately
Offline
I don't use .netrc, I specify password directly in .msmtprc and it works
account gmail
host smtp.gmail.com
port 587
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
user email_address_here
password password_here
Offline
Did you add
auth on
I seem to recall playing with that option to get it to work...
Offline
Hi, thanks for the replies guys! ))
Yeah, I have set auth on
msmtp does work when the password is entered inside the .msmtp file, but I want my passwords stored in .netrc -> it seems far better to have one file for all this onfo, especially since it's already storing password info for offline imap..
... Also, funny thing..
.netrc contains the smtp password for another account of mine, which seems to work flawlessly with msmtp. But not gmail...
Offline
Try using my .msmtprc entry values, just to get it working, then revert back to your own to find the failure point.
Offline
Gave it a go, but still no luck ((
Offline
What version of msmtp - I'm on 1.4.21-1
Offline
Im on msmtp-1.4.21-1 too.. I have also tried the latest git version from aur but to no avail
Offline
The only other thing I can think of is a conflict with .offlineimaprc - if there are values in .netrc for that file that are fux0ring it. Sorry - I'm out if ideas...
Offline
I use
auth on
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
Offline
IIRC msmtp wont work correctly with gmail passwords that have space. I had the problem and changed the password.
Tamil is my mother tongue.
Offline
Passwords shall never have spaces!
Offline
<offtopic>
Passwords shall never have spaces!
Are there any technical reasons? It thought that it just a special charecter .
</offtopic>
Tamil is my mother tongue.
Offline
I don't know
Offline
Have you tried unlocking the captcha? That worked for me
Offline
have you changed the permissions for .msmtprc?
chmod 600 ~/.msmtprc
Offline
I had the exact same problem. The issue was caused because my password contained a single quote. Replacing it with a different special character fixed it.
Last edited by tlvince (2011-01-02 14:36:43)
Offline
Hello, guys, I was struggling a lot with this until I read this post, I tried many things, but finally, I changed my password, it contained and point and an asterisk and I changed it, only with letters, it is less secure but It works.
Offline
While that's nice to hear that this helped you, please don't necrobump 10 year old threads.
Closing.
Offline
Pages: 1
Topic closed