Online Colleges





A lot of our customers run into trouble with email sent from their websites - Form Mail, or custom code. The problem is that the envelope-from address is often not set. If our customers or the recipients of these incorrectly formatted emails hit reply, sometimes the replies disappear into the ether (well actually they come to us but we can't possibly deal with them all so it's the same thing).

More importantly though, if the emails bounce - ie the address it was sent to isn't working - the bounce will go to the web hosting provider - yes we get a lot of these, which leads us to the original internal title of this article "How to Send Email from Websites Without Pissing Off Anchor"

Firstly, a bit of theory.

Messages contain two sections: the headers and the body. The headers most people are familiar with, and contains a To address, and a From address, in addition to many other headers. This is analogous to a formal letter in which the sender and recipient are printed on the same page as the message.

In addition to this, the Mail Transfer Agent (MTA) also keeps envelope information, analogous to the envelope that the letter is posted in. This is what the MTA uses when conducting an SMTP transaction, i.e. the MAIL FROM command, and RCPT TO commands use data from the envelope to instruct the destination MTA who the message is from and where to send it.

The envelope from address can be different to the message from.

Here's a typical message header:

<br>Return-Path: anchor@starboard.anchor<br>Received: from mail.anchor [202.4.236.106]</p><p>by localhost with IMAP (fetchmail-6.2.5)</p><p>for jaq @ localhost (single-drop); Wed, 08 Mar 2006 07:01:35 +1100 (EST)<br>Received: (from anchor @ localhost)</p><p>by starboard.anchor (8.11.6/8.11.6) id k27K0iK27993</p><p>for tech-staff; Wed, 8 Mar 2006 07:00:44 +1100<br>Received: from av1.puremail (av1.puremail [202.4.234.193])</p><p>by starboard.anchor (8.11.6/8.11.6) with ESMTP id k27K0g427949</p><p>for <root @ anchor>; Wed, 8 Mar 2006 07:00:42 +1100<br>Received: from bosun.anchor (unknown [202.4.234.196])</p><p>by av1.puremail (Spam Firewall) with ESMTP id C625320002D3</p><p>for <root @ anchor>; Wed, 8 Mar 2006 07:00:41 +1100 (EST)<br>Received: by bosun.anchor (Postfix, from userid 0)</p><p>id 5E37060D82; Wed, 8 Mar 2006 07:00:41 +1100 (EST)<br>To: root@anchor<br>Subject: Anchor Update Check bosun.anchor<br>From: root <root@bosun.anchor><br>

The envelope sender is marked at the destination by the Return-Path field, and is also the address that will receive bounces to messages from the MTA, if the To address doesn't exist.

How to do it right

The main problem customers have is that they are not setting the envelope-from address, thinking that merely setting From will suffice. As noted above, this is not sufficient and bounces will return to the webserver, not the place they are expecting.

Included below are some examples of how to correctly format your mail

Directly with Sendmail

You specify the envelope from address with the -f flag to sendmail, e.g.:

/usr/bin/sendmail -t -i -f "sender@example-org" <<EOFFrom: Someone <sender@example-org>To: recipient@example-orgSubject: some textBlah blah blah I am very importantEOF

Via PHP

PHP is of course strange and you need to explicitly set the envelope sender when sending, at least according to my reading of the php mail function documentation

mail('nobody@example-com', 'the subject', 'the message', null, '-f webmaster@example-com');

More information

More code samples are available from the authors website.

Jim is a Linux systems administrator at Anchor with a passion for free software and open source solutions. Anchor is a provider of Australian web hosting and dedicated servers.

Web Hosting


Xbox 360 Repair - 3 Red Lights

0 comments

Almost every Xbox 360 users will come across a common Xbox 360 problem - 3 red lights. Some called it as "Red Ring of Death" (RRoD). There are different codes that flash on the power switch to let you know what is wrong with your console. "Red Ring of Death" means you have a general hardware error. This problem has been actively discussed everywhere especially in the Xbox 360 related problem. Although 3 red lights is a common issue of Xbox 360 and a lot of complaints & hates everywhere, people still buy Xbox 360 console as it has many awesome game titles.

Although Microsoft did not published the main root cause of the problem, there are a lot of people taking their own risk of breaking the Xbox 360 console to find the root cause. By understanding the possible root causes, we can make the proper correction. Here are the summarized of the reasons as to why the Xbox 360 3 Red Lights happened:

1. Insufficient Air Circulation

Xbox 360 produces hot air when it is on. Therefore it is always recommended to place your console at an open air area to allow the proper airflow. So, if possible, try not to place your console in closed cabinet when you are using it.

2. Power Brick

If you observe the Xbox 360's power brick, you will find a LED, which indicates the health of the power brick. If the power brick is overheated, the LED will change to red. It is worth getting the power brick on an open air area to allow the proper airflow. This is similar to the 1st root cause. Try to place the power brick at open air area which cannot be reached by children.

3. GPU Soldering Joints & The X-clamp

Many people claims that this is the main root cause of 3 red lights problem. When a gamer playing a Xbox 360 game for long hours, heat will slowly melting the GPU soldering joints. Due to the X-clamp design, it causes the GPU soldering joints becoming loose slowly and this is the time where the screen freeze happened intermittently. Eventually you will get the 3 red lights problem.

If you read the three root causes above carefully, you will notice that all these root cause are under a same category, which is "Overheated". Therefore, if you are owning a new Xbox 360, which does not have the 3 red lights or any hardware problem, it is advisable to place your console at an open-air area or cool air-conditioned environment. You can also buy an additional external Xbox 360 cooling fan. The cooling fan does not cost much, but it will help to prolong your console's lifespan. If possible, turn off your console for 30 minutes after playing game for about 1 hour.

Frank Jordan is a Xbox gamer who constantly provides useful information which can help other gamers to resolve Xbox related problems such as Xbox 360 3 Red Lights.

Looking for Xbox 360 repair manual that will fix the 3 Red Lights problem permanently? Please visit:

Xbox 360 Repair

Hentai
Hentai Reviews
Bishoujo Game Reviews
Manga
Anime Reviews


Online Colleges: Nov 7, 2008

Recent Posts

Archives