Discussion:
Postfix multip domain configuration
(too old to reply)
h***@gmail.com
2014-01-12 20:46:45 UTC
Permalink
Hi,

I am a beginner with postfix.
I have a small server with postfix
I use php mail to send the e-mails.
I want to add a second domain.

I added a virtual domain in main.cf
if I try to send an e-mail with my second domain, the sender address is my first domain's address.

Can anyone help me ?

Best regards
Lemat
2014-01-15 17:03:45 UTC
Permalink
Post by h***@gmail.com
Hi,
I am a beginner with postfix.
I have a small server with postfix
I use php mail to send the e-mails.
I want to add a second domain.
I added a virtual domain in main.cf
if I try to send an e-mail with my second domain, the sender address is my first domain's address.
Can anyone help me ?
php mail() function will use www-data/apache/nobody user and $myorigin from postfix to construct return-path email address.

you can change this default behavior in apache configuration:
<virtualhost ...>
...
<directory ...>
...
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f ***@domain.example"
</directory>
</virtualhost>

or use something like phpmailer, which does full smtp session using tcp connection
Loading...