PHP mail() woes
fouldragon at aol.com
fouldragon at aol.com
Thu Jun 12 19:16:04 MST 2008
Well, I looked through the logs and found it tended to occur in
blocks... you'd have a day or two (I think the longest stretch was ~5
days) when it would occur often, and then weeks at a time when it
wouldn't at all.
It didn't seem to be a 100% go/no-go thing that I can see... for
example, we had someone who triggered a message spurt nine times over a
~30 minute period during the last problem block, and six went normally,
three failed.
The other problem is that I can't know it's failing WHEN it happens,
only after... basically I do "grep sendmail error_log | wc -l" and as
long as the number hasn't gone up, we're fine. If it's redlining
something for 10 seconds at a time, it's back to normal before I can go
and fire up any measurements.
Maybe it should email me if it can't send email? :D :D :D
Of course, it hasn't done it in like 28 hours now, but it matters to me
that I can know what's wrong, in the event it happens again.
-----Original Message-----
From: Alex Dean <alex at crackpot.org>
To: Main PLUG discussion list <plug-discuss at lists.plug.phoenix.az.us>
Sent: Thu, 12 Jun 2008 4:24 pm
Subject: Re: PHP mail() woes
Floyd Arguello wrote:
> On Wed, Jun 11, 2008 at 9:09 PM, <fouldragon at aol.com> wrote:
>> Weird amusement:
>>
>> #service qmail stop
>> Stopping service qmail:#
>> (for some reason, it never says "[OK]", wether you stop or restart)
>>
>> Run the "send 50 messages to hopeless at invalid.invalid" script.
>>
>> Wait for it to finish - doesn't report the mail() calls failed
>>
>> restart in a panic (it is a production box after all :P) service
qmail
>> start
>>
>> They seem to have processed normally, like it respawned qmail on
demand
>> of the php script requesting sendmail. Is that how it's supposed to
>> operate?
>>
>> Also, reviewing the logs, it seems that it occurs in blocks...
you'll
>> get a bunch of failures for a few days, then none for 20 days or so
at
>> a time (the server typically gets 15-30 or so days uptime, and it's
at
>> 29+)
FWIW, years ago I used a PHP script to send hundreds of thousands of
emails a week with no issues, and it wasn't a whole lot more than a
wrapper around the mail() function. (No, not spam. Newsletters people
subscribed to.)
When you get a bunch of failures, are some messages sent correctly and
others die, or does everything break during a fixed window of time?
Having everything run fine, then everything fails for a while, then
works again with no apparent change on your end, sounds like some
service you're relying on is going away then coming back.
If so :
* Maybe DNS is slow sometimes?
* Is qmail sending mail directly, or just handing the mail off to
another server (smarthost, I think its called)? If that upstream
server
is busy/unavailable periodically, that would be an issue.
alex
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
More information about the PLUG-discuss
mailing list