You are not logged in.

#1 2010-07-04 23:36:44

misc
Member
From: Bavaria, Germany
Registered: 2010-03-22
Posts: 115

[SOLVED] msmtp: Gmail sends empty mails, Yahoo ignores "from"

I have recently embarked on the atrocious adventure of migrating from Thunderbird to mutt.

So far however, msmtp has consistently refused to properly send mail. Using

echo "Yet another test" | msmtp -a <account> <test>@gmail.com

with this config

defaults

auth            on
tls             on
tls_starttls    on
tls_trust_file  /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt


# first gmail address

account         gmail
host            smtp.gmail.com
port            587
from            <mail1>@gmail.com
user            <mail1>@gmail.com
password        <pass1>


# second gmail address

account         gmail2 : gmail
from            <mail2>@gmail.com
user            <mail2>@gmail.com
password        <pass2>


# yahoo

account         yahoo
tls_starttls    off
host            smtp.mail.yahoo.de
from            <mail3>@yahoo.de
user            <mail3>
password        <pass3>


# default

account default :   gmail

yields:

1. An empty mail if one of the Gmail accounts is used, including the proper "from" address.
2. A mail with the test sentence if Yahoo is used, but having "youknow@smtp<three digits>.mail.ukl.yahoo.com" as "from".

Any help, please? This is getting really tiresome.

edit: Solution below

Last edited by misc (2010-07-05 16:01:38)

Offline

#2 2010-07-05 00:01:27

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: [SOLVED] msmtp: Gmail sends empty mails, Yahoo ignores "from"

If brisbin33's page comes back up, I highly recommend it. It has a ton of great information, and I configured mine based on that. My msmtprc file contains:

# gmail
account gmail
host smtp.gmail.com
port 587
protocol smtp
auth on
from EMAILNAME@gmail.com
user EMAILNAME@gmail.com
password EMAILPASS
tls on
tls_nocertcheck

account default : gmail

So my suggestion is to try these tls* lines, and add the protocol lines. Other than that, I don't know much about it. brisbin33 uses these forums, so he may be able to help you directly wink

Last edited by jac (2010-07-06 13:32:26)

Offline

#3 2010-07-05 00:14:11

misc
Member
From: Bavaria, Germany
Registered: 2010-03-22
Posts: 115

Re: [SOLVED] msmtp: Gmail sends empty mails, Yahoo ignores "from"

I've tried that, it doesn't change anything, unfortunately. ("protocol smtp" is default anyway, and the tls* lines make it less safe, actually.)

Last edited by misc (2010-07-05 15:57:58)

Offline

#4 2010-07-05 09:02:34

misc
Member
From: Bavaria, Germany
Registered: 2010-03-22
Posts: 115

Re: [SOLVED] msmtp: Gmail sends empty mails, Yahoo ignores "from"

Great. As for Gmail, Thunderbird seems at fault: If I open the mails using Gmail online they are displayed correctly.

However, Yahoo still sends the wrong "from". Could somebody with a working Yahoo msmtp setup please post it?

edit: Awesome. I've just tested it with some other people, they all get empty messages as well.

Last edited by misc (2010-07-05 09:36:22)

Offline

#5 2010-07-05 15:46:01

misc
Member
From: Bavaria, Germany
Registered: 2010-03-22
Posts: 115

Re: [SOLVED] msmtp: Gmail sends empty mails, Yahoo ignores "from"

Alright.

The servers both "malfunction" in their own respective ways if one merely uses "echo <String>" as input.

Instead, what one must write is text in the form of:

To: joe@bloggs.uk
From: j@random.com
Subject: Yet another test

Yadda, yadda, yadda.

E. g. save it as "test" and then exec:

cat test | msmtp -a random joe@bloggs.uk

So please, to all who read this: Never again use "echo 'foobar'" in an example for msmtp.

Last edited by misc (2010-07-05 16:03:20)

Offline

Board footer

Powered by FluxBB