4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: steveeyes on April 20, 2005, 03:58:43 PM

Title: Bounced emails
Post by: steveeyes on April 20, 2005, 03:58:43 PM
Hi All.

I asked this question before the hack and I did get an answer, but the reply so above my head that I wasn't sure of a solution. Part of the problem may of been I didn't word my problem well. Here goes.

I use 4images to send out newsletters to my members. The problem is, if the email address is invalid or not good, I do not get a bounced email reply. For me, getting this reply is valuable since it tells me if an email is valid or not.

It was easy enough to test, I simply created a user in 4 images with a bogus email (something like xxxxxxxxxxxxxxxxfafafafa444@hotmail.com) and sent it. Also I sent emails to members whose email bounced in other mail servers so I know they were invalid.

At first I thought maybe this is a php problem. However, I downloaded other php programs that had mail functions and they would report a bounced email. It is inconvience to use another program for my newsletter since I would have to keep 2 programs upated -- both 4 images and the other php program.

I'm back to using 4 images as my newsletter program...it sends out emails find, but still not getting that  email telling me if an email bounces. This is important. What I was doing, if I got 3 bounced emails from a member, I called to inquire about a valid email. Without 4 images telling me if an email bounces, I lose this function. Also, if I could not resolve the bounce email issue, I eventually delted the user from 4 images.

Hopefully I explained my problem well enough to ask the following:  Why doesn't 4 images report a bounced email? Is it something to do wth my server? If it is my server, why does  other php programs report a bounce email and not 4 images?

Any help or advise would be appreciated.

thanks in advance for your reply.
Title: Re: Bounced emails
Post by: Nicky on April 20, 2005, 04:25:29 PM
hi,

you are right..

with SMTP option you will get the email that the email does not exist
Code: [Select]
FROM: MAILER-DAEMON@smtp-1.xxxx.at (Mail Delivery System)


This is the Postfix program at host smtp-1.xxxx.at.

I'm sorry to have to inform you that your message could not be
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                        The Postfix program

<asjdhakjshdkasdhkjasd@hotmail.com>: host mx2.hotmail.com[65.54.166.230] said:
    550 Requested action not taken: mailbox unavailable (in reply to RCPT TO
    command)

[HEADERS]
Return-Path: <n@xxxxx.at>
X-Original-To: n@xxxxxx.at
Delivered-To: n@xxxxxx.at
Received: from localhost (localhost [127.0.0.1])
        by smtp-1.xxxx.at (Postfix) with ESMTP id 6DC021741;
        Wed, 20 Apr 2005 16:16:11 +0200 (CEST)
Received: from smtp-1.xxxx.at ([127.0.0.1])
        by localhost (smtp-1 [127.0.0.1]) (amavisd-new, port 10024) with LMTP
        id 11953-02-2; Wed, 20 Apr 2005 16:16:10 +0200 (CEST)
Received: from mail.xxxx.at (XXX.XXX.XXX.XXX.static.xdsl-line.xxxx.at [xx.xx.xx.xx])
        by smtp-1.xxxx.at (Postfix) with SMTP id 0509A1487;
        Wed, 20 Apr 2005 16:16:09 +0200 (CEST)
Subject: blah
To: n@xxxxx.at
From: n@xxxxxx.at
Subject: blah
Message-Id: <20050420141609.0509A1487@smtp-1.xxxx.at>
Date: Wed, 20 Apr 2005 16:16:09 +0200 (CEST)
X-Virus-Scanned: by xxxx.at Virus-Scanner
X-NAS-Bayes: #0: 1.17473E-022; #1: 1
X-NAS-Classification: 0
X-NAS-MessageID: 680
X-NAS-Validation: {755ADAE5-7826-4BEA-8D83-F4FBCA2B7F4C}
[/HEADERS]



without SMTP, there is no error email..

[HEADERS]
Return-Path: <www-data@xxx.at>
X-Original-To: n@xxxx.at
Delivered-To: n@xxxx.at
Received: from localhost (localhost [127.0.0.1])
        by smtp-1.xxx.at (Postfix) with ESMTP id 9BDEF174A
        for <n@xxxx.at>; Wed, 20 Apr 2005 16:19:42 +0200 (CEST)
Received: from smtp-1.xxxx.at ([127.0.0.1])
        by localhost (smtp-1 [127.0.0.1]) (amavisd-new, port 10024) with LMTP
        id 13197-02-2 for <n@xxxx.at>;
        Wed, 20 Apr 2005 16:19:42 +0200 (CEST)
Received: from queuelrelay.xxxx.at (queuerelay.xxxx.at [xx.xx.xx.xx])
        by smtp-1.xxxx.at (Postfix) with ESMTP id 804731575
        for <n@xxxx.at>; Wed, 20 Apr 2005 16:19:42 +0200 (CEST)
Received: from neue-erde.xxxx.at (unknown [xx.xx.xx.xx])
        by queuelrelay.xxxx.at (Postfix) with ESMTP
        id 8786717E369; Wed, 20 Apr 2005 16:19:16 +0200 (CEST)
Received: from www-data by neue-erde.xxxx.at with local (Exim 3.35 #1 (Debian))
        id 1DOG2u-0000gw-00; Wed, 20 Apr 2005 16:19:16 +0200
To: n@xxxx.at
Subject: werwerwe
From: n@xxx.at
Subject: werwerwe
Message-Id: <E1DOG2u-0000gw-00@neue-erde.xxxx.at>
Date: Wed, 20 Apr 2005 16:19:16 +0200
X-Virus-Scanned: by xxxx.at Virus-Scanner
X-NAS-Bayes: #0: 4.34067E-020; #1: 1
X-NAS-Classification: 0
X-NAS-MessageID: 682
X-NAS-Validation: {755ADAE5-7826-4BEA-8D83-F4FBCA2B7F4C}
[/HEADER]
Title: Re: Bounced emails
Post by: steveeyes on April 20, 2005, 09:38:12 PM
Nicky...is there a solution? I called my server and I can't use the SMTP function because they will not turn it on because of the security risk. With the PHP mail, why do I get a reply concerning bounced mail with other pHP programs and not with 4images? Is it a bug in 4images?  I'd appreciate your feedback.

Steve
Title: Re: Bounced emails
Post by: Nicky on April 20, 2005, 10:36:21 PM
can't say you rightnow.. i'll write to Jan

maybe he have a solution for this.
Title: Re: Bounced emails
Post by: V@no on April 21, 2005, 12:55:58 AM
would u sent me email from your script ( seyeevets at vano dot org ), I want check the headers. I suspect it bounces emails to the email address that set in php.ini settings (u can check it with):
Code: [Select]
<?php
 phpinfo
();
?>
Title: Re: Bounced emails
Post by: Chris on April 21, 2005, 01:26:04 AM
V@no has a good point.  I had the very same issue because PHP was setting the  "Return-Path" header incorrectly.  It required a server admin to fix it
Title: Re: Bounced emails
Post by: steveeyes on April 21, 2005, 01:50:52 AM
Vano...I did what you asked....I think??????? Sent you an email from my 4 images. I also created a php file to check the phpinfo. Once I got the phpinfo I had no idea what to look for. It was a lot of information that was greek to me.

Chris,mention he had this problem also.  I need it to be  more specific to know what to look  for and what I should say specifically to my host to fix it. That may sound like asking for too much details, but believe me everytime I call Ipower, I never get anywhere unless I'm specific. I called them today concerning this problem and  the tech I talked to didn't seem to have a glue, so I need to be more specific if I'm going to get them to help me.

Thanks for everyones effort.

steve
Title: Re: Bounced emails
Post by: V@no on April 21, 2005, 02:17:04 AM
yes, as I suspected, your emails are bouncing to nobody@host87.ipowerweb.com instead...

I just found on php.net a comment about this issue with a work around ;)
So, try this: in includes/email.php find:
Code: [Select]
      return (mail($this->to, $this->subject, $this->body, $this->create_header())) ? 1 : 0;Replace with:
Code: [Select]
      global $config;
      return (mail($this->to, $this->subject, $this->body, $this->create_header(), "-f".((empty($this->from_email)) ? $config['site_email'] : $this->from_email))) ? 1 : 0;
Title: Re: Bounced emails
Post by: steveeyes on April 21, 2005, 04:01:27 AM
V@no thanks for your reply. I'm getting the following error:

Parse error: parse error, unexpected ',' in /home/filipina/public_html/4images/includes/email.php on line 172

I found the code with no problem and all I did was copy and paste the code from your post to  replace it with. Uploaded, sent an email and the above error is what I get. Did it several times to be srue I was getting your code right, but got the error each time.

I know it probably is something simple, but my lack of PHP knowledge has me sratching my head.

Steve.
Title: Re: Bounced emails
Post by: V@no on April 21, 2005, 04:10:32 AM
sorry, my bad, was editing the code directly in the reply field :oops:
I've fixed the code above
Title: Re: Bounced emails
Post by: steveeyes on April 21, 2005, 04:37:34 AM
Hey V@no

No errors with the code, but still get no reply for an invalid email. May have to bug my host again and see if they can fix the php.ini file. May I ask what should I tell them to do or how should I explain it.

Don't get me wrong, I really appreciate your effort and welcome any other suggestions....but if it is a server realted problem not sure if we can fix with code. But you are much more of an expert than I, so whatever you recommend is ok with me.

Thanks V@no for going above and beyond....

steve.
Title: Re: Bounced emails
Post by: Chris on April 21, 2005, 04:59:51 AM
PHP was setting the  "Return-Path" header incorrectly.

Simply point out to your host that PHP is setting that header to nobody@host87.ipowerweb.com when it should not be setting it at all
Title: Re: Bounced emails
Post by: V@no on April 21, 2005, 05:39:43 AM
and by the way, nobody asked u what OS is your server using? why do I have a feeling its windows? :?
Title: Re: Bounced emails
Post by: steveeyes on April 21, 2005, 06:01:20 AM
Thanks all for your help.....v@no this is what it says for m server info:

Server Information
Operating System Linux
Perl Version 5.8.0

thanks again.


steve
Title: Re: Bounced emails
Post by: Nicky on April 21, 2005, 09:57:37 AM
V@no here is my phpinfo
http://www.hmm.at/1.php

SERVER_ADMIN  office@hmm.at

does not exist
Title: Re: Bounced emails
Post by: steveeyes on May 31, 2005, 08:05:14 AM
Hi all

I'm revisting this thread still hoping I can solve this issue about bounced emails. My host is no help. For that matter, I bugged them for days about changing the php.ini file and this was the reply they sent me:

Quote
Unfortuantly the php.ini cannot be changed though you can change the script to specify the from address on the emails that will allow for you to recieve the bounce backs. Most php mail scripts have this function by default i suggest contacting the makers of this script to see where you can set this variable.

I'm starting to wonder if Ipower has ever done anything I ask them to. At any rate, this is still open for anyone that may know of a solution to this thread.

Thanks Steve

signed frustrated with my host.
Title: Re: Bounced emails
Post by: V@no on May 31, 2005, 08:42:41 AM
make sure u tryed again the changes I suggested on first page (btw, I just updated it, there was a little mistake I made previosly).

if it fails, then try insert in global.php above:
Code: [Select]
$msg = "";this:
Code: [Select]
ini_set("sendmail_from", $config['site_email']);
and if it still fails, then send this to your hoster:
Quote
The user that the webserver runs as should be added as a trusted user to the sendmail configuration to prevent a 'X-Warning' header from being added to the message when the envelope sender (-f) is set using this method. For sendmail users, this file is /etc/mail/trusted-users.
(reference (http://php.net/manual/en/function.mail.php))


P.S. sendmail_from is what u are looking for, not SERVER_ADMIN setting ;)
Title: Re: Bounced emails
Post by: steveeyes on May 31, 2005, 02:39:45 PM
Thanks V@no, I'll give it a try and let you know what happens.

Thanks again for you great support

steve