Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-21-2003, 07:34 AM   #1
Registered: Apr 2001
Posts: 60

Rep: Reputation: 15
php mail script return path

I have a php script that automatically mails people with updates.

It is not spam.

I have been getting the AOL mails bounce back as suspected spam.
On looking at the message source the return path might be the problem. The following is part of the source.

Return-path: <>
Envelope-to: joebloggs@mailaddress
Delivery-date: Thu, 21 Aug 2003 12:12:34 +0100
Received: from [] (
by with esmtp (Exim 4.10)
id 19pnMk-0006xF-00
for joebloggs@mailaddress; Thu, 21 Aug 2003 12:12:30 +0100
Received: by (Postfix, from userid 30)
id 2C492542FA; Thu, 21 Aug 2003 12:13:39 +0100 (BST)
To: joebloggs@mailaddress
Subject: Norton-Hall & Co. Clients email update service.
Message-Id: <>
Date: Thu, 21 Aug 2003 12:13:39 +0100 (BST)

I set Return-path in the php script as my email address but it the mail seems to actually pick up my machine on my domain as the return path. Is there any way of correcting this (it is not practical to change the domain - possible but not practical. Any suggestions much appreciated.

Old 08-22-2003, 05:10 AM   #2
Registered: Apr 2001
Posts: 60

Original Poster
Rep: Reputation: 15
I didn't get a reply but on further investigation, if any one is interested. I have found that adding a 5th argument to the mail() function with the return path and an -f flag replaces as the return path with the variable ie
-f$myaddress variable. This only works in php 4.05 onward.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Squerril mail login.php path problem tkmuthuvel Linux - Networking 1 10-13-2005 11:26 PM
What is wrong with my mail script?(PHP) Alexander.s Programming 2 05-16-2005 05:18 AM
Php to return a binary not html logicdisaster Programming 3 10-07-2004 02:25 PM
Is it possible to return variables from a script? pedrosan Linux - Newbie 6 04-20-2004 06:51 AM
Sendmail return path dj_relentless Linux - General 2 06-07-2002 07:40 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration