I'm not sure exactly what version it was introduced, but I use reply-hook to source different profiles to do what you're describing. The earliest version I have used is 1.5.18, but it appears you are on 1.4.2 so I cannot say for sure whether that will work or not for you.
-- Alek Rollyson On Mon, Jun 21, 2010 at 04:27:52PM +0200, Michael Ludwig wrote: > I send mail using ssmtp (a simple standalone SMTP library) and one of > the SMTP servers for the different freemail addresses I have. > > When receiving an email to [email protected], I'd like to reply using that > as the From line, and also the corresponding SMTP account, of course. > Same thing for [email protected], [email protected] and so on. > > set from = "[email protected]" # main address > set alternates = "^([email protected]|[email protected]|[email protected])$" > set use_from = yes # generate From: header > set reverse_name = yes # use alternates when replying > > This seems to set my sender address as desired. But in order for the > mail to get accepted by the SMTP server, I have to select matching > SMTP server settings (addr1 account for addr1 etc), and I can't seem > to figure out how to change the sendmail command based on the sender > address. A send-hook, for instance, is for "Chang[ing] settings based > upon message recipients", which is fine, but not what I beed in this > case. > > 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? > > -- > Michael Ludwig
pgpAbxUKeXlyH.pgp
Description: PGP signature
