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

Re: [msmtp-users] Choose account based on From:



On Fri, 28. Sep 2007, 09:10:11 -0400, Axel Hansen wrote:
> > > Is there a way for msmtp to look at the From: header of the message
> > > being sent?
> >
> > Emanuele Giaquinta sent a patch for this purpose just yesterday. I plan
> > to integrate it early next week (a little bit of configuration code
> > needs to be written).
> >
> Yay :-D  Please let me know when you put the patch up.

The work is not finished yet, and I currently don't have the time to
do this myself.

I have put Emanuele's path here:
http://www.marlam.de/msmtp.diff

Maybe someone is interested to work on this?

Some suggestions: 

I like the additional 'int flags' argument to msmtp_read_recipients(). The
function should probably be renamed to msmtp_read_addresses() or similar.

The FLAG_TMP flag is probably wrong, because we always have to store the
headers in a temporary file if we read addresses from them.

We could modify the --auto-from option and auto_from command to accept a
new value 'header' and retain backward compability:

auto_from = off:
No automatic envelope from address.
auto_from = on | user:
Create envelope from address from the user name and possilby the
maildomain command.
auto_from = header:
Read the envelope from address from the From: header.


Martin