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

[msmtp-users] 2 domains with msmtp from one PHP?



Hi everybody,

I have msmtp running for some time and like it alot. But now I encountered something which I'm not able to solve by myself - maybe you 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?

I have php (cgi) configured with an php.ini entry to run msmtp:
sendmail_path =sendmail_path = "/usr/bin/msmtp -t -i -d -C /etc/msmtprc-www-data" "/usr/bin/msmtp -t -i -d -C /etc/msmtprc-www-data"

In msmtprc-www-data I have an default account:

# cat /etc/msmtprc-www-data
account default
host smtp.gmail.com
port 587
timeout 30
auth on
user webmaster@...280...
password ****
auto_from off
from webmaster@...280...
maildomain one.de
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /var/log/msmtp.log

Should I use two different accounts with different maildomains? It would be great if one could send me the lines I should put in or point me to some kind of howto or similar to solve this problem.

Any help is greatly appreciated.

Cheers
Frisco