Author Topic: Emailing stopped suddenly  (Read 7838 times)

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Emailing stopped suddenly
« Reply #15 on: February 10, 2005, 03:09:06 pm »
There was a fix for this a few weeks ago.  Are you sure you are on the latest files from the member area?  There should be a $nouser variable in admin.php that causes the program to skip users who are no longer there.
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Top priority. In progress.
« Reply #16 on: February 16, 2005, 02:14:29 am »
Okay, I have access to a sendmail system now, but am having troubles re-creating the issue.

I'm seeing a range of reported errors from you guys:

The first one is from amy1, who started this thread:

Quote
Sending Mail  of 1018..
PIPELINE-FROMmsg=250 ok .
RCPT TO: <[redacted]@speakeasy.net>
RCPTmsg=554 Sorry, no mailbox here by that name. (#5.1.1)
DATAmsg=503 RCPT first (#5.5.1) .

Sending error. Check your mail settings.

Queue Row: queueid=581490df40c12c413de10265628bd6c3 msgtype=1 userid=1586 msgid=6 email=[redacted]@speakeasy.net)

Server said:503 RCPT first (#5.5.1)


In the above example it would appear that the mailer (sendmail?) has determined a user does not exist, possibly by contacting the destination server.  ListMail does not recognize the response and gets confused.


I have not been able to recreate this, but a fix seems simple enough.  I can issue a "RSET" (to start a new message) if the 554 error appears in response to RCPT.  The drawback to this is a bounce may not be generated so the user will never be reported undeliverable.

Therefore, ideally, ListMail will interpret this AS a bounce and process it accordingly.  I'll work on the initial fix and do some more research and planning for the bounce feature.

I will update very shortly on this - I'm putting it in right now.

Quoting webshaman now:

Quote
PIPELINE-FROMmsg=250 2.1.0 ... Sender ok .
RCPT TO: <>
RCPTmsg=553 5.0.0 <>... User address required
DATAmsg=503 5.0.0 Need RCPT (recipient) .


Is this always the error you receive, or do you also receive errors of the first one quoted above?  This error is a bit different.  It appears that ListMail cannot find an email address.  You mentioned that you had made some modifications to admin.php, etc.  If so, you may not have replaced your files in a while.  A fix for users in queue who are deleted causing this sort of problem was released a few months ago in the main distribution.  Grab the latest files and send me the last 2 messages SMTP debug info when the error occurs again, please.

Hoping to get this all sorted out soon.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Emailing stopped suddenly
« Reply #17 on: February 16, 2005, 08:03:43 am »
Hi DW,

Quote
Is this always the error you receive, or do you also receive errors of the first one quoted above? This error is a bit different. It appears that ListMail cannot find an email address. You mentioned that you had made some modifications to admin.php, etc. If so, you may not have replaced your files in a while. A fix for users in queue who are deleted causing this sort of problem was released a few months ago in the main distribution. Grab


Yes, you're right, the error only occurred for users who have been deleted causing the problem.  I did a fix on my own for now, but also see your fix.

A further question, from time to time I keep getting error messages that:
Code: [Select]
Sending error. Check your mail settings.

But it always says 'Server Said', and NO server error is reported... if I click config, or return I can restart the mailing with no problem, however this is quite annoying, as I would like to use this loop code for writing my own background sender that calls this function from PERL every 20 minutes or so....  

Can you tell me a quick way to get rid of any error reporting or die calls, so that the function will continue to run?

Also, do you plan on including a background sender in the newest version you are going to release soon?
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Emailing stopped suddenly
« Reply #18 on: February 16, 2005, 01:10:56 pm »
Please download the latest files from the member area.   I made a fix to SMTP last night that will prevent halting on any RCPT errors.

I am considering an auto-resume script for the next release as well as a background sending option.

Please let me know if you have any troubles with the new files.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Emailing stopped suddenly
« Reply #19 on: February 16, 2005, 02:01:54 pm »
Hi DW,

Quote
I made a fix to SMTP last night that will prevent halting on any RCPT errors


Ok, but can you please tell me WHICH modules/lines were changed/added to?  I've made significant changes to the code already and can't afford to lose all of them to stop RCPT errors.

Are you certain it's a RCPT error?  How?  Like I said I get
Code: [Select]
Sending error. Check your mail settings.

But Server Said says NOTHING, are you telling me these are RCPT errors also?

Quote
I am considering an auto-resume script for the next release as well as a background sending option.


Please do it!  I would be greatfully indebted ; )  and willing to chip in extra if you can do that!   I really don't have the time to code it up and wouldn't want to muck with your code in the next version that much, in fact I planned on writing a stand-alone module that is called from CRON every 20 mins. as I said in another message, please write one, you already know the code inside/out - just a simple PERL module to call the domail.php file and resume paused, or jammed lm_sendq - please....
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Emailing stopped suddenly
« Reply #20 on: February 16, 2005, 04:08:24 pm »
I added more error checking to the code a while ago, possibly when I added the $nouser fix.  Without you being on the same version of admin.php as me it's hard to tell what's happening.  You should be able to see everything that's going on if you have SMTP debug enabled.  A copy of the last few debug messages would give me something to work with.  If the error is caused by a connection problem I may need to improve the SMTP error detection.

You should be prepared to overwrite admin.php from time to time.  When updates are released things are changed, added, and fixed, and it's not all documented.  Perhaps now, before upcoming major changes come into effect, is a good time to refresh yourself on your custom modifications by performing them again on the latest admin.php

I changed code in the pipelining section of admin.php.  Non-pipelining SMTP did not have this oversight.

Code: [Select]
    if($bugs){ echo "PIPELINE-FROMmsg=$srvmsg.<br>"; flush(); }

       $lastmsg = substr($srvmsg, 0, 3);
       if ($lastmsg <> "250") $error = 1; else $error = '';

       if(!$error){
        $srvmsg = getsmtpmsg($ssock,1024);
        if($bugs){ echo "RCPT TO: &lt;$email&gt;<br>RCPTmsg=".nl2br($srvmsg); flush(); }

        // DEBUG
//        if($email == 'bad@listmailpro.com'){ echo " WAS: $srvmsg<br>"; $srvmsg = '550 BADTEST'; }
        if($bugs) $rcptmsg = $srvmsg;
        $lastmsg = substr($srvmsg, 0, 3);

        if ($lastmsg <> "250") {
         fputs($ssock, "RSET\r\n");
         $srvmsg = fgets($ssock,1024);
         if($bugs){ echo "RSETmsg=$srvmsg<br>"; flush(); }
         $error = 1;  $skiptonext = 1;
         if($bugs){ echo "Bad RCPT response: $rcptmsg<br> ($email), skipping.<br><br>"; flush(); }
        } else $error = '';

        if(!$error){
         fputs($ssock, "DATA\r\n");


As for a Perl auto-resume script, I am not as well versed in Perl as PHP.  Also, the ListMail admin functions would not be available in a Perl script.  An auto-restart script could be written in PHP and called with "wget" with a password the same way Dailymail is.

The trick to restart code is detecting when a queue has stalled or quit sending.  This takes storing data somewhere, such as in it's own custom MySQL table / field.  The script could check if a batch of emails has decreased in size over the last X minutes.  

If we can fix the stalling you won't need the resume code, so let's see if we can get that working first, shall we?

Regards!
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

dane

  • Posts: 16
    • View Profile
Emailing stopped suddenly
« Reply #21 on: February 17, 2005, 05:47:34 pm »
I sent this manually then it stopped.  I think the cron sending job is stopping as well since there are unsent emails when I log into LM in the morning - any ideas:

Here is he scren data:


Sending Mail  of 4786..

Sending error. Check your mail settings.

Queue Row: queueid=2b22ae46d4a242a057584917aab8568a msgtype=1 userid=70202 msgid=48 email=doneyerman@hotmail.com)

Server said:

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Emailing stopped suddenly
« Reply #22 on: February 17, 2005, 06:36:32 pm »
dane,  Did you update to the latest files available in the member area?  I just released a fix.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Emailing stopped suddenly
« Reply #23 on: February 17, 2005, 09:26:20 pm »
DW,

Thanks for the quick reply.... and I got your Email, glad to hear LMP is back on track  :P

Quote
Perhaps now, before upcoming major changes come into effect, is a good time to refresh yourself on your custom modifications by performing them again on the latest admin.php


Yes, I agree, I always try to document my code changes, but who knows if I miss one!  

Regarding changes, I've written code that allows for Global Delete from ALL lists - the only thing is, if someone removes themself from the list using the Remove From This List link, and then tries the Remove From ALL List link they get a message that their Email is no longer in the mailing list - as you would need a separate UID to track that through the different lists, I took the easy way out...  anyway DW, since you're proposing some new LMP code in that spirit I'd be happy to offer that code to you if you want it...  I believe the mods are in the admin.php, custom.php and a few others (can't remember right now)....  

Quote
I changed code in the pipelining section of admin.php. Non-pipelining SMTP did not have this oversight.


Please tell me what pipelining is?  I saw that in the code, how do I know if my site is using pipelining or not?  

Quote
f we can fix the stalling you won't need the resume code, so let's see if we can get that working first, shall we?


Yes, you are right if the stalling is 100% FIXED, but I never usually even thing that anything is 100% working.... and still would propose an auto-resume functionality - perhaps something you could work in to your newest update?  

Another request would be a button to let me copy the Bounced Records out to a new List and then let me email a few of those records (give an option like email 10%, or something) to let me see if any of those can be re-listed because the addresses are good again.....  just a thought....

Glad to hear things are heating up in the LMP world...
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Emailing stopped suddenly
« Reply #24 on: February 18, 2005, 03:12:18 am »
Brett,

Quote
the only thing is, if someone removes themself from the list using the Remove From This List link, and then tries the Remove From ALL List link they get a message that their Email is no longer in the mailing list - as you would need a separate UID to track that through the different lists


If you can get the email address based on the UID you could perform a simple query to remove users from all lists:

Code: [Select]
$rows = mysql_query("select email from $utable where uid = '".addslashes($u)."';");
if(@mysql_num_rows($rows)>0) list($email) = mysql_fetch_row($rows);

mysql_query("delete from $utable where email like '$email'");

I am just finishing this feature in the update.  I would have liked to have released it with the most recent minor update, but didn't because it requires a database change. I'll work on finishing up the rule-based sending (incorporating it to work with Export, Create New Lists, few more options, etc.), a wide range of simpler but useful and often-requested improvements, then I'll release.

Quote
Please tell me what pipelining is? I saw that in the code, how do I know if my site is using pipelining or not?

Pipelining offers an SMTP performance improvement.  What it does is allow you to send multiple SMTP commands at the same time and receive the responses in order.  It saves time because you don't have to wait for as many responses from the mail server.  Almost every host these days uses pipelining.  You can see whether yours does at the top of the SMTP debug output, during the initial connection.

As for your further suggestions, if I don't put auto-resume into the release I could work on it shortly after.  I'm working at getting everything possible into the program ASAP.

Mailing by percentages is an interesting idea and one that has been requested more than once.  Before this is done it would be greatly beneficial to keep a record of which users have received which emails.  I plan to implement this soon and offer much more comprehensive logging and tracking in general.  It's on the list. :)

Thanks for your input, Brett!!  You are a great asset to the ListMail community.

Regards

Note: This thread has been SPLIT to talk about a new Global Remove feature...continued at this post
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

toma

  • Posts: 20
    • View Profile
Emailing stopped suddenly
« Reply #25 on: February 21, 2005, 03:58:13 pm »
My email is still stopping. I'm using sendmail.  I installed the newest  version of listmail last night. Below is the message I can when it stops. Clicking resume restarts things but I could be here all night.
Thanks for making an effort on a fix.
Tom

Queue Row: queueid=715207b217718e6c44ee5579ad3caaeb msgtype=1 userid=48169 msgid=48 email=name_removed@aol.com)

Server said:250 2.1.5 ... Recipient ok

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Emailing stopped suddenly
« Reply #26 on: February 21, 2005, 10:23:30 pm »
I believe the server is cutting the connection and ListMail is not detecting it.  I am working on an installation still having this issue in an effort to enable ListMail to recover gracefully.   I do not recommend removing the reported offending user(s).  Try to simply Resume your mailing.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Emailing stopped suddenly
« Reply #27 on: February 22, 2005, 03:27:19 am »
toma,

The server I am currently testing on is not sendmail.  If you like, please submit your server information (with a Note) at the following URL and I will do some troubleshooting:

https://www.listmailpro.com/members/?typ=other

It would be great if you could leave a few (thousand) messages in queue so that I can resume it with SMTP debug enabled to see what's happening.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting