duanjue9889 2013-06-20 06:56
浏览 38
已采纳

PHP强制传输到PostFix

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.

  • 写回答

1条回答 默认 最新

  • douyong5476 2013-06-20 07:05
    关注

    Take a look at php.ini file /etc/php5/apache2/php.ini on debian:

    [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
    

    Uncomment sendmail_from: and set it to your needs.
    Make sure you do:

    service apache2 restart
    

    or

    service httpd restart
    

    to change take effect.
    Hope it helps,
    Mirko

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记