Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Setting priority mail

by kidd (Curate)
on Nov 05, 2002 at 16:49 UTC ( #210508=perlquestion: print w/ replies, xml ) Need Help??
kidd has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks:

A company asked for a solution in one big problem they got. They are a real estate company and ask users to fill out forms if they are interested in a property. But they been having problems with a lot of forms from people that are only joking around and submit non-existant mail adresses. So I saw this idea on a site that sends you an email with an URL with and ID to a CGI that check if the ID is correct and then knows that you really ment to send the form. They really loved the idea since it would take only a couple of minutes for the users to accept the form. So I made the aplication.

I've tested the aplication and It worked great with my accounts I was so happy since I did the script rather fast. I called the owner of the company to tell him that the script was ready and that his webmasters could test it. Suddenly about an hour after I got a call from one of the webmasters telling me that the script takes to long before sending the mail.

So i tested again with other accounts in hotmail, yahoo and my site and they were right...sometimes it took hotmail about 15 minutes to receive the mail.

I have Eudora installed and there is an option when you send email that is called Priority-Mail...I tested and hotmail received the email very fast...so I thought that maybe sendmail had something similar..I've been looking but I can't find how? Could someone tell me how can I do it? Or should I use a perl module? Thanks

Comment on Setting priority mail
Download Code
Re: Setting priority mail
by iburrell (Chaplain) on Nov 05, 2002 at 17:53 UTC
    There is the "X-Priority" header. It takes a numerical value from 1 to 5 where 3 is normal priority and 1 is highest. However, this shouldn't have any effect on the delivery speed. It usually used by mail clients to display an extra icon. There isn't much you can do to control email delivery speed except making sure that your mail server is performing well. Mail is asynchronous.
Re: Setting priority mail
by lhoward (Vicar) on Nov 05, 2002 at 17:59 UTC
    The priority that can be set by Eudora (and other email clients like Outlook, etc...) is simply a line in the email header that some mail clients may use to display the message differently (like having an ! next to it). In general, it has nothing to do with how mailservers process/deliver the email. There is no standard way of marking an SMTP email for any sort of prefered or high priority delivery.

    Your best bet is to dig into the mailserver logs and see why the emails are taking so long to be delivered. Some mail server tuning/tweaking may be in order.

Re: Setting priority mail
by thewalledcity (Friar) on Nov 05, 2002 at 17:59 UTC
    Probably the reason your email takes 15 minutes to get through is that some mail queue is being processed only every 15 minutes. AFAIK when you use sendmail directly, the mail leaves your machine right away. It is prolly on the recipients end that the message is getting hung up.

    I am not sure what exactly what Eudora and the like do when you select Priority-Mail.

Re: Setting priority mail
by traveler (Parson) on Nov 05, 2002 at 18:04 UTC
    This could also be the X-MSMail-Priority header. That header has values Normal, High, and perhaps others. You imply you are using sendmail. If you use Mail::Sendmail you can specify custom headers with: $mail{'X-MSMail-Priority'} = 'High'; .

    As iburrell pointed out, though, that may or may not help.

    HTH, --traveler

Re: Setting priority mail
by fsn (Friar) on Nov 05, 2002 at 22:05 UTC
    If you could set something in an email to make it deliver more quickly, would you ever not set it? As other stated, there really is nothing you can do to improve the email delivery times.

    Gateway mail daemons can induce further latency, and there is nothing you can about it. For example, smapd, the smtp gateway daemon in Firewall Toolkit, accepts emails and stores them in a sendmail spool area. Sendmail will then periodically scan the spool areas and pick up the emails and pass it on. How often sendmail scans the spool area is configurable, sometime it's 5 minutes, often it's more. So this adds several minutes to the latency. The spool area scanning time in standard RedHat is something like 30 minutes, but that only affects very few emails, since most emails will not be stored in the queue. I've seen Exchange systems have several hours in delays.

    Also note that your scheme will probably cause more nuisance to innocent users. People will still enter fake or, worse, other peoples email adresses. Since you don't screen outgoing email anymore, innocent users will have their inboxes flooded by bogus emails from your domain. This might not be a big problem or concern. However, you should be aware of the problem.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://210508]
Approved by VSarkiss
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2014-12-21 23:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (109 votes), past polls