Re: [ilugd] Configuring sendmail in VPS Server
On Monday 28 May 2012, Gora Mohanty wrote: > On 28 May 2012 23:27, Raj Mathur (राज माथुर) > wrote: [...] > [snip] > >> Should normally not be needed, as all the webapp has > >> to do is to hand off to sendmail/postfix. However, this > >> might be a problem if the webapp is sending > >> HTML mail, and is taking time to > >> render this abomination. Sad to say, I am now party to > >> such desecration of what god meant email to be. > > > > Different problem. This delay is definitely due to the mail > > server. > > Even after he fixed hostname issues? Sorry, while I do > joke about such things, I do appreciate being educated. > I *am* serious here. Whether you're handing off to a sendmail process, or making a port 25 connection to localhost (or your smart host), your web app will typically wait until either sendmail returns or the receiving MTA has successfully sent a "250 2.0.0" response back. There could be any number of things slowing down the mail server. Some examples: 1. 'net-based spam/virus checks. 2. Slow DNS. 3. Slow 'net connectivity. 4. Lack of separation into MSA/MTA. 5. Load on the system itself. 6. Some bad configuration option. You really need to look at each individual case and figure out where the bottleneck is. Regards, -- Raj -- Raj Mathur || r...@kandalaya.org || GPG: http://otheronepercent.blogspot.com || http://kandalaya.org || CC68 It is the mind that moves || http://schizoid.in || D17F ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] Configuring sendmail in VPS Server
On 28 May 2012 23:27, Raj Mathur (राज माथुर) wrote: [...] > Nah, badly-configured or slow mail servers can create appreciable delays > for users. I've seen (and coded too) pages that send mail, where > pressing "Submit" makes the browser hang without activity for 5+ seconds > before it starts loading the next page. Nothing to do but fix the mail > server usually. True, that! I was entirely too flippant, but you are right. Anything that is not clearly time-bound should be handed off in a web-dev world. It is just that mail has never been a problem, but of course that could have to do with volume. > Of course, one easy way out is to display a JS message and/or a spinning > cursor while the mail is being sent. Users object less to being asked > to wait -- it's unexpected delays that make them soggy and hard to > light. Sheesh! Please do not give away my L33T! web-dev secrets already. >> >> > Worst case scenario, make your application send mail >> > asynchronously. Depending on language and package, you could use a >> > new thread, a new process or perhaps just a flag to the mail >> > library. >> >> Should normally not be needed, as all the webapp has >> to do is to hand off to sendmail/postfix. However, this >> might be a problem if the webapp is sending >> HTML mail, and is taking time to >> render this abomination. Sad to say, I am now party to >> such desecration of what god meant email to be. > > Different problem. This delay is definitely due to the mail server. Even after he fixed hostname issues? Sorry, while I do joke about such things, I do appreciate being educated. I *am* serious here. >> > Sendmail delays are typically due to DNS or bad configuration >> > issues. If you are willing to pay me a trifling fee, I'd be glad >> > to offer myself as a consultant for fixing this problem. Typical >> > trifling fees are half your kingdom and your daughter's hand in >> > marriage. >> >> OK, done. Joke is on you: I have neither a kingdom, nor >> a daughter. > > Well, buy one and abduct the other then. Oh wait, it wasn't you who was > liable for the fee anyway OK, not so serious any more. (a) How does one buy a daughter, and abduct a kingdom? On second thoughts, please do not answer that. (b) As per your original postulate, the offer was open to all. Lack of fiefdom, and nubile youth not specified. /me smells a suit for false advertising. Regards, Gora ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] Configuring sendmail in VPS Server
On Monday 28 May 2012, Gora Mohanty wrote: > On 28 May 2012 22:48, Raj Mathur (राज माथुर) wrote: > > On Monday 28 May 2012, Gaurang Aggarwal wrote: > >> The errors are not shown now as I uploaded hostname to fully > >> qualified hostname . > >> I am curious , is there any way to allow web applications to send > >> the mails faster as the time it takes to send the email is about > >> 6- 8 seconds . > > > > Is it just the web application taking longer or command-line too? > > In either case, you need to look at the logs to see precisely > > where the delay is. You can also set OLogLevel=127 in > > /etc/mail/sendmail.cf, restart sendmail and then try sending a > > mail for more logging. > > Pfft! The way most people code, 6-8 seconds is nothing > for a web front-end. Gaurang, what are page-load times, > and response times to the presumable POST from the > front-end? You can measure with a Firefox plugin, YSlow, > if you are not already aware of this. Nah, badly-configured or slow mail servers can create appreciable delays for users. I've seen (and coded too) pages that send mail, where pressing "Submit" makes the browser hang without activity for 5+ seconds before it starts loading the next page. Nothing to do but fix the mail server usually. Of course, one easy way out is to display a JS message and/or a spinning cursor while the mail is being sent. Users object less to being asked to wait -- it's unexpected delays that make them soggy and hard to light. > > > Worst case scenario, make your application send mail > > asynchronously. Depending on language and package, you could use a > > new thread, a new process or perhaps just a flag to the mail > > library. > > Should normally not be needed, as all the webapp has > to do is to hand off to sendmail/postfix. However, this > might be a problem if the webapp is sending > HTML mail, and is taking time to > render this abomination. Sad to say, I am now party to > such desecration of what god meant email to be. Different problem. This delay is definitely due to the mail server. > > Sendmail delays are typically due to DNS or bad configuration > > issues. If you are willing to pay me a trifling fee, I'd be glad > > to offer myself as a consultant for fixing this problem. Typical > > trifling fees are half your kingdom and your daughter's hand in > > marriage. > > OK, done. Joke is on you: I have neither a kingdom, nor > a daughter. Well, buy one and abduct the other then. Oh wait, it wasn't you who was liable for the fee anyway! Regards, -- Raj -- Raj Mathur || r...@kandalaya.org || GPG: http://otheronepercent.blogspot.com || http://kandalaya.org || CC68 It is the mind that moves || http://schizoid.in || D17F ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] Configuring sendmail in VPS Server
On 28 May 2012 22:48, Raj Mathur (राज माथुर) wrote: > On Monday 28 May 2012, Gaurang Aggarwal wrote: >> The errors are not shown now as I uploaded hostname to fully >> qualified hostname . >> I am curious , is there any way to allow web applications to send the >> mails faster as the time it takes to send the email is about 6- 8 >> seconds . > > Is it just the web application taking longer or command-line too? In > either case, you need to look at the logs to see precisely where the > delay is. You can also set OLogLevel=127 in /etc/mail/sendmail.cf, > restart sendmail and then try sending a mail for more logging. Pfft! The way most people code, 6-8 seconds is nothing for a web front-end. Gaurang, what are page-load times, and response times to the presumable POST from the front-end? You can measure with a Firefox plugin, YSlow, if you are not already aware of this. > Worst case scenario, make your application send mail asynchronously. > Depending on language and package, you could use a new thread, a new > process or perhaps just a flag to the mail library. Should normally not be needed, as all the webapp has to do is to hand off to sendmail/postfix. However, this might be a problem if the webapp is sending HTML mail, and is taking time to render this abomination. Sad to say, I am now party to such desecration of what god meant email to be. > Sendmail delays are typically due to DNS or bad configuration issues. > If you are willing to pay me a trifling fee, I'd be glad to offer myself > as a consultant for fixing this problem. Typical trifling fees are half > your kingdom and your daughter's hand in marriage. OK, done. Joke is on you: I have neither a kingdom, nor a daughter. Regards, Gora ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] Configuring sendmail in VPS Server
On Monday 28 May 2012, Gaurang Aggarwal wrote: > The errors are not shown now as I uploaded hostname to fully > qualified hostname . > I am curious , is there any way to allow web applications to send the > mails faster as the time it takes to send the email is about 6- 8 > seconds . Is it just the web application taking longer or command-line too? In either case, you need to look at the logs to see precisely where the delay is. You can also set OLogLevel=127 in /etc/mail/sendmail.cf, restart sendmail and then try sending a mail for more logging. Worst case scenario, make your application send mail asynchronously. Depending on language and package, you could use a new thread, a new process or perhaps just a flag to the mail library. Sendmail delays are typically due to DNS or bad configuration issues. If you are willing to pay me a trifling fee, I'd be glad to offer myself as a consultant for fixing this problem. Typical trifling fees are half your kingdom and your daughter's hand in marriage. Regards, -- Raj -- Raj Mathur || r...@kandalaya.org || GPG: http://otheronepercent.blogspot.com || http://kandalaya.org || CC68 It is the mind that moves || http://schizoid.in || D17F ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] Configuring sendmail in VPS Server
> > Where is this time of 6-8 seconds being measured from? > The web front-end, or sendmail/postfix? > > hi, I have also seen, dedicated servers are faster in sending emails then VPS, though not that slow, What is the configuration of your VPS? thanks abhishek ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] Configuring sendmail in VPS Server
On 28 May 2012 19:57, Gaurang Aggarwal wrote: > Hello , > > Thanks a lot for great help Raj , Mahesh , Naresh :) > > The errors are not shown now as I uploaded hostname to fully qualified > hostname . > I am curious , is there any way to allow web applications to send the mails > faster as the time it takes to send the email is about 6- 8 seconds . [...] Where is this time of 6-8 seconds being measured from? The web front-end, or sendmail/postfix? Regards, Gora ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] Configuring sendmail in VPS Server
Hello , Thanks a lot for great help Raj , Mahesh , Naresh :) The errors are not shown now as I uploaded hostname to fully qualified hostname . I am curious , is there any way to allow web applications to send the mails faster as the time it takes to send the email is about 6- 8 seconds . On Sun, May 27, 2012 at 5:59 PM, Raj Mathur (राज माथुर) < r...@linux-delhi.org> wrote: > On Sunday 27 May 2012, Gaurang Aggarwal wrote: > > Hello , > > > > > > As Raj said I exactly used : > > tail -f /var/log/mail.log > > while sending a email from the web application > > > > May 27 12:17:33 uni2versity sendmail[13521]: q4R8GXih013521: to= > > m...@gaurang.me, ctladdr=cont...@skilledinterns.com (33/33), > > delay=00:01:00, xdelay=00:00:00, mailer=relay, pri=30423, > > relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q4R8HXG1013909 > > Message accepted for delivery) May 27 12:17:34 uni2versity > > sm-mta[13912]: STARTTLS=client, relay= aspmx.l.google.com., > > version=TLSv1/SSLv3, verify=FAIL, cipher=RC4-SHA, bits=128/128 > > May 27 12:17:34 uni2versity sm-mta[13912]: q4R8HXG1013909: > > to=, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, > > pri=120740, relay= aspmx.l.google.com. [209.85.225.26], dsn=2.0.0, > > stat=Sent (OK 1338106654 l17si3694120iga.62) > > May 27 12:20:01 uni2versity sm-msp-queue[15508]: My unqualified host > > name (uni2versity) unknown; sleeping for retry > > May 27 12:21:01 uni2versity sm-msp-queue[15508]: unable to qualify my > > own domain name (uni2versity) -- using short name > > May 27 12:40:02 uni2versity sm-msp-queue[5376]: My unqualified host > > name (uni2versity) unknown; sleeping for retry > > There you go, that's the problem. Your hostname is unknown and sendmail > is failing/slowing down because of that. > > Make sure that (a) your "hostname" command returns a fully-qualified > host name, and (b) that fully-qualified host name exists at least in > /etc/hosts. > > Regards, > > -- Raj > -- > Raj Mathur || r...@kandalaya.org || GPG: > http://otheronepercent.blogspot.com || http://kandalaya.org || CC68 > It is the mind that moves || http://schizoid.in || D17F > > ___ > Ilugd mailing list > Ilugd@lists.linux-delhi.org > http://frodo.hserus.net/mailman/listinfo/ilugd > -- Regards Gaurang Aggarwal Handle : #fanaticgeek Call : +0 997 168 5225 Uni2versity - http://uni2versity.com ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] Configuring sendmail in VPS Server
On Sunday 27 May 2012, Gaurang Aggarwal wrote: > Hello , > > > As Raj said I exactly used : > tail -f /var/log/mail.log > while sending a email from the web application > > May 27 12:17:33 uni2versity sendmail[13521]: q4R8GXih013521: to= > m...@gaurang.me, ctladdr=cont...@skilledinterns.com (33/33), > delay=00:01:00, xdelay=00:00:00, mailer=relay, pri=30423, > relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q4R8HXG1013909 > Message accepted for delivery) May 27 12:17:34 uni2versity > sm-mta[13912]: STARTTLS=client, relay= aspmx.l.google.com., > version=TLSv1/SSLv3, verify=FAIL, cipher=RC4-SHA, bits=128/128 > May 27 12:17:34 uni2versity sm-mta[13912]: q4R8HXG1013909: > to=, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, > pri=120740, relay= aspmx.l.google.com. [209.85.225.26], dsn=2.0.0, > stat=Sent (OK 1338106654 l17si3694120iga.62) > May 27 12:20:01 uni2versity sm-msp-queue[15508]: My unqualified host > name (uni2versity) unknown; sleeping for retry > May 27 12:21:01 uni2versity sm-msp-queue[15508]: unable to qualify my > own domain name (uni2versity) -- using short name > May 27 12:40:02 uni2versity sm-msp-queue[5376]: My unqualified host > name (uni2versity) unknown; sleeping for retry There you go, that's the problem. Your hostname is unknown and sendmail is failing/slowing down because of that. Make sure that (a) your "hostname" command returns a fully-qualified host name, and (b) that fully-qualified host name exists at least in /etc/hosts. Regards, -- Raj -- Raj Mathur || r...@kandalaya.org || GPG: http://otheronepercent.blogspot.com || http://kandalaya.org || CC68 It is the mind that moves || http://schizoid.in || D17F ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] Configuring sendmail in VPS Server
Hello , As Raj said I exactly used : tail -f /var/log/mail.log while sending a email from the web application May 27 12:17:33 uni2versity sendmail[13521]: q4R8GXih013521: to= m...@gaurang.me, ctladdr=cont...@skilledinterns.com (33/33), delay=00:01:00, xdelay=00:00:00, mailer=relay, pri=30423, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q4R8HXG1013909 Message accepted for delivery) May 27 12:17:34 uni2versity sm-mta[13912]: STARTTLS=client, relay= aspmx.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=RC4-SHA, bits=128/128 May 27 12:17:34 uni2versity sm-mta[13912]: q4R8HXG1013909: to=, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120740, relay= aspmx.l.google.com. [209.85.225.26], dsn=2.0.0, stat=Sent (OK 1338106654 l17si3694120iga.62) May 27 12:20:01 uni2versity sm-msp-queue[15508]: My unqualified host name (uni2versity) unknown; sleeping for retry May 27 12:21:01 uni2versity sm-msp-queue[15508]: unable to qualify my own domain name (uni2versity) -- using short name May 27 12:40:02 uni2versity sm-msp-queue[5376]: My unqualified host name (uni2versity) unknown; sleeping for retry I have to confess that I am confused . Regards Gaurang ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] Configuring sendmail in VPS Server
I have this VPS having Debian installed . I used apt-get remove sendmail to first , remove the sendmail and then apt-get install sendmail to install it again . But now , I have my websites taking awfully long time to send emails . Please tell me how to resolve this issue . -- --- Check if DNS is working. --Naresh Narang ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] Configuring sendmail in VPS Server
Gaurang Aggarwal said on Sun, May 27, 2012 at 09:11:55AM +0530,: > I have this VPS having Debian installed . I used apt-get remove > sendmail to first , remove the sendmail and then apt-get install > sendmail to install it again . But now , I have my websites taking > awfully long time to send emails . The default MTA on Debain is exim4. Any reason you switched to sendmail? Just curious. Why did you remove sendmail in the first place? apt-get remove by itself does not remove the entire package. It will leave a lot of cruft around, especially in /etc/, and when you reinstall the package, the old config files in /etc/ are likely to be reused. If you suspect problems with configuration files, you ought to have used " dpkg --purge foo". > Please tell me how to resolve this issue . Start with Raj's suggestion in the other mail. -- Mahesh T. Pai || End Users are just friends who haven't submitted a patch yet. ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] Configuring sendmail in VPS Server
On Sunday 27 May 2012, Gaurang Aggarwal wrote: > Hello guys, > > I have this VPS having Debian installed . I used apt-get remove > sendmail to first , remove the sendmail and then apt-get install > sendmail to install it again . > But now , I have my websites taking awfully long time to send emails > . > > Please tell me how to resolve this issue . Get one of your web applications to send mail, while monitoring the sendmail log: tail -f /var/log/mail.log That will tell you where the bottleneck is. Regards, -- Raj -- Raj Mathur || r...@kandalaya.org || GPG: http://otheronepercent.blogspot.com || http://kandalaya.org || CC68 It is the mind that moves || http://schizoid.in || D17F ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd
[ilugd] Configuring sendmail in VPS Server
Hello guys, I have this VPS having Debian installed . I used apt-get remove sendmail to first , remove the sendmail and then apt-get install sendmail to install it again . But now , I have my websites taking awfully long time to send emails . Please tell me how to resolve this issue . -- -- Regards Gaurang Agrawal http://gaurang.me http://uni2versity.com Twitter : gaurang.agrawal3 ___ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd