On Wed, 15 Feb 2012 20:43:55 +0100, A. Bischof wrote:
> Am 15.02.2012 19:18, schrieb Martin Lambers:
> > On Wed, 15 Feb 2012 19:02:32 +0100, A. Bischof wrote:
> >>>> 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 [email protected]
> >>> user [email protected]
> >>> password ***
> >>>
> >>> account two
> >>> from [email protected]
> >>> user [email protected]
> >>> 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: [email protected]' and 'From:
> >>> [email protected]'), 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.
> 
> Martin,
> 
> I can't get it working, would you mind having a look what's wrong?
> 
> I call from cgi/php.ini with --read-envelope-from:
> sendmail_path = "/usr/bin/msmtp -t -i -d --read-envelope-from -C 
> /etc/msmtprc-www-data-multidomain"
> 
> (or should I put "read-envelope-from on" in the config file under
> defaults?
> 
> My config files belongs to www-data and now looks like you suggested:
> # cat msmtprc-www-data-multidomain
> defaults
> tls on
> tls_starttls on
> tls_trust_file /etc/ssl/certs/ca-certificates.crt
> logfile /var/log/msmtp.log
> auto_from off
> host smtp.gmail.com
> port 587
> timeout 30
> auth on
> 
> account rheinsinn
> #auto_from off
> #read-envelope-from on
> from [email protected]
> #maildomain rheinsinn.de
> user [email protected]
> password ****
> 
> 
> account coaching-evaluationen
> #auto_from off
> #read-envelope-from on
> from [email protected]
> #maildomain coaching-evaluationen.de
> user [email protected]
> password ****
> 
> The webscript tells me that the mail function couldn't initialized -
> if I switch back to my old config it works.
> 
> Any clues?

What gets logged in /var/tmp/msmtp.log? What are the error messages?

Martin

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
msmtp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msmtp-users

Reply via email to