wrong return-path

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
rydor63
Registered User
Posts: 2
Joined: Mon Aug 23, 2010 9:52 am

wrong return-path

Post by rydor63 »

I am using a phpbb-Board 3.0.7-PL1

According to 3.2.2.2 (Email settings) i set Contact email address and Return email address to a valid email adress. Both to xxx@xxxxx.com

User, which register, receive an email. In the header of this email

Code: Select all

From: <xxx@xxxxx.com>
Reply-To: <xxx@xxxxx.com>
Sender: <xxx@xxxxx.com>
is correct. But Return-path shows a wrong value

Code: Select all

Return-Path: www-data@yyyy.yyyyy.yy
(yyyy.yyyyy.yy is the URL of the forum)

I don't know, how to change this into

Code: Select all

Return-Path: xxx@xxxxx.com
I need a hint.
Last edited by ric323 on Tue Aug 24, 2010 10:33 pm, edited 1 time in total.
Reason: Topic icon changed

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51928
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: wrong return-path

Post by Brf »

functions_messenger is setting the return-path like this:

Code: Select all

		$headers[] = 'Reply-To: ' . $this->replyto;
		$headers[] = 'Return-Path: <' . $config['board_email'] . '>';
		$headers[] = 'Sender: <' . $config['board_email'] . '>';
Therefore, it is set to the same thing as the sender. If you are seeing anything else in there, that is being set by your mail server.

rydor63
Registered User
Posts: 2
Joined: Mon Aug 23, 2010 9:52 am

Re: wrong return-path

Post by rydor63 »

Yepp. This has been the solution. I changed the settings to smtp and everything is fine now. Thank you.

User avatar
gianluigi.zanettini
Registered User
Posts: 109
Joined: Fri Sep 07, 2007 9:09 pm
Location: Ferrara, Italy
Contact:

Re: wrong return-path

Post by gianluigi.zanettini »

Hi,
sorry to revive an old topic but I found this thread looking for the same issue with phpBB 3.1.4.

For me, switching from the "send via mail function" is not doable, so I started digging because this problem is messing with my SFP validation.

The puzzling aspect for me is that all the other PHP script on my server send mail with the correct return-path - phpBB is the only one with this problem.

To fix the problem, I had to change the function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg) found in includes/functions_messenger.php:

from:

Code: Select all

$result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers);
to:

Code: Select all

$result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers,, "-f" . $config['board_email']);
This fixed the problem, but I don't want to patch phpBB core like this. I proposed this as a bug.

HTH!

User avatar
Lumpy Burgertushie
Registered User
Posts: 67222
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: wrong return-path

Post by Lumpy Burgertushie »

doesn't seem to be a problem for others. I doubt it would be a bug, probably just something strange in the way your particular server is setup.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?

User avatar
gianluigi.zanettini
Registered User
Posts: 109
Joined: Fri Sep 07, 2007 9:09 pm
Location: Ferrara, Italy
Contact:

Re: wrong return-path

Post by gianluigi.zanettini »

Actually, I'm not the only one with this problem ;) BTW, that bug is opened since 07/Feb/11....?

User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: wrong return-path

Post by Oyabun1 »

Then it is a bug and not a support issue.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

User avatar
wolfbeast
Registered User
Posts: 68
Joined: Sat Aug 10, 2013 1:24 am

Re: wrong return-path

Post by wolfbeast »

gianluigi.zanettini wrote:This fixed the problem, but I don't want to patch phpBB core like this. I proposed this as a bug.

HTH!
It helped!
Also.. I do hope the devs are planning to fix this. It's something anyone with a proper no-relay mail server setup will run into if the server name and system account happens to be different than the board e-mail (a very common thing on VPSes, for example) and the mail server refuses to deliver as a result (with no error back to the board because it ends up in the sendmail logs...)

dhaupin
Registered User
Posts: 2
Joined: Fri Mar 25, 2016 3:21 pm

Re: wrong return-path

Post by dhaupin »

Why is this not fixed yet? You are now even higher version and this 5 year old bug is STILL open. Correct return path is a big deal, and takes literally 5 seconds to put it in RC core. It is amateur to leave it like this for 5 years considering the simplicity of the fix and the large PhpBB userbase. So what's the holdup?

User avatar
AmigoJack
Registered User
Posts: 5697
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: wrong return-path

Post by AmigoJack »

PHP's safe_mode disables the possibility using additional parameters at all - in that case you'd have to configure sendmail.ini yourself, which is outside of phpBB scope, of course.

The code changes are incompatible once the board configuration is switched to use smtpmail().
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

User avatar
gianluigi.zanettini
Registered User
Posts: 109
Joined: Fri Sep 07, 2007 9:09 pm
Location: Ferrara, Italy
Contact:

Re: wrong return-path

Post by gianluigi.zanettini »

safe_mode was removed since PHP 5.4. I think is (about) time to move on, isn't it?

dhaupin
Registered User
Posts: 2
Joined: Fri Mar 25, 2016 3:21 pm

Re: wrong return-path

Post by dhaupin »

Aye, its time to move on and modernize phpBB in some places. Safe_mode is removed in php 5.4, which is EOL and no longer receiving security updates anyways. So whynot just do a check for that safe_mode flag, or a version check for PHP if its that big of a deal (i dont think it is)? This increases patch labor by .005% and may add extra 5 seconds to type an IF statement.

Historically: Not many use(d) safe_mode either since it was A) useless since there are sh scripts available or plenty of XSS to snag DB, and B) we live in a world of containers, standard FS cages, perm/sh jailing, & asset lockdown. Historically, safe_mode did nothing to prevent *most* cross account haxorings, hence it was disabled by default and most had no reason to enable it....you're catering to a very very very small amount of people that are at security risk anyways for using it on a EOL version of PHP. Make them edit the ini, dont hold back the rest of the world instead ;)

Note: On the php.net page for safe_mode it states that OS/webserver is not able to efficiently mitigate securities in multi-tennant servers -- this is false now. See Cloudlinux (among others). The lockdown levels in Cloudlinux are fine art, making safe_mode look like preschool finger painting projects. All serious hosts use that or something equiv in their multi-tenant env's, and surely dont even have safe_mode available in their version build of [supported] php.

Locked

Return to “[3.0.x] Support Forum”