0

So this topic does touch both programming + server world, makes more sense to post it here than serverfault.com..

My postfix server is set up to handle mail differently for each domain on the server, however each domain uses the same IP. So, when mail goes out, postfix is unable to track rev IP correctly to determine the correct domain / transport route.

So next option: some how having PHP include a header or smtp setting to say that this mail is coming from "domain.tld"; and postfix determining the route based on that.

So far, I haven't been able to figure it out yet, some fresh brains on this question would be nice.

4

1 回答 1

1

看看debian上的php.ini文件:/etc/php5/apache2/php.ini

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = me@example.com

取消注释sendmail_from:并将其设置为您的需要。
确保你这样做:

service apache2 restart

或者

service httpd restart

更改生效。
希望它有帮助,
米尔科

于 2013-06-20T07:05:23.520 回答