Page 1 of 1
SMTP, managed by MTA?
Posted: Mon Jul 23, 2007 9:30 am
by decipher
I would like to know some more information regarding using the SMTP mailing class.
Today I sent around 80 emails, each of size 400kb. They were HTML/Text messages with a pdf attachment.
The mailing was managed by cron, sending 25 emails every 5 minutes.
I was under the impression that using the SMTP class, the script communicates directly with the recipient SMTP server. But I logged into my WHM, checked the mail queue and noticed that 2 hours later only half the emails have been sent.
I would like to know the advantages of using the SMTP mailing class if the actual SMTP mailing is managed by the MTA. Why would using the SMTP method be better than the sendmail class if both mailing processes are managed by the MTA (exim), and how can I speed up the time of which the MTA actually delivers the emails?
Thank you for your time.
Rich
Posted: Mon Jul 23, 2007 4:55 pm
by Chris Corbyn
Yes, SMTP is a protocol, the MTA is what's on the receiving end of that protocol
Using SMTP on "localhost" will be slower than using exim directly since you're just adding another layer to the transport. Using SMTP with a remote host means you spread the work load but it will still be slower initially due to network overhead.
If your only option is SMTP-localhost or Exim then use Exim.
Posted: Tue Jul 24, 2007 1:32 am
by decipher
Thank you for your reply. I have to apologize for my ignorance yesterday, I clearly wasn't thinking. Using the SMTP communicates with our SMTP server, and not the recipient SMTP server. Doh!
I checked the mail queue on our server this morning and there were still 5 emails waiting to be delivered, 17 hours after adding the messages to the mail queue.
I never realized it would take this long. I guess the reason being the mails were 400k big. But I understand that using the MTA is a whole bunch easier than sending the email by communicating directly with the recipient SMTP server, especially with such a large email.
Is there some method to checking the mail queue/MTA status without using the WHM? I used to assume that once swiftmailer was finished with the mailing, that the mails had actually been sent, but all that happens is that swift adds the mails to the SMTP mail queue.
Posted: Tue Jul 24, 2007 9:59 am
by decipher
You know I cant really grasp whats going on here.
If I send batch emails using Swift SMTP class (run by cron daemon), it adds all messages to the Exim Mail Queue. It then takes quite a while for Exim to send the messages.
Now if I send only 1 message, it seems like it communicates directly with the SMTP server, then sends the mail instantly, even if the mail queue is backed up.
I do not want messages to be added to Exim's mail queue, I want the message to be sent at run-time, much like when I send a single email.
I'm struggling to understand the point of using cron to balance the batches if the MTA already does this.
Does anyone have any suggestions as to why the mails get added to the mailing queue instead of just being sent at run-time?
Any pointers or suggestions would be greatly appreciated

Posted: Tue Jul 24, 2007 3:16 pm
by Chris Corbyn
Most likely you've got exim running with the -q15 or -q30 option where 15 and 30 are the minutes between queue runs respectively. Bring the time down between queue runs. This is to do with your exim configuration and not to do with Swift. Swift sends the email to the server, that's all it can do and all it will do
