Page 1 of 1

Configuration Suggestions?

Posted: Wed Oct 24, 2007 9:31 am
by JoshFowler
I wanted to ask everyone for suggestions on my setup.

I currently have a Linux server with kernel 2.4.21, exim version 4.63, and php version 5.1.6.

My setup atm is that I am running a cron job that runs every 5 mins and mails out 1200 emails with the mail() function. I have been researching different options and came across swfitmailer but I am still not sure if it can help me or not. I have disabled spamassassin so that isn't slowing it down either.

The server maxes out at about 300 emails a min from my calculations. I was able to get it configured to do that. To be honest, I need it faster. Our company has a weekly newsletter that we send out and it has now gotten to the point that their are 1.2 million subscribers to it. So it's not like I am trying to send out spam or anything, it is a newsletter that people have subscribed to. At this configuration it takes 4 days to send out a weekly newsletter, if the list gets much bigger people are going to be getting their email a week late.

My questions are this. Would having a separate smtp server and have it connect to that to send be faster? Or is there a better way then the mail() function to get them out?

Really I just need suggestions on making it faster. We do have a separate test linux server with the same configuration I have thought spliting the list in 2 and sending, that would cut the time in half at least.

Posted: Wed Oct 24, 2007 11:43 am
by feyd
Using Swift's SMTP connections, along with the rotation plugin would probably help speed things up significantly... if I understand your configuration.

Posted: Wed Oct 24, 2007 12:29 pm
by JoshFowler
As in connecting to a separate smtp server, or the localhost smtp server?

Posted: Wed Oct 24, 2007 1:15 pm
by feyd
JoshFowler wrote:As in connecting to a separate smtp server, or the localhost smtp server?
Either or both. It's better to spread the load out, which is why I mentioned the rotation plugin.

Posted: Wed Oct 24, 2007 1:26 pm
by JoshFowler
Well, I tried it, and it did send fast, I tested it with 1000 emails before I put in the Antiflood plugin (I am guessing that is what you meant by rotation plugin). But it got through about 148 of the emails and it stopped. Now it's not working. lol. I connected to it like this:

Code: Select all

$swift =& new Swift(new Swift_Connection_SMTP("localhost"));
Figure that was the easiest way. It did send those 148 almost instantly. And I have it set to reconnect every 200 with the antiflood plugin. But it doesn't seem to want to connect to anything. With this:

Code: Select all

echo "Test1";
if ($swift->send($message3, $to_address, $template_from))
{
    echo "Message sent<BR>";
}
else
{
    echo "Message failed to send<BR>";
}
		echo "Test2";
I get the "Test1" but it just stops and never gets to the "Message sent", "Message failed to send", or "Test2"

Posted: Wed Oct 24, 2007 1:50 pm
by feyd

Posted: Wed Oct 24, 2007 2:01 pm
by JoshFowler
Ok, I do have 2 servers I can have it rotate between, but I have now tried connecting to both and both do not seem to want to send anything now. I haven't changed anything since it sent out the 148. It just stops once it gets to the:

Code: Select all

$swift->send($message3, $to_address, $template_from)
Any suggestions on that? I tried to look through exim in webhost manager to see if there were any limits per smtp connection or like a blacklist I may of added localhost to or something.

Posted: Wed Oct 24, 2007 2:22 pm
by JoshFowler
I figured out what it was, there were some invalid email addresses in my database that the mail() function didn't care about, but this does, lol. Thanks a lot for all the help, everything seems to be doing good.