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
Help Regarding Bounced Mail
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
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.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.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
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.itsmeArry wrote: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.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.
Code: Select all
"-oi -f " . $return_pathi am using this code:d11wtq wrote: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.itsmeArry wrote: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.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.
Have you looked at using a mailing library like Swift Mailer?Code: Select all
"-oi -f " . $return_path
$returnpath = "bounced@domain2.com"
if ($returnpath)
{
$returnpath = "-f$returnpath";
$res = mail($emailto, $subject, $messagepart, $headers,$returnpath);
}