Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] Return-Path overruled by sendmail_from
Hi All,

Not 100% sure if this classifies as a bug because it is PHP behavior getting in the way. When sending an email (inc/functions.php) the header is calculated with a Return-Path entry set to the administrators email address. Cool.

Unfortunately when you set a sendmail_from setting in the php.ini this overrules this return-path in the header and sets it to whatever is in the sendmail_from. That by itself is fine where it not that I have no control over php.ini because this is setup by my provider, and the mail address they put in is of a mailserver that has no DNS MX-record. Certain mailservers (such as that of tiscali) will ignore any email coming from a mailserver that 'doesn't exist'.

The fix was easy enough, I added a:
ini_set("sendmail_from", $mybb->settings['adminemail']);

To the code that overrules the setting in the php.ini and makes sure mybboard does what its supposed to do.

So might be something that is worth actually adding to the product, or maybe trigger on a switch. It may solve some mail problems people may have.

Bastiaan Olij
Sounds like an okay fix/change. I'll ask Chris on this one though first.

Might btw be a good idea aswell to first to a ini_get and only set the value if it does not match the admin address. If I am not mistaken this is an ini setting mostly used for windows anyways.

Bastiaan Olij
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.
Can you try this? Goes in inc/mailhandlers/php.php

Attached Files
.php   php.php (Size: 1.93 KB / Downloads: 389)

Forum Jump:

Users browsing this thread: 1 Guest(s)