[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[msmtp-users] msmtp and gmail smtp



My ISP (CableOne) is moving all email to Gmail. I have two email accts, one for private email and one for maillists/etc., and need msmtp to send email to the correct gmail smtp account.
I use mutt, msmtp, fetchmail, and procmail for all email. Here is my .msmtprc file that I'm trying to use:

defaults
host smtp.gmail.com
port 587
keepbcc on
tls on
tls_trust_file /etc/ssl/cert.pem
logfile ~/.msmtp.log

#account user1
#host smtp.gmail.com
auth on
user user1@...233...
from me
password xxxxxx

#account user2
#host smtp.gmail.com
auth on
user user2@...233...
from me
password xxxxx

# Set a default account
account default



My .muttrc contains:
macro generic "<esc>1" ":set from=user1@...233..."
macro generic "<esc>2" ":set from=user2@...233..."


When I create an email from user1, the mail gets sent properly with the correct From: header. However, when I create email as user2, msmtp or gmail sends it out witht the From: header set to user1 :(

Am I missing something in my .msmtprc file so that mail sent as user2 will display From: user2 in their mail instead of From: user1?

TIA