Return address

From Wikipedia, the free encyclopedia

In both conventional and electronic messaging, a return address is an explicit inclusion of the address of the person sending the message. It provides the recipient (and sometimes authorized intermediaries) with a means to determine how to respond to the sender of the message if needed.

In programming, return address means the position in code where a program shall return after the subroutine in execution terminates.

Contents

[edit] Mail

In the postal mail of some countries, the return address is conventionally located in the upper left hand corner of the envelope, card, or label. It may or may not include a sender's name, but should include address or P.O. box, city, national division (e.g. state, province, county, etc.), and postal code. In the United Kingdom, the return address is usually placed on the reverse of the envelope, near the top.

The return address is not required on postal mail. However, lack of a return address prevents the postal service from being able to return the message (or a package's contents) in the case it is undeliverable (such as from damage, lack of postage, or invalid destination.)

[edit] Insufficient postage

Since a letter with insufficient postage is traditionally sent back to the return address (using, ironically, postal resources and expense to do so), some creditors have abused this system by placing their own payment address in both the destination and return address spaces. In this way, if a customer fails to put postage on a mailed payment, the envelope is still delivered to the creditor instead of returning to the sender and resulting in a potential late payment penalty. Although postal services typically do not appreciate this practice, it is not generally illegal (at least not in the United States).

Some postal systems send a postcard to the sender with details of the underpayment, so that the sender can attach the required stamps plus a fee and send to the postal authority, for example Royal Mail in the United Kingdom.

[edit] E-mail and other electronic messages

In electronic messages, especially e-mail, there are a number of forms of return address.

The most common email return address is located in the From header, which is typically displayed as the sender of an email in most email software. However, the From header is created by the originating email program upon sending the message, and is defined by the originating system (which increasingly is open to alteration by the sender, as desktop email software becomes the norm).

Another return address is the "Sender header", which is typically created (and overridden) by the mail server used by the originating email software. Since this is typically managed by an ISP, it is often more reliable and legitimate than a From address, if there is a discrepancy.

Additional fields in the headers of an email message include brief signatures of each mail server that handled the message. While these do not indicate the individual sender of the message, they do provide a potentially useful audit trail of where on the Internet the email came from. Abuse coordinators and other spam analyzers use a lot of such header information to aid in tracking the source of an unsolicited email message.

Some mail servers will reject email if the return address(es) do not indicate a valid domain for the network it is coming from. This usually means that Internet users must make sure that they use the mail server associated with the domain in the address they send email from.

Spammers, phishers, and other nefarious email senders take advantage of the alterability of the From address, as well as mail servers that provide bogus (or no) signature information, and don't perform checks on the domain in the return addresses.

[edit] Programming

Any useful program is usually subdivided in reusable parts called subroutines or functions. They can be called in different parts of the same program. Hence, after executing the subroutine, the program should remember where the execution should return. That's the return address, that's pushed on the call stack.

Early computers and FORTRAN compilers simply reserved a position at or before the first location of the subroutine to store the return address. This method does not require a stack, which were not generally built into computers until the late 1960s, but does not support recursion. A similar technique was used by Lotus 1-2-3, which executed a tree walk to compute calculation order. Since cycles were not allowed, no recursion was necessary, and the return location could be stored in a reserved location within each cell. The advantage is that no large stack was required which could potentially require one location for every cell allocated.