* Michael Ludwig <mil...@gmx.de> [2010-06-21 21:45:18 +0200]:

> Michael Ludwig schrieb am 21.06.2010 um 17:27 (+0200):
> > Christian Ebert schrieb am 21.06.2010 um 16:50 (+0200):
> > > * Michael Ludwig on Monday, June 21, 2010 at 16:27:52 +0200
> 
> > > > Is the best option to write a shell or Perl script to parse the
> > > > mail, determine the appropriate SMTP server from the "From" line
> > > > (first line of the mail), and then to exec ssmtp with the
> > > > appropriate arguments or configuration file?
> > > 
> > > Might be easier to switch to msmtp which provides this functionality
> > 
> > Thanks - looking into it.
> 
> The msmtp utility appears to do what I want in combination with Mutt 1.4
> and the following configuration:
> 
> set from            = "ad...@gmx.de"    # main address
> set reverse_name    = yes               # use alternates
> set use_from        = yes               # generate From: header
> set envelope_from   = yes               # don't know if relevant here
> 
> Thanks for pointing me at msmtp, very useful!
> -- 
> Michael Ludwig

I use msmtp for gmail and here is how I have it:
defaults
host smtp.gmail.com
port 587
keepbcc on
tls on
tls_trust_file /etc/ssl/cert.pem
logfile ~/.msmtp.log
auth on

account user1
user us...@addy
from us...@addy
password password

account user2
user us...@addy
from us...@addy
password password


In my .muttrc, I have:
set sendmail="/usr/local/bin/msmtp --read-envelope-from"
macro generic "<esc>1" ":set from=us...@addy"
macro generic "<esc>2" ":set from=us...@addy"

Reply via email to