My install of FUDforum had this problem too. Posts were taking FOREVER (like minutes, literally) and sometimes timing out. Our forum is frequented by about two dozen people, and many of them are subscribers to topics and forums so email notifications are a huge part of why we like FUDforum.
But these slow posts, it was making us insane. We tried all sorts of tricks to speed things up... thinking that it had something to do with the install, the config of the host machine, and so forth.
Then, in an act of desperation, I started climbing around through the FUDforum code looking for some way (ANY way) to speed up posts. Our best working theory was that the email notifications were slow. So I popped open iemail.inc.t in the FUDforum source and found the line where FUDforum calls the PHP function "mail()" in a loop to send out the notifications.
Thanks to a bit of astute undertanding on the part of a man named Vikas Jayna, we discovered that mail() was calling sendmail() on our host machine, and the Hosting Service that owned the machine had a rate limiter/anti-spam delay on sendmail to prevent drive-by spammers from setting up shop on their servers. There was an enforced transaction delay per mail() call. Since we were calling mail() in a loop for up to 24 users, this was taking a long long time.
The fix is to send mail deferred. You MAY be only able to do this if your host is using sendmail, I don't know. But here's the magic spell:
from PHP documentation:
bool mail ( string $to, string $subject, string $message [, string $additional_headers [, string $additional_parameters]] )
Quote: |
I think passing the following string "-O DeliveryMode=d" in the $additonal_parameters variable would do the job
Vikas Jayna
|
In the fudforum source, in iemail.inc.t, I added the "-O DeliveryMode=d" as the last parameter of the mail command here:
foreach ((array)$to as $email) {
$mail_func($email, $subj, $body, $header, "-O DeliveryMode=d" );
}
And OH MY GOD is it FAST when posting messages now!
If you're experiencing the same issues I had (rate limited ISP/Hosting provider) this will be your magic beans.]]>