ArticleslgStudy

science

Sender Rewriting Scheme

Sender Rewriting Scheme is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Sender Rewriting Scheme rather than just read about it. In short: The Sender Rewriting Scheme (SRS) is a scheme for bypassing the Sender Policy Framework's (SPF) methods of preventing forged sender addresses. Forging a sender address is also known as email spoofing.

Key takeaways

  • Sender Rewriting Scheme belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Sender Rewriting Scheme to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Sender Rewriting Scheme from memory before moving on to harder problems.

Reference excerpt

The Sender Rewriting Scheme (SRS) is a scheme for bypassing the Sender Policy Framework's (SPF) methods of preventing forged sender addresses. Forging a sender address is also known as email spoofing.

Background In a number of cases, including change of email address and mailing lists, a message transfer agent (MTA) accepts an email message that is not destined to a local mailbox but needs to be forwarded. In such cases, the question arises of who should receive any related bounce message. Generally, that is the author, or a person or other entity who administers the forwarding itself. Sending bounces to the author is administratively simpler and was previously accomplished by keeping the original envelope sender. However, if the author address is subject to a strict SPF policy (-all) and the target MTA enforces SPF, the forwarding transaction can be rejected. As a workaround, it is possible to synthesize a temporary bounce address on the fly that will direct any bounce back to the current MTA. The scheme provides a way to recover the original envelope address so that if a bounce does arrive, it can be forwarded along the reverse path, but this time with an empty envelope sender. While there are other workarounds, SRS is a fairly general one. Its notion of reversing the path resembles the original routing dispositions for email, see below. Using the SRS protocol will fail the SPF Alignment check on DMARC records by design. DMARC records can still pass with a DKIM check.

Historical background Historically, all mail transfer agents (MTAs) added their host name to the reverse path. In the Simple Mail Transfer Protocol (SMTP) this reverse path is also known as MAIL FROM, but paths were also used before and outside of SMTP, e.g. as bang paths in UUCP and Usenet (Net-News). All news articles still contain a Path header, example:

Path: news.server.example!other.example!not-for-mail

The same information in an RFC 5321 e-mail envelope - that is the SMTP info like MAIL FROM - would be:

MAIL FROM:<not-for-mail@other.example> MAIL FROM:<@news.server.example:not-for-mail@other.example> The 1st step reflects the sender, the 2nd step the next MTA, etc. In this example, the 2nd MTA forwards the mail to a 3rd MTA, where it is finally delivered. The final MTA is also known as Mail delivery agent (MDA), putting the mail into the mailbox of the recipient. The MDA transforms the reverse path into the known Return-Path header field:

Return-Path:<@news.server.example:not-for-mail@other.example>

SMTP uses MX records for its forward routing. Explicit source routes as in...

RCPT TO:<@news.server.example:user@destination.example>

...to route mail from other.example via MTA news.server.example to MDA destination.example were cumbersome. In some cases, the new (1982) style of addresses was mixed with old UUCP bang paths in constructs like...

destination.example!user@news.server.example other.example!not-for-mail@news.server.example

...and various other kludges. SMTP and MX records rendered this method unnecessary. Therefore, source routing was deprecated in 1989 in RFC 1123. One special case in RFC 1123 are gateways from or to other networks like UUCP and NetNews, where the first sending MTA cannot reach the final receiver directly with TCP. It is solved by MX records and if necessary rewriting foreign addresses at the gateway. "MX" is an abbreviation for "Mail eXchanger". Another special case are mailing lists, where the list server rewrites all reverse paths to its own error handling address for bounces (error messages) by recipients. The list server could automatically unsubscribe bouncing recipients. This type of address rewriting is known since RFC 821 and still used today (RFC 5321, as well as RFC 2821, updated the SMTP chapter in RFC 1123). Forwarding to another address has always worked by rewriting the address in the forward path also known as RCPT TO, if and only if the forwarding MTA accepted the responsibility for both forwarding the mail and returning potential bounce messages to the sender. RFC 821 and all later SMTP specifications offer two result codes for this situation:

251 user not local (attempted forward) 551 user not local (mail rejected) For privacy reasons, these result codes are today rarely used; they include the forwarded to (251) or not forwarded to (551) address. As noted, RFC 1123 deprecated source routing, thus implicitly deprecating the reverse routing of bounces. Since RFC 1123, forwarders to third parties still rewrite the RCPT TO address, but keep the MAIL FROM as is. As a side effect, MTAs wishing to accept mail from forwarders generally accept any MAIL FROM address. RFC 5321, as well as RFC 2821, states that non-delivery reports (bounces) must be sent to the originator as indicated in the reverse path after an MTA accepted the responsibility for delivery. However, the bounce message may be suppressed when the original content is hostile (cf. spam or virus mail) or the message is forged (RFC 5321, Section 6). Note that all current forgery detection methods require the mailbox owner to supply information for them to work. Failing to supply the criteria should not make any bounce message classifiable as backscatter, although some people mistakenly think it should. Open relays and forwarders generally cannot guarantee that the MAIL FROM address indicates the originator, and cannot guarantee that final delivery will succeed. This SMTP problem caused as a side effect of RFC 1123 is addressed by SPF. Receivers can arrange their forwarding in a way that works with SPF with a variety of strategies:

not checking SPF behind their border, e.g. white list forwarders rejectingSPF FAIL, resulting in a bounce (SMTP error 550) rewriting the MAIL FROM at the forwarder (as done by mailing lists) Sender Rewriting Scheme (SRS) is one way for the third strategy.

See also Sender Policy Framework (SPF) Bounce message (SMTP non-delivery report) Bounce Address Tag Validation (BATV) Simple Mail Transfer Protocol (SMTP)

References

External links "libsrs2". Archived from the original on June 6, 2004. Paper on SRS (PDF) Historical SRS draft by Meng Weng Wong (2003) qmail SRS patch PostSRSd home page (daemon that handles SRS for Postfix)

Worked examples

Example 1 — a first encounter with Sender Rewriting Scheme

Start with the simplest possible case. Write down what Sender Rewriting Scheme claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Sender Rewriting Scheme before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Sender Rewriting Scheme ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Sender Rewriting Scheme

In research
Sender Rewriting Scheme appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Sender Rewriting Scheme in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Sender Rewriting Scheme is common in secondary-school and first-year university syllabi. It links to neighbouring topics Email authentication, so understanding it makes those chapters shorter.
In everyday life
Look for Sender Rewriting Scheme outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Sender Rewriting Scheme” →

How to study Sender Rewriting Scheme in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Sender Rewriting Scheme means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Sender Rewriting Scheme out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Sender Rewriting Scheme in simple terms?

The Sender Rewriting Scheme (SRS) is a scheme for bypassing the Sender Policy Framework's (SPF) methods of preventing forged sender addresses. Forging a sender address is also known as email spoofing.

Why does Sender Rewriting Scheme matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Sender Rewriting Scheme?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Sender Rewriting Scheme.

Tags

  • Email authentication

Keep exploring