Topic: Sending Mail takes 10 seconds each! (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=28398" title="Pages that link to Topic: Sending Mail takes 10 seconds each! (Page 1 of 1)" rel="nofollow" >Topic: Sending Mail takes 10 seconds each! <span class="small">(Page 1 of 1)</span>\

 
H][RO
Paranoid (IV) Inmate

From: Australia
Insane since: Oct 2002

posted posted 09-06-2006 10:19

I have a php script to send mail, if i use the built in php mail() function it basically sends the mail instantly.

If I use sendmail or smpt methods of sending it takes roughly 10 seconds to send a single email.



I beleive this to be an issue with how my host is setup, they claim the delay is because they have Exim+Exiscan+Clamav+RBL+Spamassassin running on the server for mail to stop spam etc.


I don't have enough experience to tell if they know what they are doing or not, and if even with these spam programs it should take 10 seconds.

10 seconds for 1 email seems far too long for me.



When i say 10 seconds i mean the send function takes 10 seconds, not the time it takes to arrive in the inbox.

Any thoughts?

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 09-06-2006 11:55

Exiscan + Clamav + RBL + Spamassasin will easily take 10 seconds - on incoming mail!.

If they're running all that on outgoing mail, it should be queued, not slow down your processing.
(It's not like they don't accept incoming mail first either, *before* going sending it through all that).

How about DNS lookup? Are you reconnecting to smtp for each mail, and incouring a dns lookup for
the smtp host each time (this might be misconfigured. but I doubt it).

So long,

->Tyberius Prime

H][RO
Paranoid (IV) Inmate

From: Australia
Insane since: Oct 2002

posted posted 09-06-2006 13:23

Well when i do multiple mails i open one smtp connection, send them all, then close the connection.

But the 10 seconds is for a single email.



I got them to lower the ident time to 0s and that didnt help, other people with problems had that issue or a NS lookup issue like you mention. Unfortunately i don't know enough about it to tell them where to look, and they don't see it as enough of a problem.


10 Seconds for sending an email seems ridiculous to me though.

Is there any way i can check for misconfiguration causing it?

The thing is im using SWIFT mailer, the normal mail() function i beleive adds them to the queue, but im not sure if SWIFT does, so that you can check directly if the mail returns an error or not (if it simply gets put on the queue you wouldnt know?)

I'm quite sure i ran this a month ago and the sending speed was much faster.

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 09-06-2006 15:15

You're using SMTP - ie. anyone sending mail via that host should be having that problem - what happens if you use a desktop mailer with the same host, username and password? Still 10s per mail?

This is very likely a misconfiguration on their end - exim is quite a beast to configure...

H][RO
Paranoid (IV) Inmate

From: Australia
Insane since: Oct 2002

posted posted 09-06-2006 15:30

Hmm i will give that a go and see if it takes as long.


Its not even resolving the the mail server for smtp at the moment, they might be playing with it. Even roundcube wont send!

Will give it a try tommorow and see if it works.

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 09-06-2006 16:16

btw, is roundcube up to production level these days?

H][RO
Paranoid (IV) Inmate

From: Australia
Insane since: Oct 2002

posted posted 09-06-2006 16:35

Its quite good, im only using it because i have people that need to access webmail from work, since it works through http port 80 they can get past their work firewalls which block horde/squirell mail itc. Having said that im installing it for most of my clients now because most of the webmail applications have terrible interfaces.


I havn't used it extensively though. Nice clean interface and uses javascript async.

Im planning on going to a VPS though and they have @Mail (atmail) which i only recently discovered, looks like its the same thing but much further along in development.


Not sure when you last saw it but they have a demo up you should check it out. Ive only been using it for a first month, with their last 2 major versions.

They just added a CPanel installer actually so you can set it up for your accounts, i guess its getting closer to production level then.

H][RO
Paranoid (IV) Inmate

From: Australia
Insane since: Oct 2002

posted posted 09-07-2006 03:50

Okay got outlook express sending and email through the smtp server....


Gets "Connected" then "Sending Message 1/1" which takes around 10 seconds.

When i send using my ISP's SMTP instead, sending is almost instant.



This is what they sent me

quote:
Please note that we have installed Exim+Exiscan+Clamav+RBL in all our servers and incomming and outgoing emails should pass three tests (from mail virus scanners, spamAssassin & RBL (Real time DNS block list)) and hence why the emails are getting delay when you send out using php scripts or from your outlook(even the incomming mail will have few delay).



Even so should it take 10 seconds? I dont see why they need so much checking for outgoing mail!

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 09-07-2006 11:04

Well, it kind of makes sense if you can't trust the users that are sending mail.

But, in my opinion, mail should be queued. Meaning they might do all this checking, but accept the mail from you right away, doing that asynchronously on their own time. At least for incoming mail.

so long,

->Tyberius Prime

H][RO
Paranoid (IV) Inmate

From: Australia
Insane since: Oct 2002

posted posted 09-07-2006 15:15

Yeah i see what you mean, but how do you handle mail that fails to send? The good thing about not queing it where my script is concerned is that i can handle it immediately.

If you put it on the queue i guess you need to just handle bouncebacks or something.

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 09-08-2006 10:03

How do you handle mail that doesn't have a valid receipient address?
You bounce it to the original sender!

H][RO
Paranoid (IV) Inmate

From: Australia
Insane since: Oct 2002

posted posted 09-09-2006 01:43

Yeah but its a bit more complicated to setup handling a bounceback with a script, its much nicer if you can handle it there and then with direct feedback. Swift mail is pretty nice it has anti flood modules and stuff, really ideal for doing mail outs.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu