Page 1 of 1

Help Regarding Bounced Mail

Posted: Fri Feb 23, 2007 4:19 am
by itsmeArry
I am not recieving bounced emails.
Here is the situation:
I have 2 dedicated servers. If I send mail from 2nd server I am recieving bounced mail at the bounced@domain1.com, but when I send mail from the 1st server I am not recieving mails at bounced@domain2.com. I have given the bounced address in the mail header.

I am using PHP 4.3 and Exim is being used on 2nd server and sendmail on Server1

Posted: Fri Feb 23, 2007 4:35 am
by Chris Corbyn
How are you "giving" the bounce-detect address? If you're simp,y setting Return-Path: in the headers it's not reliable. You need to truly MAIL FROM: <> the address at SMTP-time.

Posted: Fri Feb 23, 2007 4:47 am
by itsmeArry
d11wtq wrote:How are you "giving" the bounce-detect address? If you're simp,y setting Return-Path: in the headers it's not reliable. You need to truly MAIL FROM: <> the address at SMTP-time.
I am using php's mail function there I am setting the Return Path. and in Mail From the address is of a particular user.

Posted: Fri Feb 23, 2007 7:24 am
by Chris Corbyn
itsmeArry wrote:
d11wtq wrote:How are you "giving" the bounce-detect address? If you're simp,y setting Return-Path: in the headers it's not reliable. You need to truly MAIL FROM: <> the address at SMTP-time.
I am using php's mail function there I am setting the Return Path. and in Mail From the address is of a particular user.
But, I mean, exactly how. Can you should me the code? You need to pass some extra paramters to mail() for this so that sendmail on UNIX systems doesn't try sending it from the www user.

Code: Select all

"-oi -f " . $return_path
Have you looked at using a mailing library like Swift Mailer?

Posted: Fri Feb 23, 2007 7:47 am
by itsmeArry
d11wtq wrote:
itsmeArry wrote:
d11wtq wrote:How are you "giving" the bounce-detect address? If you're simp,y setting Return-Path: in the headers it's not reliable. You need to truly MAIL FROM: <> the address at SMTP-time.
I am using php's mail function there I am setting the Return Path. and in Mail From the address is of a particular user.
But, I mean, exactly how. Can you should me the code? You need to pass some extra paramters to mail() for this so that sendmail on UNIX systems doesn't try sending it from the www user.

Code: Select all

"-oi -f " . $return_path
Have you looked at using a mailing library like Swift Mailer?
i am using this code:
$returnpath = "bounced@domain2.com"
if ($returnpath)
{
$returnpath = "-f$returnpath";
$res = mail($emailto, $subject, $messagepart, $headers,$returnpath);
}