Hi Martin, Am 14.02.2012 21:25, schrieb Martin Lambers:
Hi!
...u can help me out?
I have a server running php (with lighttpd, not apache) for different domains. I have google mail accounts for the domains. Now I must send mails from domain one.de with another sender then domain two.de How can this be achieved?
...
----------- defaults host ... tls ... log ... account one from webmaster@...280... user webmaster@...280... password *** account two from webmaster@...281... user webmaster@...281... password *** ------------ Now you have multiple options: - if you can use different php.ini files for your domains, you can choose an account with the --account option. - if your php scripts set a 'From' header in each mail depending on the domain (e.g. 'From: webmaster@...280...' and 'From: webmaster@...281...'), you can use the --read-envelope-from option of msmtp. Then msmtp reads this From address and automatically chooses the account that has a matching 'from' command.
thanks alot so far! I don't know how to use different php.inis for my domain - it's one lighttpd running the php-cgis, so I assume that's not possible.
I'll test the --read-envelope-from option of msmtp - is it possible to use placeholders? Like
from *@one.deand msmtp chooses only by domain, so webmaster@...280... would fit as any other mail address from one.de would?
Cheers Frisco