Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Wrong Return-path stops messages from php-fusion in one of two e-mail-providers in Denmark..

by Jens Solvang, Last updated on 5 years ago in Suspected Bugs and Errors - 8
URL to your site: www.byogland-nyborg.dk
Version of PHP-Fusion: 7.02.07
Any mods you've made to your site: Added some drop-down menus in the theme Revision. Added æ,ø,å,ü, ä, Æ,Ø,Å,Ü,Ä in the list of letters which are allowed to use in the user names.
Version of PHP: version 5.4
Version of MySQL: 5.0
Have you searched for your problem: (yes/no): Yes
If so, what terms did you try: a forwarded email caught by the e-mail-hostfilter
State the nature of your problem: I have made an e-mail info@byogland-nyborg.dk at my host (Surftown). I want to forward this message from my host www.surftown.dk to another e-mail.
I have tried two e-mails. It turns out that the main danish host www.tdc.dk is rather strict and stops the message. I have tried another host www.wannafind.dk and here the forwarded message arrived without problems.

I have asked tdc and here I get the answer that tdc does not allow Return-Path to be an account at surftown (tsbhhed@ws18.surf-town.net). It has to be an e-mail adress for eksampel info@byogland-nyborg.dk.

Return-Path: <tsbhhed@ws18.surf-town.net> makes the filter stop the message going through tdc - but not through wannafind.dk.

I have problems recieving other messages from php-fusion. Annoncement of a new private message and a new answer in a forum. May be it is the same problem other in other e-mails from byogland-nyborg.dk.

How can the script be changed so that I get the messages?

Here is an exampel.

Return-Path: <tsbhhed@ws18.surf-town.net>
Delivered-To: info@byogland-nyborg.dk
Received: (qmail 17353 invoked by uid 399); 3 Dec 2013 11:15:42 -0000
Received: from mail2.surf-town.net (HELO mailgw11.surf-town.net) (
by with ESMTPM; 3 Dec 2013 11:15:42 -0000
Received: by mailgw11.surf-town.net (Postfix, from userid 65534)
id A095DA3B57; Tue, 3 Dec 2013 12:15:42 +0100 (CET)
Received: from localhost (localhost [])
by mailgw11.surf-town.net (Postfix) with ESMTP id 90015A3B43
for <info@byogland-nyborg.dk>; Tue, 3 Dec 2013 12:15:42 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at mailgw11.surf-town.net
X-Spam-Flag: NO
X-Spam-Score: 0.001
X-Spam-Status: No, score=0.001 tagged_above=-999 required=7
tests=[RCVD_IN_DK=0.001] autolearn=disabled
Received: from mailgw11.surf-town.net ([])
by localhost (mailgw11.surf-town.net []) (amavisd-new, port 10024)
with LMTP id NoUKky4ZrCc8 for <info@byogland-nyborg.dk>;
Tue, 3 Dec 2013 12:15:40 +0100 (CET)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mailout3.surf-town.net (mailout3.surf-town.net [])
by mailgw11.surf-town.net (Postfix) with ESMTP id 2AB2FA3B2B
for <info@byogland-nyborg.dk>; Tue, 3 Dec 2013 12:15:39 +0100 (CET)
Received: from localhost (localhost [])
by mailout3.surf-town.net (Postfix) with ESMTP id B9D5323209
for <info@byogland-nyborg.dk>; Tue, 3 Dec 2013 12:15:39 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at mailout3.surf-town.net
Received: from mailout3.surf-town.net ([])
by localhost (mailout3.surf-town.net []) (amavisd-new, port 10028)
with LMTP id ZoV8dDb9u9Q5 for <info@byogland-nyborg.dk>;
Tue, 3 Dec 2013 12:15:37 +0100 (CET)
Received: from ws18.surf-town.net (ws18.surf-town.net [])
by mailout3.surf-town.net (Postfix) with SMTP id 848B7227D9
for <info@byogland-nyborg.dk>; Tue, 3 Dec 2013 12:15:35 +0100 (CET)
Received: by ws18.surf-town.net (sSMTP sendmail emulation); Tue, 3 Dec 2013 12:15:35 +0100
To: "e-konto for byogland-nyborg.dk" <info@byogland-nyborg.dk>
Subject: Videresendelse via tdc
X-PHP-Script: byogland-nyborg.dk/contact.php for
Date: Tue, 3 Dec 2013 11:15:35 +0000
From: Jens Bruger -byogland <jsolvang@post.tele.dk>
Reply-To: Jens Bruger -byogland <jsolvang@post.tele.dk>
Message-ID: <aff36ba73136c838a279dc186577aa01@byogland-nyborg.dk>
X-Priority: 3
X-Mailer: PHPMailer 5.2.1 (http://code.google.com/a/apache-extras.org/p/phpmailer/)
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="iso-8859-1"
Maybe this is the answer:
The correct way to set returnpath (as of july 2013) is by using:


the phpmailer source contains the following, which is why I think $mail->Sender worked

if ($this->ReturnPath) {
$result .= $this->HeaderLine('Return-Path', '<'.trim($this->ReturnPath).'>'wink;
} elseif ($this->Sender == ''wink {
$result .= $this->HeaderLine('Return-Path', '<'.trim($this->From).'>'wink;
} else {
$result .= $this->HeaderLine('Return-Path', '<'.trim($this->Sender).'>'wink;
Found here: http://stackoverflow.com/questions/3467564/changing-the-return-path-using-phpmailer

And maybe this could be implemented by changing sendmail_include.php too.
Jan Mølgård
PHP-Fusion, Denmark
Phone: 004528966794
Mail: janmol@wordit.dk
Mail: janm@janm.dk

Testsite version 9: http://php-fusion.dk/fusion_9_test/
You can view all discussion threads in this forum.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
Users who participated in discussion: janmol, Jens Solvang